From 52e9e80c537485664afd80c75ab7d27a109995ad Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 9 Feb 2024 22:27:50 +0900 Subject: [PATCH 001/771] docs: create root documents --- docs/README.md | 8 ++++ docs/branch-strategy.md | 96 ++++++++++++++++++++++++++++++++++++++ docs/commit-strategy.md | 47 +++++++++++++++++++ docs/directory-strategy.md | 23 +++++++++ docs/get-started.md | 17 +++++++ 5 files changed, 191 insertions(+) create mode 100644 docs/README.md create mode 100644 docs/branch-strategy.md create mode 100644 docs/commit-strategy.md create mode 100644 docs/directory-strategy.md create mode 100644 docs/get-started.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..a0315191 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,8 @@ +# DocumentFor-WhereChildBus + +## コンテンツ一覧 + +- 💻 [Get Started](get-started.md) +- 🗄️ [ディレクトリ構成](directory-strategy.md) +- 📝 [コミット戦略](commit-strategy.md) +- 🌲 [ブランチ戦略](branch-strategy.md) diff --git a/docs/branch-strategy.md b/docs/branch-strategy.md new file mode 100644 index 00000000..493526d9 --- /dev/null +++ b/docs/branch-strategy.md @@ -0,0 +1,96 @@ +# ブランチ戦略ガイド + +このガイドでは、効率的で整理された開発フローを促進し、コードベースの安定性を保持するためにチームが従うべきブランチ戦略を定義します。 + +## メインブランチ + +- **main**: 本番環境にデプロイ可能な状態を常に保ちます。変更はプルリクエストを通じてのみマージされます。 + +## 開発ブランチ + +- **develop**: 新機能、バグ修正、リファクタリングなどの開発作業用の主要ブランチです。`main`から分岐し、開発が完了した機能はこのブランチにマージされます。 + +## 機能ブランチ (`feature/(scope)/(feature-name)`) + +機能ブランチは、新しい機能の開発や既存機能の大幅な改善を行うために使用されます。これらのブランチは、特定の機能や目的に集中することで、開発プロセスをより管理しやすくすることを目的としています。 + +#### 命名規則 + +機能ブランチの名前は、`feature/`の接頭辞で始まり、その後にスコープと機能名を含めます。 + +- **スコープ**: 機能の種類や関連する領域を示すために使用されます + +- `feature/frontend` +- `feature/backend` +- `feature/muchine-learning` + +- **機能名**: ブランチが実装する機能の名前を含めます + +- `feature/backend/user-authentication` +- `feature/frontend/payment-integration` +- `feature/muchine-learning/image-recognition` + +#### 開発フロー + +1. **分岐**: 新しい機能の開発を開始する際には、常に最新の`develop`ブランチから`feature/`ブランチを分岐させます。 +2. **開発**: 機能ブランチ内で必要な全ての開発作業を行います。これには、コーディング、単体テストの作成、ドキュメントの更新などが含まれます。 +3. **定期的な更新**: 開発中に`develop`ブランチが更新された場合は、変更を機能ブランチに取り込むために定期的にリベースするかマージします。これにより、最終的なマージプロセスを容易にし、衝突の可能性を減らします。 +4. **コードレビュー**: 機能が完成し、テストをパスしたら、プルリクエストを作成して`develop`ブランチにマージする前にチームメンバーのコードレビューを受けます。 +5. **マージ**: レビューが完了し、プルリクエストが承認されたら、機能ブランチを`develop`にマージします。マージ後、ブランチはクローズされ、必要に応じて削除されます。 + +#### ベストプラクティス + +- **小さな単位でのコミット**: 機能ブランチ内の作業を小さな単位に分割し、各変更に対して明確なコミットメッセージを使用してコミットします。 +- **機能の単一性**: 一つの機能ブランチは一つの主要な機能に焦点を当てるべきです。複数の機能を同時に開発する場合は、それぞれに対して別々のブランチを使用します。 +- **透明性の維持**: プルリクエストやブランチの説明には、変更の目的や機能の概要、テストケース、特に注意が必要な点など、十分な情報を含めて他のチームメンバーとの透明性を確保します。 + +機能ブランチ戦略を適切に使用することで、チームはより効率的に機能を開発し、プロジェクトの全体的な品質とコラボレーションを向上させることができます。 + +## タイプ別ブランチ + +### CI ブランチ (`ci/`) + +- **目的**: CI (Continuous Integration) 設定ファイルやスクリプトへの変更。 +- **命名規則**: `ci/update-pipeline`, `ci/add-linting` +- **マージ先**: `develop` + +### ドキュメントブランチ (`docs/`) + +- **目的**: ドキュメントの作成や更新。 +- **命名規則**: `docs/update-readme`, `docs/add-contributing-guide` +- **マージ先**: `develop` + +### バグ修正ブランチ (`fix/`) + +- **目的**: バグの修正。 +- **命名規則**: `fix/login-error`, `fix/memory-leak` +- **マージ先**: `develop` + +### リファクタリングブランチ (`refactor/`) + +- **目的**: コードの構造を改善するが、外部に見える挙動には影響を与えない。 +- **命名規則**: `refactor/cleanup-service`, `refactor/optimize-function` +- **マージ先**: `develop` + +### スタイル調整ブランチ (`style/`) + +- **目的**: コードフォーマットやコーディング規約の遵守。 +- **命名規則**: `style/fix-indentation`, `style/apply-lint-rules` +- **マージ先**: `develop` + +### テストブランチ (`test/`) + +- **目的**: 新しいテストの追加や既存テストの修正。 +- **命名規則**: `test/add-login-tests`, `test/fix-cart-tests` +- **マージ先**: `develop` + +## マージ戦略 + +- 全てのマージはプルリクエストを通じて行われ、コードレビューが必要です。 +- スクワッシュマージを使用して履歴を整理することが推奨されます。 +- 必要に応じて、`develop`や`main`からのリベースを使用してブランチを最新の状態に保ちます。 + +## ブランチの維持 + +- マージが完了したブランチは、その作業が`develop`または`main`に統合された後に削除することが推奨されます。 +- 定期的にブランチをレビューし、もはや使用されていない古いブランチをクリーンアップします。 diff --git a/docs/commit-strategy.md b/docs/commit-strategy.md new file mode 100644 index 00000000..9e4df586 --- /dev/null +++ b/docs/commit-strategy.md @@ -0,0 +1,47 @@ +# コミットメッセージの形式 + +コミットメッセージは以下の形式に従うべきです: + +``` +<型>[任意 スコープ]: <タイトル> + +[任意 本文] + +[任意 フッター] +``` + +- **型**: コミットの種類を表します。 +- **スコープ**: コミットが影響を与える範囲(オプション)。 +- **タイトル**: コミットの主な変更点を簡潔に説明します。 +- **本文**: 変更内容の詳細な説明(オプション)。 +- **フッター**: 関連する Issue や Merge Request の参照など、追加情報(オプション)。 + +## コミットの型 + +コミットメッセージで使用できる「型」は以下の通りです: + +- **build**: ビルドシステムや外部依存関係に影響を与える変更。 +- **ci**: CI(Continuous Integration)設定ファイルやスクリプトへの変更。 +- **docs**: ドキュメントのみの変更。 +- **feat**: 新しい機能の追加。 +- **fix**: バグの修正。 +- **perf**: パフォーマンスを向上させるコード変更。 +- **refactor**: バグ修正や新機能追加を行わずに、既存コードの改善・整理。 +- **style**: コードの意味に影響を与えない変更(空白、フォーマット、セミコロンの欠落など)。 +- **test**: テストの追加や既存テストの修正。 + +## ベストプラクティス + +- **タイトルは明確で簡潔に**: タイトル行は 50 文字以内で変更の要約を述べるべきです。 +- **本文で詳細を説明**: タイトルだけでは伝えきれない変更の動機やコンテキストを本文で説明してください。本文は 72 文字ごとに改行するのが一般的です。 +- **フッターで参照を追加**: 関連する Issue や Merge Request がある場合は、フッターにその参照を追加してください。 + +## 実践例 + +``` +feat[ログイン機能]: 二要素認証を追加 + +ユーザーのセキュリティを向上させるため、ログインプロセスに二要素認証を追加しました。ユーザーは、パスワードに加えて、モバイルデバイスに送信されたコードを入力する必要があります。 + +Closes #123 +``` diff --git a/docs/directory-strategy.md b/docs/directory-strategy.md new file mode 100644 index 00000000..4f9ba683 --- /dev/null +++ b/docs/directory-strategy.md @@ -0,0 +1,23 @@ +# ディレクトリ戦略ガイド + +このガイドは、プロジェクトのルートディレクトリ内に存在する`frontend`と`backend`ディレクトリの構造と目的を定義します。適切なディレクトリ構造は、プロジェクトの可読性、拡張性、およびメンテナンスのしやすさを高めます。 + +## ルートディレクトリ + +プロジェクトのルートディレクトリには、主に二つのディレクトリ、`frontend`と`backend`が含まれます。これにより、フロントエンドとバックエンドのコードが明確に分離され、開発の効率化と専門化が促進されます。 + +### `frontend/` + +フロントエンドディレクトリは、ユーザーインターフェースとクライアントサイドのロジックを含むファイル群を格納します。このディレクトリ内では、さらに詳細なサブディレクトリ構造を定義して、ウィジェット、サービス、ユーティリティ、スタイルなどを整理します。 + +### `backend/` + +バックエンドディレクトリは、サーバーサイドのロジック、データベースの操作、API エンドポイントなどを管理します。このディレクトリもまた、機能や役割に基づいてサブディレクトリに分けることが推奨されます。 + +### `docs/` + +ディレクトリは、プロジェクトのドキュメントを格納するためのものです。これには、開発ガイド、コードリファレンス、API ドキュメント、貢献ガイドなどが含まれます。ドキュメントは、プロジェクトの透明性とコラボレーションを向上させるために重要な役割を果たします。 + +## サブディレクトリ + +それぞれのディレクトリに docs/ディレクトリが用意されているので、それぞれのディレクトリの詳細についてはそちらを参照してください。 diff --git a/docs/get-started.md b/docs/get-started.md new file mode 100644 index 00000000..9e540952 --- /dev/null +++ b/docs/get-started.md @@ -0,0 +1,17 @@ +# 💻 Get Started + +## 事前にインストールするソフトウェア + +**Comming soon...** + +## ソースコードのクローン + +以下のコマンドを入力して任意のディレクトリにレポジトリを clone してください。 + +``` +$ git clone https://github.com/su-its/typing.git +``` + +## アプリケーションの立ち上げ + +**Comming soon...** From 01c9a48114a0e8a732c12ad95074537c557426d2 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 9 Feb 2024 23:13:39 +0900 Subject: [PATCH 002/771] docs: fix typo --- docs/branch-strategy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/branch-strategy.md b/docs/branch-strategy.md index 493526d9..e0b07d68 100644 --- a/docs/branch-strategy.md +++ b/docs/branch-strategy.md @@ -22,13 +22,13 @@ - `feature/frontend` - `feature/backend` -- `feature/muchine-learning` +- `feature/machine-learning` - **機能名**: ブランチが実装する機能の名前を含めます - `feature/backend/user-authentication` - `feature/frontend/payment-integration` -- `feature/muchine-learning/image-recognition` +- `feature/machine-learning/image-recognition` #### 開発フロー From 25084062f016aec8f4e6d45058a3b1d9763dfc44 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 00:12:07 +0900 Subject: [PATCH 003/771] chore(ml): create gitignore --- .gitignore | 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..fd6565a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,209 @@ +# Created by https://www.toptal.com/developers/gitignore/api/python,macos +# Edit at https://www.toptal.com/developers/gitignore?templates=python,macos + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +### Python Patch ### +# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration +poetry.toml + +# ruff +.ruff_cache/ + +# LSP config files +pyrightconfig.json + +# End of https://www.toptal.com/developers/gitignore/api/python,macos From 40f6f1ae90e058d4bd2e4b40de928b4d2ae3c305 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 00:12:37 +0900 Subject: [PATCH 004/771] chore(ml): init rye project --- .python-version | 1 + pyproject.toml | 30 ++++++++++++++++++++++++++++++ requirements-dev.lock | 20 ++++++++++++++++++++ requirements.lock | 20 ++++++++++++++++++++ src/wherechildbus/main.py | 6 ++++++ 5 files changed, 77 insertions(+) create mode 100644 .python-version create mode 100644 pyproject.toml create mode 100644 requirements-dev.lock create mode 100644 requirements.lock create mode 100644 src/wherechildbus/main.py diff --git a/.python-version b/.python-version new file mode 100644 index 00000000..375f5cab --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11.6 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..210e9a5a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[project] +name = "wherechildbus" +version = "0.1.0" +description = "Add your description here" +authors = [ + { name = "Mizuki", email = "mbaba@kanolab.net" } +] +dependencies = [ + "opencv-python>=4.9.0.80", + "torch>=2.2.0", +] +readme = "README.md" +requires-python = ">= 3.8" + +[project.scripts] +hello = "wherechildbus:hello" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.rye] +managed = true +dev-dependencies = [] + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["src/wherechildbus"] diff --git a/requirements-dev.lock b/requirements-dev.lock new file mode 100644 index 00000000..71ecf439 --- /dev/null +++ b/requirements-dev.lock @@ -0,0 +1,20 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false + +-e file:. +filelock==3.13.1 +fsspec==2024.2.0 +jinja2==3.1.3 +markupsafe==2.1.5 +mpmath==1.3.0 +networkx==3.2.1 +numpy==1.26.4 +opencv-python==4.9.0.80 +sympy==1.12 +torch==2.2.0 +typing-extensions==4.9.0 diff --git a/requirements.lock b/requirements.lock new file mode 100644 index 00000000..71ecf439 --- /dev/null +++ b/requirements.lock @@ -0,0 +1,20 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false + +-e file:. +filelock==3.13.1 +fsspec==2024.2.0 +jinja2==3.1.3 +markupsafe==2.1.5 +mpmath==1.3.0 +networkx==3.2.1 +numpy==1.26.4 +opencv-python==4.9.0.80 +sympy==1.12 +torch==2.2.0 +typing-extensions==4.9.0 diff --git a/src/wherechildbus/main.py b/src/wherechildbus/main.py new file mode 100644 index 00000000..491f8ff6 --- /dev/null +++ b/src/wherechildbus/main.py @@ -0,0 +1,6 @@ +def main(): + print("Hello World") + + +if __name__ == "__main__": + main() From 0800aa288da6584e816f03272f4e1bd7825f6843 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 00:26:03 +0900 Subject: [PATCH 005/771] =?UTF-8?q?docs:=20chore=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=A8=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/commit-strategy.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/commit-strategy.md b/docs/commit-strategy.md index 9e4df586..4b0a4ed8 100644 --- a/docs/commit-strategy.md +++ b/docs/commit-strategy.md @@ -3,7 +3,7 @@ コミットメッセージは以下の形式に従うべきです: ``` -<型>[任意 スコープ]: <タイトル> +<型>(任意 スコープ): <タイトル> [任意 本文] @@ -22,6 +22,7 @@ - **build**: ビルドシステムや外部依存関係に影響を与える変更。 - **ci**: CI(Continuous Integration)設定ファイルやスクリプトへの変更。 +- **chore**: 開発者の補助ツールやライブラリの更新など、補助的な変更。 - **docs**: ドキュメントのみの変更。 - **feat**: 新しい機能の追加。 - **fix**: バグの修正。 From 0b1bc593ec3ae41ebac65797464c6e45c3ad1aba Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 00:26:41 +0900 Subject: [PATCH 006/771] =?UTF-8?q?chore(backend):=20ent=E7=94=9F=E6=88=90?= =?UTF-8?q?=E3=81=AE=E3=81=9F=E3=82=81=E3=81=AEmakefile=E3=82=92=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 backend/Makefile diff --git a/backend/Makefile b/backend/Makefile new file mode 100644 index 00000000..3f3889c3 --- /dev/null +++ b/backend/Makefile @@ -0,0 +1,3 @@ +.PHONY: ent/generate +ent/generate: + @GOFLAGS="-mod=mod" go generate ./domain/repository/ent \ No newline at end of file From 05d13e919cfb3b53f1a9b1cd63a9eecd01e53b5a Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 01:07:28 +0900 Subject: [PATCH 007/771] =?UTF-8?q?chore(ml):=20=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=82=84=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=81=AE=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ pyproject.toml | 2 ++ requirements-dev.lock | 7 +++++++ requirements.lock | 7 +++++++ src/face_detect_model/data/dataset.py | 1 + src/face_detect_model/data/util.py | 3 +++ src/face_detect_model/main.py | 1 + src/face_detect_model/model/model.py | 1 + src/face_detect_model/trainer.py | 1 + src/face_detect_model/util.py | 0 src/wherechildbus/main.py | 6 ------ 11 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 src/face_detect_model/data/dataset.py create mode 100644 src/face_detect_model/data/util.py create mode 100644 src/face_detect_model/main.py create mode 100644 src/face_detect_model/model/model.py create mode 100644 src/face_detect_model/trainer.py create mode 100644 src/face_detect_model/util.py delete mode 100644 src/wherechildbus/main.py diff --git a/.gitignore b/.gitignore index fd6565a9..c67b3666 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,8 @@ Temporary Items *.icloud ### Python ### +src/face_detect_model/pickle/* + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/pyproject.toml b/pyproject.toml index 210e9a5a..1ae9b5bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,8 @@ authors = [ dependencies = [ "opencv-python>=4.9.0.80", "torch>=2.2.0", + "torchvision>=0.17.0", + "numpy>=1.24.4", ] readme = "README.md" requires-python = ">= 3.8" diff --git a/requirements-dev.lock b/requirements-dev.lock index 71ecf439..e2b8ba92 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -7,14 +7,21 @@ # all-features: false -e file:. +certifi==2024.2.2 +charset-normalizer==3.3.2 filelock==3.13.1 fsspec==2024.2.0 +idna==3.6 jinja2==3.1.3 markupsafe==2.1.5 mpmath==1.3.0 networkx==3.2.1 numpy==1.26.4 opencv-python==4.9.0.80 +pillow==10.2.0 +requests==2.31.0 sympy==1.12 torch==2.2.0 +torchvision==0.17.0 typing-extensions==4.9.0 +urllib3==2.2.0 diff --git a/requirements.lock b/requirements.lock index 71ecf439..e2b8ba92 100644 --- a/requirements.lock +++ b/requirements.lock @@ -7,14 +7,21 @@ # all-features: false -e file:. +certifi==2024.2.2 +charset-normalizer==3.3.2 filelock==3.13.1 fsspec==2024.2.0 +idna==3.6 jinja2==3.1.3 markupsafe==2.1.5 mpmath==1.3.0 networkx==3.2.1 numpy==1.26.4 opencv-python==4.9.0.80 +pillow==10.2.0 +requests==2.31.0 sympy==1.12 torch==2.2.0 +torchvision==0.17.0 typing-extensions==4.9.0 +urllib3==2.2.0 diff --git a/src/face_detect_model/data/dataset.py b/src/face_detect_model/data/dataset.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/src/face_detect_model/data/dataset.py @@ -0,0 +1 @@ + diff --git a/src/face_detect_model/data/util.py b/src/face_detect_model/data/util.py new file mode 100644 index 00000000..6b25ed06 --- /dev/null +++ b/src/face_detect_model/data/util.py @@ -0,0 +1,3 @@ +# TODO: OpenCVでbounty boxをとってきてクリップ +def clip_bounty_box(): + print("Clipping bounty box") diff --git a/src/face_detect_model/main.py b/src/face_detect_model/main.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/src/face_detect_model/main.py @@ -0,0 +1 @@ + diff --git a/src/face_detect_model/model/model.py b/src/face_detect_model/model/model.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/src/face_detect_model/model/model.py @@ -0,0 +1 @@ + diff --git a/src/face_detect_model/trainer.py b/src/face_detect_model/trainer.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/src/face_detect_model/trainer.py @@ -0,0 +1 @@ + diff --git a/src/face_detect_model/util.py b/src/face_detect_model/util.py new file mode 100644 index 00000000..e69de29b diff --git a/src/wherechildbus/main.py b/src/wherechildbus/main.py deleted file mode 100644 index 491f8ff6..00000000 --- a/src/wherechildbus/main.py +++ /dev/null @@ -1,6 +0,0 @@ -def main(): - print("Hello World") - - -if __name__ == "__main__": - main() From 6223972881086f0f212f5cf4ce806d52998b33bb Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 01:13:15 +0900 Subject: [PATCH 008/771] =?UTF-8?q?chore(backend):=20ent=E7=94=9F=E6=88=90?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/generate.go | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 backend/domain/repository/ent/generate.go diff --git a/backend/domain/repository/ent/generate.go b/backend/domain/repository/ent/generate.go new file mode 100644 index 00000000..8d3fdfdc --- /dev/null +++ b/backend/domain/repository/ent/generate.go @@ -0,0 +1,3 @@ +package ent + +//go:generate go run -mod=mod entgo.io/ent/cmd/ent generate ./schema From 053d7fa35a45f669a0229f1a96892f145b16e62b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 01:30:09 +0900 Subject: [PATCH 009/771] =?UTF-8?q?feat(backend):=20=E3=83=90=E3=82=B9,?= =?UTF-8?q?=E4=BF=9D=E8=82=B2=E5=9C=92,=E4=BF=9D=E8=AD=B7=E8=80=85,?= =?UTF-8?q?=E5=AD=90=E4=BE=9B=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6Schema?= =?UTF-8?q?=E3=82=92=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/schema/bus.go | 35 +++++++++++++++ backend/domain/repository/ent/schema/child.go | 39 +++++++++++++++++ .../domain/repository/ent/schema/guardian.go | 39 +++++++++++++++++ .../domain/repository/ent/schema/nursery.go | 41 ++++++++++++++++++ backend/go.mod | 8 ++++ backend/go.sum | 43 +++++++++++++++++++ 6 files changed, 205 insertions(+) create mode 100644 backend/domain/repository/ent/schema/bus.go create mode 100644 backend/domain/repository/ent/schema/child.go create mode 100644 backend/domain/repository/ent/schema/guardian.go create mode 100644 backend/domain/repository/ent/schema/nursery.go create mode 100644 backend/go.mod create mode 100644 backend/go.sum diff --git a/backend/domain/repository/ent/schema/bus.go b/backend/domain/repository/ent/schema/bus.go new file mode 100644 index 00000000..841bc792 --- /dev/null +++ b/backend/domain/repository/ent/schema/bus.go @@ -0,0 +1,35 @@ +package schema + +import ( + "time" + + "entgo.io/ent" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "github.com/google/uuid" +) + +// Bus holds the schema definition for the Bus entity. +type Bus struct { + ent.Schema +} + +// Fields of the Bus. +func (Bus) Fields() []ent.Field { + return []ent.Field{ + field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + field.String("name"), + field.String("plate_number").Optional(), + field.Time("created_at").Default(time.Now), + field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), + } +} + +// Edges of the Bus. +func (Bus) Edges() []ent.Edge { + return []ent.Edge{ + edge.To("nursery", Nursery.Type). + Unique(), + edge.To("guardians", Guardian.Type), + } +} diff --git a/backend/domain/repository/ent/schema/child.go b/backend/domain/repository/ent/schema/child.go new file mode 100644 index 00000000..916f437d --- /dev/null +++ b/backend/domain/repository/ent/schema/child.go @@ -0,0 +1,39 @@ +package schema + +import ( + "time" + + "entgo.io/ent" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "github.com/google/uuid" +) + +// Child holds the schema definition for the Child entity. +type Child struct { + ent.Schema +} + +// Fields of the Child. +func (Child) Fields() []ent.Field { + return []ent.Field{ + field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + field.String("name"), + field.Int("age"), + field.Enum("sex"). + Values("man", "women", "other"), + field.Time("created_at").Default(time.Now), + field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), + } +} + +// Edges of the Child. +func (Child) Edges() []ent.Edge { + return []ent.Edge{ + edge.From("guardian", Guardian.Type). + Ref("children"). + Unique(), + edge.To("nursery", Nursery.Type). + Unique(), + } +} diff --git a/backend/domain/repository/ent/schema/guardian.go b/backend/domain/repository/ent/schema/guardian.go new file mode 100644 index 00000000..b5417257 --- /dev/null +++ b/backend/domain/repository/ent/schema/guardian.go @@ -0,0 +1,39 @@ +package schema + +import ( + "time" + + "entgo.io/ent" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "github.com/google/uuid" +) + +// Guardian holds the schema definition for the Guardian entity. +type Guardian struct { + ent.Schema +} + +// Fields of the Guardian. +func (Guardian) Fields() []ent.Field { + return []ent.Field{ + field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + field.String("name"), + field.String("email").Optional(), + field.String("phone").Optional(), + field.Time("created_at").Default(time.Now), + field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), + } +} + +// Edges of the Guardian. +func (Guardian) Edges() []ent.Edge { + return []ent.Edge{ + edge.To("children", Child.Type), + edge.From("bus", Bus.Type). + Ref("guardians"). + Unique(), + edge.To("nursery", Nursery.Type). + Unique(), + } +} diff --git a/backend/domain/repository/ent/schema/nursery.go b/backend/domain/repository/ent/schema/nursery.go new file mode 100644 index 00000000..d6dbd5fd --- /dev/null +++ b/backend/domain/repository/ent/schema/nursery.go @@ -0,0 +1,41 @@ +package schema + +import ( + "time" + + "entgo.io/ent" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "github.com/google/uuid" +) + +// Nursery holds the schema definition for the Nursery entity. + +type Nursery struct { + ent.Schema +} + +// Fields of the Nursery. +func (Nursery) Fields() []ent.Field { + return []ent.Field{ + field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + field.String("name"), + field.String("address"), + field.String("phone_number").Optional(), + field.String("email").Optional(), + field.Time("created_at").Default(time.Now), + field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), + } +} + +// Edges of the Nursery. +func (Nursery) Edges() []ent.Edge { + return []ent.Edge{ + edge.From("children", Child.Type). + Ref("nursery"), + edge.From("guardians", Guardian.Type). + Ref("nursery"), + edge.From("buses", Bus.Type). + Ref("nursery"), + } +} diff --git a/backend/go.mod b/backend/go.mod new file mode 100644 index 00000000..d7cd3db9 --- /dev/null +++ b/backend/go.mod @@ -0,0 +1,8 @@ +module github.com/GreenTeaProgrammers/WhereChildBus/backend + +go 1.21.5 + +require ( + entgo.io/ent v0.13.0 + github.com/google/uuid v1.3.0 +) diff --git a/backend/go.sum b/backend/go.sum new file mode 100644 index 00000000..4a215aef --- /dev/null +++ b/backend/go.sum @@ -0,0 +1,43 @@ +ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43 h1:GwdJbXydHCYPedeeLt4x/lrlIISQ4JTH1mRWuE5ZZ14= +ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43/go.mod h1:uj3pm+hUTVN/X5yfdBexHlZv+1Xu5u5ZbZx7+CDavNU= +entgo.io/ent v0.12.5/go.mod h1:Y3JVAjtlIk8xVZYSn3t3mf8xlZIn5SAOXZQxD6kKI+Q= +entgo.io/ent v0.13.0 h1:DclxWczaCpyiKn6ZWVcJjq1zIKtJ11iNKy+08lNYsJE= +entgo.io/ent v0.13.0/go.mod h1:+oU8oGna69xy29O+g+NEz+/TM7yJDhQQGJfuOWq1pT8= +github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= +github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= +github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= +github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc= +github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM= +github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= +github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 3670e18086f7db5db8a5b94f7e09cb46a0dfe3e3 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 01:55:41 +0900 Subject: [PATCH 010/771] =?UTF-8?q?chore:=20=E3=83=97=E3=83=AB=E3=83=AA?= =?UTF-8?q?=E3=82=AF=E3=82=A8=E3=82=B9=E3=83=88=E3=83=86=E3=83=B3=E3=83=97?= =?UTF-8?q?=E3=83=AC=E3=83=BC=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97?= =?UTF-8?q?=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/pull_request_template.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..d8781c44 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,27 @@ +## チケットへのリンク + +- https://github.com/orgs/GreenTeaProgrammers/projects/hogehoge-fugafugaaa + +## やったこと + +- このプルリクで何をしたのか? + +## やらないこと + +- このプルリクでやらないことは何か?(あれば。無いなら「無し」で OK)(やらない場合は、いつやるのかを明記する。) + +## できるようになること(ユーザ目線) + +- 何ができるようになるのか?(あれば。無いなら「無し」で OK) + +## できなくなること(ユーザ目線) + +- 何ができなくなるのか?(あれば。無いなら「無し」で OK) + +## 動作確認 + +- [] どのような動作確認を行ったのか? 結果はどうか? + +## その他 + +- レビュワーへの参考情報(実装上の懸念点や注意点などあれば記載) From dbeedca95ff206f43aa654a69453ea44e0c903d5 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 02:08:09 +0900 Subject: [PATCH 011/771] =?UTF-8?q?chore(ml):=20authers=E3=81=AE=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/pyproject.toml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 machine_learning/pyproject.toml diff --git a/machine_learning/pyproject.toml b/machine_learning/pyproject.toml new file mode 100644 index 00000000..6407de17 --- /dev/null +++ b/machine_learning/pyproject.toml @@ -0,0 +1,30 @@ +[project] +name = "wherechildbus" +version = "0.1.0" +description = "Add your description here" +authors = [] +dependencies = [ + "opencv-python>=4.9.0.80", + "torch>=2.2.0", + "torchvision>=0.17.0", + "numpy>=1.24.4", +] +readme = "README.md" +requires-python = ">= 3.8" + +[project.scripts] +hello = "wherechildbus:hello" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.rye] +managed = true +dev-dependencies = [] + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["src/wherechildbus"] From c46522cd4721abacf575c1cba0a961c5fde6caa0 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 02:08:54 +0900 Subject: [PATCH 012/771] =?UTF-8?q?chore(ml):=20machine=5Flearing=E3=81=AB?= =?UTF-8?q?=E9=96=A2=E3=81=99=E3=82=8B=E3=83=AB=E3=83=BC=E3=83=88=E3=83=87?= =?UTF-8?q?=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=81=AE=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E3=81=A8=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore => machine_learning/.gitignore | 0 .../.python-version | 0 README.md => machine_learning/README.md | 0 .../requirements-dev.lock | 0 .../requirements.lock | 0 .../src}/face_detect_model/data/dataset.py | 0 .../src}/face_detect_model/data/util.py | 0 .../src}/face_detect_model/main.py | 0 .../src}/face_detect_model/model/model.py | 0 .../src}/face_detect_model/trainer.py | 0 .../src}/face_detect_model/util.py | 0 pyproject.toml | 32 ------------------- 12 files changed, 32 deletions(-) rename .gitignore => machine_learning/.gitignore (100%) rename .python-version => machine_learning/.python-version (100%) rename README.md => machine_learning/README.md (100%) rename requirements-dev.lock => machine_learning/requirements-dev.lock (100%) rename requirements.lock => machine_learning/requirements.lock (100%) rename {src => machine_learning/src}/face_detect_model/data/dataset.py (100%) rename {src => machine_learning/src}/face_detect_model/data/util.py (100%) rename {src => machine_learning/src}/face_detect_model/main.py (100%) rename {src => machine_learning/src}/face_detect_model/model/model.py (100%) rename {src => machine_learning/src}/face_detect_model/trainer.py (100%) rename {src => machine_learning/src}/face_detect_model/util.py (100%) delete mode 100644 pyproject.toml diff --git a/.gitignore b/machine_learning/.gitignore similarity index 100% rename from .gitignore rename to machine_learning/.gitignore diff --git a/.python-version b/machine_learning/.python-version similarity index 100% rename from .python-version rename to machine_learning/.python-version diff --git a/README.md b/machine_learning/README.md similarity index 100% rename from README.md rename to machine_learning/README.md diff --git a/requirements-dev.lock b/machine_learning/requirements-dev.lock similarity index 100% rename from requirements-dev.lock rename to machine_learning/requirements-dev.lock diff --git a/requirements.lock b/machine_learning/requirements.lock similarity index 100% rename from requirements.lock rename to machine_learning/requirements.lock diff --git a/src/face_detect_model/data/dataset.py b/machine_learning/src/face_detect_model/data/dataset.py similarity index 100% rename from src/face_detect_model/data/dataset.py rename to machine_learning/src/face_detect_model/data/dataset.py diff --git a/src/face_detect_model/data/util.py b/machine_learning/src/face_detect_model/data/util.py similarity index 100% rename from src/face_detect_model/data/util.py rename to machine_learning/src/face_detect_model/data/util.py diff --git a/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py similarity index 100% rename from src/face_detect_model/main.py rename to machine_learning/src/face_detect_model/main.py diff --git a/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/model.py similarity index 100% rename from src/face_detect_model/model/model.py rename to machine_learning/src/face_detect_model/model/model.py diff --git a/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py similarity index 100% rename from src/face_detect_model/trainer.py rename to machine_learning/src/face_detect_model/trainer.py diff --git a/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py similarity index 100% rename from src/face_detect_model/util.py rename to machine_learning/src/face_detect_model/util.py diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 1ae9b5bf..00000000 --- a/pyproject.toml +++ /dev/null @@ -1,32 +0,0 @@ -[project] -name = "wherechildbus" -version = "0.1.0" -description = "Add your description here" -authors = [ - { name = "Mizuki", email = "mbaba@kanolab.net" } -] -dependencies = [ - "opencv-python>=4.9.0.80", - "torch>=2.2.0", - "torchvision>=0.17.0", - "numpy>=1.24.4", -] -readme = "README.md" -requires-python = ">= 3.8" - -[project.scripts] -hello = "wherechildbus:hello" - -[build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.rye] -managed = true -dev-dependencies = [] - -[tool.hatch.metadata] -allow-direct-references = true - -[tool.hatch.build.targets.wheel] -packages = ["src/wherechildbus"] From 2d7edcbfa1471da52d498dc1ca3e2ddc6bd19a3a Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 02:12:13 +0900 Subject: [PATCH 013/771] =?UTF-8?q?chore(ml):=20=E8=AA=A4=E3=81=A3?= =?UTF-8?q?=E3=81=A6=E7=A7=BB=E5=8B=95=E3=81=95=E3=82=8C=E3=81=9FREADME.md?= =?UTF-8?q?=E3=81=AE=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/README.md => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename machine_learning/README.md => README.md (100%) diff --git a/machine_learning/README.md b/README.md similarity index 100% rename from machine_learning/README.md rename to README.md From 4c04dedf04a022ad75866da785a3a9778cf4eead Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 12:04:12 +0900 Subject: [PATCH 014/771] =?UTF-8?q?feat(backend):=20Schema=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E5=8F=8A=E3=81=B3=E6=96=B0=E8=A6=8F=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/ent/schema/boarding_record.go | 35 ++++++++++++++++ backend/domain/repository/ent/schema/bus.go | 11 +++-- backend/domain/repository/ent/schema/child.go | 12 ++++++ .../ent/schema/child_bus_association.go | 41 +++++++++++++++++++ .../repository/ent/schema/child_photo.go | 35 ++++++++++++++++ .../domain/repository/ent/schema/guardian.go | 5 +-- .../domain/repository/ent/schema/nursery.go | 18 +++++--- .../domain/repository/ent/schema/station.go | 39 ++++++++++++++++++ backend/go.mod | 16 ++++++++ backend/go.sum | 22 ++++++++++ 10 files changed, 222 insertions(+), 12 deletions(-) create mode 100644 backend/domain/repository/ent/schema/boarding_record.go create mode 100644 backend/domain/repository/ent/schema/child_bus_association.go create mode 100644 backend/domain/repository/ent/schema/child_photo.go create mode 100644 backend/domain/repository/ent/schema/station.go diff --git a/backend/domain/repository/ent/schema/boarding_record.go b/backend/domain/repository/ent/schema/boarding_record.go new file mode 100644 index 00000000..00528792 --- /dev/null +++ b/backend/domain/repository/ent/schema/boarding_record.go @@ -0,0 +1,35 @@ +package schema + +import ( + "time" + + "entgo.io/ent" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "github.com/google/uuid" +) + +// BoardingRecord holds the schema definition for the Bus entity. +type BoardingRecord struct { + ent.Schema +} + +// Fields of the BoardingRecord. +func (BoardingRecord) Fields() []ent.Field { + return []ent.Field{ + field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + field.Time("timestamp").Default(time.Now).Comment("乗降時刻"), + field.Bool("is_boarding").Comment("乗車時はtrue、降車時はfalse")} +} + +// Edges of the BoardingRecord. +func (BoardingRecord) Edges() []ent.Edge { + return []ent.Edge{ + edge.From("child", Child.Type). + Ref("boarding_record"). + Unique(), + edge.From("bus", Bus.Type). + Ref("boarding_records"). + Unique(), + } +} diff --git a/backend/domain/repository/ent/schema/bus.go b/backend/domain/repository/ent/schema/bus.go index 841bc792..2fabf6f4 100644 --- a/backend/domain/repository/ent/schema/bus.go +++ b/backend/domain/repository/ent/schema/bus.go @@ -20,6 +20,10 @@ func (Bus) Fields() []ent.Field { field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), field.String("name"), field.String("plate_number").Optional(), + field.Float("latitude").Optional().Comment("現在の緯度"), + field.Float("longitude").Optional().Comment("現在の経度"), + field.Enum("status").Default("stopped").Comment("バスのステータス(運行中、停止中など)"). + Values("stopped", "running", "maintenance"), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } @@ -28,8 +32,9 @@ func (Bus) Fields() []ent.Field { // Edges of the Bus. func (Bus) Edges() []ent.Edge { return []ent.Edge{ - edge.To("nursery", Nursery.Type). - Unique(), - edge.To("guardians", Guardian.Type), + edge.To("nursery", Nursery.Type).Unique(), + edge.To("stations", Station.Type), + edge.To("boarding_records", BoardingRecord.Type), + edge.To("childBusAssociations", ChildBusAssociation.Type), } } diff --git a/backend/domain/repository/ent/schema/child.go b/backend/domain/repository/ent/schema/child.go index 916f437d..231e52a4 100644 --- a/backend/domain/repository/ent/schema/child.go +++ b/backend/domain/repository/ent/schema/child.go @@ -22,6 +22,15 @@ func (Child) Fields() []ent.Field { field.Int("age"), field.Enum("sex"). Values("man", "women", "other"), + field.Bool("is_ride_morning_bus").Default(false).Comment("朝のバスに乗るかどうか"), + field.Bool("is_ride_afternoon_bus").Default(false).Comment("放課後のバスに乗るかどうか"), + field.Bool("check_for_missing_items").Default(false).Comment("持ち物が欠けていないかをチェックするかどうか"), + // ?: 持ち物エンティティを作成する? + field.Bool("has_bag").Default(true), + field.Bool("has_lunch_box").Default(true), + field.Bool("has_water_bottle").Default(true), + field.Bool("has_umbrella").Default(true), + field.Bool("has_other").Default(true), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } @@ -33,7 +42,10 @@ func (Child) Edges() []ent.Edge { edge.From("guardian", Guardian.Type). Ref("children"). Unique(), + edge.To("childBusAssociations", ChildBusAssociation.Type), edge.To("nursery", Nursery.Type). Unique(), + edge.To("boarding_record", BoardingRecord.Type), + edge.To("photos", ChildPhoto.Type), } } diff --git a/backend/domain/repository/ent/schema/child_bus_association.go b/backend/domain/repository/ent/schema/child_bus_association.go new file mode 100644 index 00000000..fb82ff9a --- /dev/null +++ b/backend/domain/repository/ent/schema/child_bus_association.go @@ -0,0 +1,41 @@ +package schema + +import ( + "entgo.io/ent" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "github.com/google/uuid" +) + +// ChildBusAssociation holds the schema definition for the association between Child and Bus. + +type ChildBusAssociation struct { + ent.Schema +} + +// Fields of the ChildBusAssociation. +func (ChildBusAssociation) Fields() []ent.Field { + return []ent.Field{ + // ! Optionalではなく、Requiredにすると、外部キー制約が効いてしまう。 + field.UUID("child_id", uuid.UUID{}), + field.UUID("bus_id", uuid.UUID{}), + field.Enum("bus_type"). + Values("morning", "evening").Comment("朝のバスか放課後のバスかを示す"), + } +} + +// Edges of the ChildBusAssociation. +func (ChildBusAssociation) Edges() []ent.Edge { + return []ent.Edge{ + edge.From("child", Child.Type). + Ref("childBusAssociations"). // Childエンティティ側の参照名を合わせる + Unique(). // 一つのChildBusAssociationは一人の子供に紐づく + Required(). // 必ずChildBusAssociationが存在する + Field("child_id"), + edge.From("bus", Bus.Type). + Ref("childBusAssociations"). // Busエンティティ側の参照名を合わせる + Unique(). // 一つのChildBusAssociationは一台のバスに紐づく + Required(). // 必ずChildBusAssociationが存在する + Field("bus_id"), + } +} diff --git a/backend/domain/repository/ent/schema/child_photo.go b/backend/domain/repository/ent/schema/child_photo.go new file mode 100644 index 00000000..486dfad4 --- /dev/null +++ b/backend/domain/repository/ent/schema/child_photo.go @@ -0,0 +1,35 @@ +package schema + +import ( + "time" + + "entgo.io/ent" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "github.com/google/uuid" +) + +// ChildPhoto holds the schema definition for the ChildPhoto entity. +type ChildPhoto struct { + ent.Schema +} + +// Fields of the ChildPhoto. +func (ChildPhoto) Fields() []ent.Field { + return []ent.Field{ + field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + field.String("s3_bucket").Comment("AWS S3のバケット名"), + field.String("s3_key").Comment("S3内の画像ファイルのキー(ファイルパス含む)"), + field.Time("created_at").Default(time.Now).Comment("レコードの作成日時"), + field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now).Comment("レコードの最終更新日時"), + } +} + +// Edges of the ChildPhoto. +func (ChildPhoto) Edges() []ent.Edge { + return []ent.Edge{ + edge.From("child", Child.Type). + Ref("photos"). + Unique(), + } +} diff --git a/backend/domain/repository/ent/schema/guardian.go b/backend/domain/repository/ent/schema/guardian.go index b5417257..a81c339b 100644 --- a/backend/domain/repository/ent/schema/guardian.go +++ b/backend/domain/repository/ent/schema/guardian.go @@ -30,10 +30,9 @@ func (Guardian) Fields() []ent.Field { func (Guardian) Edges() []ent.Edge { return []ent.Edge{ edge.To("children", Child.Type), - edge.From("bus", Bus.Type). - Ref("guardians"). - Unique(), edge.To("nursery", Nursery.Type). Unique(), + edge.To("station", Station.Type). + Unique(), } } diff --git a/backend/domain/repository/ent/schema/nursery.go b/backend/domain/repository/ent/schema/nursery.go index d6dbd5fd..d0641442 100644 --- a/backend/domain/repository/ent/schema/nursery.go +++ b/backend/domain/repository/ent/schema/nursery.go @@ -1,6 +1,8 @@ package schema import ( + "math/rand" + "strconv" "time" "entgo.io/ent" @@ -15,10 +17,17 @@ type Nursery struct { ent.Schema } +func init() { + rand.Seed(time.Now().UnixNano()) // 乱数生成器のシードを設定 +} + // Fields of the Nursery. func (Nursery) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + field.String("nursery_code").DefaultFunc(func() string { + return strconv.Itoa(rand.Intn(90000) + 10000) + }).Unique().Comment("ユニークな数字(文字列)のコード"), //!: ユニークじゃないコードが生成される可能性がある field.String("name"), field.String("address"), field.String("phone_number").Optional(), @@ -31,11 +40,8 @@ func (Nursery) Fields() []ent.Field { // Edges of the Nursery. func (Nursery) Edges() []ent.Edge { return []ent.Edge{ - edge.From("children", Child.Type). - Ref("nursery"), - edge.From("guardians", Guardian.Type). - Ref("nursery"), - edge.From("buses", Bus.Type). - Ref("nursery"), + edge.From("children", Child.Type).Ref("nursery"), + edge.From("guardians", Guardian.Type).Ref("nursery"), + edge.From("buses", Bus.Type).Ref("nursery"), } } diff --git a/backend/domain/repository/ent/schema/station.go b/backend/domain/repository/ent/schema/station.go new file mode 100644 index 00000000..116ead7e --- /dev/null +++ b/backend/domain/repository/ent/schema/station.go @@ -0,0 +1,39 @@ +package schema + +import ( + "time" + + "entgo.io/ent" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "github.com/google/uuid" +) + +// Station holds the schema definition for the Station entity. +type Station struct { + ent.Schema +} + +// Fields of the Station. +func (Station) Fields() []ent.Field { + return []ent.Field{ + field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + field.Float("latitude").Optional(), + field.Float("longitude").Optional(), + field.Int("morning_order").Comment("朝のバス停の順番"), + field.Int("evening_order").Comment("帰りのバス停の順番"), + field.Time("created_at").Default(time.Now), + field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), + } +} + +// Edges of the Station. +func (Station) Edges() []ent.Edge { + return []ent.Edge{ + edge.From("guardian", Guardian.Type). + Ref("station"). + Unique(), + edge.From("bus", Bus.Type). + Ref("stations"), + } +} diff --git a/backend/go.mod b/backend/go.mod index d7cd3db9..c5556e03 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -6,3 +6,19 @@ require ( entgo.io/ent v0.13.0 github.com/google/uuid v1.3.0 ) + +require ( + ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43 // indirect + github.com/agext/levenshtein v1.2.1 // indirect + github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/go-openapi/inflect v0.19.0 // indirect + github.com/go-sql-driver/mysql v1.7.1 + github.com/google/go-cmp v0.6.0 // indirect + github.com/hashicorp/hcl/v2 v2.13.0 // indirect + github.com/joho/godotenv v1.5.1 + github.com/kelseyhightower/envconfig v1.4.0 + github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect + github.com/zclconf/go-cty v1.8.0 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/text v0.13.0 // indirect +) diff --git a/backend/go.sum b/backend/go.sum index 4a215aef..a3e532de 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -11,12 +11,22 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= +github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= +github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc= github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM= @@ -31,13 +41,25 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 6ff48440a5be3a0aea36f70c62dab1bbe221e783 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 12:07:58 +0900 Subject: [PATCH 015/771] =?UTF-8?q?chore:=20DB=E3=83=9E=E3=82=A4=E3=82=B0?= =?UTF-8?q?=E3=83=AC=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/server/local_main/migration.go | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 backend/cmd/server/local_main/migration.go diff --git a/backend/cmd/server/local_main/migration.go b/backend/cmd/server/local_main/migration.go new file mode 100644 index 00000000..f5790c50 --- /dev/null +++ b/backend/cmd/server/local_main/migration.go @@ -0,0 +1,36 @@ +package main + +import ( + "context" + "log" + "time" + + "github.com/go-sql-driver/mysql" + _ "github.com/go-sql-driver/mysql" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" +) + +func main() { + jst, err := time.LoadLocation("Asia/Tokyo") + if err != nil { + log.Fatal(err) + } + mysqlConfig := &mysql.Config{ + DBName: "where_child_bus", + User: "root", + Passwd: "password", + Addr: "localhost:3306", + Net: "tcp", + ParseTime: true, + Loc: jst, + } + entClient, err := ent.Open("mysql", mysqlConfig.FormatDSN()) + if err != nil { + log.Fatal(err) + } + defer entClient.Close() + if err := entClient.Schema.Create(context.Background()); err != nil { + log.Fatal(err) + } +} From eecb912be0e59050d9828a70238cab947cbcccbf Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 12:10:29 +0900 Subject: [PATCH 016/771] =?UTF-8?q?chore(backend):=20=E7=94=9F=E6=88=90?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/repository/ent/boardingrecord.go | 190 + .../ent/boardingrecord/boardingrecord.go | 124 + .../repository/ent/boardingrecord/where.go | 178 + .../repository/ent/boardingrecord_create.go | 313 + .../repository/ent/boardingrecord_delete.go | 88 + .../repository/ent/boardingrecord_query.go | 689 ++ .../repository/ent/boardingrecord_update.go | 463 ++ backend/domain/repository/ent/bus.go | 264 + backend/domain/repository/ent/bus/bus.go | 266 + backend/domain/repository/ent/bus/where.go | 534 ++ backend/domain/repository/ent/bus_create.go | 481 ++ backend/domain/repository/ent/bus_delete.go | 88 + backend/domain/repository/ent/bus_query.go | 871 +++ backend/domain/repository/ent/bus_update.go | 1135 +++ backend/domain/repository/ent/child.go | 363 + backend/domain/repository/ent/child/child.go | 347 + backend/domain/repository/ent/child/where.go | 532 ++ backend/domain/repository/ent/child_create.go | 665 ++ backend/domain/repository/ent/child_delete.go | 88 + backend/domain/repository/ent/child_query.go | 916 +++ backend/domain/repository/ent/child_update.go | 1374 ++++ .../repository/ent/childbusassociation.go | 180 + .../childbusassociation.go | 135 + .../ent/childbusassociation/where.go | 186 + .../ent/childbusassociation_create.go | 259 + .../ent/childbusassociation_delete.go | 88 + .../ent/childbusassociation_query.go | 681 ++ .../ent/childbusassociation_update.go | 466 ++ backend/domain/repository/ent/childphoto.go | 181 + .../repository/ent/childphoto/childphoto.go | 120 + .../domain/repository/ent/childphoto/where.go | 325 + .../repository/ent/childphoto_create.go | 314 + .../repository/ent/childphoto_delete.go | 88 + .../domain/repository/ent/childphoto_query.go | 614 ++ .../repository/ent/childphoto_update.go | 424 + backend/domain/repository/ent/client.go | 1693 ++++ backend/domain/repository/ent/ent.go | 622 ++ .../domain/repository/ent/enttest/enttest.go | 84 + backend/domain/repository/ent/guardian.go | 229 + .../repository/ent/guardian/guardian.go | 181 + .../domain/repository/ent/guardian/where.go | 461 ++ .../domain/repository/ent/guardian_create.go | 405 + .../domain/repository/ent/guardian_delete.go | 88 + .../domain/repository/ent/guardian_query.go | 761 ++ .../domain/repository/ent/guardian_update.go | 766 ++ backend/domain/repository/ent/hook/hook.go | 283 + .../domain/repository/ent/migrate/migrate.go | 64 + .../domain/repository/ent/migrate/schema.go | 272 + backend/domain/repository/ent/mutation.go | 6836 +++++++++++++++++ backend/domain/repository/ent/nursery.go | 231 + .../domain/repository/ent/nursery/nursery.go | 202 + .../domain/repository/ent/nursery/where.go | 601 ++ .../domain/repository/ent/nursery_create.go | 434 ++ .../domain/repository/ent/nursery_delete.go | 88 + .../domain/repository/ent/nursery_query.go | 757 ++ .../domain/repository/ent/nursery_update.go | 942 +++ .../repository/ent/predicate/predicate.go | 31 + backend/domain/repository/ent/runtime.go | 165 + .../domain/repository/ent/runtime/runtime.go | 10 + backend/domain/repository/ent/station.go | 221 + .../domain/repository/ent/station/station.go | 170 + .../domain/repository/ent/station/where.go | 408 + .../domain/repository/ent/station_create.go | 382 + .../domain/repository/ent/station_delete.go | 88 + .../domain/repository/ent/station_query.go | 720 ++ .../domain/repository/ent/station_update.go | 771 ++ backend/domain/repository/ent/tx.go | 231 + 67 files changed, 33227 insertions(+) create mode 100644 backend/domain/repository/ent/boardingrecord.go create mode 100644 backend/domain/repository/ent/boardingrecord/boardingrecord.go create mode 100644 backend/domain/repository/ent/boardingrecord/where.go create mode 100644 backend/domain/repository/ent/boardingrecord_create.go create mode 100644 backend/domain/repository/ent/boardingrecord_delete.go create mode 100644 backend/domain/repository/ent/boardingrecord_query.go create mode 100644 backend/domain/repository/ent/boardingrecord_update.go create mode 100644 backend/domain/repository/ent/bus.go create mode 100644 backend/domain/repository/ent/bus/bus.go create mode 100644 backend/domain/repository/ent/bus/where.go create mode 100644 backend/domain/repository/ent/bus_create.go create mode 100644 backend/domain/repository/ent/bus_delete.go create mode 100644 backend/domain/repository/ent/bus_query.go create mode 100644 backend/domain/repository/ent/bus_update.go create mode 100644 backend/domain/repository/ent/child.go create mode 100644 backend/domain/repository/ent/child/child.go create mode 100644 backend/domain/repository/ent/child/where.go create mode 100644 backend/domain/repository/ent/child_create.go create mode 100644 backend/domain/repository/ent/child_delete.go create mode 100644 backend/domain/repository/ent/child_query.go create mode 100644 backend/domain/repository/ent/child_update.go create mode 100644 backend/domain/repository/ent/childbusassociation.go create mode 100644 backend/domain/repository/ent/childbusassociation/childbusassociation.go create mode 100644 backend/domain/repository/ent/childbusassociation/where.go create mode 100644 backend/domain/repository/ent/childbusassociation_create.go create mode 100644 backend/domain/repository/ent/childbusassociation_delete.go create mode 100644 backend/domain/repository/ent/childbusassociation_query.go create mode 100644 backend/domain/repository/ent/childbusassociation_update.go create mode 100644 backend/domain/repository/ent/childphoto.go create mode 100644 backend/domain/repository/ent/childphoto/childphoto.go create mode 100644 backend/domain/repository/ent/childphoto/where.go create mode 100644 backend/domain/repository/ent/childphoto_create.go create mode 100644 backend/domain/repository/ent/childphoto_delete.go create mode 100644 backend/domain/repository/ent/childphoto_query.go create mode 100644 backend/domain/repository/ent/childphoto_update.go create mode 100644 backend/domain/repository/ent/client.go create mode 100644 backend/domain/repository/ent/ent.go create mode 100644 backend/domain/repository/ent/enttest/enttest.go create mode 100644 backend/domain/repository/ent/guardian.go create mode 100644 backend/domain/repository/ent/guardian/guardian.go create mode 100644 backend/domain/repository/ent/guardian/where.go create mode 100644 backend/domain/repository/ent/guardian_create.go create mode 100644 backend/domain/repository/ent/guardian_delete.go create mode 100644 backend/domain/repository/ent/guardian_query.go create mode 100644 backend/domain/repository/ent/guardian_update.go create mode 100644 backend/domain/repository/ent/hook/hook.go create mode 100644 backend/domain/repository/ent/migrate/migrate.go create mode 100644 backend/domain/repository/ent/migrate/schema.go create mode 100644 backend/domain/repository/ent/mutation.go create mode 100644 backend/domain/repository/ent/nursery.go create mode 100644 backend/domain/repository/ent/nursery/nursery.go create mode 100644 backend/domain/repository/ent/nursery/where.go create mode 100644 backend/domain/repository/ent/nursery_create.go create mode 100644 backend/domain/repository/ent/nursery_delete.go create mode 100644 backend/domain/repository/ent/nursery_query.go create mode 100644 backend/domain/repository/ent/nursery_update.go create mode 100644 backend/domain/repository/ent/predicate/predicate.go create mode 100644 backend/domain/repository/ent/runtime.go create mode 100644 backend/domain/repository/ent/runtime/runtime.go create mode 100644 backend/domain/repository/ent/station.go create mode 100644 backend/domain/repository/ent/station/station.go create mode 100644 backend/domain/repository/ent/station/where.go create mode 100644 backend/domain/repository/ent/station_create.go create mode 100644 backend/domain/repository/ent/station_delete.go create mode 100644 backend/domain/repository/ent/station_query.go create mode 100644 backend/domain/repository/ent/station_update.go create mode 100644 backend/domain/repository/ent/tx.go diff --git a/backend/domain/repository/ent/boardingrecord.go b/backend/domain/repository/ent/boardingrecord.go new file mode 100644 index 00000000..21512d00 --- /dev/null +++ b/backend/domain/repository/ent/boardingrecord.go @@ -0,0 +1,190 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "strings" + "time" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/google/uuid" +) + +// BoardingRecord is the model entity for the BoardingRecord schema. +type BoardingRecord struct { + config `json:"-"` + // ID of the ent. + ID uuid.UUID `json:"id,omitempty"` + // 乗降時刻 + Timestamp time.Time `json:"timestamp,omitempty"` + // 乗車時はtrue、降車時はfalse + IsBoarding bool `json:"is_boarding,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the BoardingRecordQuery when eager-loading is set. + Edges BoardingRecordEdges `json:"edges"` + bus_boarding_records *uuid.UUID + child_boarding_record *uuid.UUID + selectValues sql.SelectValues +} + +// BoardingRecordEdges holds the relations/edges for other nodes in the graph. +type BoardingRecordEdges struct { + // Child holds the value of the child edge. + Child *Child `json:"child,omitempty"` + // Bus holds the value of the bus edge. + Bus *Bus `json:"bus,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [2]bool +} + +// ChildOrErr returns the Child value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BoardingRecordEdges) ChildOrErr() (*Child, error) { + if e.loadedTypes[0] { + if e.Child == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: child.Label} + } + return e.Child, nil + } + return nil, &NotLoadedError{edge: "child"} +} + +// BusOrErr returns the Bus value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BoardingRecordEdges) BusOrErr() (*Bus, error) { + if e.loadedTypes[1] { + if e.Bus == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: bus.Label} + } + return e.Bus, nil + } + return nil, &NotLoadedError{edge: "bus"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*BoardingRecord) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case boardingrecord.FieldIsBoarding: + values[i] = new(sql.NullBool) + case boardingrecord.FieldTimestamp: + values[i] = new(sql.NullTime) + case boardingrecord.FieldID: + values[i] = new(uuid.UUID) + case boardingrecord.ForeignKeys[0]: // bus_boarding_records + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + case boardingrecord.ForeignKeys[1]: // child_boarding_record + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the BoardingRecord fields. +func (br *BoardingRecord) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case boardingrecord.FieldID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field id", values[i]) + } else if value != nil { + br.ID = *value + } + case boardingrecord.FieldTimestamp: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field timestamp", values[i]) + } else if value.Valid { + br.Timestamp = value.Time + } + case boardingrecord.FieldIsBoarding: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field is_boarding", values[i]) + } else if value.Valid { + br.IsBoarding = value.Bool + } + case boardingrecord.ForeignKeys[0]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field bus_boarding_records", values[i]) + } else if value.Valid { + br.bus_boarding_records = new(uuid.UUID) + *br.bus_boarding_records = *value.S.(*uuid.UUID) + } + case boardingrecord.ForeignKeys[1]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field child_boarding_record", values[i]) + } else if value.Valid { + br.child_boarding_record = new(uuid.UUID) + *br.child_boarding_record = *value.S.(*uuid.UUID) + } + default: + br.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the BoardingRecord. +// This includes values selected through modifiers, order, etc. +func (br *BoardingRecord) Value(name string) (ent.Value, error) { + return br.selectValues.Get(name) +} + +// QueryChild queries the "child" edge of the BoardingRecord entity. +func (br *BoardingRecord) QueryChild() *ChildQuery { + return NewBoardingRecordClient(br.config).QueryChild(br) +} + +// QueryBus queries the "bus" edge of the BoardingRecord entity. +func (br *BoardingRecord) QueryBus() *BusQuery { + return NewBoardingRecordClient(br.config).QueryBus(br) +} + +// Update returns a builder for updating this BoardingRecord. +// Note that you need to call BoardingRecord.Unwrap() before calling this method if this BoardingRecord +// was returned from a transaction, and the transaction was committed or rolled back. +func (br *BoardingRecord) Update() *BoardingRecordUpdateOne { + return NewBoardingRecordClient(br.config).UpdateOne(br) +} + +// Unwrap unwraps the BoardingRecord entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (br *BoardingRecord) Unwrap() *BoardingRecord { + _tx, ok := br.config.driver.(*txDriver) + if !ok { + panic("ent: BoardingRecord is not a transactional entity") + } + br.config.driver = _tx.drv + return br +} + +// String implements the fmt.Stringer. +func (br *BoardingRecord) String() string { + var builder strings.Builder + builder.WriteString("BoardingRecord(") + builder.WriteString(fmt.Sprintf("id=%v, ", br.ID)) + builder.WriteString("timestamp=") + builder.WriteString(br.Timestamp.Format(time.ANSIC)) + builder.WriteString(", ") + builder.WriteString("is_boarding=") + builder.WriteString(fmt.Sprintf("%v", br.IsBoarding)) + builder.WriteByte(')') + return builder.String() +} + +// BoardingRecords is a parsable slice of BoardingRecord. +type BoardingRecords []*BoardingRecord diff --git a/backend/domain/repository/ent/boardingrecord/boardingrecord.go b/backend/domain/repository/ent/boardingrecord/boardingrecord.go new file mode 100644 index 00000000..ee148d23 --- /dev/null +++ b/backend/domain/repository/ent/boardingrecord/boardingrecord.go @@ -0,0 +1,124 @@ +// Code generated by ent, DO NOT EDIT. + +package boardingrecord + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/google/uuid" +) + +const ( + // Label holds the string label denoting the boardingrecord type in the database. + Label = "boarding_record" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldTimestamp holds the string denoting the timestamp field in the database. + FieldTimestamp = "timestamp" + // FieldIsBoarding holds the string denoting the is_boarding field in the database. + FieldIsBoarding = "is_boarding" + // EdgeChild holds the string denoting the child edge name in mutations. + EdgeChild = "child" + // EdgeBus holds the string denoting the bus edge name in mutations. + EdgeBus = "bus" + // Table holds the table name of the boardingrecord in the database. + Table = "boarding_records" + // ChildTable is the table that holds the child relation/edge. + ChildTable = "boarding_records" + // ChildInverseTable is the table name for the Child entity. + // It exists in this package in order to avoid circular dependency with the "child" package. + ChildInverseTable = "childs" + // ChildColumn is the table column denoting the child relation/edge. + ChildColumn = "child_boarding_record" + // BusTable is the table that holds the bus relation/edge. + BusTable = "boarding_records" + // BusInverseTable is the table name for the Bus entity. + // It exists in this package in order to avoid circular dependency with the "bus" package. + BusInverseTable = "bus" + // BusColumn is the table column denoting the bus relation/edge. + BusColumn = "bus_boarding_records" +) + +// Columns holds all SQL columns for boardingrecord fields. +var Columns = []string{ + FieldID, + FieldTimestamp, + FieldIsBoarding, +} + +// ForeignKeys holds the SQL foreign-keys that are owned by the "boarding_records" +// table and are not defined as standalone fields in the schema. +var ForeignKeys = []string{ + "bus_boarding_records", + "child_boarding_record", +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + for i := range ForeignKeys { + if column == ForeignKeys[i] { + return true + } + } + return false +} + +var ( + // DefaultTimestamp holds the default value on creation for the "timestamp" field. + DefaultTimestamp func() time.Time + // DefaultID holds the default value on creation for the "id" field. + DefaultID func() uuid.UUID +) + +// OrderOption defines the ordering options for the BoardingRecord queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByTimestamp orders the results by the timestamp field. +func ByTimestamp(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldTimestamp, opts...).ToFunc() +} + +// ByIsBoarding orders the results by the is_boarding field. +func ByIsBoarding(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldIsBoarding, opts...).ToFunc() +} + +// ByChildField orders the results by child field. +func ByChildField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newChildStep(), sql.OrderByField(field, opts...)) + } +} + +// ByBusField orders the results by bus field. +func ByBusField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newBusStep(), sql.OrderByField(field, opts...)) + } +} +func newChildStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(ChildInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, ChildTable, ChildColumn), + ) +} +func newBusStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(BusInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, BusTable, BusColumn), + ) +} diff --git a/backend/domain/repository/ent/boardingrecord/where.go b/backend/domain/repository/ent/boardingrecord/where.go new file mode 100644 index 00000000..72f2bc0f --- /dev/null +++ b/backend/domain/repository/ent/boardingrecord/where.go @@ -0,0 +1,178 @@ +// Code generated by ent, DO NOT EDIT. + +package boardingrecord + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ID filters vertices based on their ID field. +func ID(id uuid.UUID) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id uuid.UUID) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id uuid.UUID) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...uuid.UUID) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...uuid.UUID) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id uuid.UUID) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id uuid.UUID) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id uuid.UUID) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id uuid.UUID) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldLTE(FieldID, id)) +} + +// Timestamp applies equality check predicate on the "timestamp" field. It's identical to TimestampEQ. +func Timestamp(v time.Time) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldEQ(FieldTimestamp, v)) +} + +// IsBoarding applies equality check predicate on the "is_boarding" field. It's identical to IsBoardingEQ. +func IsBoarding(v bool) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldEQ(FieldIsBoarding, v)) +} + +// TimestampEQ applies the EQ predicate on the "timestamp" field. +func TimestampEQ(v time.Time) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldEQ(FieldTimestamp, v)) +} + +// TimestampNEQ applies the NEQ predicate on the "timestamp" field. +func TimestampNEQ(v time.Time) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldNEQ(FieldTimestamp, v)) +} + +// TimestampIn applies the In predicate on the "timestamp" field. +func TimestampIn(vs ...time.Time) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldIn(FieldTimestamp, vs...)) +} + +// TimestampNotIn applies the NotIn predicate on the "timestamp" field. +func TimestampNotIn(vs ...time.Time) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldNotIn(FieldTimestamp, vs...)) +} + +// TimestampGT applies the GT predicate on the "timestamp" field. +func TimestampGT(v time.Time) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldGT(FieldTimestamp, v)) +} + +// TimestampGTE applies the GTE predicate on the "timestamp" field. +func TimestampGTE(v time.Time) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldGTE(FieldTimestamp, v)) +} + +// TimestampLT applies the LT predicate on the "timestamp" field. +func TimestampLT(v time.Time) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldLT(FieldTimestamp, v)) +} + +// TimestampLTE applies the LTE predicate on the "timestamp" field. +func TimestampLTE(v time.Time) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldLTE(FieldTimestamp, v)) +} + +// IsBoardingEQ applies the EQ predicate on the "is_boarding" field. +func IsBoardingEQ(v bool) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldEQ(FieldIsBoarding, v)) +} + +// IsBoardingNEQ applies the NEQ predicate on the "is_boarding" field. +func IsBoardingNEQ(v bool) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.FieldNEQ(FieldIsBoarding, v)) +} + +// HasChild applies the HasEdge predicate on the "child" edge. +func HasChild() predicate.BoardingRecord { + return predicate.BoardingRecord(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, ChildTable, ChildColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasChildWith applies the HasEdge predicate on the "child" edge with a given conditions (other predicates). +func HasChildWith(preds ...predicate.Child) predicate.BoardingRecord { + return predicate.BoardingRecord(func(s *sql.Selector) { + step := newChildStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasBus applies the HasEdge predicate on the "bus" edge. +func HasBus() predicate.BoardingRecord { + return predicate.BoardingRecord(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, BusTable, BusColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasBusWith applies the HasEdge predicate on the "bus" edge with a given conditions (other predicates). +func HasBusWith(preds ...predicate.Bus) predicate.BoardingRecord { + return predicate.BoardingRecord(func(s *sql.Selector) { + step := newBusStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.BoardingRecord) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.BoardingRecord) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.BoardingRecord) predicate.BoardingRecord { + return predicate.BoardingRecord(sql.NotPredicates(p)) +} diff --git a/backend/domain/repository/ent/boardingrecord_create.go b/backend/domain/repository/ent/boardingrecord_create.go new file mode 100644 index 00000000..54a52c82 --- /dev/null +++ b/backend/domain/repository/ent/boardingrecord_create.go @@ -0,0 +1,313 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/google/uuid" +) + +// BoardingRecordCreate is the builder for creating a BoardingRecord entity. +type BoardingRecordCreate struct { + config + mutation *BoardingRecordMutation + hooks []Hook +} + +// SetTimestamp sets the "timestamp" field. +func (brc *BoardingRecordCreate) SetTimestamp(t time.Time) *BoardingRecordCreate { + brc.mutation.SetTimestamp(t) + return brc +} + +// SetNillableTimestamp sets the "timestamp" field if the given value is not nil. +func (brc *BoardingRecordCreate) SetNillableTimestamp(t *time.Time) *BoardingRecordCreate { + if t != nil { + brc.SetTimestamp(*t) + } + return brc +} + +// SetIsBoarding sets the "is_boarding" field. +func (brc *BoardingRecordCreate) SetIsBoarding(b bool) *BoardingRecordCreate { + brc.mutation.SetIsBoarding(b) + return brc +} + +// SetID sets the "id" field. +func (brc *BoardingRecordCreate) SetID(u uuid.UUID) *BoardingRecordCreate { + brc.mutation.SetID(u) + return brc +} + +// SetNillableID sets the "id" field if the given value is not nil. +func (brc *BoardingRecordCreate) SetNillableID(u *uuid.UUID) *BoardingRecordCreate { + if u != nil { + brc.SetID(*u) + } + return brc +} + +// SetChildID sets the "child" edge to the Child entity by ID. +func (brc *BoardingRecordCreate) SetChildID(id uuid.UUID) *BoardingRecordCreate { + brc.mutation.SetChildID(id) + return brc +} + +// SetNillableChildID sets the "child" edge to the Child entity by ID if the given value is not nil. +func (brc *BoardingRecordCreate) SetNillableChildID(id *uuid.UUID) *BoardingRecordCreate { + if id != nil { + brc = brc.SetChildID(*id) + } + return brc +} + +// SetChild sets the "child" edge to the Child entity. +func (brc *BoardingRecordCreate) SetChild(c *Child) *BoardingRecordCreate { + return brc.SetChildID(c.ID) +} + +// SetBusID sets the "bus" edge to the Bus entity by ID. +func (brc *BoardingRecordCreate) SetBusID(id uuid.UUID) *BoardingRecordCreate { + brc.mutation.SetBusID(id) + return brc +} + +// SetNillableBusID sets the "bus" edge to the Bus entity by ID if the given value is not nil. +func (brc *BoardingRecordCreate) SetNillableBusID(id *uuid.UUID) *BoardingRecordCreate { + if id != nil { + brc = brc.SetBusID(*id) + } + return brc +} + +// SetBus sets the "bus" edge to the Bus entity. +func (brc *BoardingRecordCreate) SetBus(b *Bus) *BoardingRecordCreate { + return brc.SetBusID(b.ID) +} + +// Mutation returns the BoardingRecordMutation object of the builder. +func (brc *BoardingRecordCreate) Mutation() *BoardingRecordMutation { + return brc.mutation +} + +// Save creates the BoardingRecord in the database. +func (brc *BoardingRecordCreate) Save(ctx context.Context) (*BoardingRecord, error) { + brc.defaults() + return withHooks(ctx, brc.sqlSave, brc.mutation, brc.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (brc *BoardingRecordCreate) SaveX(ctx context.Context) *BoardingRecord { + v, err := brc.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (brc *BoardingRecordCreate) Exec(ctx context.Context) error { + _, err := brc.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (brc *BoardingRecordCreate) ExecX(ctx context.Context) { + if err := brc.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (brc *BoardingRecordCreate) defaults() { + if _, ok := brc.mutation.Timestamp(); !ok { + v := boardingrecord.DefaultTimestamp() + brc.mutation.SetTimestamp(v) + } + if _, ok := brc.mutation.ID(); !ok { + v := boardingrecord.DefaultID() + brc.mutation.SetID(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (brc *BoardingRecordCreate) check() error { + if _, ok := brc.mutation.Timestamp(); !ok { + return &ValidationError{Name: "timestamp", err: errors.New(`ent: missing required field "BoardingRecord.timestamp"`)} + } + if _, ok := brc.mutation.IsBoarding(); !ok { + return &ValidationError{Name: "is_boarding", err: errors.New(`ent: missing required field "BoardingRecord.is_boarding"`)} + } + return nil +} + +func (brc *BoardingRecordCreate) sqlSave(ctx context.Context) (*BoardingRecord, error) { + if err := brc.check(); err != nil { + return nil, err + } + _node, _spec := brc.createSpec() + if err := sqlgraph.CreateNode(ctx, brc.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + if _spec.ID.Value != nil { + if id, ok := _spec.ID.Value.(*uuid.UUID); ok { + _node.ID = *id + } else if err := _node.ID.Scan(_spec.ID.Value); err != nil { + return nil, err + } + } + brc.mutation.id = &_node.ID + brc.mutation.done = true + return _node, nil +} + +func (brc *BoardingRecordCreate) createSpec() (*BoardingRecord, *sqlgraph.CreateSpec) { + var ( + _node = &BoardingRecord{config: brc.config} + _spec = sqlgraph.NewCreateSpec(boardingrecord.Table, sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID)) + ) + if id, ok := brc.mutation.ID(); ok { + _node.ID = id + _spec.ID.Value = &id + } + if value, ok := brc.mutation.Timestamp(); ok { + _spec.SetField(boardingrecord.FieldTimestamp, field.TypeTime, value) + _node.Timestamp = value + } + if value, ok := brc.mutation.IsBoarding(); ok { + _spec.SetField(boardingrecord.FieldIsBoarding, field.TypeBool, value) + _node.IsBoarding = value + } + if nodes := brc.mutation.ChildIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: boardingrecord.ChildTable, + Columns: []string{boardingrecord.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.child_boarding_record = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := brc.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: boardingrecord.BusTable, + Columns: []string{boardingrecord.BusColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.bus_boarding_records = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// BoardingRecordCreateBulk is the builder for creating many BoardingRecord entities in bulk. +type BoardingRecordCreateBulk struct { + config + err error + builders []*BoardingRecordCreate +} + +// Save creates the BoardingRecord entities in the database. +func (brcb *BoardingRecordCreateBulk) Save(ctx context.Context) ([]*BoardingRecord, error) { + if brcb.err != nil { + return nil, brcb.err + } + specs := make([]*sqlgraph.CreateSpec, len(brcb.builders)) + nodes := make([]*BoardingRecord, len(brcb.builders)) + mutators := make([]Mutator, len(brcb.builders)) + for i := range brcb.builders { + func(i int, root context.Context) { + builder := brcb.builders[i] + builder.defaults() + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*BoardingRecordMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, brcb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, brcb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, brcb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (brcb *BoardingRecordCreateBulk) SaveX(ctx context.Context) []*BoardingRecord { + v, err := brcb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (brcb *BoardingRecordCreateBulk) Exec(ctx context.Context) error { + _, err := brcb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (brcb *BoardingRecordCreateBulk) ExecX(ctx context.Context) { + if err := brcb.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/boardingrecord_delete.go b/backend/domain/repository/ent/boardingrecord_delete.go new file mode 100644 index 00000000..406cd617 --- /dev/null +++ b/backend/domain/repository/ent/boardingrecord_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" +) + +// BoardingRecordDelete is the builder for deleting a BoardingRecord entity. +type BoardingRecordDelete struct { + config + hooks []Hook + mutation *BoardingRecordMutation +} + +// Where appends a list predicates to the BoardingRecordDelete builder. +func (brd *BoardingRecordDelete) Where(ps ...predicate.BoardingRecord) *BoardingRecordDelete { + brd.mutation.Where(ps...) + return brd +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (brd *BoardingRecordDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, brd.sqlExec, brd.mutation, brd.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (brd *BoardingRecordDelete) ExecX(ctx context.Context) int { + n, err := brd.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (brd *BoardingRecordDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(boardingrecord.Table, sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID)) + if ps := brd.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, brd.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + brd.mutation.done = true + return affected, err +} + +// BoardingRecordDeleteOne is the builder for deleting a single BoardingRecord entity. +type BoardingRecordDeleteOne struct { + brd *BoardingRecordDelete +} + +// Where appends a list predicates to the BoardingRecordDelete builder. +func (brdo *BoardingRecordDeleteOne) Where(ps ...predicate.BoardingRecord) *BoardingRecordDeleteOne { + brdo.brd.mutation.Where(ps...) + return brdo +} + +// Exec executes the deletion query. +func (brdo *BoardingRecordDeleteOne) Exec(ctx context.Context) error { + n, err := brdo.brd.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{boardingrecord.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (brdo *BoardingRecordDeleteOne) ExecX(ctx context.Context) { + if err := brdo.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/boardingrecord_query.go b/backend/domain/repository/ent/boardingrecord_query.go new file mode 100644 index 00000000..2522b162 --- /dev/null +++ b/backend/domain/repository/ent/boardingrecord_query.go @@ -0,0 +1,689 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "fmt" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// BoardingRecordQuery is the builder for querying BoardingRecord entities. +type BoardingRecordQuery struct { + config + ctx *QueryContext + order []boardingrecord.OrderOption + inters []Interceptor + predicates []predicate.BoardingRecord + withChild *ChildQuery + withBus *BusQuery + withFKs bool + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the BoardingRecordQuery builder. +func (brq *BoardingRecordQuery) Where(ps ...predicate.BoardingRecord) *BoardingRecordQuery { + brq.predicates = append(brq.predicates, ps...) + return brq +} + +// Limit the number of records to be returned by this query. +func (brq *BoardingRecordQuery) Limit(limit int) *BoardingRecordQuery { + brq.ctx.Limit = &limit + return brq +} + +// Offset to start from. +func (brq *BoardingRecordQuery) Offset(offset int) *BoardingRecordQuery { + brq.ctx.Offset = &offset + return brq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (brq *BoardingRecordQuery) Unique(unique bool) *BoardingRecordQuery { + brq.ctx.Unique = &unique + return brq +} + +// Order specifies how the records should be ordered. +func (brq *BoardingRecordQuery) Order(o ...boardingrecord.OrderOption) *BoardingRecordQuery { + brq.order = append(brq.order, o...) + return brq +} + +// QueryChild chains the current query on the "child" edge. +func (brq *BoardingRecordQuery) QueryChild() *ChildQuery { + query := (&ChildClient{config: brq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := brq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := brq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(boardingrecord.Table, boardingrecord.FieldID, selector), + sqlgraph.To(child.Table, child.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, boardingrecord.ChildTable, boardingrecord.ChildColumn), + ) + fromU = sqlgraph.SetNeighbors(brq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryBus chains the current query on the "bus" edge. +func (brq *BoardingRecordQuery) QueryBus() *BusQuery { + query := (&BusClient{config: brq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := brq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := brq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(boardingrecord.Table, boardingrecord.FieldID, selector), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, boardingrecord.BusTable, boardingrecord.BusColumn), + ) + fromU = sqlgraph.SetNeighbors(brq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first BoardingRecord entity from the query. +// Returns a *NotFoundError when no BoardingRecord was found. +func (brq *BoardingRecordQuery) First(ctx context.Context) (*BoardingRecord, error) { + nodes, err := brq.Limit(1).All(setContextOp(ctx, brq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{boardingrecord.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (brq *BoardingRecordQuery) FirstX(ctx context.Context) *BoardingRecord { + node, err := brq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first BoardingRecord ID from the query. +// Returns a *NotFoundError when no BoardingRecord ID was found. +func (brq *BoardingRecordQuery) FirstID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = brq.Limit(1).IDs(setContextOp(ctx, brq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{boardingrecord.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (brq *BoardingRecordQuery) FirstIDX(ctx context.Context) uuid.UUID { + id, err := brq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single BoardingRecord entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one BoardingRecord entity is found. +// Returns a *NotFoundError when no BoardingRecord entities are found. +func (brq *BoardingRecordQuery) Only(ctx context.Context) (*BoardingRecord, error) { + nodes, err := brq.Limit(2).All(setContextOp(ctx, brq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{boardingrecord.Label} + default: + return nil, &NotSingularError{boardingrecord.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (brq *BoardingRecordQuery) OnlyX(ctx context.Context) *BoardingRecord { + node, err := brq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only BoardingRecord ID in the query. +// Returns a *NotSingularError when more than one BoardingRecord ID is found. +// Returns a *NotFoundError when no entities are found. +func (brq *BoardingRecordQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = brq.Limit(2).IDs(setContextOp(ctx, brq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{boardingrecord.Label} + default: + err = &NotSingularError{boardingrecord.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (brq *BoardingRecordQuery) OnlyIDX(ctx context.Context) uuid.UUID { + id, err := brq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of BoardingRecords. +func (brq *BoardingRecordQuery) All(ctx context.Context) ([]*BoardingRecord, error) { + ctx = setContextOp(ctx, brq.ctx, "All") + if err := brq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*BoardingRecord, *BoardingRecordQuery]() + return withInterceptors[[]*BoardingRecord](ctx, brq, qr, brq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (brq *BoardingRecordQuery) AllX(ctx context.Context) []*BoardingRecord { + nodes, err := brq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of BoardingRecord IDs. +func (brq *BoardingRecordQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error) { + if brq.ctx.Unique == nil && brq.path != nil { + brq.Unique(true) + } + ctx = setContextOp(ctx, brq.ctx, "IDs") + if err = brq.Select(boardingrecord.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (brq *BoardingRecordQuery) IDsX(ctx context.Context) []uuid.UUID { + ids, err := brq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (brq *BoardingRecordQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, brq.ctx, "Count") + if err := brq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, brq, querierCount[*BoardingRecordQuery](), brq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (brq *BoardingRecordQuery) CountX(ctx context.Context) int { + count, err := brq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (brq *BoardingRecordQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, brq.ctx, "Exist") + switch _, err := brq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (brq *BoardingRecordQuery) ExistX(ctx context.Context) bool { + exist, err := brq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the BoardingRecordQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (brq *BoardingRecordQuery) Clone() *BoardingRecordQuery { + if brq == nil { + return nil + } + return &BoardingRecordQuery{ + config: brq.config, + ctx: brq.ctx.Clone(), + order: append([]boardingrecord.OrderOption{}, brq.order...), + inters: append([]Interceptor{}, brq.inters...), + predicates: append([]predicate.BoardingRecord{}, brq.predicates...), + withChild: brq.withChild.Clone(), + withBus: brq.withBus.Clone(), + // clone intermediate query. + sql: brq.sql.Clone(), + path: brq.path, + } +} + +// WithChild tells the query-builder to eager-load the nodes that are connected to +// the "child" edge. The optional arguments are used to configure the query builder of the edge. +func (brq *BoardingRecordQuery) WithChild(opts ...func(*ChildQuery)) *BoardingRecordQuery { + query := (&ChildClient{config: brq.config}).Query() + for _, opt := range opts { + opt(query) + } + brq.withChild = query + return brq +} + +// WithBus tells the query-builder to eager-load the nodes that are connected to +// the "bus" edge. The optional arguments are used to configure the query builder of the edge. +func (brq *BoardingRecordQuery) WithBus(opts ...func(*BusQuery)) *BoardingRecordQuery { + query := (&BusClient{config: brq.config}).Query() + for _, opt := range opts { + opt(query) + } + brq.withBus = query + return brq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// Timestamp time.Time `json:"timestamp,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.BoardingRecord.Query(). +// GroupBy(boardingrecord.FieldTimestamp). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (brq *BoardingRecordQuery) GroupBy(field string, fields ...string) *BoardingRecordGroupBy { + brq.ctx.Fields = append([]string{field}, fields...) + grbuild := &BoardingRecordGroupBy{build: brq} + grbuild.flds = &brq.ctx.Fields + grbuild.label = boardingrecord.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// Timestamp time.Time `json:"timestamp,omitempty"` +// } +// +// client.BoardingRecord.Query(). +// Select(boardingrecord.FieldTimestamp). +// Scan(ctx, &v) +func (brq *BoardingRecordQuery) Select(fields ...string) *BoardingRecordSelect { + brq.ctx.Fields = append(brq.ctx.Fields, fields...) + sbuild := &BoardingRecordSelect{BoardingRecordQuery: brq} + sbuild.label = boardingrecord.Label + sbuild.flds, sbuild.scan = &brq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a BoardingRecordSelect configured with the given aggregations. +func (brq *BoardingRecordQuery) Aggregate(fns ...AggregateFunc) *BoardingRecordSelect { + return brq.Select().Aggregate(fns...) +} + +func (brq *BoardingRecordQuery) prepareQuery(ctx context.Context) error { + for _, inter := range brq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, brq); err != nil { + return err + } + } + } + for _, f := range brq.ctx.Fields { + if !boardingrecord.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if brq.path != nil { + prev, err := brq.path(ctx) + if err != nil { + return err + } + brq.sql = prev + } + return nil +} + +func (brq *BoardingRecordQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BoardingRecord, error) { + var ( + nodes = []*BoardingRecord{} + withFKs = brq.withFKs + _spec = brq.querySpec() + loadedTypes = [2]bool{ + brq.withChild != nil, + brq.withBus != nil, + } + ) + if brq.withChild != nil || brq.withBus != nil { + withFKs = true + } + if withFKs { + _spec.Node.Columns = append(_spec.Node.Columns, boardingrecord.ForeignKeys...) + } + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*BoardingRecord).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &BoardingRecord{config: brq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, brq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := brq.withChild; query != nil { + if err := brq.loadChild(ctx, query, nodes, nil, + func(n *BoardingRecord, e *Child) { n.Edges.Child = e }); err != nil { + return nil, err + } + } + if query := brq.withBus; query != nil { + if err := brq.loadBus(ctx, query, nodes, nil, + func(n *BoardingRecord, e *Bus) { n.Edges.Bus = e }); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (brq *BoardingRecordQuery) loadChild(ctx context.Context, query *ChildQuery, nodes []*BoardingRecord, init func(*BoardingRecord), assign func(*BoardingRecord, *Child)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*BoardingRecord) + for i := range nodes { + if nodes[i].child_boarding_record == nil { + continue + } + fk := *nodes[i].child_boarding_record + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(child.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "child_boarding_record" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (brq *BoardingRecordQuery) loadBus(ctx context.Context, query *BusQuery, nodes []*BoardingRecord, init func(*BoardingRecord), assign func(*BoardingRecord, *Bus)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*BoardingRecord) + for i := range nodes { + if nodes[i].bus_boarding_records == nil { + continue + } + fk := *nodes[i].bus_boarding_records + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(bus.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "bus_boarding_records" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} + +func (brq *BoardingRecordQuery) sqlCount(ctx context.Context) (int, error) { + _spec := brq.querySpec() + _spec.Node.Columns = brq.ctx.Fields + if len(brq.ctx.Fields) > 0 { + _spec.Unique = brq.ctx.Unique != nil && *brq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, brq.driver, _spec) +} + +func (brq *BoardingRecordQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(boardingrecord.Table, boardingrecord.Columns, sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID)) + _spec.From = brq.sql + if unique := brq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if brq.path != nil { + _spec.Unique = true + } + if fields := brq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, boardingrecord.FieldID) + for i := range fields { + if fields[i] != boardingrecord.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + } + if ps := brq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := brq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := brq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := brq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (brq *BoardingRecordQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(brq.driver.Dialect()) + t1 := builder.Table(boardingrecord.Table) + columns := brq.ctx.Fields + if len(columns) == 0 { + columns = boardingrecord.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if brq.sql != nil { + selector = brq.sql + selector.Select(selector.Columns(columns...)...) + } + if brq.ctx.Unique != nil && *brq.ctx.Unique { + selector.Distinct() + } + for _, p := range brq.predicates { + p(selector) + } + for _, p := range brq.order { + p(selector) + } + if offset := brq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := brq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// BoardingRecordGroupBy is the group-by builder for BoardingRecord entities. +type BoardingRecordGroupBy struct { + selector + build *BoardingRecordQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (brgb *BoardingRecordGroupBy) Aggregate(fns ...AggregateFunc) *BoardingRecordGroupBy { + brgb.fns = append(brgb.fns, fns...) + return brgb +} + +// Scan applies the selector query and scans the result into the given value. +func (brgb *BoardingRecordGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, brgb.build.ctx, "GroupBy") + if err := brgb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*BoardingRecordQuery, *BoardingRecordGroupBy](ctx, brgb.build, brgb, brgb.build.inters, v) +} + +func (brgb *BoardingRecordGroupBy) sqlScan(ctx context.Context, root *BoardingRecordQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(brgb.fns)) + for _, fn := range brgb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*brgb.flds)+len(brgb.fns)) + for _, f := range *brgb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*brgb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := brgb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// BoardingRecordSelect is the builder for selecting fields of BoardingRecord entities. +type BoardingRecordSelect struct { + *BoardingRecordQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (brs *BoardingRecordSelect) Aggregate(fns ...AggregateFunc) *BoardingRecordSelect { + brs.fns = append(brs.fns, fns...) + return brs +} + +// Scan applies the selector query and scans the result into the given value. +func (brs *BoardingRecordSelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, brs.ctx, "Select") + if err := brs.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*BoardingRecordQuery, *BoardingRecordSelect](ctx, brs.BoardingRecordQuery, brs, brs.inters, v) +} + +func (brs *BoardingRecordSelect) sqlScan(ctx context.Context, root *BoardingRecordQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(brs.fns)) + for _, fn := range brs.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*brs.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := brs.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/backend/domain/repository/ent/boardingrecord_update.go b/backend/domain/repository/ent/boardingrecord_update.go new file mode 100644 index 00000000..80e4c4b2 --- /dev/null +++ b/backend/domain/repository/ent/boardingrecord_update.go @@ -0,0 +1,463 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// BoardingRecordUpdate is the builder for updating BoardingRecord entities. +type BoardingRecordUpdate struct { + config + hooks []Hook + mutation *BoardingRecordMutation +} + +// Where appends a list predicates to the BoardingRecordUpdate builder. +func (bru *BoardingRecordUpdate) Where(ps ...predicate.BoardingRecord) *BoardingRecordUpdate { + bru.mutation.Where(ps...) + return bru +} + +// SetTimestamp sets the "timestamp" field. +func (bru *BoardingRecordUpdate) SetTimestamp(t time.Time) *BoardingRecordUpdate { + bru.mutation.SetTimestamp(t) + return bru +} + +// SetNillableTimestamp sets the "timestamp" field if the given value is not nil. +func (bru *BoardingRecordUpdate) SetNillableTimestamp(t *time.Time) *BoardingRecordUpdate { + if t != nil { + bru.SetTimestamp(*t) + } + return bru +} + +// SetIsBoarding sets the "is_boarding" field. +func (bru *BoardingRecordUpdate) SetIsBoarding(b bool) *BoardingRecordUpdate { + bru.mutation.SetIsBoarding(b) + return bru +} + +// SetNillableIsBoarding sets the "is_boarding" field if the given value is not nil. +func (bru *BoardingRecordUpdate) SetNillableIsBoarding(b *bool) *BoardingRecordUpdate { + if b != nil { + bru.SetIsBoarding(*b) + } + return bru +} + +// SetChildID sets the "child" edge to the Child entity by ID. +func (bru *BoardingRecordUpdate) SetChildID(id uuid.UUID) *BoardingRecordUpdate { + bru.mutation.SetChildID(id) + return bru +} + +// SetNillableChildID sets the "child" edge to the Child entity by ID if the given value is not nil. +func (bru *BoardingRecordUpdate) SetNillableChildID(id *uuid.UUID) *BoardingRecordUpdate { + if id != nil { + bru = bru.SetChildID(*id) + } + return bru +} + +// SetChild sets the "child" edge to the Child entity. +func (bru *BoardingRecordUpdate) SetChild(c *Child) *BoardingRecordUpdate { + return bru.SetChildID(c.ID) +} + +// SetBusID sets the "bus" edge to the Bus entity by ID. +func (bru *BoardingRecordUpdate) SetBusID(id uuid.UUID) *BoardingRecordUpdate { + bru.mutation.SetBusID(id) + return bru +} + +// SetNillableBusID sets the "bus" edge to the Bus entity by ID if the given value is not nil. +func (bru *BoardingRecordUpdate) SetNillableBusID(id *uuid.UUID) *BoardingRecordUpdate { + if id != nil { + bru = bru.SetBusID(*id) + } + return bru +} + +// SetBus sets the "bus" edge to the Bus entity. +func (bru *BoardingRecordUpdate) SetBus(b *Bus) *BoardingRecordUpdate { + return bru.SetBusID(b.ID) +} + +// Mutation returns the BoardingRecordMutation object of the builder. +func (bru *BoardingRecordUpdate) Mutation() *BoardingRecordMutation { + return bru.mutation +} + +// ClearChild clears the "child" edge to the Child entity. +func (bru *BoardingRecordUpdate) ClearChild() *BoardingRecordUpdate { + bru.mutation.ClearChild() + return bru +} + +// ClearBus clears the "bus" edge to the Bus entity. +func (bru *BoardingRecordUpdate) ClearBus() *BoardingRecordUpdate { + bru.mutation.ClearBus() + return bru +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (bru *BoardingRecordUpdate) Save(ctx context.Context) (int, error) { + return withHooks(ctx, bru.sqlSave, bru.mutation, bru.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (bru *BoardingRecordUpdate) SaveX(ctx context.Context) int { + affected, err := bru.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (bru *BoardingRecordUpdate) Exec(ctx context.Context) error { + _, err := bru.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bru *BoardingRecordUpdate) ExecX(ctx context.Context) { + if err := bru.Exec(ctx); err != nil { + panic(err) + } +} + +func (bru *BoardingRecordUpdate) sqlSave(ctx context.Context) (n int, err error) { + _spec := sqlgraph.NewUpdateSpec(boardingrecord.Table, boardingrecord.Columns, sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID)) + if ps := bru.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := bru.mutation.Timestamp(); ok { + _spec.SetField(boardingrecord.FieldTimestamp, field.TypeTime, value) + } + if value, ok := bru.mutation.IsBoarding(); ok { + _spec.SetField(boardingrecord.FieldIsBoarding, field.TypeBool, value) + } + if bru.mutation.ChildCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: boardingrecord.ChildTable, + Columns: []string{boardingrecord.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.ChildIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: boardingrecord.ChildTable, + Columns: []string{boardingrecord.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bru.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: boardingrecord.BusTable, + Columns: []string{boardingrecord.BusColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: boardingrecord.BusTable, + Columns: []string{boardingrecord.BusColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if n, err = sqlgraph.UpdateNodes(ctx, bru.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{boardingrecord.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + bru.mutation.done = true + return n, nil +} + +// BoardingRecordUpdateOne is the builder for updating a single BoardingRecord entity. +type BoardingRecordUpdateOne struct { + config + fields []string + hooks []Hook + mutation *BoardingRecordMutation +} + +// SetTimestamp sets the "timestamp" field. +func (bruo *BoardingRecordUpdateOne) SetTimestamp(t time.Time) *BoardingRecordUpdateOne { + bruo.mutation.SetTimestamp(t) + return bruo +} + +// SetNillableTimestamp sets the "timestamp" field if the given value is not nil. +func (bruo *BoardingRecordUpdateOne) SetNillableTimestamp(t *time.Time) *BoardingRecordUpdateOne { + if t != nil { + bruo.SetTimestamp(*t) + } + return bruo +} + +// SetIsBoarding sets the "is_boarding" field. +func (bruo *BoardingRecordUpdateOne) SetIsBoarding(b bool) *BoardingRecordUpdateOne { + bruo.mutation.SetIsBoarding(b) + return bruo +} + +// SetNillableIsBoarding sets the "is_boarding" field if the given value is not nil. +func (bruo *BoardingRecordUpdateOne) SetNillableIsBoarding(b *bool) *BoardingRecordUpdateOne { + if b != nil { + bruo.SetIsBoarding(*b) + } + return bruo +} + +// SetChildID sets the "child" edge to the Child entity by ID. +func (bruo *BoardingRecordUpdateOne) SetChildID(id uuid.UUID) *BoardingRecordUpdateOne { + bruo.mutation.SetChildID(id) + return bruo +} + +// SetNillableChildID sets the "child" edge to the Child entity by ID if the given value is not nil. +func (bruo *BoardingRecordUpdateOne) SetNillableChildID(id *uuid.UUID) *BoardingRecordUpdateOne { + if id != nil { + bruo = bruo.SetChildID(*id) + } + return bruo +} + +// SetChild sets the "child" edge to the Child entity. +func (bruo *BoardingRecordUpdateOne) SetChild(c *Child) *BoardingRecordUpdateOne { + return bruo.SetChildID(c.ID) +} + +// SetBusID sets the "bus" edge to the Bus entity by ID. +func (bruo *BoardingRecordUpdateOne) SetBusID(id uuid.UUID) *BoardingRecordUpdateOne { + bruo.mutation.SetBusID(id) + return bruo +} + +// SetNillableBusID sets the "bus" edge to the Bus entity by ID if the given value is not nil. +func (bruo *BoardingRecordUpdateOne) SetNillableBusID(id *uuid.UUID) *BoardingRecordUpdateOne { + if id != nil { + bruo = bruo.SetBusID(*id) + } + return bruo +} + +// SetBus sets the "bus" edge to the Bus entity. +func (bruo *BoardingRecordUpdateOne) SetBus(b *Bus) *BoardingRecordUpdateOne { + return bruo.SetBusID(b.ID) +} + +// Mutation returns the BoardingRecordMutation object of the builder. +func (bruo *BoardingRecordUpdateOne) Mutation() *BoardingRecordMutation { + return bruo.mutation +} + +// ClearChild clears the "child" edge to the Child entity. +func (bruo *BoardingRecordUpdateOne) ClearChild() *BoardingRecordUpdateOne { + bruo.mutation.ClearChild() + return bruo +} + +// ClearBus clears the "bus" edge to the Bus entity. +func (bruo *BoardingRecordUpdateOne) ClearBus() *BoardingRecordUpdateOne { + bruo.mutation.ClearBus() + return bruo +} + +// Where appends a list predicates to the BoardingRecordUpdate builder. +func (bruo *BoardingRecordUpdateOne) Where(ps ...predicate.BoardingRecord) *BoardingRecordUpdateOne { + bruo.mutation.Where(ps...) + return bruo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (bruo *BoardingRecordUpdateOne) Select(field string, fields ...string) *BoardingRecordUpdateOne { + bruo.fields = append([]string{field}, fields...) + return bruo +} + +// Save executes the query and returns the updated BoardingRecord entity. +func (bruo *BoardingRecordUpdateOne) Save(ctx context.Context) (*BoardingRecord, error) { + return withHooks(ctx, bruo.sqlSave, bruo.mutation, bruo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (bruo *BoardingRecordUpdateOne) SaveX(ctx context.Context) *BoardingRecord { + node, err := bruo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (bruo *BoardingRecordUpdateOne) Exec(ctx context.Context) error { + _, err := bruo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bruo *BoardingRecordUpdateOne) ExecX(ctx context.Context) { + if err := bruo.Exec(ctx); err != nil { + panic(err) + } +} + +func (bruo *BoardingRecordUpdateOne) sqlSave(ctx context.Context) (_node *BoardingRecord, err error) { + _spec := sqlgraph.NewUpdateSpec(boardingrecord.Table, boardingrecord.Columns, sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID)) + id, ok := bruo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "BoardingRecord.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := bruo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, boardingrecord.FieldID) + for _, f := range fields { + if !boardingrecord.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != boardingrecord.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := bruo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := bruo.mutation.Timestamp(); ok { + _spec.SetField(boardingrecord.FieldTimestamp, field.TypeTime, value) + } + if value, ok := bruo.mutation.IsBoarding(); ok { + _spec.SetField(boardingrecord.FieldIsBoarding, field.TypeBool, value) + } + if bruo.mutation.ChildCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: boardingrecord.ChildTable, + Columns: []string{boardingrecord.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.ChildIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: boardingrecord.ChildTable, + Columns: []string{boardingrecord.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bruo.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: boardingrecord.BusTable, + Columns: []string{boardingrecord.BusColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: boardingrecord.BusTable, + Columns: []string{boardingrecord.BusColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + _node = &BoardingRecord{config: bruo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, bruo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{boardingrecord.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + bruo.mutation.done = true + return _node, nil +} diff --git a/backend/domain/repository/ent/bus.go b/backend/domain/repository/ent/bus.go new file mode 100644 index 00000000..3bd64037 --- /dev/null +++ b/backend/domain/repository/ent/bus.go @@ -0,0 +1,264 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "strings" + "time" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/google/uuid" +) + +// Bus is the model entity for the Bus schema. +type Bus struct { + config `json:"-"` + // ID of the ent. + ID uuid.UUID `json:"id,omitempty"` + // Name holds the value of the "name" field. + Name string `json:"name,omitempty"` + // PlateNumber holds the value of the "plate_number" field. + PlateNumber string `json:"plate_number,omitempty"` + // 現在の緯度 + Latitude float64 `json:"latitude,omitempty"` + // 現在の経度 + Longitude float64 `json:"longitude,omitempty"` + // バスのステータス(運行中、停止中など) + Status bus.Status `json:"status,omitempty"` + // CreatedAt holds the value of the "created_at" field. + CreatedAt time.Time `json:"created_at,omitempty"` + // UpdatedAt holds the value of the "updated_at" field. + UpdatedAt time.Time `json:"updated_at,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the BusQuery when eager-loading is set. + Edges BusEdges `json:"edges"` + bus_nursery *uuid.UUID + selectValues sql.SelectValues +} + +// BusEdges holds the relations/edges for other nodes in the graph. +type BusEdges struct { + // Nursery holds the value of the nursery edge. + Nursery *Nursery `json:"nursery,omitempty"` + // Stations holds the value of the stations edge. + Stations []*Station `json:"stations,omitempty"` + // BoardingRecords holds the value of the boarding_records edge. + BoardingRecords []*BoardingRecord `json:"boarding_records,omitempty"` + // ChildBusAssociations holds the value of the childBusAssociations edge. + ChildBusAssociations []*ChildBusAssociation `json:"childBusAssociations,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [4]bool +} + +// NurseryOrErr returns the Nursery value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BusEdges) NurseryOrErr() (*Nursery, error) { + if e.loadedTypes[0] { + if e.Nursery == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: nursery.Label} + } + return e.Nursery, nil + } + return nil, &NotLoadedError{edge: "nursery"} +} + +// StationsOrErr returns the Stations value or an error if the edge +// was not loaded in eager-loading. +func (e BusEdges) StationsOrErr() ([]*Station, error) { + if e.loadedTypes[1] { + return e.Stations, nil + } + return nil, &NotLoadedError{edge: "stations"} +} + +// BoardingRecordsOrErr returns the BoardingRecords value or an error if the edge +// was not loaded in eager-loading. +func (e BusEdges) BoardingRecordsOrErr() ([]*BoardingRecord, error) { + if e.loadedTypes[2] { + return e.BoardingRecords, nil + } + return nil, &NotLoadedError{edge: "boarding_records"} +} + +// ChildBusAssociationsOrErr returns the ChildBusAssociations value or an error if the edge +// was not loaded in eager-loading. +func (e BusEdges) ChildBusAssociationsOrErr() ([]*ChildBusAssociation, error) { + if e.loadedTypes[3] { + return e.ChildBusAssociations, nil + } + return nil, &NotLoadedError{edge: "childBusAssociations"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*Bus) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case bus.FieldLatitude, bus.FieldLongitude: + values[i] = new(sql.NullFloat64) + case bus.FieldName, bus.FieldPlateNumber, bus.FieldStatus: + values[i] = new(sql.NullString) + case bus.FieldCreatedAt, bus.FieldUpdatedAt: + values[i] = new(sql.NullTime) + case bus.FieldID: + values[i] = new(uuid.UUID) + case bus.ForeignKeys[0]: // bus_nursery + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the Bus fields. +func (b *Bus) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case bus.FieldID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field id", values[i]) + } else if value != nil { + b.ID = *value + } + case bus.FieldName: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field name", values[i]) + } else if value.Valid { + b.Name = value.String + } + case bus.FieldPlateNumber: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field plate_number", values[i]) + } else if value.Valid { + b.PlateNumber = value.String + } + case bus.FieldLatitude: + if value, ok := values[i].(*sql.NullFloat64); !ok { + return fmt.Errorf("unexpected type %T for field latitude", values[i]) + } else if value.Valid { + b.Latitude = value.Float64 + } + case bus.FieldLongitude: + if value, ok := values[i].(*sql.NullFloat64); !ok { + return fmt.Errorf("unexpected type %T for field longitude", values[i]) + } else if value.Valid { + b.Longitude = value.Float64 + } + case bus.FieldStatus: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field status", values[i]) + } else if value.Valid { + b.Status = bus.Status(value.String) + } + case bus.FieldCreatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field created_at", values[i]) + } else if value.Valid { + b.CreatedAt = value.Time + } + case bus.FieldUpdatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field updated_at", values[i]) + } else if value.Valid { + b.UpdatedAt = value.Time + } + case bus.ForeignKeys[0]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field bus_nursery", values[i]) + } else if value.Valid { + b.bus_nursery = new(uuid.UUID) + *b.bus_nursery = *value.S.(*uuid.UUID) + } + default: + b.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the Bus. +// This includes values selected through modifiers, order, etc. +func (b *Bus) Value(name string) (ent.Value, error) { + return b.selectValues.Get(name) +} + +// QueryNursery queries the "nursery" edge of the Bus entity. +func (b *Bus) QueryNursery() *NurseryQuery { + return NewBusClient(b.config).QueryNursery(b) +} + +// QueryStations queries the "stations" edge of the Bus entity. +func (b *Bus) QueryStations() *StationQuery { + return NewBusClient(b.config).QueryStations(b) +} + +// QueryBoardingRecords queries the "boarding_records" edge of the Bus entity. +func (b *Bus) QueryBoardingRecords() *BoardingRecordQuery { + return NewBusClient(b.config).QueryBoardingRecords(b) +} + +// QueryChildBusAssociations queries the "childBusAssociations" edge of the Bus entity. +func (b *Bus) QueryChildBusAssociations() *ChildBusAssociationQuery { + return NewBusClient(b.config).QueryChildBusAssociations(b) +} + +// Update returns a builder for updating this Bus. +// Note that you need to call Bus.Unwrap() before calling this method if this Bus +// was returned from a transaction, and the transaction was committed or rolled back. +func (b *Bus) Update() *BusUpdateOne { + return NewBusClient(b.config).UpdateOne(b) +} + +// Unwrap unwraps the Bus entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (b *Bus) Unwrap() *Bus { + _tx, ok := b.config.driver.(*txDriver) + if !ok { + panic("ent: Bus is not a transactional entity") + } + b.config.driver = _tx.drv + return b +} + +// String implements the fmt.Stringer. +func (b *Bus) String() string { + var builder strings.Builder + builder.WriteString("Bus(") + builder.WriteString(fmt.Sprintf("id=%v, ", b.ID)) + builder.WriteString("name=") + builder.WriteString(b.Name) + builder.WriteString(", ") + builder.WriteString("plate_number=") + builder.WriteString(b.PlateNumber) + builder.WriteString(", ") + builder.WriteString("latitude=") + builder.WriteString(fmt.Sprintf("%v", b.Latitude)) + builder.WriteString(", ") + builder.WriteString("longitude=") + builder.WriteString(fmt.Sprintf("%v", b.Longitude)) + builder.WriteString(", ") + builder.WriteString("status=") + builder.WriteString(fmt.Sprintf("%v", b.Status)) + builder.WriteString(", ") + builder.WriteString("created_at=") + builder.WriteString(b.CreatedAt.Format(time.ANSIC)) + builder.WriteString(", ") + builder.WriteString("updated_at=") + builder.WriteString(b.UpdatedAt.Format(time.ANSIC)) + builder.WriteByte(')') + return builder.String() +} + +// BusSlice is a parsable slice of Bus. +type BusSlice []*Bus diff --git a/backend/domain/repository/ent/bus/bus.go b/backend/domain/repository/ent/bus/bus.go new file mode 100644 index 00000000..db552332 --- /dev/null +++ b/backend/domain/repository/ent/bus/bus.go @@ -0,0 +1,266 @@ +// Code generated by ent, DO NOT EDIT. + +package bus + +import ( + "fmt" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/google/uuid" +) + +const ( + // Label holds the string label denoting the bus type in the database. + Label = "bus" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldPlateNumber holds the string denoting the plate_number field in the database. + FieldPlateNumber = "plate_number" + // FieldLatitude holds the string denoting the latitude field in the database. + FieldLatitude = "latitude" + // FieldLongitude holds the string denoting the longitude field in the database. + FieldLongitude = "longitude" + // FieldStatus holds the string denoting the status field in the database. + FieldStatus = "status" + // FieldCreatedAt holds the string denoting the created_at field in the database. + FieldCreatedAt = "created_at" + // FieldUpdatedAt holds the string denoting the updated_at field in the database. + FieldUpdatedAt = "updated_at" + // EdgeNursery holds the string denoting the nursery edge name in mutations. + EdgeNursery = "nursery" + // EdgeStations holds the string denoting the stations edge name in mutations. + EdgeStations = "stations" + // EdgeBoardingRecords holds the string denoting the boarding_records edge name in mutations. + EdgeBoardingRecords = "boarding_records" + // EdgeChildBusAssociations holds the string denoting the childbusassociations edge name in mutations. + EdgeChildBusAssociations = "childBusAssociations" + // Table holds the table name of the bus in the database. + Table = "bus" + // NurseryTable is the table that holds the nursery relation/edge. + NurseryTable = "bus" + // NurseryInverseTable is the table name for the Nursery entity. + // It exists in this package in order to avoid circular dependency with the "nursery" package. + NurseryInverseTable = "nurseries" + // NurseryColumn is the table column denoting the nursery relation/edge. + NurseryColumn = "bus_nursery" + // StationsTable is the table that holds the stations relation/edge. The primary key declared below. + StationsTable = "bus_stations" + // StationsInverseTable is the table name for the Station entity. + // It exists in this package in order to avoid circular dependency with the "station" package. + StationsInverseTable = "stations" + // BoardingRecordsTable is the table that holds the boarding_records relation/edge. + BoardingRecordsTable = "boarding_records" + // BoardingRecordsInverseTable is the table name for the BoardingRecord entity. + // It exists in this package in order to avoid circular dependency with the "boardingrecord" package. + BoardingRecordsInverseTable = "boarding_records" + // BoardingRecordsColumn is the table column denoting the boarding_records relation/edge. + BoardingRecordsColumn = "bus_boarding_records" + // ChildBusAssociationsTable is the table that holds the childBusAssociations relation/edge. + ChildBusAssociationsTable = "child_bus_associations" + // ChildBusAssociationsInverseTable is the table name for the ChildBusAssociation entity. + // It exists in this package in order to avoid circular dependency with the "childbusassociation" package. + ChildBusAssociationsInverseTable = "child_bus_associations" + // ChildBusAssociationsColumn is the table column denoting the childBusAssociations relation/edge. + ChildBusAssociationsColumn = "bus_id" +) + +// Columns holds all SQL columns for bus fields. +var Columns = []string{ + FieldID, + FieldName, + FieldPlateNumber, + FieldLatitude, + FieldLongitude, + FieldStatus, + FieldCreatedAt, + FieldUpdatedAt, +} + +// ForeignKeys holds the SQL foreign-keys that are owned by the "bus" +// table and are not defined as standalone fields in the schema. +var ForeignKeys = []string{ + "bus_nursery", +} + +var ( + // StationsPrimaryKey and StationsColumn2 are the table columns denoting the + // primary key for the stations relation (M2M). + StationsPrimaryKey = []string{"bus_id", "station_id"} +) + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + for i := range ForeignKeys { + if column == ForeignKeys[i] { + return true + } + } + return false +} + +var ( + // DefaultCreatedAt holds the default value on creation for the "created_at" field. + DefaultCreatedAt func() time.Time + // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. + DefaultUpdatedAt func() time.Time + // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. + UpdateDefaultUpdatedAt func() time.Time + // DefaultID holds the default value on creation for the "id" field. + DefaultID func() uuid.UUID +) + +// Status defines the type for the "status" enum field. +type Status string + +// StatusStopped is the default value of the Status enum. +const DefaultStatus = StatusStopped + +// Status values. +const ( + StatusStopped Status = "stopped" + StatusRunning Status = "running" + StatusMaintenance Status = "maintenance" +) + +func (s Status) String() string { + return string(s) +} + +// StatusValidator is a validator for the "status" field enum values. It is called by the builders before save. +func StatusValidator(s Status) error { + switch s { + case StatusStopped, StatusRunning, StatusMaintenance: + return nil + default: + return fmt.Errorf("bus: invalid enum value for status field: %q", s) + } +} + +// OrderOption defines the ordering options for the Bus queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByName orders the results by the name field. +func ByName(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldName, opts...).ToFunc() +} + +// ByPlateNumber orders the results by the plate_number field. +func ByPlateNumber(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldPlateNumber, opts...).ToFunc() +} + +// ByLatitude orders the results by the latitude field. +func ByLatitude(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldLatitude, opts...).ToFunc() +} + +// ByLongitude orders the results by the longitude field. +func ByLongitude(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldLongitude, opts...).ToFunc() +} + +// ByStatus orders the results by the status field. +func ByStatus(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldStatus, opts...).ToFunc() +} + +// ByCreatedAt orders the results by the created_at field. +func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() +} + +// ByUpdatedAt orders the results by the updated_at field. +func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() +} + +// ByNurseryField orders the results by nursery field. +func ByNurseryField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newNurseryStep(), sql.OrderByField(field, opts...)) + } +} + +// ByStationsCount orders the results by stations count. +func ByStationsCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newStationsStep(), opts...) + } +} + +// ByStations orders the results by stations terms. +func ByStations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newStationsStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByBoardingRecordsCount orders the results by boarding_records count. +func ByBoardingRecordsCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newBoardingRecordsStep(), opts...) + } +} + +// ByBoardingRecords orders the results by boarding_records terms. +func ByBoardingRecords(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newBoardingRecordsStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByChildBusAssociationsCount orders the results by childBusAssociations count. +func ByChildBusAssociationsCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newChildBusAssociationsStep(), opts...) + } +} + +// ByChildBusAssociations orders the results by childBusAssociations terms. +func ByChildBusAssociations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newChildBusAssociationsStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} +func newNurseryStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(NurseryInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, NurseryTable, NurseryColumn), + ) +} +func newStationsStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(StationsInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2M, false, StationsTable, StationsPrimaryKey...), + ) +} +func newBoardingRecordsStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(BoardingRecordsInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, BoardingRecordsTable, BoardingRecordsColumn), + ) +} +func newChildBusAssociationsStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(ChildBusAssociationsInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), + ) +} diff --git a/backend/domain/repository/ent/bus/where.go b/backend/domain/repository/ent/bus/where.go new file mode 100644 index 00000000..9ddc9e53 --- /dev/null +++ b/backend/domain/repository/ent/bus/where.go @@ -0,0 +1,534 @@ +// Code generated by ent, DO NOT EDIT. + +package bus + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ID filters vertices based on their ID field. +func ID(id uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldLTE(FieldID, id)) +} + +// Name applies equality check predicate on the "name" field. It's identical to NameEQ. +func Name(v string) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldName, v)) +} + +// PlateNumber applies equality check predicate on the "plate_number" field. It's identical to PlateNumberEQ. +func PlateNumber(v string) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldPlateNumber, v)) +} + +// Latitude applies equality check predicate on the "latitude" field. It's identical to LatitudeEQ. +func Latitude(v float64) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldLatitude, v)) +} + +// Longitude applies equality check predicate on the "longitude" field. It's identical to LongitudeEQ. +func Longitude(v float64) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldLongitude, v)) +} + +// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. +func CreatedAt(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldCreatedAt, v)) +} + +// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ. +func UpdatedAt(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// NameEQ applies the EQ predicate on the "name" field. +func NameEQ(v string) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldName, v)) +} + +// NameNEQ applies the NEQ predicate on the "name" field. +func NameNEQ(v string) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldName, v)) +} + +// NameIn applies the In predicate on the "name" field. +func NameIn(vs ...string) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldName, vs...)) +} + +// NameNotIn applies the NotIn predicate on the "name" field. +func NameNotIn(vs ...string) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldName, vs...)) +} + +// NameGT applies the GT predicate on the "name" field. +func NameGT(v string) predicate.Bus { + return predicate.Bus(sql.FieldGT(FieldName, v)) +} + +// NameGTE applies the GTE predicate on the "name" field. +func NameGTE(v string) predicate.Bus { + return predicate.Bus(sql.FieldGTE(FieldName, v)) +} + +// NameLT applies the LT predicate on the "name" field. +func NameLT(v string) predicate.Bus { + return predicate.Bus(sql.FieldLT(FieldName, v)) +} + +// NameLTE applies the LTE predicate on the "name" field. +func NameLTE(v string) predicate.Bus { + return predicate.Bus(sql.FieldLTE(FieldName, v)) +} + +// NameContains applies the Contains predicate on the "name" field. +func NameContains(v string) predicate.Bus { + return predicate.Bus(sql.FieldContains(FieldName, v)) +} + +// NameHasPrefix applies the HasPrefix predicate on the "name" field. +func NameHasPrefix(v string) predicate.Bus { + return predicate.Bus(sql.FieldHasPrefix(FieldName, v)) +} + +// NameHasSuffix applies the HasSuffix predicate on the "name" field. +func NameHasSuffix(v string) predicate.Bus { + return predicate.Bus(sql.FieldHasSuffix(FieldName, v)) +} + +// NameEqualFold applies the EqualFold predicate on the "name" field. +func NameEqualFold(v string) predicate.Bus { + return predicate.Bus(sql.FieldEqualFold(FieldName, v)) +} + +// NameContainsFold applies the ContainsFold predicate on the "name" field. +func NameContainsFold(v string) predicate.Bus { + return predicate.Bus(sql.FieldContainsFold(FieldName, v)) +} + +// PlateNumberEQ applies the EQ predicate on the "plate_number" field. +func PlateNumberEQ(v string) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldPlateNumber, v)) +} + +// PlateNumberNEQ applies the NEQ predicate on the "plate_number" field. +func PlateNumberNEQ(v string) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldPlateNumber, v)) +} + +// PlateNumberIn applies the In predicate on the "plate_number" field. +func PlateNumberIn(vs ...string) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldPlateNumber, vs...)) +} + +// PlateNumberNotIn applies the NotIn predicate on the "plate_number" field. +func PlateNumberNotIn(vs ...string) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldPlateNumber, vs...)) +} + +// PlateNumberGT applies the GT predicate on the "plate_number" field. +func PlateNumberGT(v string) predicate.Bus { + return predicate.Bus(sql.FieldGT(FieldPlateNumber, v)) +} + +// PlateNumberGTE applies the GTE predicate on the "plate_number" field. +func PlateNumberGTE(v string) predicate.Bus { + return predicate.Bus(sql.FieldGTE(FieldPlateNumber, v)) +} + +// PlateNumberLT applies the LT predicate on the "plate_number" field. +func PlateNumberLT(v string) predicate.Bus { + return predicate.Bus(sql.FieldLT(FieldPlateNumber, v)) +} + +// PlateNumberLTE applies the LTE predicate on the "plate_number" field. +func PlateNumberLTE(v string) predicate.Bus { + return predicate.Bus(sql.FieldLTE(FieldPlateNumber, v)) +} + +// PlateNumberContains applies the Contains predicate on the "plate_number" field. +func PlateNumberContains(v string) predicate.Bus { + return predicate.Bus(sql.FieldContains(FieldPlateNumber, v)) +} + +// PlateNumberHasPrefix applies the HasPrefix predicate on the "plate_number" field. +func PlateNumberHasPrefix(v string) predicate.Bus { + return predicate.Bus(sql.FieldHasPrefix(FieldPlateNumber, v)) +} + +// PlateNumberHasSuffix applies the HasSuffix predicate on the "plate_number" field. +func PlateNumberHasSuffix(v string) predicate.Bus { + return predicate.Bus(sql.FieldHasSuffix(FieldPlateNumber, v)) +} + +// PlateNumberIsNil applies the IsNil predicate on the "plate_number" field. +func PlateNumberIsNil() predicate.Bus { + return predicate.Bus(sql.FieldIsNull(FieldPlateNumber)) +} + +// PlateNumberNotNil applies the NotNil predicate on the "plate_number" field. +func PlateNumberNotNil() predicate.Bus { + return predicate.Bus(sql.FieldNotNull(FieldPlateNumber)) +} + +// PlateNumberEqualFold applies the EqualFold predicate on the "plate_number" field. +func PlateNumberEqualFold(v string) predicate.Bus { + return predicate.Bus(sql.FieldEqualFold(FieldPlateNumber, v)) +} + +// PlateNumberContainsFold applies the ContainsFold predicate on the "plate_number" field. +func PlateNumberContainsFold(v string) predicate.Bus { + return predicate.Bus(sql.FieldContainsFold(FieldPlateNumber, v)) +} + +// LatitudeEQ applies the EQ predicate on the "latitude" field. +func LatitudeEQ(v float64) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldLatitude, v)) +} + +// LatitudeNEQ applies the NEQ predicate on the "latitude" field. +func LatitudeNEQ(v float64) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldLatitude, v)) +} + +// LatitudeIn applies the In predicate on the "latitude" field. +func LatitudeIn(vs ...float64) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldLatitude, vs...)) +} + +// LatitudeNotIn applies the NotIn predicate on the "latitude" field. +func LatitudeNotIn(vs ...float64) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldLatitude, vs...)) +} + +// LatitudeGT applies the GT predicate on the "latitude" field. +func LatitudeGT(v float64) predicate.Bus { + return predicate.Bus(sql.FieldGT(FieldLatitude, v)) +} + +// LatitudeGTE applies the GTE predicate on the "latitude" field. +func LatitudeGTE(v float64) predicate.Bus { + return predicate.Bus(sql.FieldGTE(FieldLatitude, v)) +} + +// LatitudeLT applies the LT predicate on the "latitude" field. +func LatitudeLT(v float64) predicate.Bus { + return predicate.Bus(sql.FieldLT(FieldLatitude, v)) +} + +// LatitudeLTE applies the LTE predicate on the "latitude" field. +func LatitudeLTE(v float64) predicate.Bus { + return predicate.Bus(sql.FieldLTE(FieldLatitude, v)) +} + +// LatitudeIsNil applies the IsNil predicate on the "latitude" field. +func LatitudeIsNil() predicate.Bus { + return predicate.Bus(sql.FieldIsNull(FieldLatitude)) +} + +// LatitudeNotNil applies the NotNil predicate on the "latitude" field. +func LatitudeNotNil() predicate.Bus { + return predicate.Bus(sql.FieldNotNull(FieldLatitude)) +} + +// LongitudeEQ applies the EQ predicate on the "longitude" field. +func LongitudeEQ(v float64) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldLongitude, v)) +} + +// LongitudeNEQ applies the NEQ predicate on the "longitude" field. +func LongitudeNEQ(v float64) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldLongitude, v)) +} + +// LongitudeIn applies the In predicate on the "longitude" field. +func LongitudeIn(vs ...float64) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldLongitude, vs...)) +} + +// LongitudeNotIn applies the NotIn predicate on the "longitude" field. +func LongitudeNotIn(vs ...float64) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldLongitude, vs...)) +} + +// LongitudeGT applies the GT predicate on the "longitude" field. +func LongitudeGT(v float64) predicate.Bus { + return predicate.Bus(sql.FieldGT(FieldLongitude, v)) +} + +// LongitudeGTE applies the GTE predicate on the "longitude" field. +func LongitudeGTE(v float64) predicate.Bus { + return predicate.Bus(sql.FieldGTE(FieldLongitude, v)) +} + +// LongitudeLT applies the LT predicate on the "longitude" field. +func LongitudeLT(v float64) predicate.Bus { + return predicate.Bus(sql.FieldLT(FieldLongitude, v)) +} + +// LongitudeLTE applies the LTE predicate on the "longitude" field. +func LongitudeLTE(v float64) predicate.Bus { + return predicate.Bus(sql.FieldLTE(FieldLongitude, v)) +} + +// LongitudeIsNil applies the IsNil predicate on the "longitude" field. +func LongitudeIsNil() predicate.Bus { + return predicate.Bus(sql.FieldIsNull(FieldLongitude)) +} + +// LongitudeNotNil applies the NotNil predicate on the "longitude" field. +func LongitudeNotNil() predicate.Bus { + return predicate.Bus(sql.FieldNotNull(FieldLongitude)) +} + +// StatusEQ applies the EQ predicate on the "status" field. +func StatusEQ(v Status) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldStatus, v)) +} + +// StatusNEQ applies the NEQ predicate on the "status" field. +func StatusNEQ(v Status) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldStatus, v)) +} + +// StatusIn applies the In predicate on the "status" field. +func StatusIn(vs ...Status) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldStatus, vs...)) +} + +// StatusNotIn applies the NotIn predicate on the "status" field. +func StatusNotIn(vs ...Status) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldStatus, vs...)) +} + +// CreatedAtEQ applies the EQ predicate on the "created_at" field. +func CreatedAtEQ(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldCreatedAt, v)) +} + +// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. +func CreatedAtNEQ(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldCreatedAt, v)) +} + +// CreatedAtIn applies the In predicate on the "created_at" field. +func CreatedAtIn(vs ...time.Time) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldCreatedAt, vs...)) +} + +// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. +func CreatedAtNotIn(vs ...time.Time) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldCreatedAt, vs...)) +} + +// CreatedAtGT applies the GT predicate on the "created_at" field. +func CreatedAtGT(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldGT(FieldCreatedAt, v)) +} + +// CreatedAtGTE applies the GTE predicate on the "created_at" field. +func CreatedAtGTE(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldGTE(FieldCreatedAt, v)) +} + +// CreatedAtLT applies the LT predicate on the "created_at" field. +func CreatedAtLT(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldLT(FieldCreatedAt, v)) +} + +// CreatedAtLTE applies the LTE predicate on the "created_at" field. +func CreatedAtLTE(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldLTE(FieldCreatedAt, v)) +} + +// UpdatedAtEQ applies the EQ predicate on the "updated_at" field. +func UpdatedAtEQ(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field. +func UpdatedAtNEQ(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtIn applies the In predicate on the "updated_at" field. +func UpdatedAtIn(vs ...time.Time) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field. +func UpdatedAtNotIn(vs ...time.Time) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtGT applies the GT predicate on the "updated_at" field. +func UpdatedAtGT(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldGT(FieldUpdatedAt, v)) +} + +// UpdatedAtGTE applies the GTE predicate on the "updated_at" field. +func UpdatedAtGTE(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldGTE(FieldUpdatedAt, v)) +} + +// UpdatedAtLT applies the LT predicate on the "updated_at" field. +func UpdatedAtLT(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldLT(FieldUpdatedAt, v)) +} + +// UpdatedAtLTE applies the LTE predicate on the "updated_at" field. +func UpdatedAtLTE(v time.Time) predicate.Bus { + return predicate.Bus(sql.FieldLTE(FieldUpdatedAt, v)) +} + +// HasNursery applies the HasEdge predicate on the "nursery" edge. +func HasNursery() predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, NurseryTable, NurseryColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasNurseryWith applies the HasEdge predicate on the "nursery" edge with a given conditions (other predicates). +func HasNurseryWith(preds ...predicate.Nursery) predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := newNurseryStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasStations applies the HasEdge predicate on the "stations" edge. +func HasStations() predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2M, false, StationsTable, StationsPrimaryKey...), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasStationsWith applies the HasEdge predicate on the "stations" edge with a given conditions (other predicates). +func HasStationsWith(preds ...predicate.Station) predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := newStationsStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasBoardingRecords applies the HasEdge predicate on the "boarding_records" edge. +func HasBoardingRecords() predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, BoardingRecordsTable, BoardingRecordsColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasBoardingRecordsWith applies the HasEdge predicate on the "boarding_records" edge with a given conditions (other predicates). +func HasBoardingRecordsWith(preds ...predicate.BoardingRecord) predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := newBoardingRecordsStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasChildBusAssociations applies the HasEdge predicate on the "childBusAssociations" edge. +func HasChildBusAssociations() predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasChildBusAssociationsWith applies the HasEdge predicate on the "childBusAssociations" edge with a given conditions (other predicates). +func HasChildBusAssociationsWith(preds ...predicate.ChildBusAssociation) predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := newChildBusAssociationsStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.Bus) predicate.Bus { + return predicate.Bus(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.Bus) predicate.Bus { + return predicate.Bus(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.Bus) predicate.Bus { + return predicate.Bus(sql.NotPredicates(p)) +} diff --git a/backend/domain/repository/ent/bus_create.go b/backend/domain/repository/ent/bus_create.go new file mode 100644 index 00000000..78d1a015 --- /dev/null +++ b/backend/domain/repository/ent/bus_create.go @@ -0,0 +1,481 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// BusCreate is the builder for creating a Bus entity. +type BusCreate struct { + config + mutation *BusMutation + hooks []Hook +} + +// SetName sets the "name" field. +func (bc *BusCreate) SetName(s string) *BusCreate { + bc.mutation.SetName(s) + return bc +} + +// SetPlateNumber sets the "plate_number" field. +func (bc *BusCreate) SetPlateNumber(s string) *BusCreate { + bc.mutation.SetPlateNumber(s) + return bc +} + +// SetNillablePlateNumber sets the "plate_number" field if the given value is not nil. +func (bc *BusCreate) SetNillablePlateNumber(s *string) *BusCreate { + if s != nil { + bc.SetPlateNumber(*s) + } + return bc +} + +// SetLatitude sets the "latitude" field. +func (bc *BusCreate) SetLatitude(f float64) *BusCreate { + bc.mutation.SetLatitude(f) + return bc +} + +// SetNillableLatitude sets the "latitude" field if the given value is not nil. +func (bc *BusCreate) SetNillableLatitude(f *float64) *BusCreate { + if f != nil { + bc.SetLatitude(*f) + } + return bc +} + +// SetLongitude sets the "longitude" field. +func (bc *BusCreate) SetLongitude(f float64) *BusCreate { + bc.mutation.SetLongitude(f) + return bc +} + +// SetNillableLongitude sets the "longitude" field if the given value is not nil. +func (bc *BusCreate) SetNillableLongitude(f *float64) *BusCreate { + if f != nil { + bc.SetLongitude(*f) + } + return bc +} + +// SetStatus sets the "status" field. +func (bc *BusCreate) SetStatus(b bus.Status) *BusCreate { + bc.mutation.SetStatus(b) + return bc +} + +// SetNillableStatus sets the "status" field if the given value is not nil. +func (bc *BusCreate) SetNillableStatus(b *bus.Status) *BusCreate { + if b != nil { + bc.SetStatus(*b) + } + return bc +} + +// SetCreatedAt sets the "created_at" field. +func (bc *BusCreate) SetCreatedAt(t time.Time) *BusCreate { + bc.mutation.SetCreatedAt(t) + return bc +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (bc *BusCreate) SetNillableCreatedAt(t *time.Time) *BusCreate { + if t != nil { + bc.SetCreatedAt(*t) + } + return bc +} + +// SetUpdatedAt sets the "updated_at" field. +func (bc *BusCreate) SetUpdatedAt(t time.Time) *BusCreate { + bc.mutation.SetUpdatedAt(t) + return bc +} + +// SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil. +func (bc *BusCreate) SetNillableUpdatedAt(t *time.Time) *BusCreate { + if t != nil { + bc.SetUpdatedAt(*t) + } + return bc +} + +// SetID sets the "id" field. +func (bc *BusCreate) SetID(u uuid.UUID) *BusCreate { + bc.mutation.SetID(u) + return bc +} + +// SetNillableID sets the "id" field if the given value is not nil. +func (bc *BusCreate) SetNillableID(u *uuid.UUID) *BusCreate { + if u != nil { + bc.SetID(*u) + } + return bc +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. +func (bc *BusCreate) SetNurseryID(id uuid.UUID) *BusCreate { + bc.mutation.SetNurseryID(id) + return bc +} + +// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. +func (bc *BusCreate) SetNillableNurseryID(id *uuid.UUID) *BusCreate { + if id != nil { + bc = bc.SetNurseryID(*id) + } + return bc +} + +// SetNursery sets the "nursery" edge to the Nursery entity. +func (bc *BusCreate) SetNursery(n *Nursery) *BusCreate { + return bc.SetNurseryID(n.ID) +} + +// AddStationIDs adds the "stations" edge to the Station entity by IDs. +func (bc *BusCreate) AddStationIDs(ids ...uuid.UUID) *BusCreate { + bc.mutation.AddStationIDs(ids...) + return bc +} + +// AddStations adds the "stations" edges to the Station entity. +func (bc *BusCreate) AddStations(s ...*Station) *BusCreate { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return bc.AddStationIDs(ids...) +} + +// AddBoardingRecordIDs adds the "boarding_records" edge to the BoardingRecord entity by IDs. +func (bc *BusCreate) AddBoardingRecordIDs(ids ...uuid.UUID) *BusCreate { + bc.mutation.AddBoardingRecordIDs(ids...) + return bc +} + +// AddBoardingRecords adds the "boarding_records" edges to the BoardingRecord entity. +func (bc *BusCreate) AddBoardingRecords(b ...*BoardingRecord) *BusCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bc.AddBoardingRecordIDs(ids...) +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (bc *BusCreate) AddChildBusAssociationIDs(ids ...int) *BusCreate { + bc.mutation.AddChildBusAssociationIDs(ids...) + return bc +} + +// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. +func (bc *BusCreate) AddChildBusAssociations(c ...*ChildBusAssociation) *BusCreate { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return bc.AddChildBusAssociationIDs(ids...) +} + +// Mutation returns the BusMutation object of the builder. +func (bc *BusCreate) Mutation() *BusMutation { + return bc.mutation +} + +// Save creates the Bus in the database. +func (bc *BusCreate) Save(ctx context.Context) (*Bus, error) { + bc.defaults() + return withHooks(ctx, bc.sqlSave, bc.mutation, bc.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (bc *BusCreate) SaveX(ctx context.Context) *Bus { + v, err := bc.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (bc *BusCreate) Exec(ctx context.Context) error { + _, err := bc.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bc *BusCreate) ExecX(ctx context.Context) { + if err := bc.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (bc *BusCreate) defaults() { + if _, ok := bc.mutation.Status(); !ok { + v := bus.DefaultStatus + bc.mutation.SetStatus(v) + } + if _, ok := bc.mutation.CreatedAt(); !ok { + v := bus.DefaultCreatedAt() + bc.mutation.SetCreatedAt(v) + } + if _, ok := bc.mutation.UpdatedAt(); !ok { + v := bus.DefaultUpdatedAt() + bc.mutation.SetUpdatedAt(v) + } + if _, ok := bc.mutation.ID(); !ok { + v := bus.DefaultID() + bc.mutation.SetID(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (bc *BusCreate) check() error { + if _, ok := bc.mutation.Name(); !ok { + return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Bus.name"`)} + } + if _, ok := bc.mutation.Status(); !ok { + return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "Bus.status"`)} + } + if v, ok := bc.mutation.Status(); ok { + if err := bus.StatusValidator(v); err != nil { + return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Bus.status": %w`, err)} + } + } + if _, ok := bc.mutation.CreatedAt(); !ok { + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Bus.created_at"`)} + } + if _, ok := bc.mutation.UpdatedAt(); !ok { + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "Bus.updated_at"`)} + } + return nil +} + +func (bc *BusCreate) sqlSave(ctx context.Context) (*Bus, error) { + if err := bc.check(); err != nil { + return nil, err + } + _node, _spec := bc.createSpec() + if err := sqlgraph.CreateNode(ctx, bc.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + if _spec.ID.Value != nil { + if id, ok := _spec.ID.Value.(*uuid.UUID); ok { + _node.ID = *id + } else if err := _node.ID.Scan(_spec.ID.Value); err != nil { + return nil, err + } + } + bc.mutation.id = &_node.ID + bc.mutation.done = true + return _node, nil +} + +func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { + var ( + _node = &Bus{config: bc.config} + _spec = sqlgraph.NewCreateSpec(bus.Table, sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID)) + ) + if id, ok := bc.mutation.ID(); ok { + _node.ID = id + _spec.ID.Value = &id + } + if value, ok := bc.mutation.Name(); ok { + _spec.SetField(bus.FieldName, field.TypeString, value) + _node.Name = value + } + if value, ok := bc.mutation.PlateNumber(); ok { + _spec.SetField(bus.FieldPlateNumber, field.TypeString, value) + _node.PlateNumber = value + } + if value, ok := bc.mutation.Latitude(); ok { + _spec.SetField(bus.FieldLatitude, field.TypeFloat64, value) + _node.Latitude = value + } + if value, ok := bc.mutation.Longitude(); ok { + _spec.SetField(bus.FieldLongitude, field.TypeFloat64, value) + _node.Longitude = value + } + if value, ok := bc.mutation.Status(); ok { + _spec.SetField(bus.FieldStatus, field.TypeEnum, value) + _node.Status = value + } + if value, ok := bc.mutation.CreatedAt(); ok { + _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) + _node.CreatedAt = value + } + if value, ok := bc.mutation.UpdatedAt(); ok { + _spec.SetField(bus.FieldUpdatedAt, field.TypeTime, value) + _node.UpdatedAt = value + } + if nodes := bc.mutation.NurseryIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.NurseryTable, + Columns: []string{bus.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.bus_nursery = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := bc.mutation.StationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: bus.StationsTable, + Columns: bus.StationsPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := bc.mutation.BoardingRecordsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.BoardingRecordsTable, + Columns: []string{bus.BoardingRecordsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := bc.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.ChildBusAssociationsTable, + Columns: []string{bus.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// BusCreateBulk is the builder for creating many Bus entities in bulk. +type BusCreateBulk struct { + config + err error + builders []*BusCreate +} + +// Save creates the Bus entities in the database. +func (bcb *BusCreateBulk) Save(ctx context.Context) ([]*Bus, error) { + if bcb.err != nil { + return nil, bcb.err + } + specs := make([]*sqlgraph.CreateSpec, len(bcb.builders)) + nodes := make([]*Bus, len(bcb.builders)) + mutators := make([]Mutator, len(bcb.builders)) + for i := range bcb.builders { + func(i int, root context.Context) { + builder := bcb.builders[i] + builder.defaults() + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*BusMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, bcb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, bcb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, bcb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (bcb *BusCreateBulk) SaveX(ctx context.Context) []*Bus { + v, err := bcb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (bcb *BusCreateBulk) Exec(ctx context.Context) error { + _, err := bcb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bcb *BusCreateBulk) ExecX(ctx context.Context) { + if err := bcb.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/bus_delete.go b/backend/domain/repository/ent/bus_delete.go new file mode 100644 index 00000000..08a5162c --- /dev/null +++ b/backend/domain/repository/ent/bus_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" +) + +// BusDelete is the builder for deleting a Bus entity. +type BusDelete struct { + config + hooks []Hook + mutation *BusMutation +} + +// Where appends a list predicates to the BusDelete builder. +func (bd *BusDelete) Where(ps ...predicate.Bus) *BusDelete { + bd.mutation.Where(ps...) + return bd +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (bd *BusDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, bd.sqlExec, bd.mutation, bd.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (bd *BusDelete) ExecX(ctx context.Context) int { + n, err := bd.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (bd *BusDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(bus.Table, sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID)) + if ps := bd.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, bd.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + bd.mutation.done = true + return affected, err +} + +// BusDeleteOne is the builder for deleting a single Bus entity. +type BusDeleteOne struct { + bd *BusDelete +} + +// Where appends a list predicates to the BusDelete builder. +func (bdo *BusDeleteOne) Where(ps ...predicate.Bus) *BusDeleteOne { + bdo.bd.mutation.Where(ps...) + return bdo +} + +// Exec executes the deletion query. +func (bdo *BusDeleteOne) Exec(ctx context.Context) error { + n, err := bdo.bd.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{bus.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (bdo *BusDeleteOne) ExecX(ctx context.Context) { + if err := bdo.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/bus_query.go b/backend/domain/repository/ent/bus_query.go new file mode 100644 index 00000000..a1ef2d42 --- /dev/null +++ b/backend/domain/repository/ent/bus_query.go @@ -0,0 +1,871 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "database/sql/driver" + "fmt" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// BusQuery is the builder for querying Bus entities. +type BusQuery struct { + config + ctx *QueryContext + order []bus.OrderOption + inters []Interceptor + predicates []predicate.Bus + withNursery *NurseryQuery + withStations *StationQuery + withBoardingRecords *BoardingRecordQuery + withChildBusAssociations *ChildBusAssociationQuery + withFKs bool + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the BusQuery builder. +func (bq *BusQuery) Where(ps ...predicate.Bus) *BusQuery { + bq.predicates = append(bq.predicates, ps...) + return bq +} + +// Limit the number of records to be returned by this query. +func (bq *BusQuery) Limit(limit int) *BusQuery { + bq.ctx.Limit = &limit + return bq +} + +// Offset to start from. +func (bq *BusQuery) Offset(offset int) *BusQuery { + bq.ctx.Offset = &offset + return bq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (bq *BusQuery) Unique(unique bool) *BusQuery { + bq.ctx.Unique = &unique + return bq +} + +// Order specifies how the records should be ordered. +func (bq *BusQuery) Order(o ...bus.OrderOption) *BusQuery { + bq.order = append(bq.order, o...) + return bq +} + +// QueryNursery chains the current query on the "nursery" edge. +func (bq *BusQuery) QueryNursery() *NurseryQuery { + query := (&NurseryClient{config: bq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, selector), + sqlgraph.To(nursery.Table, nursery.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.NurseryTable, bus.NurseryColumn), + ) + fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryStations chains the current query on the "stations" edge. +func (bq *BusQuery) QueryStations() *StationQuery { + query := (&StationClient{config: bq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, selector), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2M, false, bus.StationsTable, bus.StationsPrimaryKey...), + ) + fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryBoardingRecords chains the current query on the "boarding_records" edge. +func (bq *BusQuery) QueryBoardingRecords() *BoardingRecordQuery { + query := (&BoardingRecordClient{config: bq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, selector), + sqlgraph.To(boardingrecord.Table, boardingrecord.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, bus.BoardingRecordsTable, bus.BoardingRecordsColumn), + ) + fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryChildBusAssociations chains the current query on the "childBusAssociations" edge. +func (bq *BusQuery) QueryChildBusAssociations() *ChildBusAssociationQuery { + query := (&ChildBusAssociationClient{config: bq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, selector), + sqlgraph.To(childbusassociation.Table, childbusassociation.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, bus.ChildBusAssociationsTable, bus.ChildBusAssociationsColumn), + ) + fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first Bus entity from the query. +// Returns a *NotFoundError when no Bus was found. +func (bq *BusQuery) First(ctx context.Context) (*Bus, error) { + nodes, err := bq.Limit(1).All(setContextOp(ctx, bq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{bus.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (bq *BusQuery) FirstX(ctx context.Context) *Bus { + node, err := bq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first Bus ID from the query. +// Returns a *NotFoundError when no Bus ID was found. +func (bq *BusQuery) FirstID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = bq.Limit(1).IDs(setContextOp(ctx, bq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{bus.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (bq *BusQuery) FirstIDX(ctx context.Context) uuid.UUID { + id, err := bq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single Bus entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one Bus entity is found. +// Returns a *NotFoundError when no Bus entities are found. +func (bq *BusQuery) Only(ctx context.Context) (*Bus, error) { + nodes, err := bq.Limit(2).All(setContextOp(ctx, bq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{bus.Label} + default: + return nil, &NotSingularError{bus.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (bq *BusQuery) OnlyX(ctx context.Context) *Bus { + node, err := bq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only Bus ID in the query. +// Returns a *NotSingularError when more than one Bus ID is found. +// Returns a *NotFoundError when no entities are found. +func (bq *BusQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = bq.Limit(2).IDs(setContextOp(ctx, bq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{bus.Label} + default: + err = &NotSingularError{bus.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (bq *BusQuery) OnlyIDX(ctx context.Context) uuid.UUID { + id, err := bq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of BusSlice. +func (bq *BusQuery) All(ctx context.Context) ([]*Bus, error) { + ctx = setContextOp(ctx, bq.ctx, "All") + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*Bus, *BusQuery]() + return withInterceptors[[]*Bus](ctx, bq, qr, bq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (bq *BusQuery) AllX(ctx context.Context) []*Bus { + nodes, err := bq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of Bus IDs. +func (bq *BusQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error) { + if bq.ctx.Unique == nil && bq.path != nil { + bq.Unique(true) + } + ctx = setContextOp(ctx, bq.ctx, "IDs") + if err = bq.Select(bus.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (bq *BusQuery) IDsX(ctx context.Context) []uuid.UUID { + ids, err := bq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (bq *BusQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, bq.ctx, "Count") + if err := bq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, bq, querierCount[*BusQuery](), bq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (bq *BusQuery) CountX(ctx context.Context) int { + count, err := bq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (bq *BusQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, bq.ctx, "Exist") + switch _, err := bq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (bq *BusQuery) ExistX(ctx context.Context) bool { + exist, err := bq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the BusQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (bq *BusQuery) Clone() *BusQuery { + if bq == nil { + return nil + } + return &BusQuery{ + config: bq.config, + ctx: bq.ctx.Clone(), + order: append([]bus.OrderOption{}, bq.order...), + inters: append([]Interceptor{}, bq.inters...), + predicates: append([]predicate.Bus{}, bq.predicates...), + withNursery: bq.withNursery.Clone(), + withStations: bq.withStations.Clone(), + withBoardingRecords: bq.withBoardingRecords.Clone(), + withChildBusAssociations: bq.withChildBusAssociations.Clone(), + // clone intermediate query. + sql: bq.sql.Clone(), + path: bq.path, + } +} + +// WithNursery tells the query-builder to eager-load the nodes that are connected to +// the "nursery" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithNursery(opts ...func(*NurseryQuery)) *BusQuery { + query := (&NurseryClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + bq.withNursery = query + return bq +} + +// WithStations tells the query-builder to eager-load the nodes that are connected to +// the "stations" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithStations(opts ...func(*StationQuery)) *BusQuery { + query := (&StationClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + bq.withStations = query + return bq +} + +// WithBoardingRecords tells the query-builder to eager-load the nodes that are connected to +// the "boarding_records" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithBoardingRecords(opts ...func(*BoardingRecordQuery)) *BusQuery { + query := (&BoardingRecordClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + bq.withBoardingRecords = query + return bq +} + +// WithChildBusAssociations tells the query-builder to eager-load the nodes that are connected to +// the "childBusAssociations" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithChildBusAssociations(opts ...func(*ChildBusAssociationQuery)) *BusQuery { + query := (&ChildBusAssociationClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + bq.withChildBusAssociations = query + return bq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// Name string `json:"name,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.Bus.Query(). +// GroupBy(bus.FieldName). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (bq *BusQuery) GroupBy(field string, fields ...string) *BusGroupBy { + bq.ctx.Fields = append([]string{field}, fields...) + grbuild := &BusGroupBy{build: bq} + grbuild.flds = &bq.ctx.Fields + grbuild.label = bus.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// Name string `json:"name,omitempty"` +// } +// +// client.Bus.Query(). +// Select(bus.FieldName). +// Scan(ctx, &v) +func (bq *BusQuery) Select(fields ...string) *BusSelect { + bq.ctx.Fields = append(bq.ctx.Fields, fields...) + sbuild := &BusSelect{BusQuery: bq} + sbuild.label = bus.Label + sbuild.flds, sbuild.scan = &bq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a BusSelect configured with the given aggregations. +func (bq *BusQuery) Aggregate(fns ...AggregateFunc) *BusSelect { + return bq.Select().Aggregate(fns...) +} + +func (bq *BusQuery) prepareQuery(ctx context.Context) error { + for _, inter := range bq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, bq); err != nil { + return err + } + } + } + for _, f := range bq.ctx.Fields { + if !bus.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if bq.path != nil { + prev, err := bq.path(ctx) + if err != nil { + return err + } + bq.sql = prev + } + return nil +} + +func (bq *BusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bus, error) { + var ( + nodes = []*Bus{} + withFKs = bq.withFKs + _spec = bq.querySpec() + loadedTypes = [4]bool{ + bq.withNursery != nil, + bq.withStations != nil, + bq.withBoardingRecords != nil, + bq.withChildBusAssociations != nil, + } + ) + if bq.withNursery != nil { + withFKs = true + } + if withFKs { + _spec.Node.Columns = append(_spec.Node.Columns, bus.ForeignKeys...) + } + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*Bus).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &Bus{config: bq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, bq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := bq.withNursery; query != nil { + if err := bq.loadNursery(ctx, query, nodes, nil, + func(n *Bus, e *Nursery) { n.Edges.Nursery = e }); err != nil { + return nil, err + } + } + if query := bq.withStations; query != nil { + if err := bq.loadStations(ctx, query, nodes, + func(n *Bus) { n.Edges.Stations = []*Station{} }, + func(n *Bus, e *Station) { n.Edges.Stations = append(n.Edges.Stations, e) }); err != nil { + return nil, err + } + } + if query := bq.withBoardingRecords; query != nil { + if err := bq.loadBoardingRecords(ctx, query, nodes, + func(n *Bus) { n.Edges.BoardingRecords = []*BoardingRecord{} }, + func(n *Bus, e *BoardingRecord) { n.Edges.BoardingRecords = append(n.Edges.BoardingRecords, e) }); err != nil { + return nil, err + } + } + if query := bq.withChildBusAssociations; query != nil { + if err := bq.loadChildBusAssociations(ctx, query, nodes, + func(n *Bus) { n.Edges.ChildBusAssociations = []*ChildBusAssociation{} }, + func(n *Bus, e *ChildBusAssociation) { + n.Edges.ChildBusAssociations = append(n.Edges.ChildBusAssociations, e) + }); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (bq *BusQuery) loadNursery(ctx context.Context, query *NurseryQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Nursery)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Bus) + for i := range nodes { + if nodes[i].bus_nursery == nil { + continue + } + fk := *nodes[i].bus_nursery + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(nursery.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "bus_nursery" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (bq *BusQuery) loadStations(ctx context.Context, query *StationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Station)) error { + edgeIDs := make([]driver.Value, len(nodes)) + byID := make(map[uuid.UUID]*Bus) + nids := make(map[uuid.UUID]map[*Bus]struct{}) + for i, node := range nodes { + edgeIDs[i] = node.ID + byID[node.ID] = node + if init != nil { + init(node) + } + } + query.Where(func(s *sql.Selector) { + joinT := sql.Table(bus.StationsTable) + s.Join(joinT).On(s.C(station.FieldID), joinT.C(bus.StationsPrimaryKey[1])) + s.Where(sql.InValues(joinT.C(bus.StationsPrimaryKey[0]), edgeIDs...)) + columns := s.SelectedColumns() + s.Select(joinT.C(bus.StationsPrimaryKey[0])) + s.AppendSelect(columns...) + s.SetDistinct(false) + }) + if err := query.prepareQuery(ctx); err != nil { + return err + } + qr := QuerierFunc(func(ctx context.Context, q Query) (Value, error) { + return query.sqlAll(ctx, func(_ context.Context, spec *sqlgraph.QuerySpec) { + assign := spec.Assign + values := spec.ScanValues + spec.ScanValues = func(columns []string) ([]any, error) { + values, err := values(columns[1:]) + if err != nil { + return nil, err + } + return append([]any{new(uuid.UUID)}, values...), nil + } + spec.Assign = func(columns []string, values []any) error { + outValue := *values[0].(*uuid.UUID) + inValue := *values[1].(*uuid.UUID) + if nids[inValue] == nil { + nids[inValue] = map[*Bus]struct{}{byID[outValue]: {}} + return assign(columns[1:], values[1:]) + } + nids[inValue][byID[outValue]] = struct{}{} + return nil + } + }) + }) + neighbors, err := withInterceptors[[]*Station](ctx, query, qr, query.inters) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nids[n.ID] + if !ok { + return fmt.Errorf(`unexpected "stations" node returned %v`, n.ID) + } + for kn := range nodes { + assign(kn, n) + } + } + return nil +} +func (bq *BusQuery) loadBoardingRecords(ctx context.Context, query *BoardingRecordQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *BoardingRecord)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Bus) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.BoardingRecord(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(bus.BoardingRecordsColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.bus_boarding_records + if fk == nil { + return fmt.Errorf(`foreign-key "bus_boarding_records" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "bus_boarding_records" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} +func (bq *BusQuery) loadChildBusAssociations(ctx context.Context, query *ChildBusAssociationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *ChildBusAssociation)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Bus) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(childbusassociation.FieldBusID) + } + query.Where(predicate.ChildBusAssociation(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(bus.ChildBusAssociationsColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.BusID + node, ok := nodeids[fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "bus_id" returned %v for node %v`, fk, n.ID) + } + assign(node, n) + } + return nil +} + +func (bq *BusQuery) sqlCount(ctx context.Context) (int, error) { + _spec := bq.querySpec() + _spec.Node.Columns = bq.ctx.Fields + if len(bq.ctx.Fields) > 0 { + _spec.Unique = bq.ctx.Unique != nil && *bq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, bq.driver, _spec) +} + +func (bq *BusQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(bus.Table, bus.Columns, sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID)) + _spec.From = bq.sql + if unique := bq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if bq.path != nil { + _spec.Unique = true + } + if fields := bq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, bus.FieldID) + for i := range fields { + if fields[i] != bus.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + } + if ps := bq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := bq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := bq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := bq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (bq *BusQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(bq.driver.Dialect()) + t1 := builder.Table(bus.Table) + columns := bq.ctx.Fields + if len(columns) == 0 { + columns = bus.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if bq.sql != nil { + selector = bq.sql + selector.Select(selector.Columns(columns...)...) + } + if bq.ctx.Unique != nil && *bq.ctx.Unique { + selector.Distinct() + } + for _, p := range bq.predicates { + p(selector) + } + for _, p := range bq.order { + p(selector) + } + if offset := bq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := bq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// BusGroupBy is the group-by builder for Bus entities. +type BusGroupBy struct { + selector + build *BusQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (bgb *BusGroupBy) Aggregate(fns ...AggregateFunc) *BusGroupBy { + bgb.fns = append(bgb.fns, fns...) + return bgb +} + +// Scan applies the selector query and scans the result into the given value. +func (bgb *BusGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, bgb.build.ctx, "GroupBy") + if err := bgb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*BusQuery, *BusGroupBy](ctx, bgb.build, bgb, bgb.build.inters, v) +} + +func (bgb *BusGroupBy) sqlScan(ctx context.Context, root *BusQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(bgb.fns)) + for _, fn := range bgb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*bgb.flds)+len(bgb.fns)) + for _, f := range *bgb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*bgb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := bgb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// BusSelect is the builder for selecting fields of Bus entities. +type BusSelect struct { + *BusQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (bs *BusSelect) Aggregate(fns ...AggregateFunc) *BusSelect { + bs.fns = append(bs.fns, fns...) + return bs +} + +// Scan applies the selector query and scans the result into the given value. +func (bs *BusSelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, bs.ctx, "Select") + if err := bs.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*BusQuery, *BusSelect](ctx, bs.BusQuery, bs, bs.inters, v) +} + +func (bs *BusSelect) sqlScan(ctx context.Context, root *BusQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(bs.fns)) + for _, fn := range bs.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*bs.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := bs.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/backend/domain/repository/ent/bus_update.go b/backend/domain/repository/ent/bus_update.go new file mode 100644 index 00000000..ad2b32a5 --- /dev/null +++ b/backend/domain/repository/ent/bus_update.go @@ -0,0 +1,1135 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// BusUpdate is the builder for updating Bus entities. +type BusUpdate struct { + config + hooks []Hook + mutation *BusMutation +} + +// Where appends a list predicates to the BusUpdate builder. +func (bu *BusUpdate) Where(ps ...predicate.Bus) *BusUpdate { + bu.mutation.Where(ps...) + return bu +} + +// SetName sets the "name" field. +func (bu *BusUpdate) SetName(s string) *BusUpdate { + bu.mutation.SetName(s) + return bu +} + +// SetNillableName sets the "name" field if the given value is not nil. +func (bu *BusUpdate) SetNillableName(s *string) *BusUpdate { + if s != nil { + bu.SetName(*s) + } + return bu +} + +// SetPlateNumber sets the "plate_number" field. +func (bu *BusUpdate) SetPlateNumber(s string) *BusUpdate { + bu.mutation.SetPlateNumber(s) + return bu +} + +// SetNillablePlateNumber sets the "plate_number" field if the given value is not nil. +func (bu *BusUpdate) SetNillablePlateNumber(s *string) *BusUpdate { + if s != nil { + bu.SetPlateNumber(*s) + } + return bu +} + +// ClearPlateNumber clears the value of the "plate_number" field. +func (bu *BusUpdate) ClearPlateNumber() *BusUpdate { + bu.mutation.ClearPlateNumber() + return bu +} + +// SetLatitude sets the "latitude" field. +func (bu *BusUpdate) SetLatitude(f float64) *BusUpdate { + bu.mutation.ResetLatitude() + bu.mutation.SetLatitude(f) + return bu +} + +// SetNillableLatitude sets the "latitude" field if the given value is not nil. +func (bu *BusUpdate) SetNillableLatitude(f *float64) *BusUpdate { + if f != nil { + bu.SetLatitude(*f) + } + return bu +} + +// AddLatitude adds f to the "latitude" field. +func (bu *BusUpdate) AddLatitude(f float64) *BusUpdate { + bu.mutation.AddLatitude(f) + return bu +} + +// ClearLatitude clears the value of the "latitude" field. +func (bu *BusUpdate) ClearLatitude() *BusUpdate { + bu.mutation.ClearLatitude() + return bu +} + +// SetLongitude sets the "longitude" field. +func (bu *BusUpdate) SetLongitude(f float64) *BusUpdate { + bu.mutation.ResetLongitude() + bu.mutation.SetLongitude(f) + return bu +} + +// SetNillableLongitude sets the "longitude" field if the given value is not nil. +func (bu *BusUpdate) SetNillableLongitude(f *float64) *BusUpdate { + if f != nil { + bu.SetLongitude(*f) + } + return bu +} + +// AddLongitude adds f to the "longitude" field. +func (bu *BusUpdate) AddLongitude(f float64) *BusUpdate { + bu.mutation.AddLongitude(f) + return bu +} + +// ClearLongitude clears the value of the "longitude" field. +func (bu *BusUpdate) ClearLongitude() *BusUpdate { + bu.mutation.ClearLongitude() + return bu +} + +// SetStatus sets the "status" field. +func (bu *BusUpdate) SetStatus(b bus.Status) *BusUpdate { + bu.mutation.SetStatus(b) + return bu +} + +// SetNillableStatus sets the "status" field if the given value is not nil. +func (bu *BusUpdate) SetNillableStatus(b *bus.Status) *BusUpdate { + if b != nil { + bu.SetStatus(*b) + } + return bu +} + +// SetCreatedAt sets the "created_at" field. +func (bu *BusUpdate) SetCreatedAt(t time.Time) *BusUpdate { + bu.mutation.SetCreatedAt(t) + return bu +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (bu *BusUpdate) SetNillableCreatedAt(t *time.Time) *BusUpdate { + if t != nil { + bu.SetCreatedAt(*t) + } + return bu +} + +// SetUpdatedAt sets the "updated_at" field. +func (bu *BusUpdate) SetUpdatedAt(t time.Time) *BusUpdate { + bu.mutation.SetUpdatedAt(t) + return bu +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. +func (bu *BusUpdate) SetNurseryID(id uuid.UUID) *BusUpdate { + bu.mutation.SetNurseryID(id) + return bu +} + +// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. +func (bu *BusUpdate) SetNillableNurseryID(id *uuid.UUID) *BusUpdate { + if id != nil { + bu = bu.SetNurseryID(*id) + } + return bu +} + +// SetNursery sets the "nursery" edge to the Nursery entity. +func (bu *BusUpdate) SetNursery(n *Nursery) *BusUpdate { + return bu.SetNurseryID(n.ID) +} + +// AddStationIDs adds the "stations" edge to the Station entity by IDs. +func (bu *BusUpdate) AddStationIDs(ids ...uuid.UUID) *BusUpdate { + bu.mutation.AddStationIDs(ids...) + return bu +} + +// AddStations adds the "stations" edges to the Station entity. +func (bu *BusUpdate) AddStations(s ...*Station) *BusUpdate { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return bu.AddStationIDs(ids...) +} + +// AddBoardingRecordIDs adds the "boarding_records" edge to the BoardingRecord entity by IDs. +func (bu *BusUpdate) AddBoardingRecordIDs(ids ...uuid.UUID) *BusUpdate { + bu.mutation.AddBoardingRecordIDs(ids...) + return bu +} + +// AddBoardingRecords adds the "boarding_records" edges to the BoardingRecord entity. +func (bu *BusUpdate) AddBoardingRecords(b ...*BoardingRecord) *BusUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bu.AddBoardingRecordIDs(ids...) +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (bu *BusUpdate) AddChildBusAssociationIDs(ids ...int) *BusUpdate { + bu.mutation.AddChildBusAssociationIDs(ids...) + return bu +} + +// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. +func (bu *BusUpdate) AddChildBusAssociations(c ...*ChildBusAssociation) *BusUpdate { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return bu.AddChildBusAssociationIDs(ids...) +} + +// Mutation returns the BusMutation object of the builder. +func (bu *BusUpdate) Mutation() *BusMutation { + return bu.mutation +} + +// ClearNursery clears the "nursery" edge to the Nursery entity. +func (bu *BusUpdate) ClearNursery() *BusUpdate { + bu.mutation.ClearNursery() + return bu +} + +// ClearStations clears all "stations" edges to the Station entity. +func (bu *BusUpdate) ClearStations() *BusUpdate { + bu.mutation.ClearStations() + return bu +} + +// RemoveStationIDs removes the "stations" edge to Station entities by IDs. +func (bu *BusUpdate) RemoveStationIDs(ids ...uuid.UUID) *BusUpdate { + bu.mutation.RemoveStationIDs(ids...) + return bu +} + +// RemoveStations removes "stations" edges to Station entities. +func (bu *BusUpdate) RemoveStations(s ...*Station) *BusUpdate { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return bu.RemoveStationIDs(ids...) +} + +// ClearBoardingRecords clears all "boarding_records" edges to the BoardingRecord entity. +func (bu *BusUpdate) ClearBoardingRecords() *BusUpdate { + bu.mutation.ClearBoardingRecords() + return bu +} + +// RemoveBoardingRecordIDs removes the "boarding_records" edge to BoardingRecord entities by IDs. +func (bu *BusUpdate) RemoveBoardingRecordIDs(ids ...uuid.UUID) *BusUpdate { + bu.mutation.RemoveBoardingRecordIDs(ids...) + return bu +} + +// RemoveBoardingRecords removes "boarding_records" edges to BoardingRecord entities. +func (bu *BusUpdate) RemoveBoardingRecords(b ...*BoardingRecord) *BusUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bu.RemoveBoardingRecordIDs(ids...) +} + +// ClearChildBusAssociations clears all "childBusAssociations" edges to the ChildBusAssociation entity. +func (bu *BusUpdate) ClearChildBusAssociations() *BusUpdate { + bu.mutation.ClearChildBusAssociations() + return bu +} + +// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to ChildBusAssociation entities by IDs. +func (bu *BusUpdate) RemoveChildBusAssociationIDs(ids ...int) *BusUpdate { + bu.mutation.RemoveChildBusAssociationIDs(ids...) + return bu +} + +// RemoveChildBusAssociations removes "childBusAssociations" edges to ChildBusAssociation entities. +func (bu *BusUpdate) RemoveChildBusAssociations(c ...*ChildBusAssociation) *BusUpdate { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return bu.RemoveChildBusAssociationIDs(ids...) +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (bu *BusUpdate) Save(ctx context.Context) (int, error) { + bu.defaults() + return withHooks(ctx, bu.sqlSave, bu.mutation, bu.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (bu *BusUpdate) SaveX(ctx context.Context) int { + affected, err := bu.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (bu *BusUpdate) Exec(ctx context.Context) error { + _, err := bu.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bu *BusUpdate) ExecX(ctx context.Context) { + if err := bu.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (bu *BusUpdate) defaults() { + if _, ok := bu.mutation.UpdatedAt(); !ok { + v := bus.UpdateDefaultUpdatedAt() + bu.mutation.SetUpdatedAt(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (bu *BusUpdate) check() error { + if v, ok := bu.mutation.Status(); ok { + if err := bus.StatusValidator(v); err != nil { + return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Bus.status": %w`, err)} + } + } + return nil +} + +func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { + if err := bu.check(); err != nil { + return n, err + } + _spec := sqlgraph.NewUpdateSpec(bus.Table, bus.Columns, sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID)) + if ps := bu.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := bu.mutation.Name(); ok { + _spec.SetField(bus.FieldName, field.TypeString, value) + } + if value, ok := bu.mutation.PlateNumber(); ok { + _spec.SetField(bus.FieldPlateNumber, field.TypeString, value) + } + if bu.mutation.PlateNumberCleared() { + _spec.ClearField(bus.FieldPlateNumber, field.TypeString) + } + if value, ok := bu.mutation.Latitude(); ok { + _spec.SetField(bus.FieldLatitude, field.TypeFloat64, value) + } + if value, ok := bu.mutation.AddedLatitude(); ok { + _spec.AddField(bus.FieldLatitude, field.TypeFloat64, value) + } + if bu.mutation.LatitudeCleared() { + _spec.ClearField(bus.FieldLatitude, field.TypeFloat64) + } + if value, ok := bu.mutation.Longitude(); ok { + _spec.SetField(bus.FieldLongitude, field.TypeFloat64, value) + } + if value, ok := bu.mutation.AddedLongitude(); ok { + _spec.AddField(bus.FieldLongitude, field.TypeFloat64, value) + } + if bu.mutation.LongitudeCleared() { + _spec.ClearField(bus.FieldLongitude, field.TypeFloat64) + } + if value, ok := bu.mutation.Status(); ok { + _spec.SetField(bus.FieldStatus, field.TypeEnum, value) + } + if value, ok := bu.mutation.CreatedAt(); ok { + _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := bu.mutation.UpdatedAt(); ok { + _spec.SetField(bus.FieldUpdatedAt, field.TypeTime, value) + } + if bu.mutation.NurseryCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.NurseryTable, + Columns: []string{bus.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.NurseryIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.NurseryTable, + Columns: []string{bus.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bu.mutation.StationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: bus.StationsTable, + Columns: bus.StationsPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.RemovedStationsIDs(); len(nodes) > 0 && !bu.mutation.StationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: bus.StationsTable, + Columns: bus.StationsPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.StationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: bus.StationsTable, + Columns: bus.StationsPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bu.mutation.BoardingRecordsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.BoardingRecordsTable, + Columns: []string{bus.BoardingRecordsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.RemovedBoardingRecordsIDs(); len(nodes) > 0 && !bu.mutation.BoardingRecordsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.BoardingRecordsTable, + Columns: []string{bus.BoardingRecordsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.BoardingRecordsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.BoardingRecordsTable, + Columns: []string{bus.BoardingRecordsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bu.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.ChildBusAssociationsTable, + Columns: []string{bus.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.RemovedChildBusAssociationsIDs(); len(nodes) > 0 && !bu.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.ChildBusAssociationsTable, + Columns: []string{bus.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.ChildBusAssociationsTable, + Columns: []string{bus.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if n, err = sqlgraph.UpdateNodes(ctx, bu.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{bus.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + bu.mutation.done = true + return n, nil +} + +// BusUpdateOne is the builder for updating a single Bus entity. +type BusUpdateOne struct { + config + fields []string + hooks []Hook + mutation *BusMutation +} + +// SetName sets the "name" field. +func (buo *BusUpdateOne) SetName(s string) *BusUpdateOne { + buo.mutation.SetName(s) + return buo +} + +// SetNillableName sets the "name" field if the given value is not nil. +func (buo *BusUpdateOne) SetNillableName(s *string) *BusUpdateOne { + if s != nil { + buo.SetName(*s) + } + return buo +} + +// SetPlateNumber sets the "plate_number" field. +func (buo *BusUpdateOne) SetPlateNumber(s string) *BusUpdateOne { + buo.mutation.SetPlateNumber(s) + return buo +} + +// SetNillablePlateNumber sets the "plate_number" field if the given value is not nil. +func (buo *BusUpdateOne) SetNillablePlateNumber(s *string) *BusUpdateOne { + if s != nil { + buo.SetPlateNumber(*s) + } + return buo +} + +// ClearPlateNumber clears the value of the "plate_number" field. +func (buo *BusUpdateOne) ClearPlateNumber() *BusUpdateOne { + buo.mutation.ClearPlateNumber() + return buo +} + +// SetLatitude sets the "latitude" field. +func (buo *BusUpdateOne) SetLatitude(f float64) *BusUpdateOne { + buo.mutation.ResetLatitude() + buo.mutation.SetLatitude(f) + return buo +} + +// SetNillableLatitude sets the "latitude" field if the given value is not nil. +func (buo *BusUpdateOne) SetNillableLatitude(f *float64) *BusUpdateOne { + if f != nil { + buo.SetLatitude(*f) + } + return buo +} + +// AddLatitude adds f to the "latitude" field. +func (buo *BusUpdateOne) AddLatitude(f float64) *BusUpdateOne { + buo.mutation.AddLatitude(f) + return buo +} + +// ClearLatitude clears the value of the "latitude" field. +func (buo *BusUpdateOne) ClearLatitude() *BusUpdateOne { + buo.mutation.ClearLatitude() + return buo +} + +// SetLongitude sets the "longitude" field. +func (buo *BusUpdateOne) SetLongitude(f float64) *BusUpdateOne { + buo.mutation.ResetLongitude() + buo.mutation.SetLongitude(f) + return buo +} + +// SetNillableLongitude sets the "longitude" field if the given value is not nil. +func (buo *BusUpdateOne) SetNillableLongitude(f *float64) *BusUpdateOne { + if f != nil { + buo.SetLongitude(*f) + } + return buo +} + +// AddLongitude adds f to the "longitude" field. +func (buo *BusUpdateOne) AddLongitude(f float64) *BusUpdateOne { + buo.mutation.AddLongitude(f) + return buo +} + +// ClearLongitude clears the value of the "longitude" field. +func (buo *BusUpdateOne) ClearLongitude() *BusUpdateOne { + buo.mutation.ClearLongitude() + return buo +} + +// SetStatus sets the "status" field. +func (buo *BusUpdateOne) SetStatus(b bus.Status) *BusUpdateOne { + buo.mutation.SetStatus(b) + return buo +} + +// SetNillableStatus sets the "status" field if the given value is not nil. +func (buo *BusUpdateOne) SetNillableStatus(b *bus.Status) *BusUpdateOne { + if b != nil { + buo.SetStatus(*b) + } + return buo +} + +// SetCreatedAt sets the "created_at" field. +func (buo *BusUpdateOne) SetCreatedAt(t time.Time) *BusUpdateOne { + buo.mutation.SetCreatedAt(t) + return buo +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (buo *BusUpdateOne) SetNillableCreatedAt(t *time.Time) *BusUpdateOne { + if t != nil { + buo.SetCreatedAt(*t) + } + return buo +} + +// SetUpdatedAt sets the "updated_at" field. +func (buo *BusUpdateOne) SetUpdatedAt(t time.Time) *BusUpdateOne { + buo.mutation.SetUpdatedAt(t) + return buo +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. +func (buo *BusUpdateOne) SetNurseryID(id uuid.UUID) *BusUpdateOne { + buo.mutation.SetNurseryID(id) + return buo +} + +// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. +func (buo *BusUpdateOne) SetNillableNurseryID(id *uuid.UUID) *BusUpdateOne { + if id != nil { + buo = buo.SetNurseryID(*id) + } + return buo +} + +// SetNursery sets the "nursery" edge to the Nursery entity. +func (buo *BusUpdateOne) SetNursery(n *Nursery) *BusUpdateOne { + return buo.SetNurseryID(n.ID) +} + +// AddStationIDs adds the "stations" edge to the Station entity by IDs. +func (buo *BusUpdateOne) AddStationIDs(ids ...uuid.UUID) *BusUpdateOne { + buo.mutation.AddStationIDs(ids...) + return buo +} + +// AddStations adds the "stations" edges to the Station entity. +func (buo *BusUpdateOne) AddStations(s ...*Station) *BusUpdateOne { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return buo.AddStationIDs(ids...) +} + +// AddBoardingRecordIDs adds the "boarding_records" edge to the BoardingRecord entity by IDs. +func (buo *BusUpdateOne) AddBoardingRecordIDs(ids ...uuid.UUID) *BusUpdateOne { + buo.mutation.AddBoardingRecordIDs(ids...) + return buo +} + +// AddBoardingRecords adds the "boarding_records" edges to the BoardingRecord entity. +func (buo *BusUpdateOne) AddBoardingRecords(b ...*BoardingRecord) *BusUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return buo.AddBoardingRecordIDs(ids...) +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (buo *BusUpdateOne) AddChildBusAssociationIDs(ids ...int) *BusUpdateOne { + buo.mutation.AddChildBusAssociationIDs(ids...) + return buo +} + +// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. +func (buo *BusUpdateOne) AddChildBusAssociations(c ...*ChildBusAssociation) *BusUpdateOne { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return buo.AddChildBusAssociationIDs(ids...) +} + +// Mutation returns the BusMutation object of the builder. +func (buo *BusUpdateOne) Mutation() *BusMutation { + return buo.mutation +} + +// ClearNursery clears the "nursery" edge to the Nursery entity. +func (buo *BusUpdateOne) ClearNursery() *BusUpdateOne { + buo.mutation.ClearNursery() + return buo +} + +// ClearStations clears all "stations" edges to the Station entity. +func (buo *BusUpdateOne) ClearStations() *BusUpdateOne { + buo.mutation.ClearStations() + return buo +} + +// RemoveStationIDs removes the "stations" edge to Station entities by IDs. +func (buo *BusUpdateOne) RemoveStationIDs(ids ...uuid.UUID) *BusUpdateOne { + buo.mutation.RemoveStationIDs(ids...) + return buo +} + +// RemoveStations removes "stations" edges to Station entities. +func (buo *BusUpdateOne) RemoveStations(s ...*Station) *BusUpdateOne { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return buo.RemoveStationIDs(ids...) +} + +// ClearBoardingRecords clears all "boarding_records" edges to the BoardingRecord entity. +func (buo *BusUpdateOne) ClearBoardingRecords() *BusUpdateOne { + buo.mutation.ClearBoardingRecords() + return buo +} + +// RemoveBoardingRecordIDs removes the "boarding_records" edge to BoardingRecord entities by IDs. +func (buo *BusUpdateOne) RemoveBoardingRecordIDs(ids ...uuid.UUID) *BusUpdateOne { + buo.mutation.RemoveBoardingRecordIDs(ids...) + return buo +} + +// RemoveBoardingRecords removes "boarding_records" edges to BoardingRecord entities. +func (buo *BusUpdateOne) RemoveBoardingRecords(b ...*BoardingRecord) *BusUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return buo.RemoveBoardingRecordIDs(ids...) +} + +// ClearChildBusAssociations clears all "childBusAssociations" edges to the ChildBusAssociation entity. +func (buo *BusUpdateOne) ClearChildBusAssociations() *BusUpdateOne { + buo.mutation.ClearChildBusAssociations() + return buo +} + +// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to ChildBusAssociation entities by IDs. +func (buo *BusUpdateOne) RemoveChildBusAssociationIDs(ids ...int) *BusUpdateOne { + buo.mutation.RemoveChildBusAssociationIDs(ids...) + return buo +} + +// RemoveChildBusAssociations removes "childBusAssociations" edges to ChildBusAssociation entities. +func (buo *BusUpdateOne) RemoveChildBusAssociations(c ...*ChildBusAssociation) *BusUpdateOne { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return buo.RemoveChildBusAssociationIDs(ids...) +} + +// Where appends a list predicates to the BusUpdate builder. +func (buo *BusUpdateOne) Where(ps ...predicate.Bus) *BusUpdateOne { + buo.mutation.Where(ps...) + return buo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (buo *BusUpdateOne) Select(field string, fields ...string) *BusUpdateOne { + buo.fields = append([]string{field}, fields...) + return buo +} + +// Save executes the query and returns the updated Bus entity. +func (buo *BusUpdateOne) Save(ctx context.Context) (*Bus, error) { + buo.defaults() + return withHooks(ctx, buo.sqlSave, buo.mutation, buo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (buo *BusUpdateOne) SaveX(ctx context.Context) *Bus { + node, err := buo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (buo *BusUpdateOne) Exec(ctx context.Context) error { + _, err := buo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (buo *BusUpdateOne) ExecX(ctx context.Context) { + if err := buo.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (buo *BusUpdateOne) defaults() { + if _, ok := buo.mutation.UpdatedAt(); !ok { + v := bus.UpdateDefaultUpdatedAt() + buo.mutation.SetUpdatedAt(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (buo *BusUpdateOne) check() error { + if v, ok := buo.mutation.Status(); ok { + if err := bus.StatusValidator(v); err != nil { + return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Bus.status": %w`, err)} + } + } + return nil +} + +func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { + if err := buo.check(); err != nil { + return _node, err + } + _spec := sqlgraph.NewUpdateSpec(bus.Table, bus.Columns, sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID)) + id, ok := buo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Bus.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := buo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, bus.FieldID) + for _, f := range fields { + if !bus.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != bus.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := buo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := buo.mutation.Name(); ok { + _spec.SetField(bus.FieldName, field.TypeString, value) + } + if value, ok := buo.mutation.PlateNumber(); ok { + _spec.SetField(bus.FieldPlateNumber, field.TypeString, value) + } + if buo.mutation.PlateNumberCleared() { + _spec.ClearField(bus.FieldPlateNumber, field.TypeString) + } + if value, ok := buo.mutation.Latitude(); ok { + _spec.SetField(bus.FieldLatitude, field.TypeFloat64, value) + } + if value, ok := buo.mutation.AddedLatitude(); ok { + _spec.AddField(bus.FieldLatitude, field.TypeFloat64, value) + } + if buo.mutation.LatitudeCleared() { + _spec.ClearField(bus.FieldLatitude, field.TypeFloat64) + } + if value, ok := buo.mutation.Longitude(); ok { + _spec.SetField(bus.FieldLongitude, field.TypeFloat64, value) + } + if value, ok := buo.mutation.AddedLongitude(); ok { + _spec.AddField(bus.FieldLongitude, field.TypeFloat64, value) + } + if buo.mutation.LongitudeCleared() { + _spec.ClearField(bus.FieldLongitude, field.TypeFloat64) + } + if value, ok := buo.mutation.Status(); ok { + _spec.SetField(bus.FieldStatus, field.TypeEnum, value) + } + if value, ok := buo.mutation.CreatedAt(); ok { + _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := buo.mutation.UpdatedAt(); ok { + _spec.SetField(bus.FieldUpdatedAt, field.TypeTime, value) + } + if buo.mutation.NurseryCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.NurseryTable, + Columns: []string{bus.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.NurseryIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.NurseryTable, + Columns: []string{bus.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if buo.mutation.StationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: bus.StationsTable, + Columns: bus.StationsPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.RemovedStationsIDs(); len(nodes) > 0 && !buo.mutation.StationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: bus.StationsTable, + Columns: bus.StationsPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.StationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: bus.StationsTable, + Columns: bus.StationsPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if buo.mutation.BoardingRecordsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.BoardingRecordsTable, + Columns: []string{bus.BoardingRecordsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.RemovedBoardingRecordsIDs(); len(nodes) > 0 && !buo.mutation.BoardingRecordsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.BoardingRecordsTable, + Columns: []string{bus.BoardingRecordsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.BoardingRecordsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.BoardingRecordsTable, + Columns: []string{bus.BoardingRecordsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if buo.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.ChildBusAssociationsTable, + Columns: []string{bus.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.RemovedChildBusAssociationsIDs(); len(nodes) > 0 && !buo.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.ChildBusAssociationsTable, + Columns: []string{bus.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: bus.ChildBusAssociationsTable, + Columns: []string{bus.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + _node = &Bus{config: buo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, buo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{bus.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + buo.mutation.done = true + return _node, nil +} diff --git a/backend/domain/repository/ent/child.go b/backend/domain/repository/ent/child.go new file mode 100644 index 00000000..a1295ea8 --- /dev/null +++ b/backend/domain/repository/ent/child.go @@ -0,0 +1,363 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "strings" + "time" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/google/uuid" +) + +// Child is the model entity for the Child schema. +type Child struct { + config `json:"-"` + // ID of the ent. + ID uuid.UUID `json:"id,omitempty"` + // Name holds the value of the "name" field. + Name string `json:"name,omitempty"` + // Age holds the value of the "age" field. + Age int `json:"age,omitempty"` + // Sex holds the value of the "sex" field. + Sex child.Sex `json:"sex,omitempty"` + // 朝のバスに乗るかどうか + IsRideMorningBus bool `json:"is_ride_morning_bus,omitempty"` + // 放課後のバスに乗るかどうか + IsRideAfternoonBus bool `json:"is_ride_afternoon_bus,omitempty"` + // 持ち物が欠けていないかをチェックするかどうか + CheckForMissingItems bool `json:"check_for_missing_items,omitempty"` + // HasBag holds the value of the "has_bag" field. + HasBag bool `json:"has_bag,omitempty"` + // HasLunchBox holds the value of the "has_lunch_box" field. + HasLunchBox bool `json:"has_lunch_box,omitempty"` + // HasWaterBottle holds the value of the "has_water_bottle" field. + HasWaterBottle bool `json:"has_water_bottle,omitempty"` + // HasUmbrella holds the value of the "has_umbrella" field. + HasUmbrella bool `json:"has_umbrella,omitempty"` + // HasOther holds the value of the "has_other" field. + HasOther bool `json:"has_other,omitempty"` + // CreatedAt holds the value of the "created_at" field. + CreatedAt time.Time `json:"created_at,omitempty"` + // UpdatedAt holds the value of the "updated_at" field. + UpdatedAt time.Time `json:"updated_at,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the ChildQuery when eager-loading is set. + Edges ChildEdges `json:"edges"` + child_nursery *uuid.UUID + guardian_children *uuid.UUID + selectValues sql.SelectValues +} + +// ChildEdges holds the relations/edges for other nodes in the graph. +type ChildEdges struct { + // Guardian holds the value of the guardian edge. + Guardian *Guardian `json:"guardian,omitempty"` + // ChildBusAssociations holds the value of the childBusAssociations edge. + ChildBusAssociations []*ChildBusAssociation `json:"childBusAssociations,omitempty"` + // Nursery holds the value of the nursery edge. + Nursery *Nursery `json:"nursery,omitempty"` + // BoardingRecord holds the value of the boarding_record edge. + BoardingRecord []*BoardingRecord `json:"boarding_record,omitempty"` + // Photos holds the value of the photos edge. + Photos []*ChildPhoto `json:"photos,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [5]bool +} + +// GuardianOrErr returns the Guardian value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e ChildEdges) GuardianOrErr() (*Guardian, error) { + if e.loadedTypes[0] { + if e.Guardian == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: guardian.Label} + } + return e.Guardian, nil + } + return nil, &NotLoadedError{edge: "guardian"} +} + +// ChildBusAssociationsOrErr returns the ChildBusAssociations value or an error if the edge +// was not loaded in eager-loading. +func (e ChildEdges) ChildBusAssociationsOrErr() ([]*ChildBusAssociation, error) { + if e.loadedTypes[1] { + return e.ChildBusAssociations, nil + } + return nil, &NotLoadedError{edge: "childBusAssociations"} +} + +// NurseryOrErr returns the Nursery value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e ChildEdges) NurseryOrErr() (*Nursery, error) { + if e.loadedTypes[2] { + if e.Nursery == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: nursery.Label} + } + return e.Nursery, nil + } + return nil, &NotLoadedError{edge: "nursery"} +} + +// BoardingRecordOrErr returns the BoardingRecord value or an error if the edge +// was not loaded in eager-loading. +func (e ChildEdges) BoardingRecordOrErr() ([]*BoardingRecord, error) { + if e.loadedTypes[3] { + return e.BoardingRecord, nil + } + return nil, &NotLoadedError{edge: "boarding_record"} +} + +// PhotosOrErr returns the Photos value or an error if the edge +// was not loaded in eager-loading. +func (e ChildEdges) PhotosOrErr() ([]*ChildPhoto, error) { + if e.loadedTypes[4] { + return e.Photos, nil + } + return nil, &NotLoadedError{edge: "photos"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*Child) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case child.FieldIsRideMorningBus, child.FieldIsRideAfternoonBus, child.FieldCheckForMissingItems, child.FieldHasBag, child.FieldHasLunchBox, child.FieldHasWaterBottle, child.FieldHasUmbrella, child.FieldHasOther: + values[i] = new(sql.NullBool) + case child.FieldAge: + values[i] = new(sql.NullInt64) + case child.FieldName, child.FieldSex: + values[i] = new(sql.NullString) + case child.FieldCreatedAt, child.FieldUpdatedAt: + values[i] = new(sql.NullTime) + case child.FieldID: + values[i] = new(uuid.UUID) + case child.ForeignKeys[0]: // child_nursery + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + case child.ForeignKeys[1]: // guardian_children + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the Child fields. +func (c *Child) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case child.FieldID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field id", values[i]) + } else if value != nil { + c.ID = *value + } + case child.FieldName: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field name", values[i]) + } else if value.Valid { + c.Name = value.String + } + case child.FieldAge: + if value, ok := values[i].(*sql.NullInt64); !ok { + return fmt.Errorf("unexpected type %T for field age", values[i]) + } else if value.Valid { + c.Age = int(value.Int64) + } + case child.FieldSex: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field sex", values[i]) + } else if value.Valid { + c.Sex = child.Sex(value.String) + } + case child.FieldIsRideMorningBus: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field is_ride_morning_bus", values[i]) + } else if value.Valid { + c.IsRideMorningBus = value.Bool + } + case child.FieldIsRideAfternoonBus: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field is_ride_afternoon_bus", values[i]) + } else if value.Valid { + c.IsRideAfternoonBus = value.Bool + } + case child.FieldCheckForMissingItems: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field check_for_missing_items", values[i]) + } else if value.Valid { + c.CheckForMissingItems = value.Bool + } + case child.FieldHasBag: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field has_bag", values[i]) + } else if value.Valid { + c.HasBag = value.Bool + } + case child.FieldHasLunchBox: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field has_lunch_box", values[i]) + } else if value.Valid { + c.HasLunchBox = value.Bool + } + case child.FieldHasWaterBottle: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field has_water_bottle", values[i]) + } else if value.Valid { + c.HasWaterBottle = value.Bool + } + case child.FieldHasUmbrella: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field has_umbrella", values[i]) + } else if value.Valid { + c.HasUmbrella = value.Bool + } + case child.FieldHasOther: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field has_other", values[i]) + } else if value.Valid { + c.HasOther = value.Bool + } + case child.FieldCreatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field created_at", values[i]) + } else if value.Valid { + c.CreatedAt = value.Time + } + case child.FieldUpdatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field updated_at", values[i]) + } else if value.Valid { + c.UpdatedAt = value.Time + } + case child.ForeignKeys[0]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field child_nursery", values[i]) + } else if value.Valid { + c.child_nursery = new(uuid.UUID) + *c.child_nursery = *value.S.(*uuid.UUID) + } + case child.ForeignKeys[1]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field guardian_children", values[i]) + } else if value.Valid { + c.guardian_children = new(uuid.UUID) + *c.guardian_children = *value.S.(*uuid.UUID) + } + default: + c.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the Child. +// This includes values selected through modifiers, order, etc. +func (c *Child) Value(name string) (ent.Value, error) { + return c.selectValues.Get(name) +} + +// QueryGuardian queries the "guardian" edge of the Child entity. +func (c *Child) QueryGuardian() *GuardianQuery { + return NewChildClient(c.config).QueryGuardian(c) +} + +// QueryChildBusAssociations queries the "childBusAssociations" edge of the Child entity. +func (c *Child) QueryChildBusAssociations() *ChildBusAssociationQuery { + return NewChildClient(c.config).QueryChildBusAssociations(c) +} + +// QueryNursery queries the "nursery" edge of the Child entity. +func (c *Child) QueryNursery() *NurseryQuery { + return NewChildClient(c.config).QueryNursery(c) +} + +// QueryBoardingRecord queries the "boarding_record" edge of the Child entity. +func (c *Child) QueryBoardingRecord() *BoardingRecordQuery { + return NewChildClient(c.config).QueryBoardingRecord(c) +} + +// QueryPhotos queries the "photos" edge of the Child entity. +func (c *Child) QueryPhotos() *ChildPhotoQuery { + return NewChildClient(c.config).QueryPhotos(c) +} + +// Update returns a builder for updating this Child. +// Note that you need to call Child.Unwrap() before calling this method if this Child +// was returned from a transaction, and the transaction was committed or rolled back. +func (c *Child) Update() *ChildUpdateOne { + return NewChildClient(c.config).UpdateOne(c) +} + +// Unwrap unwraps the Child entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (c *Child) Unwrap() *Child { + _tx, ok := c.config.driver.(*txDriver) + if !ok { + panic("ent: Child is not a transactional entity") + } + c.config.driver = _tx.drv + return c +} + +// String implements the fmt.Stringer. +func (c *Child) String() string { + var builder strings.Builder + builder.WriteString("Child(") + builder.WriteString(fmt.Sprintf("id=%v, ", c.ID)) + builder.WriteString("name=") + builder.WriteString(c.Name) + builder.WriteString(", ") + builder.WriteString("age=") + builder.WriteString(fmt.Sprintf("%v", c.Age)) + builder.WriteString(", ") + builder.WriteString("sex=") + builder.WriteString(fmt.Sprintf("%v", c.Sex)) + builder.WriteString(", ") + builder.WriteString("is_ride_morning_bus=") + builder.WriteString(fmt.Sprintf("%v", c.IsRideMorningBus)) + builder.WriteString(", ") + builder.WriteString("is_ride_afternoon_bus=") + builder.WriteString(fmt.Sprintf("%v", c.IsRideAfternoonBus)) + builder.WriteString(", ") + builder.WriteString("check_for_missing_items=") + builder.WriteString(fmt.Sprintf("%v", c.CheckForMissingItems)) + builder.WriteString(", ") + builder.WriteString("has_bag=") + builder.WriteString(fmt.Sprintf("%v", c.HasBag)) + builder.WriteString(", ") + builder.WriteString("has_lunch_box=") + builder.WriteString(fmt.Sprintf("%v", c.HasLunchBox)) + builder.WriteString(", ") + builder.WriteString("has_water_bottle=") + builder.WriteString(fmt.Sprintf("%v", c.HasWaterBottle)) + builder.WriteString(", ") + builder.WriteString("has_umbrella=") + builder.WriteString(fmt.Sprintf("%v", c.HasUmbrella)) + builder.WriteString(", ") + builder.WriteString("has_other=") + builder.WriteString(fmt.Sprintf("%v", c.HasOther)) + builder.WriteString(", ") + builder.WriteString("created_at=") + builder.WriteString(c.CreatedAt.Format(time.ANSIC)) + builder.WriteString(", ") + builder.WriteString("updated_at=") + builder.WriteString(c.UpdatedAt.Format(time.ANSIC)) + builder.WriteByte(')') + return builder.String() +} + +// Childs is a parsable slice of Child. +type Childs []*Child diff --git a/backend/domain/repository/ent/child/child.go b/backend/domain/repository/ent/child/child.go new file mode 100644 index 00000000..85b9403f --- /dev/null +++ b/backend/domain/repository/ent/child/child.go @@ -0,0 +1,347 @@ +// Code generated by ent, DO NOT EDIT. + +package child + +import ( + "fmt" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/google/uuid" +) + +const ( + // Label holds the string label denoting the child type in the database. + Label = "child" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldSex holds the string denoting the sex field in the database. + FieldSex = "sex" + // FieldIsRideMorningBus holds the string denoting the is_ride_morning_bus field in the database. + FieldIsRideMorningBus = "is_ride_morning_bus" + // FieldIsRideAfternoonBus holds the string denoting the is_ride_afternoon_bus field in the database. + FieldIsRideAfternoonBus = "is_ride_afternoon_bus" + // FieldCheckForMissingItems holds the string denoting the check_for_missing_items field in the database. + FieldCheckForMissingItems = "check_for_missing_items" + // FieldHasBag holds the string denoting the has_bag field in the database. + FieldHasBag = "has_bag" + // FieldHasLunchBox holds the string denoting the has_lunch_box field in the database. + FieldHasLunchBox = "has_lunch_box" + // FieldHasWaterBottle holds the string denoting the has_water_bottle field in the database. + FieldHasWaterBottle = "has_water_bottle" + // FieldHasUmbrella holds the string denoting the has_umbrella field in the database. + FieldHasUmbrella = "has_umbrella" + // FieldHasOther holds the string denoting the has_other field in the database. + FieldHasOther = "has_other" + // FieldCreatedAt holds the string denoting the created_at field in the database. + FieldCreatedAt = "created_at" + // FieldUpdatedAt holds the string denoting the updated_at field in the database. + FieldUpdatedAt = "updated_at" + // EdgeGuardian holds the string denoting the guardian edge name in mutations. + EdgeGuardian = "guardian" + // EdgeChildBusAssociations holds the string denoting the childbusassociations edge name in mutations. + EdgeChildBusAssociations = "childBusAssociations" + // EdgeNursery holds the string denoting the nursery edge name in mutations. + EdgeNursery = "nursery" + // EdgeBoardingRecord holds the string denoting the boarding_record edge name in mutations. + EdgeBoardingRecord = "boarding_record" + // EdgePhotos holds the string denoting the photos edge name in mutations. + EdgePhotos = "photos" + // Table holds the table name of the child in the database. + Table = "childs" + // GuardianTable is the table that holds the guardian relation/edge. + GuardianTable = "childs" + // GuardianInverseTable is the table name for the Guardian entity. + // It exists in this package in order to avoid circular dependency with the "guardian" package. + GuardianInverseTable = "guardians" + // GuardianColumn is the table column denoting the guardian relation/edge. + GuardianColumn = "guardian_children" + // ChildBusAssociationsTable is the table that holds the childBusAssociations relation/edge. + ChildBusAssociationsTable = "child_bus_associations" + // ChildBusAssociationsInverseTable is the table name for the ChildBusAssociation entity. + // It exists in this package in order to avoid circular dependency with the "childbusassociation" package. + ChildBusAssociationsInverseTable = "child_bus_associations" + // ChildBusAssociationsColumn is the table column denoting the childBusAssociations relation/edge. + ChildBusAssociationsColumn = "child_id" + // NurseryTable is the table that holds the nursery relation/edge. + NurseryTable = "childs" + // NurseryInverseTable is the table name for the Nursery entity. + // It exists in this package in order to avoid circular dependency with the "nursery" package. + NurseryInverseTable = "nurseries" + // NurseryColumn is the table column denoting the nursery relation/edge. + NurseryColumn = "child_nursery" + // BoardingRecordTable is the table that holds the boarding_record relation/edge. + BoardingRecordTable = "boarding_records" + // BoardingRecordInverseTable is the table name for the BoardingRecord entity. + // It exists in this package in order to avoid circular dependency with the "boardingrecord" package. + BoardingRecordInverseTable = "boarding_records" + // BoardingRecordColumn is the table column denoting the boarding_record relation/edge. + BoardingRecordColumn = "child_boarding_record" + // PhotosTable is the table that holds the photos relation/edge. + PhotosTable = "child_photos" + // PhotosInverseTable is the table name for the ChildPhoto entity. + // It exists in this package in order to avoid circular dependency with the "childphoto" package. + PhotosInverseTable = "child_photos" + // PhotosColumn is the table column denoting the photos relation/edge. + PhotosColumn = "child_photos" +) + +// Columns holds all SQL columns for child fields. +var Columns = []string{ + FieldID, + FieldName, + FieldAge, + FieldSex, + FieldIsRideMorningBus, + FieldIsRideAfternoonBus, + FieldCheckForMissingItems, + FieldHasBag, + FieldHasLunchBox, + FieldHasWaterBottle, + FieldHasUmbrella, + FieldHasOther, + FieldCreatedAt, + FieldUpdatedAt, +} + +// ForeignKeys holds the SQL foreign-keys that are owned by the "childs" +// table and are not defined as standalone fields in the schema. +var ForeignKeys = []string{ + "child_nursery", + "guardian_children", +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + for i := range ForeignKeys { + if column == ForeignKeys[i] { + return true + } + } + return false +} + +var ( + // DefaultIsRideMorningBus holds the default value on creation for the "is_ride_morning_bus" field. + DefaultIsRideMorningBus bool + // DefaultIsRideAfternoonBus holds the default value on creation for the "is_ride_afternoon_bus" field. + DefaultIsRideAfternoonBus bool + // DefaultCheckForMissingItems holds the default value on creation for the "check_for_missing_items" field. + DefaultCheckForMissingItems bool + // DefaultHasBag holds the default value on creation for the "has_bag" field. + DefaultHasBag bool + // DefaultHasLunchBox holds the default value on creation for the "has_lunch_box" field. + DefaultHasLunchBox bool + // DefaultHasWaterBottle holds the default value on creation for the "has_water_bottle" field. + DefaultHasWaterBottle bool + // DefaultHasUmbrella holds the default value on creation for the "has_umbrella" field. + DefaultHasUmbrella bool + // DefaultHasOther holds the default value on creation for the "has_other" field. + DefaultHasOther bool + // DefaultCreatedAt holds the default value on creation for the "created_at" field. + DefaultCreatedAt func() time.Time + // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. + DefaultUpdatedAt func() time.Time + // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. + UpdateDefaultUpdatedAt func() time.Time + // DefaultID holds the default value on creation for the "id" field. + DefaultID func() uuid.UUID +) + +// Sex defines the type for the "sex" enum field. +type Sex string + +// Sex values. +const ( + SexMan Sex = "man" + SexWomen Sex = "women" + SexOther Sex = "other" +) + +func (s Sex) String() string { + return string(s) +} + +// SexValidator is a validator for the "sex" field enum values. It is called by the builders before save. +func SexValidator(s Sex) error { + switch s { + case SexMan, SexWomen, SexOther: + return nil + default: + return fmt.Errorf("child: invalid enum value for sex field: %q", s) + } +} + +// OrderOption defines the ordering options for the Child queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByName orders the results by the name field. +func ByName(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldName, opts...).ToFunc() +} + +// ByAge orders the results by the age field. +func ByAge(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldAge, opts...).ToFunc() +} + +// BySex orders the results by the sex field. +func BySex(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldSex, opts...).ToFunc() +} + +// ByIsRideMorningBus orders the results by the is_ride_morning_bus field. +func ByIsRideMorningBus(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldIsRideMorningBus, opts...).ToFunc() +} + +// ByIsRideAfternoonBus orders the results by the is_ride_afternoon_bus field. +func ByIsRideAfternoonBus(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldIsRideAfternoonBus, opts...).ToFunc() +} + +// ByCheckForMissingItems orders the results by the check_for_missing_items field. +func ByCheckForMissingItems(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCheckForMissingItems, opts...).ToFunc() +} + +// ByHasBag orders the results by the has_bag field. +func ByHasBag(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldHasBag, opts...).ToFunc() +} + +// ByHasLunchBox orders the results by the has_lunch_box field. +func ByHasLunchBox(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldHasLunchBox, opts...).ToFunc() +} + +// ByHasWaterBottle orders the results by the has_water_bottle field. +func ByHasWaterBottle(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldHasWaterBottle, opts...).ToFunc() +} + +// ByHasUmbrella orders the results by the has_umbrella field. +func ByHasUmbrella(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldHasUmbrella, opts...).ToFunc() +} + +// ByHasOther orders the results by the has_other field. +func ByHasOther(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldHasOther, opts...).ToFunc() +} + +// ByCreatedAt orders the results by the created_at field. +func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() +} + +// ByUpdatedAt orders the results by the updated_at field. +func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() +} + +// ByGuardianField orders the results by guardian field. +func ByGuardianField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newGuardianStep(), sql.OrderByField(field, opts...)) + } +} + +// ByChildBusAssociationsCount orders the results by childBusAssociations count. +func ByChildBusAssociationsCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newChildBusAssociationsStep(), opts...) + } +} + +// ByChildBusAssociations orders the results by childBusAssociations terms. +func ByChildBusAssociations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newChildBusAssociationsStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByNurseryField orders the results by nursery field. +func ByNurseryField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newNurseryStep(), sql.OrderByField(field, opts...)) + } +} + +// ByBoardingRecordCount orders the results by boarding_record count. +func ByBoardingRecordCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newBoardingRecordStep(), opts...) + } +} + +// ByBoardingRecord orders the results by boarding_record terms. +func ByBoardingRecord(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newBoardingRecordStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByPhotosCount orders the results by photos count. +func ByPhotosCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newPhotosStep(), opts...) + } +} + +// ByPhotos orders the results by photos terms. +func ByPhotos(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newPhotosStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} +func newGuardianStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(GuardianInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, GuardianTable, GuardianColumn), + ) +} +func newChildBusAssociationsStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(ChildBusAssociationsInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), + ) +} +func newNurseryStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(NurseryInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, NurseryTable, NurseryColumn), + ) +} +func newBoardingRecordStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(BoardingRecordInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, BoardingRecordTable, BoardingRecordColumn), + ) +} +func newPhotosStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(PhotosInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, PhotosTable, PhotosColumn), + ) +} diff --git a/backend/domain/repository/ent/child/where.go b/backend/domain/repository/ent/child/where.go new file mode 100644 index 00000000..14d5b78e --- /dev/null +++ b/backend/domain/repository/ent/child/where.go @@ -0,0 +1,532 @@ +// Code generated by ent, DO NOT EDIT. + +package child + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ID filters vertices based on their ID field. +func ID(id uuid.UUID) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id uuid.UUID) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id uuid.UUID) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...uuid.UUID) predicate.Child { + return predicate.Child(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...uuid.UUID) predicate.Child { + return predicate.Child(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id uuid.UUID) predicate.Child { + return predicate.Child(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id uuid.UUID) predicate.Child { + return predicate.Child(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id uuid.UUID) predicate.Child { + return predicate.Child(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id uuid.UUID) predicate.Child { + return predicate.Child(sql.FieldLTE(FieldID, id)) +} + +// Name applies equality check predicate on the "name" field. It's identical to NameEQ. +func Name(v string) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldName, v)) +} + +// Age applies equality check predicate on the "age" field. It's identical to AgeEQ. +func Age(v int) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldAge, v)) +} + +// IsRideMorningBus applies equality check predicate on the "is_ride_morning_bus" field. It's identical to IsRideMorningBusEQ. +func IsRideMorningBus(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldIsRideMorningBus, v)) +} + +// IsRideAfternoonBus applies equality check predicate on the "is_ride_afternoon_bus" field. It's identical to IsRideAfternoonBusEQ. +func IsRideAfternoonBus(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldIsRideAfternoonBus, v)) +} + +// CheckForMissingItems applies equality check predicate on the "check_for_missing_items" field. It's identical to CheckForMissingItemsEQ. +func CheckForMissingItems(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldCheckForMissingItems, v)) +} + +// HasBag applies equality check predicate on the "has_bag" field. It's identical to HasBagEQ. +func HasBag(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldHasBag, v)) +} + +// HasLunchBox applies equality check predicate on the "has_lunch_box" field. It's identical to HasLunchBoxEQ. +func HasLunchBox(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldHasLunchBox, v)) +} + +// HasWaterBottle applies equality check predicate on the "has_water_bottle" field. It's identical to HasWaterBottleEQ. +func HasWaterBottle(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldHasWaterBottle, v)) +} + +// HasUmbrella applies equality check predicate on the "has_umbrella" field. It's identical to HasUmbrellaEQ. +func HasUmbrella(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldHasUmbrella, v)) +} + +// HasOther applies equality check predicate on the "has_other" field. It's identical to HasOtherEQ. +func HasOther(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldHasOther, v)) +} + +// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. +func CreatedAt(v time.Time) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldCreatedAt, v)) +} + +// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ. +func UpdatedAt(v time.Time) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// NameEQ applies the EQ predicate on the "name" field. +func NameEQ(v string) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldName, v)) +} + +// NameNEQ applies the NEQ predicate on the "name" field. +func NameNEQ(v string) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldName, v)) +} + +// NameIn applies the In predicate on the "name" field. +func NameIn(vs ...string) predicate.Child { + return predicate.Child(sql.FieldIn(FieldName, vs...)) +} + +// NameNotIn applies the NotIn predicate on the "name" field. +func NameNotIn(vs ...string) predicate.Child { + return predicate.Child(sql.FieldNotIn(FieldName, vs...)) +} + +// NameGT applies the GT predicate on the "name" field. +func NameGT(v string) predicate.Child { + return predicate.Child(sql.FieldGT(FieldName, v)) +} + +// NameGTE applies the GTE predicate on the "name" field. +func NameGTE(v string) predicate.Child { + return predicate.Child(sql.FieldGTE(FieldName, v)) +} + +// NameLT applies the LT predicate on the "name" field. +func NameLT(v string) predicate.Child { + return predicate.Child(sql.FieldLT(FieldName, v)) +} + +// NameLTE applies the LTE predicate on the "name" field. +func NameLTE(v string) predicate.Child { + return predicate.Child(sql.FieldLTE(FieldName, v)) +} + +// NameContains applies the Contains predicate on the "name" field. +func NameContains(v string) predicate.Child { + return predicate.Child(sql.FieldContains(FieldName, v)) +} + +// NameHasPrefix applies the HasPrefix predicate on the "name" field. +func NameHasPrefix(v string) predicate.Child { + return predicate.Child(sql.FieldHasPrefix(FieldName, v)) +} + +// NameHasSuffix applies the HasSuffix predicate on the "name" field. +func NameHasSuffix(v string) predicate.Child { + return predicate.Child(sql.FieldHasSuffix(FieldName, v)) +} + +// NameEqualFold applies the EqualFold predicate on the "name" field. +func NameEqualFold(v string) predicate.Child { + return predicate.Child(sql.FieldEqualFold(FieldName, v)) +} + +// NameContainsFold applies the ContainsFold predicate on the "name" field. +func NameContainsFold(v string) predicate.Child { + return predicate.Child(sql.FieldContainsFold(FieldName, v)) +} + +// AgeEQ applies the EQ predicate on the "age" field. +func AgeEQ(v int) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldAge, v)) +} + +// AgeNEQ applies the NEQ predicate on the "age" field. +func AgeNEQ(v int) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldAge, v)) +} + +// AgeIn applies the In predicate on the "age" field. +func AgeIn(vs ...int) predicate.Child { + return predicate.Child(sql.FieldIn(FieldAge, vs...)) +} + +// AgeNotIn applies the NotIn predicate on the "age" field. +func AgeNotIn(vs ...int) predicate.Child { + return predicate.Child(sql.FieldNotIn(FieldAge, vs...)) +} + +// AgeGT applies the GT predicate on the "age" field. +func AgeGT(v int) predicate.Child { + return predicate.Child(sql.FieldGT(FieldAge, v)) +} + +// AgeGTE applies the GTE predicate on the "age" field. +func AgeGTE(v int) predicate.Child { + return predicate.Child(sql.FieldGTE(FieldAge, v)) +} + +// AgeLT applies the LT predicate on the "age" field. +func AgeLT(v int) predicate.Child { + return predicate.Child(sql.FieldLT(FieldAge, v)) +} + +// AgeLTE applies the LTE predicate on the "age" field. +func AgeLTE(v int) predicate.Child { + return predicate.Child(sql.FieldLTE(FieldAge, v)) +} + +// SexEQ applies the EQ predicate on the "sex" field. +func SexEQ(v Sex) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldSex, v)) +} + +// SexNEQ applies the NEQ predicate on the "sex" field. +func SexNEQ(v Sex) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldSex, v)) +} + +// SexIn applies the In predicate on the "sex" field. +func SexIn(vs ...Sex) predicate.Child { + return predicate.Child(sql.FieldIn(FieldSex, vs...)) +} + +// SexNotIn applies the NotIn predicate on the "sex" field. +func SexNotIn(vs ...Sex) predicate.Child { + return predicate.Child(sql.FieldNotIn(FieldSex, vs...)) +} + +// IsRideMorningBusEQ applies the EQ predicate on the "is_ride_morning_bus" field. +func IsRideMorningBusEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldIsRideMorningBus, v)) +} + +// IsRideMorningBusNEQ applies the NEQ predicate on the "is_ride_morning_bus" field. +func IsRideMorningBusNEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldIsRideMorningBus, v)) +} + +// IsRideAfternoonBusEQ applies the EQ predicate on the "is_ride_afternoon_bus" field. +func IsRideAfternoonBusEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldIsRideAfternoonBus, v)) +} + +// IsRideAfternoonBusNEQ applies the NEQ predicate on the "is_ride_afternoon_bus" field. +func IsRideAfternoonBusNEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldIsRideAfternoonBus, v)) +} + +// CheckForMissingItemsEQ applies the EQ predicate on the "check_for_missing_items" field. +func CheckForMissingItemsEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldCheckForMissingItems, v)) +} + +// CheckForMissingItemsNEQ applies the NEQ predicate on the "check_for_missing_items" field. +func CheckForMissingItemsNEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldCheckForMissingItems, v)) +} + +// HasBagEQ applies the EQ predicate on the "has_bag" field. +func HasBagEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldHasBag, v)) +} + +// HasBagNEQ applies the NEQ predicate on the "has_bag" field. +func HasBagNEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldHasBag, v)) +} + +// HasLunchBoxEQ applies the EQ predicate on the "has_lunch_box" field. +func HasLunchBoxEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldHasLunchBox, v)) +} + +// HasLunchBoxNEQ applies the NEQ predicate on the "has_lunch_box" field. +func HasLunchBoxNEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldHasLunchBox, v)) +} + +// HasWaterBottleEQ applies the EQ predicate on the "has_water_bottle" field. +func HasWaterBottleEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldHasWaterBottle, v)) +} + +// HasWaterBottleNEQ applies the NEQ predicate on the "has_water_bottle" field. +func HasWaterBottleNEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldHasWaterBottle, v)) +} + +// HasUmbrellaEQ applies the EQ predicate on the "has_umbrella" field. +func HasUmbrellaEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldHasUmbrella, v)) +} + +// HasUmbrellaNEQ applies the NEQ predicate on the "has_umbrella" field. +func HasUmbrellaNEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldHasUmbrella, v)) +} + +// HasOtherEQ applies the EQ predicate on the "has_other" field. +func HasOtherEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldHasOther, v)) +} + +// HasOtherNEQ applies the NEQ predicate on the "has_other" field. +func HasOtherNEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldHasOther, v)) +} + +// CreatedAtEQ applies the EQ predicate on the "created_at" field. +func CreatedAtEQ(v time.Time) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldCreatedAt, v)) +} + +// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. +func CreatedAtNEQ(v time.Time) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldCreatedAt, v)) +} + +// CreatedAtIn applies the In predicate on the "created_at" field. +func CreatedAtIn(vs ...time.Time) predicate.Child { + return predicate.Child(sql.FieldIn(FieldCreatedAt, vs...)) +} + +// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. +func CreatedAtNotIn(vs ...time.Time) predicate.Child { + return predicate.Child(sql.FieldNotIn(FieldCreatedAt, vs...)) +} + +// CreatedAtGT applies the GT predicate on the "created_at" field. +func CreatedAtGT(v time.Time) predicate.Child { + return predicate.Child(sql.FieldGT(FieldCreatedAt, v)) +} + +// CreatedAtGTE applies the GTE predicate on the "created_at" field. +func CreatedAtGTE(v time.Time) predicate.Child { + return predicate.Child(sql.FieldGTE(FieldCreatedAt, v)) +} + +// CreatedAtLT applies the LT predicate on the "created_at" field. +func CreatedAtLT(v time.Time) predicate.Child { + return predicate.Child(sql.FieldLT(FieldCreatedAt, v)) +} + +// CreatedAtLTE applies the LTE predicate on the "created_at" field. +func CreatedAtLTE(v time.Time) predicate.Child { + return predicate.Child(sql.FieldLTE(FieldCreatedAt, v)) +} + +// UpdatedAtEQ applies the EQ predicate on the "updated_at" field. +func UpdatedAtEQ(v time.Time) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field. +func UpdatedAtNEQ(v time.Time) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtIn applies the In predicate on the "updated_at" field. +func UpdatedAtIn(vs ...time.Time) predicate.Child { + return predicate.Child(sql.FieldIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field. +func UpdatedAtNotIn(vs ...time.Time) predicate.Child { + return predicate.Child(sql.FieldNotIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtGT applies the GT predicate on the "updated_at" field. +func UpdatedAtGT(v time.Time) predicate.Child { + return predicate.Child(sql.FieldGT(FieldUpdatedAt, v)) +} + +// UpdatedAtGTE applies the GTE predicate on the "updated_at" field. +func UpdatedAtGTE(v time.Time) predicate.Child { + return predicate.Child(sql.FieldGTE(FieldUpdatedAt, v)) +} + +// UpdatedAtLT applies the LT predicate on the "updated_at" field. +func UpdatedAtLT(v time.Time) predicate.Child { + return predicate.Child(sql.FieldLT(FieldUpdatedAt, v)) +} + +// UpdatedAtLTE applies the LTE predicate on the "updated_at" field. +func UpdatedAtLTE(v time.Time) predicate.Child { + return predicate.Child(sql.FieldLTE(FieldUpdatedAt, v)) +} + +// HasGuardian applies the HasEdge predicate on the "guardian" edge. +func HasGuardian() predicate.Child { + return predicate.Child(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, GuardianTable, GuardianColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasGuardianWith applies the HasEdge predicate on the "guardian" edge with a given conditions (other predicates). +func HasGuardianWith(preds ...predicate.Guardian) predicate.Child { + return predicate.Child(func(s *sql.Selector) { + step := newGuardianStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasChildBusAssociations applies the HasEdge predicate on the "childBusAssociations" edge. +func HasChildBusAssociations() predicate.Child { + return predicate.Child(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasChildBusAssociationsWith applies the HasEdge predicate on the "childBusAssociations" edge with a given conditions (other predicates). +func HasChildBusAssociationsWith(preds ...predicate.ChildBusAssociation) predicate.Child { + return predicate.Child(func(s *sql.Selector) { + step := newChildBusAssociationsStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasNursery applies the HasEdge predicate on the "nursery" edge. +func HasNursery() predicate.Child { + return predicate.Child(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, NurseryTable, NurseryColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasNurseryWith applies the HasEdge predicate on the "nursery" edge with a given conditions (other predicates). +func HasNurseryWith(preds ...predicate.Nursery) predicate.Child { + return predicate.Child(func(s *sql.Selector) { + step := newNurseryStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasBoardingRecord applies the HasEdge predicate on the "boarding_record" edge. +func HasBoardingRecord() predicate.Child { + return predicate.Child(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, BoardingRecordTable, BoardingRecordColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasBoardingRecordWith applies the HasEdge predicate on the "boarding_record" edge with a given conditions (other predicates). +func HasBoardingRecordWith(preds ...predicate.BoardingRecord) predicate.Child { + return predicate.Child(func(s *sql.Selector) { + step := newBoardingRecordStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasPhotos applies the HasEdge predicate on the "photos" edge. +func HasPhotos() predicate.Child { + return predicate.Child(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, PhotosTable, PhotosColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasPhotosWith applies the HasEdge predicate on the "photos" edge with a given conditions (other predicates). +func HasPhotosWith(preds ...predicate.ChildPhoto) predicate.Child { + return predicate.Child(func(s *sql.Selector) { + step := newPhotosStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.Child) predicate.Child { + return predicate.Child(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.Child) predicate.Child { + return predicate.Child(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.Child) predicate.Child { + return predicate.Child(sql.NotPredicates(p)) +} diff --git a/backend/domain/repository/ent/child_create.go b/backend/domain/repository/ent/child_create.go new file mode 100644 index 00000000..acc21f86 --- /dev/null +++ b/backend/domain/repository/ent/child_create.go @@ -0,0 +1,665 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/google/uuid" +) + +// ChildCreate is the builder for creating a Child entity. +type ChildCreate struct { + config + mutation *ChildMutation + hooks []Hook +} + +// SetName sets the "name" field. +func (cc *ChildCreate) SetName(s string) *ChildCreate { + cc.mutation.SetName(s) + return cc +} + +// SetAge sets the "age" field. +func (cc *ChildCreate) SetAge(i int) *ChildCreate { + cc.mutation.SetAge(i) + return cc +} + +// SetSex sets the "sex" field. +func (cc *ChildCreate) SetSex(c child.Sex) *ChildCreate { + cc.mutation.SetSex(c) + return cc +} + +// SetIsRideMorningBus sets the "is_ride_morning_bus" field. +func (cc *ChildCreate) SetIsRideMorningBus(b bool) *ChildCreate { + cc.mutation.SetIsRideMorningBus(b) + return cc +} + +// SetNillableIsRideMorningBus sets the "is_ride_morning_bus" field if the given value is not nil. +func (cc *ChildCreate) SetNillableIsRideMorningBus(b *bool) *ChildCreate { + if b != nil { + cc.SetIsRideMorningBus(*b) + } + return cc +} + +// SetIsRideAfternoonBus sets the "is_ride_afternoon_bus" field. +func (cc *ChildCreate) SetIsRideAfternoonBus(b bool) *ChildCreate { + cc.mutation.SetIsRideAfternoonBus(b) + return cc +} + +// SetNillableIsRideAfternoonBus sets the "is_ride_afternoon_bus" field if the given value is not nil. +func (cc *ChildCreate) SetNillableIsRideAfternoonBus(b *bool) *ChildCreate { + if b != nil { + cc.SetIsRideAfternoonBus(*b) + } + return cc +} + +// SetCheckForMissingItems sets the "check_for_missing_items" field. +func (cc *ChildCreate) SetCheckForMissingItems(b bool) *ChildCreate { + cc.mutation.SetCheckForMissingItems(b) + return cc +} + +// SetNillableCheckForMissingItems sets the "check_for_missing_items" field if the given value is not nil. +func (cc *ChildCreate) SetNillableCheckForMissingItems(b *bool) *ChildCreate { + if b != nil { + cc.SetCheckForMissingItems(*b) + } + return cc +} + +// SetHasBag sets the "has_bag" field. +func (cc *ChildCreate) SetHasBag(b bool) *ChildCreate { + cc.mutation.SetHasBag(b) + return cc +} + +// SetNillableHasBag sets the "has_bag" field if the given value is not nil. +func (cc *ChildCreate) SetNillableHasBag(b *bool) *ChildCreate { + if b != nil { + cc.SetHasBag(*b) + } + return cc +} + +// SetHasLunchBox sets the "has_lunch_box" field. +func (cc *ChildCreate) SetHasLunchBox(b bool) *ChildCreate { + cc.mutation.SetHasLunchBox(b) + return cc +} + +// SetNillableHasLunchBox sets the "has_lunch_box" field if the given value is not nil. +func (cc *ChildCreate) SetNillableHasLunchBox(b *bool) *ChildCreate { + if b != nil { + cc.SetHasLunchBox(*b) + } + return cc +} + +// SetHasWaterBottle sets the "has_water_bottle" field. +func (cc *ChildCreate) SetHasWaterBottle(b bool) *ChildCreate { + cc.mutation.SetHasWaterBottle(b) + return cc +} + +// SetNillableHasWaterBottle sets the "has_water_bottle" field if the given value is not nil. +func (cc *ChildCreate) SetNillableHasWaterBottle(b *bool) *ChildCreate { + if b != nil { + cc.SetHasWaterBottle(*b) + } + return cc +} + +// SetHasUmbrella sets the "has_umbrella" field. +func (cc *ChildCreate) SetHasUmbrella(b bool) *ChildCreate { + cc.mutation.SetHasUmbrella(b) + return cc +} + +// SetNillableHasUmbrella sets the "has_umbrella" field if the given value is not nil. +func (cc *ChildCreate) SetNillableHasUmbrella(b *bool) *ChildCreate { + if b != nil { + cc.SetHasUmbrella(*b) + } + return cc +} + +// SetHasOther sets the "has_other" field. +func (cc *ChildCreate) SetHasOther(b bool) *ChildCreate { + cc.mutation.SetHasOther(b) + return cc +} + +// SetNillableHasOther sets the "has_other" field if the given value is not nil. +func (cc *ChildCreate) SetNillableHasOther(b *bool) *ChildCreate { + if b != nil { + cc.SetHasOther(*b) + } + return cc +} + +// SetCreatedAt sets the "created_at" field. +func (cc *ChildCreate) SetCreatedAt(t time.Time) *ChildCreate { + cc.mutation.SetCreatedAt(t) + return cc +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (cc *ChildCreate) SetNillableCreatedAt(t *time.Time) *ChildCreate { + if t != nil { + cc.SetCreatedAt(*t) + } + return cc +} + +// SetUpdatedAt sets the "updated_at" field. +func (cc *ChildCreate) SetUpdatedAt(t time.Time) *ChildCreate { + cc.mutation.SetUpdatedAt(t) + return cc +} + +// SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil. +func (cc *ChildCreate) SetNillableUpdatedAt(t *time.Time) *ChildCreate { + if t != nil { + cc.SetUpdatedAt(*t) + } + return cc +} + +// SetID sets the "id" field. +func (cc *ChildCreate) SetID(u uuid.UUID) *ChildCreate { + cc.mutation.SetID(u) + return cc +} + +// SetNillableID sets the "id" field if the given value is not nil. +func (cc *ChildCreate) SetNillableID(u *uuid.UUID) *ChildCreate { + if u != nil { + cc.SetID(*u) + } + return cc +} + +// SetGuardianID sets the "guardian" edge to the Guardian entity by ID. +func (cc *ChildCreate) SetGuardianID(id uuid.UUID) *ChildCreate { + cc.mutation.SetGuardianID(id) + return cc +} + +// SetNillableGuardianID sets the "guardian" edge to the Guardian entity by ID if the given value is not nil. +func (cc *ChildCreate) SetNillableGuardianID(id *uuid.UUID) *ChildCreate { + if id != nil { + cc = cc.SetGuardianID(*id) + } + return cc +} + +// SetGuardian sets the "guardian" edge to the Guardian entity. +func (cc *ChildCreate) SetGuardian(g *Guardian) *ChildCreate { + return cc.SetGuardianID(g.ID) +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (cc *ChildCreate) AddChildBusAssociationIDs(ids ...int) *ChildCreate { + cc.mutation.AddChildBusAssociationIDs(ids...) + return cc +} + +// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. +func (cc *ChildCreate) AddChildBusAssociations(c ...*ChildBusAssociation) *ChildCreate { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return cc.AddChildBusAssociationIDs(ids...) +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. +func (cc *ChildCreate) SetNurseryID(id uuid.UUID) *ChildCreate { + cc.mutation.SetNurseryID(id) + return cc +} + +// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. +func (cc *ChildCreate) SetNillableNurseryID(id *uuid.UUID) *ChildCreate { + if id != nil { + cc = cc.SetNurseryID(*id) + } + return cc +} + +// SetNursery sets the "nursery" edge to the Nursery entity. +func (cc *ChildCreate) SetNursery(n *Nursery) *ChildCreate { + return cc.SetNurseryID(n.ID) +} + +// AddBoardingRecordIDs adds the "boarding_record" edge to the BoardingRecord entity by IDs. +func (cc *ChildCreate) AddBoardingRecordIDs(ids ...uuid.UUID) *ChildCreate { + cc.mutation.AddBoardingRecordIDs(ids...) + return cc +} + +// AddBoardingRecord adds the "boarding_record" edges to the BoardingRecord entity. +func (cc *ChildCreate) AddBoardingRecord(b ...*BoardingRecord) *ChildCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return cc.AddBoardingRecordIDs(ids...) +} + +// AddPhotoIDs adds the "photos" edge to the ChildPhoto entity by IDs. +func (cc *ChildCreate) AddPhotoIDs(ids ...uuid.UUID) *ChildCreate { + cc.mutation.AddPhotoIDs(ids...) + return cc +} + +// AddPhotos adds the "photos" edges to the ChildPhoto entity. +func (cc *ChildCreate) AddPhotos(c ...*ChildPhoto) *ChildCreate { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return cc.AddPhotoIDs(ids...) +} + +// Mutation returns the ChildMutation object of the builder. +func (cc *ChildCreate) Mutation() *ChildMutation { + return cc.mutation +} + +// Save creates the Child in the database. +func (cc *ChildCreate) Save(ctx context.Context) (*Child, error) { + cc.defaults() + return withHooks(ctx, cc.sqlSave, cc.mutation, cc.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (cc *ChildCreate) SaveX(ctx context.Context) *Child { + v, err := cc.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (cc *ChildCreate) Exec(ctx context.Context) error { + _, err := cc.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cc *ChildCreate) ExecX(ctx context.Context) { + if err := cc.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (cc *ChildCreate) defaults() { + if _, ok := cc.mutation.IsRideMorningBus(); !ok { + v := child.DefaultIsRideMorningBus + cc.mutation.SetIsRideMorningBus(v) + } + if _, ok := cc.mutation.IsRideAfternoonBus(); !ok { + v := child.DefaultIsRideAfternoonBus + cc.mutation.SetIsRideAfternoonBus(v) + } + if _, ok := cc.mutation.CheckForMissingItems(); !ok { + v := child.DefaultCheckForMissingItems + cc.mutation.SetCheckForMissingItems(v) + } + if _, ok := cc.mutation.HasBag(); !ok { + v := child.DefaultHasBag + cc.mutation.SetHasBag(v) + } + if _, ok := cc.mutation.HasLunchBox(); !ok { + v := child.DefaultHasLunchBox + cc.mutation.SetHasLunchBox(v) + } + if _, ok := cc.mutation.HasWaterBottle(); !ok { + v := child.DefaultHasWaterBottle + cc.mutation.SetHasWaterBottle(v) + } + if _, ok := cc.mutation.HasUmbrella(); !ok { + v := child.DefaultHasUmbrella + cc.mutation.SetHasUmbrella(v) + } + if _, ok := cc.mutation.HasOther(); !ok { + v := child.DefaultHasOther + cc.mutation.SetHasOther(v) + } + if _, ok := cc.mutation.CreatedAt(); !ok { + v := child.DefaultCreatedAt() + cc.mutation.SetCreatedAt(v) + } + if _, ok := cc.mutation.UpdatedAt(); !ok { + v := child.DefaultUpdatedAt() + cc.mutation.SetUpdatedAt(v) + } + if _, ok := cc.mutation.ID(); !ok { + v := child.DefaultID() + cc.mutation.SetID(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (cc *ChildCreate) check() error { + if _, ok := cc.mutation.Name(); !ok { + return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Child.name"`)} + } + if _, ok := cc.mutation.Age(); !ok { + return &ValidationError{Name: "age", err: errors.New(`ent: missing required field "Child.age"`)} + } + if _, ok := cc.mutation.Sex(); !ok { + return &ValidationError{Name: "sex", err: errors.New(`ent: missing required field "Child.sex"`)} + } + if v, ok := cc.mutation.Sex(); ok { + if err := child.SexValidator(v); err != nil { + return &ValidationError{Name: "sex", err: fmt.Errorf(`ent: validator failed for field "Child.sex": %w`, err)} + } + } + if _, ok := cc.mutation.IsRideMorningBus(); !ok { + return &ValidationError{Name: "is_ride_morning_bus", err: errors.New(`ent: missing required field "Child.is_ride_morning_bus"`)} + } + if _, ok := cc.mutation.IsRideAfternoonBus(); !ok { + return &ValidationError{Name: "is_ride_afternoon_bus", err: errors.New(`ent: missing required field "Child.is_ride_afternoon_bus"`)} + } + if _, ok := cc.mutation.CheckForMissingItems(); !ok { + return &ValidationError{Name: "check_for_missing_items", err: errors.New(`ent: missing required field "Child.check_for_missing_items"`)} + } + if _, ok := cc.mutation.HasBag(); !ok { + return &ValidationError{Name: "has_bag", err: errors.New(`ent: missing required field "Child.has_bag"`)} + } + if _, ok := cc.mutation.HasLunchBox(); !ok { + return &ValidationError{Name: "has_lunch_box", err: errors.New(`ent: missing required field "Child.has_lunch_box"`)} + } + if _, ok := cc.mutation.HasWaterBottle(); !ok { + return &ValidationError{Name: "has_water_bottle", err: errors.New(`ent: missing required field "Child.has_water_bottle"`)} + } + if _, ok := cc.mutation.HasUmbrella(); !ok { + return &ValidationError{Name: "has_umbrella", err: errors.New(`ent: missing required field "Child.has_umbrella"`)} + } + if _, ok := cc.mutation.HasOther(); !ok { + return &ValidationError{Name: "has_other", err: errors.New(`ent: missing required field "Child.has_other"`)} + } + if _, ok := cc.mutation.CreatedAt(); !ok { + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Child.created_at"`)} + } + if _, ok := cc.mutation.UpdatedAt(); !ok { + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "Child.updated_at"`)} + } + return nil +} + +func (cc *ChildCreate) sqlSave(ctx context.Context) (*Child, error) { + if err := cc.check(); err != nil { + return nil, err + } + _node, _spec := cc.createSpec() + if err := sqlgraph.CreateNode(ctx, cc.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + if _spec.ID.Value != nil { + if id, ok := _spec.ID.Value.(*uuid.UUID); ok { + _node.ID = *id + } else if err := _node.ID.Scan(_spec.ID.Value); err != nil { + return nil, err + } + } + cc.mutation.id = &_node.ID + cc.mutation.done = true + return _node, nil +} + +func (cc *ChildCreate) createSpec() (*Child, *sqlgraph.CreateSpec) { + var ( + _node = &Child{config: cc.config} + _spec = sqlgraph.NewCreateSpec(child.Table, sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID)) + ) + if id, ok := cc.mutation.ID(); ok { + _node.ID = id + _spec.ID.Value = &id + } + if value, ok := cc.mutation.Name(); ok { + _spec.SetField(child.FieldName, field.TypeString, value) + _node.Name = value + } + if value, ok := cc.mutation.Age(); ok { + _spec.SetField(child.FieldAge, field.TypeInt, value) + _node.Age = value + } + if value, ok := cc.mutation.Sex(); ok { + _spec.SetField(child.FieldSex, field.TypeEnum, value) + _node.Sex = value + } + if value, ok := cc.mutation.IsRideMorningBus(); ok { + _spec.SetField(child.FieldIsRideMorningBus, field.TypeBool, value) + _node.IsRideMorningBus = value + } + if value, ok := cc.mutation.IsRideAfternoonBus(); ok { + _spec.SetField(child.FieldIsRideAfternoonBus, field.TypeBool, value) + _node.IsRideAfternoonBus = value + } + if value, ok := cc.mutation.CheckForMissingItems(); ok { + _spec.SetField(child.FieldCheckForMissingItems, field.TypeBool, value) + _node.CheckForMissingItems = value + } + if value, ok := cc.mutation.HasBag(); ok { + _spec.SetField(child.FieldHasBag, field.TypeBool, value) + _node.HasBag = value + } + if value, ok := cc.mutation.HasLunchBox(); ok { + _spec.SetField(child.FieldHasLunchBox, field.TypeBool, value) + _node.HasLunchBox = value + } + if value, ok := cc.mutation.HasWaterBottle(); ok { + _spec.SetField(child.FieldHasWaterBottle, field.TypeBool, value) + _node.HasWaterBottle = value + } + if value, ok := cc.mutation.HasUmbrella(); ok { + _spec.SetField(child.FieldHasUmbrella, field.TypeBool, value) + _node.HasUmbrella = value + } + if value, ok := cc.mutation.HasOther(); ok { + _spec.SetField(child.FieldHasOther, field.TypeBool, value) + _node.HasOther = value + } + if value, ok := cc.mutation.CreatedAt(); ok { + _spec.SetField(child.FieldCreatedAt, field.TypeTime, value) + _node.CreatedAt = value + } + if value, ok := cc.mutation.UpdatedAt(); ok { + _spec.SetField(child.FieldUpdatedAt, field.TypeTime, value) + _node.UpdatedAt = value + } + if nodes := cc.mutation.GuardianIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: child.GuardianTable, + Columns: []string{child.GuardianColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.guardian_children = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := cc.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.ChildBusAssociationsTable, + Columns: []string{child.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := cc.mutation.NurseryIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: child.NurseryTable, + Columns: []string{child.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.child_nursery = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := cc.mutation.BoardingRecordIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.BoardingRecordTable, + Columns: []string{child.BoardingRecordColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := cc.mutation.PhotosIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.PhotosTable, + Columns: []string{child.PhotosColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// ChildCreateBulk is the builder for creating many Child entities in bulk. +type ChildCreateBulk struct { + config + err error + builders []*ChildCreate +} + +// Save creates the Child entities in the database. +func (ccb *ChildCreateBulk) Save(ctx context.Context) ([]*Child, error) { + if ccb.err != nil { + return nil, ccb.err + } + specs := make([]*sqlgraph.CreateSpec, len(ccb.builders)) + nodes := make([]*Child, len(ccb.builders)) + mutators := make([]Mutator, len(ccb.builders)) + for i := range ccb.builders { + func(i int, root context.Context) { + builder := ccb.builders[i] + builder.defaults() + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*ChildMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, ccb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, ccb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, ccb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (ccb *ChildCreateBulk) SaveX(ctx context.Context) []*Child { + v, err := ccb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (ccb *ChildCreateBulk) Exec(ctx context.Context) error { + _, err := ccb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (ccb *ChildCreateBulk) ExecX(ctx context.Context) { + if err := ccb.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/child_delete.go b/backend/domain/repository/ent/child_delete.go new file mode 100644 index 00000000..302169b3 --- /dev/null +++ b/backend/domain/repository/ent/child_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" +) + +// ChildDelete is the builder for deleting a Child entity. +type ChildDelete struct { + config + hooks []Hook + mutation *ChildMutation +} + +// Where appends a list predicates to the ChildDelete builder. +func (cd *ChildDelete) Where(ps ...predicate.Child) *ChildDelete { + cd.mutation.Where(ps...) + return cd +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (cd *ChildDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, cd.sqlExec, cd.mutation, cd.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (cd *ChildDelete) ExecX(ctx context.Context) int { + n, err := cd.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (cd *ChildDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(child.Table, sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID)) + if ps := cd.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, cd.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + cd.mutation.done = true + return affected, err +} + +// ChildDeleteOne is the builder for deleting a single Child entity. +type ChildDeleteOne struct { + cd *ChildDelete +} + +// Where appends a list predicates to the ChildDelete builder. +func (cdo *ChildDeleteOne) Where(ps ...predicate.Child) *ChildDeleteOne { + cdo.cd.mutation.Where(ps...) + return cdo +} + +// Exec executes the deletion query. +func (cdo *ChildDeleteOne) Exec(ctx context.Context) error { + n, err := cdo.cd.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{child.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (cdo *ChildDeleteOne) ExecX(ctx context.Context) { + if err := cdo.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/child_query.go b/backend/domain/repository/ent/child_query.go new file mode 100644 index 00000000..1b49dbe7 --- /dev/null +++ b/backend/domain/repository/ent/child_query.go @@ -0,0 +1,916 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "database/sql/driver" + "fmt" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ChildQuery is the builder for querying Child entities. +type ChildQuery struct { + config + ctx *QueryContext + order []child.OrderOption + inters []Interceptor + predicates []predicate.Child + withGuardian *GuardianQuery + withChildBusAssociations *ChildBusAssociationQuery + withNursery *NurseryQuery + withBoardingRecord *BoardingRecordQuery + withPhotos *ChildPhotoQuery + withFKs bool + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the ChildQuery builder. +func (cq *ChildQuery) Where(ps ...predicate.Child) *ChildQuery { + cq.predicates = append(cq.predicates, ps...) + return cq +} + +// Limit the number of records to be returned by this query. +func (cq *ChildQuery) Limit(limit int) *ChildQuery { + cq.ctx.Limit = &limit + return cq +} + +// Offset to start from. +func (cq *ChildQuery) Offset(offset int) *ChildQuery { + cq.ctx.Offset = &offset + return cq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (cq *ChildQuery) Unique(unique bool) *ChildQuery { + cq.ctx.Unique = &unique + return cq +} + +// Order specifies how the records should be ordered. +func (cq *ChildQuery) Order(o ...child.OrderOption) *ChildQuery { + cq.order = append(cq.order, o...) + return cq +} + +// QueryGuardian chains the current query on the "guardian" edge. +func (cq *ChildQuery) QueryGuardian() *GuardianQuery { + query := (&GuardianClient{config: cq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := cq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := cq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(child.Table, child.FieldID, selector), + sqlgraph.To(guardian.Table, guardian.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, child.GuardianTable, child.GuardianColumn), + ) + fromU = sqlgraph.SetNeighbors(cq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryChildBusAssociations chains the current query on the "childBusAssociations" edge. +func (cq *ChildQuery) QueryChildBusAssociations() *ChildBusAssociationQuery { + query := (&ChildBusAssociationClient{config: cq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := cq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := cq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(child.Table, child.FieldID, selector), + sqlgraph.To(childbusassociation.Table, childbusassociation.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, child.ChildBusAssociationsTable, child.ChildBusAssociationsColumn), + ) + fromU = sqlgraph.SetNeighbors(cq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryNursery chains the current query on the "nursery" edge. +func (cq *ChildQuery) QueryNursery() *NurseryQuery { + query := (&NurseryClient{config: cq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := cq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := cq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(child.Table, child.FieldID, selector), + sqlgraph.To(nursery.Table, nursery.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, child.NurseryTable, child.NurseryColumn), + ) + fromU = sqlgraph.SetNeighbors(cq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryBoardingRecord chains the current query on the "boarding_record" edge. +func (cq *ChildQuery) QueryBoardingRecord() *BoardingRecordQuery { + query := (&BoardingRecordClient{config: cq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := cq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := cq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(child.Table, child.FieldID, selector), + sqlgraph.To(boardingrecord.Table, boardingrecord.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, child.BoardingRecordTable, child.BoardingRecordColumn), + ) + fromU = sqlgraph.SetNeighbors(cq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryPhotos chains the current query on the "photos" edge. +func (cq *ChildQuery) QueryPhotos() *ChildPhotoQuery { + query := (&ChildPhotoClient{config: cq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := cq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := cq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(child.Table, child.FieldID, selector), + sqlgraph.To(childphoto.Table, childphoto.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, child.PhotosTable, child.PhotosColumn), + ) + fromU = sqlgraph.SetNeighbors(cq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first Child entity from the query. +// Returns a *NotFoundError when no Child was found. +func (cq *ChildQuery) First(ctx context.Context) (*Child, error) { + nodes, err := cq.Limit(1).All(setContextOp(ctx, cq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{child.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (cq *ChildQuery) FirstX(ctx context.Context) *Child { + node, err := cq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first Child ID from the query. +// Returns a *NotFoundError when no Child ID was found. +func (cq *ChildQuery) FirstID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = cq.Limit(1).IDs(setContextOp(ctx, cq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{child.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (cq *ChildQuery) FirstIDX(ctx context.Context) uuid.UUID { + id, err := cq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single Child entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one Child entity is found. +// Returns a *NotFoundError when no Child entities are found. +func (cq *ChildQuery) Only(ctx context.Context) (*Child, error) { + nodes, err := cq.Limit(2).All(setContextOp(ctx, cq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{child.Label} + default: + return nil, &NotSingularError{child.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (cq *ChildQuery) OnlyX(ctx context.Context) *Child { + node, err := cq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only Child ID in the query. +// Returns a *NotSingularError when more than one Child ID is found. +// Returns a *NotFoundError when no entities are found. +func (cq *ChildQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = cq.Limit(2).IDs(setContextOp(ctx, cq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{child.Label} + default: + err = &NotSingularError{child.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (cq *ChildQuery) OnlyIDX(ctx context.Context) uuid.UUID { + id, err := cq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of Childs. +func (cq *ChildQuery) All(ctx context.Context) ([]*Child, error) { + ctx = setContextOp(ctx, cq.ctx, "All") + if err := cq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*Child, *ChildQuery]() + return withInterceptors[[]*Child](ctx, cq, qr, cq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (cq *ChildQuery) AllX(ctx context.Context) []*Child { + nodes, err := cq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of Child IDs. +func (cq *ChildQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error) { + if cq.ctx.Unique == nil && cq.path != nil { + cq.Unique(true) + } + ctx = setContextOp(ctx, cq.ctx, "IDs") + if err = cq.Select(child.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (cq *ChildQuery) IDsX(ctx context.Context) []uuid.UUID { + ids, err := cq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (cq *ChildQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, cq.ctx, "Count") + if err := cq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, cq, querierCount[*ChildQuery](), cq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (cq *ChildQuery) CountX(ctx context.Context) int { + count, err := cq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (cq *ChildQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, cq.ctx, "Exist") + switch _, err := cq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (cq *ChildQuery) ExistX(ctx context.Context) bool { + exist, err := cq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the ChildQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (cq *ChildQuery) Clone() *ChildQuery { + if cq == nil { + return nil + } + return &ChildQuery{ + config: cq.config, + ctx: cq.ctx.Clone(), + order: append([]child.OrderOption{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), + predicates: append([]predicate.Child{}, cq.predicates...), + withGuardian: cq.withGuardian.Clone(), + withChildBusAssociations: cq.withChildBusAssociations.Clone(), + withNursery: cq.withNursery.Clone(), + withBoardingRecord: cq.withBoardingRecord.Clone(), + withPhotos: cq.withPhotos.Clone(), + // clone intermediate query. + sql: cq.sql.Clone(), + path: cq.path, + } +} + +// WithGuardian tells the query-builder to eager-load the nodes that are connected to +// the "guardian" edge. The optional arguments are used to configure the query builder of the edge. +func (cq *ChildQuery) WithGuardian(opts ...func(*GuardianQuery)) *ChildQuery { + query := (&GuardianClient{config: cq.config}).Query() + for _, opt := range opts { + opt(query) + } + cq.withGuardian = query + return cq +} + +// WithChildBusAssociations tells the query-builder to eager-load the nodes that are connected to +// the "childBusAssociations" edge. The optional arguments are used to configure the query builder of the edge. +func (cq *ChildQuery) WithChildBusAssociations(opts ...func(*ChildBusAssociationQuery)) *ChildQuery { + query := (&ChildBusAssociationClient{config: cq.config}).Query() + for _, opt := range opts { + opt(query) + } + cq.withChildBusAssociations = query + return cq +} + +// WithNursery tells the query-builder to eager-load the nodes that are connected to +// the "nursery" edge. The optional arguments are used to configure the query builder of the edge. +func (cq *ChildQuery) WithNursery(opts ...func(*NurseryQuery)) *ChildQuery { + query := (&NurseryClient{config: cq.config}).Query() + for _, opt := range opts { + opt(query) + } + cq.withNursery = query + return cq +} + +// WithBoardingRecord tells the query-builder to eager-load the nodes that are connected to +// the "boarding_record" edge. The optional arguments are used to configure the query builder of the edge. +func (cq *ChildQuery) WithBoardingRecord(opts ...func(*BoardingRecordQuery)) *ChildQuery { + query := (&BoardingRecordClient{config: cq.config}).Query() + for _, opt := range opts { + opt(query) + } + cq.withBoardingRecord = query + return cq +} + +// WithPhotos tells the query-builder to eager-load the nodes that are connected to +// the "photos" edge. The optional arguments are used to configure the query builder of the edge. +func (cq *ChildQuery) WithPhotos(opts ...func(*ChildPhotoQuery)) *ChildQuery { + query := (&ChildPhotoClient{config: cq.config}).Query() + for _, opt := range opts { + opt(query) + } + cq.withPhotos = query + return cq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// Name string `json:"name,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.Child.Query(). +// GroupBy(child.FieldName). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (cq *ChildQuery) GroupBy(field string, fields ...string) *ChildGroupBy { + cq.ctx.Fields = append([]string{field}, fields...) + grbuild := &ChildGroupBy{build: cq} + grbuild.flds = &cq.ctx.Fields + grbuild.label = child.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// Name string `json:"name,omitempty"` +// } +// +// client.Child.Query(). +// Select(child.FieldName). +// Scan(ctx, &v) +func (cq *ChildQuery) Select(fields ...string) *ChildSelect { + cq.ctx.Fields = append(cq.ctx.Fields, fields...) + sbuild := &ChildSelect{ChildQuery: cq} + sbuild.label = child.Label + sbuild.flds, sbuild.scan = &cq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a ChildSelect configured with the given aggregations. +func (cq *ChildQuery) Aggregate(fns ...AggregateFunc) *ChildSelect { + return cq.Select().Aggregate(fns...) +} + +func (cq *ChildQuery) prepareQuery(ctx context.Context) error { + for _, inter := range cq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, cq); err != nil { + return err + } + } + } + for _, f := range cq.ctx.Fields { + if !child.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if cq.path != nil { + prev, err := cq.path(ctx) + if err != nil { + return err + } + cq.sql = prev + } + return nil +} + +func (cq *ChildQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Child, error) { + var ( + nodes = []*Child{} + withFKs = cq.withFKs + _spec = cq.querySpec() + loadedTypes = [5]bool{ + cq.withGuardian != nil, + cq.withChildBusAssociations != nil, + cq.withNursery != nil, + cq.withBoardingRecord != nil, + cq.withPhotos != nil, + } + ) + if cq.withGuardian != nil || cq.withNursery != nil { + withFKs = true + } + if withFKs { + _spec.Node.Columns = append(_spec.Node.Columns, child.ForeignKeys...) + } + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*Child).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &Child{config: cq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, cq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := cq.withGuardian; query != nil { + if err := cq.loadGuardian(ctx, query, nodes, nil, + func(n *Child, e *Guardian) { n.Edges.Guardian = e }); err != nil { + return nil, err + } + } + if query := cq.withChildBusAssociations; query != nil { + if err := cq.loadChildBusAssociations(ctx, query, nodes, + func(n *Child) { n.Edges.ChildBusAssociations = []*ChildBusAssociation{} }, + func(n *Child, e *ChildBusAssociation) { + n.Edges.ChildBusAssociations = append(n.Edges.ChildBusAssociations, e) + }); err != nil { + return nil, err + } + } + if query := cq.withNursery; query != nil { + if err := cq.loadNursery(ctx, query, nodes, nil, + func(n *Child, e *Nursery) { n.Edges.Nursery = e }); err != nil { + return nil, err + } + } + if query := cq.withBoardingRecord; query != nil { + if err := cq.loadBoardingRecord(ctx, query, nodes, + func(n *Child) { n.Edges.BoardingRecord = []*BoardingRecord{} }, + func(n *Child, e *BoardingRecord) { n.Edges.BoardingRecord = append(n.Edges.BoardingRecord, e) }); err != nil { + return nil, err + } + } + if query := cq.withPhotos; query != nil { + if err := cq.loadPhotos(ctx, query, nodes, + func(n *Child) { n.Edges.Photos = []*ChildPhoto{} }, + func(n *Child, e *ChildPhoto) { n.Edges.Photos = append(n.Edges.Photos, e) }); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (cq *ChildQuery) loadGuardian(ctx context.Context, query *GuardianQuery, nodes []*Child, init func(*Child), assign func(*Child, *Guardian)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Child) + for i := range nodes { + if nodes[i].guardian_children == nil { + continue + } + fk := *nodes[i].guardian_children + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(guardian.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "guardian_children" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (cq *ChildQuery) loadChildBusAssociations(ctx context.Context, query *ChildBusAssociationQuery, nodes []*Child, init func(*Child), assign func(*Child, *ChildBusAssociation)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Child) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(childbusassociation.FieldChildID) + } + query.Where(predicate.ChildBusAssociation(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(child.ChildBusAssociationsColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.ChildID + node, ok := nodeids[fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "child_id" returned %v for node %v`, fk, n.ID) + } + assign(node, n) + } + return nil +} +func (cq *ChildQuery) loadNursery(ctx context.Context, query *NurseryQuery, nodes []*Child, init func(*Child), assign func(*Child, *Nursery)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Child) + for i := range nodes { + if nodes[i].child_nursery == nil { + continue + } + fk := *nodes[i].child_nursery + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(nursery.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "child_nursery" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (cq *ChildQuery) loadBoardingRecord(ctx context.Context, query *BoardingRecordQuery, nodes []*Child, init func(*Child), assign func(*Child, *BoardingRecord)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Child) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.BoardingRecord(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(child.BoardingRecordColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.child_boarding_record + if fk == nil { + return fmt.Errorf(`foreign-key "child_boarding_record" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "child_boarding_record" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} +func (cq *ChildQuery) loadPhotos(ctx context.Context, query *ChildPhotoQuery, nodes []*Child, init func(*Child), assign func(*Child, *ChildPhoto)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Child) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.ChildPhoto(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(child.PhotosColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.child_photos + if fk == nil { + return fmt.Errorf(`foreign-key "child_photos" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "child_photos" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} + +func (cq *ChildQuery) sqlCount(ctx context.Context) (int, error) { + _spec := cq.querySpec() + _spec.Node.Columns = cq.ctx.Fields + if len(cq.ctx.Fields) > 0 { + _spec.Unique = cq.ctx.Unique != nil && *cq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, cq.driver, _spec) +} + +func (cq *ChildQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(child.Table, child.Columns, sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID)) + _spec.From = cq.sql + if unique := cq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if cq.path != nil { + _spec.Unique = true + } + if fields := cq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, child.FieldID) + for i := range fields { + if fields[i] != child.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + } + if ps := cq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := cq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := cq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := cq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (cq *ChildQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(cq.driver.Dialect()) + t1 := builder.Table(child.Table) + columns := cq.ctx.Fields + if len(columns) == 0 { + columns = child.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if cq.sql != nil { + selector = cq.sql + selector.Select(selector.Columns(columns...)...) + } + if cq.ctx.Unique != nil && *cq.ctx.Unique { + selector.Distinct() + } + for _, p := range cq.predicates { + p(selector) + } + for _, p := range cq.order { + p(selector) + } + if offset := cq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := cq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// ChildGroupBy is the group-by builder for Child entities. +type ChildGroupBy struct { + selector + build *ChildQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (cgb *ChildGroupBy) Aggregate(fns ...AggregateFunc) *ChildGroupBy { + cgb.fns = append(cgb.fns, fns...) + return cgb +} + +// Scan applies the selector query and scans the result into the given value. +func (cgb *ChildGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, cgb.build.ctx, "GroupBy") + if err := cgb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*ChildQuery, *ChildGroupBy](ctx, cgb.build, cgb, cgb.build.inters, v) +} + +func (cgb *ChildGroupBy) sqlScan(ctx context.Context, root *ChildQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(cgb.fns)) + for _, fn := range cgb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*cgb.flds)+len(cgb.fns)) + for _, f := range *cgb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*cgb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := cgb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// ChildSelect is the builder for selecting fields of Child entities. +type ChildSelect struct { + *ChildQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (cs *ChildSelect) Aggregate(fns ...AggregateFunc) *ChildSelect { + cs.fns = append(cs.fns, fns...) + return cs +} + +// Scan applies the selector query and scans the result into the given value. +func (cs *ChildSelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, cs.ctx, "Select") + if err := cs.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*ChildQuery, *ChildSelect](ctx, cs.ChildQuery, cs, cs.inters, v) +} + +func (cs *ChildSelect) sqlScan(ctx context.Context, root *ChildQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(cs.fns)) + for _, fn := range cs.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*cs.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := cs.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/backend/domain/repository/ent/child_update.go b/backend/domain/repository/ent/child_update.go new file mode 100644 index 00000000..5d45863f --- /dev/null +++ b/backend/domain/repository/ent/child_update.go @@ -0,0 +1,1374 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ChildUpdate is the builder for updating Child entities. +type ChildUpdate struct { + config + hooks []Hook + mutation *ChildMutation +} + +// Where appends a list predicates to the ChildUpdate builder. +func (cu *ChildUpdate) Where(ps ...predicate.Child) *ChildUpdate { + cu.mutation.Where(ps...) + return cu +} + +// SetName sets the "name" field. +func (cu *ChildUpdate) SetName(s string) *ChildUpdate { + cu.mutation.SetName(s) + return cu +} + +// SetNillableName sets the "name" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableName(s *string) *ChildUpdate { + if s != nil { + cu.SetName(*s) + } + return cu +} + +// SetAge sets the "age" field. +func (cu *ChildUpdate) SetAge(i int) *ChildUpdate { + cu.mutation.ResetAge() + cu.mutation.SetAge(i) + return cu +} + +// SetNillableAge sets the "age" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableAge(i *int) *ChildUpdate { + if i != nil { + cu.SetAge(*i) + } + return cu +} + +// AddAge adds i to the "age" field. +func (cu *ChildUpdate) AddAge(i int) *ChildUpdate { + cu.mutation.AddAge(i) + return cu +} + +// SetSex sets the "sex" field. +func (cu *ChildUpdate) SetSex(c child.Sex) *ChildUpdate { + cu.mutation.SetSex(c) + return cu +} + +// SetNillableSex sets the "sex" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableSex(c *child.Sex) *ChildUpdate { + if c != nil { + cu.SetSex(*c) + } + return cu +} + +// SetIsRideMorningBus sets the "is_ride_morning_bus" field. +func (cu *ChildUpdate) SetIsRideMorningBus(b bool) *ChildUpdate { + cu.mutation.SetIsRideMorningBus(b) + return cu +} + +// SetNillableIsRideMorningBus sets the "is_ride_morning_bus" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableIsRideMorningBus(b *bool) *ChildUpdate { + if b != nil { + cu.SetIsRideMorningBus(*b) + } + return cu +} + +// SetIsRideAfternoonBus sets the "is_ride_afternoon_bus" field. +func (cu *ChildUpdate) SetIsRideAfternoonBus(b bool) *ChildUpdate { + cu.mutation.SetIsRideAfternoonBus(b) + return cu +} + +// SetNillableIsRideAfternoonBus sets the "is_ride_afternoon_bus" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableIsRideAfternoonBus(b *bool) *ChildUpdate { + if b != nil { + cu.SetIsRideAfternoonBus(*b) + } + return cu +} + +// SetCheckForMissingItems sets the "check_for_missing_items" field. +func (cu *ChildUpdate) SetCheckForMissingItems(b bool) *ChildUpdate { + cu.mutation.SetCheckForMissingItems(b) + return cu +} + +// SetNillableCheckForMissingItems sets the "check_for_missing_items" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableCheckForMissingItems(b *bool) *ChildUpdate { + if b != nil { + cu.SetCheckForMissingItems(*b) + } + return cu +} + +// SetHasBag sets the "has_bag" field. +func (cu *ChildUpdate) SetHasBag(b bool) *ChildUpdate { + cu.mutation.SetHasBag(b) + return cu +} + +// SetNillableHasBag sets the "has_bag" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableHasBag(b *bool) *ChildUpdate { + if b != nil { + cu.SetHasBag(*b) + } + return cu +} + +// SetHasLunchBox sets the "has_lunch_box" field. +func (cu *ChildUpdate) SetHasLunchBox(b bool) *ChildUpdate { + cu.mutation.SetHasLunchBox(b) + return cu +} + +// SetNillableHasLunchBox sets the "has_lunch_box" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableHasLunchBox(b *bool) *ChildUpdate { + if b != nil { + cu.SetHasLunchBox(*b) + } + return cu +} + +// SetHasWaterBottle sets the "has_water_bottle" field. +func (cu *ChildUpdate) SetHasWaterBottle(b bool) *ChildUpdate { + cu.mutation.SetHasWaterBottle(b) + return cu +} + +// SetNillableHasWaterBottle sets the "has_water_bottle" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableHasWaterBottle(b *bool) *ChildUpdate { + if b != nil { + cu.SetHasWaterBottle(*b) + } + return cu +} + +// SetHasUmbrella sets the "has_umbrella" field. +func (cu *ChildUpdate) SetHasUmbrella(b bool) *ChildUpdate { + cu.mutation.SetHasUmbrella(b) + return cu +} + +// SetNillableHasUmbrella sets the "has_umbrella" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableHasUmbrella(b *bool) *ChildUpdate { + if b != nil { + cu.SetHasUmbrella(*b) + } + return cu +} + +// SetHasOther sets the "has_other" field. +func (cu *ChildUpdate) SetHasOther(b bool) *ChildUpdate { + cu.mutation.SetHasOther(b) + return cu +} + +// SetNillableHasOther sets the "has_other" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableHasOther(b *bool) *ChildUpdate { + if b != nil { + cu.SetHasOther(*b) + } + return cu +} + +// SetCreatedAt sets the "created_at" field. +func (cu *ChildUpdate) SetCreatedAt(t time.Time) *ChildUpdate { + cu.mutation.SetCreatedAt(t) + return cu +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableCreatedAt(t *time.Time) *ChildUpdate { + if t != nil { + cu.SetCreatedAt(*t) + } + return cu +} + +// SetUpdatedAt sets the "updated_at" field. +func (cu *ChildUpdate) SetUpdatedAt(t time.Time) *ChildUpdate { + cu.mutation.SetUpdatedAt(t) + return cu +} + +// SetGuardianID sets the "guardian" edge to the Guardian entity by ID. +func (cu *ChildUpdate) SetGuardianID(id uuid.UUID) *ChildUpdate { + cu.mutation.SetGuardianID(id) + return cu +} + +// SetNillableGuardianID sets the "guardian" edge to the Guardian entity by ID if the given value is not nil. +func (cu *ChildUpdate) SetNillableGuardianID(id *uuid.UUID) *ChildUpdate { + if id != nil { + cu = cu.SetGuardianID(*id) + } + return cu +} + +// SetGuardian sets the "guardian" edge to the Guardian entity. +func (cu *ChildUpdate) SetGuardian(g *Guardian) *ChildUpdate { + return cu.SetGuardianID(g.ID) +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (cu *ChildUpdate) AddChildBusAssociationIDs(ids ...int) *ChildUpdate { + cu.mutation.AddChildBusAssociationIDs(ids...) + return cu +} + +// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. +func (cu *ChildUpdate) AddChildBusAssociations(c ...*ChildBusAssociation) *ChildUpdate { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return cu.AddChildBusAssociationIDs(ids...) +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. +func (cu *ChildUpdate) SetNurseryID(id uuid.UUID) *ChildUpdate { + cu.mutation.SetNurseryID(id) + return cu +} + +// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. +func (cu *ChildUpdate) SetNillableNurseryID(id *uuid.UUID) *ChildUpdate { + if id != nil { + cu = cu.SetNurseryID(*id) + } + return cu +} + +// SetNursery sets the "nursery" edge to the Nursery entity. +func (cu *ChildUpdate) SetNursery(n *Nursery) *ChildUpdate { + return cu.SetNurseryID(n.ID) +} + +// AddBoardingRecordIDs adds the "boarding_record" edge to the BoardingRecord entity by IDs. +func (cu *ChildUpdate) AddBoardingRecordIDs(ids ...uuid.UUID) *ChildUpdate { + cu.mutation.AddBoardingRecordIDs(ids...) + return cu +} + +// AddBoardingRecord adds the "boarding_record" edges to the BoardingRecord entity. +func (cu *ChildUpdate) AddBoardingRecord(b ...*BoardingRecord) *ChildUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return cu.AddBoardingRecordIDs(ids...) +} + +// AddPhotoIDs adds the "photos" edge to the ChildPhoto entity by IDs. +func (cu *ChildUpdate) AddPhotoIDs(ids ...uuid.UUID) *ChildUpdate { + cu.mutation.AddPhotoIDs(ids...) + return cu +} + +// AddPhotos adds the "photos" edges to the ChildPhoto entity. +func (cu *ChildUpdate) AddPhotos(c ...*ChildPhoto) *ChildUpdate { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return cu.AddPhotoIDs(ids...) +} + +// Mutation returns the ChildMutation object of the builder. +func (cu *ChildUpdate) Mutation() *ChildMutation { + return cu.mutation +} + +// ClearGuardian clears the "guardian" edge to the Guardian entity. +func (cu *ChildUpdate) ClearGuardian() *ChildUpdate { + cu.mutation.ClearGuardian() + return cu +} + +// ClearChildBusAssociations clears all "childBusAssociations" edges to the ChildBusAssociation entity. +func (cu *ChildUpdate) ClearChildBusAssociations() *ChildUpdate { + cu.mutation.ClearChildBusAssociations() + return cu +} + +// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to ChildBusAssociation entities by IDs. +func (cu *ChildUpdate) RemoveChildBusAssociationIDs(ids ...int) *ChildUpdate { + cu.mutation.RemoveChildBusAssociationIDs(ids...) + return cu +} + +// RemoveChildBusAssociations removes "childBusAssociations" edges to ChildBusAssociation entities. +func (cu *ChildUpdate) RemoveChildBusAssociations(c ...*ChildBusAssociation) *ChildUpdate { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return cu.RemoveChildBusAssociationIDs(ids...) +} + +// ClearNursery clears the "nursery" edge to the Nursery entity. +func (cu *ChildUpdate) ClearNursery() *ChildUpdate { + cu.mutation.ClearNursery() + return cu +} + +// ClearBoardingRecord clears all "boarding_record" edges to the BoardingRecord entity. +func (cu *ChildUpdate) ClearBoardingRecord() *ChildUpdate { + cu.mutation.ClearBoardingRecord() + return cu +} + +// RemoveBoardingRecordIDs removes the "boarding_record" edge to BoardingRecord entities by IDs. +func (cu *ChildUpdate) RemoveBoardingRecordIDs(ids ...uuid.UUID) *ChildUpdate { + cu.mutation.RemoveBoardingRecordIDs(ids...) + return cu +} + +// RemoveBoardingRecord removes "boarding_record" edges to BoardingRecord entities. +func (cu *ChildUpdate) RemoveBoardingRecord(b ...*BoardingRecord) *ChildUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return cu.RemoveBoardingRecordIDs(ids...) +} + +// ClearPhotos clears all "photos" edges to the ChildPhoto entity. +func (cu *ChildUpdate) ClearPhotos() *ChildUpdate { + cu.mutation.ClearPhotos() + return cu +} + +// RemovePhotoIDs removes the "photos" edge to ChildPhoto entities by IDs. +func (cu *ChildUpdate) RemovePhotoIDs(ids ...uuid.UUID) *ChildUpdate { + cu.mutation.RemovePhotoIDs(ids...) + return cu +} + +// RemovePhotos removes "photos" edges to ChildPhoto entities. +func (cu *ChildUpdate) RemovePhotos(c ...*ChildPhoto) *ChildUpdate { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return cu.RemovePhotoIDs(ids...) +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (cu *ChildUpdate) Save(ctx context.Context) (int, error) { + cu.defaults() + return withHooks(ctx, cu.sqlSave, cu.mutation, cu.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (cu *ChildUpdate) SaveX(ctx context.Context) int { + affected, err := cu.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (cu *ChildUpdate) Exec(ctx context.Context) error { + _, err := cu.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cu *ChildUpdate) ExecX(ctx context.Context) { + if err := cu.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (cu *ChildUpdate) defaults() { + if _, ok := cu.mutation.UpdatedAt(); !ok { + v := child.UpdateDefaultUpdatedAt() + cu.mutation.SetUpdatedAt(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (cu *ChildUpdate) check() error { + if v, ok := cu.mutation.Sex(); ok { + if err := child.SexValidator(v); err != nil { + return &ValidationError{Name: "sex", err: fmt.Errorf(`ent: validator failed for field "Child.sex": %w`, err)} + } + } + return nil +} + +func (cu *ChildUpdate) sqlSave(ctx context.Context) (n int, err error) { + if err := cu.check(); err != nil { + return n, err + } + _spec := sqlgraph.NewUpdateSpec(child.Table, child.Columns, sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID)) + if ps := cu.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := cu.mutation.Name(); ok { + _spec.SetField(child.FieldName, field.TypeString, value) + } + if value, ok := cu.mutation.Age(); ok { + _spec.SetField(child.FieldAge, field.TypeInt, value) + } + if value, ok := cu.mutation.AddedAge(); ok { + _spec.AddField(child.FieldAge, field.TypeInt, value) + } + if value, ok := cu.mutation.Sex(); ok { + _spec.SetField(child.FieldSex, field.TypeEnum, value) + } + if value, ok := cu.mutation.IsRideMorningBus(); ok { + _spec.SetField(child.FieldIsRideMorningBus, field.TypeBool, value) + } + if value, ok := cu.mutation.IsRideAfternoonBus(); ok { + _spec.SetField(child.FieldIsRideAfternoonBus, field.TypeBool, value) + } + if value, ok := cu.mutation.CheckForMissingItems(); ok { + _spec.SetField(child.FieldCheckForMissingItems, field.TypeBool, value) + } + if value, ok := cu.mutation.HasBag(); ok { + _spec.SetField(child.FieldHasBag, field.TypeBool, value) + } + if value, ok := cu.mutation.HasLunchBox(); ok { + _spec.SetField(child.FieldHasLunchBox, field.TypeBool, value) + } + if value, ok := cu.mutation.HasWaterBottle(); ok { + _spec.SetField(child.FieldHasWaterBottle, field.TypeBool, value) + } + if value, ok := cu.mutation.HasUmbrella(); ok { + _spec.SetField(child.FieldHasUmbrella, field.TypeBool, value) + } + if value, ok := cu.mutation.HasOther(); ok { + _spec.SetField(child.FieldHasOther, field.TypeBool, value) + } + if value, ok := cu.mutation.CreatedAt(); ok { + _spec.SetField(child.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := cu.mutation.UpdatedAt(); ok { + _spec.SetField(child.FieldUpdatedAt, field.TypeTime, value) + } + if cu.mutation.GuardianCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: child.GuardianTable, + Columns: []string{child.GuardianColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cu.mutation.GuardianIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: child.GuardianTable, + Columns: []string{child.GuardianColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if cu.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.ChildBusAssociationsTable, + Columns: []string{child.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cu.mutation.RemovedChildBusAssociationsIDs(); len(nodes) > 0 && !cu.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.ChildBusAssociationsTable, + Columns: []string{child.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cu.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.ChildBusAssociationsTable, + Columns: []string{child.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if cu.mutation.NurseryCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: child.NurseryTable, + Columns: []string{child.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cu.mutation.NurseryIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: child.NurseryTable, + Columns: []string{child.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if cu.mutation.BoardingRecordCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.BoardingRecordTable, + Columns: []string{child.BoardingRecordColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cu.mutation.RemovedBoardingRecordIDs(); len(nodes) > 0 && !cu.mutation.BoardingRecordCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.BoardingRecordTable, + Columns: []string{child.BoardingRecordColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cu.mutation.BoardingRecordIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.BoardingRecordTable, + Columns: []string{child.BoardingRecordColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if cu.mutation.PhotosCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.PhotosTable, + Columns: []string{child.PhotosColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cu.mutation.RemovedPhotosIDs(); len(nodes) > 0 && !cu.mutation.PhotosCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.PhotosTable, + Columns: []string{child.PhotosColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cu.mutation.PhotosIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.PhotosTable, + Columns: []string{child.PhotosColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if n, err = sqlgraph.UpdateNodes(ctx, cu.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{child.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + cu.mutation.done = true + return n, nil +} + +// ChildUpdateOne is the builder for updating a single Child entity. +type ChildUpdateOne struct { + config + fields []string + hooks []Hook + mutation *ChildMutation +} + +// SetName sets the "name" field. +func (cuo *ChildUpdateOne) SetName(s string) *ChildUpdateOne { + cuo.mutation.SetName(s) + return cuo +} + +// SetNillableName sets the "name" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableName(s *string) *ChildUpdateOne { + if s != nil { + cuo.SetName(*s) + } + return cuo +} + +// SetAge sets the "age" field. +func (cuo *ChildUpdateOne) SetAge(i int) *ChildUpdateOne { + cuo.mutation.ResetAge() + cuo.mutation.SetAge(i) + return cuo +} + +// SetNillableAge sets the "age" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableAge(i *int) *ChildUpdateOne { + if i != nil { + cuo.SetAge(*i) + } + return cuo +} + +// AddAge adds i to the "age" field. +func (cuo *ChildUpdateOne) AddAge(i int) *ChildUpdateOne { + cuo.mutation.AddAge(i) + return cuo +} + +// SetSex sets the "sex" field. +func (cuo *ChildUpdateOne) SetSex(c child.Sex) *ChildUpdateOne { + cuo.mutation.SetSex(c) + return cuo +} + +// SetNillableSex sets the "sex" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableSex(c *child.Sex) *ChildUpdateOne { + if c != nil { + cuo.SetSex(*c) + } + return cuo +} + +// SetIsRideMorningBus sets the "is_ride_morning_bus" field. +func (cuo *ChildUpdateOne) SetIsRideMorningBus(b bool) *ChildUpdateOne { + cuo.mutation.SetIsRideMorningBus(b) + return cuo +} + +// SetNillableIsRideMorningBus sets the "is_ride_morning_bus" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableIsRideMorningBus(b *bool) *ChildUpdateOne { + if b != nil { + cuo.SetIsRideMorningBus(*b) + } + return cuo +} + +// SetIsRideAfternoonBus sets the "is_ride_afternoon_bus" field. +func (cuo *ChildUpdateOne) SetIsRideAfternoonBus(b bool) *ChildUpdateOne { + cuo.mutation.SetIsRideAfternoonBus(b) + return cuo +} + +// SetNillableIsRideAfternoonBus sets the "is_ride_afternoon_bus" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableIsRideAfternoonBus(b *bool) *ChildUpdateOne { + if b != nil { + cuo.SetIsRideAfternoonBus(*b) + } + return cuo +} + +// SetCheckForMissingItems sets the "check_for_missing_items" field. +func (cuo *ChildUpdateOne) SetCheckForMissingItems(b bool) *ChildUpdateOne { + cuo.mutation.SetCheckForMissingItems(b) + return cuo +} + +// SetNillableCheckForMissingItems sets the "check_for_missing_items" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableCheckForMissingItems(b *bool) *ChildUpdateOne { + if b != nil { + cuo.SetCheckForMissingItems(*b) + } + return cuo +} + +// SetHasBag sets the "has_bag" field. +func (cuo *ChildUpdateOne) SetHasBag(b bool) *ChildUpdateOne { + cuo.mutation.SetHasBag(b) + return cuo +} + +// SetNillableHasBag sets the "has_bag" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableHasBag(b *bool) *ChildUpdateOne { + if b != nil { + cuo.SetHasBag(*b) + } + return cuo +} + +// SetHasLunchBox sets the "has_lunch_box" field. +func (cuo *ChildUpdateOne) SetHasLunchBox(b bool) *ChildUpdateOne { + cuo.mutation.SetHasLunchBox(b) + return cuo +} + +// SetNillableHasLunchBox sets the "has_lunch_box" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableHasLunchBox(b *bool) *ChildUpdateOne { + if b != nil { + cuo.SetHasLunchBox(*b) + } + return cuo +} + +// SetHasWaterBottle sets the "has_water_bottle" field. +func (cuo *ChildUpdateOne) SetHasWaterBottle(b bool) *ChildUpdateOne { + cuo.mutation.SetHasWaterBottle(b) + return cuo +} + +// SetNillableHasWaterBottle sets the "has_water_bottle" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableHasWaterBottle(b *bool) *ChildUpdateOne { + if b != nil { + cuo.SetHasWaterBottle(*b) + } + return cuo +} + +// SetHasUmbrella sets the "has_umbrella" field. +func (cuo *ChildUpdateOne) SetHasUmbrella(b bool) *ChildUpdateOne { + cuo.mutation.SetHasUmbrella(b) + return cuo +} + +// SetNillableHasUmbrella sets the "has_umbrella" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableHasUmbrella(b *bool) *ChildUpdateOne { + if b != nil { + cuo.SetHasUmbrella(*b) + } + return cuo +} + +// SetHasOther sets the "has_other" field. +func (cuo *ChildUpdateOne) SetHasOther(b bool) *ChildUpdateOne { + cuo.mutation.SetHasOther(b) + return cuo +} + +// SetNillableHasOther sets the "has_other" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableHasOther(b *bool) *ChildUpdateOne { + if b != nil { + cuo.SetHasOther(*b) + } + return cuo +} + +// SetCreatedAt sets the "created_at" field. +func (cuo *ChildUpdateOne) SetCreatedAt(t time.Time) *ChildUpdateOne { + cuo.mutation.SetCreatedAt(t) + return cuo +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableCreatedAt(t *time.Time) *ChildUpdateOne { + if t != nil { + cuo.SetCreatedAt(*t) + } + return cuo +} + +// SetUpdatedAt sets the "updated_at" field. +func (cuo *ChildUpdateOne) SetUpdatedAt(t time.Time) *ChildUpdateOne { + cuo.mutation.SetUpdatedAt(t) + return cuo +} + +// SetGuardianID sets the "guardian" edge to the Guardian entity by ID. +func (cuo *ChildUpdateOne) SetGuardianID(id uuid.UUID) *ChildUpdateOne { + cuo.mutation.SetGuardianID(id) + return cuo +} + +// SetNillableGuardianID sets the "guardian" edge to the Guardian entity by ID if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableGuardianID(id *uuid.UUID) *ChildUpdateOne { + if id != nil { + cuo = cuo.SetGuardianID(*id) + } + return cuo +} + +// SetGuardian sets the "guardian" edge to the Guardian entity. +func (cuo *ChildUpdateOne) SetGuardian(g *Guardian) *ChildUpdateOne { + return cuo.SetGuardianID(g.ID) +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (cuo *ChildUpdateOne) AddChildBusAssociationIDs(ids ...int) *ChildUpdateOne { + cuo.mutation.AddChildBusAssociationIDs(ids...) + return cuo +} + +// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. +func (cuo *ChildUpdateOne) AddChildBusAssociations(c ...*ChildBusAssociation) *ChildUpdateOne { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return cuo.AddChildBusAssociationIDs(ids...) +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. +func (cuo *ChildUpdateOne) SetNurseryID(id uuid.UUID) *ChildUpdateOne { + cuo.mutation.SetNurseryID(id) + return cuo +} + +// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableNurseryID(id *uuid.UUID) *ChildUpdateOne { + if id != nil { + cuo = cuo.SetNurseryID(*id) + } + return cuo +} + +// SetNursery sets the "nursery" edge to the Nursery entity. +func (cuo *ChildUpdateOne) SetNursery(n *Nursery) *ChildUpdateOne { + return cuo.SetNurseryID(n.ID) +} + +// AddBoardingRecordIDs adds the "boarding_record" edge to the BoardingRecord entity by IDs. +func (cuo *ChildUpdateOne) AddBoardingRecordIDs(ids ...uuid.UUID) *ChildUpdateOne { + cuo.mutation.AddBoardingRecordIDs(ids...) + return cuo +} + +// AddBoardingRecord adds the "boarding_record" edges to the BoardingRecord entity. +func (cuo *ChildUpdateOne) AddBoardingRecord(b ...*BoardingRecord) *ChildUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return cuo.AddBoardingRecordIDs(ids...) +} + +// AddPhotoIDs adds the "photos" edge to the ChildPhoto entity by IDs. +func (cuo *ChildUpdateOne) AddPhotoIDs(ids ...uuid.UUID) *ChildUpdateOne { + cuo.mutation.AddPhotoIDs(ids...) + return cuo +} + +// AddPhotos adds the "photos" edges to the ChildPhoto entity. +func (cuo *ChildUpdateOne) AddPhotos(c ...*ChildPhoto) *ChildUpdateOne { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return cuo.AddPhotoIDs(ids...) +} + +// Mutation returns the ChildMutation object of the builder. +func (cuo *ChildUpdateOne) Mutation() *ChildMutation { + return cuo.mutation +} + +// ClearGuardian clears the "guardian" edge to the Guardian entity. +func (cuo *ChildUpdateOne) ClearGuardian() *ChildUpdateOne { + cuo.mutation.ClearGuardian() + return cuo +} + +// ClearChildBusAssociations clears all "childBusAssociations" edges to the ChildBusAssociation entity. +func (cuo *ChildUpdateOne) ClearChildBusAssociations() *ChildUpdateOne { + cuo.mutation.ClearChildBusAssociations() + return cuo +} + +// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to ChildBusAssociation entities by IDs. +func (cuo *ChildUpdateOne) RemoveChildBusAssociationIDs(ids ...int) *ChildUpdateOne { + cuo.mutation.RemoveChildBusAssociationIDs(ids...) + return cuo +} + +// RemoveChildBusAssociations removes "childBusAssociations" edges to ChildBusAssociation entities. +func (cuo *ChildUpdateOne) RemoveChildBusAssociations(c ...*ChildBusAssociation) *ChildUpdateOne { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return cuo.RemoveChildBusAssociationIDs(ids...) +} + +// ClearNursery clears the "nursery" edge to the Nursery entity. +func (cuo *ChildUpdateOne) ClearNursery() *ChildUpdateOne { + cuo.mutation.ClearNursery() + return cuo +} + +// ClearBoardingRecord clears all "boarding_record" edges to the BoardingRecord entity. +func (cuo *ChildUpdateOne) ClearBoardingRecord() *ChildUpdateOne { + cuo.mutation.ClearBoardingRecord() + return cuo +} + +// RemoveBoardingRecordIDs removes the "boarding_record" edge to BoardingRecord entities by IDs. +func (cuo *ChildUpdateOne) RemoveBoardingRecordIDs(ids ...uuid.UUID) *ChildUpdateOne { + cuo.mutation.RemoveBoardingRecordIDs(ids...) + return cuo +} + +// RemoveBoardingRecord removes "boarding_record" edges to BoardingRecord entities. +func (cuo *ChildUpdateOne) RemoveBoardingRecord(b ...*BoardingRecord) *ChildUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return cuo.RemoveBoardingRecordIDs(ids...) +} + +// ClearPhotos clears all "photos" edges to the ChildPhoto entity. +func (cuo *ChildUpdateOne) ClearPhotos() *ChildUpdateOne { + cuo.mutation.ClearPhotos() + return cuo +} + +// RemovePhotoIDs removes the "photos" edge to ChildPhoto entities by IDs. +func (cuo *ChildUpdateOne) RemovePhotoIDs(ids ...uuid.UUID) *ChildUpdateOne { + cuo.mutation.RemovePhotoIDs(ids...) + return cuo +} + +// RemovePhotos removes "photos" edges to ChildPhoto entities. +func (cuo *ChildUpdateOne) RemovePhotos(c ...*ChildPhoto) *ChildUpdateOne { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return cuo.RemovePhotoIDs(ids...) +} + +// Where appends a list predicates to the ChildUpdate builder. +func (cuo *ChildUpdateOne) Where(ps ...predicate.Child) *ChildUpdateOne { + cuo.mutation.Where(ps...) + return cuo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (cuo *ChildUpdateOne) Select(field string, fields ...string) *ChildUpdateOne { + cuo.fields = append([]string{field}, fields...) + return cuo +} + +// Save executes the query and returns the updated Child entity. +func (cuo *ChildUpdateOne) Save(ctx context.Context) (*Child, error) { + cuo.defaults() + return withHooks(ctx, cuo.sqlSave, cuo.mutation, cuo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (cuo *ChildUpdateOne) SaveX(ctx context.Context) *Child { + node, err := cuo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (cuo *ChildUpdateOne) Exec(ctx context.Context) error { + _, err := cuo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cuo *ChildUpdateOne) ExecX(ctx context.Context) { + if err := cuo.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (cuo *ChildUpdateOne) defaults() { + if _, ok := cuo.mutation.UpdatedAt(); !ok { + v := child.UpdateDefaultUpdatedAt() + cuo.mutation.SetUpdatedAt(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (cuo *ChildUpdateOne) check() error { + if v, ok := cuo.mutation.Sex(); ok { + if err := child.SexValidator(v); err != nil { + return &ValidationError{Name: "sex", err: fmt.Errorf(`ent: validator failed for field "Child.sex": %w`, err)} + } + } + return nil +} + +func (cuo *ChildUpdateOne) sqlSave(ctx context.Context) (_node *Child, err error) { + if err := cuo.check(); err != nil { + return _node, err + } + _spec := sqlgraph.NewUpdateSpec(child.Table, child.Columns, sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID)) + id, ok := cuo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Child.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := cuo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, child.FieldID) + for _, f := range fields { + if !child.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != child.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := cuo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := cuo.mutation.Name(); ok { + _spec.SetField(child.FieldName, field.TypeString, value) + } + if value, ok := cuo.mutation.Age(); ok { + _spec.SetField(child.FieldAge, field.TypeInt, value) + } + if value, ok := cuo.mutation.AddedAge(); ok { + _spec.AddField(child.FieldAge, field.TypeInt, value) + } + if value, ok := cuo.mutation.Sex(); ok { + _spec.SetField(child.FieldSex, field.TypeEnum, value) + } + if value, ok := cuo.mutation.IsRideMorningBus(); ok { + _spec.SetField(child.FieldIsRideMorningBus, field.TypeBool, value) + } + if value, ok := cuo.mutation.IsRideAfternoonBus(); ok { + _spec.SetField(child.FieldIsRideAfternoonBus, field.TypeBool, value) + } + if value, ok := cuo.mutation.CheckForMissingItems(); ok { + _spec.SetField(child.FieldCheckForMissingItems, field.TypeBool, value) + } + if value, ok := cuo.mutation.HasBag(); ok { + _spec.SetField(child.FieldHasBag, field.TypeBool, value) + } + if value, ok := cuo.mutation.HasLunchBox(); ok { + _spec.SetField(child.FieldHasLunchBox, field.TypeBool, value) + } + if value, ok := cuo.mutation.HasWaterBottle(); ok { + _spec.SetField(child.FieldHasWaterBottle, field.TypeBool, value) + } + if value, ok := cuo.mutation.HasUmbrella(); ok { + _spec.SetField(child.FieldHasUmbrella, field.TypeBool, value) + } + if value, ok := cuo.mutation.HasOther(); ok { + _spec.SetField(child.FieldHasOther, field.TypeBool, value) + } + if value, ok := cuo.mutation.CreatedAt(); ok { + _spec.SetField(child.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := cuo.mutation.UpdatedAt(); ok { + _spec.SetField(child.FieldUpdatedAt, field.TypeTime, value) + } + if cuo.mutation.GuardianCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: child.GuardianTable, + Columns: []string{child.GuardianColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cuo.mutation.GuardianIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: child.GuardianTable, + Columns: []string{child.GuardianColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if cuo.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.ChildBusAssociationsTable, + Columns: []string{child.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cuo.mutation.RemovedChildBusAssociationsIDs(); len(nodes) > 0 && !cuo.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.ChildBusAssociationsTable, + Columns: []string{child.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cuo.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.ChildBusAssociationsTable, + Columns: []string{child.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if cuo.mutation.NurseryCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: child.NurseryTable, + Columns: []string{child.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cuo.mutation.NurseryIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: child.NurseryTable, + Columns: []string{child.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if cuo.mutation.BoardingRecordCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.BoardingRecordTable, + Columns: []string{child.BoardingRecordColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cuo.mutation.RemovedBoardingRecordIDs(); len(nodes) > 0 && !cuo.mutation.BoardingRecordCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.BoardingRecordTable, + Columns: []string{child.BoardingRecordColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cuo.mutation.BoardingRecordIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.BoardingRecordTable, + Columns: []string{child.BoardingRecordColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(boardingrecord.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if cuo.mutation.PhotosCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.PhotosTable, + Columns: []string{child.PhotosColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cuo.mutation.RemovedPhotosIDs(); len(nodes) > 0 && !cuo.mutation.PhotosCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.PhotosTable, + Columns: []string{child.PhotosColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cuo.mutation.PhotosIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: child.PhotosTable, + Columns: []string{child.PhotosColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + _node = &Child{config: cuo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, cuo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{child.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + cuo.mutation.done = true + return _node, nil +} diff --git a/backend/domain/repository/ent/childbusassociation.go b/backend/domain/repository/ent/childbusassociation.go new file mode 100644 index 00000000..c09b1b36 --- /dev/null +++ b/backend/domain/repository/ent/childbusassociation.go @@ -0,0 +1,180 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "strings" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/google/uuid" +) + +// ChildBusAssociation is the model entity for the ChildBusAssociation schema. +type ChildBusAssociation struct { + config `json:"-"` + // ID of the ent. + ID int `json:"id,omitempty"` + // ChildID holds the value of the "child_id" field. + ChildID uuid.UUID `json:"child_id,omitempty"` + // BusID holds the value of the "bus_id" field. + BusID uuid.UUID `json:"bus_id,omitempty"` + // 朝のバスか放課後のバスかを示す + BusType childbusassociation.BusType `json:"bus_type,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the ChildBusAssociationQuery when eager-loading is set. + Edges ChildBusAssociationEdges `json:"edges"` + selectValues sql.SelectValues +} + +// ChildBusAssociationEdges holds the relations/edges for other nodes in the graph. +type ChildBusAssociationEdges struct { + // Child holds the value of the child edge. + Child *Child `json:"child,omitempty"` + // Bus holds the value of the bus edge. + Bus *Bus `json:"bus,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [2]bool +} + +// ChildOrErr returns the Child value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e ChildBusAssociationEdges) ChildOrErr() (*Child, error) { + if e.loadedTypes[0] { + if e.Child == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: child.Label} + } + return e.Child, nil + } + return nil, &NotLoadedError{edge: "child"} +} + +// BusOrErr returns the Bus value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e ChildBusAssociationEdges) BusOrErr() (*Bus, error) { + if e.loadedTypes[1] { + if e.Bus == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: bus.Label} + } + return e.Bus, nil + } + return nil, &NotLoadedError{edge: "bus"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*ChildBusAssociation) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case childbusassociation.FieldID: + values[i] = new(sql.NullInt64) + case childbusassociation.FieldBusType: + values[i] = new(sql.NullString) + case childbusassociation.FieldChildID, childbusassociation.FieldBusID: + values[i] = new(uuid.UUID) + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the ChildBusAssociation fields. +func (cba *ChildBusAssociation) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case childbusassociation.FieldID: + value, ok := values[i].(*sql.NullInt64) + if !ok { + return fmt.Errorf("unexpected type %T for field id", value) + } + cba.ID = int(value.Int64) + case childbusassociation.FieldChildID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field child_id", values[i]) + } else if value != nil { + cba.ChildID = *value + } + case childbusassociation.FieldBusID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field bus_id", values[i]) + } else if value != nil { + cba.BusID = *value + } + case childbusassociation.FieldBusType: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field bus_type", values[i]) + } else if value.Valid { + cba.BusType = childbusassociation.BusType(value.String) + } + default: + cba.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the ChildBusAssociation. +// This includes values selected through modifiers, order, etc. +func (cba *ChildBusAssociation) Value(name string) (ent.Value, error) { + return cba.selectValues.Get(name) +} + +// QueryChild queries the "child" edge of the ChildBusAssociation entity. +func (cba *ChildBusAssociation) QueryChild() *ChildQuery { + return NewChildBusAssociationClient(cba.config).QueryChild(cba) +} + +// QueryBus queries the "bus" edge of the ChildBusAssociation entity. +func (cba *ChildBusAssociation) QueryBus() *BusQuery { + return NewChildBusAssociationClient(cba.config).QueryBus(cba) +} + +// Update returns a builder for updating this ChildBusAssociation. +// Note that you need to call ChildBusAssociation.Unwrap() before calling this method if this ChildBusAssociation +// was returned from a transaction, and the transaction was committed or rolled back. +func (cba *ChildBusAssociation) Update() *ChildBusAssociationUpdateOne { + return NewChildBusAssociationClient(cba.config).UpdateOne(cba) +} + +// Unwrap unwraps the ChildBusAssociation entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (cba *ChildBusAssociation) Unwrap() *ChildBusAssociation { + _tx, ok := cba.config.driver.(*txDriver) + if !ok { + panic("ent: ChildBusAssociation is not a transactional entity") + } + cba.config.driver = _tx.drv + return cba +} + +// String implements the fmt.Stringer. +func (cba *ChildBusAssociation) String() string { + var builder strings.Builder + builder.WriteString("ChildBusAssociation(") + builder.WriteString(fmt.Sprintf("id=%v, ", cba.ID)) + builder.WriteString("child_id=") + builder.WriteString(fmt.Sprintf("%v", cba.ChildID)) + builder.WriteString(", ") + builder.WriteString("bus_id=") + builder.WriteString(fmt.Sprintf("%v", cba.BusID)) + builder.WriteString(", ") + builder.WriteString("bus_type=") + builder.WriteString(fmt.Sprintf("%v", cba.BusType)) + builder.WriteByte(')') + return builder.String() +} + +// ChildBusAssociations is a parsable slice of ChildBusAssociation. +type ChildBusAssociations []*ChildBusAssociation diff --git a/backend/domain/repository/ent/childbusassociation/childbusassociation.go b/backend/domain/repository/ent/childbusassociation/childbusassociation.go new file mode 100644 index 00000000..73ce2324 --- /dev/null +++ b/backend/domain/repository/ent/childbusassociation/childbusassociation.go @@ -0,0 +1,135 @@ +// Code generated by ent, DO NOT EDIT. + +package childbusassociation + +import ( + "fmt" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" +) + +const ( + // Label holds the string label denoting the childbusassociation type in the database. + Label = "child_bus_association" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldChildID holds the string denoting the child_id field in the database. + FieldChildID = "child_id" + // FieldBusID holds the string denoting the bus_id field in the database. + FieldBusID = "bus_id" + // FieldBusType holds the string denoting the bus_type field in the database. + FieldBusType = "bus_type" + // EdgeChild holds the string denoting the child edge name in mutations. + EdgeChild = "child" + // EdgeBus holds the string denoting the bus edge name in mutations. + EdgeBus = "bus" + // Table holds the table name of the childbusassociation in the database. + Table = "child_bus_associations" + // ChildTable is the table that holds the child relation/edge. + ChildTable = "child_bus_associations" + // ChildInverseTable is the table name for the Child entity. + // It exists in this package in order to avoid circular dependency with the "child" package. + ChildInverseTable = "childs" + // ChildColumn is the table column denoting the child relation/edge. + ChildColumn = "child_id" + // BusTable is the table that holds the bus relation/edge. + BusTable = "child_bus_associations" + // BusInverseTable is the table name for the Bus entity. + // It exists in this package in order to avoid circular dependency with the "bus" package. + BusInverseTable = "bus" + // BusColumn is the table column denoting the bus relation/edge. + BusColumn = "bus_id" +) + +// Columns holds all SQL columns for childbusassociation fields. +var Columns = []string{ + FieldID, + FieldChildID, + FieldBusID, + FieldBusType, +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + return false +} + +// BusType defines the type for the "bus_type" enum field. +type BusType string + +// BusType values. +const ( + BusTypeMorning BusType = "morning" + BusTypeEvening BusType = "evening" +) + +func (bt BusType) String() string { + return string(bt) +} + +// BusTypeValidator is a validator for the "bus_type" field enum values. It is called by the builders before save. +func BusTypeValidator(bt BusType) error { + switch bt { + case BusTypeMorning, BusTypeEvening: + return nil + default: + return fmt.Errorf("childbusassociation: invalid enum value for bus_type field: %q", bt) + } +} + +// OrderOption defines the ordering options for the ChildBusAssociation queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByChildID orders the results by the child_id field. +func ByChildID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldChildID, opts...).ToFunc() +} + +// ByBusID orders the results by the bus_id field. +func ByBusID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldBusID, opts...).ToFunc() +} + +// ByBusType orders the results by the bus_type field. +func ByBusType(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldBusType, opts...).ToFunc() +} + +// ByChildField orders the results by child field. +func ByChildField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newChildStep(), sql.OrderByField(field, opts...)) + } +} + +// ByBusField orders the results by bus field. +func ByBusField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newBusStep(), sql.OrderByField(field, opts...)) + } +} +func newChildStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(ChildInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, ChildTable, ChildColumn), + ) +} +func newBusStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(BusInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, BusTable, BusColumn), + ) +} diff --git a/backend/domain/repository/ent/childbusassociation/where.go b/backend/domain/repository/ent/childbusassociation/where.go new file mode 100644 index 00000000..5f755d08 --- /dev/null +++ b/backend/domain/repository/ent/childbusassociation/where.go @@ -0,0 +1,186 @@ +// Code generated by ent, DO NOT EDIT. + +package childbusassociation + +import ( + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ID filters vertices based on their ID field. +func ID(id int) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id int) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id int) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...int) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...int) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id int) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id int) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id int) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id int) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldLTE(FieldID, id)) +} + +// ChildID applies equality check predicate on the "child_id" field. It's identical to ChildIDEQ. +func ChildID(v uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldEQ(FieldChildID, v)) +} + +// BusID applies equality check predicate on the "bus_id" field. It's identical to BusIDEQ. +func BusID(v uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldEQ(FieldBusID, v)) +} + +// ChildIDEQ applies the EQ predicate on the "child_id" field. +func ChildIDEQ(v uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldEQ(FieldChildID, v)) +} + +// ChildIDNEQ applies the NEQ predicate on the "child_id" field. +func ChildIDNEQ(v uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldNEQ(FieldChildID, v)) +} + +// ChildIDIn applies the In predicate on the "child_id" field. +func ChildIDIn(vs ...uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldIn(FieldChildID, vs...)) +} + +// ChildIDNotIn applies the NotIn predicate on the "child_id" field. +func ChildIDNotIn(vs ...uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldNotIn(FieldChildID, vs...)) +} + +// BusIDEQ applies the EQ predicate on the "bus_id" field. +func BusIDEQ(v uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldEQ(FieldBusID, v)) +} + +// BusIDNEQ applies the NEQ predicate on the "bus_id" field. +func BusIDNEQ(v uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldNEQ(FieldBusID, v)) +} + +// BusIDIn applies the In predicate on the "bus_id" field. +func BusIDIn(vs ...uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldIn(FieldBusID, vs...)) +} + +// BusIDNotIn applies the NotIn predicate on the "bus_id" field. +func BusIDNotIn(vs ...uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldNotIn(FieldBusID, vs...)) +} + +// BusTypeEQ applies the EQ predicate on the "bus_type" field. +func BusTypeEQ(v BusType) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldEQ(FieldBusType, v)) +} + +// BusTypeNEQ applies the NEQ predicate on the "bus_type" field. +func BusTypeNEQ(v BusType) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldNEQ(FieldBusType, v)) +} + +// BusTypeIn applies the In predicate on the "bus_type" field. +func BusTypeIn(vs ...BusType) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldIn(FieldBusType, vs...)) +} + +// BusTypeNotIn applies the NotIn predicate on the "bus_type" field. +func BusTypeNotIn(vs ...BusType) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldNotIn(FieldBusType, vs...)) +} + +// HasChild applies the HasEdge predicate on the "child" edge. +func HasChild() predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, ChildTable, ChildColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasChildWith applies the HasEdge predicate on the "child" edge with a given conditions (other predicates). +func HasChildWith(preds ...predicate.Child) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(func(s *sql.Selector) { + step := newChildStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasBus applies the HasEdge predicate on the "bus" edge. +func HasBus() predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, BusTable, BusColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasBusWith applies the HasEdge predicate on the "bus" edge with a given conditions (other predicates). +func HasBusWith(preds ...predicate.Bus) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(func(s *sql.Selector) { + step := newBusStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.ChildBusAssociation) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.ChildBusAssociation) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.ChildBusAssociation) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.NotPredicates(p)) +} diff --git a/backend/domain/repository/ent/childbusassociation_create.go b/backend/domain/repository/ent/childbusassociation_create.go new file mode 100644 index 00000000..36fe9b4f --- /dev/null +++ b/backend/domain/repository/ent/childbusassociation_create.go @@ -0,0 +1,259 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/google/uuid" +) + +// ChildBusAssociationCreate is the builder for creating a ChildBusAssociation entity. +type ChildBusAssociationCreate struct { + config + mutation *ChildBusAssociationMutation + hooks []Hook +} + +// SetChildID sets the "child_id" field. +func (cbac *ChildBusAssociationCreate) SetChildID(u uuid.UUID) *ChildBusAssociationCreate { + cbac.mutation.SetChildID(u) + return cbac +} + +// SetBusID sets the "bus_id" field. +func (cbac *ChildBusAssociationCreate) SetBusID(u uuid.UUID) *ChildBusAssociationCreate { + cbac.mutation.SetBusID(u) + return cbac +} + +// SetBusType sets the "bus_type" field. +func (cbac *ChildBusAssociationCreate) SetBusType(ct childbusassociation.BusType) *ChildBusAssociationCreate { + cbac.mutation.SetBusType(ct) + return cbac +} + +// SetChild sets the "child" edge to the Child entity. +func (cbac *ChildBusAssociationCreate) SetChild(c *Child) *ChildBusAssociationCreate { + return cbac.SetChildID(c.ID) +} + +// SetBus sets the "bus" edge to the Bus entity. +func (cbac *ChildBusAssociationCreate) SetBus(b *Bus) *ChildBusAssociationCreate { + return cbac.SetBusID(b.ID) +} + +// Mutation returns the ChildBusAssociationMutation object of the builder. +func (cbac *ChildBusAssociationCreate) Mutation() *ChildBusAssociationMutation { + return cbac.mutation +} + +// Save creates the ChildBusAssociation in the database. +func (cbac *ChildBusAssociationCreate) Save(ctx context.Context) (*ChildBusAssociation, error) { + return withHooks(ctx, cbac.sqlSave, cbac.mutation, cbac.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (cbac *ChildBusAssociationCreate) SaveX(ctx context.Context) *ChildBusAssociation { + v, err := cbac.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (cbac *ChildBusAssociationCreate) Exec(ctx context.Context) error { + _, err := cbac.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cbac *ChildBusAssociationCreate) ExecX(ctx context.Context) { + if err := cbac.Exec(ctx); err != nil { + panic(err) + } +} + +// check runs all checks and user-defined validators on the builder. +func (cbac *ChildBusAssociationCreate) check() error { + if _, ok := cbac.mutation.ChildID(); !ok { + return &ValidationError{Name: "child_id", err: errors.New(`ent: missing required field "ChildBusAssociation.child_id"`)} + } + if _, ok := cbac.mutation.BusID(); !ok { + return &ValidationError{Name: "bus_id", err: errors.New(`ent: missing required field "ChildBusAssociation.bus_id"`)} + } + if _, ok := cbac.mutation.BusType(); !ok { + return &ValidationError{Name: "bus_type", err: errors.New(`ent: missing required field "ChildBusAssociation.bus_type"`)} + } + if v, ok := cbac.mutation.BusType(); ok { + if err := childbusassociation.BusTypeValidator(v); err != nil { + return &ValidationError{Name: "bus_type", err: fmt.Errorf(`ent: validator failed for field "ChildBusAssociation.bus_type": %w`, err)} + } + } + if _, ok := cbac.mutation.ChildID(); !ok { + return &ValidationError{Name: "child", err: errors.New(`ent: missing required edge "ChildBusAssociation.child"`)} + } + if _, ok := cbac.mutation.BusID(); !ok { + return &ValidationError{Name: "bus", err: errors.New(`ent: missing required edge "ChildBusAssociation.bus"`)} + } + return nil +} + +func (cbac *ChildBusAssociationCreate) sqlSave(ctx context.Context) (*ChildBusAssociation, error) { + if err := cbac.check(); err != nil { + return nil, err + } + _node, _spec := cbac.createSpec() + if err := sqlgraph.CreateNode(ctx, cbac.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + id := _spec.ID.Value.(int64) + _node.ID = int(id) + cbac.mutation.id = &_node.ID + cbac.mutation.done = true + return _node, nil +} + +func (cbac *ChildBusAssociationCreate) createSpec() (*ChildBusAssociation, *sqlgraph.CreateSpec) { + var ( + _node = &ChildBusAssociation{config: cbac.config} + _spec = sqlgraph.NewCreateSpec(childbusassociation.Table, sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt)) + ) + if value, ok := cbac.mutation.BusType(); ok { + _spec.SetField(childbusassociation.FieldBusType, field.TypeEnum, value) + _node.BusType = value + } + if nodes := cbac.mutation.ChildIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childbusassociation.ChildTable, + Columns: []string{childbusassociation.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.ChildID = nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := cbac.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childbusassociation.BusTable, + Columns: []string{childbusassociation.BusColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.BusID = nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// ChildBusAssociationCreateBulk is the builder for creating many ChildBusAssociation entities in bulk. +type ChildBusAssociationCreateBulk struct { + config + err error + builders []*ChildBusAssociationCreate +} + +// Save creates the ChildBusAssociation entities in the database. +func (cbacb *ChildBusAssociationCreateBulk) Save(ctx context.Context) ([]*ChildBusAssociation, error) { + if cbacb.err != nil { + return nil, cbacb.err + } + specs := make([]*sqlgraph.CreateSpec, len(cbacb.builders)) + nodes := make([]*ChildBusAssociation, len(cbacb.builders)) + mutators := make([]Mutator, len(cbacb.builders)) + for i := range cbacb.builders { + func(i int, root context.Context) { + builder := cbacb.builders[i] + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*ChildBusAssociationMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, cbacb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, cbacb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + if specs[i].ID.Value != nil { + id := specs[i].ID.Value.(int64) + nodes[i].ID = int(id) + } + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, cbacb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (cbacb *ChildBusAssociationCreateBulk) SaveX(ctx context.Context) []*ChildBusAssociation { + v, err := cbacb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (cbacb *ChildBusAssociationCreateBulk) Exec(ctx context.Context) error { + _, err := cbacb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cbacb *ChildBusAssociationCreateBulk) ExecX(ctx context.Context) { + if err := cbacb.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/childbusassociation_delete.go b/backend/domain/repository/ent/childbusassociation_delete.go new file mode 100644 index 00000000..0a7ddd5d --- /dev/null +++ b/backend/domain/repository/ent/childbusassociation_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" +) + +// ChildBusAssociationDelete is the builder for deleting a ChildBusAssociation entity. +type ChildBusAssociationDelete struct { + config + hooks []Hook + mutation *ChildBusAssociationMutation +} + +// Where appends a list predicates to the ChildBusAssociationDelete builder. +func (cbad *ChildBusAssociationDelete) Where(ps ...predicate.ChildBusAssociation) *ChildBusAssociationDelete { + cbad.mutation.Where(ps...) + return cbad +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (cbad *ChildBusAssociationDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, cbad.sqlExec, cbad.mutation, cbad.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (cbad *ChildBusAssociationDelete) ExecX(ctx context.Context) int { + n, err := cbad.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (cbad *ChildBusAssociationDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(childbusassociation.Table, sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt)) + if ps := cbad.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, cbad.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + cbad.mutation.done = true + return affected, err +} + +// ChildBusAssociationDeleteOne is the builder for deleting a single ChildBusAssociation entity. +type ChildBusAssociationDeleteOne struct { + cbad *ChildBusAssociationDelete +} + +// Where appends a list predicates to the ChildBusAssociationDelete builder. +func (cbado *ChildBusAssociationDeleteOne) Where(ps ...predicate.ChildBusAssociation) *ChildBusAssociationDeleteOne { + cbado.cbad.mutation.Where(ps...) + return cbado +} + +// Exec executes the deletion query. +func (cbado *ChildBusAssociationDeleteOne) Exec(ctx context.Context) error { + n, err := cbado.cbad.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{childbusassociation.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (cbado *ChildBusAssociationDeleteOne) ExecX(ctx context.Context) { + if err := cbado.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/childbusassociation_query.go b/backend/domain/repository/ent/childbusassociation_query.go new file mode 100644 index 00000000..86530953 --- /dev/null +++ b/backend/domain/repository/ent/childbusassociation_query.go @@ -0,0 +1,681 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "fmt" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ChildBusAssociationQuery is the builder for querying ChildBusAssociation entities. +type ChildBusAssociationQuery struct { + config + ctx *QueryContext + order []childbusassociation.OrderOption + inters []Interceptor + predicates []predicate.ChildBusAssociation + withChild *ChildQuery + withBus *BusQuery + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the ChildBusAssociationQuery builder. +func (cbaq *ChildBusAssociationQuery) Where(ps ...predicate.ChildBusAssociation) *ChildBusAssociationQuery { + cbaq.predicates = append(cbaq.predicates, ps...) + return cbaq +} + +// Limit the number of records to be returned by this query. +func (cbaq *ChildBusAssociationQuery) Limit(limit int) *ChildBusAssociationQuery { + cbaq.ctx.Limit = &limit + return cbaq +} + +// Offset to start from. +func (cbaq *ChildBusAssociationQuery) Offset(offset int) *ChildBusAssociationQuery { + cbaq.ctx.Offset = &offset + return cbaq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (cbaq *ChildBusAssociationQuery) Unique(unique bool) *ChildBusAssociationQuery { + cbaq.ctx.Unique = &unique + return cbaq +} + +// Order specifies how the records should be ordered. +func (cbaq *ChildBusAssociationQuery) Order(o ...childbusassociation.OrderOption) *ChildBusAssociationQuery { + cbaq.order = append(cbaq.order, o...) + return cbaq +} + +// QueryChild chains the current query on the "child" edge. +func (cbaq *ChildBusAssociationQuery) QueryChild() *ChildQuery { + query := (&ChildClient{config: cbaq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := cbaq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := cbaq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(childbusassociation.Table, childbusassociation.FieldID, selector), + sqlgraph.To(child.Table, child.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, childbusassociation.ChildTable, childbusassociation.ChildColumn), + ) + fromU = sqlgraph.SetNeighbors(cbaq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryBus chains the current query on the "bus" edge. +func (cbaq *ChildBusAssociationQuery) QueryBus() *BusQuery { + query := (&BusClient{config: cbaq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := cbaq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := cbaq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(childbusassociation.Table, childbusassociation.FieldID, selector), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, childbusassociation.BusTable, childbusassociation.BusColumn), + ) + fromU = sqlgraph.SetNeighbors(cbaq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first ChildBusAssociation entity from the query. +// Returns a *NotFoundError when no ChildBusAssociation was found. +func (cbaq *ChildBusAssociationQuery) First(ctx context.Context) (*ChildBusAssociation, error) { + nodes, err := cbaq.Limit(1).All(setContextOp(ctx, cbaq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{childbusassociation.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (cbaq *ChildBusAssociationQuery) FirstX(ctx context.Context) *ChildBusAssociation { + node, err := cbaq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first ChildBusAssociation ID from the query. +// Returns a *NotFoundError when no ChildBusAssociation ID was found. +func (cbaq *ChildBusAssociationQuery) FirstID(ctx context.Context) (id int, err error) { + var ids []int + if ids, err = cbaq.Limit(1).IDs(setContextOp(ctx, cbaq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{childbusassociation.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (cbaq *ChildBusAssociationQuery) FirstIDX(ctx context.Context) int { + id, err := cbaq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single ChildBusAssociation entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one ChildBusAssociation entity is found. +// Returns a *NotFoundError when no ChildBusAssociation entities are found. +func (cbaq *ChildBusAssociationQuery) Only(ctx context.Context) (*ChildBusAssociation, error) { + nodes, err := cbaq.Limit(2).All(setContextOp(ctx, cbaq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{childbusassociation.Label} + default: + return nil, &NotSingularError{childbusassociation.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (cbaq *ChildBusAssociationQuery) OnlyX(ctx context.Context) *ChildBusAssociation { + node, err := cbaq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only ChildBusAssociation ID in the query. +// Returns a *NotSingularError when more than one ChildBusAssociation ID is found. +// Returns a *NotFoundError when no entities are found. +func (cbaq *ChildBusAssociationQuery) OnlyID(ctx context.Context) (id int, err error) { + var ids []int + if ids, err = cbaq.Limit(2).IDs(setContextOp(ctx, cbaq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{childbusassociation.Label} + default: + err = &NotSingularError{childbusassociation.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (cbaq *ChildBusAssociationQuery) OnlyIDX(ctx context.Context) int { + id, err := cbaq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of ChildBusAssociations. +func (cbaq *ChildBusAssociationQuery) All(ctx context.Context) ([]*ChildBusAssociation, error) { + ctx = setContextOp(ctx, cbaq.ctx, "All") + if err := cbaq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*ChildBusAssociation, *ChildBusAssociationQuery]() + return withInterceptors[[]*ChildBusAssociation](ctx, cbaq, qr, cbaq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (cbaq *ChildBusAssociationQuery) AllX(ctx context.Context) []*ChildBusAssociation { + nodes, err := cbaq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of ChildBusAssociation IDs. +func (cbaq *ChildBusAssociationQuery) IDs(ctx context.Context) (ids []int, err error) { + if cbaq.ctx.Unique == nil && cbaq.path != nil { + cbaq.Unique(true) + } + ctx = setContextOp(ctx, cbaq.ctx, "IDs") + if err = cbaq.Select(childbusassociation.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (cbaq *ChildBusAssociationQuery) IDsX(ctx context.Context) []int { + ids, err := cbaq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (cbaq *ChildBusAssociationQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, cbaq.ctx, "Count") + if err := cbaq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, cbaq, querierCount[*ChildBusAssociationQuery](), cbaq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (cbaq *ChildBusAssociationQuery) CountX(ctx context.Context) int { + count, err := cbaq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (cbaq *ChildBusAssociationQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, cbaq.ctx, "Exist") + switch _, err := cbaq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (cbaq *ChildBusAssociationQuery) ExistX(ctx context.Context) bool { + exist, err := cbaq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the ChildBusAssociationQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (cbaq *ChildBusAssociationQuery) Clone() *ChildBusAssociationQuery { + if cbaq == nil { + return nil + } + return &ChildBusAssociationQuery{ + config: cbaq.config, + ctx: cbaq.ctx.Clone(), + order: append([]childbusassociation.OrderOption{}, cbaq.order...), + inters: append([]Interceptor{}, cbaq.inters...), + predicates: append([]predicate.ChildBusAssociation{}, cbaq.predicates...), + withChild: cbaq.withChild.Clone(), + withBus: cbaq.withBus.Clone(), + // clone intermediate query. + sql: cbaq.sql.Clone(), + path: cbaq.path, + } +} + +// WithChild tells the query-builder to eager-load the nodes that are connected to +// the "child" edge. The optional arguments are used to configure the query builder of the edge. +func (cbaq *ChildBusAssociationQuery) WithChild(opts ...func(*ChildQuery)) *ChildBusAssociationQuery { + query := (&ChildClient{config: cbaq.config}).Query() + for _, opt := range opts { + opt(query) + } + cbaq.withChild = query + return cbaq +} + +// WithBus tells the query-builder to eager-load the nodes that are connected to +// the "bus" edge. The optional arguments are used to configure the query builder of the edge. +func (cbaq *ChildBusAssociationQuery) WithBus(opts ...func(*BusQuery)) *ChildBusAssociationQuery { + query := (&BusClient{config: cbaq.config}).Query() + for _, opt := range opts { + opt(query) + } + cbaq.withBus = query + return cbaq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// ChildID uuid.UUID `json:"child_id,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.ChildBusAssociation.Query(). +// GroupBy(childbusassociation.FieldChildID). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (cbaq *ChildBusAssociationQuery) GroupBy(field string, fields ...string) *ChildBusAssociationGroupBy { + cbaq.ctx.Fields = append([]string{field}, fields...) + grbuild := &ChildBusAssociationGroupBy{build: cbaq} + grbuild.flds = &cbaq.ctx.Fields + grbuild.label = childbusassociation.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// ChildID uuid.UUID `json:"child_id,omitempty"` +// } +// +// client.ChildBusAssociation.Query(). +// Select(childbusassociation.FieldChildID). +// Scan(ctx, &v) +func (cbaq *ChildBusAssociationQuery) Select(fields ...string) *ChildBusAssociationSelect { + cbaq.ctx.Fields = append(cbaq.ctx.Fields, fields...) + sbuild := &ChildBusAssociationSelect{ChildBusAssociationQuery: cbaq} + sbuild.label = childbusassociation.Label + sbuild.flds, sbuild.scan = &cbaq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a ChildBusAssociationSelect configured with the given aggregations. +func (cbaq *ChildBusAssociationQuery) Aggregate(fns ...AggregateFunc) *ChildBusAssociationSelect { + return cbaq.Select().Aggregate(fns...) +} + +func (cbaq *ChildBusAssociationQuery) prepareQuery(ctx context.Context) error { + for _, inter := range cbaq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, cbaq); err != nil { + return err + } + } + } + for _, f := range cbaq.ctx.Fields { + if !childbusassociation.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if cbaq.path != nil { + prev, err := cbaq.path(ctx) + if err != nil { + return err + } + cbaq.sql = prev + } + return nil +} + +func (cbaq *ChildBusAssociationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChildBusAssociation, error) { + var ( + nodes = []*ChildBusAssociation{} + _spec = cbaq.querySpec() + loadedTypes = [2]bool{ + cbaq.withChild != nil, + cbaq.withBus != nil, + } + ) + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*ChildBusAssociation).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &ChildBusAssociation{config: cbaq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, cbaq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := cbaq.withChild; query != nil { + if err := cbaq.loadChild(ctx, query, nodes, nil, + func(n *ChildBusAssociation, e *Child) { n.Edges.Child = e }); err != nil { + return nil, err + } + } + if query := cbaq.withBus; query != nil { + if err := cbaq.loadBus(ctx, query, nodes, nil, + func(n *ChildBusAssociation, e *Bus) { n.Edges.Bus = e }); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (cbaq *ChildBusAssociationQuery) loadChild(ctx context.Context, query *ChildQuery, nodes []*ChildBusAssociation, init func(*ChildBusAssociation), assign func(*ChildBusAssociation, *Child)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*ChildBusAssociation) + for i := range nodes { + fk := nodes[i].ChildID + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(child.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "child_id" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (cbaq *ChildBusAssociationQuery) loadBus(ctx context.Context, query *BusQuery, nodes []*ChildBusAssociation, init func(*ChildBusAssociation), assign func(*ChildBusAssociation, *Bus)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*ChildBusAssociation) + for i := range nodes { + fk := nodes[i].BusID + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(bus.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "bus_id" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} + +func (cbaq *ChildBusAssociationQuery) sqlCount(ctx context.Context) (int, error) { + _spec := cbaq.querySpec() + _spec.Node.Columns = cbaq.ctx.Fields + if len(cbaq.ctx.Fields) > 0 { + _spec.Unique = cbaq.ctx.Unique != nil && *cbaq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, cbaq.driver, _spec) +} + +func (cbaq *ChildBusAssociationQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(childbusassociation.Table, childbusassociation.Columns, sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt)) + _spec.From = cbaq.sql + if unique := cbaq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if cbaq.path != nil { + _spec.Unique = true + } + if fields := cbaq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, childbusassociation.FieldID) + for i := range fields { + if fields[i] != childbusassociation.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + if cbaq.withChild != nil { + _spec.Node.AddColumnOnce(childbusassociation.FieldChildID) + } + if cbaq.withBus != nil { + _spec.Node.AddColumnOnce(childbusassociation.FieldBusID) + } + } + if ps := cbaq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := cbaq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := cbaq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := cbaq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (cbaq *ChildBusAssociationQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(cbaq.driver.Dialect()) + t1 := builder.Table(childbusassociation.Table) + columns := cbaq.ctx.Fields + if len(columns) == 0 { + columns = childbusassociation.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if cbaq.sql != nil { + selector = cbaq.sql + selector.Select(selector.Columns(columns...)...) + } + if cbaq.ctx.Unique != nil && *cbaq.ctx.Unique { + selector.Distinct() + } + for _, p := range cbaq.predicates { + p(selector) + } + for _, p := range cbaq.order { + p(selector) + } + if offset := cbaq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := cbaq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// ChildBusAssociationGroupBy is the group-by builder for ChildBusAssociation entities. +type ChildBusAssociationGroupBy struct { + selector + build *ChildBusAssociationQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (cbagb *ChildBusAssociationGroupBy) Aggregate(fns ...AggregateFunc) *ChildBusAssociationGroupBy { + cbagb.fns = append(cbagb.fns, fns...) + return cbagb +} + +// Scan applies the selector query and scans the result into the given value. +func (cbagb *ChildBusAssociationGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, cbagb.build.ctx, "GroupBy") + if err := cbagb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*ChildBusAssociationQuery, *ChildBusAssociationGroupBy](ctx, cbagb.build, cbagb, cbagb.build.inters, v) +} + +func (cbagb *ChildBusAssociationGroupBy) sqlScan(ctx context.Context, root *ChildBusAssociationQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(cbagb.fns)) + for _, fn := range cbagb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*cbagb.flds)+len(cbagb.fns)) + for _, f := range *cbagb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*cbagb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := cbagb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// ChildBusAssociationSelect is the builder for selecting fields of ChildBusAssociation entities. +type ChildBusAssociationSelect struct { + *ChildBusAssociationQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (cbas *ChildBusAssociationSelect) Aggregate(fns ...AggregateFunc) *ChildBusAssociationSelect { + cbas.fns = append(cbas.fns, fns...) + return cbas +} + +// Scan applies the selector query and scans the result into the given value. +func (cbas *ChildBusAssociationSelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, cbas.ctx, "Select") + if err := cbas.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*ChildBusAssociationQuery, *ChildBusAssociationSelect](ctx, cbas.ChildBusAssociationQuery, cbas, cbas.inters, v) +} + +func (cbas *ChildBusAssociationSelect) sqlScan(ctx context.Context, root *ChildBusAssociationQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(cbas.fns)) + for _, fn := range cbas.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*cbas.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := cbas.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/backend/domain/repository/ent/childbusassociation_update.go b/backend/domain/repository/ent/childbusassociation_update.go new file mode 100644 index 00000000..e4011a15 --- /dev/null +++ b/backend/domain/repository/ent/childbusassociation_update.go @@ -0,0 +1,466 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ChildBusAssociationUpdate is the builder for updating ChildBusAssociation entities. +type ChildBusAssociationUpdate struct { + config + hooks []Hook + mutation *ChildBusAssociationMutation +} + +// Where appends a list predicates to the ChildBusAssociationUpdate builder. +func (cbau *ChildBusAssociationUpdate) Where(ps ...predicate.ChildBusAssociation) *ChildBusAssociationUpdate { + cbau.mutation.Where(ps...) + return cbau +} + +// SetChildID sets the "child_id" field. +func (cbau *ChildBusAssociationUpdate) SetChildID(u uuid.UUID) *ChildBusAssociationUpdate { + cbau.mutation.SetChildID(u) + return cbau +} + +// SetNillableChildID sets the "child_id" field if the given value is not nil. +func (cbau *ChildBusAssociationUpdate) SetNillableChildID(u *uuid.UUID) *ChildBusAssociationUpdate { + if u != nil { + cbau.SetChildID(*u) + } + return cbau +} + +// SetBusID sets the "bus_id" field. +func (cbau *ChildBusAssociationUpdate) SetBusID(u uuid.UUID) *ChildBusAssociationUpdate { + cbau.mutation.SetBusID(u) + return cbau +} + +// SetNillableBusID sets the "bus_id" field if the given value is not nil. +func (cbau *ChildBusAssociationUpdate) SetNillableBusID(u *uuid.UUID) *ChildBusAssociationUpdate { + if u != nil { + cbau.SetBusID(*u) + } + return cbau +} + +// SetBusType sets the "bus_type" field. +func (cbau *ChildBusAssociationUpdate) SetBusType(ct childbusassociation.BusType) *ChildBusAssociationUpdate { + cbau.mutation.SetBusType(ct) + return cbau +} + +// SetNillableBusType sets the "bus_type" field if the given value is not nil. +func (cbau *ChildBusAssociationUpdate) SetNillableBusType(ct *childbusassociation.BusType) *ChildBusAssociationUpdate { + if ct != nil { + cbau.SetBusType(*ct) + } + return cbau +} + +// SetChild sets the "child" edge to the Child entity. +func (cbau *ChildBusAssociationUpdate) SetChild(c *Child) *ChildBusAssociationUpdate { + return cbau.SetChildID(c.ID) +} + +// SetBus sets the "bus" edge to the Bus entity. +func (cbau *ChildBusAssociationUpdate) SetBus(b *Bus) *ChildBusAssociationUpdate { + return cbau.SetBusID(b.ID) +} + +// Mutation returns the ChildBusAssociationMutation object of the builder. +func (cbau *ChildBusAssociationUpdate) Mutation() *ChildBusAssociationMutation { + return cbau.mutation +} + +// ClearChild clears the "child" edge to the Child entity. +func (cbau *ChildBusAssociationUpdate) ClearChild() *ChildBusAssociationUpdate { + cbau.mutation.ClearChild() + return cbau +} + +// ClearBus clears the "bus" edge to the Bus entity. +func (cbau *ChildBusAssociationUpdate) ClearBus() *ChildBusAssociationUpdate { + cbau.mutation.ClearBus() + return cbau +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (cbau *ChildBusAssociationUpdate) Save(ctx context.Context) (int, error) { + return withHooks(ctx, cbau.sqlSave, cbau.mutation, cbau.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (cbau *ChildBusAssociationUpdate) SaveX(ctx context.Context) int { + affected, err := cbau.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (cbau *ChildBusAssociationUpdate) Exec(ctx context.Context) error { + _, err := cbau.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cbau *ChildBusAssociationUpdate) ExecX(ctx context.Context) { + if err := cbau.Exec(ctx); err != nil { + panic(err) + } +} + +// check runs all checks and user-defined validators on the builder. +func (cbau *ChildBusAssociationUpdate) check() error { + if v, ok := cbau.mutation.BusType(); ok { + if err := childbusassociation.BusTypeValidator(v); err != nil { + return &ValidationError{Name: "bus_type", err: fmt.Errorf(`ent: validator failed for field "ChildBusAssociation.bus_type": %w`, err)} + } + } + if _, ok := cbau.mutation.ChildID(); cbau.mutation.ChildCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "ChildBusAssociation.child"`) + } + if _, ok := cbau.mutation.BusID(); cbau.mutation.BusCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "ChildBusAssociation.bus"`) + } + return nil +} + +func (cbau *ChildBusAssociationUpdate) sqlSave(ctx context.Context) (n int, err error) { + if err := cbau.check(); err != nil { + return n, err + } + _spec := sqlgraph.NewUpdateSpec(childbusassociation.Table, childbusassociation.Columns, sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt)) + if ps := cbau.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := cbau.mutation.BusType(); ok { + _spec.SetField(childbusassociation.FieldBusType, field.TypeEnum, value) + } + if cbau.mutation.ChildCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childbusassociation.ChildTable, + Columns: []string{childbusassociation.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cbau.mutation.ChildIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childbusassociation.ChildTable, + Columns: []string{childbusassociation.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if cbau.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childbusassociation.BusTable, + Columns: []string{childbusassociation.BusColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cbau.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childbusassociation.BusTable, + Columns: []string{childbusassociation.BusColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if n, err = sqlgraph.UpdateNodes(ctx, cbau.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{childbusassociation.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + cbau.mutation.done = true + return n, nil +} + +// ChildBusAssociationUpdateOne is the builder for updating a single ChildBusAssociation entity. +type ChildBusAssociationUpdateOne struct { + config + fields []string + hooks []Hook + mutation *ChildBusAssociationMutation +} + +// SetChildID sets the "child_id" field. +func (cbauo *ChildBusAssociationUpdateOne) SetChildID(u uuid.UUID) *ChildBusAssociationUpdateOne { + cbauo.mutation.SetChildID(u) + return cbauo +} + +// SetNillableChildID sets the "child_id" field if the given value is not nil. +func (cbauo *ChildBusAssociationUpdateOne) SetNillableChildID(u *uuid.UUID) *ChildBusAssociationUpdateOne { + if u != nil { + cbauo.SetChildID(*u) + } + return cbauo +} + +// SetBusID sets the "bus_id" field. +func (cbauo *ChildBusAssociationUpdateOne) SetBusID(u uuid.UUID) *ChildBusAssociationUpdateOne { + cbauo.mutation.SetBusID(u) + return cbauo +} + +// SetNillableBusID sets the "bus_id" field if the given value is not nil. +func (cbauo *ChildBusAssociationUpdateOne) SetNillableBusID(u *uuid.UUID) *ChildBusAssociationUpdateOne { + if u != nil { + cbauo.SetBusID(*u) + } + return cbauo +} + +// SetBusType sets the "bus_type" field. +func (cbauo *ChildBusAssociationUpdateOne) SetBusType(ct childbusassociation.BusType) *ChildBusAssociationUpdateOne { + cbauo.mutation.SetBusType(ct) + return cbauo +} + +// SetNillableBusType sets the "bus_type" field if the given value is not nil. +func (cbauo *ChildBusAssociationUpdateOne) SetNillableBusType(ct *childbusassociation.BusType) *ChildBusAssociationUpdateOne { + if ct != nil { + cbauo.SetBusType(*ct) + } + return cbauo +} + +// SetChild sets the "child" edge to the Child entity. +func (cbauo *ChildBusAssociationUpdateOne) SetChild(c *Child) *ChildBusAssociationUpdateOne { + return cbauo.SetChildID(c.ID) +} + +// SetBus sets the "bus" edge to the Bus entity. +func (cbauo *ChildBusAssociationUpdateOne) SetBus(b *Bus) *ChildBusAssociationUpdateOne { + return cbauo.SetBusID(b.ID) +} + +// Mutation returns the ChildBusAssociationMutation object of the builder. +func (cbauo *ChildBusAssociationUpdateOne) Mutation() *ChildBusAssociationMutation { + return cbauo.mutation +} + +// ClearChild clears the "child" edge to the Child entity. +func (cbauo *ChildBusAssociationUpdateOne) ClearChild() *ChildBusAssociationUpdateOne { + cbauo.mutation.ClearChild() + return cbauo +} + +// ClearBus clears the "bus" edge to the Bus entity. +func (cbauo *ChildBusAssociationUpdateOne) ClearBus() *ChildBusAssociationUpdateOne { + cbauo.mutation.ClearBus() + return cbauo +} + +// Where appends a list predicates to the ChildBusAssociationUpdate builder. +func (cbauo *ChildBusAssociationUpdateOne) Where(ps ...predicate.ChildBusAssociation) *ChildBusAssociationUpdateOne { + cbauo.mutation.Where(ps...) + return cbauo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (cbauo *ChildBusAssociationUpdateOne) Select(field string, fields ...string) *ChildBusAssociationUpdateOne { + cbauo.fields = append([]string{field}, fields...) + return cbauo +} + +// Save executes the query and returns the updated ChildBusAssociation entity. +func (cbauo *ChildBusAssociationUpdateOne) Save(ctx context.Context) (*ChildBusAssociation, error) { + return withHooks(ctx, cbauo.sqlSave, cbauo.mutation, cbauo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (cbauo *ChildBusAssociationUpdateOne) SaveX(ctx context.Context) *ChildBusAssociation { + node, err := cbauo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (cbauo *ChildBusAssociationUpdateOne) Exec(ctx context.Context) error { + _, err := cbauo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cbauo *ChildBusAssociationUpdateOne) ExecX(ctx context.Context) { + if err := cbauo.Exec(ctx); err != nil { + panic(err) + } +} + +// check runs all checks and user-defined validators on the builder. +func (cbauo *ChildBusAssociationUpdateOne) check() error { + if v, ok := cbauo.mutation.BusType(); ok { + if err := childbusassociation.BusTypeValidator(v); err != nil { + return &ValidationError{Name: "bus_type", err: fmt.Errorf(`ent: validator failed for field "ChildBusAssociation.bus_type": %w`, err)} + } + } + if _, ok := cbauo.mutation.ChildID(); cbauo.mutation.ChildCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "ChildBusAssociation.child"`) + } + if _, ok := cbauo.mutation.BusID(); cbauo.mutation.BusCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "ChildBusAssociation.bus"`) + } + return nil +} + +func (cbauo *ChildBusAssociationUpdateOne) sqlSave(ctx context.Context) (_node *ChildBusAssociation, err error) { + if err := cbauo.check(); err != nil { + return _node, err + } + _spec := sqlgraph.NewUpdateSpec(childbusassociation.Table, childbusassociation.Columns, sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt)) + id, ok := cbauo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "ChildBusAssociation.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := cbauo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, childbusassociation.FieldID) + for _, f := range fields { + if !childbusassociation.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != childbusassociation.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := cbauo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := cbauo.mutation.BusType(); ok { + _spec.SetField(childbusassociation.FieldBusType, field.TypeEnum, value) + } + if cbauo.mutation.ChildCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childbusassociation.ChildTable, + Columns: []string{childbusassociation.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cbauo.mutation.ChildIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childbusassociation.ChildTable, + Columns: []string{childbusassociation.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if cbauo.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childbusassociation.BusTable, + Columns: []string{childbusassociation.BusColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cbauo.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childbusassociation.BusTable, + Columns: []string{childbusassociation.BusColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + _node = &ChildBusAssociation{config: cbauo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, cbauo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{childbusassociation.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + cbauo.mutation.done = true + return _node, nil +} diff --git a/backend/domain/repository/ent/childphoto.go b/backend/domain/repository/ent/childphoto.go new file mode 100644 index 00000000..84b37541 --- /dev/null +++ b/backend/domain/repository/ent/childphoto.go @@ -0,0 +1,181 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "strings" + "time" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/google/uuid" +) + +// ChildPhoto is the model entity for the ChildPhoto schema. +type ChildPhoto struct { + config `json:"-"` + // ID of the ent. + ID uuid.UUID `json:"id,omitempty"` + // AWS S3のバケット名 + S3Bucket string `json:"s3_bucket,omitempty"` + // S3内の画像ファイルのキー(ファイルパス含む) + S3Key string `json:"s3_key,omitempty"` + // レコードの作成日時 + CreatedAt time.Time `json:"created_at,omitempty"` + // レコードの最終更新日時 + UpdatedAt time.Time `json:"updated_at,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the ChildPhotoQuery when eager-loading is set. + Edges ChildPhotoEdges `json:"edges"` + child_photos *uuid.UUID + selectValues sql.SelectValues +} + +// ChildPhotoEdges holds the relations/edges for other nodes in the graph. +type ChildPhotoEdges struct { + // Child holds the value of the child edge. + Child *Child `json:"child,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [1]bool +} + +// ChildOrErr returns the Child value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e ChildPhotoEdges) ChildOrErr() (*Child, error) { + if e.loadedTypes[0] { + if e.Child == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: child.Label} + } + return e.Child, nil + } + return nil, &NotLoadedError{edge: "child"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*ChildPhoto) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case childphoto.FieldS3Bucket, childphoto.FieldS3Key: + values[i] = new(sql.NullString) + case childphoto.FieldCreatedAt, childphoto.FieldUpdatedAt: + values[i] = new(sql.NullTime) + case childphoto.FieldID: + values[i] = new(uuid.UUID) + case childphoto.ForeignKeys[0]: // child_photos + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the ChildPhoto fields. +func (cp *ChildPhoto) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case childphoto.FieldID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field id", values[i]) + } else if value != nil { + cp.ID = *value + } + case childphoto.FieldS3Bucket: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field s3_bucket", values[i]) + } else if value.Valid { + cp.S3Bucket = value.String + } + case childphoto.FieldS3Key: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field s3_key", values[i]) + } else if value.Valid { + cp.S3Key = value.String + } + case childphoto.FieldCreatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field created_at", values[i]) + } else if value.Valid { + cp.CreatedAt = value.Time + } + case childphoto.FieldUpdatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field updated_at", values[i]) + } else if value.Valid { + cp.UpdatedAt = value.Time + } + case childphoto.ForeignKeys[0]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field child_photos", values[i]) + } else if value.Valid { + cp.child_photos = new(uuid.UUID) + *cp.child_photos = *value.S.(*uuid.UUID) + } + default: + cp.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the ChildPhoto. +// This includes values selected through modifiers, order, etc. +func (cp *ChildPhoto) Value(name string) (ent.Value, error) { + return cp.selectValues.Get(name) +} + +// QueryChild queries the "child" edge of the ChildPhoto entity. +func (cp *ChildPhoto) QueryChild() *ChildQuery { + return NewChildPhotoClient(cp.config).QueryChild(cp) +} + +// Update returns a builder for updating this ChildPhoto. +// Note that you need to call ChildPhoto.Unwrap() before calling this method if this ChildPhoto +// was returned from a transaction, and the transaction was committed or rolled back. +func (cp *ChildPhoto) Update() *ChildPhotoUpdateOne { + return NewChildPhotoClient(cp.config).UpdateOne(cp) +} + +// Unwrap unwraps the ChildPhoto entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (cp *ChildPhoto) Unwrap() *ChildPhoto { + _tx, ok := cp.config.driver.(*txDriver) + if !ok { + panic("ent: ChildPhoto is not a transactional entity") + } + cp.config.driver = _tx.drv + return cp +} + +// String implements the fmt.Stringer. +func (cp *ChildPhoto) String() string { + var builder strings.Builder + builder.WriteString("ChildPhoto(") + builder.WriteString(fmt.Sprintf("id=%v, ", cp.ID)) + builder.WriteString("s3_bucket=") + builder.WriteString(cp.S3Bucket) + builder.WriteString(", ") + builder.WriteString("s3_key=") + builder.WriteString(cp.S3Key) + builder.WriteString(", ") + builder.WriteString("created_at=") + builder.WriteString(cp.CreatedAt.Format(time.ANSIC)) + builder.WriteString(", ") + builder.WriteString("updated_at=") + builder.WriteString(cp.UpdatedAt.Format(time.ANSIC)) + builder.WriteByte(')') + return builder.String() +} + +// ChildPhotos is a parsable slice of ChildPhoto. +type ChildPhotos []*ChildPhoto diff --git a/backend/domain/repository/ent/childphoto/childphoto.go b/backend/domain/repository/ent/childphoto/childphoto.go new file mode 100644 index 00000000..b258f82a --- /dev/null +++ b/backend/domain/repository/ent/childphoto/childphoto.go @@ -0,0 +1,120 @@ +// Code generated by ent, DO NOT EDIT. + +package childphoto + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/google/uuid" +) + +const ( + // Label holds the string label denoting the childphoto type in the database. + Label = "child_photo" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldS3Bucket holds the string denoting the s3_bucket field in the database. + FieldS3Bucket = "s3_bucket" + // FieldS3Key holds the string denoting the s3_key field in the database. + FieldS3Key = "s3_key" + // FieldCreatedAt holds the string denoting the created_at field in the database. + FieldCreatedAt = "created_at" + // FieldUpdatedAt holds the string denoting the updated_at field in the database. + FieldUpdatedAt = "updated_at" + // EdgeChild holds the string denoting the child edge name in mutations. + EdgeChild = "child" + // Table holds the table name of the childphoto in the database. + Table = "child_photos" + // ChildTable is the table that holds the child relation/edge. + ChildTable = "child_photos" + // ChildInverseTable is the table name for the Child entity. + // It exists in this package in order to avoid circular dependency with the "child" package. + ChildInverseTable = "childs" + // ChildColumn is the table column denoting the child relation/edge. + ChildColumn = "child_photos" +) + +// Columns holds all SQL columns for childphoto fields. +var Columns = []string{ + FieldID, + FieldS3Bucket, + FieldS3Key, + FieldCreatedAt, + FieldUpdatedAt, +} + +// ForeignKeys holds the SQL foreign-keys that are owned by the "child_photos" +// table and are not defined as standalone fields in the schema. +var ForeignKeys = []string{ + "child_photos", +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + for i := range ForeignKeys { + if column == ForeignKeys[i] { + return true + } + } + return false +} + +var ( + // DefaultCreatedAt holds the default value on creation for the "created_at" field. + DefaultCreatedAt func() time.Time + // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. + DefaultUpdatedAt func() time.Time + // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. + UpdateDefaultUpdatedAt func() time.Time + // DefaultID holds the default value on creation for the "id" field. + DefaultID func() uuid.UUID +) + +// OrderOption defines the ordering options for the ChildPhoto queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByS3Bucket orders the results by the s3_bucket field. +func ByS3Bucket(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldS3Bucket, opts...).ToFunc() +} + +// ByS3Key orders the results by the s3_key field. +func ByS3Key(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldS3Key, opts...).ToFunc() +} + +// ByCreatedAt orders the results by the created_at field. +func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() +} + +// ByUpdatedAt orders the results by the updated_at field. +func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() +} + +// ByChildField orders the results by child field. +func ByChildField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newChildStep(), sql.OrderByField(field, opts...)) + } +} +func newChildStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(ChildInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, ChildTable, ChildColumn), + ) +} diff --git a/backend/domain/repository/ent/childphoto/where.go b/backend/domain/repository/ent/childphoto/where.go new file mode 100644 index 00000000..9c366e30 --- /dev/null +++ b/backend/domain/repository/ent/childphoto/where.go @@ -0,0 +1,325 @@ +// Code generated by ent, DO NOT EDIT. + +package childphoto + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ID filters vertices based on their ID field. +func ID(id uuid.UUID) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id uuid.UUID) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id uuid.UUID) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...uuid.UUID) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...uuid.UUID) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id uuid.UUID) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id uuid.UUID) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id uuid.UUID) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id uuid.UUID) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldLTE(FieldID, id)) +} + +// S3Bucket applies equality check predicate on the "s3_bucket" field. It's identical to S3BucketEQ. +func S3Bucket(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldS3Bucket, v)) +} + +// S3Key applies equality check predicate on the "s3_key" field. It's identical to S3KeyEQ. +func S3Key(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldS3Key, v)) +} + +// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. +func CreatedAt(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldCreatedAt, v)) +} + +// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ. +func UpdatedAt(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// S3BucketEQ applies the EQ predicate on the "s3_bucket" field. +func S3BucketEQ(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldS3Bucket, v)) +} + +// S3BucketNEQ applies the NEQ predicate on the "s3_bucket" field. +func S3BucketNEQ(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNEQ(FieldS3Bucket, v)) +} + +// S3BucketIn applies the In predicate on the "s3_bucket" field. +func S3BucketIn(vs ...string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldIn(FieldS3Bucket, vs...)) +} + +// S3BucketNotIn applies the NotIn predicate on the "s3_bucket" field. +func S3BucketNotIn(vs ...string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNotIn(FieldS3Bucket, vs...)) +} + +// S3BucketGT applies the GT predicate on the "s3_bucket" field. +func S3BucketGT(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldGT(FieldS3Bucket, v)) +} + +// S3BucketGTE applies the GTE predicate on the "s3_bucket" field. +func S3BucketGTE(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldGTE(FieldS3Bucket, v)) +} + +// S3BucketLT applies the LT predicate on the "s3_bucket" field. +func S3BucketLT(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldLT(FieldS3Bucket, v)) +} + +// S3BucketLTE applies the LTE predicate on the "s3_bucket" field. +func S3BucketLTE(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldLTE(FieldS3Bucket, v)) +} + +// S3BucketContains applies the Contains predicate on the "s3_bucket" field. +func S3BucketContains(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldContains(FieldS3Bucket, v)) +} + +// S3BucketHasPrefix applies the HasPrefix predicate on the "s3_bucket" field. +func S3BucketHasPrefix(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldHasPrefix(FieldS3Bucket, v)) +} + +// S3BucketHasSuffix applies the HasSuffix predicate on the "s3_bucket" field. +func S3BucketHasSuffix(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldHasSuffix(FieldS3Bucket, v)) +} + +// S3BucketEqualFold applies the EqualFold predicate on the "s3_bucket" field. +func S3BucketEqualFold(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEqualFold(FieldS3Bucket, v)) +} + +// S3BucketContainsFold applies the ContainsFold predicate on the "s3_bucket" field. +func S3BucketContainsFold(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldContainsFold(FieldS3Bucket, v)) +} + +// S3KeyEQ applies the EQ predicate on the "s3_key" field. +func S3KeyEQ(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldS3Key, v)) +} + +// S3KeyNEQ applies the NEQ predicate on the "s3_key" field. +func S3KeyNEQ(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNEQ(FieldS3Key, v)) +} + +// S3KeyIn applies the In predicate on the "s3_key" field. +func S3KeyIn(vs ...string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldIn(FieldS3Key, vs...)) +} + +// S3KeyNotIn applies the NotIn predicate on the "s3_key" field. +func S3KeyNotIn(vs ...string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNotIn(FieldS3Key, vs...)) +} + +// S3KeyGT applies the GT predicate on the "s3_key" field. +func S3KeyGT(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldGT(FieldS3Key, v)) +} + +// S3KeyGTE applies the GTE predicate on the "s3_key" field. +func S3KeyGTE(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldGTE(FieldS3Key, v)) +} + +// S3KeyLT applies the LT predicate on the "s3_key" field. +func S3KeyLT(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldLT(FieldS3Key, v)) +} + +// S3KeyLTE applies the LTE predicate on the "s3_key" field. +func S3KeyLTE(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldLTE(FieldS3Key, v)) +} + +// S3KeyContains applies the Contains predicate on the "s3_key" field. +func S3KeyContains(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldContains(FieldS3Key, v)) +} + +// S3KeyHasPrefix applies the HasPrefix predicate on the "s3_key" field. +func S3KeyHasPrefix(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldHasPrefix(FieldS3Key, v)) +} + +// S3KeyHasSuffix applies the HasSuffix predicate on the "s3_key" field. +func S3KeyHasSuffix(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldHasSuffix(FieldS3Key, v)) +} + +// S3KeyEqualFold applies the EqualFold predicate on the "s3_key" field. +func S3KeyEqualFold(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEqualFold(FieldS3Key, v)) +} + +// S3KeyContainsFold applies the ContainsFold predicate on the "s3_key" field. +func S3KeyContainsFold(v string) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldContainsFold(FieldS3Key, v)) +} + +// CreatedAtEQ applies the EQ predicate on the "created_at" field. +func CreatedAtEQ(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldCreatedAt, v)) +} + +// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. +func CreatedAtNEQ(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNEQ(FieldCreatedAt, v)) +} + +// CreatedAtIn applies the In predicate on the "created_at" field. +func CreatedAtIn(vs ...time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldIn(FieldCreatedAt, vs...)) +} + +// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. +func CreatedAtNotIn(vs ...time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNotIn(FieldCreatedAt, vs...)) +} + +// CreatedAtGT applies the GT predicate on the "created_at" field. +func CreatedAtGT(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldGT(FieldCreatedAt, v)) +} + +// CreatedAtGTE applies the GTE predicate on the "created_at" field. +func CreatedAtGTE(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldGTE(FieldCreatedAt, v)) +} + +// CreatedAtLT applies the LT predicate on the "created_at" field. +func CreatedAtLT(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldLT(FieldCreatedAt, v)) +} + +// CreatedAtLTE applies the LTE predicate on the "created_at" field. +func CreatedAtLTE(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldLTE(FieldCreatedAt, v)) +} + +// UpdatedAtEQ applies the EQ predicate on the "updated_at" field. +func UpdatedAtEQ(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field. +func UpdatedAtNEQ(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtIn applies the In predicate on the "updated_at" field. +func UpdatedAtIn(vs ...time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field. +func UpdatedAtNotIn(vs ...time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNotIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtGT applies the GT predicate on the "updated_at" field. +func UpdatedAtGT(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldGT(FieldUpdatedAt, v)) +} + +// UpdatedAtGTE applies the GTE predicate on the "updated_at" field. +func UpdatedAtGTE(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldGTE(FieldUpdatedAt, v)) +} + +// UpdatedAtLT applies the LT predicate on the "updated_at" field. +func UpdatedAtLT(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldLT(FieldUpdatedAt, v)) +} + +// UpdatedAtLTE applies the LTE predicate on the "updated_at" field. +func UpdatedAtLTE(v time.Time) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldLTE(FieldUpdatedAt, v)) +} + +// HasChild applies the HasEdge predicate on the "child" edge. +func HasChild() predicate.ChildPhoto { + return predicate.ChildPhoto(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, ChildTable, ChildColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasChildWith applies the HasEdge predicate on the "child" edge with a given conditions (other predicates). +func HasChildWith(preds ...predicate.Child) predicate.ChildPhoto { + return predicate.ChildPhoto(func(s *sql.Selector) { + step := newChildStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.ChildPhoto) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.ChildPhoto) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.ChildPhoto) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.NotPredicates(p)) +} diff --git a/backend/domain/repository/ent/childphoto_create.go b/backend/domain/repository/ent/childphoto_create.go new file mode 100644 index 00000000..115f486a --- /dev/null +++ b/backend/domain/repository/ent/childphoto_create.go @@ -0,0 +1,314 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/google/uuid" +) + +// ChildPhotoCreate is the builder for creating a ChildPhoto entity. +type ChildPhotoCreate struct { + config + mutation *ChildPhotoMutation + hooks []Hook +} + +// SetS3Bucket sets the "s3_bucket" field. +func (cpc *ChildPhotoCreate) SetS3Bucket(s string) *ChildPhotoCreate { + cpc.mutation.SetS3Bucket(s) + return cpc +} + +// SetS3Key sets the "s3_key" field. +func (cpc *ChildPhotoCreate) SetS3Key(s string) *ChildPhotoCreate { + cpc.mutation.SetS3Key(s) + return cpc +} + +// SetCreatedAt sets the "created_at" field. +func (cpc *ChildPhotoCreate) SetCreatedAt(t time.Time) *ChildPhotoCreate { + cpc.mutation.SetCreatedAt(t) + return cpc +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (cpc *ChildPhotoCreate) SetNillableCreatedAt(t *time.Time) *ChildPhotoCreate { + if t != nil { + cpc.SetCreatedAt(*t) + } + return cpc +} + +// SetUpdatedAt sets the "updated_at" field. +func (cpc *ChildPhotoCreate) SetUpdatedAt(t time.Time) *ChildPhotoCreate { + cpc.mutation.SetUpdatedAt(t) + return cpc +} + +// SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil. +func (cpc *ChildPhotoCreate) SetNillableUpdatedAt(t *time.Time) *ChildPhotoCreate { + if t != nil { + cpc.SetUpdatedAt(*t) + } + return cpc +} + +// SetID sets the "id" field. +func (cpc *ChildPhotoCreate) SetID(u uuid.UUID) *ChildPhotoCreate { + cpc.mutation.SetID(u) + return cpc +} + +// SetNillableID sets the "id" field if the given value is not nil. +func (cpc *ChildPhotoCreate) SetNillableID(u *uuid.UUID) *ChildPhotoCreate { + if u != nil { + cpc.SetID(*u) + } + return cpc +} + +// SetChildID sets the "child" edge to the Child entity by ID. +func (cpc *ChildPhotoCreate) SetChildID(id uuid.UUID) *ChildPhotoCreate { + cpc.mutation.SetChildID(id) + return cpc +} + +// SetNillableChildID sets the "child" edge to the Child entity by ID if the given value is not nil. +func (cpc *ChildPhotoCreate) SetNillableChildID(id *uuid.UUID) *ChildPhotoCreate { + if id != nil { + cpc = cpc.SetChildID(*id) + } + return cpc +} + +// SetChild sets the "child" edge to the Child entity. +func (cpc *ChildPhotoCreate) SetChild(c *Child) *ChildPhotoCreate { + return cpc.SetChildID(c.ID) +} + +// Mutation returns the ChildPhotoMutation object of the builder. +func (cpc *ChildPhotoCreate) Mutation() *ChildPhotoMutation { + return cpc.mutation +} + +// Save creates the ChildPhoto in the database. +func (cpc *ChildPhotoCreate) Save(ctx context.Context) (*ChildPhoto, error) { + cpc.defaults() + return withHooks(ctx, cpc.sqlSave, cpc.mutation, cpc.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (cpc *ChildPhotoCreate) SaveX(ctx context.Context) *ChildPhoto { + v, err := cpc.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (cpc *ChildPhotoCreate) Exec(ctx context.Context) error { + _, err := cpc.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cpc *ChildPhotoCreate) ExecX(ctx context.Context) { + if err := cpc.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (cpc *ChildPhotoCreate) defaults() { + if _, ok := cpc.mutation.CreatedAt(); !ok { + v := childphoto.DefaultCreatedAt() + cpc.mutation.SetCreatedAt(v) + } + if _, ok := cpc.mutation.UpdatedAt(); !ok { + v := childphoto.DefaultUpdatedAt() + cpc.mutation.SetUpdatedAt(v) + } + if _, ok := cpc.mutation.ID(); !ok { + v := childphoto.DefaultID() + cpc.mutation.SetID(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (cpc *ChildPhotoCreate) check() error { + if _, ok := cpc.mutation.S3Bucket(); !ok { + return &ValidationError{Name: "s3_bucket", err: errors.New(`ent: missing required field "ChildPhoto.s3_bucket"`)} + } + if _, ok := cpc.mutation.S3Key(); !ok { + return &ValidationError{Name: "s3_key", err: errors.New(`ent: missing required field "ChildPhoto.s3_key"`)} + } + if _, ok := cpc.mutation.CreatedAt(); !ok { + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "ChildPhoto.created_at"`)} + } + if _, ok := cpc.mutation.UpdatedAt(); !ok { + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "ChildPhoto.updated_at"`)} + } + return nil +} + +func (cpc *ChildPhotoCreate) sqlSave(ctx context.Context) (*ChildPhoto, error) { + if err := cpc.check(); err != nil { + return nil, err + } + _node, _spec := cpc.createSpec() + if err := sqlgraph.CreateNode(ctx, cpc.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + if _spec.ID.Value != nil { + if id, ok := _spec.ID.Value.(*uuid.UUID); ok { + _node.ID = *id + } else if err := _node.ID.Scan(_spec.ID.Value); err != nil { + return nil, err + } + } + cpc.mutation.id = &_node.ID + cpc.mutation.done = true + return _node, nil +} + +func (cpc *ChildPhotoCreate) createSpec() (*ChildPhoto, *sqlgraph.CreateSpec) { + var ( + _node = &ChildPhoto{config: cpc.config} + _spec = sqlgraph.NewCreateSpec(childphoto.Table, sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID)) + ) + if id, ok := cpc.mutation.ID(); ok { + _node.ID = id + _spec.ID.Value = &id + } + if value, ok := cpc.mutation.S3Bucket(); ok { + _spec.SetField(childphoto.FieldS3Bucket, field.TypeString, value) + _node.S3Bucket = value + } + if value, ok := cpc.mutation.S3Key(); ok { + _spec.SetField(childphoto.FieldS3Key, field.TypeString, value) + _node.S3Key = value + } + if value, ok := cpc.mutation.CreatedAt(); ok { + _spec.SetField(childphoto.FieldCreatedAt, field.TypeTime, value) + _node.CreatedAt = value + } + if value, ok := cpc.mutation.UpdatedAt(); ok { + _spec.SetField(childphoto.FieldUpdatedAt, field.TypeTime, value) + _node.UpdatedAt = value + } + if nodes := cpc.mutation.ChildIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childphoto.ChildTable, + Columns: []string{childphoto.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.child_photos = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// ChildPhotoCreateBulk is the builder for creating many ChildPhoto entities in bulk. +type ChildPhotoCreateBulk struct { + config + err error + builders []*ChildPhotoCreate +} + +// Save creates the ChildPhoto entities in the database. +func (cpcb *ChildPhotoCreateBulk) Save(ctx context.Context) ([]*ChildPhoto, error) { + if cpcb.err != nil { + return nil, cpcb.err + } + specs := make([]*sqlgraph.CreateSpec, len(cpcb.builders)) + nodes := make([]*ChildPhoto, len(cpcb.builders)) + mutators := make([]Mutator, len(cpcb.builders)) + for i := range cpcb.builders { + func(i int, root context.Context) { + builder := cpcb.builders[i] + builder.defaults() + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*ChildPhotoMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, cpcb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, cpcb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, cpcb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (cpcb *ChildPhotoCreateBulk) SaveX(ctx context.Context) []*ChildPhoto { + v, err := cpcb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (cpcb *ChildPhotoCreateBulk) Exec(ctx context.Context) error { + _, err := cpcb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cpcb *ChildPhotoCreateBulk) ExecX(ctx context.Context) { + if err := cpcb.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/childphoto_delete.go b/backend/domain/repository/ent/childphoto_delete.go new file mode 100644 index 00000000..4e12ea20 --- /dev/null +++ b/backend/domain/repository/ent/childphoto_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" +) + +// ChildPhotoDelete is the builder for deleting a ChildPhoto entity. +type ChildPhotoDelete struct { + config + hooks []Hook + mutation *ChildPhotoMutation +} + +// Where appends a list predicates to the ChildPhotoDelete builder. +func (cpd *ChildPhotoDelete) Where(ps ...predicate.ChildPhoto) *ChildPhotoDelete { + cpd.mutation.Where(ps...) + return cpd +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (cpd *ChildPhotoDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, cpd.sqlExec, cpd.mutation, cpd.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (cpd *ChildPhotoDelete) ExecX(ctx context.Context) int { + n, err := cpd.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (cpd *ChildPhotoDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(childphoto.Table, sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID)) + if ps := cpd.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, cpd.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + cpd.mutation.done = true + return affected, err +} + +// ChildPhotoDeleteOne is the builder for deleting a single ChildPhoto entity. +type ChildPhotoDeleteOne struct { + cpd *ChildPhotoDelete +} + +// Where appends a list predicates to the ChildPhotoDelete builder. +func (cpdo *ChildPhotoDeleteOne) Where(ps ...predicate.ChildPhoto) *ChildPhotoDeleteOne { + cpdo.cpd.mutation.Where(ps...) + return cpdo +} + +// Exec executes the deletion query. +func (cpdo *ChildPhotoDeleteOne) Exec(ctx context.Context) error { + n, err := cpdo.cpd.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{childphoto.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (cpdo *ChildPhotoDeleteOne) ExecX(ctx context.Context) { + if err := cpdo.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/childphoto_query.go b/backend/domain/repository/ent/childphoto_query.go new file mode 100644 index 00000000..bfb21c35 --- /dev/null +++ b/backend/domain/repository/ent/childphoto_query.go @@ -0,0 +1,614 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "fmt" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ChildPhotoQuery is the builder for querying ChildPhoto entities. +type ChildPhotoQuery struct { + config + ctx *QueryContext + order []childphoto.OrderOption + inters []Interceptor + predicates []predicate.ChildPhoto + withChild *ChildQuery + withFKs bool + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the ChildPhotoQuery builder. +func (cpq *ChildPhotoQuery) Where(ps ...predicate.ChildPhoto) *ChildPhotoQuery { + cpq.predicates = append(cpq.predicates, ps...) + return cpq +} + +// Limit the number of records to be returned by this query. +func (cpq *ChildPhotoQuery) Limit(limit int) *ChildPhotoQuery { + cpq.ctx.Limit = &limit + return cpq +} + +// Offset to start from. +func (cpq *ChildPhotoQuery) Offset(offset int) *ChildPhotoQuery { + cpq.ctx.Offset = &offset + return cpq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (cpq *ChildPhotoQuery) Unique(unique bool) *ChildPhotoQuery { + cpq.ctx.Unique = &unique + return cpq +} + +// Order specifies how the records should be ordered. +func (cpq *ChildPhotoQuery) Order(o ...childphoto.OrderOption) *ChildPhotoQuery { + cpq.order = append(cpq.order, o...) + return cpq +} + +// QueryChild chains the current query on the "child" edge. +func (cpq *ChildPhotoQuery) QueryChild() *ChildQuery { + query := (&ChildClient{config: cpq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := cpq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := cpq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(childphoto.Table, childphoto.FieldID, selector), + sqlgraph.To(child.Table, child.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, childphoto.ChildTable, childphoto.ChildColumn), + ) + fromU = sqlgraph.SetNeighbors(cpq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first ChildPhoto entity from the query. +// Returns a *NotFoundError when no ChildPhoto was found. +func (cpq *ChildPhotoQuery) First(ctx context.Context) (*ChildPhoto, error) { + nodes, err := cpq.Limit(1).All(setContextOp(ctx, cpq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{childphoto.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (cpq *ChildPhotoQuery) FirstX(ctx context.Context) *ChildPhoto { + node, err := cpq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first ChildPhoto ID from the query. +// Returns a *NotFoundError when no ChildPhoto ID was found. +func (cpq *ChildPhotoQuery) FirstID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = cpq.Limit(1).IDs(setContextOp(ctx, cpq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{childphoto.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (cpq *ChildPhotoQuery) FirstIDX(ctx context.Context) uuid.UUID { + id, err := cpq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single ChildPhoto entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one ChildPhoto entity is found. +// Returns a *NotFoundError when no ChildPhoto entities are found. +func (cpq *ChildPhotoQuery) Only(ctx context.Context) (*ChildPhoto, error) { + nodes, err := cpq.Limit(2).All(setContextOp(ctx, cpq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{childphoto.Label} + default: + return nil, &NotSingularError{childphoto.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (cpq *ChildPhotoQuery) OnlyX(ctx context.Context) *ChildPhoto { + node, err := cpq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only ChildPhoto ID in the query. +// Returns a *NotSingularError when more than one ChildPhoto ID is found. +// Returns a *NotFoundError when no entities are found. +func (cpq *ChildPhotoQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = cpq.Limit(2).IDs(setContextOp(ctx, cpq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{childphoto.Label} + default: + err = &NotSingularError{childphoto.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (cpq *ChildPhotoQuery) OnlyIDX(ctx context.Context) uuid.UUID { + id, err := cpq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of ChildPhotos. +func (cpq *ChildPhotoQuery) All(ctx context.Context) ([]*ChildPhoto, error) { + ctx = setContextOp(ctx, cpq.ctx, "All") + if err := cpq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*ChildPhoto, *ChildPhotoQuery]() + return withInterceptors[[]*ChildPhoto](ctx, cpq, qr, cpq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (cpq *ChildPhotoQuery) AllX(ctx context.Context) []*ChildPhoto { + nodes, err := cpq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of ChildPhoto IDs. +func (cpq *ChildPhotoQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error) { + if cpq.ctx.Unique == nil && cpq.path != nil { + cpq.Unique(true) + } + ctx = setContextOp(ctx, cpq.ctx, "IDs") + if err = cpq.Select(childphoto.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (cpq *ChildPhotoQuery) IDsX(ctx context.Context) []uuid.UUID { + ids, err := cpq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (cpq *ChildPhotoQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, cpq.ctx, "Count") + if err := cpq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, cpq, querierCount[*ChildPhotoQuery](), cpq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (cpq *ChildPhotoQuery) CountX(ctx context.Context) int { + count, err := cpq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (cpq *ChildPhotoQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, cpq.ctx, "Exist") + switch _, err := cpq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (cpq *ChildPhotoQuery) ExistX(ctx context.Context) bool { + exist, err := cpq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the ChildPhotoQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (cpq *ChildPhotoQuery) Clone() *ChildPhotoQuery { + if cpq == nil { + return nil + } + return &ChildPhotoQuery{ + config: cpq.config, + ctx: cpq.ctx.Clone(), + order: append([]childphoto.OrderOption{}, cpq.order...), + inters: append([]Interceptor{}, cpq.inters...), + predicates: append([]predicate.ChildPhoto{}, cpq.predicates...), + withChild: cpq.withChild.Clone(), + // clone intermediate query. + sql: cpq.sql.Clone(), + path: cpq.path, + } +} + +// WithChild tells the query-builder to eager-load the nodes that are connected to +// the "child" edge. The optional arguments are used to configure the query builder of the edge. +func (cpq *ChildPhotoQuery) WithChild(opts ...func(*ChildQuery)) *ChildPhotoQuery { + query := (&ChildClient{config: cpq.config}).Query() + for _, opt := range opts { + opt(query) + } + cpq.withChild = query + return cpq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// S3Bucket string `json:"s3_bucket,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.ChildPhoto.Query(). +// GroupBy(childphoto.FieldS3Bucket). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (cpq *ChildPhotoQuery) GroupBy(field string, fields ...string) *ChildPhotoGroupBy { + cpq.ctx.Fields = append([]string{field}, fields...) + grbuild := &ChildPhotoGroupBy{build: cpq} + grbuild.flds = &cpq.ctx.Fields + grbuild.label = childphoto.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// S3Bucket string `json:"s3_bucket,omitempty"` +// } +// +// client.ChildPhoto.Query(). +// Select(childphoto.FieldS3Bucket). +// Scan(ctx, &v) +func (cpq *ChildPhotoQuery) Select(fields ...string) *ChildPhotoSelect { + cpq.ctx.Fields = append(cpq.ctx.Fields, fields...) + sbuild := &ChildPhotoSelect{ChildPhotoQuery: cpq} + sbuild.label = childphoto.Label + sbuild.flds, sbuild.scan = &cpq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a ChildPhotoSelect configured with the given aggregations. +func (cpq *ChildPhotoQuery) Aggregate(fns ...AggregateFunc) *ChildPhotoSelect { + return cpq.Select().Aggregate(fns...) +} + +func (cpq *ChildPhotoQuery) prepareQuery(ctx context.Context) error { + for _, inter := range cpq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, cpq); err != nil { + return err + } + } + } + for _, f := range cpq.ctx.Fields { + if !childphoto.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if cpq.path != nil { + prev, err := cpq.path(ctx) + if err != nil { + return err + } + cpq.sql = prev + } + return nil +} + +func (cpq *ChildPhotoQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChildPhoto, error) { + var ( + nodes = []*ChildPhoto{} + withFKs = cpq.withFKs + _spec = cpq.querySpec() + loadedTypes = [1]bool{ + cpq.withChild != nil, + } + ) + if cpq.withChild != nil { + withFKs = true + } + if withFKs { + _spec.Node.Columns = append(_spec.Node.Columns, childphoto.ForeignKeys...) + } + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*ChildPhoto).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &ChildPhoto{config: cpq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, cpq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := cpq.withChild; query != nil { + if err := cpq.loadChild(ctx, query, nodes, nil, + func(n *ChildPhoto, e *Child) { n.Edges.Child = e }); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (cpq *ChildPhotoQuery) loadChild(ctx context.Context, query *ChildQuery, nodes []*ChildPhoto, init func(*ChildPhoto), assign func(*ChildPhoto, *Child)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*ChildPhoto) + for i := range nodes { + if nodes[i].child_photos == nil { + continue + } + fk := *nodes[i].child_photos + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(child.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "child_photos" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} + +func (cpq *ChildPhotoQuery) sqlCount(ctx context.Context) (int, error) { + _spec := cpq.querySpec() + _spec.Node.Columns = cpq.ctx.Fields + if len(cpq.ctx.Fields) > 0 { + _spec.Unique = cpq.ctx.Unique != nil && *cpq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, cpq.driver, _spec) +} + +func (cpq *ChildPhotoQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(childphoto.Table, childphoto.Columns, sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID)) + _spec.From = cpq.sql + if unique := cpq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if cpq.path != nil { + _spec.Unique = true + } + if fields := cpq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, childphoto.FieldID) + for i := range fields { + if fields[i] != childphoto.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + } + if ps := cpq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := cpq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := cpq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := cpq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (cpq *ChildPhotoQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(cpq.driver.Dialect()) + t1 := builder.Table(childphoto.Table) + columns := cpq.ctx.Fields + if len(columns) == 0 { + columns = childphoto.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if cpq.sql != nil { + selector = cpq.sql + selector.Select(selector.Columns(columns...)...) + } + if cpq.ctx.Unique != nil && *cpq.ctx.Unique { + selector.Distinct() + } + for _, p := range cpq.predicates { + p(selector) + } + for _, p := range cpq.order { + p(selector) + } + if offset := cpq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := cpq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// ChildPhotoGroupBy is the group-by builder for ChildPhoto entities. +type ChildPhotoGroupBy struct { + selector + build *ChildPhotoQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (cpgb *ChildPhotoGroupBy) Aggregate(fns ...AggregateFunc) *ChildPhotoGroupBy { + cpgb.fns = append(cpgb.fns, fns...) + return cpgb +} + +// Scan applies the selector query and scans the result into the given value. +func (cpgb *ChildPhotoGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, cpgb.build.ctx, "GroupBy") + if err := cpgb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*ChildPhotoQuery, *ChildPhotoGroupBy](ctx, cpgb.build, cpgb, cpgb.build.inters, v) +} + +func (cpgb *ChildPhotoGroupBy) sqlScan(ctx context.Context, root *ChildPhotoQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(cpgb.fns)) + for _, fn := range cpgb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*cpgb.flds)+len(cpgb.fns)) + for _, f := range *cpgb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*cpgb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := cpgb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// ChildPhotoSelect is the builder for selecting fields of ChildPhoto entities. +type ChildPhotoSelect struct { + *ChildPhotoQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (cps *ChildPhotoSelect) Aggregate(fns ...AggregateFunc) *ChildPhotoSelect { + cps.fns = append(cps.fns, fns...) + return cps +} + +// Scan applies the selector query and scans the result into the given value. +func (cps *ChildPhotoSelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, cps.ctx, "Select") + if err := cps.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*ChildPhotoQuery, *ChildPhotoSelect](ctx, cps.ChildPhotoQuery, cps, cps.inters, v) +} + +func (cps *ChildPhotoSelect) sqlScan(ctx context.Context, root *ChildPhotoQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(cps.fns)) + for _, fn := range cps.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*cps.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := cps.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/backend/domain/repository/ent/childphoto_update.go b/backend/domain/repository/ent/childphoto_update.go new file mode 100644 index 00000000..13268a3b --- /dev/null +++ b/backend/domain/repository/ent/childphoto_update.go @@ -0,0 +1,424 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ChildPhotoUpdate is the builder for updating ChildPhoto entities. +type ChildPhotoUpdate struct { + config + hooks []Hook + mutation *ChildPhotoMutation +} + +// Where appends a list predicates to the ChildPhotoUpdate builder. +func (cpu *ChildPhotoUpdate) Where(ps ...predicate.ChildPhoto) *ChildPhotoUpdate { + cpu.mutation.Where(ps...) + return cpu +} + +// SetS3Bucket sets the "s3_bucket" field. +func (cpu *ChildPhotoUpdate) SetS3Bucket(s string) *ChildPhotoUpdate { + cpu.mutation.SetS3Bucket(s) + return cpu +} + +// SetNillableS3Bucket sets the "s3_bucket" field if the given value is not nil. +func (cpu *ChildPhotoUpdate) SetNillableS3Bucket(s *string) *ChildPhotoUpdate { + if s != nil { + cpu.SetS3Bucket(*s) + } + return cpu +} + +// SetS3Key sets the "s3_key" field. +func (cpu *ChildPhotoUpdate) SetS3Key(s string) *ChildPhotoUpdate { + cpu.mutation.SetS3Key(s) + return cpu +} + +// SetNillableS3Key sets the "s3_key" field if the given value is not nil. +func (cpu *ChildPhotoUpdate) SetNillableS3Key(s *string) *ChildPhotoUpdate { + if s != nil { + cpu.SetS3Key(*s) + } + return cpu +} + +// SetCreatedAt sets the "created_at" field. +func (cpu *ChildPhotoUpdate) SetCreatedAt(t time.Time) *ChildPhotoUpdate { + cpu.mutation.SetCreatedAt(t) + return cpu +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (cpu *ChildPhotoUpdate) SetNillableCreatedAt(t *time.Time) *ChildPhotoUpdate { + if t != nil { + cpu.SetCreatedAt(*t) + } + return cpu +} + +// SetUpdatedAt sets the "updated_at" field. +func (cpu *ChildPhotoUpdate) SetUpdatedAt(t time.Time) *ChildPhotoUpdate { + cpu.mutation.SetUpdatedAt(t) + return cpu +} + +// SetChildID sets the "child" edge to the Child entity by ID. +func (cpu *ChildPhotoUpdate) SetChildID(id uuid.UUID) *ChildPhotoUpdate { + cpu.mutation.SetChildID(id) + return cpu +} + +// SetNillableChildID sets the "child" edge to the Child entity by ID if the given value is not nil. +func (cpu *ChildPhotoUpdate) SetNillableChildID(id *uuid.UUID) *ChildPhotoUpdate { + if id != nil { + cpu = cpu.SetChildID(*id) + } + return cpu +} + +// SetChild sets the "child" edge to the Child entity. +func (cpu *ChildPhotoUpdate) SetChild(c *Child) *ChildPhotoUpdate { + return cpu.SetChildID(c.ID) +} + +// Mutation returns the ChildPhotoMutation object of the builder. +func (cpu *ChildPhotoUpdate) Mutation() *ChildPhotoMutation { + return cpu.mutation +} + +// ClearChild clears the "child" edge to the Child entity. +func (cpu *ChildPhotoUpdate) ClearChild() *ChildPhotoUpdate { + cpu.mutation.ClearChild() + return cpu +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (cpu *ChildPhotoUpdate) Save(ctx context.Context) (int, error) { + cpu.defaults() + return withHooks(ctx, cpu.sqlSave, cpu.mutation, cpu.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (cpu *ChildPhotoUpdate) SaveX(ctx context.Context) int { + affected, err := cpu.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (cpu *ChildPhotoUpdate) Exec(ctx context.Context) error { + _, err := cpu.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cpu *ChildPhotoUpdate) ExecX(ctx context.Context) { + if err := cpu.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (cpu *ChildPhotoUpdate) defaults() { + if _, ok := cpu.mutation.UpdatedAt(); !ok { + v := childphoto.UpdateDefaultUpdatedAt() + cpu.mutation.SetUpdatedAt(v) + } +} + +func (cpu *ChildPhotoUpdate) sqlSave(ctx context.Context) (n int, err error) { + _spec := sqlgraph.NewUpdateSpec(childphoto.Table, childphoto.Columns, sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID)) + if ps := cpu.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := cpu.mutation.S3Bucket(); ok { + _spec.SetField(childphoto.FieldS3Bucket, field.TypeString, value) + } + if value, ok := cpu.mutation.S3Key(); ok { + _spec.SetField(childphoto.FieldS3Key, field.TypeString, value) + } + if value, ok := cpu.mutation.CreatedAt(); ok { + _spec.SetField(childphoto.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := cpu.mutation.UpdatedAt(); ok { + _spec.SetField(childphoto.FieldUpdatedAt, field.TypeTime, value) + } + if cpu.mutation.ChildCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childphoto.ChildTable, + Columns: []string{childphoto.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cpu.mutation.ChildIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childphoto.ChildTable, + Columns: []string{childphoto.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if n, err = sqlgraph.UpdateNodes(ctx, cpu.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{childphoto.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + cpu.mutation.done = true + return n, nil +} + +// ChildPhotoUpdateOne is the builder for updating a single ChildPhoto entity. +type ChildPhotoUpdateOne struct { + config + fields []string + hooks []Hook + mutation *ChildPhotoMutation +} + +// SetS3Bucket sets the "s3_bucket" field. +func (cpuo *ChildPhotoUpdateOne) SetS3Bucket(s string) *ChildPhotoUpdateOne { + cpuo.mutation.SetS3Bucket(s) + return cpuo +} + +// SetNillableS3Bucket sets the "s3_bucket" field if the given value is not nil. +func (cpuo *ChildPhotoUpdateOne) SetNillableS3Bucket(s *string) *ChildPhotoUpdateOne { + if s != nil { + cpuo.SetS3Bucket(*s) + } + return cpuo +} + +// SetS3Key sets the "s3_key" field. +func (cpuo *ChildPhotoUpdateOne) SetS3Key(s string) *ChildPhotoUpdateOne { + cpuo.mutation.SetS3Key(s) + return cpuo +} + +// SetNillableS3Key sets the "s3_key" field if the given value is not nil. +func (cpuo *ChildPhotoUpdateOne) SetNillableS3Key(s *string) *ChildPhotoUpdateOne { + if s != nil { + cpuo.SetS3Key(*s) + } + return cpuo +} + +// SetCreatedAt sets the "created_at" field. +func (cpuo *ChildPhotoUpdateOne) SetCreatedAt(t time.Time) *ChildPhotoUpdateOne { + cpuo.mutation.SetCreatedAt(t) + return cpuo +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (cpuo *ChildPhotoUpdateOne) SetNillableCreatedAt(t *time.Time) *ChildPhotoUpdateOne { + if t != nil { + cpuo.SetCreatedAt(*t) + } + return cpuo +} + +// SetUpdatedAt sets the "updated_at" field. +func (cpuo *ChildPhotoUpdateOne) SetUpdatedAt(t time.Time) *ChildPhotoUpdateOne { + cpuo.mutation.SetUpdatedAt(t) + return cpuo +} + +// SetChildID sets the "child" edge to the Child entity by ID. +func (cpuo *ChildPhotoUpdateOne) SetChildID(id uuid.UUID) *ChildPhotoUpdateOne { + cpuo.mutation.SetChildID(id) + return cpuo +} + +// SetNillableChildID sets the "child" edge to the Child entity by ID if the given value is not nil. +func (cpuo *ChildPhotoUpdateOne) SetNillableChildID(id *uuid.UUID) *ChildPhotoUpdateOne { + if id != nil { + cpuo = cpuo.SetChildID(*id) + } + return cpuo +} + +// SetChild sets the "child" edge to the Child entity. +func (cpuo *ChildPhotoUpdateOne) SetChild(c *Child) *ChildPhotoUpdateOne { + return cpuo.SetChildID(c.ID) +} + +// Mutation returns the ChildPhotoMutation object of the builder. +func (cpuo *ChildPhotoUpdateOne) Mutation() *ChildPhotoMutation { + return cpuo.mutation +} + +// ClearChild clears the "child" edge to the Child entity. +func (cpuo *ChildPhotoUpdateOne) ClearChild() *ChildPhotoUpdateOne { + cpuo.mutation.ClearChild() + return cpuo +} + +// Where appends a list predicates to the ChildPhotoUpdate builder. +func (cpuo *ChildPhotoUpdateOne) Where(ps ...predicate.ChildPhoto) *ChildPhotoUpdateOne { + cpuo.mutation.Where(ps...) + return cpuo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (cpuo *ChildPhotoUpdateOne) Select(field string, fields ...string) *ChildPhotoUpdateOne { + cpuo.fields = append([]string{field}, fields...) + return cpuo +} + +// Save executes the query and returns the updated ChildPhoto entity. +func (cpuo *ChildPhotoUpdateOne) Save(ctx context.Context) (*ChildPhoto, error) { + cpuo.defaults() + return withHooks(ctx, cpuo.sqlSave, cpuo.mutation, cpuo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (cpuo *ChildPhotoUpdateOne) SaveX(ctx context.Context) *ChildPhoto { + node, err := cpuo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (cpuo *ChildPhotoUpdateOne) Exec(ctx context.Context) error { + _, err := cpuo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (cpuo *ChildPhotoUpdateOne) ExecX(ctx context.Context) { + if err := cpuo.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (cpuo *ChildPhotoUpdateOne) defaults() { + if _, ok := cpuo.mutation.UpdatedAt(); !ok { + v := childphoto.UpdateDefaultUpdatedAt() + cpuo.mutation.SetUpdatedAt(v) + } +} + +func (cpuo *ChildPhotoUpdateOne) sqlSave(ctx context.Context) (_node *ChildPhoto, err error) { + _spec := sqlgraph.NewUpdateSpec(childphoto.Table, childphoto.Columns, sqlgraph.NewFieldSpec(childphoto.FieldID, field.TypeUUID)) + id, ok := cpuo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "ChildPhoto.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := cpuo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, childphoto.FieldID) + for _, f := range fields { + if !childphoto.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != childphoto.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := cpuo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := cpuo.mutation.S3Bucket(); ok { + _spec.SetField(childphoto.FieldS3Bucket, field.TypeString, value) + } + if value, ok := cpuo.mutation.S3Key(); ok { + _spec.SetField(childphoto.FieldS3Key, field.TypeString, value) + } + if value, ok := cpuo.mutation.CreatedAt(); ok { + _spec.SetField(childphoto.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := cpuo.mutation.UpdatedAt(); ok { + _spec.SetField(childphoto.FieldUpdatedAt, field.TypeTime, value) + } + if cpuo.mutation.ChildCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childphoto.ChildTable, + Columns: []string{childphoto.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := cpuo.mutation.ChildIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: childphoto.ChildTable, + Columns: []string{childphoto.ChildColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + _node = &ChildPhoto{config: cpuo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, cpuo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{childphoto.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + cpuo.mutation.done = true + return _node, nil +} diff --git a/backend/domain/repository/ent/client.go b/backend/domain/repository/ent/client.go new file mode 100644 index 00000000..9d922f24 --- /dev/null +++ b/backend/domain/repository/ent/client.go @@ -0,0 +1,1693 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "log" + "reflect" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/migrate" + "github.com/google/uuid" + + "entgo.io/ent" + "entgo.io/ent/dialect" + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" +) + +// Client is the client that holds all ent builders. +type Client struct { + config + // Schema is the client for creating, migrating and dropping schema. + Schema *migrate.Schema + // BoardingRecord is the client for interacting with the BoardingRecord builders. + BoardingRecord *BoardingRecordClient + // Bus is the client for interacting with the Bus builders. + Bus *BusClient + // Child is the client for interacting with the Child builders. + Child *ChildClient + // ChildBusAssociation is the client for interacting with the ChildBusAssociation builders. + ChildBusAssociation *ChildBusAssociationClient + // ChildPhoto is the client for interacting with the ChildPhoto builders. + ChildPhoto *ChildPhotoClient + // Guardian is the client for interacting with the Guardian builders. + Guardian *GuardianClient + // Nursery is the client for interacting with the Nursery builders. + Nursery *NurseryClient + // Station is the client for interacting with the Station builders. + Station *StationClient +} + +// NewClient creates a new client configured with the given options. +func NewClient(opts ...Option) *Client { + client := &Client{config: newConfig(opts...)} + client.init() + return client +} + +func (c *Client) init() { + c.Schema = migrate.NewSchema(c.driver) + c.BoardingRecord = NewBoardingRecordClient(c.config) + c.Bus = NewBusClient(c.config) + c.Child = NewChildClient(c.config) + c.ChildBusAssociation = NewChildBusAssociationClient(c.config) + c.ChildPhoto = NewChildPhotoClient(c.config) + c.Guardian = NewGuardianClient(c.config) + c.Nursery = NewNurseryClient(c.config) + c.Station = NewStationClient(c.config) +} + +type ( + // config is the configuration for the client and its builder. + config struct { + // driver used for executing database requests. + driver dialect.Driver + // debug enable a debug logging. + debug bool + // log used for logging on debug mode. + log func(...any) + // hooks to execute on mutations. + hooks *hooks + // interceptors to execute on queries. + inters *inters + } + // Option function to configure the client. + Option func(*config) +) + +// newConfig creates a new config for the client. +func newConfig(opts ...Option) config { + cfg := config{log: log.Println, hooks: &hooks{}, inters: &inters{}} + cfg.options(opts...) + return cfg +} + +// options applies the options on the config object. +func (c *config) options(opts ...Option) { + for _, opt := range opts { + opt(c) + } + if c.debug { + c.driver = dialect.Debug(c.driver, c.log) + } +} + +// Debug enables debug logging on the ent.Driver. +func Debug() Option { + return func(c *config) { + c.debug = true + } +} + +// Log sets the logging function for debug mode. +func Log(fn func(...any)) Option { + return func(c *config) { + c.log = fn + } +} + +// Driver configures the client driver. +func Driver(driver dialect.Driver) Option { + return func(c *config) { + c.driver = driver + } +} + +// Open opens a database/sql.DB specified by the driver name and +// the data source name, and returns a new client attached to it. +// Optional parameters can be added for configuring the client. +func Open(driverName, dataSourceName string, options ...Option) (*Client, error) { + switch driverName { + case dialect.MySQL, dialect.Postgres, dialect.SQLite: + drv, err := sql.Open(driverName, dataSourceName) + if err != nil { + return nil, err + } + return NewClient(append(options, Driver(drv))...), nil + default: + return nil, fmt.Errorf("unsupported driver: %q", driverName) + } +} + +// ErrTxStarted is returned when trying to start a new transaction from a transactional client. +var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction") + +// Tx returns a new transactional client. The provided context +// is used until the transaction is committed or rolled back. +func (c *Client) Tx(ctx context.Context) (*Tx, error) { + if _, ok := c.driver.(*txDriver); ok { + return nil, ErrTxStarted + } + tx, err := newTx(ctx, c.driver) + if err != nil { + return nil, fmt.Errorf("ent: starting a transaction: %w", err) + } + cfg := c.config + cfg.driver = tx + return &Tx{ + ctx: ctx, + config: cfg, + BoardingRecord: NewBoardingRecordClient(cfg), + Bus: NewBusClient(cfg), + Child: NewChildClient(cfg), + ChildBusAssociation: NewChildBusAssociationClient(cfg), + ChildPhoto: NewChildPhotoClient(cfg), + Guardian: NewGuardianClient(cfg), + Nursery: NewNurseryClient(cfg), + Station: NewStationClient(cfg), + }, nil +} + +// BeginTx returns a transactional client with specified options. +func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) { + if _, ok := c.driver.(*txDriver); ok { + return nil, errors.New("ent: cannot start a transaction within a transaction") + } + tx, err := c.driver.(interface { + BeginTx(context.Context, *sql.TxOptions) (dialect.Tx, error) + }).BeginTx(ctx, opts) + if err != nil { + return nil, fmt.Errorf("ent: starting a transaction: %w", err) + } + cfg := c.config + cfg.driver = &txDriver{tx: tx, drv: c.driver} + return &Tx{ + ctx: ctx, + config: cfg, + BoardingRecord: NewBoardingRecordClient(cfg), + Bus: NewBusClient(cfg), + Child: NewChildClient(cfg), + ChildBusAssociation: NewChildBusAssociationClient(cfg), + ChildPhoto: NewChildPhotoClient(cfg), + Guardian: NewGuardianClient(cfg), + Nursery: NewNurseryClient(cfg), + Station: NewStationClient(cfg), + }, nil +} + +// Debug returns a new debug-client. It's used to get verbose logging on specific operations. +// +// client.Debug(). +// BoardingRecord. +// Query(). +// Count(ctx) +func (c *Client) Debug() *Client { + if c.debug { + return c + } + cfg := c.config + cfg.driver = dialect.Debug(c.driver, c.log) + client := &Client{config: cfg} + client.init() + return client +} + +// Close closes the database connection and prevents new queries from starting. +func (c *Client) Close() error { + return c.driver.Close() +} + +// Use adds the mutation hooks to all the entity clients. +// In order to add hooks to a specific client, call: `client.Node.Use(...)`. +func (c *Client) Use(hooks ...Hook) { + for _, n := range []interface{ Use(...Hook) }{ + c.BoardingRecord, c.Bus, c.Child, c.ChildBusAssociation, c.ChildPhoto, + c.Guardian, c.Nursery, c.Station, + } { + n.Use(hooks...) + } +} + +// Intercept adds the query interceptors to all the entity clients. +// In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`. +func (c *Client) Intercept(interceptors ...Interceptor) { + for _, n := range []interface{ Intercept(...Interceptor) }{ + c.BoardingRecord, c.Bus, c.Child, c.ChildBusAssociation, c.ChildPhoto, + c.Guardian, c.Nursery, c.Station, + } { + n.Intercept(interceptors...) + } +} + +// Mutate implements the ent.Mutator interface. +func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error) { + switch m := m.(type) { + case *BoardingRecordMutation: + return c.BoardingRecord.mutate(ctx, m) + case *BusMutation: + return c.Bus.mutate(ctx, m) + case *ChildMutation: + return c.Child.mutate(ctx, m) + case *ChildBusAssociationMutation: + return c.ChildBusAssociation.mutate(ctx, m) + case *ChildPhotoMutation: + return c.ChildPhoto.mutate(ctx, m) + case *GuardianMutation: + return c.Guardian.mutate(ctx, m) + case *NurseryMutation: + return c.Nursery.mutate(ctx, m) + case *StationMutation: + return c.Station.mutate(ctx, m) + default: + return nil, fmt.Errorf("ent: unknown mutation type %T", m) + } +} + +// BoardingRecordClient is a client for the BoardingRecord schema. +type BoardingRecordClient struct { + config +} + +// NewBoardingRecordClient returns a client for the BoardingRecord from the given config. +func NewBoardingRecordClient(c config) *BoardingRecordClient { + return &BoardingRecordClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `boardingrecord.Hooks(f(g(h())))`. +func (c *BoardingRecordClient) Use(hooks ...Hook) { + c.hooks.BoardingRecord = append(c.hooks.BoardingRecord, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `boardingrecord.Intercept(f(g(h())))`. +func (c *BoardingRecordClient) Intercept(interceptors ...Interceptor) { + c.inters.BoardingRecord = append(c.inters.BoardingRecord, interceptors...) +} + +// Create returns a builder for creating a BoardingRecord entity. +func (c *BoardingRecordClient) Create() *BoardingRecordCreate { + mutation := newBoardingRecordMutation(c.config, OpCreate) + return &BoardingRecordCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of BoardingRecord entities. +func (c *BoardingRecordClient) CreateBulk(builders ...*BoardingRecordCreate) *BoardingRecordCreateBulk { + return &BoardingRecordCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *BoardingRecordClient) MapCreateBulk(slice any, setFunc func(*BoardingRecordCreate, int)) *BoardingRecordCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &BoardingRecordCreateBulk{err: fmt.Errorf("calling to BoardingRecordClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*BoardingRecordCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &BoardingRecordCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for BoardingRecord. +func (c *BoardingRecordClient) Update() *BoardingRecordUpdate { + mutation := newBoardingRecordMutation(c.config, OpUpdate) + return &BoardingRecordUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *BoardingRecordClient) UpdateOne(br *BoardingRecord) *BoardingRecordUpdateOne { + mutation := newBoardingRecordMutation(c.config, OpUpdateOne, withBoardingRecord(br)) + return &BoardingRecordUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *BoardingRecordClient) UpdateOneID(id uuid.UUID) *BoardingRecordUpdateOne { + mutation := newBoardingRecordMutation(c.config, OpUpdateOne, withBoardingRecordID(id)) + return &BoardingRecordUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for BoardingRecord. +func (c *BoardingRecordClient) Delete() *BoardingRecordDelete { + mutation := newBoardingRecordMutation(c.config, OpDelete) + return &BoardingRecordDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *BoardingRecordClient) DeleteOne(br *BoardingRecord) *BoardingRecordDeleteOne { + return c.DeleteOneID(br.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *BoardingRecordClient) DeleteOneID(id uuid.UUID) *BoardingRecordDeleteOne { + builder := c.Delete().Where(boardingrecord.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &BoardingRecordDeleteOne{builder} +} + +// Query returns a query builder for BoardingRecord. +func (c *BoardingRecordClient) Query() *BoardingRecordQuery { + return &BoardingRecordQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeBoardingRecord}, + inters: c.Interceptors(), + } +} + +// Get returns a BoardingRecord entity by its id. +func (c *BoardingRecordClient) Get(ctx context.Context, id uuid.UUID) (*BoardingRecord, error) { + return c.Query().Where(boardingrecord.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *BoardingRecordClient) GetX(ctx context.Context, id uuid.UUID) *BoardingRecord { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryChild queries the child edge of a BoardingRecord. +func (c *BoardingRecordClient) QueryChild(br *BoardingRecord) *ChildQuery { + query := (&ChildClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := br.ID + step := sqlgraph.NewStep( + sqlgraph.From(boardingrecord.Table, boardingrecord.FieldID, id), + sqlgraph.To(child.Table, child.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, boardingrecord.ChildTable, boardingrecord.ChildColumn), + ) + fromV = sqlgraph.Neighbors(br.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryBus queries the bus edge of a BoardingRecord. +func (c *BoardingRecordClient) QueryBus(br *BoardingRecord) *BusQuery { + query := (&BusClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := br.ID + step := sqlgraph.NewStep( + sqlgraph.From(boardingrecord.Table, boardingrecord.FieldID, id), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, boardingrecord.BusTable, boardingrecord.BusColumn), + ) + fromV = sqlgraph.Neighbors(br.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// Hooks returns the client hooks. +func (c *BoardingRecordClient) Hooks() []Hook { + return c.hooks.BoardingRecord +} + +// Interceptors returns the client interceptors. +func (c *BoardingRecordClient) Interceptors() []Interceptor { + return c.inters.BoardingRecord +} + +func (c *BoardingRecordClient) mutate(ctx context.Context, m *BoardingRecordMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&BoardingRecordCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&BoardingRecordUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&BoardingRecordUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&BoardingRecordDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown BoardingRecord mutation op: %q", m.Op()) + } +} + +// BusClient is a client for the Bus schema. +type BusClient struct { + config +} + +// NewBusClient returns a client for the Bus from the given config. +func NewBusClient(c config) *BusClient { + return &BusClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `bus.Hooks(f(g(h())))`. +func (c *BusClient) Use(hooks ...Hook) { + c.hooks.Bus = append(c.hooks.Bus, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `bus.Intercept(f(g(h())))`. +func (c *BusClient) Intercept(interceptors ...Interceptor) { + c.inters.Bus = append(c.inters.Bus, interceptors...) +} + +// Create returns a builder for creating a Bus entity. +func (c *BusClient) Create() *BusCreate { + mutation := newBusMutation(c.config, OpCreate) + return &BusCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of Bus entities. +func (c *BusClient) CreateBulk(builders ...*BusCreate) *BusCreateBulk { + return &BusCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *BusClient) MapCreateBulk(slice any, setFunc func(*BusCreate, int)) *BusCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &BusCreateBulk{err: fmt.Errorf("calling to BusClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*BusCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &BusCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for Bus. +func (c *BusClient) Update() *BusUpdate { + mutation := newBusMutation(c.config, OpUpdate) + return &BusUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *BusClient) UpdateOne(b *Bus) *BusUpdateOne { + mutation := newBusMutation(c.config, OpUpdateOne, withBus(b)) + return &BusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *BusClient) UpdateOneID(id uuid.UUID) *BusUpdateOne { + mutation := newBusMutation(c.config, OpUpdateOne, withBusID(id)) + return &BusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for Bus. +func (c *BusClient) Delete() *BusDelete { + mutation := newBusMutation(c.config, OpDelete) + return &BusDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *BusClient) DeleteOne(b *Bus) *BusDeleteOne { + return c.DeleteOneID(b.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *BusClient) DeleteOneID(id uuid.UUID) *BusDeleteOne { + builder := c.Delete().Where(bus.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &BusDeleteOne{builder} +} + +// Query returns a query builder for Bus. +func (c *BusClient) Query() *BusQuery { + return &BusQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeBus}, + inters: c.Interceptors(), + } +} + +// Get returns a Bus entity by its id. +func (c *BusClient) Get(ctx context.Context, id uuid.UUID) (*Bus, error) { + return c.Query().Where(bus.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *BusClient) GetX(ctx context.Context, id uuid.UUID) *Bus { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryNursery queries the nursery edge of a Bus. +func (c *BusClient) QueryNursery(b *Bus) *NurseryQuery { + query := (&NurseryClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.To(nursery.Table, nursery.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.NurseryTable, bus.NurseryColumn), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryStations queries the stations edge of a Bus. +func (c *BusClient) QueryStations(b *Bus) *StationQuery { + query := (&StationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2M, false, bus.StationsTable, bus.StationsPrimaryKey...), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryBoardingRecords queries the boarding_records edge of a Bus. +func (c *BusClient) QueryBoardingRecords(b *Bus) *BoardingRecordQuery { + query := (&BoardingRecordClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.To(boardingrecord.Table, boardingrecord.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, bus.BoardingRecordsTable, bus.BoardingRecordsColumn), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryChildBusAssociations queries the childBusAssociations edge of a Bus. +func (c *BusClient) QueryChildBusAssociations(b *Bus) *ChildBusAssociationQuery { + query := (&ChildBusAssociationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.To(childbusassociation.Table, childbusassociation.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, bus.ChildBusAssociationsTable, bus.ChildBusAssociationsColumn), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// Hooks returns the client hooks. +func (c *BusClient) Hooks() []Hook { + return c.hooks.Bus +} + +// Interceptors returns the client interceptors. +func (c *BusClient) Interceptors() []Interceptor { + return c.inters.Bus +} + +func (c *BusClient) mutate(ctx context.Context, m *BusMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&BusCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&BusUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&BusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&BusDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown Bus mutation op: %q", m.Op()) + } +} + +// ChildClient is a client for the Child schema. +type ChildClient struct { + config +} + +// NewChildClient returns a client for the Child from the given config. +func NewChildClient(c config) *ChildClient { + return &ChildClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `child.Hooks(f(g(h())))`. +func (c *ChildClient) Use(hooks ...Hook) { + c.hooks.Child = append(c.hooks.Child, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `child.Intercept(f(g(h())))`. +func (c *ChildClient) Intercept(interceptors ...Interceptor) { + c.inters.Child = append(c.inters.Child, interceptors...) +} + +// Create returns a builder for creating a Child entity. +func (c *ChildClient) Create() *ChildCreate { + mutation := newChildMutation(c.config, OpCreate) + return &ChildCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of Child entities. +func (c *ChildClient) CreateBulk(builders ...*ChildCreate) *ChildCreateBulk { + return &ChildCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *ChildClient) MapCreateBulk(slice any, setFunc func(*ChildCreate, int)) *ChildCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &ChildCreateBulk{err: fmt.Errorf("calling to ChildClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*ChildCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &ChildCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for Child. +func (c *ChildClient) Update() *ChildUpdate { + mutation := newChildMutation(c.config, OpUpdate) + return &ChildUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *ChildClient) UpdateOne(ch *Child) *ChildUpdateOne { + mutation := newChildMutation(c.config, OpUpdateOne, withChild(ch)) + return &ChildUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *ChildClient) UpdateOneID(id uuid.UUID) *ChildUpdateOne { + mutation := newChildMutation(c.config, OpUpdateOne, withChildID(id)) + return &ChildUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for Child. +func (c *ChildClient) Delete() *ChildDelete { + mutation := newChildMutation(c.config, OpDelete) + return &ChildDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *ChildClient) DeleteOne(ch *Child) *ChildDeleteOne { + return c.DeleteOneID(ch.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *ChildClient) DeleteOneID(id uuid.UUID) *ChildDeleteOne { + builder := c.Delete().Where(child.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &ChildDeleteOne{builder} +} + +// Query returns a query builder for Child. +func (c *ChildClient) Query() *ChildQuery { + return &ChildQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeChild}, + inters: c.Interceptors(), + } +} + +// Get returns a Child entity by its id. +func (c *ChildClient) Get(ctx context.Context, id uuid.UUID) (*Child, error) { + return c.Query().Where(child.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *ChildClient) GetX(ctx context.Context, id uuid.UUID) *Child { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryGuardian queries the guardian edge of a Child. +func (c *ChildClient) QueryGuardian(ch *Child) *GuardianQuery { + query := (&GuardianClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := ch.ID + step := sqlgraph.NewStep( + sqlgraph.From(child.Table, child.FieldID, id), + sqlgraph.To(guardian.Table, guardian.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, child.GuardianTable, child.GuardianColumn), + ) + fromV = sqlgraph.Neighbors(ch.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryChildBusAssociations queries the childBusAssociations edge of a Child. +func (c *ChildClient) QueryChildBusAssociations(ch *Child) *ChildBusAssociationQuery { + query := (&ChildBusAssociationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := ch.ID + step := sqlgraph.NewStep( + sqlgraph.From(child.Table, child.FieldID, id), + sqlgraph.To(childbusassociation.Table, childbusassociation.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, child.ChildBusAssociationsTable, child.ChildBusAssociationsColumn), + ) + fromV = sqlgraph.Neighbors(ch.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryNursery queries the nursery edge of a Child. +func (c *ChildClient) QueryNursery(ch *Child) *NurseryQuery { + query := (&NurseryClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := ch.ID + step := sqlgraph.NewStep( + sqlgraph.From(child.Table, child.FieldID, id), + sqlgraph.To(nursery.Table, nursery.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, child.NurseryTable, child.NurseryColumn), + ) + fromV = sqlgraph.Neighbors(ch.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryBoardingRecord queries the boarding_record edge of a Child. +func (c *ChildClient) QueryBoardingRecord(ch *Child) *BoardingRecordQuery { + query := (&BoardingRecordClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := ch.ID + step := sqlgraph.NewStep( + sqlgraph.From(child.Table, child.FieldID, id), + sqlgraph.To(boardingrecord.Table, boardingrecord.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, child.BoardingRecordTable, child.BoardingRecordColumn), + ) + fromV = sqlgraph.Neighbors(ch.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryPhotos queries the photos edge of a Child. +func (c *ChildClient) QueryPhotos(ch *Child) *ChildPhotoQuery { + query := (&ChildPhotoClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := ch.ID + step := sqlgraph.NewStep( + sqlgraph.From(child.Table, child.FieldID, id), + sqlgraph.To(childphoto.Table, childphoto.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, child.PhotosTable, child.PhotosColumn), + ) + fromV = sqlgraph.Neighbors(ch.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// Hooks returns the client hooks. +func (c *ChildClient) Hooks() []Hook { + return c.hooks.Child +} + +// Interceptors returns the client interceptors. +func (c *ChildClient) Interceptors() []Interceptor { + return c.inters.Child +} + +func (c *ChildClient) mutate(ctx context.Context, m *ChildMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&ChildCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&ChildUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&ChildUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&ChildDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown Child mutation op: %q", m.Op()) + } +} + +// ChildBusAssociationClient is a client for the ChildBusAssociation schema. +type ChildBusAssociationClient struct { + config +} + +// NewChildBusAssociationClient returns a client for the ChildBusAssociation from the given config. +func NewChildBusAssociationClient(c config) *ChildBusAssociationClient { + return &ChildBusAssociationClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `childbusassociation.Hooks(f(g(h())))`. +func (c *ChildBusAssociationClient) Use(hooks ...Hook) { + c.hooks.ChildBusAssociation = append(c.hooks.ChildBusAssociation, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `childbusassociation.Intercept(f(g(h())))`. +func (c *ChildBusAssociationClient) Intercept(interceptors ...Interceptor) { + c.inters.ChildBusAssociation = append(c.inters.ChildBusAssociation, interceptors...) +} + +// Create returns a builder for creating a ChildBusAssociation entity. +func (c *ChildBusAssociationClient) Create() *ChildBusAssociationCreate { + mutation := newChildBusAssociationMutation(c.config, OpCreate) + return &ChildBusAssociationCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of ChildBusAssociation entities. +func (c *ChildBusAssociationClient) CreateBulk(builders ...*ChildBusAssociationCreate) *ChildBusAssociationCreateBulk { + return &ChildBusAssociationCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *ChildBusAssociationClient) MapCreateBulk(slice any, setFunc func(*ChildBusAssociationCreate, int)) *ChildBusAssociationCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &ChildBusAssociationCreateBulk{err: fmt.Errorf("calling to ChildBusAssociationClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*ChildBusAssociationCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &ChildBusAssociationCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for ChildBusAssociation. +func (c *ChildBusAssociationClient) Update() *ChildBusAssociationUpdate { + mutation := newChildBusAssociationMutation(c.config, OpUpdate) + return &ChildBusAssociationUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *ChildBusAssociationClient) UpdateOne(cba *ChildBusAssociation) *ChildBusAssociationUpdateOne { + mutation := newChildBusAssociationMutation(c.config, OpUpdateOne, withChildBusAssociation(cba)) + return &ChildBusAssociationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *ChildBusAssociationClient) UpdateOneID(id int) *ChildBusAssociationUpdateOne { + mutation := newChildBusAssociationMutation(c.config, OpUpdateOne, withChildBusAssociationID(id)) + return &ChildBusAssociationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for ChildBusAssociation. +func (c *ChildBusAssociationClient) Delete() *ChildBusAssociationDelete { + mutation := newChildBusAssociationMutation(c.config, OpDelete) + return &ChildBusAssociationDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *ChildBusAssociationClient) DeleteOne(cba *ChildBusAssociation) *ChildBusAssociationDeleteOne { + return c.DeleteOneID(cba.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *ChildBusAssociationClient) DeleteOneID(id int) *ChildBusAssociationDeleteOne { + builder := c.Delete().Where(childbusassociation.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &ChildBusAssociationDeleteOne{builder} +} + +// Query returns a query builder for ChildBusAssociation. +func (c *ChildBusAssociationClient) Query() *ChildBusAssociationQuery { + return &ChildBusAssociationQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeChildBusAssociation}, + inters: c.Interceptors(), + } +} + +// Get returns a ChildBusAssociation entity by its id. +func (c *ChildBusAssociationClient) Get(ctx context.Context, id int) (*ChildBusAssociation, error) { + return c.Query().Where(childbusassociation.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *ChildBusAssociationClient) GetX(ctx context.Context, id int) *ChildBusAssociation { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryChild queries the child edge of a ChildBusAssociation. +func (c *ChildBusAssociationClient) QueryChild(cba *ChildBusAssociation) *ChildQuery { + query := (&ChildClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := cba.ID + step := sqlgraph.NewStep( + sqlgraph.From(childbusassociation.Table, childbusassociation.FieldID, id), + sqlgraph.To(child.Table, child.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, childbusassociation.ChildTable, childbusassociation.ChildColumn), + ) + fromV = sqlgraph.Neighbors(cba.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryBus queries the bus edge of a ChildBusAssociation. +func (c *ChildBusAssociationClient) QueryBus(cba *ChildBusAssociation) *BusQuery { + query := (&BusClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := cba.ID + step := sqlgraph.NewStep( + sqlgraph.From(childbusassociation.Table, childbusassociation.FieldID, id), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, childbusassociation.BusTable, childbusassociation.BusColumn), + ) + fromV = sqlgraph.Neighbors(cba.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// Hooks returns the client hooks. +func (c *ChildBusAssociationClient) Hooks() []Hook { + return c.hooks.ChildBusAssociation +} + +// Interceptors returns the client interceptors. +func (c *ChildBusAssociationClient) Interceptors() []Interceptor { + return c.inters.ChildBusAssociation +} + +func (c *ChildBusAssociationClient) mutate(ctx context.Context, m *ChildBusAssociationMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&ChildBusAssociationCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&ChildBusAssociationUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&ChildBusAssociationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&ChildBusAssociationDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown ChildBusAssociation mutation op: %q", m.Op()) + } +} + +// ChildPhotoClient is a client for the ChildPhoto schema. +type ChildPhotoClient struct { + config +} + +// NewChildPhotoClient returns a client for the ChildPhoto from the given config. +func NewChildPhotoClient(c config) *ChildPhotoClient { + return &ChildPhotoClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `childphoto.Hooks(f(g(h())))`. +func (c *ChildPhotoClient) Use(hooks ...Hook) { + c.hooks.ChildPhoto = append(c.hooks.ChildPhoto, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `childphoto.Intercept(f(g(h())))`. +func (c *ChildPhotoClient) Intercept(interceptors ...Interceptor) { + c.inters.ChildPhoto = append(c.inters.ChildPhoto, interceptors...) +} + +// Create returns a builder for creating a ChildPhoto entity. +func (c *ChildPhotoClient) Create() *ChildPhotoCreate { + mutation := newChildPhotoMutation(c.config, OpCreate) + return &ChildPhotoCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of ChildPhoto entities. +func (c *ChildPhotoClient) CreateBulk(builders ...*ChildPhotoCreate) *ChildPhotoCreateBulk { + return &ChildPhotoCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *ChildPhotoClient) MapCreateBulk(slice any, setFunc func(*ChildPhotoCreate, int)) *ChildPhotoCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &ChildPhotoCreateBulk{err: fmt.Errorf("calling to ChildPhotoClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*ChildPhotoCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &ChildPhotoCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for ChildPhoto. +func (c *ChildPhotoClient) Update() *ChildPhotoUpdate { + mutation := newChildPhotoMutation(c.config, OpUpdate) + return &ChildPhotoUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *ChildPhotoClient) UpdateOne(cp *ChildPhoto) *ChildPhotoUpdateOne { + mutation := newChildPhotoMutation(c.config, OpUpdateOne, withChildPhoto(cp)) + return &ChildPhotoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *ChildPhotoClient) UpdateOneID(id uuid.UUID) *ChildPhotoUpdateOne { + mutation := newChildPhotoMutation(c.config, OpUpdateOne, withChildPhotoID(id)) + return &ChildPhotoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for ChildPhoto. +func (c *ChildPhotoClient) Delete() *ChildPhotoDelete { + mutation := newChildPhotoMutation(c.config, OpDelete) + return &ChildPhotoDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *ChildPhotoClient) DeleteOne(cp *ChildPhoto) *ChildPhotoDeleteOne { + return c.DeleteOneID(cp.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *ChildPhotoClient) DeleteOneID(id uuid.UUID) *ChildPhotoDeleteOne { + builder := c.Delete().Where(childphoto.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &ChildPhotoDeleteOne{builder} +} + +// Query returns a query builder for ChildPhoto. +func (c *ChildPhotoClient) Query() *ChildPhotoQuery { + return &ChildPhotoQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeChildPhoto}, + inters: c.Interceptors(), + } +} + +// Get returns a ChildPhoto entity by its id. +func (c *ChildPhotoClient) Get(ctx context.Context, id uuid.UUID) (*ChildPhoto, error) { + return c.Query().Where(childphoto.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *ChildPhotoClient) GetX(ctx context.Context, id uuid.UUID) *ChildPhoto { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryChild queries the child edge of a ChildPhoto. +func (c *ChildPhotoClient) QueryChild(cp *ChildPhoto) *ChildQuery { + query := (&ChildClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := cp.ID + step := sqlgraph.NewStep( + sqlgraph.From(childphoto.Table, childphoto.FieldID, id), + sqlgraph.To(child.Table, child.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, childphoto.ChildTable, childphoto.ChildColumn), + ) + fromV = sqlgraph.Neighbors(cp.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// Hooks returns the client hooks. +func (c *ChildPhotoClient) Hooks() []Hook { + return c.hooks.ChildPhoto +} + +// Interceptors returns the client interceptors. +func (c *ChildPhotoClient) Interceptors() []Interceptor { + return c.inters.ChildPhoto +} + +func (c *ChildPhotoClient) mutate(ctx context.Context, m *ChildPhotoMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&ChildPhotoCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&ChildPhotoUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&ChildPhotoUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&ChildPhotoDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown ChildPhoto mutation op: %q", m.Op()) + } +} + +// GuardianClient is a client for the Guardian schema. +type GuardianClient struct { + config +} + +// NewGuardianClient returns a client for the Guardian from the given config. +func NewGuardianClient(c config) *GuardianClient { + return &GuardianClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `guardian.Hooks(f(g(h())))`. +func (c *GuardianClient) Use(hooks ...Hook) { + c.hooks.Guardian = append(c.hooks.Guardian, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `guardian.Intercept(f(g(h())))`. +func (c *GuardianClient) Intercept(interceptors ...Interceptor) { + c.inters.Guardian = append(c.inters.Guardian, interceptors...) +} + +// Create returns a builder for creating a Guardian entity. +func (c *GuardianClient) Create() *GuardianCreate { + mutation := newGuardianMutation(c.config, OpCreate) + return &GuardianCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of Guardian entities. +func (c *GuardianClient) CreateBulk(builders ...*GuardianCreate) *GuardianCreateBulk { + return &GuardianCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *GuardianClient) MapCreateBulk(slice any, setFunc func(*GuardianCreate, int)) *GuardianCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &GuardianCreateBulk{err: fmt.Errorf("calling to GuardianClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*GuardianCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &GuardianCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for Guardian. +func (c *GuardianClient) Update() *GuardianUpdate { + mutation := newGuardianMutation(c.config, OpUpdate) + return &GuardianUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *GuardianClient) UpdateOne(gu *Guardian) *GuardianUpdateOne { + mutation := newGuardianMutation(c.config, OpUpdateOne, withGuardian(gu)) + return &GuardianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *GuardianClient) UpdateOneID(id uuid.UUID) *GuardianUpdateOne { + mutation := newGuardianMutation(c.config, OpUpdateOne, withGuardianID(id)) + return &GuardianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for Guardian. +func (c *GuardianClient) Delete() *GuardianDelete { + mutation := newGuardianMutation(c.config, OpDelete) + return &GuardianDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *GuardianClient) DeleteOne(gu *Guardian) *GuardianDeleteOne { + return c.DeleteOneID(gu.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *GuardianClient) DeleteOneID(id uuid.UUID) *GuardianDeleteOne { + builder := c.Delete().Where(guardian.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &GuardianDeleteOne{builder} +} + +// Query returns a query builder for Guardian. +func (c *GuardianClient) Query() *GuardianQuery { + return &GuardianQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeGuardian}, + inters: c.Interceptors(), + } +} + +// Get returns a Guardian entity by its id. +func (c *GuardianClient) Get(ctx context.Context, id uuid.UUID) (*Guardian, error) { + return c.Query().Where(guardian.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *GuardianClient) GetX(ctx context.Context, id uuid.UUID) *Guardian { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryChildren queries the children edge of a Guardian. +func (c *GuardianClient) QueryChildren(gu *Guardian) *ChildQuery { + query := (&ChildClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := gu.ID + step := sqlgraph.NewStep( + sqlgraph.From(guardian.Table, guardian.FieldID, id), + sqlgraph.To(child.Table, child.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, guardian.ChildrenTable, guardian.ChildrenColumn), + ) + fromV = sqlgraph.Neighbors(gu.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryNursery queries the nursery edge of a Guardian. +func (c *GuardianClient) QueryNursery(gu *Guardian) *NurseryQuery { + query := (&NurseryClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := gu.ID + step := sqlgraph.NewStep( + sqlgraph.From(guardian.Table, guardian.FieldID, id), + sqlgraph.To(nursery.Table, nursery.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, guardian.NurseryTable, guardian.NurseryColumn), + ) + fromV = sqlgraph.Neighbors(gu.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryStation queries the station edge of a Guardian. +func (c *GuardianClient) QueryStation(gu *Guardian) *StationQuery { + query := (&StationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := gu.ID + step := sqlgraph.NewStep( + sqlgraph.From(guardian.Table, guardian.FieldID, id), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.O2O, false, guardian.StationTable, guardian.StationColumn), + ) + fromV = sqlgraph.Neighbors(gu.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// Hooks returns the client hooks. +func (c *GuardianClient) Hooks() []Hook { + return c.hooks.Guardian +} + +// Interceptors returns the client interceptors. +func (c *GuardianClient) Interceptors() []Interceptor { + return c.inters.Guardian +} + +func (c *GuardianClient) mutate(ctx context.Context, m *GuardianMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&GuardianCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&GuardianUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&GuardianUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&GuardianDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown Guardian mutation op: %q", m.Op()) + } +} + +// NurseryClient is a client for the Nursery schema. +type NurseryClient struct { + config +} + +// NewNurseryClient returns a client for the Nursery from the given config. +func NewNurseryClient(c config) *NurseryClient { + return &NurseryClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `nursery.Hooks(f(g(h())))`. +func (c *NurseryClient) Use(hooks ...Hook) { + c.hooks.Nursery = append(c.hooks.Nursery, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `nursery.Intercept(f(g(h())))`. +func (c *NurseryClient) Intercept(interceptors ...Interceptor) { + c.inters.Nursery = append(c.inters.Nursery, interceptors...) +} + +// Create returns a builder for creating a Nursery entity. +func (c *NurseryClient) Create() *NurseryCreate { + mutation := newNurseryMutation(c.config, OpCreate) + return &NurseryCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of Nursery entities. +func (c *NurseryClient) CreateBulk(builders ...*NurseryCreate) *NurseryCreateBulk { + return &NurseryCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *NurseryClient) MapCreateBulk(slice any, setFunc func(*NurseryCreate, int)) *NurseryCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &NurseryCreateBulk{err: fmt.Errorf("calling to NurseryClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*NurseryCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &NurseryCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for Nursery. +func (c *NurseryClient) Update() *NurseryUpdate { + mutation := newNurseryMutation(c.config, OpUpdate) + return &NurseryUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *NurseryClient) UpdateOne(n *Nursery) *NurseryUpdateOne { + mutation := newNurseryMutation(c.config, OpUpdateOne, withNursery(n)) + return &NurseryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *NurseryClient) UpdateOneID(id uuid.UUID) *NurseryUpdateOne { + mutation := newNurseryMutation(c.config, OpUpdateOne, withNurseryID(id)) + return &NurseryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for Nursery. +func (c *NurseryClient) Delete() *NurseryDelete { + mutation := newNurseryMutation(c.config, OpDelete) + return &NurseryDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *NurseryClient) DeleteOne(n *Nursery) *NurseryDeleteOne { + return c.DeleteOneID(n.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *NurseryClient) DeleteOneID(id uuid.UUID) *NurseryDeleteOne { + builder := c.Delete().Where(nursery.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &NurseryDeleteOne{builder} +} + +// Query returns a query builder for Nursery. +func (c *NurseryClient) Query() *NurseryQuery { + return &NurseryQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeNursery}, + inters: c.Interceptors(), + } +} + +// Get returns a Nursery entity by its id. +func (c *NurseryClient) Get(ctx context.Context, id uuid.UUID) (*Nursery, error) { + return c.Query().Where(nursery.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *NurseryClient) GetX(ctx context.Context, id uuid.UUID) *Nursery { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryChildren queries the children edge of a Nursery. +func (c *NurseryClient) QueryChildren(n *Nursery) *ChildQuery { + query := (&ChildClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := n.ID + step := sqlgraph.NewStep( + sqlgraph.From(nursery.Table, nursery.FieldID, id), + sqlgraph.To(child.Table, child.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, nursery.ChildrenTable, nursery.ChildrenColumn), + ) + fromV = sqlgraph.Neighbors(n.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryGuardians queries the guardians edge of a Nursery. +func (c *NurseryClient) QueryGuardians(n *Nursery) *GuardianQuery { + query := (&GuardianClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := n.ID + step := sqlgraph.NewStep( + sqlgraph.From(nursery.Table, nursery.FieldID, id), + sqlgraph.To(guardian.Table, guardian.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, nursery.GuardiansTable, nursery.GuardiansColumn), + ) + fromV = sqlgraph.Neighbors(n.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryBuses queries the buses edge of a Nursery. +func (c *NurseryClient) QueryBuses(n *Nursery) *BusQuery { + query := (&BusClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := n.ID + step := sqlgraph.NewStep( + sqlgraph.From(nursery.Table, nursery.FieldID, id), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, nursery.BusesTable, nursery.BusesColumn), + ) + fromV = sqlgraph.Neighbors(n.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// Hooks returns the client hooks. +func (c *NurseryClient) Hooks() []Hook { + return c.hooks.Nursery +} + +// Interceptors returns the client interceptors. +func (c *NurseryClient) Interceptors() []Interceptor { + return c.inters.Nursery +} + +func (c *NurseryClient) mutate(ctx context.Context, m *NurseryMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&NurseryCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&NurseryUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&NurseryUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&NurseryDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown Nursery mutation op: %q", m.Op()) + } +} + +// StationClient is a client for the Station schema. +type StationClient struct { + config +} + +// NewStationClient returns a client for the Station from the given config. +func NewStationClient(c config) *StationClient { + return &StationClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `station.Hooks(f(g(h())))`. +func (c *StationClient) Use(hooks ...Hook) { + c.hooks.Station = append(c.hooks.Station, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `station.Intercept(f(g(h())))`. +func (c *StationClient) Intercept(interceptors ...Interceptor) { + c.inters.Station = append(c.inters.Station, interceptors...) +} + +// Create returns a builder for creating a Station entity. +func (c *StationClient) Create() *StationCreate { + mutation := newStationMutation(c.config, OpCreate) + return &StationCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of Station entities. +func (c *StationClient) CreateBulk(builders ...*StationCreate) *StationCreateBulk { + return &StationCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *StationClient) MapCreateBulk(slice any, setFunc func(*StationCreate, int)) *StationCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &StationCreateBulk{err: fmt.Errorf("calling to StationClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*StationCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &StationCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for Station. +func (c *StationClient) Update() *StationUpdate { + mutation := newStationMutation(c.config, OpUpdate) + return &StationUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *StationClient) UpdateOne(s *Station) *StationUpdateOne { + mutation := newStationMutation(c.config, OpUpdateOne, withStation(s)) + return &StationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *StationClient) UpdateOneID(id uuid.UUID) *StationUpdateOne { + mutation := newStationMutation(c.config, OpUpdateOne, withStationID(id)) + return &StationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for Station. +func (c *StationClient) Delete() *StationDelete { + mutation := newStationMutation(c.config, OpDelete) + return &StationDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *StationClient) DeleteOne(s *Station) *StationDeleteOne { + return c.DeleteOneID(s.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *StationClient) DeleteOneID(id uuid.UUID) *StationDeleteOne { + builder := c.Delete().Where(station.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &StationDeleteOne{builder} +} + +// Query returns a query builder for Station. +func (c *StationClient) Query() *StationQuery { + return &StationQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeStation}, + inters: c.Interceptors(), + } +} + +// Get returns a Station entity by its id. +func (c *StationClient) Get(ctx context.Context, id uuid.UUID) (*Station, error) { + return c.Query().Where(station.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *StationClient) GetX(ctx context.Context, id uuid.UUID) *Station { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryGuardian queries the guardian edge of a Station. +func (c *StationClient) QueryGuardian(s *Station) *GuardianQuery { + query := (&GuardianClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := s.ID + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, id), + sqlgraph.To(guardian.Table, guardian.FieldID), + sqlgraph.Edge(sqlgraph.O2O, true, station.GuardianTable, station.GuardianColumn), + ) + fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryBus queries the bus edge of a Station. +func (c *StationClient) QueryBus(s *Station) *BusQuery { + query := (&BusClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := s.ID + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, id), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.M2M, true, station.BusTable, station.BusPrimaryKey...), + ) + fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// Hooks returns the client hooks. +func (c *StationClient) Hooks() []Hook { + return c.hooks.Station +} + +// Interceptors returns the client interceptors. +func (c *StationClient) Interceptors() []Interceptor { + return c.inters.Station +} + +func (c *StationClient) mutate(ctx context.Context, m *StationMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&StationCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&StationUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&StationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&StationDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown Station mutation op: %q", m.Op()) + } +} + +// hooks and interceptors per client, for fast access. +type ( + hooks struct { + BoardingRecord, Bus, Child, ChildBusAssociation, ChildPhoto, Guardian, Nursery, + Station []ent.Hook + } + inters struct { + BoardingRecord, Bus, Child, ChildBusAssociation, ChildPhoto, Guardian, Nursery, + Station []ent.Interceptor + } +) diff --git a/backend/domain/repository/ent/ent.go b/backend/domain/repository/ent/ent.go new file mode 100644 index 00000000..333641cc --- /dev/null +++ b/backend/domain/repository/ent/ent.go @@ -0,0 +1,622 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "reflect" + "sync" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" +) + +// ent aliases to avoid import conflicts in user's code. +type ( + Op = ent.Op + Hook = ent.Hook + Value = ent.Value + Query = ent.Query + QueryContext = ent.QueryContext + Querier = ent.Querier + QuerierFunc = ent.QuerierFunc + Interceptor = ent.Interceptor + InterceptFunc = ent.InterceptFunc + Traverser = ent.Traverser + TraverseFunc = ent.TraverseFunc + Policy = ent.Policy + Mutator = ent.Mutator + Mutation = ent.Mutation + MutateFunc = ent.MutateFunc +) + +type clientCtxKey struct{} + +// FromContext returns a Client stored inside a context, or nil if there isn't one. +func FromContext(ctx context.Context) *Client { + c, _ := ctx.Value(clientCtxKey{}).(*Client) + return c +} + +// NewContext returns a new context with the given Client attached. +func NewContext(parent context.Context, c *Client) context.Context { + return context.WithValue(parent, clientCtxKey{}, c) +} + +type txCtxKey struct{} + +// TxFromContext returns a Tx stored inside a context, or nil if there isn't one. +func TxFromContext(ctx context.Context) *Tx { + tx, _ := ctx.Value(txCtxKey{}).(*Tx) + return tx +} + +// NewTxContext returns a new context with the given Tx attached. +func NewTxContext(parent context.Context, tx *Tx) context.Context { + return context.WithValue(parent, txCtxKey{}, tx) +} + +// OrderFunc applies an ordering on the sql selector. +// Deprecated: Use Asc/Desc functions or the package builders instead. +type OrderFunc func(*sql.Selector) + +var ( + initCheck sync.Once + columnCheck sql.ColumnCheck +) + +// columnChecker checks if the column exists in the given table. +func checkColumn(table, column string) error { + initCheck.Do(func() { + columnCheck = sql.NewColumnCheck(map[string]func(string) bool{ + boardingrecord.Table: boardingrecord.ValidColumn, + bus.Table: bus.ValidColumn, + child.Table: child.ValidColumn, + childbusassociation.Table: childbusassociation.ValidColumn, + childphoto.Table: childphoto.ValidColumn, + guardian.Table: guardian.ValidColumn, + nursery.Table: nursery.ValidColumn, + station.Table: station.ValidColumn, + }) + }) + return columnCheck(table, column) +} + +// Asc applies the given fields in ASC order. +func Asc(fields ...string) func(*sql.Selector) { + return func(s *sql.Selector) { + for _, f := range fields { + if err := checkColumn(s.TableName(), f); err != nil { + s.AddError(&ValidationError{Name: f, err: fmt.Errorf("ent: %w", err)}) + } + s.OrderBy(sql.Asc(s.C(f))) + } + } +} + +// Desc applies the given fields in DESC order. +func Desc(fields ...string) func(*sql.Selector) { + return func(s *sql.Selector) { + for _, f := range fields { + if err := checkColumn(s.TableName(), f); err != nil { + s.AddError(&ValidationError{Name: f, err: fmt.Errorf("ent: %w", err)}) + } + s.OrderBy(sql.Desc(s.C(f))) + } + } +} + +// AggregateFunc applies an aggregation step on the group-by traversal/selector. +type AggregateFunc func(*sql.Selector) string + +// As is a pseudo aggregation function for renaming another other functions with custom names. For example: +// +// GroupBy(field1, field2). +// Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). +// Scan(ctx, &v) +func As(fn AggregateFunc, end string) AggregateFunc { + return func(s *sql.Selector) string { + return sql.As(fn(s), end) + } +} + +// Count applies the "count" aggregation function on each group. +func Count() AggregateFunc { + return func(s *sql.Selector) string { + return sql.Count("*") + } +} + +// Max applies the "max" aggregation function on the given field of each group. +func Max(field string) AggregateFunc { + return func(s *sql.Selector) string { + if err := checkColumn(s.TableName(), field); err != nil { + s.AddError(&ValidationError{Name: field, err: fmt.Errorf("ent: %w", err)}) + return "" + } + return sql.Max(s.C(field)) + } +} + +// Mean applies the "mean" aggregation function on the given field of each group. +func Mean(field string) AggregateFunc { + return func(s *sql.Selector) string { + if err := checkColumn(s.TableName(), field); err != nil { + s.AddError(&ValidationError{Name: field, err: fmt.Errorf("ent: %w", err)}) + return "" + } + return sql.Avg(s.C(field)) + } +} + +// Min applies the "min" aggregation function on the given field of each group. +func Min(field string) AggregateFunc { + return func(s *sql.Selector) string { + if err := checkColumn(s.TableName(), field); err != nil { + s.AddError(&ValidationError{Name: field, err: fmt.Errorf("ent: %w", err)}) + return "" + } + return sql.Min(s.C(field)) + } +} + +// Sum applies the "sum" aggregation function on the given field of each group. +func Sum(field string) AggregateFunc { + return func(s *sql.Selector) string { + if err := checkColumn(s.TableName(), field); err != nil { + s.AddError(&ValidationError{Name: field, err: fmt.Errorf("ent: %w", err)}) + return "" + } + return sql.Sum(s.C(field)) + } +} + +// ValidationError returns when validating a field or edge fails. +type ValidationError struct { + Name string // Field or edge name. + err error +} + +// Error implements the error interface. +func (e *ValidationError) Error() string { + return e.err.Error() +} + +// Unwrap implements the errors.Wrapper interface. +func (e *ValidationError) Unwrap() error { + return e.err +} + +// IsValidationError returns a boolean indicating whether the error is a validation error. +func IsValidationError(err error) bool { + if err == nil { + return false + } + var e *ValidationError + return errors.As(err, &e) +} + +// NotFoundError returns when trying to fetch a specific entity and it was not found in the database. +type NotFoundError struct { + label string +} + +// Error implements the error interface. +func (e *NotFoundError) Error() string { + return "ent: " + e.label + " not found" +} + +// IsNotFound returns a boolean indicating whether the error is a not found error. +func IsNotFound(err error) bool { + if err == nil { + return false + } + var e *NotFoundError + return errors.As(err, &e) +} + +// MaskNotFound masks not found error. +func MaskNotFound(err error) error { + if IsNotFound(err) { + return nil + } + return err +} + +// NotSingularError returns when trying to fetch a singular entity and more then one was found in the database. +type NotSingularError struct { + label string +} + +// Error implements the error interface. +func (e *NotSingularError) Error() string { + return "ent: " + e.label + " not singular" +} + +// IsNotSingular returns a boolean indicating whether the error is a not singular error. +func IsNotSingular(err error) bool { + if err == nil { + return false + } + var e *NotSingularError + return errors.As(err, &e) +} + +// NotLoadedError returns when trying to get a node that was not loaded by the query. +type NotLoadedError struct { + edge string +} + +// Error implements the error interface. +func (e *NotLoadedError) Error() string { + return "ent: " + e.edge + " edge was not loaded" +} + +// IsNotLoaded returns a boolean indicating whether the error is a not loaded error. +func IsNotLoaded(err error) bool { + if err == nil { + return false + } + var e *NotLoadedError + return errors.As(err, &e) +} + +// ConstraintError returns when trying to create/update one or more entities and +// one or more of their constraints failed. For example, violation of edge or +// field uniqueness. +type ConstraintError struct { + msg string + wrap error +} + +// Error implements the error interface. +func (e ConstraintError) Error() string { + return "ent: constraint failed: " + e.msg +} + +// Unwrap implements the errors.Wrapper interface. +func (e *ConstraintError) Unwrap() error { + return e.wrap +} + +// IsConstraintError returns a boolean indicating whether the error is a constraint failure. +func IsConstraintError(err error) bool { + if err == nil { + return false + } + var e *ConstraintError + return errors.As(err, &e) +} + +// selector embedded by the different Select/GroupBy builders. +type selector struct { + label string + flds *[]string + fns []AggregateFunc + scan func(context.Context, any) error +} + +// ScanX is like Scan, but panics if an error occurs. +func (s *selector) ScanX(ctx context.Context, v any) { + if err := s.scan(ctx, v); err != nil { + panic(err) + } +} + +// Strings returns list of strings from a selector. It is only allowed when selecting one field. +func (s *selector) Strings(ctx context.Context) ([]string, error) { + if len(*s.flds) > 1 { + return nil, errors.New("ent: Strings is not achievable when selecting more than 1 field") + } + var v []string + if err := s.scan(ctx, &v); err != nil { + return nil, err + } + return v, nil +} + +// StringsX is like Strings, but panics if an error occurs. +func (s *selector) StringsX(ctx context.Context) []string { + v, err := s.Strings(ctx) + if err != nil { + panic(err) + } + return v +} + +// String returns a single string from a selector. It is only allowed when selecting one field. +func (s *selector) String(ctx context.Context) (_ string, err error) { + var v []string + if v, err = s.Strings(ctx); err != nil { + return + } + switch len(v) { + case 1: + return v[0], nil + case 0: + err = &NotFoundError{s.label} + default: + err = fmt.Errorf("ent: Strings returned %d results when one was expected", len(v)) + } + return +} + +// StringX is like String, but panics if an error occurs. +func (s *selector) StringX(ctx context.Context) string { + v, err := s.String(ctx) + if err != nil { + panic(err) + } + return v +} + +// Ints returns list of ints from a selector. It is only allowed when selecting one field. +func (s *selector) Ints(ctx context.Context) ([]int, error) { + if len(*s.flds) > 1 { + return nil, errors.New("ent: Ints is not achievable when selecting more than 1 field") + } + var v []int + if err := s.scan(ctx, &v); err != nil { + return nil, err + } + return v, nil +} + +// IntsX is like Ints, but panics if an error occurs. +func (s *selector) IntsX(ctx context.Context) []int { + v, err := s.Ints(ctx) + if err != nil { + panic(err) + } + return v +} + +// Int returns a single int from a selector. It is only allowed when selecting one field. +func (s *selector) Int(ctx context.Context) (_ int, err error) { + var v []int + if v, err = s.Ints(ctx); err != nil { + return + } + switch len(v) { + case 1: + return v[0], nil + case 0: + err = &NotFoundError{s.label} + default: + err = fmt.Errorf("ent: Ints returned %d results when one was expected", len(v)) + } + return +} + +// IntX is like Int, but panics if an error occurs. +func (s *selector) IntX(ctx context.Context) int { + v, err := s.Int(ctx) + if err != nil { + panic(err) + } + return v +} + +// Float64s returns list of float64s from a selector. It is only allowed when selecting one field. +func (s *selector) Float64s(ctx context.Context) ([]float64, error) { + if len(*s.flds) > 1 { + return nil, errors.New("ent: Float64s is not achievable when selecting more than 1 field") + } + var v []float64 + if err := s.scan(ctx, &v); err != nil { + return nil, err + } + return v, nil +} + +// Float64sX is like Float64s, but panics if an error occurs. +func (s *selector) Float64sX(ctx context.Context) []float64 { + v, err := s.Float64s(ctx) + if err != nil { + panic(err) + } + return v +} + +// Float64 returns a single float64 from a selector. It is only allowed when selecting one field. +func (s *selector) Float64(ctx context.Context) (_ float64, err error) { + var v []float64 + if v, err = s.Float64s(ctx); err != nil { + return + } + switch len(v) { + case 1: + return v[0], nil + case 0: + err = &NotFoundError{s.label} + default: + err = fmt.Errorf("ent: Float64s returned %d results when one was expected", len(v)) + } + return +} + +// Float64X is like Float64, but panics if an error occurs. +func (s *selector) Float64X(ctx context.Context) float64 { + v, err := s.Float64(ctx) + if err != nil { + panic(err) + } + return v +} + +// Bools returns list of bools from a selector. It is only allowed when selecting one field. +func (s *selector) Bools(ctx context.Context) ([]bool, error) { + if len(*s.flds) > 1 { + return nil, errors.New("ent: Bools is not achievable when selecting more than 1 field") + } + var v []bool + if err := s.scan(ctx, &v); err != nil { + return nil, err + } + return v, nil +} + +// BoolsX is like Bools, but panics if an error occurs. +func (s *selector) BoolsX(ctx context.Context) []bool { + v, err := s.Bools(ctx) + if err != nil { + panic(err) + } + return v +} + +// Bool returns a single bool from a selector. It is only allowed when selecting one field. +func (s *selector) Bool(ctx context.Context) (_ bool, err error) { + var v []bool + if v, err = s.Bools(ctx); err != nil { + return + } + switch len(v) { + case 1: + return v[0], nil + case 0: + err = &NotFoundError{s.label} + default: + err = fmt.Errorf("ent: Bools returned %d results when one was expected", len(v)) + } + return +} + +// BoolX is like Bool, but panics if an error occurs. +func (s *selector) BoolX(ctx context.Context) bool { + v, err := s.Bool(ctx) + if err != nil { + panic(err) + } + return v +} + +// withHooks invokes the builder operation with the given hooks, if any. +func withHooks[V Value, M any, PM interface { + *M + Mutation +}](ctx context.Context, exec func(context.Context) (V, error), mutation PM, hooks []Hook) (value V, err error) { + if len(hooks) == 0 { + return exec(ctx) + } + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutationT, ok := any(m).(PM) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + // Set the mutation to the builder. + *mutation = *mutationT + return exec(ctx) + }) + for i := len(hooks) - 1; i >= 0; i-- { + if hooks[i] == nil { + return value, fmt.Errorf("ent: uninitialized hook (forgotten import ent/runtime?)") + } + mut = hooks[i](mut) + } + v, err := mut.Mutate(ctx, mutation) + if err != nil { + return value, err + } + nv, ok := v.(V) + if !ok { + return value, fmt.Errorf("unexpected node type %T returned from %T", v, mutation) + } + return nv, nil +} + +// setContextOp returns a new context with the given QueryContext attached (including its op) in case it does not exist. +func setContextOp(ctx context.Context, qc *QueryContext, op string) context.Context { + if ent.QueryFromContext(ctx) == nil { + qc.Op = op + ctx = ent.NewQueryContext(ctx, qc) + } + return ctx +} + +func querierAll[V Value, Q interface { + sqlAll(context.Context, ...queryHook) (V, error) +}]() Querier { + return QuerierFunc(func(ctx context.Context, q Query) (Value, error) { + query, ok := q.(Q) + if !ok { + return nil, fmt.Errorf("unexpected query type %T", q) + } + return query.sqlAll(ctx) + }) +} + +func querierCount[Q interface { + sqlCount(context.Context) (int, error) +}]() Querier { + return QuerierFunc(func(ctx context.Context, q Query) (Value, error) { + query, ok := q.(Q) + if !ok { + return nil, fmt.Errorf("unexpected query type %T", q) + } + return query.sqlCount(ctx) + }) +} + +func withInterceptors[V Value](ctx context.Context, q Query, qr Querier, inters []Interceptor) (v V, err error) { + for i := len(inters) - 1; i >= 0; i-- { + qr = inters[i].Intercept(qr) + } + rv, err := qr.Query(ctx, q) + if err != nil { + return v, err + } + vt, ok := rv.(V) + if !ok { + return v, fmt.Errorf("unexpected type %T returned from %T. expected type: %T", vt, q, v) + } + return vt, nil +} + +func scanWithInterceptors[Q1 ent.Query, Q2 interface { + sqlScan(context.Context, Q1, any) error +}](ctx context.Context, rootQuery Q1, selectOrGroup Q2, inters []Interceptor, v any) error { + rv := reflect.ValueOf(v) + var qr Querier = QuerierFunc(func(ctx context.Context, q Query) (Value, error) { + query, ok := q.(Q1) + if !ok { + return nil, fmt.Errorf("unexpected query type %T", q) + } + if err := selectOrGroup.sqlScan(ctx, query, v); err != nil { + return nil, err + } + if k := rv.Kind(); k == reflect.Pointer && rv.Elem().CanInterface() { + return rv.Elem().Interface(), nil + } + return v, nil + }) + for i := len(inters) - 1; i >= 0; i-- { + qr = inters[i].Intercept(qr) + } + vv, err := qr.Query(ctx, rootQuery) + if err != nil { + return err + } + switch rv2 := reflect.ValueOf(vv); { + case rv.IsNil(), rv2.IsNil(), rv.Kind() != reflect.Pointer: + case rv.Type() == rv2.Type(): + rv.Elem().Set(rv2.Elem()) + case rv.Elem().Type() == rv2.Type(): + rv.Elem().Set(rv2) + } + return nil +} + +// queryHook describes an internal hook for the different sqlAll methods. +type queryHook func(context.Context, *sqlgraph.QuerySpec) diff --git a/backend/domain/repository/ent/enttest/enttest.go b/backend/domain/repository/ent/enttest/enttest.go new file mode 100644 index 00000000..338d4ca4 --- /dev/null +++ b/backend/domain/repository/ent/enttest/enttest.go @@ -0,0 +1,84 @@ +// Code generated by ent, DO NOT EDIT. + +package enttest + +import ( + "context" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + // required by schema hooks. + _ "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/runtime" + + "entgo.io/ent/dialect/sql/schema" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/migrate" +) + +type ( + // TestingT is the interface that is shared between + // testing.T and testing.B and used by enttest. + TestingT interface { + FailNow() + Error(...any) + } + + // Option configures client creation. + Option func(*options) + + options struct { + opts []ent.Option + migrateOpts []schema.MigrateOption + } +) + +// WithOptions forwards options to client creation. +func WithOptions(opts ...ent.Option) Option { + return func(o *options) { + o.opts = append(o.opts, opts...) + } +} + +// WithMigrateOptions forwards options to auto migration. +func WithMigrateOptions(opts ...schema.MigrateOption) Option { + return func(o *options) { + o.migrateOpts = append(o.migrateOpts, opts...) + } +} + +func newOptions(opts []Option) *options { + o := &options{} + for _, opt := range opts { + opt(o) + } + return o +} + +// Open calls ent.Open and auto-run migration. +func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *ent.Client { + o := newOptions(opts) + c, err := ent.Open(driverName, dataSourceName, o.opts...) + if err != nil { + t.Error(err) + t.FailNow() + } + migrateSchema(t, c, o) + return c +} + +// NewClient calls ent.NewClient and auto-run migration. +func NewClient(t TestingT, opts ...Option) *ent.Client { + o := newOptions(opts) + c := ent.NewClient(o.opts...) + migrateSchema(t, c, o) + return c +} +func migrateSchema(t TestingT, c *ent.Client, o *options) { + tables, err := schema.CopyTables(migrate.Tables) + if err != nil { + t.Error(err) + t.FailNow() + } + if err := migrate.Create(context.Background(), c.Schema, tables, o.migrateOpts...); err != nil { + t.Error(err) + t.FailNow() + } +} diff --git a/backend/domain/repository/ent/guardian.go b/backend/domain/repository/ent/guardian.go new file mode 100644 index 00000000..5fbdaaf6 --- /dev/null +++ b/backend/domain/repository/ent/guardian.go @@ -0,0 +1,229 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "strings" + "time" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// Guardian is the model entity for the Guardian schema. +type Guardian struct { + config `json:"-"` + // ID of the ent. + ID uuid.UUID `json:"id,omitempty"` + // Name holds the value of the "name" field. + Name string `json:"name,omitempty"` + // Email holds the value of the "email" field. + Email string `json:"email,omitempty"` + // Phone holds the value of the "phone" field. + Phone string `json:"phone,omitempty"` + // CreatedAt holds the value of the "created_at" field. + CreatedAt time.Time `json:"created_at,omitempty"` + // UpdatedAt holds the value of the "updated_at" field. + UpdatedAt time.Time `json:"updated_at,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the GuardianQuery when eager-loading is set. + Edges GuardianEdges `json:"edges"` + guardian_nursery *uuid.UUID + selectValues sql.SelectValues +} + +// GuardianEdges holds the relations/edges for other nodes in the graph. +type GuardianEdges struct { + // Children holds the value of the children edge. + Children []*Child `json:"children,omitempty"` + // Nursery holds the value of the nursery edge. + Nursery *Nursery `json:"nursery,omitempty"` + // Station holds the value of the station edge. + Station *Station `json:"station,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [3]bool +} + +// ChildrenOrErr returns the Children value or an error if the edge +// was not loaded in eager-loading. +func (e GuardianEdges) ChildrenOrErr() ([]*Child, error) { + if e.loadedTypes[0] { + return e.Children, nil + } + return nil, &NotLoadedError{edge: "children"} +} + +// NurseryOrErr returns the Nursery value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e GuardianEdges) NurseryOrErr() (*Nursery, error) { + if e.loadedTypes[1] { + if e.Nursery == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: nursery.Label} + } + return e.Nursery, nil + } + return nil, &NotLoadedError{edge: "nursery"} +} + +// StationOrErr returns the Station value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e GuardianEdges) StationOrErr() (*Station, error) { + if e.loadedTypes[2] { + if e.Station == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: station.Label} + } + return e.Station, nil + } + return nil, &NotLoadedError{edge: "station"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*Guardian) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case guardian.FieldName, guardian.FieldEmail, guardian.FieldPhone: + values[i] = new(sql.NullString) + case guardian.FieldCreatedAt, guardian.FieldUpdatedAt: + values[i] = new(sql.NullTime) + case guardian.FieldID: + values[i] = new(uuid.UUID) + case guardian.ForeignKeys[0]: // guardian_nursery + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the Guardian fields. +func (gu *Guardian) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case guardian.FieldID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field id", values[i]) + } else if value != nil { + gu.ID = *value + } + case guardian.FieldName: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field name", values[i]) + } else if value.Valid { + gu.Name = value.String + } + case guardian.FieldEmail: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field email", values[i]) + } else if value.Valid { + gu.Email = value.String + } + case guardian.FieldPhone: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field phone", values[i]) + } else if value.Valid { + gu.Phone = value.String + } + case guardian.FieldCreatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field created_at", values[i]) + } else if value.Valid { + gu.CreatedAt = value.Time + } + case guardian.FieldUpdatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field updated_at", values[i]) + } else if value.Valid { + gu.UpdatedAt = value.Time + } + case guardian.ForeignKeys[0]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field guardian_nursery", values[i]) + } else if value.Valid { + gu.guardian_nursery = new(uuid.UUID) + *gu.guardian_nursery = *value.S.(*uuid.UUID) + } + default: + gu.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the Guardian. +// This includes values selected through modifiers, order, etc. +func (gu *Guardian) Value(name string) (ent.Value, error) { + return gu.selectValues.Get(name) +} + +// QueryChildren queries the "children" edge of the Guardian entity. +func (gu *Guardian) QueryChildren() *ChildQuery { + return NewGuardianClient(gu.config).QueryChildren(gu) +} + +// QueryNursery queries the "nursery" edge of the Guardian entity. +func (gu *Guardian) QueryNursery() *NurseryQuery { + return NewGuardianClient(gu.config).QueryNursery(gu) +} + +// QueryStation queries the "station" edge of the Guardian entity. +func (gu *Guardian) QueryStation() *StationQuery { + return NewGuardianClient(gu.config).QueryStation(gu) +} + +// Update returns a builder for updating this Guardian. +// Note that you need to call Guardian.Unwrap() before calling this method if this Guardian +// was returned from a transaction, and the transaction was committed or rolled back. +func (gu *Guardian) Update() *GuardianUpdateOne { + return NewGuardianClient(gu.config).UpdateOne(gu) +} + +// Unwrap unwraps the Guardian entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (gu *Guardian) Unwrap() *Guardian { + _tx, ok := gu.config.driver.(*txDriver) + if !ok { + panic("ent: Guardian is not a transactional entity") + } + gu.config.driver = _tx.drv + return gu +} + +// String implements the fmt.Stringer. +func (gu *Guardian) String() string { + var builder strings.Builder + builder.WriteString("Guardian(") + builder.WriteString(fmt.Sprintf("id=%v, ", gu.ID)) + builder.WriteString("name=") + builder.WriteString(gu.Name) + builder.WriteString(", ") + builder.WriteString("email=") + builder.WriteString(gu.Email) + builder.WriteString(", ") + builder.WriteString("phone=") + builder.WriteString(gu.Phone) + builder.WriteString(", ") + builder.WriteString("created_at=") + builder.WriteString(gu.CreatedAt.Format(time.ANSIC)) + builder.WriteString(", ") + builder.WriteString("updated_at=") + builder.WriteString(gu.UpdatedAt.Format(time.ANSIC)) + builder.WriteByte(')') + return builder.String() +} + +// Guardians is a parsable slice of Guardian. +type Guardians []*Guardian diff --git a/backend/domain/repository/ent/guardian/guardian.go b/backend/domain/repository/ent/guardian/guardian.go new file mode 100644 index 00000000..da62e7a2 --- /dev/null +++ b/backend/domain/repository/ent/guardian/guardian.go @@ -0,0 +1,181 @@ +// Code generated by ent, DO NOT EDIT. + +package guardian + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/google/uuid" +) + +const ( + // Label holds the string label denoting the guardian type in the database. + Label = "guardian" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldEmail holds the string denoting the email field in the database. + FieldEmail = "email" + // FieldPhone holds the string denoting the phone field in the database. + FieldPhone = "phone" + // FieldCreatedAt holds the string denoting the created_at field in the database. + FieldCreatedAt = "created_at" + // FieldUpdatedAt holds the string denoting the updated_at field in the database. + FieldUpdatedAt = "updated_at" + // EdgeChildren holds the string denoting the children edge name in mutations. + EdgeChildren = "children" + // EdgeNursery holds the string denoting the nursery edge name in mutations. + EdgeNursery = "nursery" + // EdgeStation holds the string denoting the station edge name in mutations. + EdgeStation = "station" + // Table holds the table name of the guardian in the database. + Table = "guardians" + // ChildrenTable is the table that holds the children relation/edge. + ChildrenTable = "childs" + // ChildrenInverseTable is the table name for the Child entity. + // It exists in this package in order to avoid circular dependency with the "child" package. + ChildrenInverseTable = "childs" + // ChildrenColumn is the table column denoting the children relation/edge. + ChildrenColumn = "guardian_children" + // NurseryTable is the table that holds the nursery relation/edge. + NurseryTable = "guardians" + // NurseryInverseTable is the table name for the Nursery entity. + // It exists in this package in order to avoid circular dependency with the "nursery" package. + NurseryInverseTable = "nurseries" + // NurseryColumn is the table column denoting the nursery relation/edge. + NurseryColumn = "guardian_nursery" + // StationTable is the table that holds the station relation/edge. + StationTable = "stations" + // StationInverseTable is the table name for the Station entity. + // It exists in this package in order to avoid circular dependency with the "station" package. + StationInverseTable = "stations" + // StationColumn is the table column denoting the station relation/edge. + StationColumn = "guardian_station" +) + +// Columns holds all SQL columns for guardian fields. +var Columns = []string{ + FieldID, + FieldName, + FieldEmail, + FieldPhone, + FieldCreatedAt, + FieldUpdatedAt, +} + +// ForeignKeys holds the SQL foreign-keys that are owned by the "guardians" +// table and are not defined as standalone fields in the schema. +var ForeignKeys = []string{ + "guardian_nursery", +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + for i := range ForeignKeys { + if column == ForeignKeys[i] { + return true + } + } + return false +} + +var ( + // DefaultCreatedAt holds the default value on creation for the "created_at" field. + DefaultCreatedAt func() time.Time + // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. + DefaultUpdatedAt func() time.Time + // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. + UpdateDefaultUpdatedAt func() time.Time + // DefaultID holds the default value on creation for the "id" field. + DefaultID func() uuid.UUID +) + +// OrderOption defines the ordering options for the Guardian queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByName orders the results by the name field. +func ByName(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldName, opts...).ToFunc() +} + +// ByEmail orders the results by the email field. +func ByEmail(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEmail, opts...).ToFunc() +} + +// ByPhone orders the results by the phone field. +func ByPhone(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldPhone, opts...).ToFunc() +} + +// ByCreatedAt orders the results by the created_at field. +func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() +} + +// ByUpdatedAt orders the results by the updated_at field. +func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() +} + +// ByChildrenCount orders the results by children count. +func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newChildrenStep(), opts...) + } +} + +// ByChildren orders the results by children terms. +func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newChildrenStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByNurseryField orders the results by nursery field. +func ByNurseryField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newNurseryStep(), sql.OrderByField(field, opts...)) + } +} + +// ByStationField orders the results by station field. +func ByStationField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newStationStep(), sql.OrderByField(field, opts...)) + } +} +func newChildrenStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(ChildrenInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn), + ) +} +func newNurseryStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(NurseryInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, NurseryTable, NurseryColumn), + ) +} +func newStationStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(StationInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2O, false, StationTable, StationColumn), + ) +} diff --git a/backend/domain/repository/ent/guardian/where.go b/backend/domain/repository/ent/guardian/where.go new file mode 100644 index 00000000..73f68389 --- /dev/null +++ b/backend/domain/repository/ent/guardian/where.go @@ -0,0 +1,461 @@ +// Code generated by ent, DO NOT EDIT. + +package guardian + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ID filters vertices based on their ID field. +func ID(id uuid.UUID) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id uuid.UUID) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id uuid.UUID) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...uuid.UUID) predicate.Guardian { + return predicate.Guardian(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...uuid.UUID) predicate.Guardian { + return predicate.Guardian(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id uuid.UUID) predicate.Guardian { + return predicate.Guardian(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id uuid.UUID) predicate.Guardian { + return predicate.Guardian(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id uuid.UUID) predicate.Guardian { + return predicate.Guardian(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id uuid.UUID) predicate.Guardian { + return predicate.Guardian(sql.FieldLTE(FieldID, id)) +} + +// Name applies equality check predicate on the "name" field. It's identical to NameEQ. +func Name(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldName, v)) +} + +// Email applies equality check predicate on the "email" field. It's identical to EmailEQ. +func Email(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldEmail, v)) +} + +// Phone applies equality check predicate on the "phone" field. It's identical to PhoneEQ. +func Phone(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldPhone, v)) +} + +// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. +func CreatedAt(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldCreatedAt, v)) +} + +// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ. +func UpdatedAt(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// NameEQ applies the EQ predicate on the "name" field. +func NameEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldName, v)) +} + +// NameNEQ applies the NEQ predicate on the "name" field. +func NameNEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldName, v)) +} + +// NameIn applies the In predicate on the "name" field. +func NameIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldIn(FieldName, vs...)) +} + +// NameNotIn applies the NotIn predicate on the "name" field. +func NameNotIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldNotIn(FieldName, vs...)) +} + +// NameGT applies the GT predicate on the "name" field. +func NameGT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGT(FieldName, v)) +} + +// NameGTE applies the GTE predicate on the "name" field. +func NameGTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGTE(FieldName, v)) +} + +// NameLT applies the LT predicate on the "name" field. +func NameLT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLT(FieldName, v)) +} + +// NameLTE applies the LTE predicate on the "name" field. +func NameLTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLTE(FieldName, v)) +} + +// NameContains applies the Contains predicate on the "name" field. +func NameContains(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContains(FieldName, v)) +} + +// NameHasPrefix applies the HasPrefix predicate on the "name" field. +func NameHasPrefix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasPrefix(FieldName, v)) +} + +// NameHasSuffix applies the HasSuffix predicate on the "name" field. +func NameHasSuffix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasSuffix(FieldName, v)) +} + +// NameEqualFold applies the EqualFold predicate on the "name" field. +func NameEqualFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEqualFold(FieldName, v)) +} + +// NameContainsFold applies the ContainsFold predicate on the "name" field. +func NameContainsFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContainsFold(FieldName, v)) +} + +// EmailEQ applies the EQ predicate on the "email" field. +func EmailEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldEmail, v)) +} + +// EmailNEQ applies the NEQ predicate on the "email" field. +func EmailNEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldEmail, v)) +} + +// EmailIn applies the In predicate on the "email" field. +func EmailIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldIn(FieldEmail, vs...)) +} + +// EmailNotIn applies the NotIn predicate on the "email" field. +func EmailNotIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldNotIn(FieldEmail, vs...)) +} + +// EmailGT applies the GT predicate on the "email" field. +func EmailGT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGT(FieldEmail, v)) +} + +// EmailGTE applies the GTE predicate on the "email" field. +func EmailGTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGTE(FieldEmail, v)) +} + +// EmailLT applies the LT predicate on the "email" field. +func EmailLT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLT(FieldEmail, v)) +} + +// EmailLTE applies the LTE predicate on the "email" field. +func EmailLTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLTE(FieldEmail, v)) +} + +// EmailContains applies the Contains predicate on the "email" field. +func EmailContains(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContains(FieldEmail, v)) +} + +// EmailHasPrefix applies the HasPrefix predicate on the "email" field. +func EmailHasPrefix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasPrefix(FieldEmail, v)) +} + +// EmailHasSuffix applies the HasSuffix predicate on the "email" field. +func EmailHasSuffix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasSuffix(FieldEmail, v)) +} + +// EmailIsNil applies the IsNil predicate on the "email" field. +func EmailIsNil() predicate.Guardian { + return predicate.Guardian(sql.FieldIsNull(FieldEmail)) +} + +// EmailNotNil applies the NotNil predicate on the "email" field. +func EmailNotNil() predicate.Guardian { + return predicate.Guardian(sql.FieldNotNull(FieldEmail)) +} + +// EmailEqualFold applies the EqualFold predicate on the "email" field. +func EmailEqualFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEqualFold(FieldEmail, v)) +} + +// EmailContainsFold applies the ContainsFold predicate on the "email" field. +func EmailContainsFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContainsFold(FieldEmail, v)) +} + +// PhoneEQ applies the EQ predicate on the "phone" field. +func PhoneEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldPhone, v)) +} + +// PhoneNEQ applies the NEQ predicate on the "phone" field. +func PhoneNEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldPhone, v)) +} + +// PhoneIn applies the In predicate on the "phone" field. +func PhoneIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldIn(FieldPhone, vs...)) +} + +// PhoneNotIn applies the NotIn predicate on the "phone" field. +func PhoneNotIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldNotIn(FieldPhone, vs...)) +} + +// PhoneGT applies the GT predicate on the "phone" field. +func PhoneGT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGT(FieldPhone, v)) +} + +// PhoneGTE applies the GTE predicate on the "phone" field. +func PhoneGTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGTE(FieldPhone, v)) +} + +// PhoneLT applies the LT predicate on the "phone" field. +func PhoneLT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLT(FieldPhone, v)) +} + +// PhoneLTE applies the LTE predicate on the "phone" field. +func PhoneLTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLTE(FieldPhone, v)) +} + +// PhoneContains applies the Contains predicate on the "phone" field. +func PhoneContains(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContains(FieldPhone, v)) +} + +// PhoneHasPrefix applies the HasPrefix predicate on the "phone" field. +func PhoneHasPrefix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasPrefix(FieldPhone, v)) +} + +// PhoneHasSuffix applies the HasSuffix predicate on the "phone" field. +func PhoneHasSuffix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasSuffix(FieldPhone, v)) +} + +// PhoneIsNil applies the IsNil predicate on the "phone" field. +func PhoneIsNil() predicate.Guardian { + return predicate.Guardian(sql.FieldIsNull(FieldPhone)) +} + +// PhoneNotNil applies the NotNil predicate on the "phone" field. +func PhoneNotNil() predicate.Guardian { + return predicate.Guardian(sql.FieldNotNull(FieldPhone)) +} + +// PhoneEqualFold applies the EqualFold predicate on the "phone" field. +func PhoneEqualFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEqualFold(FieldPhone, v)) +} + +// PhoneContainsFold applies the ContainsFold predicate on the "phone" field. +func PhoneContainsFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContainsFold(FieldPhone, v)) +} + +// CreatedAtEQ applies the EQ predicate on the "created_at" field. +func CreatedAtEQ(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldCreatedAt, v)) +} + +// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. +func CreatedAtNEQ(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldCreatedAt, v)) +} + +// CreatedAtIn applies the In predicate on the "created_at" field. +func CreatedAtIn(vs ...time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldIn(FieldCreatedAt, vs...)) +} + +// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. +func CreatedAtNotIn(vs ...time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldNotIn(FieldCreatedAt, vs...)) +} + +// CreatedAtGT applies the GT predicate on the "created_at" field. +func CreatedAtGT(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldGT(FieldCreatedAt, v)) +} + +// CreatedAtGTE applies the GTE predicate on the "created_at" field. +func CreatedAtGTE(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldGTE(FieldCreatedAt, v)) +} + +// CreatedAtLT applies the LT predicate on the "created_at" field. +func CreatedAtLT(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldLT(FieldCreatedAt, v)) +} + +// CreatedAtLTE applies the LTE predicate on the "created_at" field. +func CreatedAtLTE(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldLTE(FieldCreatedAt, v)) +} + +// UpdatedAtEQ applies the EQ predicate on the "updated_at" field. +func UpdatedAtEQ(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field. +func UpdatedAtNEQ(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtIn applies the In predicate on the "updated_at" field. +func UpdatedAtIn(vs ...time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field. +func UpdatedAtNotIn(vs ...time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldNotIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtGT applies the GT predicate on the "updated_at" field. +func UpdatedAtGT(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldGT(FieldUpdatedAt, v)) +} + +// UpdatedAtGTE applies the GTE predicate on the "updated_at" field. +func UpdatedAtGTE(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldGTE(FieldUpdatedAt, v)) +} + +// UpdatedAtLT applies the LT predicate on the "updated_at" field. +func UpdatedAtLT(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldLT(FieldUpdatedAt, v)) +} + +// UpdatedAtLTE applies the LTE predicate on the "updated_at" field. +func UpdatedAtLTE(v time.Time) predicate.Guardian { + return predicate.Guardian(sql.FieldLTE(FieldUpdatedAt, v)) +} + +// HasChildren applies the HasEdge predicate on the "children" edge. +func HasChildren() predicate.Guardian { + return predicate.Guardian(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates). +func HasChildrenWith(preds ...predicate.Child) predicate.Guardian { + return predicate.Guardian(func(s *sql.Selector) { + step := newChildrenStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasNursery applies the HasEdge predicate on the "nursery" edge. +func HasNursery() predicate.Guardian { + return predicate.Guardian(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, NurseryTable, NurseryColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasNurseryWith applies the HasEdge predicate on the "nursery" edge with a given conditions (other predicates). +func HasNurseryWith(preds ...predicate.Nursery) predicate.Guardian { + return predicate.Guardian(func(s *sql.Selector) { + step := newNurseryStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasStation applies the HasEdge predicate on the "station" edge. +func HasStation() predicate.Guardian { + return predicate.Guardian(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2O, false, StationTable, StationColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasStationWith applies the HasEdge predicate on the "station" edge with a given conditions (other predicates). +func HasStationWith(preds ...predicate.Station) predicate.Guardian { + return predicate.Guardian(func(s *sql.Selector) { + step := newStationStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.Guardian) predicate.Guardian { + return predicate.Guardian(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.Guardian) predicate.Guardian { + return predicate.Guardian(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.Guardian) predicate.Guardian { + return predicate.Guardian(sql.NotPredicates(p)) +} diff --git a/backend/domain/repository/ent/guardian_create.go b/backend/domain/repository/ent/guardian_create.go new file mode 100644 index 00000000..eb5ddea3 --- /dev/null +++ b/backend/domain/repository/ent/guardian_create.go @@ -0,0 +1,405 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// GuardianCreate is the builder for creating a Guardian entity. +type GuardianCreate struct { + config + mutation *GuardianMutation + hooks []Hook +} + +// SetName sets the "name" field. +func (gc *GuardianCreate) SetName(s string) *GuardianCreate { + gc.mutation.SetName(s) + return gc +} + +// SetEmail sets the "email" field. +func (gc *GuardianCreate) SetEmail(s string) *GuardianCreate { + gc.mutation.SetEmail(s) + return gc +} + +// SetNillableEmail sets the "email" field if the given value is not nil. +func (gc *GuardianCreate) SetNillableEmail(s *string) *GuardianCreate { + if s != nil { + gc.SetEmail(*s) + } + return gc +} + +// SetPhone sets the "phone" field. +func (gc *GuardianCreate) SetPhone(s string) *GuardianCreate { + gc.mutation.SetPhone(s) + return gc +} + +// SetNillablePhone sets the "phone" field if the given value is not nil. +func (gc *GuardianCreate) SetNillablePhone(s *string) *GuardianCreate { + if s != nil { + gc.SetPhone(*s) + } + return gc +} + +// SetCreatedAt sets the "created_at" field. +func (gc *GuardianCreate) SetCreatedAt(t time.Time) *GuardianCreate { + gc.mutation.SetCreatedAt(t) + return gc +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (gc *GuardianCreate) SetNillableCreatedAt(t *time.Time) *GuardianCreate { + if t != nil { + gc.SetCreatedAt(*t) + } + return gc +} + +// SetUpdatedAt sets the "updated_at" field. +func (gc *GuardianCreate) SetUpdatedAt(t time.Time) *GuardianCreate { + gc.mutation.SetUpdatedAt(t) + return gc +} + +// SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil. +func (gc *GuardianCreate) SetNillableUpdatedAt(t *time.Time) *GuardianCreate { + if t != nil { + gc.SetUpdatedAt(*t) + } + return gc +} + +// SetID sets the "id" field. +func (gc *GuardianCreate) SetID(u uuid.UUID) *GuardianCreate { + gc.mutation.SetID(u) + return gc +} + +// SetNillableID sets the "id" field if the given value is not nil. +func (gc *GuardianCreate) SetNillableID(u *uuid.UUID) *GuardianCreate { + if u != nil { + gc.SetID(*u) + } + return gc +} + +// AddChildIDs adds the "children" edge to the Child entity by IDs. +func (gc *GuardianCreate) AddChildIDs(ids ...uuid.UUID) *GuardianCreate { + gc.mutation.AddChildIDs(ids...) + return gc +} + +// AddChildren adds the "children" edges to the Child entity. +func (gc *GuardianCreate) AddChildren(c ...*Child) *GuardianCreate { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return gc.AddChildIDs(ids...) +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. +func (gc *GuardianCreate) SetNurseryID(id uuid.UUID) *GuardianCreate { + gc.mutation.SetNurseryID(id) + return gc +} + +// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. +func (gc *GuardianCreate) SetNillableNurseryID(id *uuid.UUID) *GuardianCreate { + if id != nil { + gc = gc.SetNurseryID(*id) + } + return gc +} + +// SetNursery sets the "nursery" edge to the Nursery entity. +func (gc *GuardianCreate) SetNursery(n *Nursery) *GuardianCreate { + return gc.SetNurseryID(n.ID) +} + +// SetStationID sets the "station" edge to the Station entity by ID. +func (gc *GuardianCreate) SetStationID(id uuid.UUID) *GuardianCreate { + gc.mutation.SetStationID(id) + return gc +} + +// SetNillableStationID sets the "station" edge to the Station entity by ID if the given value is not nil. +func (gc *GuardianCreate) SetNillableStationID(id *uuid.UUID) *GuardianCreate { + if id != nil { + gc = gc.SetStationID(*id) + } + return gc +} + +// SetStation sets the "station" edge to the Station entity. +func (gc *GuardianCreate) SetStation(s *Station) *GuardianCreate { + return gc.SetStationID(s.ID) +} + +// Mutation returns the GuardianMutation object of the builder. +func (gc *GuardianCreate) Mutation() *GuardianMutation { + return gc.mutation +} + +// Save creates the Guardian in the database. +func (gc *GuardianCreate) Save(ctx context.Context) (*Guardian, error) { + gc.defaults() + return withHooks(ctx, gc.sqlSave, gc.mutation, gc.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (gc *GuardianCreate) SaveX(ctx context.Context) *Guardian { + v, err := gc.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (gc *GuardianCreate) Exec(ctx context.Context) error { + _, err := gc.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (gc *GuardianCreate) ExecX(ctx context.Context) { + if err := gc.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (gc *GuardianCreate) defaults() { + if _, ok := gc.mutation.CreatedAt(); !ok { + v := guardian.DefaultCreatedAt() + gc.mutation.SetCreatedAt(v) + } + if _, ok := gc.mutation.UpdatedAt(); !ok { + v := guardian.DefaultUpdatedAt() + gc.mutation.SetUpdatedAt(v) + } + if _, ok := gc.mutation.ID(); !ok { + v := guardian.DefaultID() + gc.mutation.SetID(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (gc *GuardianCreate) check() error { + if _, ok := gc.mutation.Name(); !ok { + return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Guardian.name"`)} + } + if _, ok := gc.mutation.CreatedAt(); !ok { + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Guardian.created_at"`)} + } + if _, ok := gc.mutation.UpdatedAt(); !ok { + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "Guardian.updated_at"`)} + } + return nil +} + +func (gc *GuardianCreate) sqlSave(ctx context.Context) (*Guardian, error) { + if err := gc.check(); err != nil { + return nil, err + } + _node, _spec := gc.createSpec() + if err := sqlgraph.CreateNode(ctx, gc.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + if _spec.ID.Value != nil { + if id, ok := _spec.ID.Value.(*uuid.UUID); ok { + _node.ID = *id + } else if err := _node.ID.Scan(_spec.ID.Value); err != nil { + return nil, err + } + } + gc.mutation.id = &_node.ID + gc.mutation.done = true + return _node, nil +} + +func (gc *GuardianCreate) createSpec() (*Guardian, *sqlgraph.CreateSpec) { + var ( + _node = &Guardian{config: gc.config} + _spec = sqlgraph.NewCreateSpec(guardian.Table, sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID)) + ) + if id, ok := gc.mutation.ID(); ok { + _node.ID = id + _spec.ID.Value = &id + } + if value, ok := gc.mutation.Name(); ok { + _spec.SetField(guardian.FieldName, field.TypeString, value) + _node.Name = value + } + if value, ok := gc.mutation.Email(); ok { + _spec.SetField(guardian.FieldEmail, field.TypeString, value) + _node.Email = value + } + if value, ok := gc.mutation.Phone(); ok { + _spec.SetField(guardian.FieldPhone, field.TypeString, value) + _node.Phone = value + } + if value, ok := gc.mutation.CreatedAt(); ok { + _spec.SetField(guardian.FieldCreatedAt, field.TypeTime, value) + _node.CreatedAt = value + } + if value, ok := gc.mutation.UpdatedAt(); ok { + _spec.SetField(guardian.FieldUpdatedAt, field.TypeTime, value) + _node.UpdatedAt = value + } + if nodes := gc.mutation.ChildrenIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: guardian.ChildrenTable, + Columns: []string{guardian.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := gc.mutation.NurseryIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: guardian.NurseryTable, + Columns: []string{guardian.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.guardian_nursery = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := gc.mutation.StationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2O, + Inverse: false, + Table: guardian.StationTable, + Columns: []string{guardian.StationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// GuardianCreateBulk is the builder for creating many Guardian entities in bulk. +type GuardianCreateBulk struct { + config + err error + builders []*GuardianCreate +} + +// Save creates the Guardian entities in the database. +func (gcb *GuardianCreateBulk) Save(ctx context.Context) ([]*Guardian, error) { + if gcb.err != nil { + return nil, gcb.err + } + specs := make([]*sqlgraph.CreateSpec, len(gcb.builders)) + nodes := make([]*Guardian, len(gcb.builders)) + mutators := make([]Mutator, len(gcb.builders)) + for i := range gcb.builders { + func(i int, root context.Context) { + builder := gcb.builders[i] + builder.defaults() + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*GuardianMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, gcb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, gcb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, gcb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (gcb *GuardianCreateBulk) SaveX(ctx context.Context) []*Guardian { + v, err := gcb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (gcb *GuardianCreateBulk) Exec(ctx context.Context) error { + _, err := gcb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (gcb *GuardianCreateBulk) ExecX(ctx context.Context) { + if err := gcb.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/guardian_delete.go b/backend/domain/repository/ent/guardian_delete.go new file mode 100644 index 00000000..c3f62535 --- /dev/null +++ b/backend/domain/repository/ent/guardian_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" +) + +// GuardianDelete is the builder for deleting a Guardian entity. +type GuardianDelete struct { + config + hooks []Hook + mutation *GuardianMutation +} + +// Where appends a list predicates to the GuardianDelete builder. +func (gd *GuardianDelete) Where(ps ...predicate.Guardian) *GuardianDelete { + gd.mutation.Where(ps...) + return gd +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (gd *GuardianDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, gd.sqlExec, gd.mutation, gd.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (gd *GuardianDelete) ExecX(ctx context.Context) int { + n, err := gd.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (gd *GuardianDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(guardian.Table, sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID)) + if ps := gd.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, gd.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + gd.mutation.done = true + return affected, err +} + +// GuardianDeleteOne is the builder for deleting a single Guardian entity. +type GuardianDeleteOne struct { + gd *GuardianDelete +} + +// Where appends a list predicates to the GuardianDelete builder. +func (gdo *GuardianDeleteOne) Where(ps ...predicate.Guardian) *GuardianDeleteOne { + gdo.gd.mutation.Where(ps...) + return gdo +} + +// Exec executes the deletion query. +func (gdo *GuardianDeleteOne) Exec(ctx context.Context) error { + n, err := gdo.gd.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{guardian.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (gdo *GuardianDeleteOne) ExecX(ctx context.Context) { + if err := gdo.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/guardian_query.go b/backend/domain/repository/ent/guardian_query.go new file mode 100644 index 00000000..0c9283a9 --- /dev/null +++ b/backend/domain/repository/ent/guardian_query.go @@ -0,0 +1,761 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "database/sql/driver" + "fmt" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// GuardianQuery is the builder for querying Guardian entities. +type GuardianQuery struct { + config + ctx *QueryContext + order []guardian.OrderOption + inters []Interceptor + predicates []predicate.Guardian + withChildren *ChildQuery + withNursery *NurseryQuery + withStation *StationQuery + withFKs bool + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the GuardianQuery builder. +func (gq *GuardianQuery) Where(ps ...predicate.Guardian) *GuardianQuery { + gq.predicates = append(gq.predicates, ps...) + return gq +} + +// Limit the number of records to be returned by this query. +func (gq *GuardianQuery) Limit(limit int) *GuardianQuery { + gq.ctx.Limit = &limit + return gq +} + +// Offset to start from. +func (gq *GuardianQuery) Offset(offset int) *GuardianQuery { + gq.ctx.Offset = &offset + return gq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (gq *GuardianQuery) Unique(unique bool) *GuardianQuery { + gq.ctx.Unique = &unique + return gq +} + +// Order specifies how the records should be ordered. +func (gq *GuardianQuery) Order(o ...guardian.OrderOption) *GuardianQuery { + gq.order = append(gq.order, o...) + return gq +} + +// QueryChildren chains the current query on the "children" edge. +func (gq *GuardianQuery) QueryChildren() *ChildQuery { + query := (&ChildClient{config: gq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := gq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := gq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(guardian.Table, guardian.FieldID, selector), + sqlgraph.To(child.Table, child.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, guardian.ChildrenTable, guardian.ChildrenColumn), + ) + fromU = sqlgraph.SetNeighbors(gq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryNursery chains the current query on the "nursery" edge. +func (gq *GuardianQuery) QueryNursery() *NurseryQuery { + query := (&NurseryClient{config: gq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := gq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := gq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(guardian.Table, guardian.FieldID, selector), + sqlgraph.To(nursery.Table, nursery.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, guardian.NurseryTable, guardian.NurseryColumn), + ) + fromU = sqlgraph.SetNeighbors(gq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryStation chains the current query on the "station" edge. +func (gq *GuardianQuery) QueryStation() *StationQuery { + query := (&StationClient{config: gq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := gq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := gq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(guardian.Table, guardian.FieldID, selector), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.O2O, false, guardian.StationTable, guardian.StationColumn), + ) + fromU = sqlgraph.SetNeighbors(gq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first Guardian entity from the query. +// Returns a *NotFoundError when no Guardian was found. +func (gq *GuardianQuery) First(ctx context.Context) (*Guardian, error) { + nodes, err := gq.Limit(1).All(setContextOp(ctx, gq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{guardian.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (gq *GuardianQuery) FirstX(ctx context.Context) *Guardian { + node, err := gq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first Guardian ID from the query. +// Returns a *NotFoundError when no Guardian ID was found. +func (gq *GuardianQuery) FirstID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = gq.Limit(1).IDs(setContextOp(ctx, gq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{guardian.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (gq *GuardianQuery) FirstIDX(ctx context.Context) uuid.UUID { + id, err := gq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single Guardian entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one Guardian entity is found. +// Returns a *NotFoundError when no Guardian entities are found. +func (gq *GuardianQuery) Only(ctx context.Context) (*Guardian, error) { + nodes, err := gq.Limit(2).All(setContextOp(ctx, gq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{guardian.Label} + default: + return nil, &NotSingularError{guardian.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (gq *GuardianQuery) OnlyX(ctx context.Context) *Guardian { + node, err := gq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only Guardian ID in the query. +// Returns a *NotSingularError when more than one Guardian ID is found. +// Returns a *NotFoundError when no entities are found. +func (gq *GuardianQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = gq.Limit(2).IDs(setContextOp(ctx, gq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{guardian.Label} + default: + err = &NotSingularError{guardian.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (gq *GuardianQuery) OnlyIDX(ctx context.Context) uuid.UUID { + id, err := gq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of Guardians. +func (gq *GuardianQuery) All(ctx context.Context) ([]*Guardian, error) { + ctx = setContextOp(ctx, gq.ctx, "All") + if err := gq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*Guardian, *GuardianQuery]() + return withInterceptors[[]*Guardian](ctx, gq, qr, gq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (gq *GuardianQuery) AllX(ctx context.Context) []*Guardian { + nodes, err := gq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of Guardian IDs. +func (gq *GuardianQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error) { + if gq.ctx.Unique == nil && gq.path != nil { + gq.Unique(true) + } + ctx = setContextOp(ctx, gq.ctx, "IDs") + if err = gq.Select(guardian.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (gq *GuardianQuery) IDsX(ctx context.Context) []uuid.UUID { + ids, err := gq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (gq *GuardianQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, gq.ctx, "Count") + if err := gq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, gq, querierCount[*GuardianQuery](), gq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (gq *GuardianQuery) CountX(ctx context.Context) int { + count, err := gq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (gq *GuardianQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, gq.ctx, "Exist") + switch _, err := gq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (gq *GuardianQuery) ExistX(ctx context.Context) bool { + exist, err := gq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the GuardianQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (gq *GuardianQuery) Clone() *GuardianQuery { + if gq == nil { + return nil + } + return &GuardianQuery{ + config: gq.config, + ctx: gq.ctx.Clone(), + order: append([]guardian.OrderOption{}, gq.order...), + inters: append([]Interceptor{}, gq.inters...), + predicates: append([]predicate.Guardian{}, gq.predicates...), + withChildren: gq.withChildren.Clone(), + withNursery: gq.withNursery.Clone(), + withStation: gq.withStation.Clone(), + // clone intermediate query. + sql: gq.sql.Clone(), + path: gq.path, + } +} + +// WithChildren tells the query-builder to eager-load the nodes that are connected to +// the "children" edge. The optional arguments are used to configure the query builder of the edge. +func (gq *GuardianQuery) WithChildren(opts ...func(*ChildQuery)) *GuardianQuery { + query := (&ChildClient{config: gq.config}).Query() + for _, opt := range opts { + opt(query) + } + gq.withChildren = query + return gq +} + +// WithNursery tells the query-builder to eager-load the nodes that are connected to +// the "nursery" edge. The optional arguments are used to configure the query builder of the edge. +func (gq *GuardianQuery) WithNursery(opts ...func(*NurseryQuery)) *GuardianQuery { + query := (&NurseryClient{config: gq.config}).Query() + for _, opt := range opts { + opt(query) + } + gq.withNursery = query + return gq +} + +// WithStation tells the query-builder to eager-load the nodes that are connected to +// the "station" edge. The optional arguments are used to configure the query builder of the edge. +func (gq *GuardianQuery) WithStation(opts ...func(*StationQuery)) *GuardianQuery { + query := (&StationClient{config: gq.config}).Query() + for _, opt := range opts { + opt(query) + } + gq.withStation = query + return gq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// Name string `json:"name,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.Guardian.Query(). +// GroupBy(guardian.FieldName). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (gq *GuardianQuery) GroupBy(field string, fields ...string) *GuardianGroupBy { + gq.ctx.Fields = append([]string{field}, fields...) + grbuild := &GuardianGroupBy{build: gq} + grbuild.flds = &gq.ctx.Fields + grbuild.label = guardian.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// Name string `json:"name,omitempty"` +// } +// +// client.Guardian.Query(). +// Select(guardian.FieldName). +// Scan(ctx, &v) +func (gq *GuardianQuery) Select(fields ...string) *GuardianSelect { + gq.ctx.Fields = append(gq.ctx.Fields, fields...) + sbuild := &GuardianSelect{GuardianQuery: gq} + sbuild.label = guardian.Label + sbuild.flds, sbuild.scan = &gq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a GuardianSelect configured with the given aggregations. +func (gq *GuardianQuery) Aggregate(fns ...AggregateFunc) *GuardianSelect { + return gq.Select().Aggregate(fns...) +} + +func (gq *GuardianQuery) prepareQuery(ctx context.Context) error { + for _, inter := range gq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, gq); err != nil { + return err + } + } + } + for _, f := range gq.ctx.Fields { + if !guardian.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if gq.path != nil { + prev, err := gq.path(ctx) + if err != nil { + return err + } + gq.sql = prev + } + return nil +} + +func (gq *GuardianQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Guardian, error) { + var ( + nodes = []*Guardian{} + withFKs = gq.withFKs + _spec = gq.querySpec() + loadedTypes = [3]bool{ + gq.withChildren != nil, + gq.withNursery != nil, + gq.withStation != nil, + } + ) + if gq.withNursery != nil { + withFKs = true + } + if withFKs { + _spec.Node.Columns = append(_spec.Node.Columns, guardian.ForeignKeys...) + } + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*Guardian).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &Guardian{config: gq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, gq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := gq.withChildren; query != nil { + if err := gq.loadChildren(ctx, query, nodes, + func(n *Guardian) { n.Edges.Children = []*Child{} }, + func(n *Guardian, e *Child) { n.Edges.Children = append(n.Edges.Children, e) }); err != nil { + return nil, err + } + } + if query := gq.withNursery; query != nil { + if err := gq.loadNursery(ctx, query, nodes, nil, + func(n *Guardian, e *Nursery) { n.Edges.Nursery = e }); err != nil { + return nil, err + } + } + if query := gq.withStation; query != nil { + if err := gq.loadStation(ctx, query, nodes, nil, + func(n *Guardian, e *Station) { n.Edges.Station = e }); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (gq *GuardianQuery) loadChildren(ctx context.Context, query *ChildQuery, nodes []*Guardian, init func(*Guardian), assign func(*Guardian, *Child)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Guardian) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Child(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(guardian.ChildrenColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.guardian_children + if fk == nil { + return fmt.Errorf(`foreign-key "guardian_children" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "guardian_children" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} +func (gq *GuardianQuery) loadNursery(ctx context.Context, query *NurseryQuery, nodes []*Guardian, init func(*Guardian), assign func(*Guardian, *Nursery)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Guardian) + for i := range nodes { + if nodes[i].guardian_nursery == nil { + continue + } + fk := *nodes[i].guardian_nursery + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(nursery.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "guardian_nursery" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (gq *GuardianQuery) loadStation(ctx context.Context, query *StationQuery, nodes []*Guardian, init func(*Guardian), assign func(*Guardian, *Station)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Guardian) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + } + query.withFKs = true + query.Where(predicate.Station(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(guardian.StationColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.guardian_station + if fk == nil { + return fmt.Errorf(`foreign-key "guardian_station" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "guardian_station" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} + +func (gq *GuardianQuery) sqlCount(ctx context.Context) (int, error) { + _spec := gq.querySpec() + _spec.Node.Columns = gq.ctx.Fields + if len(gq.ctx.Fields) > 0 { + _spec.Unique = gq.ctx.Unique != nil && *gq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, gq.driver, _spec) +} + +func (gq *GuardianQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(guardian.Table, guardian.Columns, sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID)) + _spec.From = gq.sql + if unique := gq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if gq.path != nil { + _spec.Unique = true + } + if fields := gq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, guardian.FieldID) + for i := range fields { + if fields[i] != guardian.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + } + if ps := gq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := gq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := gq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := gq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (gq *GuardianQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(gq.driver.Dialect()) + t1 := builder.Table(guardian.Table) + columns := gq.ctx.Fields + if len(columns) == 0 { + columns = guardian.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if gq.sql != nil { + selector = gq.sql + selector.Select(selector.Columns(columns...)...) + } + if gq.ctx.Unique != nil && *gq.ctx.Unique { + selector.Distinct() + } + for _, p := range gq.predicates { + p(selector) + } + for _, p := range gq.order { + p(selector) + } + if offset := gq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := gq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// GuardianGroupBy is the group-by builder for Guardian entities. +type GuardianGroupBy struct { + selector + build *GuardianQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (ggb *GuardianGroupBy) Aggregate(fns ...AggregateFunc) *GuardianGroupBy { + ggb.fns = append(ggb.fns, fns...) + return ggb +} + +// Scan applies the selector query and scans the result into the given value. +func (ggb *GuardianGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, ggb.build.ctx, "GroupBy") + if err := ggb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*GuardianQuery, *GuardianGroupBy](ctx, ggb.build, ggb, ggb.build.inters, v) +} + +func (ggb *GuardianGroupBy) sqlScan(ctx context.Context, root *GuardianQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(ggb.fns)) + for _, fn := range ggb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*ggb.flds)+len(ggb.fns)) + for _, f := range *ggb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*ggb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := ggb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// GuardianSelect is the builder for selecting fields of Guardian entities. +type GuardianSelect struct { + *GuardianQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (gs *GuardianSelect) Aggregate(fns ...AggregateFunc) *GuardianSelect { + gs.fns = append(gs.fns, fns...) + return gs +} + +// Scan applies the selector query and scans the result into the given value. +func (gs *GuardianSelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, gs.ctx, "Select") + if err := gs.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*GuardianQuery, *GuardianSelect](ctx, gs.GuardianQuery, gs, gs.inters, v) +} + +func (gs *GuardianSelect) sqlScan(ctx context.Context, root *GuardianQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(gs.fns)) + for _, fn := range gs.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*gs.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := gs.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/backend/domain/repository/ent/guardian_update.go b/backend/domain/repository/ent/guardian_update.go new file mode 100644 index 00000000..acd453d4 --- /dev/null +++ b/backend/domain/repository/ent/guardian_update.go @@ -0,0 +1,766 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// GuardianUpdate is the builder for updating Guardian entities. +type GuardianUpdate struct { + config + hooks []Hook + mutation *GuardianMutation +} + +// Where appends a list predicates to the GuardianUpdate builder. +func (gu *GuardianUpdate) Where(ps ...predicate.Guardian) *GuardianUpdate { + gu.mutation.Where(ps...) + return gu +} + +// SetName sets the "name" field. +func (gu *GuardianUpdate) SetName(s string) *GuardianUpdate { + gu.mutation.SetName(s) + return gu +} + +// SetNillableName sets the "name" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillableName(s *string) *GuardianUpdate { + if s != nil { + gu.SetName(*s) + } + return gu +} + +// SetEmail sets the "email" field. +func (gu *GuardianUpdate) SetEmail(s string) *GuardianUpdate { + gu.mutation.SetEmail(s) + return gu +} + +// SetNillableEmail sets the "email" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillableEmail(s *string) *GuardianUpdate { + if s != nil { + gu.SetEmail(*s) + } + return gu +} + +// ClearEmail clears the value of the "email" field. +func (gu *GuardianUpdate) ClearEmail() *GuardianUpdate { + gu.mutation.ClearEmail() + return gu +} + +// SetPhone sets the "phone" field. +func (gu *GuardianUpdate) SetPhone(s string) *GuardianUpdate { + gu.mutation.SetPhone(s) + return gu +} + +// SetNillablePhone sets the "phone" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillablePhone(s *string) *GuardianUpdate { + if s != nil { + gu.SetPhone(*s) + } + return gu +} + +// ClearPhone clears the value of the "phone" field. +func (gu *GuardianUpdate) ClearPhone() *GuardianUpdate { + gu.mutation.ClearPhone() + return gu +} + +// SetCreatedAt sets the "created_at" field. +func (gu *GuardianUpdate) SetCreatedAt(t time.Time) *GuardianUpdate { + gu.mutation.SetCreatedAt(t) + return gu +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillableCreatedAt(t *time.Time) *GuardianUpdate { + if t != nil { + gu.SetCreatedAt(*t) + } + return gu +} + +// SetUpdatedAt sets the "updated_at" field. +func (gu *GuardianUpdate) SetUpdatedAt(t time.Time) *GuardianUpdate { + gu.mutation.SetUpdatedAt(t) + return gu +} + +// AddChildIDs adds the "children" edge to the Child entity by IDs. +func (gu *GuardianUpdate) AddChildIDs(ids ...uuid.UUID) *GuardianUpdate { + gu.mutation.AddChildIDs(ids...) + return gu +} + +// AddChildren adds the "children" edges to the Child entity. +func (gu *GuardianUpdate) AddChildren(c ...*Child) *GuardianUpdate { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return gu.AddChildIDs(ids...) +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. +func (gu *GuardianUpdate) SetNurseryID(id uuid.UUID) *GuardianUpdate { + gu.mutation.SetNurseryID(id) + return gu +} + +// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. +func (gu *GuardianUpdate) SetNillableNurseryID(id *uuid.UUID) *GuardianUpdate { + if id != nil { + gu = gu.SetNurseryID(*id) + } + return gu +} + +// SetNursery sets the "nursery" edge to the Nursery entity. +func (gu *GuardianUpdate) SetNursery(n *Nursery) *GuardianUpdate { + return gu.SetNurseryID(n.ID) +} + +// SetStationID sets the "station" edge to the Station entity by ID. +func (gu *GuardianUpdate) SetStationID(id uuid.UUID) *GuardianUpdate { + gu.mutation.SetStationID(id) + return gu +} + +// SetNillableStationID sets the "station" edge to the Station entity by ID if the given value is not nil. +func (gu *GuardianUpdate) SetNillableStationID(id *uuid.UUID) *GuardianUpdate { + if id != nil { + gu = gu.SetStationID(*id) + } + return gu +} + +// SetStation sets the "station" edge to the Station entity. +func (gu *GuardianUpdate) SetStation(s *Station) *GuardianUpdate { + return gu.SetStationID(s.ID) +} + +// Mutation returns the GuardianMutation object of the builder. +func (gu *GuardianUpdate) Mutation() *GuardianMutation { + return gu.mutation +} + +// ClearChildren clears all "children" edges to the Child entity. +func (gu *GuardianUpdate) ClearChildren() *GuardianUpdate { + gu.mutation.ClearChildren() + return gu +} + +// RemoveChildIDs removes the "children" edge to Child entities by IDs. +func (gu *GuardianUpdate) RemoveChildIDs(ids ...uuid.UUID) *GuardianUpdate { + gu.mutation.RemoveChildIDs(ids...) + return gu +} + +// RemoveChildren removes "children" edges to Child entities. +func (gu *GuardianUpdate) RemoveChildren(c ...*Child) *GuardianUpdate { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return gu.RemoveChildIDs(ids...) +} + +// ClearNursery clears the "nursery" edge to the Nursery entity. +func (gu *GuardianUpdate) ClearNursery() *GuardianUpdate { + gu.mutation.ClearNursery() + return gu +} + +// ClearStation clears the "station" edge to the Station entity. +func (gu *GuardianUpdate) ClearStation() *GuardianUpdate { + gu.mutation.ClearStation() + return gu +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (gu *GuardianUpdate) Save(ctx context.Context) (int, error) { + gu.defaults() + return withHooks(ctx, gu.sqlSave, gu.mutation, gu.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (gu *GuardianUpdate) SaveX(ctx context.Context) int { + affected, err := gu.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (gu *GuardianUpdate) Exec(ctx context.Context) error { + _, err := gu.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (gu *GuardianUpdate) ExecX(ctx context.Context) { + if err := gu.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (gu *GuardianUpdate) defaults() { + if _, ok := gu.mutation.UpdatedAt(); !ok { + v := guardian.UpdateDefaultUpdatedAt() + gu.mutation.SetUpdatedAt(v) + } +} + +func (gu *GuardianUpdate) sqlSave(ctx context.Context) (n int, err error) { + _spec := sqlgraph.NewUpdateSpec(guardian.Table, guardian.Columns, sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID)) + if ps := gu.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := gu.mutation.Name(); ok { + _spec.SetField(guardian.FieldName, field.TypeString, value) + } + if value, ok := gu.mutation.Email(); ok { + _spec.SetField(guardian.FieldEmail, field.TypeString, value) + } + if gu.mutation.EmailCleared() { + _spec.ClearField(guardian.FieldEmail, field.TypeString) + } + if value, ok := gu.mutation.Phone(); ok { + _spec.SetField(guardian.FieldPhone, field.TypeString, value) + } + if gu.mutation.PhoneCleared() { + _spec.ClearField(guardian.FieldPhone, field.TypeString) + } + if value, ok := gu.mutation.CreatedAt(); ok { + _spec.SetField(guardian.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := gu.mutation.UpdatedAt(); ok { + _spec.SetField(guardian.FieldUpdatedAt, field.TypeTime, value) + } + if gu.mutation.ChildrenCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: guardian.ChildrenTable, + Columns: []string{guardian.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := gu.mutation.RemovedChildrenIDs(); len(nodes) > 0 && !gu.mutation.ChildrenCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: guardian.ChildrenTable, + Columns: []string{guardian.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := gu.mutation.ChildrenIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: guardian.ChildrenTable, + Columns: []string{guardian.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if gu.mutation.NurseryCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: guardian.NurseryTable, + Columns: []string{guardian.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := gu.mutation.NurseryIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: guardian.NurseryTable, + Columns: []string{guardian.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if gu.mutation.StationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2O, + Inverse: false, + Table: guardian.StationTable, + Columns: []string{guardian.StationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := gu.mutation.StationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2O, + Inverse: false, + Table: guardian.StationTable, + Columns: []string{guardian.StationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if n, err = sqlgraph.UpdateNodes(ctx, gu.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{guardian.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + gu.mutation.done = true + return n, nil +} + +// GuardianUpdateOne is the builder for updating a single Guardian entity. +type GuardianUpdateOne struct { + config + fields []string + hooks []Hook + mutation *GuardianMutation +} + +// SetName sets the "name" field. +func (guo *GuardianUpdateOne) SetName(s string) *GuardianUpdateOne { + guo.mutation.SetName(s) + return guo +} + +// SetNillableName sets the "name" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableName(s *string) *GuardianUpdateOne { + if s != nil { + guo.SetName(*s) + } + return guo +} + +// SetEmail sets the "email" field. +func (guo *GuardianUpdateOne) SetEmail(s string) *GuardianUpdateOne { + guo.mutation.SetEmail(s) + return guo +} + +// SetNillableEmail sets the "email" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableEmail(s *string) *GuardianUpdateOne { + if s != nil { + guo.SetEmail(*s) + } + return guo +} + +// ClearEmail clears the value of the "email" field. +func (guo *GuardianUpdateOne) ClearEmail() *GuardianUpdateOne { + guo.mutation.ClearEmail() + return guo +} + +// SetPhone sets the "phone" field. +func (guo *GuardianUpdateOne) SetPhone(s string) *GuardianUpdateOne { + guo.mutation.SetPhone(s) + return guo +} + +// SetNillablePhone sets the "phone" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillablePhone(s *string) *GuardianUpdateOne { + if s != nil { + guo.SetPhone(*s) + } + return guo +} + +// ClearPhone clears the value of the "phone" field. +func (guo *GuardianUpdateOne) ClearPhone() *GuardianUpdateOne { + guo.mutation.ClearPhone() + return guo +} + +// SetCreatedAt sets the "created_at" field. +func (guo *GuardianUpdateOne) SetCreatedAt(t time.Time) *GuardianUpdateOne { + guo.mutation.SetCreatedAt(t) + return guo +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableCreatedAt(t *time.Time) *GuardianUpdateOne { + if t != nil { + guo.SetCreatedAt(*t) + } + return guo +} + +// SetUpdatedAt sets the "updated_at" field. +func (guo *GuardianUpdateOne) SetUpdatedAt(t time.Time) *GuardianUpdateOne { + guo.mutation.SetUpdatedAt(t) + return guo +} + +// AddChildIDs adds the "children" edge to the Child entity by IDs. +func (guo *GuardianUpdateOne) AddChildIDs(ids ...uuid.UUID) *GuardianUpdateOne { + guo.mutation.AddChildIDs(ids...) + return guo +} + +// AddChildren adds the "children" edges to the Child entity. +func (guo *GuardianUpdateOne) AddChildren(c ...*Child) *GuardianUpdateOne { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return guo.AddChildIDs(ids...) +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. +func (guo *GuardianUpdateOne) SetNurseryID(id uuid.UUID) *GuardianUpdateOne { + guo.mutation.SetNurseryID(id) + return guo +} + +// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableNurseryID(id *uuid.UUID) *GuardianUpdateOne { + if id != nil { + guo = guo.SetNurseryID(*id) + } + return guo +} + +// SetNursery sets the "nursery" edge to the Nursery entity. +func (guo *GuardianUpdateOne) SetNursery(n *Nursery) *GuardianUpdateOne { + return guo.SetNurseryID(n.ID) +} + +// SetStationID sets the "station" edge to the Station entity by ID. +func (guo *GuardianUpdateOne) SetStationID(id uuid.UUID) *GuardianUpdateOne { + guo.mutation.SetStationID(id) + return guo +} + +// SetNillableStationID sets the "station" edge to the Station entity by ID if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableStationID(id *uuid.UUID) *GuardianUpdateOne { + if id != nil { + guo = guo.SetStationID(*id) + } + return guo +} + +// SetStation sets the "station" edge to the Station entity. +func (guo *GuardianUpdateOne) SetStation(s *Station) *GuardianUpdateOne { + return guo.SetStationID(s.ID) +} + +// Mutation returns the GuardianMutation object of the builder. +func (guo *GuardianUpdateOne) Mutation() *GuardianMutation { + return guo.mutation +} + +// ClearChildren clears all "children" edges to the Child entity. +func (guo *GuardianUpdateOne) ClearChildren() *GuardianUpdateOne { + guo.mutation.ClearChildren() + return guo +} + +// RemoveChildIDs removes the "children" edge to Child entities by IDs. +func (guo *GuardianUpdateOne) RemoveChildIDs(ids ...uuid.UUID) *GuardianUpdateOne { + guo.mutation.RemoveChildIDs(ids...) + return guo +} + +// RemoveChildren removes "children" edges to Child entities. +func (guo *GuardianUpdateOne) RemoveChildren(c ...*Child) *GuardianUpdateOne { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return guo.RemoveChildIDs(ids...) +} + +// ClearNursery clears the "nursery" edge to the Nursery entity. +func (guo *GuardianUpdateOne) ClearNursery() *GuardianUpdateOne { + guo.mutation.ClearNursery() + return guo +} + +// ClearStation clears the "station" edge to the Station entity. +func (guo *GuardianUpdateOne) ClearStation() *GuardianUpdateOne { + guo.mutation.ClearStation() + return guo +} + +// Where appends a list predicates to the GuardianUpdate builder. +func (guo *GuardianUpdateOne) Where(ps ...predicate.Guardian) *GuardianUpdateOne { + guo.mutation.Where(ps...) + return guo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (guo *GuardianUpdateOne) Select(field string, fields ...string) *GuardianUpdateOne { + guo.fields = append([]string{field}, fields...) + return guo +} + +// Save executes the query and returns the updated Guardian entity. +func (guo *GuardianUpdateOne) Save(ctx context.Context) (*Guardian, error) { + guo.defaults() + return withHooks(ctx, guo.sqlSave, guo.mutation, guo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (guo *GuardianUpdateOne) SaveX(ctx context.Context) *Guardian { + node, err := guo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (guo *GuardianUpdateOne) Exec(ctx context.Context) error { + _, err := guo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (guo *GuardianUpdateOne) ExecX(ctx context.Context) { + if err := guo.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (guo *GuardianUpdateOne) defaults() { + if _, ok := guo.mutation.UpdatedAt(); !ok { + v := guardian.UpdateDefaultUpdatedAt() + guo.mutation.SetUpdatedAt(v) + } +} + +func (guo *GuardianUpdateOne) sqlSave(ctx context.Context) (_node *Guardian, err error) { + _spec := sqlgraph.NewUpdateSpec(guardian.Table, guardian.Columns, sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID)) + id, ok := guo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Guardian.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := guo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, guardian.FieldID) + for _, f := range fields { + if !guardian.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != guardian.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := guo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := guo.mutation.Name(); ok { + _spec.SetField(guardian.FieldName, field.TypeString, value) + } + if value, ok := guo.mutation.Email(); ok { + _spec.SetField(guardian.FieldEmail, field.TypeString, value) + } + if guo.mutation.EmailCleared() { + _spec.ClearField(guardian.FieldEmail, field.TypeString) + } + if value, ok := guo.mutation.Phone(); ok { + _spec.SetField(guardian.FieldPhone, field.TypeString, value) + } + if guo.mutation.PhoneCleared() { + _spec.ClearField(guardian.FieldPhone, field.TypeString) + } + if value, ok := guo.mutation.CreatedAt(); ok { + _spec.SetField(guardian.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := guo.mutation.UpdatedAt(); ok { + _spec.SetField(guardian.FieldUpdatedAt, field.TypeTime, value) + } + if guo.mutation.ChildrenCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: guardian.ChildrenTable, + Columns: []string{guardian.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := guo.mutation.RemovedChildrenIDs(); len(nodes) > 0 && !guo.mutation.ChildrenCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: guardian.ChildrenTable, + Columns: []string{guardian.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := guo.mutation.ChildrenIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: guardian.ChildrenTable, + Columns: []string{guardian.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if guo.mutation.NurseryCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: guardian.NurseryTable, + Columns: []string{guardian.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := guo.mutation.NurseryIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: guardian.NurseryTable, + Columns: []string{guardian.NurseryColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if guo.mutation.StationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2O, + Inverse: false, + Table: guardian.StationTable, + Columns: []string{guardian.StationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := guo.mutation.StationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2O, + Inverse: false, + Table: guardian.StationTable, + Columns: []string{guardian.StationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + _node = &Guardian{config: guo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, guo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{guardian.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + guo.mutation.done = true + return _node, nil +} diff --git a/backend/domain/repository/ent/hook/hook.go b/backend/domain/repository/ent/hook/hook.go new file mode 100644 index 00000000..94b96d72 --- /dev/null +++ b/backend/domain/repository/ent/hook/hook.go @@ -0,0 +1,283 @@ +// Code generated by ent, DO NOT EDIT. + +package hook + +import ( + "context" + "fmt" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" +) + +// The BoardingRecordFunc type is an adapter to allow the use of ordinary +// function as BoardingRecord mutator. +type BoardingRecordFunc func(context.Context, *ent.BoardingRecordMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f BoardingRecordFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.BoardingRecordMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.BoardingRecordMutation", m) +} + +// The BusFunc type is an adapter to allow the use of ordinary +// function as Bus mutator. +type BusFunc func(context.Context, *ent.BusMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f BusFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.BusMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.BusMutation", m) +} + +// The ChildFunc type is an adapter to allow the use of ordinary +// function as Child mutator. +type ChildFunc func(context.Context, *ent.ChildMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f ChildFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.ChildMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ChildMutation", m) +} + +// The ChildBusAssociationFunc type is an adapter to allow the use of ordinary +// function as ChildBusAssociation mutator. +type ChildBusAssociationFunc func(context.Context, *ent.ChildBusAssociationMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f ChildBusAssociationFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.ChildBusAssociationMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ChildBusAssociationMutation", m) +} + +// The ChildPhotoFunc type is an adapter to allow the use of ordinary +// function as ChildPhoto mutator. +type ChildPhotoFunc func(context.Context, *ent.ChildPhotoMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f ChildPhotoFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.ChildPhotoMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ChildPhotoMutation", m) +} + +// The GuardianFunc type is an adapter to allow the use of ordinary +// function as Guardian mutator. +type GuardianFunc func(context.Context, *ent.GuardianMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f GuardianFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.GuardianMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.GuardianMutation", m) +} + +// The NurseryFunc type is an adapter to allow the use of ordinary +// function as Nursery mutator. +type NurseryFunc func(context.Context, *ent.NurseryMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f NurseryFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.NurseryMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.NurseryMutation", m) +} + +// The StationFunc type is an adapter to allow the use of ordinary +// function as Station mutator. +type StationFunc func(context.Context, *ent.StationMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f StationFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.StationMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.StationMutation", m) +} + +// Condition is a hook condition function. +type Condition func(context.Context, ent.Mutation) bool + +// And groups conditions with the AND operator. +func And(first, second Condition, rest ...Condition) Condition { + return func(ctx context.Context, m ent.Mutation) bool { + if !first(ctx, m) || !second(ctx, m) { + return false + } + for _, cond := range rest { + if !cond(ctx, m) { + return false + } + } + return true + } +} + +// Or groups conditions with the OR operator. +func Or(first, second Condition, rest ...Condition) Condition { + return func(ctx context.Context, m ent.Mutation) bool { + if first(ctx, m) || second(ctx, m) { + return true + } + for _, cond := range rest { + if cond(ctx, m) { + return true + } + } + return false + } +} + +// Not negates a given condition. +func Not(cond Condition) Condition { + return func(ctx context.Context, m ent.Mutation) bool { + return !cond(ctx, m) + } +} + +// HasOp is a condition testing mutation operation. +func HasOp(op ent.Op) Condition { + return func(_ context.Context, m ent.Mutation) bool { + return m.Op().Is(op) + } +} + +// HasAddedFields is a condition validating `.AddedField` on fields. +func HasAddedFields(field string, fields ...string) Condition { + return func(_ context.Context, m ent.Mutation) bool { + if _, exists := m.AddedField(field); !exists { + return false + } + for _, field := range fields { + if _, exists := m.AddedField(field); !exists { + return false + } + } + return true + } +} + +// HasClearedFields is a condition validating `.FieldCleared` on fields. +func HasClearedFields(field string, fields ...string) Condition { + return func(_ context.Context, m ent.Mutation) bool { + if exists := m.FieldCleared(field); !exists { + return false + } + for _, field := range fields { + if exists := m.FieldCleared(field); !exists { + return false + } + } + return true + } +} + +// HasFields is a condition validating `.Field` on fields. +func HasFields(field string, fields ...string) Condition { + return func(_ context.Context, m ent.Mutation) bool { + if _, exists := m.Field(field); !exists { + return false + } + for _, field := range fields { + if _, exists := m.Field(field); !exists { + return false + } + } + return true + } +} + +// If executes the given hook under condition. +// +// hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...))) +func If(hk ent.Hook, cond Condition) ent.Hook { + return func(next ent.Mutator) ent.Mutator { + return ent.MutateFunc(func(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if cond(ctx, m) { + return hk(next).Mutate(ctx, m) + } + return next.Mutate(ctx, m) + }) + } +} + +// On executes the given hook only for the given operation. +// +// hook.On(Log, ent.Delete|ent.Create) +func On(hk ent.Hook, op ent.Op) ent.Hook { + return If(hk, HasOp(op)) +} + +// Unless skips the given hook only for the given operation. +// +// hook.Unless(Log, ent.Update|ent.UpdateOne) +func Unless(hk ent.Hook, op ent.Op) ent.Hook { + return If(hk, Not(HasOp(op))) +} + +// FixedError is a hook returning a fixed error. +func FixedError(err error) ent.Hook { + return func(ent.Mutator) ent.Mutator { + return ent.MutateFunc(func(context.Context, ent.Mutation) (ent.Value, error) { + return nil, err + }) + } +} + +// Reject returns a hook that rejects all operations that match op. +// +// func (T) Hooks() []ent.Hook { +// return []ent.Hook{ +// Reject(ent.Delete|ent.Update), +// } +// } +func Reject(op ent.Op) ent.Hook { + hk := FixedError(fmt.Errorf("%s operation is not allowed", op)) + return On(hk, op) +} + +// Chain acts as a list of hooks and is effectively immutable. +// Once created, it will always hold the same set of hooks in the same order. +type Chain struct { + hooks []ent.Hook +} + +// NewChain creates a new chain of hooks. +func NewChain(hooks ...ent.Hook) Chain { + return Chain{append([]ent.Hook(nil), hooks...)} +} + +// Hook chains the list of hooks and returns the final hook. +func (c Chain) Hook() ent.Hook { + return func(mutator ent.Mutator) ent.Mutator { + for i := len(c.hooks) - 1; i >= 0; i-- { + mutator = c.hooks[i](mutator) + } + return mutator + } +} + +// Append extends a chain, adding the specified hook +// as the last ones in the mutation flow. +func (c Chain) Append(hooks ...ent.Hook) Chain { + newHooks := make([]ent.Hook, 0, len(c.hooks)+len(hooks)) + newHooks = append(newHooks, c.hooks...) + newHooks = append(newHooks, hooks...) + return Chain{newHooks} +} + +// Extend extends a chain, adding the specified chain +// as the last ones in the mutation flow. +func (c Chain) Extend(chain Chain) Chain { + return c.Append(chain.hooks...) +} diff --git a/backend/domain/repository/ent/migrate/migrate.go b/backend/domain/repository/ent/migrate/migrate.go new file mode 100644 index 00000000..1956a6bf --- /dev/null +++ b/backend/domain/repository/ent/migrate/migrate.go @@ -0,0 +1,64 @@ +// Code generated by ent, DO NOT EDIT. + +package migrate + +import ( + "context" + "fmt" + "io" + + "entgo.io/ent/dialect" + "entgo.io/ent/dialect/sql/schema" +) + +var ( + // WithGlobalUniqueID sets the universal ids options to the migration. + // If this option is enabled, ent migration will allocate a 1<<32 range + // for the ids of each entity (table). + // Note that this option cannot be applied on tables that already exist. + WithGlobalUniqueID = schema.WithGlobalUniqueID + // WithDropColumn sets the drop column option to the migration. + // If this option is enabled, ent migration will drop old columns + // that were used for both fields and edges. This defaults to false. + WithDropColumn = schema.WithDropColumn + // WithDropIndex sets the drop index option to the migration. + // If this option is enabled, ent migration will drop old indexes + // that were defined in the schema. This defaults to false. + // Note that unique constraints are defined using `UNIQUE INDEX`, + // and therefore, it's recommended to enable this option to get more + // flexibility in the schema changes. + WithDropIndex = schema.WithDropIndex + // WithForeignKeys enables creating foreign-key in schema DDL. This defaults to true. + WithForeignKeys = schema.WithForeignKeys +) + +// Schema is the API for creating, migrating and dropping a schema. +type Schema struct { + drv dialect.Driver +} + +// NewSchema creates a new schema client. +func NewSchema(drv dialect.Driver) *Schema { return &Schema{drv: drv} } + +// Create creates all schema resources. +func (s *Schema) Create(ctx context.Context, opts ...schema.MigrateOption) error { + return Create(ctx, s, Tables, opts...) +} + +// Create creates all table resources using the given schema driver. +func Create(ctx context.Context, s *Schema, tables []*schema.Table, opts ...schema.MigrateOption) error { + migrate, err := schema.NewMigrate(s.drv, opts...) + if err != nil { + return fmt.Errorf("ent/migrate: %w", err) + } + return migrate.Create(ctx, tables...) +} + +// WriteTo writes the schema changes to w instead of running them against the database. +// +// if err := client.Schema.WriteTo(context.Background(), os.Stdout); err != nil { +// log.Fatal(err) +// } +func (s *Schema) WriteTo(ctx context.Context, w io.Writer, opts ...schema.MigrateOption) error { + return Create(ctx, &Schema{drv: &schema.WriteDriver{Writer: w, Driver: s.drv}}, Tables, opts...) +} diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go new file mode 100644 index 00000000..f83cddf4 --- /dev/null +++ b/backend/domain/repository/ent/migrate/schema.go @@ -0,0 +1,272 @@ +// Code generated by ent, DO NOT EDIT. + +package migrate + +import ( + "entgo.io/ent/dialect/sql/schema" + "entgo.io/ent/schema/field" +) + +var ( + // BoardingRecordsColumns holds the columns for the "boarding_records" table. + BoardingRecordsColumns = []*schema.Column{ + {Name: "id", Type: field.TypeUUID, Unique: true}, + {Name: "timestamp", Type: field.TypeTime}, + {Name: "is_boarding", Type: field.TypeBool}, + {Name: "bus_boarding_records", Type: field.TypeUUID, Nullable: true}, + {Name: "child_boarding_record", Type: field.TypeUUID, Nullable: true}, + } + // BoardingRecordsTable holds the schema information for the "boarding_records" table. + BoardingRecordsTable = &schema.Table{ + Name: "boarding_records", + Columns: BoardingRecordsColumns, + PrimaryKey: []*schema.Column{BoardingRecordsColumns[0]}, + ForeignKeys: []*schema.ForeignKey{ + { + Symbol: "boarding_records_bus_boarding_records", + Columns: []*schema.Column{BoardingRecordsColumns[3]}, + RefColumns: []*schema.Column{BusColumns[0]}, + OnDelete: schema.SetNull, + }, + { + Symbol: "boarding_records_childs_boarding_record", + Columns: []*schema.Column{BoardingRecordsColumns[4]}, + RefColumns: []*schema.Column{ChildsColumns[0]}, + OnDelete: schema.SetNull, + }, + }, + } + // BusColumns holds the columns for the "bus" table. + BusColumns = []*schema.Column{ + {Name: "id", Type: field.TypeUUID, Unique: true}, + {Name: "name", Type: field.TypeString}, + {Name: "plate_number", Type: field.TypeString, Nullable: true}, + {Name: "latitude", Type: field.TypeFloat64, Nullable: true}, + {Name: "longitude", Type: field.TypeFloat64, Nullable: true}, + {Name: "status", Type: field.TypeEnum, Enums: []string{"stopped", "running", "maintenance"}, Default: "stopped"}, + {Name: "created_at", Type: field.TypeTime}, + {Name: "updated_at", Type: field.TypeTime}, + {Name: "bus_nursery", Type: field.TypeUUID, Nullable: true}, + } + // BusTable holds the schema information for the "bus" table. + BusTable = &schema.Table{ + Name: "bus", + Columns: BusColumns, + PrimaryKey: []*schema.Column{BusColumns[0]}, + ForeignKeys: []*schema.ForeignKey{ + { + Symbol: "bus_nurseries_nursery", + Columns: []*schema.Column{BusColumns[8]}, + RefColumns: []*schema.Column{NurseriesColumns[0]}, + OnDelete: schema.SetNull, + }, + }, + } + // ChildsColumns holds the columns for the "childs" table. + ChildsColumns = []*schema.Column{ + {Name: "id", Type: field.TypeUUID, Unique: true}, + {Name: "name", Type: field.TypeString}, + {Name: "age", Type: field.TypeInt}, + {Name: "sex", Type: field.TypeEnum, Enums: []string{"man", "women", "other"}}, + {Name: "is_ride_morning_bus", Type: field.TypeBool, Default: false}, + {Name: "is_ride_afternoon_bus", Type: field.TypeBool, Default: false}, + {Name: "check_for_missing_items", Type: field.TypeBool, Default: false}, + {Name: "has_bag", Type: field.TypeBool, Default: true}, + {Name: "has_lunch_box", Type: field.TypeBool, Default: true}, + {Name: "has_water_bottle", Type: field.TypeBool, Default: true}, + {Name: "has_umbrella", Type: field.TypeBool, Default: true}, + {Name: "has_other", Type: field.TypeBool, Default: true}, + {Name: "created_at", Type: field.TypeTime}, + {Name: "updated_at", Type: field.TypeTime}, + {Name: "child_nursery", Type: field.TypeUUID, Nullable: true}, + {Name: "guardian_children", Type: field.TypeUUID, Nullable: true}, + } + // ChildsTable holds the schema information for the "childs" table. + ChildsTable = &schema.Table{ + Name: "childs", + Columns: ChildsColumns, + PrimaryKey: []*schema.Column{ChildsColumns[0]}, + ForeignKeys: []*schema.ForeignKey{ + { + Symbol: "childs_nurseries_nursery", + Columns: []*schema.Column{ChildsColumns[14]}, + RefColumns: []*schema.Column{NurseriesColumns[0]}, + OnDelete: schema.SetNull, + }, + { + Symbol: "childs_guardians_children", + Columns: []*schema.Column{ChildsColumns[15]}, + RefColumns: []*schema.Column{GuardiansColumns[0]}, + OnDelete: schema.SetNull, + }, + }, + } + // ChildBusAssociationsColumns holds the columns for the "child_bus_associations" table. + ChildBusAssociationsColumns = []*schema.Column{ + {Name: "id", Type: field.TypeInt, Increment: true}, + {Name: "bus_type", Type: field.TypeEnum, Enums: []string{"morning", "evening"}}, + {Name: "bus_id", Type: field.TypeUUID}, + {Name: "child_id", Type: field.TypeUUID}, + } + // ChildBusAssociationsTable holds the schema information for the "child_bus_associations" table. + ChildBusAssociationsTable = &schema.Table{ + Name: "child_bus_associations", + Columns: ChildBusAssociationsColumns, + PrimaryKey: []*schema.Column{ChildBusAssociationsColumns[0]}, + ForeignKeys: []*schema.ForeignKey{ + { + Symbol: "child_bus_associations_bus_childBusAssociations", + Columns: []*schema.Column{ChildBusAssociationsColumns[2]}, + RefColumns: []*schema.Column{BusColumns[0]}, + OnDelete: schema.NoAction, + }, + { + Symbol: "child_bus_associations_childs_childBusAssociations", + Columns: []*schema.Column{ChildBusAssociationsColumns[3]}, + RefColumns: []*schema.Column{ChildsColumns[0]}, + OnDelete: schema.NoAction, + }, + }, + } + // ChildPhotosColumns holds the columns for the "child_photos" table. + ChildPhotosColumns = []*schema.Column{ + {Name: "id", Type: field.TypeUUID, Unique: true}, + {Name: "s3_bucket", Type: field.TypeString}, + {Name: "s3_key", Type: field.TypeString}, + {Name: "created_at", Type: field.TypeTime}, + {Name: "updated_at", Type: field.TypeTime}, + {Name: "child_photos", Type: field.TypeUUID, Nullable: true}, + } + // ChildPhotosTable holds the schema information for the "child_photos" table. + ChildPhotosTable = &schema.Table{ + Name: "child_photos", + Columns: ChildPhotosColumns, + PrimaryKey: []*schema.Column{ChildPhotosColumns[0]}, + ForeignKeys: []*schema.ForeignKey{ + { + Symbol: "child_photos_childs_photos", + Columns: []*schema.Column{ChildPhotosColumns[5]}, + RefColumns: []*schema.Column{ChildsColumns[0]}, + OnDelete: schema.SetNull, + }, + }, + } + // GuardiansColumns holds the columns for the "guardians" table. + GuardiansColumns = []*schema.Column{ + {Name: "id", Type: field.TypeUUID, Unique: true}, + {Name: "name", Type: field.TypeString}, + {Name: "email", Type: field.TypeString, Nullable: true}, + {Name: "phone", Type: field.TypeString, Nullable: true}, + {Name: "created_at", Type: field.TypeTime}, + {Name: "updated_at", Type: field.TypeTime}, + {Name: "guardian_nursery", Type: field.TypeUUID, Nullable: true}, + } + // GuardiansTable holds the schema information for the "guardians" table. + GuardiansTable = &schema.Table{ + Name: "guardians", + Columns: GuardiansColumns, + PrimaryKey: []*schema.Column{GuardiansColumns[0]}, + ForeignKeys: []*schema.ForeignKey{ + { + Symbol: "guardians_nurseries_nursery", + Columns: []*schema.Column{GuardiansColumns[6]}, + RefColumns: []*schema.Column{NurseriesColumns[0]}, + OnDelete: schema.SetNull, + }, + }, + } + // NurseriesColumns holds the columns for the "nurseries" table. + NurseriesColumns = []*schema.Column{ + {Name: "id", Type: field.TypeUUID, Unique: true}, + {Name: "nursery_code", Type: field.TypeString, Unique: true}, + {Name: "name", Type: field.TypeString}, + {Name: "address", Type: field.TypeString}, + {Name: "phone_number", Type: field.TypeString, Nullable: true}, + {Name: "email", Type: field.TypeString, Nullable: true}, + {Name: "created_at", Type: field.TypeTime}, + {Name: "updated_at", Type: field.TypeTime}, + } + // NurseriesTable holds the schema information for the "nurseries" table. + NurseriesTable = &schema.Table{ + Name: "nurseries", + Columns: NurseriesColumns, + PrimaryKey: []*schema.Column{NurseriesColumns[0]}, + } + // StationsColumns holds the columns for the "stations" table. + StationsColumns = []*schema.Column{ + {Name: "id", Type: field.TypeUUID, Unique: true}, + {Name: "latitude", Type: field.TypeFloat64, Nullable: true}, + {Name: "longitude", Type: field.TypeFloat64, Nullable: true}, + {Name: "morning_order", Type: field.TypeInt}, + {Name: "evening_order", Type: field.TypeInt}, + {Name: "created_at", Type: field.TypeTime}, + {Name: "updated_at", Type: field.TypeTime}, + {Name: "guardian_station", Type: field.TypeUUID, Unique: true, Nullable: true}, + } + // StationsTable holds the schema information for the "stations" table. + StationsTable = &schema.Table{ + Name: "stations", + Columns: StationsColumns, + PrimaryKey: []*schema.Column{StationsColumns[0]}, + ForeignKeys: []*schema.ForeignKey{ + { + Symbol: "stations_guardians_station", + Columns: []*schema.Column{StationsColumns[7]}, + RefColumns: []*schema.Column{GuardiansColumns[0]}, + OnDelete: schema.SetNull, + }, + }, + } + // BusStationsColumns holds the columns for the "bus_stations" table. + BusStationsColumns = []*schema.Column{ + {Name: "bus_id", Type: field.TypeUUID}, + {Name: "station_id", Type: field.TypeUUID}, + } + // BusStationsTable holds the schema information for the "bus_stations" table. + BusStationsTable = &schema.Table{ + Name: "bus_stations", + Columns: BusStationsColumns, + PrimaryKey: []*schema.Column{BusStationsColumns[0], BusStationsColumns[1]}, + ForeignKeys: []*schema.ForeignKey{ + { + Symbol: "bus_stations_bus_id", + Columns: []*schema.Column{BusStationsColumns[0]}, + RefColumns: []*schema.Column{BusColumns[0]}, + OnDelete: schema.Cascade, + }, + { + Symbol: "bus_stations_station_id", + Columns: []*schema.Column{BusStationsColumns[1]}, + RefColumns: []*schema.Column{StationsColumns[0]}, + OnDelete: schema.Cascade, + }, + }, + } + // Tables holds all the tables in the schema. + Tables = []*schema.Table{ + BoardingRecordsTable, + BusTable, + ChildsTable, + ChildBusAssociationsTable, + ChildPhotosTable, + GuardiansTable, + NurseriesTable, + StationsTable, + BusStationsTable, + } +) + +func init() { + BoardingRecordsTable.ForeignKeys[0].RefTable = BusTable + BoardingRecordsTable.ForeignKeys[1].RefTable = ChildsTable + BusTable.ForeignKeys[0].RefTable = NurseriesTable + ChildsTable.ForeignKeys[0].RefTable = NurseriesTable + ChildsTable.ForeignKeys[1].RefTable = GuardiansTable + ChildBusAssociationsTable.ForeignKeys[0].RefTable = BusTable + ChildBusAssociationsTable.ForeignKeys[1].RefTable = ChildsTable + ChildPhotosTable.ForeignKeys[0].RefTable = ChildsTable + GuardiansTable.ForeignKeys[0].RefTable = NurseriesTable + StationsTable.ForeignKeys[0].RefTable = GuardiansTable + BusStationsTable.ForeignKeys[0].RefTable = BusTable + BusStationsTable.ForeignKeys[1].RefTable = StationsTable +} diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go new file mode 100644 index 00000000..45e5afd1 --- /dev/null +++ b/backend/domain/repository/ent/mutation.go @@ -0,0 +1,6836 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "sync" + "time" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +const ( + // Operation types. + OpCreate = ent.OpCreate + OpDelete = ent.OpDelete + OpDeleteOne = ent.OpDeleteOne + OpUpdate = ent.OpUpdate + OpUpdateOne = ent.OpUpdateOne + + // Node types. + TypeBoardingRecord = "BoardingRecord" + TypeBus = "Bus" + TypeChild = "Child" + TypeChildBusAssociation = "ChildBusAssociation" + TypeChildPhoto = "ChildPhoto" + TypeGuardian = "Guardian" + TypeNursery = "Nursery" + TypeStation = "Station" +) + +// BoardingRecordMutation represents an operation that mutates the BoardingRecord nodes in the graph. +type BoardingRecordMutation struct { + config + op Op + typ string + id *uuid.UUID + timestamp *time.Time + is_boarding *bool + clearedFields map[string]struct{} + child *uuid.UUID + clearedchild bool + bus *uuid.UUID + clearedbus bool + done bool + oldValue func(context.Context) (*BoardingRecord, error) + predicates []predicate.BoardingRecord +} + +var _ ent.Mutation = (*BoardingRecordMutation)(nil) + +// boardingrecordOption allows management of the mutation configuration using functional options. +type boardingrecordOption func(*BoardingRecordMutation) + +// newBoardingRecordMutation creates new mutation for the BoardingRecord entity. +func newBoardingRecordMutation(c config, op Op, opts ...boardingrecordOption) *BoardingRecordMutation { + m := &BoardingRecordMutation{ + config: c, + op: op, + typ: TypeBoardingRecord, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withBoardingRecordID sets the ID field of the mutation. +func withBoardingRecordID(id uuid.UUID) boardingrecordOption { + return func(m *BoardingRecordMutation) { + var ( + err error + once sync.Once + value *BoardingRecord + ) + m.oldValue = func(ctx context.Context) (*BoardingRecord, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().BoardingRecord.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withBoardingRecord sets the old BoardingRecord of the mutation. +func withBoardingRecord(node *BoardingRecord) boardingrecordOption { + return func(m *BoardingRecordMutation) { + m.oldValue = func(context.Context) (*BoardingRecord, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m BoardingRecordMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m BoardingRecordMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// SetID sets the value of the id field. Note that this +// operation is only accepted on creation of BoardingRecord entities. +func (m *BoardingRecordMutation) SetID(id uuid.UUID) { + m.id = &id +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *BoardingRecordMutation) ID() (id uuid.UUID, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *BoardingRecordMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []uuid.UUID{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().BoardingRecord.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetTimestamp sets the "timestamp" field. +func (m *BoardingRecordMutation) SetTimestamp(t time.Time) { + m.timestamp = &t +} + +// Timestamp returns the value of the "timestamp" field in the mutation. +func (m *BoardingRecordMutation) Timestamp() (r time.Time, exists bool) { + v := m.timestamp + if v == nil { + return + } + return *v, true +} + +// OldTimestamp returns the old "timestamp" field's value of the BoardingRecord entity. +// If the BoardingRecord object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BoardingRecordMutation) OldTimestamp(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldTimestamp is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldTimestamp requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldTimestamp: %w", err) + } + return oldValue.Timestamp, nil +} + +// ResetTimestamp resets all changes to the "timestamp" field. +func (m *BoardingRecordMutation) ResetTimestamp() { + m.timestamp = nil +} + +// SetIsBoarding sets the "is_boarding" field. +func (m *BoardingRecordMutation) SetIsBoarding(b bool) { + m.is_boarding = &b +} + +// IsBoarding returns the value of the "is_boarding" field in the mutation. +func (m *BoardingRecordMutation) IsBoarding() (r bool, exists bool) { + v := m.is_boarding + if v == nil { + return + } + return *v, true +} + +// OldIsBoarding returns the old "is_boarding" field's value of the BoardingRecord entity. +// If the BoardingRecord object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BoardingRecordMutation) OldIsBoarding(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldIsBoarding is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldIsBoarding requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldIsBoarding: %w", err) + } + return oldValue.IsBoarding, nil +} + +// ResetIsBoarding resets all changes to the "is_boarding" field. +func (m *BoardingRecordMutation) ResetIsBoarding() { + m.is_boarding = nil +} + +// SetChildID sets the "child" edge to the Child entity by id. +func (m *BoardingRecordMutation) SetChildID(id uuid.UUID) { + m.child = &id +} + +// ClearChild clears the "child" edge to the Child entity. +func (m *BoardingRecordMutation) ClearChild() { + m.clearedchild = true +} + +// ChildCleared reports if the "child" edge to the Child entity was cleared. +func (m *BoardingRecordMutation) ChildCleared() bool { + return m.clearedchild +} + +// ChildID returns the "child" edge ID in the mutation. +func (m *BoardingRecordMutation) ChildID() (id uuid.UUID, exists bool) { + if m.child != nil { + return *m.child, true + } + return +} + +// ChildIDs returns the "child" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// ChildID instead. It exists only for internal usage by the builders. +func (m *BoardingRecordMutation) ChildIDs() (ids []uuid.UUID) { + if id := m.child; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetChild resets all changes to the "child" edge. +func (m *BoardingRecordMutation) ResetChild() { + m.child = nil + m.clearedchild = false +} + +// SetBusID sets the "bus" edge to the Bus entity by id. +func (m *BoardingRecordMutation) SetBusID(id uuid.UUID) { + m.bus = &id +} + +// ClearBus clears the "bus" edge to the Bus entity. +func (m *BoardingRecordMutation) ClearBus() { + m.clearedbus = true +} + +// BusCleared reports if the "bus" edge to the Bus entity was cleared. +func (m *BoardingRecordMutation) BusCleared() bool { + return m.clearedbus +} + +// BusID returns the "bus" edge ID in the mutation. +func (m *BoardingRecordMutation) BusID() (id uuid.UUID, exists bool) { + if m.bus != nil { + return *m.bus, true + } + return +} + +// BusIDs returns the "bus" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// BusID instead. It exists only for internal usage by the builders. +func (m *BoardingRecordMutation) BusIDs() (ids []uuid.UUID) { + if id := m.bus; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetBus resets all changes to the "bus" edge. +func (m *BoardingRecordMutation) ResetBus() { + m.bus = nil + m.clearedbus = false +} + +// Where appends a list predicates to the BoardingRecordMutation builder. +func (m *BoardingRecordMutation) Where(ps ...predicate.BoardingRecord) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the BoardingRecordMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *BoardingRecordMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.BoardingRecord, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *BoardingRecordMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *BoardingRecordMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (BoardingRecord). +func (m *BoardingRecordMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *BoardingRecordMutation) Fields() []string { + fields := make([]string, 0, 2) + if m.timestamp != nil { + fields = append(fields, boardingrecord.FieldTimestamp) + } + if m.is_boarding != nil { + fields = append(fields, boardingrecord.FieldIsBoarding) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *BoardingRecordMutation) Field(name string) (ent.Value, bool) { + switch name { + case boardingrecord.FieldTimestamp: + return m.Timestamp() + case boardingrecord.FieldIsBoarding: + return m.IsBoarding() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *BoardingRecordMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case boardingrecord.FieldTimestamp: + return m.OldTimestamp(ctx) + case boardingrecord.FieldIsBoarding: + return m.OldIsBoarding(ctx) + } + return nil, fmt.Errorf("unknown BoardingRecord field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *BoardingRecordMutation) SetField(name string, value ent.Value) error { + switch name { + case boardingrecord.FieldTimestamp: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetTimestamp(v) + return nil + case boardingrecord.FieldIsBoarding: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetIsBoarding(v) + return nil + } + return fmt.Errorf("unknown BoardingRecord field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *BoardingRecordMutation) AddedFields() []string { + return nil +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *BoardingRecordMutation) AddedField(name string) (ent.Value, bool) { + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *BoardingRecordMutation) AddField(name string, value ent.Value) error { + switch name { + } + return fmt.Errorf("unknown BoardingRecord numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *BoardingRecordMutation) ClearedFields() []string { + return nil +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *BoardingRecordMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *BoardingRecordMutation) ClearField(name string) error { + return fmt.Errorf("unknown BoardingRecord nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *BoardingRecordMutation) ResetField(name string) error { + switch name { + case boardingrecord.FieldTimestamp: + m.ResetTimestamp() + return nil + case boardingrecord.FieldIsBoarding: + m.ResetIsBoarding() + return nil + } + return fmt.Errorf("unknown BoardingRecord field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *BoardingRecordMutation) AddedEdges() []string { + edges := make([]string, 0, 2) + if m.child != nil { + edges = append(edges, boardingrecord.EdgeChild) + } + if m.bus != nil { + edges = append(edges, boardingrecord.EdgeBus) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *BoardingRecordMutation) AddedIDs(name string) []ent.Value { + switch name { + case boardingrecord.EdgeChild: + if id := m.child; id != nil { + return []ent.Value{*id} + } + case boardingrecord.EdgeBus: + if id := m.bus; id != nil { + return []ent.Value{*id} + } + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *BoardingRecordMutation) RemovedEdges() []string { + edges := make([]string, 0, 2) + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *BoardingRecordMutation) RemovedIDs(name string) []ent.Value { + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *BoardingRecordMutation) ClearedEdges() []string { + edges := make([]string, 0, 2) + if m.clearedchild { + edges = append(edges, boardingrecord.EdgeChild) + } + if m.clearedbus { + edges = append(edges, boardingrecord.EdgeBus) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *BoardingRecordMutation) EdgeCleared(name string) bool { + switch name { + case boardingrecord.EdgeChild: + return m.clearedchild + case boardingrecord.EdgeBus: + return m.clearedbus + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *BoardingRecordMutation) ClearEdge(name string) error { + switch name { + case boardingrecord.EdgeChild: + m.ClearChild() + return nil + case boardingrecord.EdgeBus: + m.ClearBus() + return nil + } + return fmt.Errorf("unknown BoardingRecord unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *BoardingRecordMutation) ResetEdge(name string) error { + switch name { + case boardingrecord.EdgeChild: + m.ResetChild() + return nil + case boardingrecord.EdgeBus: + m.ResetBus() + return nil + } + return fmt.Errorf("unknown BoardingRecord edge %s", name) +} + +// BusMutation represents an operation that mutates the Bus nodes in the graph. +type BusMutation struct { + config + op Op + typ string + id *uuid.UUID + name *string + plate_number *string + latitude *float64 + addlatitude *float64 + longitude *float64 + addlongitude *float64 + status *bus.Status + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + nursery *uuid.UUID + clearednursery bool + stations map[uuid.UUID]struct{} + removedstations map[uuid.UUID]struct{} + clearedstations bool + boarding_records map[uuid.UUID]struct{} + removedboarding_records map[uuid.UUID]struct{} + clearedboarding_records bool + childBusAssociations map[int]struct{} + removedchildBusAssociations map[int]struct{} + clearedchildBusAssociations bool + done bool + oldValue func(context.Context) (*Bus, error) + predicates []predicate.Bus +} + +var _ ent.Mutation = (*BusMutation)(nil) + +// busOption allows management of the mutation configuration using functional options. +type busOption func(*BusMutation) + +// newBusMutation creates new mutation for the Bus entity. +func newBusMutation(c config, op Op, opts ...busOption) *BusMutation { + m := &BusMutation{ + config: c, + op: op, + typ: TypeBus, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withBusID sets the ID field of the mutation. +func withBusID(id uuid.UUID) busOption { + return func(m *BusMutation) { + var ( + err error + once sync.Once + value *Bus + ) + m.oldValue = func(ctx context.Context) (*Bus, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().Bus.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withBus sets the old Bus of the mutation. +func withBus(node *Bus) busOption { + return func(m *BusMutation) { + m.oldValue = func(context.Context) (*Bus, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m BusMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m BusMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// SetID sets the value of the id field. Note that this +// operation is only accepted on creation of Bus entities. +func (m *BusMutation) SetID(id uuid.UUID) { + m.id = &id +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *BusMutation) ID() (id uuid.UUID, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *BusMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []uuid.UUID{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Bus.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetName sets the "name" field. +func (m *BusMutation) SetName(s string) { + m.name = &s +} + +// Name returns the value of the "name" field in the mutation. +func (m *BusMutation) Name() (r string, exists bool) { + v := m.name + if v == nil { + return + } + return *v, true +} + +// OldName returns the old "name" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldName(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldName is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldName requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldName: %w", err) + } + return oldValue.Name, nil +} + +// ResetName resets all changes to the "name" field. +func (m *BusMutation) ResetName() { + m.name = nil +} + +// SetPlateNumber sets the "plate_number" field. +func (m *BusMutation) SetPlateNumber(s string) { + m.plate_number = &s +} + +// PlateNumber returns the value of the "plate_number" field in the mutation. +func (m *BusMutation) PlateNumber() (r string, exists bool) { + v := m.plate_number + if v == nil { + return + } + return *v, true +} + +// OldPlateNumber returns the old "plate_number" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldPlateNumber(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldPlateNumber is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldPlateNumber requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldPlateNumber: %w", err) + } + return oldValue.PlateNumber, nil +} + +// ClearPlateNumber clears the value of the "plate_number" field. +func (m *BusMutation) ClearPlateNumber() { + m.plate_number = nil + m.clearedFields[bus.FieldPlateNumber] = struct{}{} +} + +// PlateNumberCleared returns if the "plate_number" field was cleared in this mutation. +func (m *BusMutation) PlateNumberCleared() bool { + _, ok := m.clearedFields[bus.FieldPlateNumber] + return ok +} + +// ResetPlateNumber resets all changes to the "plate_number" field. +func (m *BusMutation) ResetPlateNumber() { + m.plate_number = nil + delete(m.clearedFields, bus.FieldPlateNumber) +} + +// SetLatitude sets the "latitude" field. +func (m *BusMutation) SetLatitude(f float64) { + m.latitude = &f + m.addlatitude = nil +} + +// Latitude returns the value of the "latitude" field in the mutation. +func (m *BusMutation) Latitude() (r float64, exists bool) { + v := m.latitude + if v == nil { + return + } + return *v, true +} + +// OldLatitude returns the old "latitude" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldLatitude(ctx context.Context) (v float64, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldLatitude is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldLatitude requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldLatitude: %w", err) + } + return oldValue.Latitude, nil +} + +// AddLatitude adds f to the "latitude" field. +func (m *BusMutation) AddLatitude(f float64) { + if m.addlatitude != nil { + *m.addlatitude += f + } else { + m.addlatitude = &f + } +} + +// AddedLatitude returns the value that was added to the "latitude" field in this mutation. +func (m *BusMutation) AddedLatitude() (r float64, exists bool) { + v := m.addlatitude + if v == nil { + return + } + return *v, true +} + +// ClearLatitude clears the value of the "latitude" field. +func (m *BusMutation) ClearLatitude() { + m.latitude = nil + m.addlatitude = nil + m.clearedFields[bus.FieldLatitude] = struct{}{} +} + +// LatitudeCleared returns if the "latitude" field was cleared in this mutation. +func (m *BusMutation) LatitudeCleared() bool { + _, ok := m.clearedFields[bus.FieldLatitude] + return ok +} + +// ResetLatitude resets all changes to the "latitude" field. +func (m *BusMutation) ResetLatitude() { + m.latitude = nil + m.addlatitude = nil + delete(m.clearedFields, bus.FieldLatitude) +} + +// SetLongitude sets the "longitude" field. +func (m *BusMutation) SetLongitude(f float64) { + m.longitude = &f + m.addlongitude = nil +} + +// Longitude returns the value of the "longitude" field in the mutation. +func (m *BusMutation) Longitude() (r float64, exists bool) { + v := m.longitude + if v == nil { + return + } + return *v, true +} + +// OldLongitude returns the old "longitude" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldLongitude(ctx context.Context) (v float64, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldLongitude is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldLongitude requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldLongitude: %w", err) + } + return oldValue.Longitude, nil +} + +// AddLongitude adds f to the "longitude" field. +func (m *BusMutation) AddLongitude(f float64) { + if m.addlongitude != nil { + *m.addlongitude += f + } else { + m.addlongitude = &f + } +} + +// AddedLongitude returns the value that was added to the "longitude" field in this mutation. +func (m *BusMutation) AddedLongitude() (r float64, exists bool) { + v := m.addlongitude + if v == nil { + return + } + return *v, true +} + +// ClearLongitude clears the value of the "longitude" field. +func (m *BusMutation) ClearLongitude() { + m.longitude = nil + m.addlongitude = nil + m.clearedFields[bus.FieldLongitude] = struct{}{} +} + +// LongitudeCleared returns if the "longitude" field was cleared in this mutation. +func (m *BusMutation) LongitudeCleared() bool { + _, ok := m.clearedFields[bus.FieldLongitude] + return ok +} + +// ResetLongitude resets all changes to the "longitude" field. +func (m *BusMutation) ResetLongitude() { + m.longitude = nil + m.addlongitude = nil + delete(m.clearedFields, bus.FieldLongitude) +} + +// SetStatus sets the "status" field. +func (m *BusMutation) SetStatus(b bus.Status) { + m.status = &b +} + +// Status returns the value of the "status" field in the mutation. +func (m *BusMutation) Status() (r bus.Status, exists bool) { + v := m.status + if v == nil { + return + } + return *v, true +} + +// OldStatus returns the old "status" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldStatus(ctx context.Context) (v bus.Status, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldStatus is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldStatus requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldStatus: %w", err) + } + return oldValue.Status, nil +} + +// ResetStatus resets all changes to the "status" field. +func (m *BusMutation) ResetStatus() { + m.status = nil +} + +// SetCreatedAt sets the "created_at" field. +func (m *BusMutation) SetCreatedAt(t time.Time) { + m.created_at = &t +} + +// CreatedAt returns the value of the "created_at" field in the mutation. +func (m *BusMutation) CreatedAt() (r time.Time, exists bool) { + v := m.created_at + if v == nil { + return + } + return *v, true +} + +// OldCreatedAt returns the old "created_at" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldCreatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldCreatedAt: %w", err) + } + return oldValue.CreatedAt, nil +} + +// ResetCreatedAt resets all changes to the "created_at" field. +func (m *BusMutation) ResetCreatedAt() { + m.created_at = nil +} + +// SetUpdatedAt sets the "updated_at" field. +func (m *BusMutation) SetUpdatedAt(t time.Time) { + m.updated_at = &t +} + +// UpdatedAt returns the value of the "updated_at" field in the mutation. +func (m *BusMutation) UpdatedAt() (r time.Time, exists bool) { + v := m.updated_at + if v == nil { + return + } + return *v, true +} + +// OldUpdatedAt returns the old "updated_at" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldUpdatedAt: %w", err) + } + return oldValue.UpdatedAt, nil +} + +// ResetUpdatedAt resets all changes to the "updated_at" field. +func (m *BusMutation) ResetUpdatedAt() { + m.updated_at = nil +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by id. +func (m *BusMutation) SetNurseryID(id uuid.UUID) { + m.nursery = &id +} + +// ClearNursery clears the "nursery" edge to the Nursery entity. +func (m *BusMutation) ClearNursery() { + m.clearednursery = true +} + +// NurseryCleared reports if the "nursery" edge to the Nursery entity was cleared. +func (m *BusMutation) NurseryCleared() bool { + return m.clearednursery +} + +// NurseryID returns the "nursery" edge ID in the mutation. +func (m *BusMutation) NurseryID() (id uuid.UUID, exists bool) { + if m.nursery != nil { + return *m.nursery, true + } + return +} + +// NurseryIDs returns the "nursery" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// NurseryID instead. It exists only for internal usage by the builders. +func (m *BusMutation) NurseryIDs() (ids []uuid.UUID) { + if id := m.nursery; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetNursery resets all changes to the "nursery" edge. +func (m *BusMutation) ResetNursery() { + m.nursery = nil + m.clearednursery = false +} + +// AddStationIDs adds the "stations" edge to the Station entity by ids. +func (m *BusMutation) AddStationIDs(ids ...uuid.UUID) { + if m.stations == nil { + m.stations = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.stations[ids[i]] = struct{}{} + } +} + +// ClearStations clears the "stations" edge to the Station entity. +func (m *BusMutation) ClearStations() { + m.clearedstations = true +} + +// StationsCleared reports if the "stations" edge to the Station entity was cleared. +func (m *BusMutation) StationsCleared() bool { + return m.clearedstations +} + +// RemoveStationIDs removes the "stations" edge to the Station entity by IDs. +func (m *BusMutation) RemoveStationIDs(ids ...uuid.UUID) { + if m.removedstations == nil { + m.removedstations = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.stations, ids[i]) + m.removedstations[ids[i]] = struct{}{} + } +} + +// RemovedStations returns the removed IDs of the "stations" edge to the Station entity. +func (m *BusMutation) RemovedStationsIDs() (ids []uuid.UUID) { + for id := range m.removedstations { + ids = append(ids, id) + } + return +} + +// StationsIDs returns the "stations" edge IDs in the mutation. +func (m *BusMutation) StationsIDs() (ids []uuid.UUID) { + for id := range m.stations { + ids = append(ids, id) + } + return +} + +// ResetStations resets all changes to the "stations" edge. +func (m *BusMutation) ResetStations() { + m.stations = nil + m.clearedstations = false + m.removedstations = nil +} + +// AddBoardingRecordIDs adds the "boarding_records" edge to the BoardingRecord entity by ids. +func (m *BusMutation) AddBoardingRecordIDs(ids ...uuid.UUID) { + if m.boarding_records == nil { + m.boarding_records = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.boarding_records[ids[i]] = struct{}{} + } +} + +// ClearBoardingRecords clears the "boarding_records" edge to the BoardingRecord entity. +func (m *BusMutation) ClearBoardingRecords() { + m.clearedboarding_records = true +} + +// BoardingRecordsCleared reports if the "boarding_records" edge to the BoardingRecord entity was cleared. +func (m *BusMutation) BoardingRecordsCleared() bool { + return m.clearedboarding_records +} + +// RemoveBoardingRecordIDs removes the "boarding_records" edge to the BoardingRecord entity by IDs. +func (m *BusMutation) RemoveBoardingRecordIDs(ids ...uuid.UUID) { + if m.removedboarding_records == nil { + m.removedboarding_records = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.boarding_records, ids[i]) + m.removedboarding_records[ids[i]] = struct{}{} + } +} + +// RemovedBoardingRecords returns the removed IDs of the "boarding_records" edge to the BoardingRecord entity. +func (m *BusMutation) RemovedBoardingRecordsIDs() (ids []uuid.UUID) { + for id := range m.removedboarding_records { + ids = append(ids, id) + } + return +} + +// BoardingRecordsIDs returns the "boarding_records" edge IDs in the mutation. +func (m *BusMutation) BoardingRecordsIDs() (ids []uuid.UUID) { + for id := range m.boarding_records { + ids = append(ids, id) + } + return +} + +// ResetBoardingRecords resets all changes to the "boarding_records" edge. +func (m *BusMutation) ResetBoardingRecords() { + m.boarding_records = nil + m.clearedboarding_records = false + m.removedboarding_records = nil +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by ids. +func (m *BusMutation) AddChildBusAssociationIDs(ids ...int) { + if m.childBusAssociations == nil { + m.childBusAssociations = make(map[int]struct{}) + } + for i := range ids { + m.childBusAssociations[ids[i]] = struct{}{} + } +} + +// ClearChildBusAssociations clears the "childBusAssociations" edge to the ChildBusAssociation entity. +func (m *BusMutation) ClearChildBusAssociations() { + m.clearedchildBusAssociations = true +} + +// ChildBusAssociationsCleared reports if the "childBusAssociations" edge to the ChildBusAssociation entity was cleared. +func (m *BusMutation) ChildBusAssociationsCleared() bool { + return m.clearedchildBusAssociations +} + +// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (m *BusMutation) RemoveChildBusAssociationIDs(ids ...int) { + if m.removedchildBusAssociations == nil { + m.removedchildBusAssociations = make(map[int]struct{}) + } + for i := range ids { + delete(m.childBusAssociations, ids[i]) + m.removedchildBusAssociations[ids[i]] = struct{}{} + } +} + +// RemovedChildBusAssociations returns the removed IDs of the "childBusAssociations" edge to the ChildBusAssociation entity. +func (m *BusMutation) RemovedChildBusAssociationsIDs() (ids []int) { + for id := range m.removedchildBusAssociations { + ids = append(ids, id) + } + return +} + +// ChildBusAssociationsIDs returns the "childBusAssociations" edge IDs in the mutation. +func (m *BusMutation) ChildBusAssociationsIDs() (ids []int) { + for id := range m.childBusAssociations { + ids = append(ids, id) + } + return +} + +// ResetChildBusAssociations resets all changes to the "childBusAssociations" edge. +func (m *BusMutation) ResetChildBusAssociations() { + m.childBusAssociations = nil + m.clearedchildBusAssociations = false + m.removedchildBusAssociations = nil +} + +// Where appends a list predicates to the BusMutation builder. +func (m *BusMutation) Where(ps ...predicate.Bus) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the BusMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *BusMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.Bus, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *BusMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *BusMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (Bus). +func (m *BusMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *BusMutation) Fields() []string { + fields := make([]string, 0, 7) + if m.name != nil { + fields = append(fields, bus.FieldName) + } + if m.plate_number != nil { + fields = append(fields, bus.FieldPlateNumber) + } + if m.latitude != nil { + fields = append(fields, bus.FieldLatitude) + } + if m.longitude != nil { + fields = append(fields, bus.FieldLongitude) + } + if m.status != nil { + fields = append(fields, bus.FieldStatus) + } + if m.created_at != nil { + fields = append(fields, bus.FieldCreatedAt) + } + if m.updated_at != nil { + fields = append(fields, bus.FieldUpdatedAt) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *BusMutation) Field(name string) (ent.Value, bool) { + switch name { + case bus.FieldName: + return m.Name() + case bus.FieldPlateNumber: + return m.PlateNumber() + case bus.FieldLatitude: + return m.Latitude() + case bus.FieldLongitude: + return m.Longitude() + case bus.FieldStatus: + return m.Status() + case bus.FieldCreatedAt: + return m.CreatedAt() + case bus.FieldUpdatedAt: + return m.UpdatedAt() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *BusMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case bus.FieldName: + return m.OldName(ctx) + case bus.FieldPlateNumber: + return m.OldPlateNumber(ctx) + case bus.FieldLatitude: + return m.OldLatitude(ctx) + case bus.FieldLongitude: + return m.OldLongitude(ctx) + case bus.FieldStatus: + return m.OldStatus(ctx) + case bus.FieldCreatedAt: + return m.OldCreatedAt(ctx) + case bus.FieldUpdatedAt: + return m.OldUpdatedAt(ctx) + } + return nil, fmt.Errorf("unknown Bus field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *BusMutation) SetField(name string, value ent.Value) error { + switch name { + case bus.FieldName: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetName(v) + return nil + case bus.FieldPlateNumber: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetPlateNumber(v) + return nil + case bus.FieldLatitude: + v, ok := value.(float64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetLatitude(v) + return nil + case bus.FieldLongitude: + v, ok := value.(float64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetLongitude(v) + return nil + case bus.FieldStatus: + v, ok := value.(bus.Status) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetStatus(v) + return nil + case bus.FieldCreatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetCreatedAt(v) + return nil + case bus.FieldUpdatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetUpdatedAt(v) + return nil + } + return fmt.Errorf("unknown Bus field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *BusMutation) AddedFields() []string { + var fields []string + if m.addlatitude != nil { + fields = append(fields, bus.FieldLatitude) + } + if m.addlongitude != nil { + fields = append(fields, bus.FieldLongitude) + } + return fields +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *BusMutation) AddedField(name string) (ent.Value, bool) { + switch name { + case bus.FieldLatitude: + return m.AddedLatitude() + case bus.FieldLongitude: + return m.AddedLongitude() + } + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *BusMutation) AddField(name string, value ent.Value) error { + switch name { + case bus.FieldLatitude: + v, ok := value.(float64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddLatitude(v) + return nil + case bus.FieldLongitude: + v, ok := value.(float64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddLongitude(v) + return nil + } + return fmt.Errorf("unknown Bus numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *BusMutation) ClearedFields() []string { + var fields []string + if m.FieldCleared(bus.FieldPlateNumber) { + fields = append(fields, bus.FieldPlateNumber) + } + if m.FieldCleared(bus.FieldLatitude) { + fields = append(fields, bus.FieldLatitude) + } + if m.FieldCleared(bus.FieldLongitude) { + fields = append(fields, bus.FieldLongitude) + } + return fields +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *BusMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *BusMutation) ClearField(name string) error { + switch name { + case bus.FieldPlateNumber: + m.ClearPlateNumber() + return nil + case bus.FieldLatitude: + m.ClearLatitude() + return nil + case bus.FieldLongitude: + m.ClearLongitude() + return nil + } + return fmt.Errorf("unknown Bus nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *BusMutation) ResetField(name string) error { + switch name { + case bus.FieldName: + m.ResetName() + return nil + case bus.FieldPlateNumber: + m.ResetPlateNumber() + return nil + case bus.FieldLatitude: + m.ResetLatitude() + return nil + case bus.FieldLongitude: + m.ResetLongitude() + return nil + case bus.FieldStatus: + m.ResetStatus() + return nil + case bus.FieldCreatedAt: + m.ResetCreatedAt() + return nil + case bus.FieldUpdatedAt: + m.ResetUpdatedAt() + return nil + } + return fmt.Errorf("unknown Bus field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *BusMutation) AddedEdges() []string { + edges := make([]string, 0, 4) + if m.nursery != nil { + edges = append(edges, bus.EdgeNursery) + } + if m.stations != nil { + edges = append(edges, bus.EdgeStations) + } + if m.boarding_records != nil { + edges = append(edges, bus.EdgeBoardingRecords) + } + if m.childBusAssociations != nil { + edges = append(edges, bus.EdgeChildBusAssociations) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *BusMutation) AddedIDs(name string) []ent.Value { + switch name { + case bus.EdgeNursery: + if id := m.nursery; id != nil { + return []ent.Value{*id} + } + case bus.EdgeStations: + ids := make([]ent.Value, 0, len(m.stations)) + for id := range m.stations { + ids = append(ids, id) + } + return ids + case bus.EdgeBoardingRecords: + ids := make([]ent.Value, 0, len(m.boarding_records)) + for id := range m.boarding_records { + ids = append(ids, id) + } + return ids + case bus.EdgeChildBusAssociations: + ids := make([]ent.Value, 0, len(m.childBusAssociations)) + for id := range m.childBusAssociations { + ids = append(ids, id) + } + return ids + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *BusMutation) RemovedEdges() []string { + edges := make([]string, 0, 4) + if m.removedstations != nil { + edges = append(edges, bus.EdgeStations) + } + if m.removedboarding_records != nil { + edges = append(edges, bus.EdgeBoardingRecords) + } + if m.removedchildBusAssociations != nil { + edges = append(edges, bus.EdgeChildBusAssociations) + } + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *BusMutation) RemovedIDs(name string) []ent.Value { + switch name { + case bus.EdgeStations: + ids := make([]ent.Value, 0, len(m.removedstations)) + for id := range m.removedstations { + ids = append(ids, id) + } + return ids + case bus.EdgeBoardingRecords: + ids := make([]ent.Value, 0, len(m.removedboarding_records)) + for id := range m.removedboarding_records { + ids = append(ids, id) + } + return ids + case bus.EdgeChildBusAssociations: + ids := make([]ent.Value, 0, len(m.removedchildBusAssociations)) + for id := range m.removedchildBusAssociations { + ids = append(ids, id) + } + return ids + } + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *BusMutation) ClearedEdges() []string { + edges := make([]string, 0, 4) + if m.clearednursery { + edges = append(edges, bus.EdgeNursery) + } + if m.clearedstations { + edges = append(edges, bus.EdgeStations) + } + if m.clearedboarding_records { + edges = append(edges, bus.EdgeBoardingRecords) + } + if m.clearedchildBusAssociations { + edges = append(edges, bus.EdgeChildBusAssociations) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *BusMutation) EdgeCleared(name string) bool { + switch name { + case bus.EdgeNursery: + return m.clearednursery + case bus.EdgeStations: + return m.clearedstations + case bus.EdgeBoardingRecords: + return m.clearedboarding_records + case bus.EdgeChildBusAssociations: + return m.clearedchildBusAssociations + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *BusMutation) ClearEdge(name string) error { + switch name { + case bus.EdgeNursery: + m.ClearNursery() + return nil + } + return fmt.Errorf("unknown Bus unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *BusMutation) ResetEdge(name string) error { + switch name { + case bus.EdgeNursery: + m.ResetNursery() + return nil + case bus.EdgeStations: + m.ResetStations() + return nil + case bus.EdgeBoardingRecords: + m.ResetBoardingRecords() + return nil + case bus.EdgeChildBusAssociations: + m.ResetChildBusAssociations() + return nil + } + return fmt.Errorf("unknown Bus edge %s", name) +} + +// ChildMutation represents an operation that mutates the Child nodes in the graph. +type ChildMutation struct { + config + op Op + typ string + id *uuid.UUID + name *string + age *int + addage *int + sex *child.Sex + is_ride_morning_bus *bool + is_ride_afternoon_bus *bool + check_for_missing_items *bool + has_bag *bool + has_lunch_box *bool + has_water_bottle *bool + has_umbrella *bool + has_other *bool + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + guardian *uuid.UUID + clearedguardian bool + childBusAssociations map[int]struct{} + removedchildBusAssociations map[int]struct{} + clearedchildBusAssociations bool + nursery *uuid.UUID + clearednursery bool + boarding_record map[uuid.UUID]struct{} + removedboarding_record map[uuid.UUID]struct{} + clearedboarding_record bool + photos map[uuid.UUID]struct{} + removedphotos map[uuid.UUID]struct{} + clearedphotos bool + done bool + oldValue func(context.Context) (*Child, error) + predicates []predicate.Child +} + +var _ ent.Mutation = (*ChildMutation)(nil) + +// childOption allows management of the mutation configuration using functional options. +type childOption func(*ChildMutation) + +// newChildMutation creates new mutation for the Child entity. +func newChildMutation(c config, op Op, opts ...childOption) *ChildMutation { + m := &ChildMutation{ + config: c, + op: op, + typ: TypeChild, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withChildID sets the ID field of the mutation. +func withChildID(id uuid.UUID) childOption { + return func(m *ChildMutation) { + var ( + err error + once sync.Once + value *Child + ) + m.oldValue = func(ctx context.Context) (*Child, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().Child.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withChild sets the old Child of the mutation. +func withChild(node *Child) childOption { + return func(m *ChildMutation) { + m.oldValue = func(context.Context) (*Child, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m ChildMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m ChildMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// SetID sets the value of the id field. Note that this +// operation is only accepted on creation of Child entities. +func (m *ChildMutation) SetID(id uuid.UUID) { + m.id = &id +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *ChildMutation) ID() (id uuid.UUID, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *ChildMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []uuid.UUID{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Child.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetName sets the "name" field. +func (m *ChildMutation) SetName(s string) { + m.name = &s +} + +// Name returns the value of the "name" field in the mutation. +func (m *ChildMutation) Name() (r string, exists bool) { + v := m.name + if v == nil { + return + } + return *v, true +} + +// OldName returns the old "name" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldName(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldName is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldName requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldName: %w", err) + } + return oldValue.Name, nil +} + +// ResetName resets all changes to the "name" field. +func (m *ChildMutation) ResetName() { + m.name = nil +} + +// SetAge sets the "age" field. +func (m *ChildMutation) SetAge(i int) { + m.age = &i + m.addage = nil +} + +// Age returns the value of the "age" field in the mutation. +func (m *ChildMutation) Age() (r int, exists bool) { + v := m.age + if v == nil { + return + } + return *v, true +} + +// OldAge returns the old "age" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldAge(ctx context.Context) (v int, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldAge is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldAge requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldAge: %w", err) + } + return oldValue.Age, nil +} + +// AddAge adds i to the "age" field. +func (m *ChildMutation) AddAge(i int) { + if m.addage != nil { + *m.addage += i + } else { + m.addage = &i + } +} + +// AddedAge returns the value that was added to the "age" field in this mutation. +func (m *ChildMutation) AddedAge() (r int, exists bool) { + v := m.addage + if v == nil { + return + } + return *v, true +} + +// ResetAge resets all changes to the "age" field. +func (m *ChildMutation) ResetAge() { + m.age = nil + m.addage = nil +} + +// SetSex sets the "sex" field. +func (m *ChildMutation) SetSex(c child.Sex) { + m.sex = &c +} + +// Sex returns the value of the "sex" field in the mutation. +func (m *ChildMutation) Sex() (r child.Sex, exists bool) { + v := m.sex + if v == nil { + return + } + return *v, true +} + +// OldSex returns the old "sex" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldSex(ctx context.Context) (v child.Sex, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldSex is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldSex requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldSex: %w", err) + } + return oldValue.Sex, nil +} + +// ResetSex resets all changes to the "sex" field. +func (m *ChildMutation) ResetSex() { + m.sex = nil +} + +// SetIsRideMorningBus sets the "is_ride_morning_bus" field. +func (m *ChildMutation) SetIsRideMorningBus(b bool) { + m.is_ride_morning_bus = &b +} + +// IsRideMorningBus returns the value of the "is_ride_morning_bus" field in the mutation. +func (m *ChildMutation) IsRideMorningBus() (r bool, exists bool) { + v := m.is_ride_morning_bus + if v == nil { + return + } + return *v, true +} + +// OldIsRideMorningBus returns the old "is_ride_morning_bus" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldIsRideMorningBus(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldIsRideMorningBus is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldIsRideMorningBus requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldIsRideMorningBus: %w", err) + } + return oldValue.IsRideMorningBus, nil +} + +// ResetIsRideMorningBus resets all changes to the "is_ride_morning_bus" field. +func (m *ChildMutation) ResetIsRideMorningBus() { + m.is_ride_morning_bus = nil +} + +// SetIsRideAfternoonBus sets the "is_ride_afternoon_bus" field. +func (m *ChildMutation) SetIsRideAfternoonBus(b bool) { + m.is_ride_afternoon_bus = &b +} + +// IsRideAfternoonBus returns the value of the "is_ride_afternoon_bus" field in the mutation. +func (m *ChildMutation) IsRideAfternoonBus() (r bool, exists bool) { + v := m.is_ride_afternoon_bus + if v == nil { + return + } + return *v, true +} + +// OldIsRideAfternoonBus returns the old "is_ride_afternoon_bus" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldIsRideAfternoonBus(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldIsRideAfternoonBus is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldIsRideAfternoonBus requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldIsRideAfternoonBus: %w", err) + } + return oldValue.IsRideAfternoonBus, nil +} + +// ResetIsRideAfternoonBus resets all changes to the "is_ride_afternoon_bus" field. +func (m *ChildMutation) ResetIsRideAfternoonBus() { + m.is_ride_afternoon_bus = nil +} + +// SetCheckForMissingItems sets the "check_for_missing_items" field. +func (m *ChildMutation) SetCheckForMissingItems(b bool) { + m.check_for_missing_items = &b +} + +// CheckForMissingItems returns the value of the "check_for_missing_items" field in the mutation. +func (m *ChildMutation) CheckForMissingItems() (r bool, exists bool) { + v := m.check_for_missing_items + if v == nil { + return + } + return *v, true +} + +// OldCheckForMissingItems returns the old "check_for_missing_items" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldCheckForMissingItems(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldCheckForMissingItems is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldCheckForMissingItems requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldCheckForMissingItems: %w", err) + } + return oldValue.CheckForMissingItems, nil +} + +// ResetCheckForMissingItems resets all changes to the "check_for_missing_items" field. +func (m *ChildMutation) ResetCheckForMissingItems() { + m.check_for_missing_items = nil +} + +// SetHasBag sets the "has_bag" field. +func (m *ChildMutation) SetHasBag(b bool) { + m.has_bag = &b +} + +// HasBag returns the value of the "has_bag" field in the mutation. +func (m *ChildMutation) HasBag() (r bool, exists bool) { + v := m.has_bag + if v == nil { + return + } + return *v, true +} + +// OldHasBag returns the old "has_bag" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldHasBag(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldHasBag is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldHasBag requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldHasBag: %w", err) + } + return oldValue.HasBag, nil +} + +// ResetHasBag resets all changes to the "has_bag" field. +func (m *ChildMutation) ResetHasBag() { + m.has_bag = nil +} + +// SetHasLunchBox sets the "has_lunch_box" field. +func (m *ChildMutation) SetHasLunchBox(b bool) { + m.has_lunch_box = &b +} + +// HasLunchBox returns the value of the "has_lunch_box" field in the mutation. +func (m *ChildMutation) HasLunchBox() (r bool, exists bool) { + v := m.has_lunch_box + if v == nil { + return + } + return *v, true +} + +// OldHasLunchBox returns the old "has_lunch_box" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldHasLunchBox(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldHasLunchBox is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldHasLunchBox requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldHasLunchBox: %w", err) + } + return oldValue.HasLunchBox, nil +} + +// ResetHasLunchBox resets all changes to the "has_lunch_box" field. +func (m *ChildMutation) ResetHasLunchBox() { + m.has_lunch_box = nil +} + +// SetHasWaterBottle sets the "has_water_bottle" field. +func (m *ChildMutation) SetHasWaterBottle(b bool) { + m.has_water_bottle = &b +} + +// HasWaterBottle returns the value of the "has_water_bottle" field in the mutation. +func (m *ChildMutation) HasWaterBottle() (r bool, exists bool) { + v := m.has_water_bottle + if v == nil { + return + } + return *v, true +} + +// OldHasWaterBottle returns the old "has_water_bottle" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldHasWaterBottle(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldHasWaterBottle is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldHasWaterBottle requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldHasWaterBottle: %w", err) + } + return oldValue.HasWaterBottle, nil +} + +// ResetHasWaterBottle resets all changes to the "has_water_bottle" field. +func (m *ChildMutation) ResetHasWaterBottle() { + m.has_water_bottle = nil +} + +// SetHasUmbrella sets the "has_umbrella" field. +func (m *ChildMutation) SetHasUmbrella(b bool) { + m.has_umbrella = &b +} + +// HasUmbrella returns the value of the "has_umbrella" field in the mutation. +func (m *ChildMutation) HasUmbrella() (r bool, exists bool) { + v := m.has_umbrella + if v == nil { + return + } + return *v, true +} + +// OldHasUmbrella returns the old "has_umbrella" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldHasUmbrella(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldHasUmbrella is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldHasUmbrella requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldHasUmbrella: %w", err) + } + return oldValue.HasUmbrella, nil +} + +// ResetHasUmbrella resets all changes to the "has_umbrella" field. +func (m *ChildMutation) ResetHasUmbrella() { + m.has_umbrella = nil +} + +// SetHasOther sets the "has_other" field. +func (m *ChildMutation) SetHasOther(b bool) { + m.has_other = &b +} + +// HasOther returns the value of the "has_other" field in the mutation. +func (m *ChildMutation) HasOther() (r bool, exists bool) { + v := m.has_other + if v == nil { + return + } + return *v, true +} + +// OldHasOther returns the old "has_other" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldHasOther(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldHasOther is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldHasOther requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldHasOther: %w", err) + } + return oldValue.HasOther, nil +} + +// ResetHasOther resets all changes to the "has_other" field. +func (m *ChildMutation) ResetHasOther() { + m.has_other = nil +} + +// SetCreatedAt sets the "created_at" field. +func (m *ChildMutation) SetCreatedAt(t time.Time) { + m.created_at = &t +} + +// CreatedAt returns the value of the "created_at" field in the mutation. +func (m *ChildMutation) CreatedAt() (r time.Time, exists bool) { + v := m.created_at + if v == nil { + return + } + return *v, true +} + +// OldCreatedAt returns the old "created_at" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldCreatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldCreatedAt: %w", err) + } + return oldValue.CreatedAt, nil +} + +// ResetCreatedAt resets all changes to the "created_at" field. +func (m *ChildMutation) ResetCreatedAt() { + m.created_at = nil +} + +// SetUpdatedAt sets the "updated_at" field. +func (m *ChildMutation) SetUpdatedAt(t time.Time) { + m.updated_at = &t +} + +// UpdatedAt returns the value of the "updated_at" field in the mutation. +func (m *ChildMutation) UpdatedAt() (r time.Time, exists bool) { + v := m.updated_at + if v == nil { + return + } + return *v, true +} + +// OldUpdatedAt returns the old "updated_at" field's value of the Child entity. +// If the Child object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldUpdatedAt: %w", err) + } + return oldValue.UpdatedAt, nil +} + +// ResetUpdatedAt resets all changes to the "updated_at" field. +func (m *ChildMutation) ResetUpdatedAt() { + m.updated_at = nil +} + +// SetGuardianID sets the "guardian" edge to the Guardian entity by id. +func (m *ChildMutation) SetGuardianID(id uuid.UUID) { + m.guardian = &id +} + +// ClearGuardian clears the "guardian" edge to the Guardian entity. +func (m *ChildMutation) ClearGuardian() { + m.clearedguardian = true +} + +// GuardianCleared reports if the "guardian" edge to the Guardian entity was cleared. +func (m *ChildMutation) GuardianCleared() bool { + return m.clearedguardian +} + +// GuardianID returns the "guardian" edge ID in the mutation. +func (m *ChildMutation) GuardianID() (id uuid.UUID, exists bool) { + if m.guardian != nil { + return *m.guardian, true + } + return +} + +// GuardianIDs returns the "guardian" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// GuardianID instead. It exists only for internal usage by the builders. +func (m *ChildMutation) GuardianIDs() (ids []uuid.UUID) { + if id := m.guardian; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetGuardian resets all changes to the "guardian" edge. +func (m *ChildMutation) ResetGuardian() { + m.guardian = nil + m.clearedguardian = false +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by ids. +func (m *ChildMutation) AddChildBusAssociationIDs(ids ...int) { + if m.childBusAssociations == nil { + m.childBusAssociations = make(map[int]struct{}) + } + for i := range ids { + m.childBusAssociations[ids[i]] = struct{}{} + } +} + +// ClearChildBusAssociations clears the "childBusAssociations" edge to the ChildBusAssociation entity. +func (m *ChildMutation) ClearChildBusAssociations() { + m.clearedchildBusAssociations = true +} + +// ChildBusAssociationsCleared reports if the "childBusAssociations" edge to the ChildBusAssociation entity was cleared. +func (m *ChildMutation) ChildBusAssociationsCleared() bool { + return m.clearedchildBusAssociations +} + +// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (m *ChildMutation) RemoveChildBusAssociationIDs(ids ...int) { + if m.removedchildBusAssociations == nil { + m.removedchildBusAssociations = make(map[int]struct{}) + } + for i := range ids { + delete(m.childBusAssociations, ids[i]) + m.removedchildBusAssociations[ids[i]] = struct{}{} + } +} + +// RemovedChildBusAssociations returns the removed IDs of the "childBusAssociations" edge to the ChildBusAssociation entity. +func (m *ChildMutation) RemovedChildBusAssociationsIDs() (ids []int) { + for id := range m.removedchildBusAssociations { + ids = append(ids, id) + } + return +} + +// ChildBusAssociationsIDs returns the "childBusAssociations" edge IDs in the mutation. +func (m *ChildMutation) ChildBusAssociationsIDs() (ids []int) { + for id := range m.childBusAssociations { + ids = append(ids, id) + } + return +} + +// ResetChildBusAssociations resets all changes to the "childBusAssociations" edge. +func (m *ChildMutation) ResetChildBusAssociations() { + m.childBusAssociations = nil + m.clearedchildBusAssociations = false + m.removedchildBusAssociations = nil +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by id. +func (m *ChildMutation) SetNurseryID(id uuid.UUID) { + m.nursery = &id +} + +// ClearNursery clears the "nursery" edge to the Nursery entity. +func (m *ChildMutation) ClearNursery() { + m.clearednursery = true +} + +// NurseryCleared reports if the "nursery" edge to the Nursery entity was cleared. +func (m *ChildMutation) NurseryCleared() bool { + return m.clearednursery +} + +// NurseryID returns the "nursery" edge ID in the mutation. +func (m *ChildMutation) NurseryID() (id uuid.UUID, exists bool) { + if m.nursery != nil { + return *m.nursery, true + } + return +} + +// NurseryIDs returns the "nursery" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// NurseryID instead. It exists only for internal usage by the builders. +func (m *ChildMutation) NurseryIDs() (ids []uuid.UUID) { + if id := m.nursery; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetNursery resets all changes to the "nursery" edge. +func (m *ChildMutation) ResetNursery() { + m.nursery = nil + m.clearednursery = false +} + +// AddBoardingRecordIDs adds the "boarding_record" edge to the BoardingRecord entity by ids. +func (m *ChildMutation) AddBoardingRecordIDs(ids ...uuid.UUID) { + if m.boarding_record == nil { + m.boarding_record = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.boarding_record[ids[i]] = struct{}{} + } +} + +// ClearBoardingRecord clears the "boarding_record" edge to the BoardingRecord entity. +func (m *ChildMutation) ClearBoardingRecord() { + m.clearedboarding_record = true +} + +// BoardingRecordCleared reports if the "boarding_record" edge to the BoardingRecord entity was cleared. +func (m *ChildMutation) BoardingRecordCleared() bool { + return m.clearedboarding_record +} + +// RemoveBoardingRecordIDs removes the "boarding_record" edge to the BoardingRecord entity by IDs. +func (m *ChildMutation) RemoveBoardingRecordIDs(ids ...uuid.UUID) { + if m.removedboarding_record == nil { + m.removedboarding_record = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.boarding_record, ids[i]) + m.removedboarding_record[ids[i]] = struct{}{} + } +} + +// RemovedBoardingRecord returns the removed IDs of the "boarding_record" edge to the BoardingRecord entity. +func (m *ChildMutation) RemovedBoardingRecordIDs() (ids []uuid.UUID) { + for id := range m.removedboarding_record { + ids = append(ids, id) + } + return +} + +// BoardingRecordIDs returns the "boarding_record" edge IDs in the mutation. +func (m *ChildMutation) BoardingRecordIDs() (ids []uuid.UUID) { + for id := range m.boarding_record { + ids = append(ids, id) + } + return +} + +// ResetBoardingRecord resets all changes to the "boarding_record" edge. +func (m *ChildMutation) ResetBoardingRecord() { + m.boarding_record = nil + m.clearedboarding_record = false + m.removedboarding_record = nil +} + +// AddPhotoIDs adds the "photos" edge to the ChildPhoto entity by ids. +func (m *ChildMutation) AddPhotoIDs(ids ...uuid.UUID) { + if m.photos == nil { + m.photos = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.photos[ids[i]] = struct{}{} + } +} + +// ClearPhotos clears the "photos" edge to the ChildPhoto entity. +func (m *ChildMutation) ClearPhotos() { + m.clearedphotos = true +} + +// PhotosCleared reports if the "photos" edge to the ChildPhoto entity was cleared. +func (m *ChildMutation) PhotosCleared() bool { + return m.clearedphotos +} + +// RemovePhotoIDs removes the "photos" edge to the ChildPhoto entity by IDs. +func (m *ChildMutation) RemovePhotoIDs(ids ...uuid.UUID) { + if m.removedphotos == nil { + m.removedphotos = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.photos, ids[i]) + m.removedphotos[ids[i]] = struct{}{} + } +} + +// RemovedPhotos returns the removed IDs of the "photos" edge to the ChildPhoto entity. +func (m *ChildMutation) RemovedPhotosIDs() (ids []uuid.UUID) { + for id := range m.removedphotos { + ids = append(ids, id) + } + return +} + +// PhotosIDs returns the "photos" edge IDs in the mutation. +func (m *ChildMutation) PhotosIDs() (ids []uuid.UUID) { + for id := range m.photos { + ids = append(ids, id) + } + return +} + +// ResetPhotos resets all changes to the "photos" edge. +func (m *ChildMutation) ResetPhotos() { + m.photos = nil + m.clearedphotos = false + m.removedphotos = nil +} + +// Where appends a list predicates to the ChildMutation builder. +func (m *ChildMutation) Where(ps ...predicate.Child) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the ChildMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *ChildMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.Child, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *ChildMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *ChildMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (Child). +func (m *ChildMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *ChildMutation) Fields() []string { + fields := make([]string, 0, 13) + if m.name != nil { + fields = append(fields, child.FieldName) + } + if m.age != nil { + fields = append(fields, child.FieldAge) + } + if m.sex != nil { + fields = append(fields, child.FieldSex) + } + if m.is_ride_morning_bus != nil { + fields = append(fields, child.FieldIsRideMorningBus) + } + if m.is_ride_afternoon_bus != nil { + fields = append(fields, child.FieldIsRideAfternoonBus) + } + if m.check_for_missing_items != nil { + fields = append(fields, child.FieldCheckForMissingItems) + } + if m.has_bag != nil { + fields = append(fields, child.FieldHasBag) + } + if m.has_lunch_box != nil { + fields = append(fields, child.FieldHasLunchBox) + } + if m.has_water_bottle != nil { + fields = append(fields, child.FieldHasWaterBottle) + } + if m.has_umbrella != nil { + fields = append(fields, child.FieldHasUmbrella) + } + if m.has_other != nil { + fields = append(fields, child.FieldHasOther) + } + if m.created_at != nil { + fields = append(fields, child.FieldCreatedAt) + } + if m.updated_at != nil { + fields = append(fields, child.FieldUpdatedAt) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *ChildMutation) Field(name string) (ent.Value, bool) { + switch name { + case child.FieldName: + return m.Name() + case child.FieldAge: + return m.Age() + case child.FieldSex: + return m.Sex() + case child.FieldIsRideMorningBus: + return m.IsRideMorningBus() + case child.FieldIsRideAfternoonBus: + return m.IsRideAfternoonBus() + case child.FieldCheckForMissingItems: + return m.CheckForMissingItems() + case child.FieldHasBag: + return m.HasBag() + case child.FieldHasLunchBox: + return m.HasLunchBox() + case child.FieldHasWaterBottle: + return m.HasWaterBottle() + case child.FieldHasUmbrella: + return m.HasUmbrella() + case child.FieldHasOther: + return m.HasOther() + case child.FieldCreatedAt: + return m.CreatedAt() + case child.FieldUpdatedAt: + return m.UpdatedAt() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *ChildMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case child.FieldName: + return m.OldName(ctx) + case child.FieldAge: + return m.OldAge(ctx) + case child.FieldSex: + return m.OldSex(ctx) + case child.FieldIsRideMorningBus: + return m.OldIsRideMorningBus(ctx) + case child.FieldIsRideAfternoonBus: + return m.OldIsRideAfternoonBus(ctx) + case child.FieldCheckForMissingItems: + return m.OldCheckForMissingItems(ctx) + case child.FieldHasBag: + return m.OldHasBag(ctx) + case child.FieldHasLunchBox: + return m.OldHasLunchBox(ctx) + case child.FieldHasWaterBottle: + return m.OldHasWaterBottle(ctx) + case child.FieldHasUmbrella: + return m.OldHasUmbrella(ctx) + case child.FieldHasOther: + return m.OldHasOther(ctx) + case child.FieldCreatedAt: + return m.OldCreatedAt(ctx) + case child.FieldUpdatedAt: + return m.OldUpdatedAt(ctx) + } + return nil, fmt.Errorf("unknown Child field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *ChildMutation) SetField(name string, value ent.Value) error { + switch name { + case child.FieldName: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetName(v) + return nil + case child.FieldAge: + v, ok := value.(int) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetAge(v) + return nil + case child.FieldSex: + v, ok := value.(child.Sex) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetSex(v) + return nil + case child.FieldIsRideMorningBus: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetIsRideMorningBus(v) + return nil + case child.FieldIsRideAfternoonBus: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetIsRideAfternoonBus(v) + return nil + case child.FieldCheckForMissingItems: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetCheckForMissingItems(v) + return nil + case child.FieldHasBag: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetHasBag(v) + return nil + case child.FieldHasLunchBox: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetHasLunchBox(v) + return nil + case child.FieldHasWaterBottle: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetHasWaterBottle(v) + return nil + case child.FieldHasUmbrella: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetHasUmbrella(v) + return nil + case child.FieldHasOther: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetHasOther(v) + return nil + case child.FieldCreatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetCreatedAt(v) + return nil + case child.FieldUpdatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetUpdatedAt(v) + return nil + } + return fmt.Errorf("unknown Child field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *ChildMutation) AddedFields() []string { + var fields []string + if m.addage != nil { + fields = append(fields, child.FieldAge) + } + return fields +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *ChildMutation) AddedField(name string) (ent.Value, bool) { + switch name { + case child.FieldAge: + return m.AddedAge() + } + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *ChildMutation) AddField(name string, value ent.Value) error { + switch name { + case child.FieldAge: + v, ok := value.(int) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddAge(v) + return nil + } + return fmt.Errorf("unknown Child numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *ChildMutation) ClearedFields() []string { + return nil +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *ChildMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *ChildMutation) ClearField(name string) error { + return fmt.Errorf("unknown Child nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *ChildMutation) ResetField(name string) error { + switch name { + case child.FieldName: + m.ResetName() + return nil + case child.FieldAge: + m.ResetAge() + return nil + case child.FieldSex: + m.ResetSex() + return nil + case child.FieldIsRideMorningBus: + m.ResetIsRideMorningBus() + return nil + case child.FieldIsRideAfternoonBus: + m.ResetIsRideAfternoonBus() + return nil + case child.FieldCheckForMissingItems: + m.ResetCheckForMissingItems() + return nil + case child.FieldHasBag: + m.ResetHasBag() + return nil + case child.FieldHasLunchBox: + m.ResetHasLunchBox() + return nil + case child.FieldHasWaterBottle: + m.ResetHasWaterBottle() + return nil + case child.FieldHasUmbrella: + m.ResetHasUmbrella() + return nil + case child.FieldHasOther: + m.ResetHasOther() + return nil + case child.FieldCreatedAt: + m.ResetCreatedAt() + return nil + case child.FieldUpdatedAt: + m.ResetUpdatedAt() + return nil + } + return fmt.Errorf("unknown Child field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *ChildMutation) AddedEdges() []string { + edges := make([]string, 0, 5) + if m.guardian != nil { + edges = append(edges, child.EdgeGuardian) + } + if m.childBusAssociations != nil { + edges = append(edges, child.EdgeChildBusAssociations) + } + if m.nursery != nil { + edges = append(edges, child.EdgeNursery) + } + if m.boarding_record != nil { + edges = append(edges, child.EdgeBoardingRecord) + } + if m.photos != nil { + edges = append(edges, child.EdgePhotos) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *ChildMutation) AddedIDs(name string) []ent.Value { + switch name { + case child.EdgeGuardian: + if id := m.guardian; id != nil { + return []ent.Value{*id} + } + case child.EdgeChildBusAssociations: + ids := make([]ent.Value, 0, len(m.childBusAssociations)) + for id := range m.childBusAssociations { + ids = append(ids, id) + } + return ids + case child.EdgeNursery: + if id := m.nursery; id != nil { + return []ent.Value{*id} + } + case child.EdgeBoardingRecord: + ids := make([]ent.Value, 0, len(m.boarding_record)) + for id := range m.boarding_record { + ids = append(ids, id) + } + return ids + case child.EdgePhotos: + ids := make([]ent.Value, 0, len(m.photos)) + for id := range m.photos { + ids = append(ids, id) + } + return ids + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *ChildMutation) RemovedEdges() []string { + edges := make([]string, 0, 5) + if m.removedchildBusAssociations != nil { + edges = append(edges, child.EdgeChildBusAssociations) + } + if m.removedboarding_record != nil { + edges = append(edges, child.EdgeBoardingRecord) + } + if m.removedphotos != nil { + edges = append(edges, child.EdgePhotos) + } + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *ChildMutation) RemovedIDs(name string) []ent.Value { + switch name { + case child.EdgeChildBusAssociations: + ids := make([]ent.Value, 0, len(m.removedchildBusAssociations)) + for id := range m.removedchildBusAssociations { + ids = append(ids, id) + } + return ids + case child.EdgeBoardingRecord: + ids := make([]ent.Value, 0, len(m.removedboarding_record)) + for id := range m.removedboarding_record { + ids = append(ids, id) + } + return ids + case child.EdgePhotos: + ids := make([]ent.Value, 0, len(m.removedphotos)) + for id := range m.removedphotos { + ids = append(ids, id) + } + return ids + } + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *ChildMutation) ClearedEdges() []string { + edges := make([]string, 0, 5) + if m.clearedguardian { + edges = append(edges, child.EdgeGuardian) + } + if m.clearedchildBusAssociations { + edges = append(edges, child.EdgeChildBusAssociations) + } + if m.clearednursery { + edges = append(edges, child.EdgeNursery) + } + if m.clearedboarding_record { + edges = append(edges, child.EdgeBoardingRecord) + } + if m.clearedphotos { + edges = append(edges, child.EdgePhotos) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *ChildMutation) EdgeCleared(name string) bool { + switch name { + case child.EdgeGuardian: + return m.clearedguardian + case child.EdgeChildBusAssociations: + return m.clearedchildBusAssociations + case child.EdgeNursery: + return m.clearednursery + case child.EdgeBoardingRecord: + return m.clearedboarding_record + case child.EdgePhotos: + return m.clearedphotos + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *ChildMutation) ClearEdge(name string) error { + switch name { + case child.EdgeGuardian: + m.ClearGuardian() + return nil + case child.EdgeNursery: + m.ClearNursery() + return nil + } + return fmt.Errorf("unknown Child unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *ChildMutation) ResetEdge(name string) error { + switch name { + case child.EdgeGuardian: + m.ResetGuardian() + return nil + case child.EdgeChildBusAssociations: + m.ResetChildBusAssociations() + return nil + case child.EdgeNursery: + m.ResetNursery() + return nil + case child.EdgeBoardingRecord: + m.ResetBoardingRecord() + return nil + case child.EdgePhotos: + m.ResetPhotos() + return nil + } + return fmt.Errorf("unknown Child edge %s", name) +} + +// ChildBusAssociationMutation represents an operation that mutates the ChildBusAssociation nodes in the graph. +type ChildBusAssociationMutation struct { + config + op Op + typ string + id *int + bus_type *childbusassociation.BusType + clearedFields map[string]struct{} + child *uuid.UUID + clearedchild bool + bus *uuid.UUID + clearedbus bool + done bool + oldValue func(context.Context) (*ChildBusAssociation, error) + predicates []predicate.ChildBusAssociation +} + +var _ ent.Mutation = (*ChildBusAssociationMutation)(nil) + +// childbusassociationOption allows management of the mutation configuration using functional options. +type childbusassociationOption func(*ChildBusAssociationMutation) + +// newChildBusAssociationMutation creates new mutation for the ChildBusAssociation entity. +func newChildBusAssociationMutation(c config, op Op, opts ...childbusassociationOption) *ChildBusAssociationMutation { + m := &ChildBusAssociationMutation{ + config: c, + op: op, + typ: TypeChildBusAssociation, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withChildBusAssociationID sets the ID field of the mutation. +func withChildBusAssociationID(id int) childbusassociationOption { + return func(m *ChildBusAssociationMutation) { + var ( + err error + once sync.Once + value *ChildBusAssociation + ) + m.oldValue = func(ctx context.Context) (*ChildBusAssociation, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().ChildBusAssociation.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withChildBusAssociation sets the old ChildBusAssociation of the mutation. +func withChildBusAssociation(node *ChildBusAssociation) childbusassociationOption { + return func(m *ChildBusAssociationMutation) { + m.oldValue = func(context.Context) (*ChildBusAssociation, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m ChildBusAssociationMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m ChildBusAssociationMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *ChildBusAssociationMutation) ID() (id int, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *ChildBusAssociationMutation) IDs(ctx context.Context) ([]int, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().ChildBusAssociation.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetChildID sets the "child_id" field. +func (m *ChildBusAssociationMutation) SetChildID(u uuid.UUID) { + m.child = &u +} + +// ChildID returns the value of the "child_id" field in the mutation. +func (m *ChildBusAssociationMutation) ChildID() (r uuid.UUID, exists bool) { + v := m.child + if v == nil { + return + } + return *v, true +} + +// OldChildID returns the old "child_id" field's value of the ChildBusAssociation entity. +// If the ChildBusAssociation object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildBusAssociationMutation) OldChildID(ctx context.Context) (v uuid.UUID, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldChildID is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldChildID requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldChildID: %w", err) + } + return oldValue.ChildID, nil +} + +// ResetChildID resets all changes to the "child_id" field. +func (m *ChildBusAssociationMutation) ResetChildID() { + m.child = nil +} + +// SetBusID sets the "bus_id" field. +func (m *ChildBusAssociationMutation) SetBusID(u uuid.UUID) { + m.bus = &u +} + +// BusID returns the value of the "bus_id" field in the mutation. +func (m *ChildBusAssociationMutation) BusID() (r uuid.UUID, exists bool) { + v := m.bus + if v == nil { + return + } + return *v, true +} + +// OldBusID returns the old "bus_id" field's value of the ChildBusAssociation entity. +// If the ChildBusAssociation object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildBusAssociationMutation) OldBusID(ctx context.Context) (v uuid.UUID, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldBusID is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldBusID requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldBusID: %w", err) + } + return oldValue.BusID, nil +} + +// ResetBusID resets all changes to the "bus_id" field. +func (m *ChildBusAssociationMutation) ResetBusID() { + m.bus = nil +} + +// SetBusType sets the "bus_type" field. +func (m *ChildBusAssociationMutation) SetBusType(ct childbusassociation.BusType) { + m.bus_type = &ct +} + +// BusType returns the value of the "bus_type" field in the mutation. +func (m *ChildBusAssociationMutation) BusType() (r childbusassociation.BusType, exists bool) { + v := m.bus_type + if v == nil { + return + } + return *v, true +} + +// OldBusType returns the old "bus_type" field's value of the ChildBusAssociation entity. +// If the ChildBusAssociation object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildBusAssociationMutation) OldBusType(ctx context.Context) (v childbusassociation.BusType, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldBusType is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldBusType requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldBusType: %w", err) + } + return oldValue.BusType, nil +} + +// ResetBusType resets all changes to the "bus_type" field. +func (m *ChildBusAssociationMutation) ResetBusType() { + m.bus_type = nil +} + +// ClearChild clears the "child" edge to the Child entity. +func (m *ChildBusAssociationMutation) ClearChild() { + m.clearedchild = true + m.clearedFields[childbusassociation.FieldChildID] = struct{}{} +} + +// ChildCleared reports if the "child" edge to the Child entity was cleared. +func (m *ChildBusAssociationMutation) ChildCleared() bool { + return m.clearedchild +} + +// ChildIDs returns the "child" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// ChildID instead. It exists only for internal usage by the builders. +func (m *ChildBusAssociationMutation) ChildIDs() (ids []uuid.UUID) { + if id := m.child; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetChild resets all changes to the "child" edge. +func (m *ChildBusAssociationMutation) ResetChild() { + m.child = nil + m.clearedchild = false +} + +// ClearBus clears the "bus" edge to the Bus entity. +func (m *ChildBusAssociationMutation) ClearBus() { + m.clearedbus = true + m.clearedFields[childbusassociation.FieldBusID] = struct{}{} +} + +// BusCleared reports if the "bus" edge to the Bus entity was cleared. +func (m *ChildBusAssociationMutation) BusCleared() bool { + return m.clearedbus +} + +// BusIDs returns the "bus" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// BusID instead. It exists only for internal usage by the builders. +func (m *ChildBusAssociationMutation) BusIDs() (ids []uuid.UUID) { + if id := m.bus; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetBus resets all changes to the "bus" edge. +func (m *ChildBusAssociationMutation) ResetBus() { + m.bus = nil + m.clearedbus = false +} + +// Where appends a list predicates to the ChildBusAssociationMutation builder. +func (m *ChildBusAssociationMutation) Where(ps ...predicate.ChildBusAssociation) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the ChildBusAssociationMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *ChildBusAssociationMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.ChildBusAssociation, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *ChildBusAssociationMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *ChildBusAssociationMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (ChildBusAssociation). +func (m *ChildBusAssociationMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *ChildBusAssociationMutation) Fields() []string { + fields := make([]string, 0, 3) + if m.child != nil { + fields = append(fields, childbusassociation.FieldChildID) + } + if m.bus != nil { + fields = append(fields, childbusassociation.FieldBusID) + } + if m.bus_type != nil { + fields = append(fields, childbusassociation.FieldBusType) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *ChildBusAssociationMutation) Field(name string) (ent.Value, bool) { + switch name { + case childbusassociation.FieldChildID: + return m.ChildID() + case childbusassociation.FieldBusID: + return m.BusID() + case childbusassociation.FieldBusType: + return m.BusType() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *ChildBusAssociationMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case childbusassociation.FieldChildID: + return m.OldChildID(ctx) + case childbusassociation.FieldBusID: + return m.OldBusID(ctx) + case childbusassociation.FieldBusType: + return m.OldBusType(ctx) + } + return nil, fmt.Errorf("unknown ChildBusAssociation field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *ChildBusAssociationMutation) SetField(name string, value ent.Value) error { + switch name { + case childbusassociation.FieldChildID: + v, ok := value.(uuid.UUID) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetChildID(v) + return nil + case childbusassociation.FieldBusID: + v, ok := value.(uuid.UUID) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetBusID(v) + return nil + case childbusassociation.FieldBusType: + v, ok := value.(childbusassociation.BusType) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetBusType(v) + return nil + } + return fmt.Errorf("unknown ChildBusAssociation field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *ChildBusAssociationMutation) AddedFields() []string { + return nil +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *ChildBusAssociationMutation) AddedField(name string) (ent.Value, bool) { + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *ChildBusAssociationMutation) AddField(name string, value ent.Value) error { + switch name { + } + return fmt.Errorf("unknown ChildBusAssociation numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *ChildBusAssociationMutation) ClearedFields() []string { + return nil +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *ChildBusAssociationMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *ChildBusAssociationMutation) ClearField(name string) error { + return fmt.Errorf("unknown ChildBusAssociation nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *ChildBusAssociationMutation) ResetField(name string) error { + switch name { + case childbusassociation.FieldChildID: + m.ResetChildID() + return nil + case childbusassociation.FieldBusID: + m.ResetBusID() + return nil + case childbusassociation.FieldBusType: + m.ResetBusType() + return nil + } + return fmt.Errorf("unknown ChildBusAssociation field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *ChildBusAssociationMutation) AddedEdges() []string { + edges := make([]string, 0, 2) + if m.child != nil { + edges = append(edges, childbusassociation.EdgeChild) + } + if m.bus != nil { + edges = append(edges, childbusassociation.EdgeBus) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *ChildBusAssociationMutation) AddedIDs(name string) []ent.Value { + switch name { + case childbusassociation.EdgeChild: + if id := m.child; id != nil { + return []ent.Value{*id} + } + case childbusassociation.EdgeBus: + if id := m.bus; id != nil { + return []ent.Value{*id} + } + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *ChildBusAssociationMutation) RemovedEdges() []string { + edges := make([]string, 0, 2) + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *ChildBusAssociationMutation) RemovedIDs(name string) []ent.Value { + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *ChildBusAssociationMutation) ClearedEdges() []string { + edges := make([]string, 0, 2) + if m.clearedchild { + edges = append(edges, childbusassociation.EdgeChild) + } + if m.clearedbus { + edges = append(edges, childbusassociation.EdgeBus) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *ChildBusAssociationMutation) EdgeCleared(name string) bool { + switch name { + case childbusassociation.EdgeChild: + return m.clearedchild + case childbusassociation.EdgeBus: + return m.clearedbus + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *ChildBusAssociationMutation) ClearEdge(name string) error { + switch name { + case childbusassociation.EdgeChild: + m.ClearChild() + return nil + case childbusassociation.EdgeBus: + m.ClearBus() + return nil + } + return fmt.Errorf("unknown ChildBusAssociation unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *ChildBusAssociationMutation) ResetEdge(name string) error { + switch name { + case childbusassociation.EdgeChild: + m.ResetChild() + return nil + case childbusassociation.EdgeBus: + m.ResetBus() + return nil + } + return fmt.Errorf("unknown ChildBusAssociation edge %s", name) +} + +// ChildPhotoMutation represents an operation that mutates the ChildPhoto nodes in the graph. +type ChildPhotoMutation struct { + config + op Op + typ string + id *uuid.UUID + s3_bucket *string + s3_key *string + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + child *uuid.UUID + clearedchild bool + done bool + oldValue func(context.Context) (*ChildPhoto, error) + predicates []predicate.ChildPhoto +} + +var _ ent.Mutation = (*ChildPhotoMutation)(nil) + +// childphotoOption allows management of the mutation configuration using functional options. +type childphotoOption func(*ChildPhotoMutation) + +// newChildPhotoMutation creates new mutation for the ChildPhoto entity. +func newChildPhotoMutation(c config, op Op, opts ...childphotoOption) *ChildPhotoMutation { + m := &ChildPhotoMutation{ + config: c, + op: op, + typ: TypeChildPhoto, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withChildPhotoID sets the ID field of the mutation. +func withChildPhotoID(id uuid.UUID) childphotoOption { + return func(m *ChildPhotoMutation) { + var ( + err error + once sync.Once + value *ChildPhoto + ) + m.oldValue = func(ctx context.Context) (*ChildPhoto, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().ChildPhoto.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withChildPhoto sets the old ChildPhoto of the mutation. +func withChildPhoto(node *ChildPhoto) childphotoOption { + return func(m *ChildPhotoMutation) { + m.oldValue = func(context.Context) (*ChildPhoto, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m ChildPhotoMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m ChildPhotoMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// SetID sets the value of the id field. Note that this +// operation is only accepted on creation of ChildPhoto entities. +func (m *ChildPhotoMutation) SetID(id uuid.UUID) { + m.id = &id +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *ChildPhotoMutation) ID() (id uuid.UUID, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *ChildPhotoMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []uuid.UUID{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().ChildPhoto.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetS3Bucket sets the "s3_bucket" field. +func (m *ChildPhotoMutation) SetS3Bucket(s string) { + m.s3_bucket = &s +} + +// S3Bucket returns the value of the "s3_bucket" field in the mutation. +func (m *ChildPhotoMutation) S3Bucket() (r string, exists bool) { + v := m.s3_bucket + if v == nil { + return + } + return *v, true +} + +// OldS3Bucket returns the old "s3_bucket" field's value of the ChildPhoto entity. +// If the ChildPhoto object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildPhotoMutation) OldS3Bucket(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldS3Bucket is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldS3Bucket requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldS3Bucket: %w", err) + } + return oldValue.S3Bucket, nil +} + +// ResetS3Bucket resets all changes to the "s3_bucket" field. +func (m *ChildPhotoMutation) ResetS3Bucket() { + m.s3_bucket = nil +} + +// SetS3Key sets the "s3_key" field. +func (m *ChildPhotoMutation) SetS3Key(s string) { + m.s3_key = &s +} + +// S3Key returns the value of the "s3_key" field in the mutation. +func (m *ChildPhotoMutation) S3Key() (r string, exists bool) { + v := m.s3_key + if v == nil { + return + } + return *v, true +} + +// OldS3Key returns the old "s3_key" field's value of the ChildPhoto entity. +// If the ChildPhoto object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildPhotoMutation) OldS3Key(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldS3Key is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldS3Key requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldS3Key: %w", err) + } + return oldValue.S3Key, nil +} + +// ResetS3Key resets all changes to the "s3_key" field. +func (m *ChildPhotoMutation) ResetS3Key() { + m.s3_key = nil +} + +// SetCreatedAt sets the "created_at" field. +func (m *ChildPhotoMutation) SetCreatedAt(t time.Time) { + m.created_at = &t +} + +// CreatedAt returns the value of the "created_at" field in the mutation. +func (m *ChildPhotoMutation) CreatedAt() (r time.Time, exists bool) { + v := m.created_at + if v == nil { + return + } + return *v, true +} + +// OldCreatedAt returns the old "created_at" field's value of the ChildPhoto entity. +// If the ChildPhoto object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildPhotoMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldCreatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldCreatedAt: %w", err) + } + return oldValue.CreatedAt, nil +} + +// ResetCreatedAt resets all changes to the "created_at" field. +func (m *ChildPhotoMutation) ResetCreatedAt() { + m.created_at = nil +} + +// SetUpdatedAt sets the "updated_at" field. +func (m *ChildPhotoMutation) SetUpdatedAt(t time.Time) { + m.updated_at = &t +} + +// UpdatedAt returns the value of the "updated_at" field in the mutation. +func (m *ChildPhotoMutation) UpdatedAt() (r time.Time, exists bool) { + v := m.updated_at + if v == nil { + return + } + return *v, true +} + +// OldUpdatedAt returns the old "updated_at" field's value of the ChildPhoto entity. +// If the ChildPhoto object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *ChildPhotoMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldUpdatedAt: %w", err) + } + return oldValue.UpdatedAt, nil +} + +// ResetUpdatedAt resets all changes to the "updated_at" field. +func (m *ChildPhotoMutation) ResetUpdatedAt() { + m.updated_at = nil +} + +// SetChildID sets the "child" edge to the Child entity by id. +func (m *ChildPhotoMutation) SetChildID(id uuid.UUID) { + m.child = &id +} + +// ClearChild clears the "child" edge to the Child entity. +func (m *ChildPhotoMutation) ClearChild() { + m.clearedchild = true +} + +// ChildCleared reports if the "child" edge to the Child entity was cleared. +func (m *ChildPhotoMutation) ChildCleared() bool { + return m.clearedchild +} + +// ChildID returns the "child" edge ID in the mutation. +func (m *ChildPhotoMutation) ChildID() (id uuid.UUID, exists bool) { + if m.child != nil { + return *m.child, true + } + return +} + +// ChildIDs returns the "child" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// ChildID instead. It exists only for internal usage by the builders. +func (m *ChildPhotoMutation) ChildIDs() (ids []uuid.UUID) { + if id := m.child; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetChild resets all changes to the "child" edge. +func (m *ChildPhotoMutation) ResetChild() { + m.child = nil + m.clearedchild = false +} + +// Where appends a list predicates to the ChildPhotoMutation builder. +func (m *ChildPhotoMutation) Where(ps ...predicate.ChildPhoto) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the ChildPhotoMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *ChildPhotoMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.ChildPhoto, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *ChildPhotoMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *ChildPhotoMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (ChildPhoto). +func (m *ChildPhotoMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *ChildPhotoMutation) Fields() []string { + fields := make([]string, 0, 4) + if m.s3_bucket != nil { + fields = append(fields, childphoto.FieldS3Bucket) + } + if m.s3_key != nil { + fields = append(fields, childphoto.FieldS3Key) + } + if m.created_at != nil { + fields = append(fields, childphoto.FieldCreatedAt) + } + if m.updated_at != nil { + fields = append(fields, childphoto.FieldUpdatedAt) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *ChildPhotoMutation) Field(name string) (ent.Value, bool) { + switch name { + case childphoto.FieldS3Bucket: + return m.S3Bucket() + case childphoto.FieldS3Key: + return m.S3Key() + case childphoto.FieldCreatedAt: + return m.CreatedAt() + case childphoto.FieldUpdatedAt: + return m.UpdatedAt() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *ChildPhotoMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case childphoto.FieldS3Bucket: + return m.OldS3Bucket(ctx) + case childphoto.FieldS3Key: + return m.OldS3Key(ctx) + case childphoto.FieldCreatedAt: + return m.OldCreatedAt(ctx) + case childphoto.FieldUpdatedAt: + return m.OldUpdatedAt(ctx) + } + return nil, fmt.Errorf("unknown ChildPhoto field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *ChildPhotoMutation) SetField(name string, value ent.Value) error { + switch name { + case childphoto.FieldS3Bucket: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetS3Bucket(v) + return nil + case childphoto.FieldS3Key: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetS3Key(v) + return nil + case childphoto.FieldCreatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetCreatedAt(v) + return nil + case childphoto.FieldUpdatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetUpdatedAt(v) + return nil + } + return fmt.Errorf("unknown ChildPhoto field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *ChildPhotoMutation) AddedFields() []string { + return nil +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *ChildPhotoMutation) AddedField(name string) (ent.Value, bool) { + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *ChildPhotoMutation) AddField(name string, value ent.Value) error { + switch name { + } + return fmt.Errorf("unknown ChildPhoto numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *ChildPhotoMutation) ClearedFields() []string { + return nil +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *ChildPhotoMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *ChildPhotoMutation) ClearField(name string) error { + return fmt.Errorf("unknown ChildPhoto nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *ChildPhotoMutation) ResetField(name string) error { + switch name { + case childphoto.FieldS3Bucket: + m.ResetS3Bucket() + return nil + case childphoto.FieldS3Key: + m.ResetS3Key() + return nil + case childphoto.FieldCreatedAt: + m.ResetCreatedAt() + return nil + case childphoto.FieldUpdatedAt: + m.ResetUpdatedAt() + return nil + } + return fmt.Errorf("unknown ChildPhoto field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *ChildPhotoMutation) AddedEdges() []string { + edges := make([]string, 0, 1) + if m.child != nil { + edges = append(edges, childphoto.EdgeChild) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *ChildPhotoMutation) AddedIDs(name string) []ent.Value { + switch name { + case childphoto.EdgeChild: + if id := m.child; id != nil { + return []ent.Value{*id} + } + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *ChildPhotoMutation) RemovedEdges() []string { + edges := make([]string, 0, 1) + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *ChildPhotoMutation) RemovedIDs(name string) []ent.Value { + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *ChildPhotoMutation) ClearedEdges() []string { + edges := make([]string, 0, 1) + if m.clearedchild { + edges = append(edges, childphoto.EdgeChild) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *ChildPhotoMutation) EdgeCleared(name string) bool { + switch name { + case childphoto.EdgeChild: + return m.clearedchild + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *ChildPhotoMutation) ClearEdge(name string) error { + switch name { + case childphoto.EdgeChild: + m.ClearChild() + return nil + } + return fmt.Errorf("unknown ChildPhoto unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *ChildPhotoMutation) ResetEdge(name string) error { + switch name { + case childphoto.EdgeChild: + m.ResetChild() + return nil + } + return fmt.Errorf("unknown ChildPhoto edge %s", name) +} + +// GuardianMutation represents an operation that mutates the Guardian nodes in the graph. +type GuardianMutation struct { + config + op Op + typ string + id *uuid.UUID + name *string + email *string + phone *string + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + children map[uuid.UUID]struct{} + removedchildren map[uuid.UUID]struct{} + clearedchildren bool + nursery *uuid.UUID + clearednursery bool + station *uuid.UUID + clearedstation bool + done bool + oldValue func(context.Context) (*Guardian, error) + predicates []predicate.Guardian +} + +var _ ent.Mutation = (*GuardianMutation)(nil) + +// guardianOption allows management of the mutation configuration using functional options. +type guardianOption func(*GuardianMutation) + +// newGuardianMutation creates new mutation for the Guardian entity. +func newGuardianMutation(c config, op Op, opts ...guardianOption) *GuardianMutation { + m := &GuardianMutation{ + config: c, + op: op, + typ: TypeGuardian, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withGuardianID sets the ID field of the mutation. +func withGuardianID(id uuid.UUID) guardianOption { + return func(m *GuardianMutation) { + var ( + err error + once sync.Once + value *Guardian + ) + m.oldValue = func(ctx context.Context) (*Guardian, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().Guardian.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withGuardian sets the old Guardian of the mutation. +func withGuardian(node *Guardian) guardianOption { + return func(m *GuardianMutation) { + m.oldValue = func(context.Context) (*Guardian, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m GuardianMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m GuardianMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// SetID sets the value of the id field. Note that this +// operation is only accepted on creation of Guardian entities. +func (m *GuardianMutation) SetID(id uuid.UUID) { + m.id = &id +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *GuardianMutation) ID() (id uuid.UUID, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *GuardianMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []uuid.UUID{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Guardian.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetName sets the "name" field. +func (m *GuardianMutation) SetName(s string) { + m.name = &s +} + +// Name returns the value of the "name" field in the mutation. +func (m *GuardianMutation) Name() (r string, exists bool) { + v := m.name + if v == nil { + return + } + return *v, true +} + +// OldName returns the old "name" field's value of the Guardian entity. +// If the Guardian object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *GuardianMutation) OldName(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldName is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldName requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldName: %w", err) + } + return oldValue.Name, nil +} + +// ResetName resets all changes to the "name" field. +func (m *GuardianMutation) ResetName() { + m.name = nil +} + +// SetEmail sets the "email" field. +func (m *GuardianMutation) SetEmail(s string) { + m.email = &s +} + +// Email returns the value of the "email" field in the mutation. +func (m *GuardianMutation) Email() (r string, exists bool) { + v := m.email + if v == nil { + return + } + return *v, true +} + +// OldEmail returns the old "email" field's value of the Guardian entity. +// If the Guardian object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *GuardianMutation) OldEmail(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldEmail is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldEmail requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldEmail: %w", err) + } + return oldValue.Email, nil +} + +// ClearEmail clears the value of the "email" field. +func (m *GuardianMutation) ClearEmail() { + m.email = nil + m.clearedFields[guardian.FieldEmail] = struct{}{} +} + +// EmailCleared returns if the "email" field was cleared in this mutation. +func (m *GuardianMutation) EmailCleared() bool { + _, ok := m.clearedFields[guardian.FieldEmail] + return ok +} + +// ResetEmail resets all changes to the "email" field. +func (m *GuardianMutation) ResetEmail() { + m.email = nil + delete(m.clearedFields, guardian.FieldEmail) +} + +// SetPhone sets the "phone" field. +func (m *GuardianMutation) SetPhone(s string) { + m.phone = &s +} + +// Phone returns the value of the "phone" field in the mutation. +func (m *GuardianMutation) Phone() (r string, exists bool) { + v := m.phone + if v == nil { + return + } + return *v, true +} + +// OldPhone returns the old "phone" field's value of the Guardian entity. +// If the Guardian object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *GuardianMutation) OldPhone(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldPhone is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldPhone requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldPhone: %w", err) + } + return oldValue.Phone, nil +} + +// ClearPhone clears the value of the "phone" field. +func (m *GuardianMutation) ClearPhone() { + m.phone = nil + m.clearedFields[guardian.FieldPhone] = struct{}{} +} + +// PhoneCleared returns if the "phone" field was cleared in this mutation. +func (m *GuardianMutation) PhoneCleared() bool { + _, ok := m.clearedFields[guardian.FieldPhone] + return ok +} + +// ResetPhone resets all changes to the "phone" field. +func (m *GuardianMutation) ResetPhone() { + m.phone = nil + delete(m.clearedFields, guardian.FieldPhone) +} + +// SetCreatedAt sets the "created_at" field. +func (m *GuardianMutation) SetCreatedAt(t time.Time) { + m.created_at = &t +} + +// CreatedAt returns the value of the "created_at" field in the mutation. +func (m *GuardianMutation) CreatedAt() (r time.Time, exists bool) { + v := m.created_at + if v == nil { + return + } + return *v, true +} + +// OldCreatedAt returns the old "created_at" field's value of the Guardian entity. +// If the Guardian object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *GuardianMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldCreatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldCreatedAt: %w", err) + } + return oldValue.CreatedAt, nil +} + +// ResetCreatedAt resets all changes to the "created_at" field. +func (m *GuardianMutation) ResetCreatedAt() { + m.created_at = nil +} + +// SetUpdatedAt sets the "updated_at" field. +func (m *GuardianMutation) SetUpdatedAt(t time.Time) { + m.updated_at = &t +} + +// UpdatedAt returns the value of the "updated_at" field in the mutation. +func (m *GuardianMutation) UpdatedAt() (r time.Time, exists bool) { + v := m.updated_at + if v == nil { + return + } + return *v, true +} + +// OldUpdatedAt returns the old "updated_at" field's value of the Guardian entity. +// If the Guardian object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *GuardianMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldUpdatedAt: %w", err) + } + return oldValue.UpdatedAt, nil +} + +// ResetUpdatedAt resets all changes to the "updated_at" field. +func (m *GuardianMutation) ResetUpdatedAt() { + m.updated_at = nil +} + +// AddChildIDs adds the "children" edge to the Child entity by ids. +func (m *GuardianMutation) AddChildIDs(ids ...uuid.UUID) { + if m.children == nil { + m.children = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.children[ids[i]] = struct{}{} + } +} + +// ClearChildren clears the "children" edge to the Child entity. +func (m *GuardianMutation) ClearChildren() { + m.clearedchildren = true +} + +// ChildrenCleared reports if the "children" edge to the Child entity was cleared. +func (m *GuardianMutation) ChildrenCleared() bool { + return m.clearedchildren +} + +// RemoveChildIDs removes the "children" edge to the Child entity by IDs. +func (m *GuardianMutation) RemoveChildIDs(ids ...uuid.UUID) { + if m.removedchildren == nil { + m.removedchildren = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.children, ids[i]) + m.removedchildren[ids[i]] = struct{}{} + } +} + +// RemovedChildren returns the removed IDs of the "children" edge to the Child entity. +func (m *GuardianMutation) RemovedChildrenIDs() (ids []uuid.UUID) { + for id := range m.removedchildren { + ids = append(ids, id) + } + return +} + +// ChildrenIDs returns the "children" edge IDs in the mutation. +func (m *GuardianMutation) ChildrenIDs() (ids []uuid.UUID) { + for id := range m.children { + ids = append(ids, id) + } + return +} + +// ResetChildren resets all changes to the "children" edge. +func (m *GuardianMutation) ResetChildren() { + m.children = nil + m.clearedchildren = false + m.removedchildren = nil +} + +// SetNurseryID sets the "nursery" edge to the Nursery entity by id. +func (m *GuardianMutation) SetNurseryID(id uuid.UUID) { + m.nursery = &id +} + +// ClearNursery clears the "nursery" edge to the Nursery entity. +func (m *GuardianMutation) ClearNursery() { + m.clearednursery = true +} + +// NurseryCleared reports if the "nursery" edge to the Nursery entity was cleared. +func (m *GuardianMutation) NurseryCleared() bool { + return m.clearednursery +} + +// NurseryID returns the "nursery" edge ID in the mutation. +func (m *GuardianMutation) NurseryID() (id uuid.UUID, exists bool) { + if m.nursery != nil { + return *m.nursery, true + } + return +} + +// NurseryIDs returns the "nursery" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// NurseryID instead. It exists only for internal usage by the builders. +func (m *GuardianMutation) NurseryIDs() (ids []uuid.UUID) { + if id := m.nursery; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetNursery resets all changes to the "nursery" edge. +func (m *GuardianMutation) ResetNursery() { + m.nursery = nil + m.clearednursery = false +} + +// SetStationID sets the "station" edge to the Station entity by id. +func (m *GuardianMutation) SetStationID(id uuid.UUID) { + m.station = &id +} + +// ClearStation clears the "station" edge to the Station entity. +func (m *GuardianMutation) ClearStation() { + m.clearedstation = true +} + +// StationCleared reports if the "station" edge to the Station entity was cleared. +func (m *GuardianMutation) StationCleared() bool { + return m.clearedstation +} + +// StationID returns the "station" edge ID in the mutation. +func (m *GuardianMutation) StationID() (id uuid.UUID, exists bool) { + if m.station != nil { + return *m.station, true + } + return +} + +// StationIDs returns the "station" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// StationID instead. It exists only for internal usage by the builders. +func (m *GuardianMutation) StationIDs() (ids []uuid.UUID) { + if id := m.station; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetStation resets all changes to the "station" edge. +func (m *GuardianMutation) ResetStation() { + m.station = nil + m.clearedstation = false +} + +// Where appends a list predicates to the GuardianMutation builder. +func (m *GuardianMutation) Where(ps ...predicate.Guardian) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the GuardianMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *GuardianMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.Guardian, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *GuardianMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *GuardianMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (Guardian). +func (m *GuardianMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *GuardianMutation) Fields() []string { + fields := make([]string, 0, 5) + if m.name != nil { + fields = append(fields, guardian.FieldName) + } + if m.email != nil { + fields = append(fields, guardian.FieldEmail) + } + if m.phone != nil { + fields = append(fields, guardian.FieldPhone) + } + if m.created_at != nil { + fields = append(fields, guardian.FieldCreatedAt) + } + if m.updated_at != nil { + fields = append(fields, guardian.FieldUpdatedAt) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *GuardianMutation) Field(name string) (ent.Value, bool) { + switch name { + case guardian.FieldName: + return m.Name() + case guardian.FieldEmail: + return m.Email() + case guardian.FieldPhone: + return m.Phone() + case guardian.FieldCreatedAt: + return m.CreatedAt() + case guardian.FieldUpdatedAt: + return m.UpdatedAt() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *GuardianMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case guardian.FieldName: + return m.OldName(ctx) + case guardian.FieldEmail: + return m.OldEmail(ctx) + case guardian.FieldPhone: + return m.OldPhone(ctx) + case guardian.FieldCreatedAt: + return m.OldCreatedAt(ctx) + case guardian.FieldUpdatedAt: + return m.OldUpdatedAt(ctx) + } + return nil, fmt.Errorf("unknown Guardian field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *GuardianMutation) SetField(name string, value ent.Value) error { + switch name { + case guardian.FieldName: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetName(v) + return nil + case guardian.FieldEmail: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetEmail(v) + return nil + case guardian.FieldPhone: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetPhone(v) + return nil + case guardian.FieldCreatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetCreatedAt(v) + return nil + case guardian.FieldUpdatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetUpdatedAt(v) + return nil + } + return fmt.Errorf("unknown Guardian field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *GuardianMutation) AddedFields() []string { + return nil +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *GuardianMutation) AddedField(name string) (ent.Value, bool) { + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *GuardianMutation) AddField(name string, value ent.Value) error { + switch name { + } + return fmt.Errorf("unknown Guardian numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *GuardianMutation) ClearedFields() []string { + var fields []string + if m.FieldCleared(guardian.FieldEmail) { + fields = append(fields, guardian.FieldEmail) + } + if m.FieldCleared(guardian.FieldPhone) { + fields = append(fields, guardian.FieldPhone) + } + return fields +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *GuardianMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *GuardianMutation) ClearField(name string) error { + switch name { + case guardian.FieldEmail: + m.ClearEmail() + return nil + case guardian.FieldPhone: + m.ClearPhone() + return nil + } + return fmt.Errorf("unknown Guardian nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *GuardianMutation) ResetField(name string) error { + switch name { + case guardian.FieldName: + m.ResetName() + return nil + case guardian.FieldEmail: + m.ResetEmail() + return nil + case guardian.FieldPhone: + m.ResetPhone() + return nil + case guardian.FieldCreatedAt: + m.ResetCreatedAt() + return nil + case guardian.FieldUpdatedAt: + m.ResetUpdatedAt() + return nil + } + return fmt.Errorf("unknown Guardian field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *GuardianMutation) AddedEdges() []string { + edges := make([]string, 0, 3) + if m.children != nil { + edges = append(edges, guardian.EdgeChildren) + } + if m.nursery != nil { + edges = append(edges, guardian.EdgeNursery) + } + if m.station != nil { + edges = append(edges, guardian.EdgeStation) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *GuardianMutation) AddedIDs(name string) []ent.Value { + switch name { + case guardian.EdgeChildren: + ids := make([]ent.Value, 0, len(m.children)) + for id := range m.children { + ids = append(ids, id) + } + return ids + case guardian.EdgeNursery: + if id := m.nursery; id != nil { + return []ent.Value{*id} + } + case guardian.EdgeStation: + if id := m.station; id != nil { + return []ent.Value{*id} + } + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *GuardianMutation) RemovedEdges() []string { + edges := make([]string, 0, 3) + if m.removedchildren != nil { + edges = append(edges, guardian.EdgeChildren) + } + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *GuardianMutation) RemovedIDs(name string) []ent.Value { + switch name { + case guardian.EdgeChildren: + ids := make([]ent.Value, 0, len(m.removedchildren)) + for id := range m.removedchildren { + ids = append(ids, id) + } + return ids + } + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *GuardianMutation) ClearedEdges() []string { + edges := make([]string, 0, 3) + if m.clearedchildren { + edges = append(edges, guardian.EdgeChildren) + } + if m.clearednursery { + edges = append(edges, guardian.EdgeNursery) + } + if m.clearedstation { + edges = append(edges, guardian.EdgeStation) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *GuardianMutation) EdgeCleared(name string) bool { + switch name { + case guardian.EdgeChildren: + return m.clearedchildren + case guardian.EdgeNursery: + return m.clearednursery + case guardian.EdgeStation: + return m.clearedstation + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *GuardianMutation) ClearEdge(name string) error { + switch name { + case guardian.EdgeNursery: + m.ClearNursery() + return nil + case guardian.EdgeStation: + m.ClearStation() + return nil + } + return fmt.Errorf("unknown Guardian unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *GuardianMutation) ResetEdge(name string) error { + switch name { + case guardian.EdgeChildren: + m.ResetChildren() + return nil + case guardian.EdgeNursery: + m.ResetNursery() + return nil + case guardian.EdgeStation: + m.ResetStation() + return nil + } + return fmt.Errorf("unknown Guardian edge %s", name) +} + +// NurseryMutation represents an operation that mutates the Nursery nodes in the graph. +type NurseryMutation struct { + config + op Op + typ string + id *uuid.UUID + nursery_code *string + name *string + address *string + phone_number *string + email *string + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + children map[uuid.UUID]struct{} + removedchildren map[uuid.UUID]struct{} + clearedchildren bool + guardians map[uuid.UUID]struct{} + removedguardians map[uuid.UUID]struct{} + clearedguardians bool + buses map[uuid.UUID]struct{} + removedbuses map[uuid.UUID]struct{} + clearedbuses bool + done bool + oldValue func(context.Context) (*Nursery, error) + predicates []predicate.Nursery +} + +var _ ent.Mutation = (*NurseryMutation)(nil) + +// nurseryOption allows management of the mutation configuration using functional options. +type nurseryOption func(*NurseryMutation) + +// newNurseryMutation creates new mutation for the Nursery entity. +func newNurseryMutation(c config, op Op, opts ...nurseryOption) *NurseryMutation { + m := &NurseryMutation{ + config: c, + op: op, + typ: TypeNursery, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withNurseryID sets the ID field of the mutation. +func withNurseryID(id uuid.UUID) nurseryOption { + return func(m *NurseryMutation) { + var ( + err error + once sync.Once + value *Nursery + ) + m.oldValue = func(ctx context.Context) (*Nursery, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().Nursery.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withNursery sets the old Nursery of the mutation. +func withNursery(node *Nursery) nurseryOption { + return func(m *NurseryMutation) { + m.oldValue = func(context.Context) (*Nursery, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m NurseryMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m NurseryMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// SetID sets the value of the id field. Note that this +// operation is only accepted on creation of Nursery entities. +func (m *NurseryMutation) SetID(id uuid.UUID) { + m.id = &id +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *NurseryMutation) ID() (id uuid.UUID, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *NurseryMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []uuid.UUID{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Nursery.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetNurseryCode sets the "nursery_code" field. +func (m *NurseryMutation) SetNurseryCode(s string) { + m.nursery_code = &s +} + +// NurseryCode returns the value of the "nursery_code" field in the mutation. +func (m *NurseryMutation) NurseryCode() (r string, exists bool) { + v := m.nursery_code + if v == nil { + return + } + return *v, true +} + +// OldNurseryCode returns the old "nursery_code" field's value of the Nursery entity. +// If the Nursery object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *NurseryMutation) OldNurseryCode(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldNurseryCode is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldNurseryCode requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldNurseryCode: %w", err) + } + return oldValue.NurseryCode, nil +} + +// ResetNurseryCode resets all changes to the "nursery_code" field. +func (m *NurseryMutation) ResetNurseryCode() { + m.nursery_code = nil +} + +// SetName sets the "name" field. +func (m *NurseryMutation) SetName(s string) { + m.name = &s +} + +// Name returns the value of the "name" field in the mutation. +func (m *NurseryMutation) Name() (r string, exists bool) { + v := m.name + if v == nil { + return + } + return *v, true +} + +// OldName returns the old "name" field's value of the Nursery entity. +// If the Nursery object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *NurseryMutation) OldName(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldName is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldName requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldName: %w", err) + } + return oldValue.Name, nil +} + +// ResetName resets all changes to the "name" field. +func (m *NurseryMutation) ResetName() { + m.name = nil +} + +// SetAddress sets the "address" field. +func (m *NurseryMutation) SetAddress(s string) { + m.address = &s +} + +// Address returns the value of the "address" field in the mutation. +func (m *NurseryMutation) Address() (r string, exists bool) { + v := m.address + if v == nil { + return + } + return *v, true +} + +// OldAddress returns the old "address" field's value of the Nursery entity. +// If the Nursery object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *NurseryMutation) OldAddress(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldAddress is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldAddress requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldAddress: %w", err) + } + return oldValue.Address, nil +} + +// ResetAddress resets all changes to the "address" field. +func (m *NurseryMutation) ResetAddress() { + m.address = nil +} + +// SetPhoneNumber sets the "phone_number" field. +func (m *NurseryMutation) SetPhoneNumber(s string) { + m.phone_number = &s +} + +// PhoneNumber returns the value of the "phone_number" field in the mutation. +func (m *NurseryMutation) PhoneNumber() (r string, exists bool) { + v := m.phone_number + if v == nil { + return + } + return *v, true +} + +// OldPhoneNumber returns the old "phone_number" field's value of the Nursery entity. +// If the Nursery object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *NurseryMutation) OldPhoneNumber(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldPhoneNumber is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldPhoneNumber requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldPhoneNumber: %w", err) + } + return oldValue.PhoneNumber, nil +} + +// ClearPhoneNumber clears the value of the "phone_number" field. +func (m *NurseryMutation) ClearPhoneNumber() { + m.phone_number = nil + m.clearedFields[nursery.FieldPhoneNumber] = struct{}{} +} + +// PhoneNumberCleared returns if the "phone_number" field was cleared in this mutation. +func (m *NurseryMutation) PhoneNumberCleared() bool { + _, ok := m.clearedFields[nursery.FieldPhoneNumber] + return ok +} + +// ResetPhoneNumber resets all changes to the "phone_number" field. +func (m *NurseryMutation) ResetPhoneNumber() { + m.phone_number = nil + delete(m.clearedFields, nursery.FieldPhoneNumber) +} + +// SetEmail sets the "email" field. +func (m *NurseryMutation) SetEmail(s string) { + m.email = &s +} + +// Email returns the value of the "email" field in the mutation. +func (m *NurseryMutation) Email() (r string, exists bool) { + v := m.email + if v == nil { + return + } + return *v, true +} + +// OldEmail returns the old "email" field's value of the Nursery entity. +// If the Nursery object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *NurseryMutation) OldEmail(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldEmail is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldEmail requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldEmail: %w", err) + } + return oldValue.Email, nil +} + +// ClearEmail clears the value of the "email" field. +func (m *NurseryMutation) ClearEmail() { + m.email = nil + m.clearedFields[nursery.FieldEmail] = struct{}{} +} + +// EmailCleared returns if the "email" field was cleared in this mutation. +func (m *NurseryMutation) EmailCleared() bool { + _, ok := m.clearedFields[nursery.FieldEmail] + return ok +} + +// ResetEmail resets all changes to the "email" field. +func (m *NurseryMutation) ResetEmail() { + m.email = nil + delete(m.clearedFields, nursery.FieldEmail) +} + +// SetCreatedAt sets the "created_at" field. +func (m *NurseryMutation) SetCreatedAt(t time.Time) { + m.created_at = &t +} + +// CreatedAt returns the value of the "created_at" field in the mutation. +func (m *NurseryMutation) CreatedAt() (r time.Time, exists bool) { + v := m.created_at + if v == nil { + return + } + return *v, true +} + +// OldCreatedAt returns the old "created_at" field's value of the Nursery entity. +// If the Nursery object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *NurseryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldCreatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldCreatedAt: %w", err) + } + return oldValue.CreatedAt, nil +} + +// ResetCreatedAt resets all changes to the "created_at" field. +func (m *NurseryMutation) ResetCreatedAt() { + m.created_at = nil +} + +// SetUpdatedAt sets the "updated_at" field. +func (m *NurseryMutation) SetUpdatedAt(t time.Time) { + m.updated_at = &t +} + +// UpdatedAt returns the value of the "updated_at" field in the mutation. +func (m *NurseryMutation) UpdatedAt() (r time.Time, exists bool) { + v := m.updated_at + if v == nil { + return + } + return *v, true +} + +// OldUpdatedAt returns the old "updated_at" field's value of the Nursery entity. +// If the Nursery object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *NurseryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldUpdatedAt: %w", err) + } + return oldValue.UpdatedAt, nil +} + +// ResetUpdatedAt resets all changes to the "updated_at" field. +func (m *NurseryMutation) ResetUpdatedAt() { + m.updated_at = nil +} + +// AddChildIDs adds the "children" edge to the Child entity by ids. +func (m *NurseryMutation) AddChildIDs(ids ...uuid.UUID) { + if m.children == nil { + m.children = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.children[ids[i]] = struct{}{} + } +} + +// ClearChildren clears the "children" edge to the Child entity. +func (m *NurseryMutation) ClearChildren() { + m.clearedchildren = true +} + +// ChildrenCleared reports if the "children" edge to the Child entity was cleared. +func (m *NurseryMutation) ChildrenCleared() bool { + return m.clearedchildren +} + +// RemoveChildIDs removes the "children" edge to the Child entity by IDs. +func (m *NurseryMutation) RemoveChildIDs(ids ...uuid.UUID) { + if m.removedchildren == nil { + m.removedchildren = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.children, ids[i]) + m.removedchildren[ids[i]] = struct{}{} + } +} + +// RemovedChildren returns the removed IDs of the "children" edge to the Child entity. +func (m *NurseryMutation) RemovedChildrenIDs() (ids []uuid.UUID) { + for id := range m.removedchildren { + ids = append(ids, id) + } + return +} + +// ChildrenIDs returns the "children" edge IDs in the mutation. +func (m *NurseryMutation) ChildrenIDs() (ids []uuid.UUID) { + for id := range m.children { + ids = append(ids, id) + } + return +} + +// ResetChildren resets all changes to the "children" edge. +func (m *NurseryMutation) ResetChildren() { + m.children = nil + m.clearedchildren = false + m.removedchildren = nil +} + +// AddGuardianIDs adds the "guardians" edge to the Guardian entity by ids. +func (m *NurseryMutation) AddGuardianIDs(ids ...uuid.UUID) { + if m.guardians == nil { + m.guardians = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.guardians[ids[i]] = struct{}{} + } +} + +// ClearGuardians clears the "guardians" edge to the Guardian entity. +func (m *NurseryMutation) ClearGuardians() { + m.clearedguardians = true +} + +// GuardiansCleared reports if the "guardians" edge to the Guardian entity was cleared. +func (m *NurseryMutation) GuardiansCleared() bool { + return m.clearedguardians +} + +// RemoveGuardianIDs removes the "guardians" edge to the Guardian entity by IDs. +func (m *NurseryMutation) RemoveGuardianIDs(ids ...uuid.UUID) { + if m.removedguardians == nil { + m.removedguardians = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.guardians, ids[i]) + m.removedguardians[ids[i]] = struct{}{} + } +} + +// RemovedGuardians returns the removed IDs of the "guardians" edge to the Guardian entity. +func (m *NurseryMutation) RemovedGuardiansIDs() (ids []uuid.UUID) { + for id := range m.removedguardians { + ids = append(ids, id) + } + return +} + +// GuardiansIDs returns the "guardians" edge IDs in the mutation. +func (m *NurseryMutation) GuardiansIDs() (ids []uuid.UUID) { + for id := range m.guardians { + ids = append(ids, id) + } + return +} + +// ResetGuardians resets all changes to the "guardians" edge. +func (m *NurseryMutation) ResetGuardians() { + m.guardians = nil + m.clearedguardians = false + m.removedguardians = nil +} + +// AddBusIDs adds the "buses" edge to the Bus entity by ids. +func (m *NurseryMutation) AddBusIDs(ids ...uuid.UUID) { + if m.buses == nil { + m.buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.buses[ids[i]] = struct{}{} + } +} + +// ClearBuses clears the "buses" edge to the Bus entity. +func (m *NurseryMutation) ClearBuses() { + m.clearedbuses = true +} + +// BusesCleared reports if the "buses" edge to the Bus entity was cleared. +func (m *NurseryMutation) BusesCleared() bool { + return m.clearedbuses +} + +// RemoveBusIDs removes the "buses" edge to the Bus entity by IDs. +func (m *NurseryMutation) RemoveBusIDs(ids ...uuid.UUID) { + if m.removedbuses == nil { + m.removedbuses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.buses, ids[i]) + m.removedbuses[ids[i]] = struct{}{} + } +} + +// RemovedBuses returns the removed IDs of the "buses" edge to the Bus entity. +func (m *NurseryMutation) RemovedBusesIDs() (ids []uuid.UUID) { + for id := range m.removedbuses { + ids = append(ids, id) + } + return +} + +// BusesIDs returns the "buses" edge IDs in the mutation. +func (m *NurseryMutation) BusesIDs() (ids []uuid.UUID) { + for id := range m.buses { + ids = append(ids, id) + } + return +} + +// ResetBuses resets all changes to the "buses" edge. +func (m *NurseryMutation) ResetBuses() { + m.buses = nil + m.clearedbuses = false + m.removedbuses = nil +} + +// Where appends a list predicates to the NurseryMutation builder. +func (m *NurseryMutation) Where(ps ...predicate.Nursery) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the NurseryMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *NurseryMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.Nursery, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *NurseryMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *NurseryMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (Nursery). +func (m *NurseryMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *NurseryMutation) Fields() []string { + fields := make([]string, 0, 7) + if m.nursery_code != nil { + fields = append(fields, nursery.FieldNurseryCode) + } + if m.name != nil { + fields = append(fields, nursery.FieldName) + } + if m.address != nil { + fields = append(fields, nursery.FieldAddress) + } + if m.phone_number != nil { + fields = append(fields, nursery.FieldPhoneNumber) + } + if m.email != nil { + fields = append(fields, nursery.FieldEmail) + } + if m.created_at != nil { + fields = append(fields, nursery.FieldCreatedAt) + } + if m.updated_at != nil { + fields = append(fields, nursery.FieldUpdatedAt) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *NurseryMutation) Field(name string) (ent.Value, bool) { + switch name { + case nursery.FieldNurseryCode: + return m.NurseryCode() + case nursery.FieldName: + return m.Name() + case nursery.FieldAddress: + return m.Address() + case nursery.FieldPhoneNumber: + return m.PhoneNumber() + case nursery.FieldEmail: + return m.Email() + case nursery.FieldCreatedAt: + return m.CreatedAt() + case nursery.FieldUpdatedAt: + return m.UpdatedAt() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *NurseryMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case nursery.FieldNurseryCode: + return m.OldNurseryCode(ctx) + case nursery.FieldName: + return m.OldName(ctx) + case nursery.FieldAddress: + return m.OldAddress(ctx) + case nursery.FieldPhoneNumber: + return m.OldPhoneNumber(ctx) + case nursery.FieldEmail: + return m.OldEmail(ctx) + case nursery.FieldCreatedAt: + return m.OldCreatedAt(ctx) + case nursery.FieldUpdatedAt: + return m.OldUpdatedAt(ctx) + } + return nil, fmt.Errorf("unknown Nursery field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *NurseryMutation) SetField(name string, value ent.Value) error { + switch name { + case nursery.FieldNurseryCode: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetNurseryCode(v) + return nil + case nursery.FieldName: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetName(v) + return nil + case nursery.FieldAddress: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetAddress(v) + return nil + case nursery.FieldPhoneNumber: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetPhoneNumber(v) + return nil + case nursery.FieldEmail: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetEmail(v) + return nil + case nursery.FieldCreatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetCreatedAt(v) + return nil + case nursery.FieldUpdatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetUpdatedAt(v) + return nil + } + return fmt.Errorf("unknown Nursery field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *NurseryMutation) AddedFields() []string { + return nil +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *NurseryMutation) AddedField(name string) (ent.Value, bool) { + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *NurseryMutation) AddField(name string, value ent.Value) error { + switch name { + } + return fmt.Errorf("unknown Nursery numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *NurseryMutation) ClearedFields() []string { + var fields []string + if m.FieldCleared(nursery.FieldPhoneNumber) { + fields = append(fields, nursery.FieldPhoneNumber) + } + if m.FieldCleared(nursery.FieldEmail) { + fields = append(fields, nursery.FieldEmail) + } + return fields +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *NurseryMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *NurseryMutation) ClearField(name string) error { + switch name { + case nursery.FieldPhoneNumber: + m.ClearPhoneNumber() + return nil + case nursery.FieldEmail: + m.ClearEmail() + return nil + } + return fmt.Errorf("unknown Nursery nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *NurseryMutation) ResetField(name string) error { + switch name { + case nursery.FieldNurseryCode: + m.ResetNurseryCode() + return nil + case nursery.FieldName: + m.ResetName() + return nil + case nursery.FieldAddress: + m.ResetAddress() + return nil + case nursery.FieldPhoneNumber: + m.ResetPhoneNumber() + return nil + case nursery.FieldEmail: + m.ResetEmail() + return nil + case nursery.FieldCreatedAt: + m.ResetCreatedAt() + return nil + case nursery.FieldUpdatedAt: + m.ResetUpdatedAt() + return nil + } + return fmt.Errorf("unknown Nursery field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *NurseryMutation) AddedEdges() []string { + edges := make([]string, 0, 3) + if m.children != nil { + edges = append(edges, nursery.EdgeChildren) + } + if m.guardians != nil { + edges = append(edges, nursery.EdgeGuardians) + } + if m.buses != nil { + edges = append(edges, nursery.EdgeBuses) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *NurseryMutation) AddedIDs(name string) []ent.Value { + switch name { + case nursery.EdgeChildren: + ids := make([]ent.Value, 0, len(m.children)) + for id := range m.children { + ids = append(ids, id) + } + return ids + case nursery.EdgeGuardians: + ids := make([]ent.Value, 0, len(m.guardians)) + for id := range m.guardians { + ids = append(ids, id) + } + return ids + case nursery.EdgeBuses: + ids := make([]ent.Value, 0, len(m.buses)) + for id := range m.buses { + ids = append(ids, id) + } + return ids + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *NurseryMutation) RemovedEdges() []string { + edges := make([]string, 0, 3) + if m.removedchildren != nil { + edges = append(edges, nursery.EdgeChildren) + } + if m.removedguardians != nil { + edges = append(edges, nursery.EdgeGuardians) + } + if m.removedbuses != nil { + edges = append(edges, nursery.EdgeBuses) + } + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *NurseryMutation) RemovedIDs(name string) []ent.Value { + switch name { + case nursery.EdgeChildren: + ids := make([]ent.Value, 0, len(m.removedchildren)) + for id := range m.removedchildren { + ids = append(ids, id) + } + return ids + case nursery.EdgeGuardians: + ids := make([]ent.Value, 0, len(m.removedguardians)) + for id := range m.removedguardians { + ids = append(ids, id) + } + return ids + case nursery.EdgeBuses: + ids := make([]ent.Value, 0, len(m.removedbuses)) + for id := range m.removedbuses { + ids = append(ids, id) + } + return ids + } + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *NurseryMutation) ClearedEdges() []string { + edges := make([]string, 0, 3) + if m.clearedchildren { + edges = append(edges, nursery.EdgeChildren) + } + if m.clearedguardians { + edges = append(edges, nursery.EdgeGuardians) + } + if m.clearedbuses { + edges = append(edges, nursery.EdgeBuses) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *NurseryMutation) EdgeCleared(name string) bool { + switch name { + case nursery.EdgeChildren: + return m.clearedchildren + case nursery.EdgeGuardians: + return m.clearedguardians + case nursery.EdgeBuses: + return m.clearedbuses + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *NurseryMutation) ClearEdge(name string) error { + switch name { + } + return fmt.Errorf("unknown Nursery unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *NurseryMutation) ResetEdge(name string) error { + switch name { + case nursery.EdgeChildren: + m.ResetChildren() + return nil + case nursery.EdgeGuardians: + m.ResetGuardians() + return nil + case nursery.EdgeBuses: + m.ResetBuses() + return nil + } + return fmt.Errorf("unknown Nursery edge %s", name) +} + +// StationMutation represents an operation that mutates the Station nodes in the graph. +type StationMutation struct { + config + op Op + typ string + id *uuid.UUID + latitude *float64 + addlatitude *float64 + longitude *float64 + addlongitude *float64 + morning_order *int + addmorning_order *int + evening_order *int + addevening_order *int + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + guardian *uuid.UUID + clearedguardian bool + bus map[uuid.UUID]struct{} + removedbus map[uuid.UUID]struct{} + clearedbus bool + done bool + oldValue func(context.Context) (*Station, error) + predicates []predicate.Station +} + +var _ ent.Mutation = (*StationMutation)(nil) + +// stationOption allows management of the mutation configuration using functional options. +type stationOption func(*StationMutation) + +// newStationMutation creates new mutation for the Station entity. +func newStationMutation(c config, op Op, opts ...stationOption) *StationMutation { + m := &StationMutation{ + config: c, + op: op, + typ: TypeStation, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withStationID sets the ID field of the mutation. +func withStationID(id uuid.UUID) stationOption { + return func(m *StationMutation) { + var ( + err error + once sync.Once + value *Station + ) + m.oldValue = func(ctx context.Context) (*Station, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().Station.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withStation sets the old Station of the mutation. +func withStation(node *Station) stationOption { + return func(m *StationMutation) { + m.oldValue = func(context.Context) (*Station, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m StationMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m StationMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// SetID sets the value of the id field. Note that this +// operation is only accepted on creation of Station entities. +func (m *StationMutation) SetID(id uuid.UUID) { + m.id = &id +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *StationMutation) ID() (id uuid.UUID, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *StationMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []uuid.UUID{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Station.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetLatitude sets the "latitude" field. +func (m *StationMutation) SetLatitude(f float64) { + m.latitude = &f + m.addlatitude = nil +} + +// Latitude returns the value of the "latitude" field in the mutation. +func (m *StationMutation) Latitude() (r float64, exists bool) { + v := m.latitude + if v == nil { + return + } + return *v, true +} + +// OldLatitude returns the old "latitude" field's value of the Station entity. +// If the Station object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *StationMutation) OldLatitude(ctx context.Context) (v float64, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldLatitude is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldLatitude requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldLatitude: %w", err) + } + return oldValue.Latitude, nil +} + +// AddLatitude adds f to the "latitude" field. +func (m *StationMutation) AddLatitude(f float64) { + if m.addlatitude != nil { + *m.addlatitude += f + } else { + m.addlatitude = &f + } +} + +// AddedLatitude returns the value that was added to the "latitude" field in this mutation. +func (m *StationMutation) AddedLatitude() (r float64, exists bool) { + v := m.addlatitude + if v == nil { + return + } + return *v, true +} + +// ClearLatitude clears the value of the "latitude" field. +func (m *StationMutation) ClearLatitude() { + m.latitude = nil + m.addlatitude = nil + m.clearedFields[station.FieldLatitude] = struct{}{} +} + +// LatitudeCleared returns if the "latitude" field was cleared in this mutation. +func (m *StationMutation) LatitudeCleared() bool { + _, ok := m.clearedFields[station.FieldLatitude] + return ok +} + +// ResetLatitude resets all changes to the "latitude" field. +func (m *StationMutation) ResetLatitude() { + m.latitude = nil + m.addlatitude = nil + delete(m.clearedFields, station.FieldLatitude) +} + +// SetLongitude sets the "longitude" field. +func (m *StationMutation) SetLongitude(f float64) { + m.longitude = &f + m.addlongitude = nil +} + +// Longitude returns the value of the "longitude" field in the mutation. +func (m *StationMutation) Longitude() (r float64, exists bool) { + v := m.longitude + if v == nil { + return + } + return *v, true +} + +// OldLongitude returns the old "longitude" field's value of the Station entity. +// If the Station object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *StationMutation) OldLongitude(ctx context.Context) (v float64, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldLongitude is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldLongitude requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldLongitude: %w", err) + } + return oldValue.Longitude, nil +} + +// AddLongitude adds f to the "longitude" field. +func (m *StationMutation) AddLongitude(f float64) { + if m.addlongitude != nil { + *m.addlongitude += f + } else { + m.addlongitude = &f + } +} + +// AddedLongitude returns the value that was added to the "longitude" field in this mutation. +func (m *StationMutation) AddedLongitude() (r float64, exists bool) { + v := m.addlongitude + if v == nil { + return + } + return *v, true +} + +// ClearLongitude clears the value of the "longitude" field. +func (m *StationMutation) ClearLongitude() { + m.longitude = nil + m.addlongitude = nil + m.clearedFields[station.FieldLongitude] = struct{}{} +} + +// LongitudeCleared returns if the "longitude" field was cleared in this mutation. +func (m *StationMutation) LongitudeCleared() bool { + _, ok := m.clearedFields[station.FieldLongitude] + return ok +} + +// ResetLongitude resets all changes to the "longitude" field. +func (m *StationMutation) ResetLongitude() { + m.longitude = nil + m.addlongitude = nil + delete(m.clearedFields, station.FieldLongitude) +} + +// SetMorningOrder sets the "morning_order" field. +func (m *StationMutation) SetMorningOrder(i int) { + m.morning_order = &i + m.addmorning_order = nil +} + +// MorningOrder returns the value of the "morning_order" field in the mutation. +func (m *StationMutation) MorningOrder() (r int, exists bool) { + v := m.morning_order + if v == nil { + return + } + return *v, true +} + +// OldMorningOrder returns the old "morning_order" field's value of the Station entity. +// If the Station object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *StationMutation) OldMorningOrder(ctx context.Context) (v int, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldMorningOrder is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldMorningOrder requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldMorningOrder: %w", err) + } + return oldValue.MorningOrder, nil +} + +// AddMorningOrder adds i to the "morning_order" field. +func (m *StationMutation) AddMorningOrder(i int) { + if m.addmorning_order != nil { + *m.addmorning_order += i + } else { + m.addmorning_order = &i + } +} + +// AddedMorningOrder returns the value that was added to the "morning_order" field in this mutation. +func (m *StationMutation) AddedMorningOrder() (r int, exists bool) { + v := m.addmorning_order + if v == nil { + return + } + return *v, true +} + +// ResetMorningOrder resets all changes to the "morning_order" field. +func (m *StationMutation) ResetMorningOrder() { + m.morning_order = nil + m.addmorning_order = nil +} + +// SetEveningOrder sets the "evening_order" field. +func (m *StationMutation) SetEveningOrder(i int) { + m.evening_order = &i + m.addevening_order = nil +} + +// EveningOrder returns the value of the "evening_order" field in the mutation. +func (m *StationMutation) EveningOrder() (r int, exists bool) { + v := m.evening_order + if v == nil { + return + } + return *v, true +} + +// OldEveningOrder returns the old "evening_order" field's value of the Station entity. +// If the Station object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *StationMutation) OldEveningOrder(ctx context.Context) (v int, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldEveningOrder is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldEveningOrder requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldEveningOrder: %w", err) + } + return oldValue.EveningOrder, nil +} + +// AddEveningOrder adds i to the "evening_order" field. +func (m *StationMutation) AddEveningOrder(i int) { + if m.addevening_order != nil { + *m.addevening_order += i + } else { + m.addevening_order = &i + } +} + +// AddedEveningOrder returns the value that was added to the "evening_order" field in this mutation. +func (m *StationMutation) AddedEveningOrder() (r int, exists bool) { + v := m.addevening_order + if v == nil { + return + } + return *v, true +} + +// ResetEveningOrder resets all changes to the "evening_order" field. +func (m *StationMutation) ResetEveningOrder() { + m.evening_order = nil + m.addevening_order = nil +} + +// SetCreatedAt sets the "created_at" field. +func (m *StationMutation) SetCreatedAt(t time.Time) { + m.created_at = &t +} + +// CreatedAt returns the value of the "created_at" field in the mutation. +func (m *StationMutation) CreatedAt() (r time.Time, exists bool) { + v := m.created_at + if v == nil { + return + } + return *v, true +} + +// OldCreatedAt returns the old "created_at" field's value of the Station entity. +// If the Station object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *StationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldCreatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldCreatedAt: %w", err) + } + return oldValue.CreatedAt, nil +} + +// ResetCreatedAt resets all changes to the "created_at" field. +func (m *StationMutation) ResetCreatedAt() { + m.created_at = nil +} + +// SetUpdatedAt sets the "updated_at" field. +func (m *StationMutation) SetUpdatedAt(t time.Time) { + m.updated_at = &t +} + +// UpdatedAt returns the value of the "updated_at" field in the mutation. +func (m *StationMutation) UpdatedAt() (r time.Time, exists bool) { + v := m.updated_at + if v == nil { + return + } + return *v, true +} + +// OldUpdatedAt returns the old "updated_at" field's value of the Station entity. +// If the Station object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *StationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldUpdatedAt: %w", err) + } + return oldValue.UpdatedAt, nil +} + +// ResetUpdatedAt resets all changes to the "updated_at" field. +func (m *StationMutation) ResetUpdatedAt() { + m.updated_at = nil +} + +// SetGuardianID sets the "guardian" edge to the Guardian entity by id. +func (m *StationMutation) SetGuardianID(id uuid.UUID) { + m.guardian = &id +} + +// ClearGuardian clears the "guardian" edge to the Guardian entity. +func (m *StationMutation) ClearGuardian() { + m.clearedguardian = true +} + +// GuardianCleared reports if the "guardian" edge to the Guardian entity was cleared. +func (m *StationMutation) GuardianCleared() bool { + return m.clearedguardian +} + +// GuardianID returns the "guardian" edge ID in the mutation. +func (m *StationMutation) GuardianID() (id uuid.UUID, exists bool) { + if m.guardian != nil { + return *m.guardian, true + } + return +} + +// GuardianIDs returns the "guardian" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// GuardianID instead. It exists only for internal usage by the builders. +func (m *StationMutation) GuardianIDs() (ids []uuid.UUID) { + if id := m.guardian; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetGuardian resets all changes to the "guardian" edge. +func (m *StationMutation) ResetGuardian() { + m.guardian = nil + m.clearedguardian = false +} + +// AddBuIDs adds the "bus" edge to the Bus entity by ids. +func (m *StationMutation) AddBuIDs(ids ...uuid.UUID) { + if m.bus == nil { + m.bus = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.bus[ids[i]] = struct{}{} + } +} + +// ClearBus clears the "bus" edge to the Bus entity. +func (m *StationMutation) ClearBus() { + m.clearedbus = true +} + +// BusCleared reports if the "bus" edge to the Bus entity was cleared. +func (m *StationMutation) BusCleared() bool { + return m.clearedbus +} + +// RemoveBuIDs removes the "bus" edge to the Bus entity by IDs. +func (m *StationMutation) RemoveBuIDs(ids ...uuid.UUID) { + if m.removedbus == nil { + m.removedbus = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.bus, ids[i]) + m.removedbus[ids[i]] = struct{}{} + } +} + +// RemovedBus returns the removed IDs of the "bus" edge to the Bus entity. +func (m *StationMutation) RemovedBusIDs() (ids []uuid.UUID) { + for id := range m.removedbus { + ids = append(ids, id) + } + return +} + +// BusIDs returns the "bus" edge IDs in the mutation. +func (m *StationMutation) BusIDs() (ids []uuid.UUID) { + for id := range m.bus { + ids = append(ids, id) + } + return +} + +// ResetBus resets all changes to the "bus" edge. +func (m *StationMutation) ResetBus() { + m.bus = nil + m.clearedbus = false + m.removedbus = nil +} + +// Where appends a list predicates to the StationMutation builder. +func (m *StationMutation) Where(ps ...predicate.Station) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the StationMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *StationMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.Station, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *StationMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *StationMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (Station). +func (m *StationMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *StationMutation) Fields() []string { + fields := make([]string, 0, 6) + if m.latitude != nil { + fields = append(fields, station.FieldLatitude) + } + if m.longitude != nil { + fields = append(fields, station.FieldLongitude) + } + if m.morning_order != nil { + fields = append(fields, station.FieldMorningOrder) + } + if m.evening_order != nil { + fields = append(fields, station.FieldEveningOrder) + } + if m.created_at != nil { + fields = append(fields, station.FieldCreatedAt) + } + if m.updated_at != nil { + fields = append(fields, station.FieldUpdatedAt) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *StationMutation) Field(name string) (ent.Value, bool) { + switch name { + case station.FieldLatitude: + return m.Latitude() + case station.FieldLongitude: + return m.Longitude() + case station.FieldMorningOrder: + return m.MorningOrder() + case station.FieldEveningOrder: + return m.EveningOrder() + case station.FieldCreatedAt: + return m.CreatedAt() + case station.FieldUpdatedAt: + return m.UpdatedAt() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *StationMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case station.FieldLatitude: + return m.OldLatitude(ctx) + case station.FieldLongitude: + return m.OldLongitude(ctx) + case station.FieldMorningOrder: + return m.OldMorningOrder(ctx) + case station.FieldEveningOrder: + return m.OldEveningOrder(ctx) + case station.FieldCreatedAt: + return m.OldCreatedAt(ctx) + case station.FieldUpdatedAt: + return m.OldUpdatedAt(ctx) + } + return nil, fmt.Errorf("unknown Station field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *StationMutation) SetField(name string, value ent.Value) error { + switch name { + case station.FieldLatitude: + v, ok := value.(float64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetLatitude(v) + return nil + case station.FieldLongitude: + v, ok := value.(float64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetLongitude(v) + return nil + case station.FieldMorningOrder: + v, ok := value.(int) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetMorningOrder(v) + return nil + case station.FieldEveningOrder: + v, ok := value.(int) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetEveningOrder(v) + return nil + case station.FieldCreatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetCreatedAt(v) + return nil + case station.FieldUpdatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetUpdatedAt(v) + return nil + } + return fmt.Errorf("unknown Station field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *StationMutation) AddedFields() []string { + var fields []string + if m.addlatitude != nil { + fields = append(fields, station.FieldLatitude) + } + if m.addlongitude != nil { + fields = append(fields, station.FieldLongitude) + } + if m.addmorning_order != nil { + fields = append(fields, station.FieldMorningOrder) + } + if m.addevening_order != nil { + fields = append(fields, station.FieldEveningOrder) + } + return fields +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *StationMutation) AddedField(name string) (ent.Value, bool) { + switch name { + case station.FieldLatitude: + return m.AddedLatitude() + case station.FieldLongitude: + return m.AddedLongitude() + case station.FieldMorningOrder: + return m.AddedMorningOrder() + case station.FieldEveningOrder: + return m.AddedEveningOrder() + } + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *StationMutation) AddField(name string, value ent.Value) error { + switch name { + case station.FieldLatitude: + v, ok := value.(float64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddLatitude(v) + return nil + case station.FieldLongitude: + v, ok := value.(float64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddLongitude(v) + return nil + case station.FieldMorningOrder: + v, ok := value.(int) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddMorningOrder(v) + return nil + case station.FieldEveningOrder: + v, ok := value.(int) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddEveningOrder(v) + return nil + } + return fmt.Errorf("unknown Station numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *StationMutation) ClearedFields() []string { + var fields []string + if m.FieldCleared(station.FieldLatitude) { + fields = append(fields, station.FieldLatitude) + } + if m.FieldCleared(station.FieldLongitude) { + fields = append(fields, station.FieldLongitude) + } + return fields +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *StationMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *StationMutation) ClearField(name string) error { + switch name { + case station.FieldLatitude: + m.ClearLatitude() + return nil + case station.FieldLongitude: + m.ClearLongitude() + return nil + } + return fmt.Errorf("unknown Station nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *StationMutation) ResetField(name string) error { + switch name { + case station.FieldLatitude: + m.ResetLatitude() + return nil + case station.FieldLongitude: + m.ResetLongitude() + return nil + case station.FieldMorningOrder: + m.ResetMorningOrder() + return nil + case station.FieldEveningOrder: + m.ResetEveningOrder() + return nil + case station.FieldCreatedAt: + m.ResetCreatedAt() + return nil + case station.FieldUpdatedAt: + m.ResetUpdatedAt() + return nil + } + return fmt.Errorf("unknown Station field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *StationMutation) AddedEdges() []string { + edges := make([]string, 0, 2) + if m.guardian != nil { + edges = append(edges, station.EdgeGuardian) + } + if m.bus != nil { + edges = append(edges, station.EdgeBus) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *StationMutation) AddedIDs(name string) []ent.Value { + switch name { + case station.EdgeGuardian: + if id := m.guardian; id != nil { + return []ent.Value{*id} + } + case station.EdgeBus: + ids := make([]ent.Value, 0, len(m.bus)) + for id := range m.bus { + ids = append(ids, id) + } + return ids + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *StationMutation) RemovedEdges() []string { + edges := make([]string, 0, 2) + if m.removedbus != nil { + edges = append(edges, station.EdgeBus) + } + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *StationMutation) RemovedIDs(name string) []ent.Value { + switch name { + case station.EdgeBus: + ids := make([]ent.Value, 0, len(m.removedbus)) + for id := range m.removedbus { + ids = append(ids, id) + } + return ids + } + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *StationMutation) ClearedEdges() []string { + edges := make([]string, 0, 2) + if m.clearedguardian { + edges = append(edges, station.EdgeGuardian) + } + if m.clearedbus { + edges = append(edges, station.EdgeBus) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *StationMutation) EdgeCleared(name string) bool { + switch name { + case station.EdgeGuardian: + return m.clearedguardian + case station.EdgeBus: + return m.clearedbus + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *StationMutation) ClearEdge(name string) error { + switch name { + case station.EdgeGuardian: + m.ClearGuardian() + return nil + } + return fmt.Errorf("unknown Station unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *StationMutation) ResetEdge(name string) error { + switch name { + case station.EdgeGuardian: + m.ResetGuardian() + return nil + case station.EdgeBus: + m.ResetBus() + return nil + } + return fmt.Errorf("unknown Station edge %s", name) +} diff --git a/backend/domain/repository/ent/nursery.go b/backend/domain/repository/ent/nursery.go new file mode 100644 index 00000000..96ea607d --- /dev/null +++ b/backend/domain/repository/ent/nursery.go @@ -0,0 +1,231 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "strings" + "time" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/google/uuid" +) + +// Nursery is the model entity for the Nursery schema. +type Nursery struct { + config `json:"-"` + // ID of the ent. + ID uuid.UUID `json:"id,omitempty"` + // ユニークな数字(文字列)のコード + NurseryCode string `json:"nursery_code,omitempty"` + // Name holds the value of the "name" field. + Name string `json:"name,omitempty"` + // Address holds the value of the "address" field. + Address string `json:"address,omitempty"` + // PhoneNumber holds the value of the "phone_number" field. + PhoneNumber string `json:"phone_number,omitempty"` + // Email holds the value of the "email" field. + Email string `json:"email,omitempty"` + // CreatedAt holds the value of the "created_at" field. + CreatedAt time.Time `json:"created_at,omitempty"` + // UpdatedAt holds the value of the "updated_at" field. + UpdatedAt time.Time `json:"updated_at,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the NurseryQuery when eager-loading is set. + Edges NurseryEdges `json:"edges"` + selectValues sql.SelectValues +} + +// NurseryEdges holds the relations/edges for other nodes in the graph. +type NurseryEdges struct { + // Children holds the value of the children edge. + Children []*Child `json:"children,omitempty"` + // Guardians holds the value of the guardians edge. + Guardians []*Guardian `json:"guardians,omitempty"` + // Buses holds the value of the buses edge. + Buses []*Bus `json:"buses,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [3]bool +} + +// ChildrenOrErr returns the Children value or an error if the edge +// was not loaded in eager-loading. +func (e NurseryEdges) ChildrenOrErr() ([]*Child, error) { + if e.loadedTypes[0] { + return e.Children, nil + } + return nil, &NotLoadedError{edge: "children"} +} + +// GuardiansOrErr returns the Guardians value or an error if the edge +// was not loaded in eager-loading. +func (e NurseryEdges) GuardiansOrErr() ([]*Guardian, error) { + if e.loadedTypes[1] { + return e.Guardians, nil + } + return nil, &NotLoadedError{edge: "guardians"} +} + +// BusesOrErr returns the Buses value or an error if the edge +// was not loaded in eager-loading. +func (e NurseryEdges) BusesOrErr() ([]*Bus, error) { + if e.loadedTypes[2] { + return e.Buses, nil + } + return nil, &NotLoadedError{edge: "buses"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*Nursery) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case nursery.FieldNurseryCode, nursery.FieldName, nursery.FieldAddress, nursery.FieldPhoneNumber, nursery.FieldEmail: + values[i] = new(sql.NullString) + case nursery.FieldCreatedAt, nursery.FieldUpdatedAt: + values[i] = new(sql.NullTime) + case nursery.FieldID: + values[i] = new(uuid.UUID) + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the Nursery fields. +func (n *Nursery) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case nursery.FieldID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field id", values[i]) + } else if value != nil { + n.ID = *value + } + case nursery.FieldNurseryCode: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field nursery_code", values[i]) + } else if value.Valid { + n.NurseryCode = value.String + } + case nursery.FieldName: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field name", values[i]) + } else if value.Valid { + n.Name = value.String + } + case nursery.FieldAddress: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field address", values[i]) + } else if value.Valid { + n.Address = value.String + } + case nursery.FieldPhoneNumber: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field phone_number", values[i]) + } else if value.Valid { + n.PhoneNumber = value.String + } + case nursery.FieldEmail: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field email", values[i]) + } else if value.Valid { + n.Email = value.String + } + case nursery.FieldCreatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field created_at", values[i]) + } else if value.Valid { + n.CreatedAt = value.Time + } + case nursery.FieldUpdatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field updated_at", values[i]) + } else if value.Valid { + n.UpdatedAt = value.Time + } + default: + n.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the Nursery. +// This includes values selected through modifiers, order, etc. +func (n *Nursery) Value(name string) (ent.Value, error) { + return n.selectValues.Get(name) +} + +// QueryChildren queries the "children" edge of the Nursery entity. +func (n *Nursery) QueryChildren() *ChildQuery { + return NewNurseryClient(n.config).QueryChildren(n) +} + +// QueryGuardians queries the "guardians" edge of the Nursery entity. +func (n *Nursery) QueryGuardians() *GuardianQuery { + return NewNurseryClient(n.config).QueryGuardians(n) +} + +// QueryBuses queries the "buses" edge of the Nursery entity. +func (n *Nursery) QueryBuses() *BusQuery { + return NewNurseryClient(n.config).QueryBuses(n) +} + +// Update returns a builder for updating this Nursery. +// Note that you need to call Nursery.Unwrap() before calling this method if this Nursery +// was returned from a transaction, and the transaction was committed or rolled back. +func (n *Nursery) Update() *NurseryUpdateOne { + return NewNurseryClient(n.config).UpdateOne(n) +} + +// Unwrap unwraps the Nursery entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (n *Nursery) Unwrap() *Nursery { + _tx, ok := n.config.driver.(*txDriver) + if !ok { + panic("ent: Nursery is not a transactional entity") + } + n.config.driver = _tx.drv + return n +} + +// String implements the fmt.Stringer. +func (n *Nursery) String() string { + var builder strings.Builder + builder.WriteString("Nursery(") + builder.WriteString(fmt.Sprintf("id=%v, ", n.ID)) + builder.WriteString("nursery_code=") + builder.WriteString(n.NurseryCode) + builder.WriteString(", ") + builder.WriteString("name=") + builder.WriteString(n.Name) + builder.WriteString(", ") + builder.WriteString("address=") + builder.WriteString(n.Address) + builder.WriteString(", ") + builder.WriteString("phone_number=") + builder.WriteString(n.PhoneNumber) + builder.WriteString(", ") + builder.WriteString("email=") + builder.WriteString(n.Email) + builder.WriteString(", ") + builder.WriteString("created_at=") + builder.WriteString(n.CreatedAt.Format(time.ANSIC)) + builder.WriteString(", ") + builder.WriteString("updated_at=") + builder.WriteString(n.UpdatedAt.Format(time.ANSIC)) + builder.WriteByte(')') + return builder.String() +} + +// Nurseries is a parsable slice of Nursery. +type Nurseries []*Nursery diff --git a/backend/domain/repository/ent/nursery/nursery.go b/backend/domain/repository/ent/nursery/nursery.go new file mode 100644 index 00000000..08173380 --- /dev/null +++ b/backend/domain/repository/ent/nursery/nursery.go @@ -0,0 +1,202 @@ +// Code generated by ent, DO NOT EDIT. + +package nursery + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/google/uuid" +) + +const ( + // Label holds the string label denoting the nursery type in the database. + Label = "nursery" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldNurseryCode holds the string denoting the nursery_code field in the database. + FieldNurseryCode = "nursery_code" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldAddress holds the string denoting the address field in the database. + FieldAddress = "address" + // FieldPhoneNumber holds the string denoting the phone_number field in the database. + FieldPhoneNumber = "phone_number" + // FieldEmail holds the string denoting the email field in the database. + FieldEmail = "email" + // FieldCreatedAt holds the string denoting the created_at field in the database. + FieldCreatedAt = "created_at" + // FieldUpdatedAt holds the string denoting the updated_at field in the database. + FieldUpdatedAt = "updated_at" + // EdgeChildren holds the string denoting the children edge name in mutations. + EdgeChildren = "children" + // EdgeGuardians holds the string denoting the guardians edge name in mutations. + EdgeGuardians = "guardians" + // EdgeBuses holds the string denoting the buses edge name in mutations. + EdgeBuses = "buses" + // Table holds the table name of the nursery in the database. + Table = "nurseries" + // ChildrenTable is the table that holds the children relation/edge. + ChildrenTable = "childs" + // ChildrenInverseTable is the table name for the Child entity. + // It exists in this package in order to avoid circular dependency with the "child" package. + ChildrenInverseTable = "childs" + // ChildrenColumn is the table column denoting the children relation/edge. + ChildrenColumn = "child_nursery" + // GuardiansTable is the table that holds the guardians relation/edge. + GuardiansTable = "guardians" + // GuardiansInverseTable is the table name for the Guardian entity. + // It exists in this package in order to avoid circular dependency with the "guardian" package. + GuardiansInverseTable = "guardians" + // GuardiansColumn is the table column denoting the guardians relation/edge. + GuardiansColumn = "guardian_nursery" + // BusesTable is the table that holds the buses relation/edge. + BusesTable = "bus" + // BusesInverseTable is the table name for the Bus entity. + // It exists in this package in order to avoid circular dependency with the "bus" package. + BusesInverseTable = "bus" + // BusesColumn is the table column denoting the buses relation/edge. + BusesColumn = "bus_nursery" +) + +// Columns holds all SQL columns for nursery fields. +var Columns = []string{ + FieldID, + FieldNurseryCode, + FieldName, + FieldAddress, + FieldPhoneNumber, + FieldEmail, + FieldCreatedAt, + FieldUpdatedAt, +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + return false +} + +var ( + // DefaultNurseryCode holds the default value on creation for the "nursery_code" field. + DefaultNurseryCode func() string + // DefaultCreatedAt holds the default value on creation for the "created_at" field. + DefaultCreatedAt func() time.Time + // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. + DefaultUpdatedAt func() time.Time + // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. + UpdateDefaultUpdatedAt func() time.Time + // DefaultID holds the default value on creation for the "id" field. + DefaultID func() uuid.UUID +) + +// OrderOption defines the ordering options for the Nursery queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByNurseryCode orders the results by the nursery_code field. +func ByNurseryCode(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldNurseryCode, opts...).ToFunc() +} + +// ByName orders the results by the name field. +func ByName(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldName, opts...).ToFunc() +} + +// ByAddress orders the results by the address field. +func ByAddress(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldAddress, opts...).ToFunc() +} + +// ByPhoneNumber orders the results by the phone_number field. +func ByPhoneNumber(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldPhoneNumber, opts...).ToFunc() +} + +// ByEmail orders the results by the email field. +func ByEmail(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEmail, opts...).ToFunc() +} + +// ByCreatedAt orders the results by the created_at field. +func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() +} + +// ByUpdatedAt orders the results by the updated_at field. +func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() +} + +// ByChildrenCount orders the results by children count. +func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newChildrenStep(), opts...) + } +} + +// ByChildren orders the results by children terms. +func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newChildrenStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByGuardiansCount orders the results by guardians count. +func ByGuardiansCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newGuardiansStep(), opts...) + } +} + +// ByGuardians orders the results by guardians terms. +func ByGuardians(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newGuardiansStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByBusesCount orders the results by buses count. +func ByBusesCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newBusesStep(), opts...) + } +} + +// ByBuses orders the results by buses terms. +func ByBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newBusesStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} +func newChildrenStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(ChildrenInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, ChildrenTable, ChildrenColumn), + ) +} +func newGuardiansStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(GuardiansInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, GuardiansTable, GuardiansColumn), + ) +} +func newBusesStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(BusesInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, BusesTable, BusesColumn), + ) +} diff --git a/backend/domain/repository/ent/nursery/where.go b/backend/domain/repository/ent/nursery/where.go new file mode 100644 index 00000000..0a8cbb71 --- /dev/null +++ b/backend/domain/repository/ent/nursery/where.go @@ -0,0 +1,601 @@ +// Code generated by ent, DO NOT EDIT. + +package nursery + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ID filters vertices based on their ID field. +func ID(id uuid.UUID) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id uuid.UUID) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id uuid.UUID) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...uuid.UUID) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...uuid.UUID) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id uuid.UUID) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id uuid.UUID) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id uuid.UUID) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id uuid.UUID) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldID, id)) +} + +// NurseryCode applies equality check predicate on the "nursery_code" field. It's identical to NurseryCodeEQ. +func NurseryCode(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldNurseryCode, v)) +} + +// Name applies equality check predicate on the "name" field. It's identical to NameEQ. +func Name(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldName, v)) +} + +// Address applies equality check predicate on the "address" field. It's identical to AddressEQ. +func Address(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldAddress, v)) +} + +// PhoneNumber applies equality check predicate on the "phone_number" field. It's identical to PhoneNumberEQ. +func PhoneNumber(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldPhoneNumber, v)) +} + +// Email applies equality check predicate on the "email" field. It's identical to EmailEQ. +func Email(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldEmail, v)) +} + +// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. +func CreatedAt(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldCreatedAt, v)) +} + +// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ. +func UpdatedAt(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// NurseryCodeEQ applies the EQ predicate on the "nursery_code" field. +func NurseryCodeEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldNurseryCode, v)) +} + +// NurseryCodeNEQ applies the NEQ predicate on the "nursery_code" field. +func NurseryCodeNEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldNurseryCode, v)) +} + +// NurseryCodeIn applies the In predicate on the "nursery_code" field. +func NurseryCodeIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldNurseryCode, vs...)) +} + +// NurseryCodeNotIn applies the NotIn predicate on the "nursery_code" field. +func NurseryCodeNotIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldNurseryCode, vs...)) +} + +// NurseryCodeGT applies the GT predicate on the "nursery_code" field. +func NurseryCodeGT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldNurseryCode, v)) +} + +// NurseryCodeGTE applies the GTE predicate on the "nursery_code" field. +func NurseryCodeGTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldNurseryCode, v)) +} + +// NurseryCodeLT applies the LT predicate on the "nursery_code" field. +func NurseryCodeLT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldNurseryCode, v)) +} + +// NurseryCodeLTE applies the LTE predicate on the "nursery_code" field. +func NurseryCodeLTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldNurseryCode, v)) +} + +// NurseryCodeContains applies the Contains predicate on the "nursery_code" field. +func NurseryCodeContains(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContains(FieldNurseryCode, v)) +} + +// NurseryCodeHasPrefix applies the HasPrefix predicate on the "nursery_code" field. +func NurseryCodeHasPrefix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasPrefix(FieldNurseryCode, v)) +} + +// NurseryCodeHasSuffix applies the HasSuffix predicate on the "nursery_code" field. +func NurseryCodeHasSuffix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasSuffix(FieldNurseryCode, v)) +} + +// NurseryCodeEqualFold applies the EqualFold predicate on the "nursery_code" field. +func NurseryCodeEqualFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEqualFold(FieldNurseryCode, v)) +} + +// NurseryCodeContainsFold applies the ContainsFold predicate on the "nursery_code" field. +func NurseryCodeContainsFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContainsFold(FieldNurseryCode, v)) +} + +// NameEQ applies the EQ predicate on the "name" field. +func NameEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldName, v)) +} + +// NameNEQ applies the NEQ predicate on the "name" field. +func NameNEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldName, v)) +} + +// NameIn applies the In predicate on the "name" field. +func NameIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldName, vs...)) +} + +// NameNotIn applies the NotIn predicate on the "name" field. +func NameNotIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldName, vs...)) +} + +// NameGT applies the GT predicate on the "name" field. +func NameGT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldName, v)) +} + +// NameGTE applies the GTE predicate on the "name" field. +func NameGTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldName, v)) +} + +// NameLT applies the LT predicate on the "name" field. +func NameLT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldName, v)) +} + +// NameLTE applies the LTE predicate on the "name" field. +func NameLTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldName, v)) +} + +// NameContains applies the Contains predicate on the "name" field. +func NameContains(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContains(FieldName, v)) +} + +// NameHasPrefix applies the HasPrefix predicate on the "name" field. +func NameHasPrefix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasPrefix(FieldName, v)) +} + +// NameHasSuffix applies the HasSuffix predicate on the "name" field. +func NameHasSuffix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasSuffix(FieldName, v)) +} + +// NameEqualFold applies the EqualFold predicate on the "name" field. +func NameEqualFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEqualFold(FieldName, v)) +} + +// NameContainsFold applies the ContainsFold predicate on the "name" field. +func NameContainsFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContainsFold(FieldName, v)) +} + +// AddressEQ applies the EQ predicate on the "address" field. +func AddressEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldAddress, v)) +} + +// AddressNEQ applies the NEQ predicate on the "address" field. +func AddressNEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldAddress, v)) +} + +// AddressIn applies the In predicate on the "address" field. +func AddressIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldAddress, vs...)) +} + +// AddressNotIn applies the NotIn predicate on the "address" field. +func AddressNotIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldAddress, vs...)) +} + +// AddressGT applies the GT predicate on the "address" field. +func AddressGT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldAddress, v)) +} + +// AddressGTE applies the GTE predicate on the "address" field. +func AddressGTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldAddress, v)) +} + +// AddressLT applies the LT predicate on the "address" field. +func AddressLT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldAddress, v)) +} + +// AddressLTE applies the LTE predicate on the "address" field. +func AddressLTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldAddress, v)) +} + +// AddressContains applies the Contains predicate on the "address" field. +func AddressContains(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContains(FieldAddress, v)) +} + +// AddressHasPrefix applies the HasPrefix predicate on the "address" field. +func AddressHasPrefix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasPrefix(FieldAddress, v)) +} + +// AddressHasSuffix applies the HasSuffix predicate on the "address" field. +func AddressHasSuffix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasSuffix(FieldAddress, v)) +} + +// AddressEqualFold applies the EqualFold predicate on the "address" field. +func AddressEqualFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEqualFold(FieldAddress, v)) +} + +// AddressContainsFold applies the ContainsFold predicate on the "address" field. +func AddressContainsFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContainsFold(FieldAddress, v)) +} + +// PhoneNumberEQ applies the EQ predicate on the "phone_number" field. +func PhoneNumberEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldPhoneNumber, v)) +} + +// PhoneNumberNEQ applies the NEQ predicate on the "phone_number" field. +func PhoneNumberNEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldPhoneNumber, v)) +} + +// PhoneNumberIn applies the In predicate on the "phone_number" field. +func PhoneNumberIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldPhoneNumber, vs...)) +} + +// PhoneNumberNotIn applies the NotIn predicate on the "phone_number" field. +func PhoneNumberNotIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldPhoneNumber, vs...)) +} + +// PhoneNumberGT applies the GT predicate on the "phone_number" field. +func PhoneNumberGT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldPhoneNumber, v)) +} + +// PhoneNumberGTE applies the GTE predicate on the "phone_number" field. +func PhoneNumberGTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldPhoneNumber, v)) +} + +// PhoneNumberLT applies the LT predicate on the "phone_number" field. +func PhoneNumberLT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldPhoneNumber, v)) +} + +// PhoneNumberLTE applies the LTE predicate on the "phone_number" field. +func PhoneNumberLTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldPhoneNumber, v)) +} + +// PhoneNumberContains applies the Contains predicate on the "phone_number" field. +func PhoneNumberContains(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContains(FieldPhoneNumber, v)) +} + +// PhoneNumberHasPrefix applies the HasPrefix predicate on the "phone_number" field. +func PhoneNumberHasPrefix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasPrefix(FieldPhoneNumber, v)) +} + +// PhoneNumberHasSuffix applies the HasSuffix predicate on the "phone_number" field. +func PhoneNumberHasSuffix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasSuffix(FieldPhoneNumber, v)) +} + +// PhoneNumberIsNil applies the IsNil predicate on the "phone_number" field. +func PhoneNumberIsNil() predicate.Nursery { + return predicate.Nursery(sql.FieldIsNull(FieldPhoneNumber)) +} + +// PhoneNumberNotNil applies the NotNil predicate on the "phone_number" field. +func PhoneNumberNotNil() predicate.Nursery { + return predicate.Nursery(sql.FieldNotNull(FieldPhoneNumber)) +} + +// PhoneNumberEqualFold applies the EqualFold predicate on the "phone_number" field. +func PhoneNumberEqualFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEqualFold(FieldPhoneNumber, v)) +} + +// PhoneNumberContainsFold applies the ContainsFold predicate on the "phone_number" field. +func PhoneNumberContainsFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContainsFold(FieldPhoneNumber, v)) +} + +// EmailEQ applies the EQ predicate on the "email" field. +func EmailEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldEmail, v)) +} + +// EmailNEQ applies the NEQ predicate on the "email" field. +func EmailNEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldEmail, v)) +} + +// EmailIn applies the In predicate on the "email" field. +func EmailIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldEmail, vs...)) +} + +// EmailNotIn applies the NotIn predicate on the "email" field. +func EmailNotIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldEmail, vs...)) +} + +// EmailGT applies the GT predicate on the "email" field. +func EmailGT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldEmail, v)) +} + +// EmailGTE applies the GTE predicate on the "email" field. +func EmailGTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldEmail, v)) +} + +// EmailLT applies the LT predicate on the "email" field. +func EmailLT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldEmail, v)) +} + +// EmailLTE applies the LTE predicate on the "email" field. +func EmailLTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldEmail, v)) +} + +// EmailContains applies the Contains predicate on the "email" field. +func EmailContains(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContains(FieldEmail, v)) +} + +// EmailHasPrefix applies the HasPrefix predicate on the "email" field. +func EmailHasPrefix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasPrefix(FieldEmail, v)) +} + +// EmailHasSuffix applies the HasSuffix predicate on the "email" field. +func EmailHasSuffix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasSuffix(FieldEmail, v)) +} + +// EmailIsNil applies the IsNil predicate on the "email" field. +func EmailIsNil() predicate.Nursery { + return predicate.Nursery(sql.FieldIsNull(FieldEmail)) +} + +// EmailNotNil applies the NotNil predicate on the "email" field. +func EmailNotNil() predicate.Nursery { + return predicate.Nursery(sql.FieldNotNull(FieldEmail)) +} + +// EmailEqualFold applies the EqualFold predicate on the "email" field. +func EmailEqualFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEqualFold(FieldEmail, v)) +} + +// EmailContainsFold applies the ContainsFold predicate on the "email" field. +func EmailContainsFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContainsFold(FieldEmail, v)) +} + +// CreatedAtEQ applies the EQ predicate on the "created_at" field. +func CreatedAtEQ(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldCreatedAt, v)) +} + +// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. +func CreatedAtNEQ(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldCreatedAt, v)) +} + +// CreatedAtIn applies the In predicate on the "created_at" field. +func CreatedAtIn(vs ...time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldCreatedAt, vs...)) +} + +// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. +func CreatedAtNotIn(vs ...time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldCreatedAt, vs...)) +} + +// CreatedAtGT applies the GT predicate on the "created_at" field. +func CreatedAtGT(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldCreatedAt, v)) +} + +// CreatedAtGTE applies the GTE predicate on the "created_at" field. +func CreatedAtGTE(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldCreatedAt, v)) +} + +// CreatedAtLT applies the LT predicate on the "created_at" field. +func CreatedAtLT(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldCreatedAt, v)) +} + +// CreatedAtLTE applies the LTE predicate on the "created_at" field. +func CreatedAtLTE(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldCreatedAt, v)) +} + +// UpdatedAtEQ applies the EQ predicate on the "updated_at" field. +func UpdatedAtEQ(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field. +func UpdatedAtNEQ(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtIn applies the In predicate on the "updated_at" field. +func UpdatedAtIn(vs ...time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field. +func UpdatedAtNotIn(vs ...time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtGT applies the GT predicate on the "updated_at" field. +func UpdatedAtGT(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldUpdatedAt, v)) +} + +// UpdatedAtGTE applies the GTE predicate on the "updated_at" field. +func UpdatedAtGTE(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldUpdatedAt, v)) +} + +// UpdatedAtLT applies the LT predicate on the "updated_at" field. +func UpdatedAtLT(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldUpdatedAt, v)) +} + +// UpdatedAtLTE applies the LTE predicate on the "updated_at" field. +func UpdatedAtLTE(v time.Time) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldUpdatedAt, v)) +} + +// HasChildren applies the HasEdge predicate on the "children" edge. +func HasChildren() predicate.Nursery { + return predicate.Nursery(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, ChildrenTable, ChildrenColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates). +func HasChildrenWith(preds ...predicate.Child) predicate.Nursery { + return predicate.Nursery(func(s *sql.Selector) { + step := newChildrenStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasGuardians applies the HasEdge predicate on the "guardians" edge. +func HasGuardians() predicate.Nursery { + return predicate.Nursery(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, GuardiansTable, GuardiansColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasGuardiansWith applies the HasEdge predicate on the "guardians" edge with a given conditions (other predicates). +func HasGuardiansWith(preds ...predicate.Guardian) predicate.Nursery { + return predicate.Nursery(func(s *sql.Selector) { + step := newGuardiansStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasBuses applies the HasEdge predicate on the "buses" edge. +func HasBuses() predicate.Nursery { + return predicate.Nursery(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, BusesTable, BusesColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasBusesWith applies the HasEdge predicate on the "buses" edge with a given conditions (other predicates). +func HasBusesWith(preds ...predicate.Bus) predicate.Nursery { + return predicate.Nursery(func(s *sql.Selector) { + step := newBusesStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.Nursery) predicate.Nursery { + return predicate.Nursery(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.Nursery) predicate.Nursery { + return predicate.Nursery(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.Nursery) predicate.Nursery { + return predicate.Nursery(sql.NotPredicates(p)) +} diff --git a/backend/domain/repository/ent/nursery_create.go b/backend/domain/repository/ent/nursery_create.go new file mode 100644 index 00000000..cc6c4d47 --- /dev/null +++ b/backend/domain/repository/ent/nursery_create.go @@ -0,0 +1,434 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/google/uuid" +) + +// NurseryCreate is the builder for creating a Nursery entity. +type NurseryCreate struct { + config + mutation *NurseryMutation + hooks []Hook +} + +// SetNurseryCode sets the "nursery_code" field. +func (nc *NurseryCreate) SetNurseryCode(s string) *NurseryCreate { + nc.mutation.SetNurseryCode(s) + return nc +} + +// SetNillableNurseryCode sets the "nursery_code" field if the given value is not nil. +func (nc *NurseryCreate) SetNillableNurseryCode(s *string) *NurseryCreate { + if s != nil { + nc.SetNurseryCode(*s) + } + return nc +} + +// SetName sets the "name" field. +func (nc *NurseryCreate) SetName(s string) *NurseryCreate { + nc.mutation.SetName(s) + return nc +} + +// SetAddress sets the "address" field. +func (nc *NurseryCreate) SetAddress(s string) *NurseryCreate { + nc.mutation.SetAddress(s) + return nc +} + +// SetPhoneNumber sets the "phone_number" field. +func (nc *NurseryCreate) SetPhoneNumber(s string) *NurseryCreate { + nc.mutation.SetPhoneNumber(s) + return nc +} + +// SetNillablePhoneNumber sets the "phone_number" field if the given value is not nil. +func (nc *NurseryCreate) SetNillablePhoneNumber(s *string) *NurseryCreate { + if s != nil { + nc.SetPhoneNumber(*s) + } + return nc +} + +// SetEmail sets the "email" field. +func (nc *NurseryCreate) SetEmail(s string) *NurseryCreate { + nc.mutation.SetEmail(s) + return nc +} + +// SetNillableEmail sets the "email" field if the given value is not nil. +func (nc *NurseryCreate) SetNillableEmail(s *string) *NurseryCreate { + if s != nil { + nc.SetEmail(*s) + } + return nc +} + +// SetCreatedAt sets the "created_at" field. +func (nc *NurseryCreate) SetCreatedAt(t time.Time) *NurseryCreate { + nc.mutation.SetCreatedAt(t) + return nc +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (nc *NurseryCreate) SetNillableCreatedAt(t *time.Time) *NurseryCreate { + if t != nil { + nc.SetCreatedAt(*t) + } + return nc +} + +// SetUpdatedAt sets the "updated_at" field. +func (nc *NurseryCreate) SetUpdatedAt(t time.Time) *NurseryCreate { + nc.mutation.SetUpdatedAt(t) + return nc +} + +// SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil. +func (nc *NurseryCreate) SetNillableUpdatedAt(t *time.Time) *NurseryCreate { + if t != nil { + nc.SetUpdatedAt(*t) + } + return nc +} + +// SetID sets the "id" field. +func (nc *NurseryCreate) SetID(u uuid.UUID) *NurseryCreate { + nc.mutation.SetID(u) + return nc +} + +// SetNillableID sets the "id" field if the given value is not nil. +func (nc *NurseryCreate) SetNillableID(u *uuid.UUID) *NurseryCreate { + if u != nil { + nc.SetID(*u) + } + return nc +} + +// AddChildIDs adds the "children" edge to the Child entity by IDs. +func (nc *NurseryCreate) AddChildIDs(ids ...uuid.UUID) *NurseryCreate { + nc.mutation.AddChildIDs(ids...) + return nc +} + +// AddChildren adds the "children" edges to the Child entity. +func (nc *NurseryCreate) AddChildren(c ...*Child) *NurseryCreate { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return nc.AddChildIDs(ids...) +} + +// AddGuardianIDs adds the "guardians" edge to the Guardian entity by IDs. +func (nc *NurseryCreate) AddGuardianIDs(ids ...uuid.UUID) *NurseryCreate { + nc.mutation.AddGuardianIDs(ids...) + return nc +} + +// AddGuardians adds the "guardians" edges to the Guardian entity. +func (nc *NurseryCreate) AddGuardians(g ...*Guardian) *NurseryCreate { + ids := make([]uuid.UUID, len(g)) + for i := range g { + ids[i] = g[i].ID + } + return nc.AddGuardianIDs(ids...) +} + +// AddBusIDs adds the "buses" edge to the Bus entity by IDs. +func (nc *NurseryCreate) AddBusIDs(ids ...uuid.UUID) *NurseryCreate { + nc.mutation.AddBusIDs(ids...) + return nc +} + +// AddBuses adds the "buses" edges to the Bus entity. +func (nc *NurseryCreate) AddBuses(b ...*Bus) *NurseryCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return nc.AddBusIDs(ids...) +} + +// Mutation returns the NurseryMutation object of the builder. +func (nc *NurseryCreate) Mutation() *NurseryMutation { + return nc.mutation +} + +// Save creates the Nursery in the database. +func (nc *NurseryCreate) Save(ctx context.Context) (*Nursery, error) { + nc.defaults() + return withHooks(ctx, nc.sqlSave, nc.mutation, nc.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (nc *NurseryCreate) SaveX(ctx context.Context) *Nursery { + v, err := nc.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (nc *NurseryCreate) Exec(ctx context.Context) error { + _, err := nc.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (nc *NurseryCreate) ExecX(ctx context.Context) { + if err := nc.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (nc *NurseryCreate) defaults() { + if _, ok := nc.mutation.NurseryCode(); !ok { + v := nursery.DefaultNurseryCode() + nc.mutation.SetNurseryCode(v) + } + if _, ok := nc.mutation.CreatedAt(); !ok { + v := nursery.DefaultCreatedAt() + nc.mutation.SetCreatedAt(v) + } + if _, ok := nc.mutation.UpdatedAt(); !ok { + v := nursery.DefaultUpdatedAt() + nc.mutation.SetUpdatedAt(v) + } + if _, ok := nc.mutation.ID(); !ok { + v := nursery.DefaultID() + nc.mutation.SetID(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (nc *NurseryCreate) check() error { + if _, ok := nc.mutation.NurseryCode(); !ok { + return &ValidationError{Name: "nursery_code", err: errors.New(`ent: missing required field "Nursery.nursery_code"`)} + } + if _, ok := nc.mutation.Name(); !ok { + return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Nursery.name"`)} + } + if _, ok := nc.mutation.Address(); !ok { + return &ValidationError{Name: "address", err: errors.New(`ent: missing required field "Nursery.address"`)} + } + if _, ok := nc.mutation.CreatedAt(); !ok { + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Nursery.created_at"`)} + } + if _, ok := nc.mutation.UpdatedAt(); !ok { + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "Nursery.updated_at"`)} + } + return nil +} + +func (nc *NurseryCreate) sqlSave(ctx context.Context) (*Nursery, error) { + if err := nc.check(); err != nil { + return nil, err + } + _node, _spec := nc.createSpec() + if err := sqlgraph.CreateNode(ctx, nc.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + if _spec.ID.Value != nil { + if id, ok := _spec.ID.Value.(*uuid.UUID); ok { + _node.ID = *id + } else if err := _node.ID.Scan(_spec.ID.Value); err != nil { + return nil, err + } + } + nc.mutation.id = &_node.ID + nc.mutation.done = true + return _node, nil +} + +func (nc *NurseryCreate) createSpec() (*Nursery, *sqlgraph.CreateSpec) { + var ( + _node = &Nursery{config: nc.config} + _spec = sqlgraph.NewCreateSpec(nursery.Table, sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID)) + ) + if id, ok := nc.mutation.ID(); ok { + _node.ID = id + _spec.ID.Value = &id + } + if value, ok := nc.mutation.NurseryCode(); ok { + _spec.SetField(nursery.FieldNurseryCode, field.TypeString, value) + _node.NurseryCode = value + } + if value, ok := nc.mutation.Name(); ok { + _spec.SetField(nursery.FieldName, field.TypeString, value) + _node.Name = value + } + if value, ok := nc.mutation.Address(); ok { + _spec.SetField(nursery.FieldAddress, field.TypeString, value) + _node.Address = value + } + if value, ok := nc.mutation.PhoneNumber(); ok { + _spec.SetField(nursery.FieldPhoneNumber, field.TypeString, value) + _node.PhoneNumber = value + } + if value, ok := nc.mutation.Email(); ok { + _spec.SetField(nursery.FieldEmail, field.TypeString, value) + _node.Email = value + } + if value, ok := nc.mutation.CreatedAt(); ok { + _spec.SetField(nursery.FieldCreatedAt, field.TypeTime, value) + _node.CreatedAt = value + } + if value, ok := nc.mutation.UpdatedAt(); ok { + _spec.SetField(nursery.FieldUpdatedAt, field.TypeTime, value) + _node.UpdatedAt = value + } + if nodes := nc.mutation.ChildrenIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.ChildrenTable, + Columns: []string{nursery.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := nc.mutation.GuardiansIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.GuardiansTable, + Columns: []string{nursery.GuardiansColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := nc.mutation.BusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.BusesTable, + Columns: []string{nursery.BusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// NurseryCreateBulk is the builder for creating many Nursery entities in bulk. +type NurseryCreateBulk struct { + config + err error + builders []*NurseryCreate +} + +// Save creates the Nursery entities in the database. +func (ncb *NurseryCreateBulk) Save(ctx context.Context) ([]*Nursery, error) { + if ncb.err != nil { + return nil, ncb.err + } + specs := make([]*sqlgraph.CreateSpec, len(ncb.builders)) + nodes := make([]*Nursery, len(ncb.builders)) + mutators := make([]Mutator, len(ncb.builders)) + for i := range ncb.builders { + func(i int, root context.Context) { + builder := ncb.builders[i] + builder.defaults() + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*NurseryMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, ncb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, ncb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, ncb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (ncb *NurseryCreateBulk) SaveX(ctx context.Context) []*Nursery { + v, err := ncb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (ncb *NurseryCreateBulk) Exec(ctx context.Context) error { + _, err := ncb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (ncb *NurseryCreateBulk) ExecX(ctx context.Context) { + if err := ncb.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/nursery_delete.go b/backend/domain/repository/ent/nursery_delete.go new file mode 100644 index 00000000..94dbbd3f --- /dev/null +++ b/backend/domain/repository/ent/nursery_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" +) + +// NurseryDelete is the builder for deleting a Nursery entity. +type NurseryDelete struct { + config + hooks []Hook + mutation *NurseryMutation +} + +// Where appends a list predicates to the NurseryDelete builder. +func (nd *NurseryDelete) Where(ps ...predicate.Nursery) *NurseryDelete { + nd.mutation.Where(ps...) + return nd +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (nd *NurseryDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, nd.sqlExec, nd.mutation, nd.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (nd *NurseryDelete) ExecX(ctx context.Context) int { + n, err := nd.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (nd *NurseryDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(nursery.Table, sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID)) + if ps := nd.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, nd.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + nd.mutation.done = true + return affected, err +} + +// NurseryDeleteOne is the builder for deleting a single Nursery entity. +type NurseryDeleteOne struct { + nd *NurseryDelete +} + +// Where appends a list predicates to the NurseryDelete builder. +func (ndo *NurseryDeleteOne) Where(ps ...predicate.Nursery) *NurseryDeleteOne { + ndo.nd.mutation.Where(ps...) + return ndo +} + +// Exec executes the deletion query. +func (ndo *NurseryDeleteOne) Exec(ctx context.Context) error { + n, err := ndo.nd.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{nursery.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (ndo *NurseryDeleteOne) ExecX(ctx context.Context) { + if err := ndo.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/nursery_query.go b/backend/domain/repository/ent/nursery_query.go new file mode 100644 index 00000000..b83b97cf --- /dev/null +++ b/backend/domain/repository/ent/nursery_query.go @@ -0,0 +1,757 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "database/sql/driver" + "fmt" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// NurseryQuery is the builder for querying Nursery entities. +type NurseryQuery struct { + config + ctx *QueryContext + order []nursery.OrderOption + inters []Interceptor + predicates []predicate.Nursery + withChildren *ChildQuery + withGuardians *GuardianQuery + withBuses *BusQuery + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the NurseryQuery builder. +func (nq *NurseryQuery) Where(ps ...predicate.Nursery) *NurseryQuery { + nq.predicates = append(nq.predicates, ps...) + return nq +} + +// Limit the number of records to be returned by this query. +func (nq *NurseryQuery) Limit(limit int) *NurseryQuery { + nq.ctx.Limit = &limit + return nq +} + +// Offset to start from. +func (nq *NurseryQuery) Offset(offset int) *NurseryQuery { + nq.ctx.Offset = &offset + return nq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (nq *NurseryQuery) Unique(unique bool) *NurseryQuery { + nq.ctx.Unique = &unique + return nq +} + +// Order specifies how the records should be ordered. +func (nq *NurseryQuery) Order(o ...nursery.OrderOption) *NurseryQuery { + nq.order = append(nq.order, o...) + return nq +} + +// QueryChildren chains the current query on the "children" edge. +func (nq *NurseryQuery) QueryChildren() *ChildQuery { + query := (&ChildClient{config: nq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := nq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := nq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(nursery.Table, nursery.FieldID, selector), + sqlgraph.To(child.Table, child.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, nursery.ChildrenTable, nursery.ChildrenColumn), + ) + fromU = sqlgraph.SetNeighbors(nq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryGuardians chains the current query on the "guardians" edge. +func (nq *NurseryQuery) QueryGuardians() *GuardianQuery { + query := (&GuardianClient{config: nq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := nq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := nq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(nursery.Table, nursery.FieldID, selector), + sqlgraph.To(guardian.Table, guardian.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, nursery.GuardiansTable, nursery.GuardiansColumn), + ) + fromU = sqlgraph.SetNeighbors(nq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryBuses chains the current query on the "buses" edge. +func (nq *NurseryQuery) QueryBuses() *BusQuery { + query := (&BusClient{config: nq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := nq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := nq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(nursery.Table, nursery.FieldID, selector), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, nursery.BusesTable, nursery.BusesColumn), + ) + fromU = sqlgraph.SetNeighbors(nq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first Nursery entity from the query. +// Returns a *NotFoundError when no Nursery was found. +func (nq *NurseryQuery) First(ctx context.Context) (*Nursery, error) { + nodes, err := nq.Limit(1).All(setContextOp(ctx, nq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{nursery.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (nq *NurseryQuery) FirstX(ctx context.Context) *Nursery { + node, err := nq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first Nursery ID from the query. +// Returns a *NotFoundError when no Nursery ID was found. +func (nq *NurseryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = nq.Limit(1).IDs(setContextOp(ctx, nq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{nursery.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (nq *NurseryQuery) FirstIDX(ctx context.Context) uuid.UUID { + id, err := nq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single Nursery entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one Nursery entity is found. +// Returns a *NotFoundError when no Nursery entities are found. +func (nq *NurseryQuery) Only(ctx context.Context) (*Nursery, error) { + nodes, err := nq.Limit(2).All(setContextOp(ctx, nq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{nursery.Label} + default: + return nil, &NotSingularError{nursery.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (nq *NurseryQuery) OnlyX(ctx context.Context) *Nursery { + node, err := nq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only Nursery ID in the query. +// Returns a *NotSingularError when more than one Nursery ID is found. +// Returns a *NotFoundError when no entities are found. +func (nq *NurseryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = nq.Limit(2).IDs(setContextOp(ctx, nq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{nursery.Label} + default: + err = &NotSingularError{nursery.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (nq *NurseryQuery) OnlyIDX(ctx context.Context) uuid.UUID { + id, err := nq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of Nurseries. +func (nq *NurseryQuery) All(ctx context.Context) ([]*Nursery, error) { + ctx = setContextOp(ctx, nq.ctx, "All") + if err := nq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*Nursery, *NurseryQuery]() + return withInterceptors[[]*Nursery](ctx, nq, qr, nq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (nq *NurseryQuery) AllX(ctx context.Context) []*Nursery { + nodes, err := nq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of Nursery IDs. +func (nq *NurseryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error) { + if nq.ctx.Unique == nil && nq.path != nil { + nq.Unique(true) + } + ctx = setContextOp(ctx, nq.ctx, "IDs") + if err = nq.Select(nursery.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (nq *NurseryQuery) IDsX(ctx context.Context) []uuid.UUID { + ids, err := nq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (nq *NurseryQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, nq.ctx, "Count") + if err := nq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, nq, querierCount[*NurseryQuery](), nq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (nq *NurseryQuery) CountX(ctx context.Context) int { + count, err := nq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (nq *NurseryQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, nq.ctx, "Exist") + switch _, err := nq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (nq *NurseryQuery) ExistX(ctx context.Context) bool { + exist, err := nq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the NurseryQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (nq *NurseryQuery) Clone() *NurseryQuery { + if nq == nil { + return nil + } + return &NurseryQuery{ + config: nq.config, + ctx: nq.ctx.Clone(), + order: append([]nursery.OrderOption{}, nq.order...), + inters: append([]Interceptor{}, nq.inters...), + predicates: append([]predicate.Nursery{}, nq.predicates...), + withChildren: nq.withChildren.Clone(), + withGuardians: nq.withGuardians.Clone(), + withBuses: nq.withBuses.Clone(), + // clone intermediate query. + sql: nq.sql.Clone(), + path: nq.path, + } +} + +// WithChildren tells the query-builder to eager-load the nodes that are connected to +// the "children" edge. The optional arguments are used to configure the query builder of the edge. +func (nq *NurseryQuery) WithChildren(opts ...func(*ChildQuery)) *NurseryQuery { + query := (&ChildClient{config: nq.config}).Query() + for _, opt := range opts { + opt(query) + } + nq.withChildren = query + return nq +} + +// WithGuardians tells the query-builder to eager-load the nodes that are connected to +// the "guardians" edge. The optional arguments are used to configure the query builder of the edge. +func (nq *NurseryQuery) WithGuardians(opts ...func(*GuardianQuery)) *NurseryQuery { + query := (&GuardianClient{config: nq.config}).Query() + for _, opt := range opts { + opt(query) + } + nq.withGuardians = query + return nq +} + +// WithBuses tells the query-builder to eager-load the nodes that are connected to +// the "buses" edge. The optional arguments are used to configure the query builder of the edge. +func (nq *NurseryQuery) WithBuses(opts ...func(*BusQuery)) *NurseryQuery { + query := (&BusClient{config: nq.config}).Query() + for _, opt := range opts { + opt(query) + } + nq.withBuses = query + return nq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// NurseryCode string `json:"nursery_code,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.Nursery.Query(). +// GroupBy(nursery.FieldNurseryCode). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (nq *NurseryQuery) GroupBy(field string, fields ...string) *NurseryGroupBy { + nq.ctx.Fields = append([]string{field}, fields...) + grbuild := &NurseryGroupBy{build: nq} + grbuild.flds = &nq.ctx.Fields + grbuild.label = nursery.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// NurseryCode string `json:"nursery_code,omitempty"` +// } +// +// client.Nursery.Query(). +// Select(nursery.FieldNurseryCode). +// Scan(ctx, &v) +func (nq *NurseryQuery) Select(fields ...string) *NurserySelect { + nq.ctx.Fields = append(nq.ctx.Fields, fields...) + sbuild := &NurserySelect{NurseryQuery: nq} + sbuild.label = nursery.Label + sbuild.flds, sbuild.scan = &nq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a NurserySelect configured with the given aggregations. +func (nq *NurseryQuery) Aggregate(fns ...AggregateFunc) *NurserySelect { + return nq.Select().Aggregate(fns...) +} + +func (nq *NurseryQuery) prepareQuery(ctx context.Context) error { + for _, inter := range nq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, nq); err != nil { + return err + } + } + } + for _, f := range nq.ctx.Fields { + if !nursery.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if nq.path != nil { + prev, err := nq.path(ctx) + if err != nil { + return err + } + nq.sql = prev + } + return nil +} + +func (nq *NurseryQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Nursery, error) { + var ( + nodes = []*Nursery{} + _spec = nq.querySpec() + loadedTypes = [3]bool{ + nq.withChildren != nil, + nq.withGuardians != nil, + nq.withBuses != nil, + } + ) + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*Nursery).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &Nursery{config: nq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, nq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := nq.withChildren; query != nil { + if err := nq.loadChildren(ctx, query, nodes, + func(n *Nursery) { n.Edges.Children = []*Child{} }, + func(n *Nursery, e *Child) { n.Edges.Children = append(n.Edges.Children, e) }); err != nil { + return nil, err + } + } + if query := nq.withGuardians; query != nil { + if err := nq.loadGuardians(ctx, query, nodes, + func(n *Nursery) { n.Edges.Guardians = []*Guardian{} }, + func(n *Nursery, e *Guardian) { n.Edges.Guardians = append(n.Edges.Guardians, e) }); err != nil { + return nil, err + } + } + if query := nq.withBuses; query != nil { + if err := nq.loadBuses(ctx, query, nodes, + func(n *Nursery) { n.Edges.Buses = []*Bus{} }, + func(n *Nursery, e *Bus) { n.Edges.Buses = append(n.Edges.Buses, e) }); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (nq *NurseryQuery) loadChildren(ctx context.Context, query *ChildQuery, nodes []*Nursery, init func(*Nursery), assign func(*Nursery, *Child)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Nursery) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Child(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(nursery.ChildrenColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.child_nursery + if fk == nil { + return fmt.Errorf(`foreign-key "child_nursery" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "child_nursery" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} +func (nq *NurseryQuery) loadGuardians(ctx context.Context, query *GuardianQuery, nodes []*Nursery, init func(*Nursery), assign func(*Nursery, *Guardian)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Nursery) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Guardian(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(nursery.GuardiansColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.guardian_nursery + if fk == nil { + return fmt.Errorf(`foreign-key "guardian_nursery" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "guardian_nursery" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} +func (nq *NurseryQuery) loadBuses(ctx context.Context, query *BusQuery, nodes []*Nursery, init func(*Nursery), assign func(*Nursery, *Bus)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Nursery) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Bus(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(nursery.BusesColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.bus_nursery + if fk == nil { + return fmt.Errorf(`foreign-key "bus_nursery" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "bus_nursery" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} + +func (nq *NurseryQuery) sqlCount(ctx context.Context) (int, error) { + _spec := nq.querySpec() + _spec.Node.Columns = nq.ctx.Fields + if len(nq.ctx.Fields) > 0 { + _spec.Unique = nq.ctx.Unique != nil && *nq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, nq.driver, _spec) +} + +func (nq *NurseryQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(nursery.Table, nursery.Columns, sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID)) + _spec.From = nq.sql + if unique := nq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if nq.path != nil { + _spec.Unique = true + } + if fields := nq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, nursery.FieldID) + for i := range fields { + if fields[i] != nursery.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + } + if ps := nq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := nq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := nq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := nq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (nq *NurseryQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(nq.driver.Dialect()) + t1 := builder.Table(nursery.Table) + columns := nq.ctx.Fields + if len(columns) == 0 { + columns = nursery.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if nq.sql != nil { + selector = nq.sql + selector.Select(selector.Columns(columns...)...) + } + if nq.ctx.Unique != nil && *nq.ctx.Unique { + selector.Distinct() + } + for _, p := range nq.predicates { + p(selector) + } + for _, p := range nq.order { + p(selector) + } + if offset := nq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := nq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// NurseryGroupBy is the group-by builder for Nursery entities. +type NurseryGroupBy struct { + selector + build *NurseryQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (ngb *NurseryGroupBy) Aggregate(fns ...AggregateFunc) *NurseryGroupBy { + ngb.fns = append(ngb.fns, fns...) + return ngb +} + +// Scan applies the selector query and scans the result into the given value. +func (ngb *NurseryGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, ngb.build.ctx, "GroupBy") + if err := ngb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*NurseryQuery, *NurseryGroupBy](ctx, ngb.build, ngb, ngb.build.inters, v) +} + +func (ngb *NurseryGroupBy) sqlScan(ctx context.Context, root *NurseryQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(ngb.fns)) + for _, fn := range ngb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*ngb.flds)+len(ngb.fns)) + for _, f := range *ngb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*ngb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := ngb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// NurserySelect is the builder for selecting fields of Nursery entities. +type NurserySelect struct { + *NurseryQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (ns *NurserySelect) Aggregate(fns ...AggregateFunc) *NurserySelect { + ns.fns = append(ns.fns, fns...) + return ns +} + +// Scan applies the selector query and scans the result into the given value. +func (ns *NurserySelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, ns.ctx, "Select") + if err := ns.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*NurseryQuery, *NurserySelect](ctx, ns.NurseryQuery, ns, ns.inters, v) +} + +func (ns *NurserySelect) sqlScan(ctx context.Context, root *NurseryQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(ns.fns)) + for _, fn := range ns.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*ns.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := ns.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/backend/domain/repository/ent/nursery_update.go b/backend/domain/repository/ent/nursery_update.go new file mode 100644 index 00000000..bab98a44 --- /dev/null +++ b/backend/domain/repository/ent/nursery_update.go @@ -0,0 +1,942 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// NurseryUpdate is the builder for updating Nursery entities. +type NurseryUpdate struct { + config + hooks []Hook + mutation *NurseryMutation +} + +// Where appends a list predicates to the NurseryUpdate builder. +func (nu *NurseryUpdate) Where(ps ...predicate.Nursery) *NurseryUpdate { + nu.mutation.Where(ps...) + return nu +} + +// SetNurseryCode sets the "nursery_code" field. +func (nu *NurseryUpdate) SetNurseryCode(s string) *NurseryUpdate { + nu.mutation.SetNurseryCode(s) + return nu +} + +// SetNillableNurseryCode sets the "nursery_code" field if the given value is not nil. +func (nu *NurseryUpdate) SetNillableNurseryCode(s *string) *NurseryUpdate { + if s != nil { + nu.SetNurseryCode(*s) + } + return nu +} + +// SetName sets the "name" field. +func (nu *NurseryUpdate) SetName(s string) *NurseryUpdate { + nu.mutation.SetName(s) + return nu +} + +// SetNillableName sets the "name" field if the given value is not nil. +func (nu *NurseryUpdate) SetNillableName(s *string) *NurseryUpdate { + if s != nil { + nu.SetName(*s) + } + return nu +} + +// SetAddress sets the "address" field. +func (nu *NurseryUpdate) SetAddress(s string) *NurseryUpdate { + nu.mutation.SetAddress(s) + return nu +} + +// SetNillableAddress sets the "address" field if the given value is not nil. +func (nu *NurseryUpdate) SetNillableAddress(s *string) *NurseryUpdate { + if s != nil { + nu.SetAddress(*s) + } + return nu +} + +// SetPhoneNumber sets the "phone_number" field. +func (nu *NurseryUpdate) SetPhoneNumber(s string) *NurseryUpdate { + nu.mutation.SetPhoneNumber(s) + return nu +} + +// SetNillablePhoneNumber sets the "phone_number" field if the given value is not nil. +func (nu *NurseryUpdate) SetNillablePhoneNumber(s *string) *NurseryUpdate { + if s != nil { + nu.SetPhoneNumber(*s) + } + return nu +} + +// ClearPhoneNumber clears the value of the "phone_number" field. +func (nu *NurseryUpdate) ClearPhoneNumber() *NurseryUpdate { + nu.mutation.ClearPhoneNumber() + return nu +} + +// SetEmail sets the "email" field. +func (nu *NurseryUpdate) SetEmail(s string) *NurseryUpdate { + nu.mutation.SetEmail(s) + return nu +} + +// SetNillableEmail sets the "email" field if the given value is not nil. +func (nu *NurseryUpdate) SetNillableEmail(s *string) *NurseryUpdate { + if s != nil { + nu.SetEmail(*s) + } + return nu +} + +// ClearEmail clears the value of the "email" field. +func (nu *NurseryUpdate) ClearEmail() *NurseryUpdate { + nu.mutation.ClearEmail() + return nu +} + +// SetCreatedAt sets the "created_at" field. +func (nu *NurseryUpdate) SetCreatedAt(t time.Time) *NurseryUpdate { + nu.mutation.SetCreatedAt(t) + return nu +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (nu *NurseryUpdate) SetNillableCreatedAt(t *time.Time) *NurseryUpdate { + if t != nil { + nu.SetCreatedAt(*t) + } + return nu +} + +// SetUpdatedAt sets the "updated_at" field. +func (nu *NurseryUpdate) SetUpdatedAt(t time.Time) *NurseryUpdate { + nu.mutation.SetUpdatedAt(t) + return nu +} + +// AddChildIDs adds the "children" edge to the Child entity by IDs. +func (nu *NurseryUpdate) AddChildIDs(ids ...uuid.UUID) *NurseryUpdate { + nu.mutation.AddChildIDs(ids...) + return nu +} + +// AddChildren adds the "children" edges to the Child entity. +func (nu *NurseryUpdate) AddChildren(c ...*Child) *NurseryUpdate { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return nu.AddChildIDs(ids...) +} + +// AddGuardianIDs adds the "guardians" edge to the Guardian entity by IDs. +func (nu *NurseryUpdate) AddGuardianIDs(ids ...uuid.UUID) *NurseryUpdate { + nu.mutation.AddGuardianIDs(ids...) + return nu +} + +// AddGuardians adds the "guardians" edges to the Guardian entity. +func (nu *NurseryUpdate) AddGuardians(g ...*Guardian) *NurseryUpdate { + ids := make([]uuid.UUID, len(g)) + for i := range g { + ids[i] = g[i].ID + } + return nu.AddGuardianIDs(ids...) +} + +// AddBusIDs adds the "buses" edge to the Bus entity by IDs. +func (nu *NurseryUpdate) AddBusIDs(ids ...uuid.UUID) *NurseryUpdate { + nu.mutation.AddBusIDs(ids...) + return nu +} + +// AddBuses adds the "buses" edges to the Bus entity. +func (nu *NurseryUpdate) AddBuses(b ...*Bus) *NurseryUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return nu.AddBusIDs(ids...) +} + +// Mutation returns the NurseryMutation object of the builder. +func (nu *NurseryUpdate) Mutation() *NurseryMutation { + return nu.mutation +} + +// ClearChildren clears all "children" edges to the Child entity. +func (nu *NurseryUpdate) ClearChildren() *NurseryUpdate { + nu.mutation.ClearChildren() + return nu +} + +// RemoveChildIDs removes the "children" edge to Child entities by IDs. +func (nu *NurseryUpdate) RemoveChildIDs(ids ...uuid.UUID) *NurseryUpdate { + nu.mutation.RemoveChildIDs(ids...) + return nu +} + +// RemoveChildren removes "children" edges to Child entities. +func (nu *NurseryUpdate) RemoveChildren(c ...*Child) *NurseryUpdate { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return nu.RemoveChildIDs(ids...) +} + +// ClearGuardians clears all "guardians" edges to the Guardian entity. +func (nu *NurseryUpdate) ClearGuardians() *NurseryUpdate { + nu.mutation.ClearGuardians() + return nu +} + +// RemoveGuardianIDs removes the "guardians" edge to Guardian entities by IDs. +func (nu *NurseryUpdate) RemoveGuardianIDs(ids ...uuid.UUID) *NurseryUpdate { + nu.mutation.RemoveGuardianIDs(ids...) + return nu +} + +// RemoveGuardians removes "guardians" edges to Guardian entities. +func (nu *NurseryUpdate) RemoveGuardians(g ...*Guardian) *NurseryUpdate { + ids := make([]uuid.UUID, len(g)) + for i := range g { + ids[i] = g[i].ID + } + return nu.RemoveGuardianIDs(ids...) +} + +// ClearBuses clears all "buses" edges to the Bus entity. +func (nu *NurseryUpdate) ClearBuses() *NurseryUpdate { + nu.mutation.ClearBuses() + return nu +} + +// RemoveBusIDs removes the "buses" edge to Bus entities by IDs. +func (nu *NurseryUpdate) RemoveBusIDs(ids ...uuid.UUID) *NurseryUpdate { + nu.mutation.RemoveBusIDs(ids...) + return nu +} + +// RemoveBuses removes "buses" edges to Bus entities. +func (nu *NurseryUpdate) RemoveBuses(b ...*Bus) *NurseryUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return nu.RemoveBusIDs(ids...) +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (nu *NurseryUpdate) Save(ctx context.Context) (int, error) { + nu.defaults() + return withHooks(ctx, nu.sqlSave, nu.mutation, nu.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (nu *NurseryUpdate) SaveX(ctx context.Context) int { + affected, err := nu.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (nu *NurseryUpdate) Exec(ctx context.Context) error { + _, err := nu.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (nu *NurseryUpdate) ExecX(ctx context.Context) { + if err := nu.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (nu *NurseryUpdate) defaults() { + if _, ok := nu.mutation.UpdatedAt(); !ok { + v := nursery.UpdateDefaultUpdatedAt() + nu.mutation.SetUpdatedAt(v) + } +} + +func (nu *NurseryUpdate) sqlSave(ctx context.Context) (n int, err error) { + _spec := sqlgraph.NewUpdateSpec(nursery.Table, nursery.Columns, sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID)) + if ps := nu.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := nu.mutation.NurseryCode(); ok { + _spec.SetField(nursery.FieldNurseryCode, field.TypeString, value) + } + if value, ok := nu.mutation.Name(); ok { + _spec.SetField(nursery.FieldName, field.TypeString, value) + } + if value, ok := nu.mutation.Address(); ok { + _spec.SetField(nursery.FieldAddress, field.TypeString, value) + } + if value, ok := nu.mutation.PhoneNumber(); ok { + _spec.SetField(nursery.FieldPhoneNumber, field.TypeString, value) + } + if nu.mutation.PhoneNumberCleared() { + _spec.ClearField(nursery.FieldPhoneNumber, field.TypeString) + } + if value, ok := nu.mutation.Email(); ok { + _spec.SetField(nursery.FieldEmail, field.TypeString, value) + } + if nu.mutation.EmailCleared() { + _spec.ClearField(nursery.FieldEmail, field.TypeString) + } + if value, ok := nu.mutation.CreatedAt(); ok { + _spec.SetField(nursery.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := nu.mutation.UpdatedAt(); ok { + _spec.SetField(nursery.FieldUpdatedAt, field.TypeTime, value) + } + if nu.mutation.ChildrenCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.ChildrenTable, + Columns: []string{nursery.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nu.mutation.RemovedChildrenIDs(); len(nodes) > 0 && !nu.mutation.ChildrenCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.ChildrenTable, + Columns: []string{nursery.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nu.mutation.ChildrenIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.ChildrenTable, + Columns: []string{nursery.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if nu.mutation.GuardiansCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.GuardiansTable, + Columns: []string{nursery.GuardiansColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nu.mutation.RemovedGuardiansIDs(); len(nodes) > 0 && !nu.mutation.GuardiansCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.GuardiansTable, + Columns: []string{nursery.GuardiansColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nu.mutation.GuardiansIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.GuardiansTable, + Columns: []string{nursery.GuardiansColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if nu.mutation.BusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.BusesTable, + Columns: []string{nursery.BusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nu.mutation.RemovedBusesIDs(); len(nodes) > 0 && !nu.mutation.BusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.BusesTable, + Columns: []string{nursery.BusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nu.mutation.BusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.BusesTable, + Columns: []string{nursery.BusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if n, err = sqlgraph.UpdateNodes(ctx, nu.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{nursery.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + nu.mutation.done = true + return n, nil +} + +// NurseryUpdateOne is the builder for updating a single Nursery entity. +type NurseryUpdateOne struct { + config + fields []string + hooks []Hook + mutation *NurseryMutation +} + +// SetNurseryCode sets the "nursery_code" field. +func (nuo *NurseryUpdateOne) SetNurseryCode(s string) *NurseryUpdateOne { + nuo.mutation.SetNurseryCode(s) + return nuo +} + +// SetNillableNurseryCode sets the "nursery_code" field if the given value is not nil. +func (nuo *NurseryUpdateOne) SetNillableNurseryCode(s *string) *NurseryUpdateOne { + if s != nil { + nuo.SetNurseryCode(*s) + } + return nuo +} + +// SetName sets the "name" field. +func (nuo *NurseryUpdateOne) SetName(s string) *NurseryUpdateOne { + nuo.mutation.SetName(s) + return nuo +} + +// SetNillableName sets the "name" field if the given value is not nil. +func (nuo *NurseryUpdateOne) SetNillableName(s *string) *NurseryUpdateOne { + if s != nil { + nuo.SetName(*s) + } + return nuo +} + +// SetAddress sets the "address" field. +func (nuo *NurseryUpdateOne) SetAddress(s string) *NurseryUpdateOne { + nuo.mutation.SetAddress(s) + return nuo +} + +// SetNillableAddress sets the "address" field if the given value is not nil. +func (nuo *NurseryUpdateOne) SetNillableAddress(s *string) *NurseryUpdateOne { + if s != nil { + nuo.SetAddress(*s) + } + return nuo +} + +// SetPhoneNumber sets the "phone_number" field. +func (nuo *NurseryUpdateOne) SetPhoneNumber(s string) *NurseryUpdateOne { + nuo.mutation.SetPhoneNumber(s) + return nuo +} + +// SetNillablePhoneNumber sets the "phone_number" field if the given value is not nil. +func (nuo *NurseryUpdateOne) SetNillablePhoneNumber(s *string) *NurseryUpdateOne { + if s != nil { + nuo.SetPhoneNumber(*s) + } + return nuo +} + +// ClearPhoneNumber clears the value of the "phone_number" field. +func (nuo *NurseryUpdateOne) ClearPhoneNumber() *NurseryUpdateOne { + nuo.mutation.ClearPhoneNumber() + return nuo +} + +// SetEmail sets the "email" field. +func (nuo *NurseryUpdateOne) SetEmail(s string) *NurseryUpdateOne { + nuo.mutation.SetEmail(s) + return nuo +} + +// SetNillableEmail sets the "email" field if the given value is not nil. +func (nuo *NurseryUpdateOne) SetNillableEmail(s *string) *NurseryUpdateOne { + if s != nil { + nuo.SetEmail(*s) + } + return nuo +} + +// ClearEmail clears the value of the "email" field. +func (nuo *NurseryUpdateOne) ClearEmail() *NurseryUpdateOne { + nuo.mutation.ClearEmail() + return nuo +} + +// SetCreatedAt sets the "created_at" field. +func (nuo *NurseryUpdateOne) SetCreatedAt(t time.Time) *NurseryUpdateOne { + nuo.mutation.SetCreatedAt(t) + return nuo +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (nuo *NurseryUpdateOne) SetNillableCreatedAt(t *time.Time) *NurseryUpdateOne { + if t != nil { + nuo.SetCreatedAt(*t) + } + return nuo +} + +// SetUpdatedAt sets the "updated_at" field. +func (nuo *NurseryUpdateOne) SetUpdatedAt(t time.Time) *NurseryUpdateOne { + nuo.mutation.SetUpdatedAt(t) + return nuo +} + +// AddChildIDs adds the "children" edge to the Child entity by IDs. +func (nuo *NurseryUpdateOne) AddChildIDs(ids ...uuid.UUID) *NurseryUpdateOne { + nuo.mutation.AddChildIDs(ids...) + return nuo +} + +// AddChildren adds the "children" edges to the Child entity. +func (nuo *NurseryUpdateOne) AddChildren(c ...*Child) *NurseryUpdateOne { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return nuo.AddChildIDs(ids...) +} + +// AddGuardianIDs adds the "guardians" edge to the Guardian entity by IDs. +func (nuo *NurseryUpdateOne) AddGuardianIDs(ids ...uuid.UUID) *NurseryUpdateOne { + nuo.mutation.AddGuardianIDs(ids...) + return nuo +} + +// AddGuardians adds the "guardians" edges to the Guardian entity. +func (nuo *NurseryUpdateOne) AddGuardians(g ...*Guardian) *NurseryUpdateOne { + ids := make([]uuid.UUID, len(g)) + for i := range g { + ids[i] = g[i].ID + } + return nuo.AddGuardianIDs(ids...) +} + +// AddBusIDs adds the "buses" edge to the Bus entity by IDs. +func (nuo *NurseryUpdateOne) AddBusIDs(ids ...uuid.UUID) *NurseryUpdateOne { + nuo.mutation.AddBusIDs(ids...) + return nuo +} + +// AddBuses adds the "buses" edges to the Bus entity. +func (nuo *NurseryUpdateOne) AddBuses(b ...*Bus) *NurseryUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return nuo.AddBusIDs(ids...) +} + +// Mutation returns the NurseryMutation object of the builder. +func (nuo *NurseryUpdateOne) Mutation() *NurseryMutation { + return nuo.mutation +} + +// ClearChildren clears all "children" edges to the Child entity. +func (nuo *NurseryUpdateOne) ClearChildren() *NurseryUpdateOne { + nuo.mutation.ClearChildren() + return nuo +} + +// RemoveChildIDs removes the "children" edge to Child entities by IDs. +func (nuo *NurseryUpdateOne) RemoveChildIDs(ids ...uuid.UUID) *NurseryUpdateOne { + nuo.mutation.RemoveChildIDs(ids...) + return nuo +} + +// RemoveChildren removes "children" edges to Child entities. +func (nuo *NurseryUpdateOne) RemoveChildren(c ...*Child) *NurseryUpdateOne { + ids := make([]uuid.UUID, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return nuo.RemoveChildIDs(ids...) +} + +// ClearGuardians clears all "guardians" edges to the Guardian entity. +func (nuo *NurseryUpdateOne) ClearGuardians() *NurseryUpdateOne { + nuo.mutation.ClearGuardians() + return nuo +} + +// RemoveGuardianIDs removes the "guardians" edge to Guardian entities by IDs. +func (nuo *NurseryUpdateOne) RemoveGuardianIDs(ids ...uuid.UUID) *NurseryUpdateOne { + nuo.mutation.RemoveGuardianIDs(ids...) + return nuo +} + +// RemoveGuardians removes "guardians" edges to Guardian entities. +func (nuo *NurseryUpdateOne) RemoveGuardians(g ...*Guardian) *NurseryUpdateOne { + ids := make([]uuid.UUID, len(g)) + for i := range g { + ids[i] = g[i].ID + } + return nuo.RemoveGuardianIDs(ids...) +} + +// ClearBuses clears all "buses" edges to the Bus entity. +func (nuo *NurseryUpdateOne) ClearBuses() *NurseryUpdateOne { + nuo.mutation.ClearBuses() + return nuo +} + +// RemoveBusIDs removes the "buses" edge to Bus entities by IDs. +func (nuo *NurseryUpdateOne) RemoveBusIDs(ids ...uuid.UUID) *NurseryUpdateOne { + nuo.mutation.RemoveBusIDs(ids...) + return nuo +} + +// RemoveBuses removes "buses" edges to Bus entities. +func (nuo *NurseryUpdateOne) RemoveBuses(b ...*Bus) *NurseryUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return nuo.RemoveBusIDs(ids...) +} + +// Where appends a list predicates to the NurseryUpdate builder. +func (nuo *NurseryUpdateOne) Where(ps ...predicate.Nursery) *NurseryUpdateOne { + nuo.mutation.Where(ps...) + return nuo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (nuo *NurseryUpdateOne) Select(field string, fields ...string) *NurseryUpdateOne { + nuo.fields = append([]string{field}, fields...) + return nuo +} + +// Save executes the query and returns the updated Nursery entity. +func (nuo *NurseryUpdateOne) Save(ctx context.Context) (*Nursery, error) { + nuo.defaults() + return withHooks(ctx, nuo.sqlSave, nuo.mutation, nuo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (nuo *NurseryUpdateOne) SaveX(ctx context.Context) *Nursery { + node, err := nuo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (nuo *NurseryUpdateOne) Exec(ctx context.Context) error { + _, err := nuo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (nuo *NurseryUpdateOne) ExecX(ctx context.Context) { + if err := nuo.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (nuo *NurseryUpdateOne) defaults() { + if _, ok := nuo.mutation.UpdatedAt(); !ok { + v := nursery.UpdateDefaultUpdatedAt() + nuo.mutation.SetUpdatedAt(v) + } +} + +func (nuo *NurseryUpdateOne) sqlSave(ctx context.Context) (_node *Nursery, err error) { + _spec := sqlgraph.NewUpdateSpec(nursery.Table, nursery.Columns, sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID)) + id, ok := nuo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Nursery.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := nuo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, nursery.FieldID) + for _, f := range fields { + if !nursery.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != nursery.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := nuo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := nuo.mutation.NurseryCode(); ok { + _spec.SetField(nursery.FieldNurseryCode, field.TypeString, value) + } + if value, ok := nuo.mutation.Name(); ok { + _spec.SetField(nursery.FieldName, field.TypeString, value) + } + if value, ok := nuo.mutation.Address(); ok { + _spec.SetField(nursery.FieldAddress, field.TypeString, value) + } + if value, ok := nuo.mutation.PhoneNumber(); ok { + _spec.SetField(nursery.FieldPhoneNumber, field.TypeString, value) + } + if nuo.mutation.PhoneNumberCleared() { + _spec.ClearField(nursery.FieldPhoneNumber, field.TypeString) + } + if value, ok := nuo.mutation.Email(); ok { + _spec.SetField(nursery.FieldEmail, field.TypeString, value) + } + if nuo.mutation.EmailCleared() { + _spec.ClearField(nursery.FieldEmail, field.TypeString) + } + if value, ok := nuo.mutation.CreatedAt(); ok { + _spec.SetField(nursery.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := nuo.mutation.UpdatedAt(); ok { + _spec.SetField(nursery.FieldUpdatedAt, field.TypeTime, value) + } + if nuo.mutation.ChildrenCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.ChildrenTable, + Columns: []string{nursery.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nuo.mutation.RemovedChildrenIDs(); len(nodes) > 0 && !nuo.mutation.ChildrenCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.ChildrenTable, + Columns: []string{nursery.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nuo.mutation.ChildrenIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.ChildrenTable, + Columns: []string{nursery.ChildrenColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if nuo.mutation.GuardiansCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.GuardiansTable, + Columns: []string{nursery.GuardiansColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nuo.mutation.RemovedGuardiansIDs(); len(nodes) > 0 && !nuo.mutation.GuardiansCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.GuardiansTable, + Columns: []string{nursery.GuardiansColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nuo.mutation.GuardiansIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.GuardiansTable, + Columns: []string{nursery.GuardiansColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if nuo.mutation.BusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.BusesTable, + Columns: []string{nursery.BusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nuo.mutation.RemovedBusesIDs(); len(nodes) > 0 && !nuo.mutation.BusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.BusesTable, + Columns: []string{nursery.BusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := nuo.mutation.BusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: nursery.BusesTable, + Columns: []string{nursery.BusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + _node = &Nursery{config: nuo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, nuo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{nursery.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + nuo.mutation.done = true + return _node, nil +} diff --git a/backend/domain/repository/ent/predicate/predicate.go b/backend/domain/repository/ent/predicate/predicate.go new file mode 100644 index 00000000..9f529600 --- /dev/null +++ b/backend/domain/repository/ent/predicate/predicate.go @@ -0,0 +1,31 @@ +// Code generated by ent, DO NOT EDIT. + +package predicate + +import ( + "entgo.io/ent/dialect/sql" +) + +// BoardingRecord is the predicate function for boardingrecord builders. +type BoardingRecord func(*sql.Selector) + +// Bus is the predicate function for bus builders. +type Bus func(*sql.Selector) + +// Child is the predicate function for child builders. +type Child func(*sql.Selector) + +// ChildBusAssociation is the predicate function for childbusassociation builders. +type ChildBusAssociation func(*sql.Selector) + +// ChildPhoto is the predicate function for childphoto builders. +type ChildPhoto func(*sql.Selector) + +// Guardian is the predicate function for guardian builders. +type Guardian func(*sql.Selector) + +// Nursery is the predicate function for nursery builders. +type Nursery func(*sql.Selector) + +// Station is the predicate function for station builders. +type Station func(*sql.Selector) diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go new file mode 100644 index 00000000..af5a5f1f --- /dev/null +++ b/backend/domain/repository/ent/runtime.go @@ -0,0 +1,165 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "time" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/schema" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// The init function reads all schema descriptors with runtime code +// (default values, validators, hooks and policies) and stitches it +// to their package variables. +func init() { + boardingrecordFields := schema.BoardingRecord{}.Fields() + _ = boardingrecordFields + // boardingrecordDescTimestamp is the schema descriptor for timestamp field. + boardingrecordDescTimestamp := boardingrecordFields[1].Descriptor() + // boardingrecord.DefaultTimestamp holds the default value on creation for the timestamp field. + boardingrecord.DefaultTimestamp = boardingrecordDescTimestamp.Default.(func() time.Time) + // boardingrecordDescID is the schema descriptor for id field. + boardingrecordDescID := boardingrecordFields[0].Descriptor() + // boardingrecord.DefaultID holds the default value on creation for the id field. + boardingrecord.DefaultID = boardingrecordDescID.Default.(func() uuid.UUID) + busFields := schema.Bus{}.Fields() + _ = busFields + // busDescCreatedAt is the schema descriptor for created_at field. + busDescCreatedAt := busFields[6].Descriptor() + // bus.DefaultCreatedAt holds the default value on creation for the created_at field. + bus.DefaultCreatedAt = busDescCreatedAt.Default.(func() time.Time) + // busDescUpdatedAt is the schema descriptor for updated_at field. + busDescUpdatedAt := busFields[7].Descriptor() + // bus.DefaultUpdatedAt holds the default value on creation for the updated_at field. + bus.DefaultUpdatedAt = busDescUpdatedAt.Default.(func() time.Time) + // bus.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. + bus.UpdateDefaultUpdatedAt = busDescUpdatedAt.UpdateDefault.(func() time.Time) + // busDescID is the schema descriptor for id field. + busDescID := busFields[0].Descriptor() + // bus.DefaultID holds the default value on creation for the id field. + bus.DefaultID = busDescID.Default.(func() uuid.UUID) + childFields := schema.Child{}.Fields() + _ = childFields + // childDescIsRideMorningBus is the schema descriptor for is_ride_morning_bus field. + childDescIsRideMorningBus := childFields[4].Descriptor() + // child.DefaultIsRideMorningBus holds the default value on creation for the is_ride_morning_bus field. + child.DefaultIsRideMorningBus = childDescIsRideMorningBus.Default.(bool) + // childDescIsRideAfternoonBus is the schema descriptor for is_ride_afternoon_bus field. + childDescIsRideAfternoonBus := childFields[5].Descriptor() + // child.DefaultIsRideAfternoonBus holds the default value on creation for the is_ride_afternoon_bus field. + child.DefaultIsRideAfternoonBus = childDescIsRideAfternoonBus.Default.(bool) + // childDescCheckForMissingItems is the schema descriptor for check_for_missing_items field. + childDescCheckForMissingItems := childFields[6].Descriptor() + // child.DefaultCheckForMissingItems holds the default value on creation for the check_for_missing_items field. + child.DefaultCheckForMissingItems = childDescCheckForMissingItems.Default.(bool) + // childDescHasBag is the schema descriptor for has_bag field. + childDescHasBag := childFields[7].Descriptor() + // child.DefaultHasBag holds the default value on creation for the has_bag field. + child.DefaultHasBag = childDescHasBag.Default.(bool) + // childDescHasLunchBox is the schema descriptor for has_lunch_box field. + childDescHasLunchBox := childFields[8].Descriptor() + // child.DefaultHasLunchBox holds the default value on creation for the has_lunch_box field. + child.DefaultHasLunchBox = childDescHasLunchBox.Default.(bool) + // childDescHasWaterBottle is the schema descriptor for has_water_bottle field. + childDescHasWaterBottle := childFields[9].Descriptor() + // child.DefaultHasWaterBottle holds the default value on creation for the has_water_bottle field. + child.DefaultHasWaterBottle = childDescHasWaterBottle.Default.(bool) + // childDescHasUmbrella is the schema descriptor for has_umbrella field. + childDescHasUmbrella := childFields[10].Descriptor() + // child.DefaultHasUmbrella holds the default value on creation for the has_umbrella field. + child.DefaultHasUmbrella = childDescHasUmbrella.Default.(bool) + // childDescHasOther is the schema descriptor for has_other field. + childDescHasOther := childFields[11].Descriptor() + // child.DefaultHasOther holds the default value on creation for the has_other field. + child.DefaultHasOther = childDescHasOther.Default.(bool) + // childDescCreatedAt is the schema descriptor for created_at field. + childDescCreatedAt := childFields[12].Descriptor() + // child.DefaultCreatedAt holds the default value on creation for the created_at field. + child.DefaultCreatedAt = childDescCreatedAt.Default.(func() time.Time) + // childDescUpdatedAt is the schema descriptor for updated_at field. + childDescUpdatedAt := childFields[13].Descriptor() + // child.DefaultUpdatedAt holds the default value on creation for the updated_at field. + child.DefaultUpdatedAt = childDescUpdatedAt.Default.(func() time.Time) + // child.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. + child.UpdateDefaultUpdatedAt = childDescUpdatedAt.UpdateDefault.(func() time.Time) + // childDescID is the schema descriptor for id field. + childDescID := childFields[0].Descriptor() + // child.DefaultID holds the default value on creation for the id field. + child.DefaultID = childDescID.Default.(func() uuid.UUID) + childphotoFields := schema.ChildPhoto{}.Fields() + _ = childphotoFields + // childphotoDescCreatedAt is the schema descriptor for created_at field. + childphotoDescCreatedAt := childphotoFields[3].Descriptor() + // childphoto.DefaultCreatedAt holds the default value on creation for the created_at field. + childphoto.DefaultCreatedAt = childphotoDescCreatedAt.Default.(func() time.Time) + // childphotoDescUpdatedAt is the schema descriptor for updated_at field. + childphotoDescUpdatedAt := childphotoFields[4].Descriptor() + // childphoto.DefaultUpdatedAt holds the default value on creation for the updated_at field. + childphoto.DefaultUpdatedAt = childphotoDescUpdatedAt.Default.(func() time.Time) + // childphoto.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. + childphoto.UpdateDefaultUpdatedAt = childphotoDescUpdatedAt.UpdateDefault.(func() time.Time) + // childphotoDescID is the schema descriptor for id field. + childphotoDescID := childphotoFields[0].Descriptor() + // childphoto.DefaultID holds the default value on creation for the id field. + childphoto.DefaultID = childphotoDescID.Default.(func() uuid.UUID) + guardianFields := schema.Guardian{}.Fields() + _ = guardianFields + // guardianDescCreatedAt is the schema descriptor for created_at field. + guardianDescCreatedAt := guardianFields[4].Descriptor() + // guardian.DefaultCreatedAt holds the default value on creation for the created_at field. + guardian.DefaultCreatedAt = guardianDescCreatedAt.Default.(func() time.Time) + // guardianDescUpdatedAt is the schema descriptor for updated_at field. + guardianDescUpdatedAt := guardianFields[5].Descriptor() + // guardian.DefaultUpdatedAt holds the default value on creation for the updated_at field. + guardian.DefaultUpdatedAt = guardianDescUpdatedAt.Default.(func() time.Time) + // guardian.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. + guardian.UpdateDefaultUpdatedAt = guardianDescUpdatedAt.UpdateDefault.(func() time.Time) + // guardianDescID is the schema descriptor for id field. + guardianDescID := guardianFields[0].Descriptor() + // guardian.DefaultID holds the default value on creation for the id field. + guardian.DefaultID = guardianDescID.Default.(func() uuid.UUID) + nurseryFields := schema.Nursery{}.Fields() + _ = nurseryFields + // nurseryDescNurseryCode is the schema descriptor for nursery_code field. + nurseryDescNurseryCode := nurseryFields[1].Descriptor() + // nursery.DefaultNurseryCode holds the default value on creation for the nursery_code field. + nursery.DefaultNurseryCode = nurseryDescNurseryCode.Default.(func() string) + // nurseryDescCreatedAt is the schema descriptor for created_at field. + nurseryDescCreatedAt := nurseryFields[6].Descriptor() + // nursery.DefaultCreatedAt holds the default value on creation for the created_at field. + nursery.DefaultCreatedAt = nurseryDescCreatedAt.Default.(func() time.Time) + // nurseryDescUpdatedAt is the schema descriptor for updated_at field. + nurseryDescUpdatedAt := nurseryFields[7].Descriptor() + // nursery.DefaultUpdatedAt holds the default value on creation for the updated_at field. + nursery.DefaultUpdatedAt = nurseryDescUpdatedAt.Default.(func() time.Time) + // nursery.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. + nursery.UpdateDefaultUpdatedAt = nurseryDescUpdatedAt.UpdateDefault.(func() time.Time) + // nurseryDescID is the schema descriptor for id field. + nurseryDescID := nurseryFields[0].Descriptor() + // nursery.DefaultID holds the default value on creation for the id field. + nursery.DefaultID = nurseryDescID.Default.(func() uuid.UUID) + stationFields := schema.Station{}.Fields() + _ = stationFields + // stationDescCreatedAt is the schema descriptor for created_at field. + stationDescCreatedAt := stationFields[5].Descriptor() + // station.DefaultCreatedAt holds the default value on creation for the created_at field. + station.DefaultCreatedAt = stationDescCreatedAt.Default.(func() time.Time) + // stationDescUpdatedAt is the schema descriptor for updated_at field. + stationDescUpdatedAt := stationFields[6].Descriptor() + // station.DefaultUpdatedAt holds the default value on creation for the updated_at field. + station.DefaultUpdatedAt = stationDescUpdatedAt.Default.(func() time.Time) + // station.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. + station.UpdateDefaultUpdatedAt = stationDescUpdatedAt.UpdateDefault.(func() time.Time) + // stationDescID is the schema descriptor for id field. + stationDescID := stationFields[0].Descriptor() + // station.DefaultID holds the default value on creation for the id field. + station.DefaultID = stationDescID.Default.(func() uuid.UUID) +} diff --git a/backend/domain/repository/ent/runtime/runtime.go b/backend/domain/repository/ent/runtime/runtime.go new file mode 100644 index 00000000..528a49cc --- /dev/null +++ b/backend/domain/repository/ent/runtime/runtime.go @@ -0,0 +1,10 @@ +// Code generated by ent, DO NOT EDIT. + +package runtime + +// The schema-stitching logic is generated in github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/runtime.go + +const ( + Version = "v0.13.0" // Version of ent codegen. + Sum = "h1:DclxWczaCpyiKn6ZWVcJjq1zIKtJ11iNKy+08lNYsJE=" // Sum of ent codegen. +) diff --git a/backend/domain/repository/ent/station.go b/backend/domain/repository/ent/station.go new file mode 100644 index 00000000..2edbce17 --- /dev/null +++ b/backend/domain/repository/ent/station.go @@ -0,0 +1,221 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "strings" + "time" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// Station is the model entity for the Station schema. +type Station struct { + config `json:"-"` + // ID of the ent. + ID uuid.UUID `json:"id,omitempty"` + // Latitude holds the value of the "latitude" field. + Latitude float64 `json:"latitude,omitempty"` + // Longitude holds the value of the "longitude" field. + Longitude float64 `json:"longitude,omitempty"` + // 朝のバス停の順番 + MorningOrder int `json:"morning_order,omitempty"` + // 帰りのバス停の順番 + EveningOrder int `json:"evening_order,omitempty"` + // CreatedAt holds the value of the "created_at" field. + CreatedAt time.Time `json:"created_at,omitempty"` + // UpdatedAt holds the value of the "updated_at" field. + UpdatedAt time.Time `json:"updated_at,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the StationQuery when eager-loading is set. + Edges StationEdges `json:"edges"` + guardian_station *uuid.UUID + selectValues sql.SelectValues +} + +// StationEdges holds the relations/edges for other nodes in the graph. +type StationEdges struct { + // Guardian holds the value of the guardian edge. + Guardian *Guardian `json:"guardian,omitempty"` + // Bus holds the value of the bus edge. + Bus []*Bus `json:"bus,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [2]bool +} + +// GuardianOrErr returns the Guardian value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e StationEdges) GuardianOrErr() (*Guardian, error) { + if e.loadedTypes[0] { + if e.Guardian == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: guardian.Label} + } + return e.Guardian, nil + } + return nil, &NotLoadedError{edge: "guardian"} +} + +// BusOrErr returns the Bus value or an error if the edge +// was not loaded in eager-loading. +func (e StationEdges) BusOrErr() ([]*Bus, error) { + if e.loadedTypes[1] { + return e.Bus, nil + } + return nil, &NotLoadedError{edge: "bus"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*Station) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case station.FieldLatitude, station.FieldLongitude: + values[i] = new(sql.NullFloat64) + case station.FieldMorningOrder, station.FieldEveningOrder: + values[i] = new(sql.NullInt64) + case station.FieldCreatedAt, station.FieldUpdatedAt: + values[i] = new(sql.NullTime) + case station.FieldID: + values[i] = new(uuid.UUID) + case station.ForeignKeys[0]: // guardian_station + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the Station fields. +func (s *Station) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case station.FieldID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field id", values[i]) + } else if value != nil { + s.ID = *value + } + case station.FieldLatitude: + if value, ok := values[i].(*sql.NullFloat64); !ok { + return fmt.Errorf("unexpected type %T for field latitude", values[i]) + } else if value.Valid { + s.Latitude = value.Float64 + } + case station.FieldLongitude: + if value, ok := values[i].(*sql.NullFloat64); !ok { + return fmt.Errorf("unexpected type %T for field longitude", values[i]) + } else if value.Valid { + s.Longitude = value.Float64 + } + case station.FieldMorningOrder: + if value, ok := values[i].(*sql.NullInt64); !ok { + return fmt.Errorf("unexpected type %T for field morning_order", values[i]) + } else if value.Valid { + s.MorningOrder = int(value.Int64) + } + case station.FieldEveningOrder: + if value, ok := values[i].(*sql.NullInt64); !ok { + return fmt.Errorf("unexpected type %T for field evening_order", values[i]) + } else if value.Valid { + s.EveningOrder = int(value.Int64) + } + case station.FieldCreatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field created_at", values[i]) + } else if value.Valid { + s.CreatedAt = value.Time + } + case station.FieldUpdatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field updated_at", values[i]) + } else if value.Valid { + s.UpdatedAt = value.Time + } + case station.ForeignKeys[0]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field guardian_station", values[i]) + } else if value.Valid { + s.guardian_station = new(uuid.UUID) + *s.guardian_station = *value.S.(*uuid.UUID) + } + default: + s.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the Station. +// This includes values selected through modifiers, order, etc. +func (s *Station) Value(name string) (ent.Value, error) { + return s.selectValues.Get(name) +} + +// QueryGuardian queries the "guardian" edge of the Station entity. +func (s *Station) QueryGuardian() *GuardianQuery { + return NewStationClient(s.config).QueryGuardian(s) +} + +// QueryBus queries the "bus" edge of the Station entity. +func (s *Station) QueryBus() *BusQuery { + return NewStationClient(s.config).QueryBus(s) +} + +// Update returns a builder for updating this Station. +// Note that you need to call Station.Unwrap() before calling this method if this Station +// was returned from a transaction, and the transaction was committed or rolled back. +func (s *Station) Update() *StationUpdateOne { + return NewStationClient(s.config).UpdateOne(s) +} + +// Unwrap unwraps the Station entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (s *Station) Unwrap() *Station { + _tx, ok := s.config.driver.(*txDriver) + if !ok { + panic("ent: Station is not a transactional entity") + } + s.config.driver = _tx.drv + return s +} + +// String implements the fmt.Stringer. +func (s *Station) String() string { + var builder strings.Builder + builder.WriteString("Station(") + builder.WriteString(fmt.Sprintf("id=%v, ", s.ID)) + builder.WriteString("latitude=") + builder.WriteString(fmt.Sprintf("%v", s.Latitude)) + builder.WriteString(", ") + builder.WriteString("longitude=") + builder.WriteString(fmt.Sprintf("%v", s.Longitude)) + builder.WriteString(", ") + builder.WriteString("morning_order=") + builder.WriteString(fmt.Sprintf("%v", s.MorningOrder)) + builder.WriteString(", ") + builder.WriteString("evening_order=") + builder.WriteString(fmt.Sprintf("%v", s.EveningOrder)) + builder.WriteString(", ") + builder.WriteString("created_at=") + builder.WriteString(s.CreatedAt.Format(time.ANSIC)) + builder.WriteString(", ") + builder.WriteString("updated_at=") + builder.WriteString(s.UpdatedAt.Format(time.ANSIC)) + builder.WriteByte(')') + return builder.String() +} + +// Stations is a parsable slice of Station. +type Stations []*Station diff --git a/backend/domain/repository/ent/station/station.go b/backend/domain/repository/ent/station/station.go new file mode 100644 index 00000000..73f96037 --- /dev/null +++ b/backend/domain/repository/ent/station/station.go @@ -0,0 +1,170 @@ +// Code generated by ent, DO NOT EDIT. + +package station + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/google/uuid" +) + +const ( + // Label holds the string label denoting the station type in the database. + Label = "station" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldLatitude holds the string denoting the latitude field in the database. + FieldLatitude = "latitude" + // FieldLongitude holds the string denoting the longitude field in the database. + FieldLongitude = "longitude" + // FieldMorningOrder holds the string denoting the morning_order field in the database. + FieldMorningOrder = "morning_order" + // FieldEveningOrder holds the string denoting the evening_order field in the database. + FieldEveningOrder = "evening_order" + // FieldCreatedAt holds the string denoting the created_at field in the database. + FieldCreatedAt = "created_at" + // FieldUpdatedAt holds the string denoting the updated_at field in the database. + FieldUpdatedAt = "updated_at" + // EdgeGuardian holds the string denoting the guardian edge name in mutations. + EdgeGuardian = "guardian" + // EdgeBus holds the string denoting the bus edge name in mutations. + EdgeBus = "bus" + // Table holds the table name of the station in the database. + Table = "stations" + // GuardianTable is the table that holds the guardian relation/edge. + GuardianTable = "stations" + // GuardianInverseTable is the table name for the Guardian entity. + // It exists in this package in order to avoid circular dependency with the "guardian" package. + GuardianInverseTable = "guardians" + // GuardianColumn is the table column denoting the guardian relation/edge. + GuardianColumn = "guardian_station" + // BusTable is the table that holds the bus relation/edge. The primary key declared below. + BusTable = "bus_stations" + // BusInverseTable is the table name for the Bus entity. + // It exists in this package in order to avoid circular dependency with the "bus" package. + BusInverseTable = "bus" +) + +// Columns holds all SQL columns for station fields. +var Columns = []string{ + FieldID, + FieldLatitude, + FieldLongitude, + FieldMorningOrder, + FieldEveningOrder, + FieldCreatedAt, + FieldUpdatedAt, +} + +// ForeignKeys holds the SQL foreign-keys that are owned by the "stations" +// table and are not defined as standalone fields in the schema. +var ForeignKeys = []string{ + "guardian_station", +} + +var ( + // BusPrimaryKey and BusColumn2 are the table columns denoting the + // primary key for the bus relation (M2M). + BusPrimaryKey = []string{"bus_id", "station_id"} +) + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + for i := range ForeignKeys { + if column == ForeignKeys[i] { + return true + } + } + return false +} + +var ( + // DefaultCreatedAt holds the default value on creation for the "created_at" field. + DefaultCreatedAt func() time.Time + // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. + DefaultUpdatedAt func() time.Time + // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. + UpdateDefaultUpdatedAt func() time.Time + // DefaultID holds the default value on creation for the "id" field. + DefaultID func() uuid.UUID +) + +// OrderOption defines the ordering options for the Station queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByLatitude orders the results by the latitude field. +func ByLatitude(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldLatitude, opts...).ToFunc() +} + +// ByLongitude orders the results by the longitude field. +func ByLongitude(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldLongitude, opts...).ToFunc() +} + +// ByMorningOrder orders the results by the morning_order field. +func ByMorningOrder(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldMorningOrder, opts...).ToFunc() +} + +// ByEveningOrder orders the results by the evening_order field. +func ByEveningOrder(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEveningOrder, opts...).ToFunc() +} + +// ByCreatedAt orders the results by the created_at field. +func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() +} + +// ByUpdatedAt orders the results by the updated_at field. +func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() +} + +// ByGuardianField orders the results by guardian field. +func ByGuardianField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newGuardianStep(), sql.OrderByField(field, opts...)) + } +} + +// ByBusCount orders the results by bus count. +func ByBusCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newBusStep(), opts...) + } +} + +// ByBus orders the results by bus terms. +func ByBus(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newBusStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} +func newGuardianStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(GuardianInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2O, true, GuardianTable, GuardianColumn), + ) +} +func newBusStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(BusInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2M, true, BusTable, BusPrimaryKey...), + ) +} diff --git a/backend/domain/repository/ent/station/where.go b/backend/domain/repository/ent/station/where.go new file mode 100644 index 00000000..2de60d55 --- /dev/null +++ b/backend/domain/repository/ent/station/where.go @@ -0,0 +1,408 @@ +// Code generated by ent, DO NOT EDIT. + +package station + +import ( + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ID filters vertices based on their ID field. +func ID(id uuid.UUID) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id uuid.UUID) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id uuid.UUID) predicate.Station { + return predicate.Station(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...uuid.UUID) predicate.Station { + return predicate.Station(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...uuid.UUID) predicate.Station { + return predicate.Station(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id uuid.UUID) predicate.Station { + return predicate.Station(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id uuid.UUID) predicate.Station { + return predicate.Station(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id uuid.UUID) predicate.Station { + return predicate.Station(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id uuid.UUID) predicate.Station { + return predicate.Station(sql.FieldLTE(FieldID, id)) +} + +// Latitude applies equality check predicate on the "latitude" field. It's identical to LatitudeEQ. +func Latitude(v float64) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldLatitude, v)) +} + +// Longitude applies equality check predicate on the "longitude" field. It's identical to LongitudeEQ. +func Longitude(v float64) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldLongitude, v)) +} + +// MorningOrder applies equality check predicate on the "morning_order" field. It's identical to MorningOrderEQ. +func MorningOrder(v int) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldMorningOrder, v)) +} + +// EveningOrder applies equality check predicate on the "evening_order" field. It's identical to EveningOrderEQ. +func EveningOrder(v int) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldEveningOrder, v)) +} + +// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. +func CreatedAt(v time.Time) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldCreatedAt, v)) +} + +// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ. +func UpdatedAt(v time.Time) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// LatitudeEQ applies the EQ predicate on the "latitude" field. +func LatitudeEQ(v float64) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldLatitude, v)) +} + +// LatitudeNEQ applies the NEQ predicate on the "latitude" field. +func LatitudeNEQ(v float64) predicate.Station { + return predicate.Station(sql.FieldNEQ(FieldLatitude, v)) +} + +// LatitudeIn applies the In predicate on the "latitude" field. +func LatitudeIn(vs ...float64) predicate.Station { + return predicate.Station(sql.FieldIn(FieldLatitude, vs...)) +} + +// LatitudeNotIn applies the NotIn predicate on the "latitude" field. +func LatitudeNotIn(vs ...float64) predicate.Station { + return predicate.Station(sql.FieldNotIn(FieldLatitude, vs...)) +} + +// LatitudeGT applies the GT predicate on the "latitude" field. +func LatitudeGT(v float64) predicate.Station { + return predicate.Station(sql.FieldGT(FieldLatitude, v)) +} + +// LatitudeGTE applies the GTE predicate on the "latitude" field. +func LatitudeGTE(v float64) predicate.Station { + return predicate.Station(sql.FieldGTE(FieldLatitude, v)) +} + +// LatitudeLT applies the LT predicate on the "latitude" field. +func LatitudeLT(v float64) predicate.Station { + return predicate.Station(sql.FieldLT(FieldLatitude, v)) +} + +// LatitudeLTE applies the LTE predicate on the "latitude" field. +func LatitudeLTE(v float64) predicate.Station { + return predicate.Station(sql.FieldLTE(FieldLatitude, v)) +} + +// LatitudeIsNil applies the IsNil predicate on the "latitude" field. +func LatitudeIsNil() predicate.Station { + return predicate.Station(sql.FieldIsNull(FieldLatitude)) +} + +// LatitudeNotNil applies the NotNil predicate on the "latitude" field. +func LatitudeNotNil() predicate.Station { + return predicate.Station(sql.FieldNotNull(FieldLatitude)) +} + +// LongitudeEQ applies the EQ predicate on the "longitude" field. +func LongitudeEQ(v float64) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldLongitude, v)) +} + +// LongitudeNEQ applies the NEQ predicate on the "longitude" field. +func LongitudeNEQ(v float64) predicate.Station { + return predicate.Station(sql.FieldNEQ(FieldLongitude, v)) +} + +// LongitudeIn applies the In predicate on the "longitude" field. +func LongitudeIn(vs ...float64) predicate.Station { + return predicate.Station(sql.FieldIn(FieldLongitude, vs...)) +} + +// LongitudeNotIn applies the NotIn predicate on the "longitude" field. +func LongitudeNotIn(vs ...float64) predicate.Station { + return predicate.Station(sql.FieldNotIn(FieldLongitude, vs...)) +} + +// LongitudeGT applies the GT predicate on the "longitude" field. +func LongitudeGT(v float64) predicate.Station { + return predicate.Station(sql.FieldGT(FieldLongitude, v)) +} + +// LongitudeGTE applies the GTE predicate on the "longitude" field. +func LongitudeGTE(v float64) predicate.Station { + return predicate.Station(sql.FieldGTE(FieldLongitude, v)) +} + +// LongitudeLT applies the LT predicate on the "longitude" field. +func LongitudeLT(v float64) predicate.Station { + return predicate.Station(sql.FieldLT(FieldLongitude, v)) +} + +// LongitudeLTE applies the LTE predicate on the "longitude" field. +func LongitudeLTE(v float64) predicate.Station { + return predicate.Station(sql.FieldLTE(FieldLongitude, v)) +} + +// LongitudeIsNil applies the IsNil predicate on the "longitude" field. +func LongitudeIsNil() predicate.Station { + return predicate.Station(sql.FieldIsNull(FieldLongitude)) +} + +// LongitudeNotNil applies the NotNil predicate on the "longitude" field. +func LongitudeNotNil() predicate.Station { + return predicate.Station(sql.FieldNotNull(FieldLongitude)) +} + +// MorningOrderEQ applies the EQ predicate on the "morning_order" field. +func MorningOrderEQ(v int) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldMorningOrder, v)) +} + +// MorningOrderNEQ applies the NEQ predicate on the "morning_order" field. +func MorningOrderNEQ(v int) predicate.Station { + return predicate.Station(sql.FieldNEQ(FieldMorningOrder, v)) +} + +// MorningOrderIn applies the In predicate on the "morning_order" field. +func MorningOrderIn(vs ...int) predicate.Station { + return predicate.Station(sql.FieldIn(FieldMorningOrder, vs...)) +} + +// MorningOrderNotIn applies the NotIn predicate on the "morning_order" field. +func MorningOrderNotIn(vs ...int) predicate.Station { + return predicate.Station(sql.FieldNotIn(FieldMorningOrder, vs...)) +} + +// MorningOrderGT applies the GT predicate on the "morning_order" field. +func MorningOrderGT(v int) predicate.Station { + return predicate.Station(sql.FieldGT(FieldMorningOrder, v)) +} + +// MorningOrderGTE applies the GTE predicate on the "morning_order" field. +func MorningOrderGTE(v int) predicate.Station { + return predicate.Station(sql.FieldGTE(FieldMorningOrder, v)) +} + +// MorningOrderLT applies the LT predicate on the "morning_order" field. +func MorningOrderLT(v int) predicate.Station { + return predicate.Station(sql.FieldLT(FieldMorningOrder, v)) +} + +// MorningOrderLTE applies the LTE predicate on the "morning_order" field. +func MorningOrderLTE(v int) predicate.Station { + return predicate.Station(sql.FieldLTE(FieldMorningOrder, v)) +} + +// EveningOrderEQ applies the EQ predicate on the "evening_order" field. +func EveningOrderEQ(v int) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldEveningOrder, v)) +} + +// EveningOrderNEQ applies the NEQ predicate on the "evening_order" field. +func EveningOrderNEQ(v int) predicate.Station { + return predicate.Station(sql.FieldNEQ(FieldEveningOrder, v)) +} + +// EveningOrderIn applies the In predicate on the "evening_order" field. +func EveningOrderIn(vs ...int) predicate.Station { + return predicate.Station(sql.FieldIn(FieldEveningOrder, vs...)) +} + +// EveningOrderNotIn applies the NotIn predicate on the "evening_order" field. +func EveningOrderNotIn(vs ...int) predicate.Station { + return predicate.Station(sql.FieldNotIn(FieldEveningOrder, vs...)) +} + +// EveningOrderGT applies the GT predicate on the "evening_order" field. +func EveningOrderGT(v int) predicate.Station { + return predicate.Station(sql.FieldGT(FieldEveningOrder, v)) +} + +// EveningOrderGTE applies the GTE predicate on the "evening_order" field. +func EveningOrderGTE(v int) predicate.Station { + return predicate.Station(sql.FieldGTE(FieldEveningOrder, v)) +} + +// EveningOrderLT applies the LT predicate on the "evening_order" field. +func EveningOrderLT(v int) predicate.Station { + return predicate.Station(sql.FieldLT(FieldEveningOrder, v)) +} + +// EveningOrderLTE applies the LTE predicate on the "evening_order" field. +func EveningOrderLTE(v int) predicate.Station { + return predicate.Station(sql.FieldLTE(FieldEveningOrder, v)) +} + +// CreatedAtEQ applies the EQ predicate on the "created_at" field. +func CreatedAtEQ(v time.Time) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldCreatedAt, v)) +} + +// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. +func CreatedAtNEQ(v time.Time) predicate.Station { + return predicate.Station(sql.FieldNEQ(FieldCreatedAt, v)) +} + +// CreatedAtIn applies the In predicate on the "created_at" field. +func CreatedAtIn(vs ...time.Time) predicate.Station { + return predicate.Station(sql.FieldIn(FieldCreatedAt, vs...)) +} + +// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. +func CreatedAtNotIn(vs ...time.Time) predicate.Station { + return predicate.Station(sql.FieldNotIn(FieldCreatedAt, vs...)) +} + +// CreatedAtGT applies the GT predicate on the "created_at" field. +func CreatedAtGT(v time.Time) predicate.Station { + return predicate.Station(sql.FieldGT(FieldCreatedAt, v)) +} + +// CreatedAtGTE applies the GTE predicate on the "created_at" field. +func CreatedAtGTE(v time.Time) predicate.Station { + return predicate.Station(sql.FieldGTE(FieldCreatedAt, v)) +} + +// CreatedAtLT applies the LT predicate on the "created_at" field. +func CreatedAtLT(v time.Time) predicate.Station { + return predicate.Station(sql.FieldLT(FieldCreatedAt, v)) +} + +// CreatedAtLTE applies the LTE predicate on the "created_at" field. +func CreatedAtLTE(v time.Time) predicate.Station { + return predicate.Station(sql.FieldLTE(FieldCreatedAt, v)) +} + +// UpdatedAtEQ applies the EQ predicate on the "updated_at" field. +func UpdatedAtEQ(v time.Time) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field. +func UpdatedAtNEQ(v time.Time) predicate.Station { + return predicate.Station(sql.FieldNEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtIn applies the In predicate on the "updated_at" field. +func UpdatedAtIn(vs ...time.Time) predicate.Station { + return predicate.Station(sql.FieldIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field. +func UpdatedAtNotIn(vs ...time.Time) predicate.Station { + return predicate.Station(sql.FieldNotIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtGT applies the GT predicate on the "updated_at" field. +func UpdatedAtGT(v time.Time) predicate.Station { + return predicate.Station(sql.FieldGT(FieldUpdatedAt, v)) +} + +// UpdatedAtGTE applies the GTE predicate on the "updated_at" field. +func UpdatedAtGTE(v time.Time) predicate.Station { + return predicate.Station(sql.FieldGTE(FieldUpdatedAt, v)) +} + +// UpdatedAtLT applies the LT predicate on the "updated_at" field. +func UpdatedAtLT(v time.Time) predicate.Station { + return predicate.Station(sql.FieldLT(FieldUpdatedAt, v)) +} + +// UpdatedAtLTE applies the LTE predicate on the "updated_at" field. +func UpdatedAtLTE(v time.Time) predicate.Station { + return predicate.Station(sql.FieldLTE(FieldUpdatedAt, v)) +} + +// HasGuardian applies the HasEdge predicate on the "guardian" edge. +func HasGuardian() predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2O, true, GuardianTable, GuardianColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasGuardianWith applies the HasEdge predicate on the "guardian" edge with a given conditions (other predicates). +func HasGuardianWith(preds ...predicate.Guardian) predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := newGuardianStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasBus applies the HasEdge predicate on the "bus" edge. +func HasBus() predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2M, true, BusTable, BusPrimaryKey...), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasBusWith applies the HasEdge predicate on the "bus" edge with a given conditions (other predicates). +func HasBusWith(preds ...predicate.Bus) predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := newBusStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.Station) predicate.Station { + return predicate.Station(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.Station) predicate.Station { + return predicate.Station(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.Station) predicate.Station { + return predicate.Station(sql.NotPredicates(p)) +} diff --git a/backend/domain/repository/ent/station_create.go b/backend/domain/repository/ent/station_create.go new file mode 100644 index 00000000..f98a53b7 --- /dev/null +++ b/backend/domain/repository/ent/station_create.go @@ -0,0 +1,382 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// StationCreate is the builder for creating a Station entity. +type StationCreate struct { + config + mutation *StationMutation + hooks []Hook +} + +// SetLatitude sets the "latitude" field. +func (sc *StationCreate) SetLatitude(f float64) *StationCreate { + sc.mutation.SetLatitude(f) + return sc +} + +// SetNillableLatitude sets the "latitude" field if the given value is not nil. +func (sc *StationCreate) SetNillableLatitude(f *float64) *StationCreate { + if f != nil { + sc.SetLatitude(*f) + } + return sc +} + +// SetLongitude sets the "longitude" field. +func (sc *StationCreate) SetLongitude(f float64) *StationCreate { + sc.mutation.SetLongitude(f) + return sc +} + +// SetNillableLongitude sets the "longitude" field if the given value is not nil. +func (sc *StationCreate) SetNillableLongitude(f *float64) *StationCreate { + if f != nil { + sc.SetLongitude(*f) + } + return sc +} + +// SetMorningOrder sets the "morning_order" field. +func (sc *StationCreate) SetMorningOrder(i int) *StationCreate { + sc.mutation.SetMorningOrder(i) + return sc +} + +// SetEveningOrder sets the "evening_order" field. +func (sc *StationCreate) SetEveningOrder(i int) *StationCreate { + sc.mutation.SetEveningOrder(i) + return sc +} + +// SetCreatedAt sets the "created_at" field. +func (sc *StationCreate) SetCreatedAt(t time.Time) *StationCreate { + sc.mutation.SetCreatedAt(t) + return sc +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (sc *StationCreate) SetNillableCreatedAt(t *time.Time) *StationCreate { + if t != nil { + sc.SetCreatedAt(*t) + } + return sc +} + +// SetUpdatedAt sets the "updated_at" field. +func (sc *StationCreate) SetUpdatedAt(t time.Time) *StationCreate { + sc.mutation.SetUpdatedAt(t) + return sc +} + +// SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil. +func (sc *StationCreate) SetNillableUpdatedAt(t *time.Time) *StationCreate { + if t != nil { + sc.SetUpdatedAt(*t) + } + return sc +} + +// SetID sets the "id" field. +func (sc *StationCreate) SetID(u uuid.UUID) *StationCreate { + sc.mutation.SetID(u) + return sc +} + +// SetNillableID sets the "id" field if the given value is not nil. +func (sc *StationCreate) SetNillableID(u *uuid.UUID) *StationCreate { + if u != nil { + sc.SetID(*u) + } + return sc +} + +// SetGuardianID sets the "guardian" edge to the Guardian entity by ID. +func (sc *StationCreate) SetGuardianID(id uuid.UUID) *StationCreate { + sc.mutation.SetGuardianID(id) + return sc +} + +// SetNillableGuardianID sets the "guardian" edge to the Guardian entity by ID if the given value is not nil. +func (sc *StationCreate) SetNillableGuardianID(id *uuid.UUID) *StationCreate { + if id != nil { + sc = sc.SetGuardianID(*id) + } + return sc +} + +// SetGuardian sets the "guardian" edge to the Guardian entity. +func (sc *StationCreate) SetGuardian(g *Guardian) *StationCreate { + return sc.SetGuardianID(g.ID) +} + +// AddBuIDs adds the "bus" edge to the Bus entity by IDs. +func (sc *StationCreate) AddBuIDs(ids ...uuid.UUID) *StationCreate { + sc.mutation.AddBuIDs(ids...) + return sc +} + +// AddBus adds the "bus" edges to the Bus entity. +func (sc *StationCreate) AddBus(b ...*Bus) *StationCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return sc.AddBuIDs(ids...) +} + +// Mutation returns the StationMutation object of the builder. +func (sc *StationCreate) Mutation() *StationMutation { + return sc.mutation +} + +// Save creates the Station in the database. +func (sc *StationCreate) Save(ctx context.Context) (*Station, error) { + sc.defaults() + return withHooks(ctx, sc.sqlSave, sc.mutation, sc.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (sc *StationCreate) SaveX(ctx context.Context) *Station { + v, err := sc.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (sc *StationCreate) Exec(ctx context.Context) error { + _, err := sc.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (sc *StationCreate) ExecX(ctx context.Context) { + if err := sc.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (sc *StationCreate) defaults() { + if _, ok := sc.mutation.CreatedAt(); !ok { + v := station.DefaultCreatedAt() + sc.mutation.SetCreatedAt(v) + } + if _, ok := sc.mutation.UpdatedAt(); !ok { + v := station.DefaultUpdatedAt() + sc.mutation.SetUpdatedAt(v) + } + if _, ok := sc.mutation.ID(); !ok { + v := station.DefaultID() + sc.mutation.SetID(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (sc *StationCreate) check() error { + if _, ok := sc.mutation.MorningOrder(); !ok { + return &ValidationError{Name: "morning_order", err: errors.New(`ent: missing required field "Station.morning_order"`)} + } + if _, ok := sc.mutation.EveningOrder(); !ok { + return &ValidationError{Name: "evening_order", err: errors.New(`ent: missing required field "Station.evening_order"`)} + } + if _, ok := sc.mutation.CreatedAt(); !ok { + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Station.created_at"`)} + } + if _, ok := sc.mutation.UpdatedAt(); !ok { + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "Station.updated_at"`)} + } + return nil +} + +func (sc *StationCreate) sqlSave(ctx context.Context) (*Station, error) { + if err := sc.check(); err != nil { + return nil, err + } + _node, _spec := sc.createSpec() + if err := sqlgraph.CreateNode(ctx, sc.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + if _spec.ID.Value != nil { + if id, ok := _spec.ID.Value.(*uuid.UUID); ok { + _node.ID = *id + } else if err := _node.ID.Scan(_spec.ID.Value); err != nil { + return nil, err + } + } + sc.mutation.id = &_node.ID + sc.mutation.done = true + return _node, nil +} + +func (sc *StationCreate) createSpec() (*Station, *sqlgraph.CreateSpec) { + var ( + _node = &Station{config: sc.config} + _spec = sqlgraph.NewCreateSpec(station.Table, sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID)) + ) + if id, ok := sc.mutation.ID(); ok { + _node.ID = id + _spec.ID.Value = &id + } + if value, ok := sc.mutation.Latitude(); ok { + _spec.SetField(station.FieldLatitude, field.TypeFloat64, value) + _node.Latitude = value + } + if value, ok := sc.mutation.Longitude(); ok { + _spec.SetField(station.FieldLongitude, field.TypeFloat64, value) + _node.Longitude = value + } + if value, ok := sc.mutation.MorningOrder(); ok { + _spec.SetField(station.FieldMorningOrder, field.TypeInt, value) + _node.MorningOrder = value + } + if value, ok := sc.mutation.EveningOrder(); ok { + _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) + _node.EveningOrder = value + } + if value, ok := sc.mutation.CreatedAt(); ok { + _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) + _node.CreatedAt = value + } + if value, ok := sc.mutation.UpdatedAt(); ok { + _spec.SetField(station.FieldUpdatedAt, field.TypeTime, value) + _node.UpdatedAt = value + } + if nodes := sc.mutation.GuardianIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2O, + Inverse: true, + Table: station.GuardianTable, + Columns: []string{station.GuardianColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.guardian_station = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := sc.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: true, + Table: station.BusTable, + Columns: station.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// StationCreateBulk is the builder for creating many Station entities in bulk. +type StationCreateBulk struct { + config + err error + builders []*StationCreate +} + +// Save creates the Station entities in the database. +func (scb *StationCreateBulk) Save(ctx context.Context) ([]*Station, error) { + if scb.err != nil { + return nil, scb.err + } + specs := make([]*sqlgraph.CreateSpec, len(scb.builders)) + nodes := make([]*Station, len(scb.builders)) + mutators := make([]Mutator, len(scb.builders)) + for i := range scb.builders { + func(i int, root context.Context) { + builder := scb.builders[i] + builder.defaults() + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*StationMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, scb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, scb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, scb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (scb *StationCreateBulk) SaveX(ctx context.Context) []*Station { + v, err := scb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (scb *StationCreateBulk) Exec(ctx context.Context) error { + _, err := scb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (scb *StationCreateBulk) ExecX(ctx context.Context) { + if err := scb.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/station_delete.go b/backend/domain/repository/ent/station_delete.go new file mode 100644 index 00000000..e1dcfaac --- /dev/null +++ b/backend/domain/repository/ent/station_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" +) + +// StationDelete is the builder for deleting a Station entity. +type StationDelete struct { + config + hooks []Hook + mutation *StationMutation +} + +// Where appends a list predicates to the StationDelete builder. +func (sd *StationDelete) Where(ps ...predicate.Station) *StationDelete { + sd.mutation.Where(ps...) + return sd +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (sd *StationDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, sd.sqlExec, sd.mutation, sd.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (sd *StationDelete) ExecX(ctx context.Context) int { + n, err := sd.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (sd *StationDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(station.Table, sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID)) + if ps := sd.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, sd.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + sd.mutation.done = true + return affected, err +} + +// StationDeleteOne is the builder for deleting a single Station entity. +type StationDeleteOne struct { + sd *StationDelete +} + +// Where appends a list predicates to the StationDelete builder. +func (sdo *StationDeleteOne) Where(ps ...predicate.Station) *StationDeleteOne { + sdo.sd.mutation.Where(ps...) + return sdo +} + +// Exec executes the deletion query. +func (sdo *StationDeleteOne) Exec(ctx context.Context) error { + n, err := sdo.sd.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{station.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (sdo *StationDeleteOne) ExecX(ctx context.Context) { + if err := sdo.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/station_query.go b/backend/domain/repository/ent/station_query.go new file mode 100644 index 00000000..40d3a8b5 --- /dev/null +++ b/backend/domain/repository/ent/station_query.go @@ -0,0 +1,720 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "database/sql/driver" + "fmt" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// StationQuery is the builder for querying Station entities. +type StationQuery struct { + config + ctx *QueryContext + order []station.OrderOption + inters []Interceptor + predicates []predicate.Station + withGuardian *GuardianQuery + withBus *BusQuery + withFKs bool + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the StationQuery builder. +func (sq *StationQuery) Where(ps ...predicate.Station) *StationQuery { + sq.predicates = append(sq.predicates, ps...) + return sq +} + +// Limit the number of records to be returned by this query. +func (sq *StationQuery) Limit(limit int) *StationQuery { + sq.ctx.Limit = &limit + return sq +} + +// Offset to start from. +func (sq *StationQuery) Offset(offset int) *StationQuery { + sq.ctx.Offset = &offset + return sq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (sq *StationQuery) Unique(unique bool) *StationQuery { + sq.ctx.Unique = &unique + return sq +} + +// Order specifies how the records should be ordered. +func (sq *StationQuery) Order(o ...station.OrderOption) *StationQuery { + sq.order = append(sq.order, o...) + return sq +} + +// QueryGuardian chains the current query on the "guardian" edge. +func (sq *StationQuery) QueryGuardian() *GuardianQuery { + query := (&GuardianClient{config: sq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := sq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := sq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, selector), + sqlgraph.To(guardian.Table, guardian.FieldID), + sqlgraph.Edge(sqlgraph.O2O, true, station.GuardianTable, station.GuardianColumn), + ) + fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryBus chains the current query on the "bus" edge. +func (sq *StationQuery) QueryBus() *BusQuery { + query := (&BusClient{config: sq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := sq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := sq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, selector), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.M2M, true, station.BusTable, station.BusPrimaryKey...), + ) + fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first Station entity from the query. +// Returns a *NotFoundError when no Station was found. +func (sq *StationQuery) First(ctx context.Context) (*Station, error) { + nodes, err := sq.Limit(1).All(setContextOp(ctx, sq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{station.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (sq *StationQuery) FirstX(ctx context.Context) *Station { + node, err := sq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first Station ID from the query. +// Returns a *NotFoundError when no Station ID was found. +func (sq *StationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = sq.Limit(1).IDs(setContextOp(ctx, sq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{station.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (sq *StationQuery) FirstIDX(ctx context.Context) uuid.UUID { + id, err := sq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single Station entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one Station entity is found. +// Returns a *NotFoundError when no Station entities are found. +func (sq *StationQuery) Only(ctx context.Context) (*Station, error) { + nodes, err := sq.Limit(2).All(setContextOp(ctx, sq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{station.Label} + default: + return nil, &NotSingularError{station.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (sq *StationQuery) OnlyX(ctx context.Context) *Station { + node, err := sq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only Station ID in the query. +// Returns a *NotSingularError when more than one Station ID is found. +// Returns a *NotFoundError when no entities are found. +func (sq *StationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = sq.Limit(2).IDs(setContextOp(ctx, sq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{station.Label} + default: + err = &NotSingularError{station.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (sq *StationQuery) OnlyIDX(ctx context.Context) uuid.UUID { + id, err := sq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of Stations. +func (sq *StationQuery) All(ctx context.Context) ([]*Station, error) { + ctx = setContextOp(ctx, sq.ctx, "All") + if err := sq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*Station, *StationQuery]() + return withInterceptors[[]*Station](ctx, sq, qr, sq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (sq *StationQuery) AllX(ctx context.Context) []*Station { + nodes, err := sq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of Station IDs. +func (sq *StationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error) { + if sq.ctx.Unique == nil && sq.path != nil { + sq.Unique(true) + } + ctx = setContextOp(ctx, sq.ctx, "IDs") + if err = sq.Select(station.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (sq *StationQuery) IDsX(ctx context.Context) []uuid.UUID { + ids, err := sq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (sq *StationQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, sq.ctx, "Count") + if err := sq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, sq, querierCount[*StationQuery](), sq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (sq *StationQuery) CountX(ctx context.Context) int { + count, err := sq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (sq *StationQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, sq.ctx, "Exist") + switch _, err := sq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (sq *StationQuery) ExistX(ctx context.Context) bool { + exist, err := sq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the StationQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (sq *StationQuery) Clone() *StationQuery { + if sq == nil { + return nil + } + return &StationQuery{ + config: sq.config, + ctx: sq.ctx.Clone(), + order: append([]station.OrderOption{}, sq.order...), + inters: append([]Interceptor{}, sq.inters...), + predicates: append([]predicate.Station{}, sq.predicates...), + withGuardian: sq.withGuardian.Clone(), + withBus: sq.withBus.Clone(), + // clone intermediate query. + sql: sq.sql.Clone(), + path: sq.path, + } +} + +// WithGuardian tells the query-builder to eager-load the nodes that are connected to +// the "guardian" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithGuardian(opts ...func(*GuardianQuery)) *StationQuery { + query := (&GuardianClient{config: sq.config}).Query() + for _, opt := range opts { + opt(query) + } + sq.withGuardian = query + return sq +} + +// WithBus tells the query-builder to eager-load the nodes that are connected to +// the "bus" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithBus(opts ...func(*BusQuery)) *StationQuery { + query := (&BusClient{config: sq.config}).Query() + for _, opt := range opts { + opt(query) + } + sq.withBus = query + return sq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// Latitude float64 `json:"latitude,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.Station.Query(). +// GroupBy(station.FieldLatitude). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (sq *StationQuery) GroupBy(field string, fields ...string) *StationGroupBy { + sq.ctx.Fields = append([]string{field}, fields...) + grbuild := &StationGroupBy{build: sq} + grbuild.flds = &sq.ctx.Fields + grbuild.label = station.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// Latitude float64 `json:"latitude,omitempty"` +// } +// +// client.Station.Query(). +// Select(station.FieldLatitude). +// Scan(ctx, &v) +func (sq *StationQuery) Select(fields ...string) *StationSelect { + sq.ctx.Fields = append(sq.ctx.Fields, fields...) + sbuild := &StationSelect{StationQuery: sq} + sbuild.label = station.Label + sbuild.flds, sbuild.scan = &sq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a StationSelect configured with the given aggregations. +func (sq *StationQuery) Aggregate(fns ...AggregateFunc) *StationSelect { + return sq.Select().Aggregate(fns...) +} + +func (sq *StationQuery) prepareQuery(ctx context.Context) error { + for _, inter := range sq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, sq); err != nil { + return err + } + } + } + for _, f := range sq.ctx.Fields { + if !station.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if sq.path != nil { + prev, err := sq.path(ctx) + if err != nil { + return err + } + sq.sql = prev + } + return nil +} + +func (sq *StationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Station, error) { + var ( + nodes = []*Station{} + withFKs = sq.withFKs + _spec = sq.querySpec() + loadedTypes = [2]bool{ + sq.withGuardian != nil, + sq.withBus != nil, + } + ) + if sq.withGuardian != nil { + withFKs = true + } + if withFKs { + _spec.Node.Columns = append(_spec.Node.Columns, station.ForeignKeys...) + } + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*Station).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &Station{config: sq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, sq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := sq.withGuardian; query != nil { + if err := sq.loadGuardian(ctx, query, nodes, nil, + func(n *Station, e *Guardian) { n.Edges.Guardian = e }); err != nil { + return nil, err + } + } + if query := sq.withBus; query != nil { + if err := sq.loadBus(ctx, query, nodes, + func(n *Station) { n.Edges.Bus = []*Bus{} }, + func(n *Station, e *Bus) { n.Edges.Bus = append(n.Edges.Bus, e) }); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (sq *StationQuery) loadGuardian(ctx context.Context, query *GuardianQuery, nodes []*Station, init func(*Station), assign func(*Station, *Guardian)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Station) + for i := range nodes { + if nodes[i].guardian_station == nil { + continue + } + fk := *nodes[i].guardian_station + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(guardian.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "guardian_station" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (sq *StationQuery) loadBus(ctx context.Context, query *BusQuery, nodes []*Station, init func(*Station), assign func(*Station, *Bus)) error { + edgeIDs := make([]driver.Value, len(nodes)) + byID := make(map[uuid.UUID]*Station) + nids := make(map[uuid.UUID]map[*Station]struct{}) + for i, node := range nodes { + edgeIDs[i] = node.ID + byID[node.ID] = node + if init != nil { + init(node) + } + } + query.Where(func(s *sql.Selector) { + joinT := sql.Table(station.BusTable) + s.Join(joinT).On(s.C(bus.FieldID), joinT.C(station.BusPrimaryKey[0])) + s.Where(sql.InValues(joinT.C(station.BusPrimaryKey[1]), edgeIDs...)) + columns := s.SelectedColumns() + s.Select(joinT.C(station.BusPrimaryKey[1])) + s.AppendSelect(columns...) + s.SetDistinct(false) + }) + if err := query.prepareQuery(ctx); err != nil { + return err + } + qr := QuerierFunc(func(ctx context.Context, q Query) (Value, error) { + return query.sqlAll(ctx, func(_ context.Context, spec *sqlgraph.QuerySpec) { + assign := spec.Assign + values := spec.ScanValues + spec.ScanValues = func(columns []string) ([]any, error) { + values, err := values(columns[1:]) + if err != nil { + return nil, err + } + return append([]any{new(uuid.UUID)}, values...), nil + } + spec.Assign = func(columns []string, values []any) error { + outValue := *values[0].(*uuid.UUID) + inValue := *values[1].(*uuid.UUID) + if nids[inValue] == nil { + nids[inValue] = map[*Station]struct{}{byID[outValue]: {}} + return assign(columns[1:], values[1:]) + } + nids[inValue][byID[outValue]] = struct{}{} + return nil + } + }) + }) + neighbors, err := withInterceptors[[]*Bus](ctx, query, qr, query.inters) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nids[n.ID] + if !ok { + return fmt.Errorf(`unexpected "bus" node returned %v`, n.ID) + } + for kn := range nodes { + assign(kn, n) + } + } + return nil +} + +func (sq *StationQuery) sqlCount(ctx context.Context) (int, error) { + _spec := sq.querySpec() + _spec.Node.Columns = sq.ctx.Fields + if len(sq.ctx.Fields) > 0 { + _spec.Unique = sq.ctx.Unique != nil && *sq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, sq.driver, _spec) +} + +func (sq *StationQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(station.Table, station.Columns, sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID)) + _spec.From = sq.sql + if unique := sq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if sq.path != nil { + _spec.Unique = true + } + if fields := sq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, station.FieldID) + for i := range fields { + if fields[i] != station.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + } + if ps := sq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := sq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := sq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := sq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (sq *StationQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(sq.driver.Dialect()) + t1 := builder.Table(station.Table) + columns := sq.ctx.Fields + if len(columns) == 0 { + columns = station.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if sq.sql != nil { + selector = sq.sql + selector.Select(selector.Columns(columns...)...) + } + if sq.ctx.Unique != nil && *sq.ctx.Unique { + selector.Distinct() + } + for _, p := range sq.predicates { + p(selector) + } + for _, p := range sq.order { + p(selector) + } + if offset := sq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := sq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// StationGroupBy is the group-by builder for Station entities. +type StationGroupBy struct { + selector + build *StationQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (sgb *StationGroupBy) Aggregate(fns ...AggregateFunc) *StationGroupBy { + sgb.fns = append(sgb.fns, fns...) + return sgb +} + +// Scan applies the selector query and scans the result into the given value. +func (sgb *StationGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, sgb.build.ctx, "GroupBy") + if err := sgb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*StationQuery, *StationGroupBy](ctx, sgb.build, sgb, sgb.build.inters, v) +} + +func (sgb *StationGroupBy) sqlScan(ctx context.Context, root *StationQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(sgb.fns)) + for _, fn := range sgb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*sgb.flds)+len(sgb.fns)) + for _, f := range *sgb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*sgb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := sgb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// StationSelect is the builder for selecting fields of Station entities. +type StationSelect struct { + *StationQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (ss *StationSelect) Aggregate(fns ...AggregateFunc) *StationSelect { + ss.fns = append(ss.fns, fns...) + return ss +} + +// Scan applies the selector query and scans the result into the given value. +func (ss *StationSelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, ss.ctx, "Select") + if err := ss.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*StationQuery, *StationSelect](ctx, ss.StationQuery, ss, ss.inters, v) +} + +func (ss *StationSelect) sqlScan(ctx context.Context, root *StationQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(ss.fns)) + for _, fn := range ss.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*ss.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := ss.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/backend/domain/repository/ent/station_update.go b/backend/domain/repository/ent/station_update.go new file mode 100644 index 00000000..d3fc2669 --- /dev/null +++ b/backend/domain/repository/ent/station_update.go @@ -0,0 +1,771 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// StationUpdate is the builder for updating Station entities. +type StationUpdate struct { + config + hooks []Hook + mutation *StationMutation +} + +// Where appends a list predicates to the StationUpdate builder. +func (su *StationUpdate) Where(ps ...predicate.Station) *StationUpdate { + su.mutation.Where(ps...) + return su +} + +// SetLatitude sets the "latitude" field. +func (su *StationUpdate) SetLatitude(f float64) *StationUpdate { + su.mutation.ResetLatitude() + su.mutation.SetLatitude(f) + return su +} + +// SetNillableLatitude sets the "latitude" field if the given value is not nil. +func (su *StationUpdate) SetNillableLatitude(f *float64) *StationUpdate { + if f != nil { + su.SetLatitude(*f) + } + return su +} + +// AddLatitude adds f to the "latitude" field. +func (su *StationUpdate) AddLatitude(f float64) *StationUpdate { + su.mutation.AddLatitude(f) + return su +} + +// ClearLatitude clears the value of the "latitude" field. +func (su *StationUpdate) ClearLatitude() *StationUpdate { + su.mutation.ClearLatitude() + return su +} + +// SetLongitude sets the "longitude" field. +func (su *StationUpdate) SetLongitude(f float64) *StationUpdate { + su.mutation.ResetLongitude() + su.mutation.SetLongitude(f) + return su +} + +// SetNillableLongitude sets the "longitude" field if the given value is not nil. +func (su *StationUpdate) SetNillableLongitude(f *float64) *StationUpdate { + if f != nil { + su.SetLongitude(*f) + } + return su +} + +// AddLongitude adds f to the "longitude" field. +func (su *StationUpdate) AddLongitude(f float64) *StationUpdate { + su.mutation.AddLongitude(f) + return su +} + +// ClearLongitude clears the value of the "longitude" field. +func (su *StationUpdate) ClearLongitude() *StationUpdate { + su.mutation.ClearLongitude() + return su +} + +// SetMorningOrder sets the "morning_order" field. +func (su *StationUpdate) SetMorningOrder(i int) *StationUpdate { + su.mutation.ResetMorningOrder() + su.mutation.SetMorningOrder(i) + return su +} + +// SetNillableMorningOrder sets the "morning_order" field if the given value is not nil. +func (su *StationUpdate) SetNillableMorningOrder(i *int) *StationUpdate { + if i != nil { + su.SetMorningOrder(*i) + } + return su +} + +// AddMorningOrder adds i to the "morning_order" field. +func (su *StationUpdate) AddMorningOrder(i int) *StationUpdate { + su.mutation.AddMorningOrder(i) + return su +} + +// SetEveningOrder sets the "evening_order" field. +func (su *StationUpdate) SetEveningOrder(i int) *StationUpdate { + su.mutation.ResetEveningOrder() + su.mutation.SetEveningOrder(i) + return su +} + +// SetNillableEveningOrder sets the "evening_order" field if the given value is not nil. +func (su *StationUpdate) SetNillableEveningOrder(i *int) *StationUpdate { + if i != nil { + su.SetEveningOrder(*i) + } + return su +} + +// AddEveningOrder adds i to the "evening_order" field. +func (su *StationUpdate) AddEveningOrder(i int) *StationUpdate { + su.mutation.AddEveningOrder(i) + return su +} + +// SetCreatedAt sets the "created_at" field. +func (su *StationUpdate) SetCreatedAt(t time.Time) *StationUpdate { + su.mutation.SetCreatedAt(t) + return su +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (su *StationUpdate) SetNillableCreatedAt(t *time.Time) *StationUpdate { + if t != nil { + su.SetCreatedAt(*t) + } + return su +} + +// SetUpdatedAt sets the "updated_at" field. +func (su *StationUpdate) SetUpdatedAt(t time.Time) *StationUpdate { + su.mutation.SetUpdatedAt(t) + return su +} + +// SetGuardianID sets the "guardian" edge to the Guardian entity by ID. +func (su *StationUpdate) SetGuardianID(id uuid.UUID) *StationUpdate { + su.mutation.SetGuardianID(id) + return su +} + +// SetNillableGuardianID sets the "guardian" edge to the Guardian entity by ID if the given value is not nil. +func (su *StationUpdate) SetNillableGuardianID(id *uuid.UUID) *StationUpdate { + if id != nil { + su = su.SetGuardianID(*id) + } + return su +} + +// SetGuardian sets the "guardian" edge to the Guardian entity. +func (su *StationUpdate) SetGuardian(g *Guardian) *StationUpdate { + return su.SetGuardianID(g.ID) +} + +// AddBuIDs adds the "bus" edge to the Bus entity by IDs. +func (su *StationUpdate) AddBuIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.AddBuIDs(ids...) + return su +} + +// AddBus adds the "bus" edges to the Bus entity. +func (su *StationUpdate) AddBus(b ...*Bus) *StationUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return su.AddBuIDs(ids...) +} + +// Mutation returns the StationMutation object of the builder. +func (su *StationUpdate) Mutation() *StationMutation { + return su.mutation +} + +// ClearGuardian clears the "guardian" edge to the Guardian entity. +func (su *StationUpdate) ClearGuardian() *StationUpdate { + su.mutation.ClearGuardian() + return su +} + +// ClearBus clears all "bus" edges to the Bus entity. +func (su *StationUpdate) ClearBus() *StationUpdate { + su.mutation.ClearBus() + return su +} + +// RemoveBuIDs removes the "bus" edge to Bus entities by IDs. +func (su *StationUpdate) RemoveBuIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.RemoveBuIDs(ids...) + return su +} + +// RemoveBus removes "bus" edges to Bus entities. +func (su *StationUpdate) RemoveBus(b ...*Bus) *StationUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return su.RemoveBuIDs(ids...) +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (su *StationUpdate) Save(ctx context.Context) (int, error) { + su.defaults() + return withHooks(ctx, su.sqlSave, su.mutation, su.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (su *StationUpdate) SaveX(ctx context.Context) int { + affected, err := su.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (su *StationUpdate) Exec(ctx context.Context) error { + _, err := su.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (su *StationUpdate) ExecX(ctx context.Context) { + if err := su.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (su *StationUpdate) defaults() { + if _, ok := su.mutation.UpdatedAt(); !ok { + v := station.UpdateDefaultUpdatedAt() + su.mutation.SetUpdatedAt(v) + } +} + +func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { + _spec := sqlgraph.NewUpdateSpec(station.Table, station.Columns, sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID)) + if ps := su.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := su.mutation.Latitude(); ok { + _spec.SetField(station.FieldLatitude, field.TypeFloat64, value) + } + if value, ok := su.mutation.AddedLatitude(); ok { + _spec.AddField(station.FieldLatitude, field.TypeFloat64, value) + } + if su.mutation.LatitudeCleared() { + _spec.ClearField(station.FieldLatitude, field.TypeFloat64) + } + if value, ok := su.mutation.Longitude(); ok { + _spec.SetField(station.FieldLongitude, field.TypeFloat64, value) + } + if value, ok := su.mutation.AddedLongitude(); ok { + _spec.AddField(station.FieldLongitude, field.TypeFloat64, value) + } + if su.mutation.LongitudeCleared() { + _spec.ClearField(station.FieldLongitude, field.TypeFloat64) + } + if value, ok := su.mutation.MorningOrder(); ok { + _spec.SetField(station.FieldMorningOrder, field.TypeInt, value) + } + if value, ok := su.mutation.AddedMorningOrder(); ok { + _spec.AddField(station.FieldMorningOrder, field.TypeInt, value) + } + if value, ok := su.mutation.EveningOrder(); ok { + _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) + } + if value, ok := su.mutation.AddedEveningOrder(); ok { + _spec.AddField(station.FieldEveningOrder, field.TypeInt, value) + } + if value, ok := su.mutation.CreatedAt(); ok { + _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := su.mutation.UpdatedAt(); ok { + _spec.SetField(station.FieldUpdatedAt, field.TypeTime, value) + } + if su.mutation.GuardianCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2O, + Inverse: true, + Table: station.GuardianTable, + Columns: []string{station.GuardianColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.GuardianIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2O, + Inverse: true, + Table: station.GuardianTable, + Columns: []string{station.GuardianColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if su.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: true, + Table: station.BusTable, + Columns: station.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.RemovedBusIDs(); len(nodes) > 0 && !su.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: true, + Table: station.BusTable, + Columns: station.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: true, + Table: station.BusTable, + Columns: station.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if n, err = sqlgraph.UpdateNodes(ctx, su.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{station.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + su.mutation.done = true + return n, nil +} + +// StationUpdateOne is the builder for updating a single Station entity. +type StationUpdateOne struct { + config + fields []string + hooks []Hook + mutation *StationMutation +} + +// SetLatitude sets the "latitude" field. +func (suo *StationUpdateOne) SetLatitude(f float64) *StationUpdateOne { + suo.mutation.ResetLatitude() + suo.mutation.SetLatitude(f) + return suo +} + +// SetNillableLatitude sets the "latitude" field if the given value is not nil. +func (suo *StationUpdateOne) SetNillableLatitude(f *float64) *StationUpdateOne { + if f != nil { + suo.SetLatitude(*f) + } + return suo +} + +// AddLatitude adds f to the "latitude" field. +func (suo *StationUpdateOne) AddLatitude(f float64) *StationUpdateOne { + suo.mutation.AddLatitude(f) + return suo +} + +// ClearLatitude clears the value of the "latitude" field. +func (suo *StationUpdateOne) ClearLatitude() *StationUpdateOne { + suo.mutation.ClearLatitude() + return suo +} + +// SetLongitude sets the "longitude" field. +func (suo *StationUpdateOne) SetLongitude(f float64) *StationUpdateOne { + suo.mutation.ResetLongitude() + suo.mutation.SetLongitude(f) + return suo +} + +// SetNillableLongitude sets the "longitude" field if the given value is not nil. +func (suo *StationUpdateOne) SetNillableLongitude(f *float64) *StationUpdateOne { + if f != nil { + suo.SetLongitude(*f) + } + return suo +} + +// AddLongitude adds f to the "longitude" field. +func (suo *StationUpdateOne) AddLongitude(f float64) *StationUpdateOne { + suo.mutation.AddLongitude(f) + return suo +} + +// ClearLongitude clears the value of the "longitude" field. +func (suo *StationUpdateOne) ClearLongitude() *StationUpdateOne { + suo.mutation.ClearLongitude() + return suo +} + +// SetMorningOrder sets the "morning_order" field. +func (suo *StationUpdateOne) SetMorningOrder(i int) *StationUpdateOne { + suo.mutation.ResetMorningOrder() + suo.mutation.SetMorningOrder(i) + return suo +} + +// SetNillableMorningOrder sets the "morning_order" field if the given value is not nil. +func (suo *StationUpdateOne) SetNillableMorningOrder(i *int) *StationUpdateOne { + if i != nil { + suo.SetMorningOrder(*i) + } + return suo +} + +// AddMorningOrder adds i to the "morning_order" field. +func (suo *StationUpdateOne) AddMorningOrder(i int) *StationUpdateOne { + suo.mutation.AddMorningOrder(i) + return suo +} + +// SetEveningOrder sets the "evening_order" field. +func (suo *StationUpdateOne) SetEveningOrder(i int) *StationUpdateOne { + suo.mutation.ResetEveningOrder() + suo.mutation.SetEveningOrder(i) + return suo +} + +// SetNillableEveningOrder sets the "evening_order" field if the given value is not nil. +func (suo *StationUpdateOne) SetNillableEveningOrder(i *int) *StationUpdateOne { + if i != nil { + suo.SetEveningOrder(*i) + } + return suo +} + +// AddEveningOrder adds i to the "evening_order" field. +func (suo *StationUpdateOne) AddEveningOrder(i int) *StationUpdateOne { + suo.mutation.AddEveningOrder(i) + return suo +} + +// SetCreatedAt sets the "created_at" field. +func (suo *StationUpdateOne) SetCreatedAt(t time.Time) *StationUpdateOne { + suo.mutation.SetCreatedAt(t) + return suo +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (suo *StationUpdateOne) SetNillableCreatedAt(t *time.Time) *StationUpdateOne { + if t != nil { + suo.SetCreatedAt(*t) + } + return suo +} + +// SetUpdatedAt sets the "updated_at" field. +func (suo *StationUpdateOne) SetUpdatedAt(t time.Time) *StationUpdateOne { + suo.mutation.SetUpdatedAt(t) + return suo +} + +// SetGuardianID sets the "guardian" edge to the Guardian entity by ID. +func (suo *StationUpdateOne) SetGuardianID(id uuid.UUID) *StationUpdateOne { + suo.mutation.SetGuardianID(id) + return suo +} + +// SetNillableGuardianID sets the "guardian" edge to the Guardian entity by ID if the given value is not nil. +func (suo *StationUpdateOne) SetNillableGuardianID(id *uuid.UUID) *StationUpdateOne { + if id != nil { + suo = suo.SetGuardianID(*id) + } + return suo +} + +// SetGuardian sets the "guardian" edge to the Guardian entity. +func (suo *StationUpdateOne) SetGuardian(g *Guardian) *StationUpdateOne { + return suo.SetGuardianID(g.ID) +} + +// AddBuIDs adds the "bus" edge to the Bus entity by IDs. +func (suo *StationUpdateOne) AddBuIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.AddBuIDs(ids...) + return suo +} + +// AddBus adds the "bus" edges to the Bus entity. +func (suo *StationUpdateOne) AddBus(b ...*Bus) *StationUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return suo.AddBuIDs(ids...) +} + +// Mutation returns the StationMutation object of the builder. +func (suo *StationUpdateOne) Mutation() *StationMutation { + return suo.mutation +} + +// ClearGuardian clears the "guardian" edge to the Guardian entity. +func (suo *StationUpdateOne) ClearGuardian() *StationUpdateOne { + suo.mutation.ClearGuardian() + return suo +} + +// ClearBus clears all "bus" edges to the Bus entity. +func (suo *StationUpdateOne) ClearBus() *StationUpdateOne { + suo.mutation.ClearBus() + return suo +} + +// RemoveBuIDs removes the "bus" edge to Bus entities by IDs. +func (suo *StationUpdateOne) RemoveBuIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.RemoveBuIDs(ids...) + return suo +} + +// RemoveBus removes "bus" edges to Bus entities. +func (suo *StationUpdateOne) RemoveBus(b ...*Bus) *StationUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return suo.RemoveBuIDs(ids...) +} + +// Where appends a list predicates to the StationUpdate builder. +func (suo *StationUpdateOne) Where(ps ...predicate.Station) *StationUpdateOne { + suo.mutation.Where(ps...) + return suo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (suo *StationUpdateOne) Select(field string, fields ...string) *StationUpdateOne { + suo.fields = append([]string{field}, fields...) + return suo +} + +// Save executes the query and returns the updated Station entity. +func (suo *StationUpdateOne) Save(ctx context.Context) (*Station, error) { + suo.defaults() + return withHooks(ctx, suo.sqlSave, suo.mutation, suo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (suo *StationUpdateOne) SaveX(ctx context.Context) *Station { + node, err := suo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (suo *StationUpdateOne) Exec(ctx context.Context) error { + _, err := suo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (suo *StationUpdateOne) ExecX(ctx context.Context) { + if err := suo.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (suo *StationUpdateOne) defaults() { + if _, ok := suo.mutation.UpdatedAt(); !ok { + v := station.UpdateDefaultUpdatedAt() + suo.mutation.SetUpdatedAt(v) + } +} + +func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err error) { + _spec := sqlgraph.NewUpdateSpec(station.Table, station.Columns, sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID)) + id, ok := suo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Station.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := suo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, station.FieldID) + for _, f := range fields { + if !station.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != station.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := suo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := suo.mutation.Latitude(); ok { + _spec.SetField(station.FieldLatitude, field.TypeFloat64, value) + } + if value, ok := suo.mutation.AddedLatitude(); ok { + _spec.AddField(station.FieldLatitude, field.TypeFloat64, value) + } + if suo.mutation.LatitudeCleared() { + _spec.ClearField(station.FieldLatitude, field.TypeFloat64) + } + if value, ok := suo.mutation.Longitude(); ok { + _spec.SetField(station.FieldLongitude, field.TypeFloat64, value) + } + if value, ok := suo.mutation.AddedLongitude(); ok { + _spec.AddField(station.FieldLongitude, field.TypeFloat64, value) + } + if suo.mutation.LongitudeCleared() { + _spec.ClearField(station.FieldLongitude, field.TypeFloat64) + } + if value, ok := suo.mutation.MorningOrder(); ok { + _spec.SetField(station.FieldMorningOrder, field.TypeInt, value) + } + if value, ok := suo.mutation.AddedMorningOrder(); ok { + _spec.AddField(station.FieldMorningOrder, field.TypeInt, value) + } + if value, ok := suo.mutation.EveningOrder(); ok { + _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) + } + if value, ok := suo.mutation.AddedEveningOrder(); ok { + _spec.AddField(station.FieldEveningOrder, field.TypeInt, value) + } + if value, ok := suo.mutation.CreatedAt(); ok { + _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := suo.mutation.UpdatedAt(); ok { + _spec.SetField(station.FieldUpdatedAt, field.TypeTime, value) + } + if suo.mutation.GuardianCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2O, + Inverse: true, + Table: station.GuardianTable, + Columns: []string{station.GuardianColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.GuardianIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2O, + Inverse: true, + Table: station.GuardianTable, + Columns: []string{station.GuardianColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(guardian.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if suo.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: true, + Table: station.BusTable, + Columns: station.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.RemovedBusIDs(); len(nodes) > 0 && !suo.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: true, + Table: station.BusTable, + Columns: station.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: true, + Table: station.BusTable, + Columns: station.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + _node = &Station{config: suo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, suo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{station.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + suo.mutation.done = true + return _node, nil +} diff --git a/backend/domain/repository/ent/tx.go b/backend/domain/repository/ent/tx.go new file mode 100644 index 00000000..4fdd2ad6 --- /dev/null +++ b/backend/domain/repository/ent/tx.go @@ -0,0 +1,231 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "sync" + + "entgo.io/ent/dialect" +) + +// Tx is a transactional client that is created by calling Client.Tx(). +type Tx struct { + config + // BoardingRecord is the client for interacting with the BoardingRecord builders. + BoardingRecord *BoardingRecordClient + // Bus is the client for interacting with the Bus builders. + Bus *BusClient + // Child is the client for interacting with the Child builders. + Child *ChildClient + // ChildBusAssociation is the client for interacting with the ChildBusAssociation builders. + ChildBusAssociation *ChildBusAssociationClient + // ChildPhoto is the client for interacting with the ChildPhoto builders. + ChildPhoto *ChildPhotoClient + // Guardian is the client for interacting with the Guardian builders. + Guardian *GuardianClient + // Nursery is the client for interacting with the Nursery builders. + Nursery *NurseryClient + // Station is the client for interacting with the Station builders. + Station *StationClient + + // lazily loaded. + client *Client + clientOnce sync.Once + // ctx lives for the life of the transaction. It is + // the same context used by the underlying connection. + ctx context.Context +} + +type ( + // Committer is the interface that wraps the Commit method. + Committer interface { + Commit(context.Context, *Tx) error + } + + // The CommitFunc type is an adapter to allow the use of ordinary + // function as a Committer. If f is a function with the appropriate + // signature, CommitFunc(f) is a Committer that calls f. + CommitFunc func(context.Context, *Tx) error + + // CommitHook defines the "commit middleware". A function that gets a Committer + // and returns a Committer. For example: + // + // hook := func(next ent.Committer) ent.Committer { + // return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { + // // Do some stuff before. + // if err := next.Commit(ctx, tx); err != nil { + // return err + // } + // // Do some stuff after. + // return nil + // }) + // } + // + CommitHook func(Committer) Committer +) + +// Commit calls f(ctx, m). +func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error { + return f(ctx, tx) +} + +// Commit commits the transaction. +func (tx *Tx) Commit() error { + txDriver := tx.config.driver.(*txDriver) + var fn Committer = CommitFunc(func(context.Context, *Tx) error { + return txDriver.tx.Commit() + }) + txDriver.mu.Lock() + hooks := append([]CommitHook(nil), txDriver.onCommit...) + txDriver.mu.Unlock() + for i := len(hooks) - 1; i >= 0; i-- { + fn = hooks[i](fn) + } + return fn.Commit(tx.ctx, tx) +} + +// OnCommit adds a hook to call on commit. +func (tx *Tx) OnCommit(f CommitHook) { + txDriver := tx.config.driver.(*txDriver) + txDriver.mu.Lock() + txDriver.onCommit = append(txDriver.onCommit, f) + txDriver.mu.Unlock() +} + +type ( + // Rollbacker is the interface that wraps the Rollback method. + Rollbacker interface { + Rollback(context.Context, *Tx) error + } + + // The RollbackFunc type is an adapter to allow the use of ordinary + // function as a Rollbacker. If f is a function with the appropriate + // signature, RollbackFunc(f) is a Rollbacker that calls f. + RollbackFunc func(context.Context, *Tx) error + + // RollbackHook defines the "rollback middleware". A function that gets a Rollbacker + // and returns a Rollbacker. For example: + // + // hook := func(next ent.Rollbacker) ent.Rollbacker { + // return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { + // // Do some stuff before. + // if err := next.Rollback(ctx, tx); err != nil { + // return err + // } + // // Do some stuff after. + // return nil + // }) + // } + // + RollbackHook func(Rollbacker) Rollbacker +) + +// Rollback calls f(ctx, m). +func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error { + return f(ctx, tx) +} + +// Rollback rollbacks the transaction. +func (tx *Tx) Rollback() error { + txDriver := tx.config.driver.(*txDriver) + var fn Rollbacker = RollbackFunc(func(context.Context, *Tx) error { + return txDriver.tx.Rollback() + }) + txDriver.mu.Lock() + hooks := append([]RollbackHook(nil), txDriver.onRollback...) + txDriver.mu.Unlock() + for i := len(hooks) - 1; i >= 0; i-- { + fn = hooks[i](fn) + } + return fn.Rollback(tx.ctx, tx) +} + +// OnRollback adds a hook to call on rollback. +func (tx *Tx) OnRollback(f RollbackHook) { + txDriver := tx.config.driver.(*txDriver) + txDriver.mu.Lock() + txDriver.onRollback = append(txDriver.onRollback, f) + txDriver.mu.Unlock() +} + +// Client returns a Client that binds to current transaction. +func (tx *Tx) Client() *Client { + tx.clientOnce.Do(func() { + tx.client = &Client{config: tx.config} + tx.client.init() + }) + return tx.client +} + +func (tx *Tx) init() { + tx.BoardingRecord = NewBoardingRecordClient(tx.config) + tx.Bus = NewBusClient(tx.config) + tx.Child = NewChildClient(tx.config) + tx.ChildBusAssociation = NewChildBusAssociationClient(tx.config) + tx.ChildPhoto = NewChildPhotoClient(tx.config) + tx.Guardian = NewGuardianClient(tx.config) + tx.Nursery = NewNurseryClient(tx.config) + tx.Station = NewStationClient(tx.config) +} + +// txDriver wraps the given dialect.Tx with a nop dialect.Driver implementation. +// The idea is to support transactions without adding any extra code to the builders. +// When a builder calls to driver.Tx(), it gets the same dialect.Tx instance. +// Commit and Rollback are nop for the internal builders and the user must call one +// of them in order to commit or rollback the transaction. +// +// If a closed transaction is embedded in one of the generated entities, and the entity +// applies a query, for example: BoardingRecord.QueryXXX(), the query will be executed +// through the driver which created this transaction. +// +// Note that txDriver is not goroutine safe. +type txDriver struct { + // the driver we started the transaction from. + drv dialect.Driver + // tx is the underlying transaction. + tx dialect.Tx + // completion hooks. + mu sync.Mutex + onCommit []CommitHook + onRollback []RollbackHook +} + +// newTx creates a new transactional driver. +func newTx(ctx context.Context, drv dialect.Driver) (*txDriver, error) { + tx, err := drv.Tx(ctx) + if err != nil { + return nil, err + } + return &txDriver{tx: tx, drv: drv}, nil +} + +// Tx returns the transaction wrapper (txDriver) to avoid Commit or Rollback calls +// from the internal builders. Should be called only by the internal builders. +func (tx *txDriver) Tx(context.Context) (dialect.Tx, error) { return tx, nil } + +// Dialect returns the dialect of the driver we started the transaction from. +func (tx *txDriver) Dialect() string { return tx.drv.Dialect() } + +// Close is a nop close. +func (*txDriver) Close() error { return nil } + +// Commit is a nop commit for the internal builders. +// User must call `Tx.Commit` in order to commit the transaction. +func (*txDriver) Commit() error { return nil } + +// Rollback is a nop rollback for the internal builders. +// User must call `Tx.Rollback` in order to rollback the transaction. +func (*txDriver) Rollback() error { return nil } + +// Exec calls tx.Exec. +func (tx *txDriver) Exec(ctx context.Context, query string, args, v any) error { + return tx.tx.Exec(ctx, query, args, v) +} + +// Query calls tx.Query. +func (tx *txDriver) Query(ctx context.Context, query string, args, v any) error { + return tx.tx.Query(ctx, query, args, v) +} + +var _ dialect.Driver = (*txDriver)(nil) From 2d6dac89a3cad4144f8365ca633e60aa395fca4c Mon Sep 17 00:00:00 2001 From: xyzyxJP Date: Sat, 10 Feb 2024 12:44:47 +0900 Subject: [PATCH 017/771] =?UTF-8?q?chore(frontend):=20flutter=E3=83=97?= =?UTF-8?q?=E3=83=AD=E3=82=B8=E3=82=A7=E3=82=AF=E3=83=88=E3=81=AE=E4=BD=9C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/.gitignore | 146 ++++ .../.idea/libraries/Dart_SDK.xml | 19 + .../.idea/libraries/KotlinJavaRuntime.xml | 15 + frontend/where_child_bus/.idea/modules.xml | 9 + .../.idea/runConfigurations/main_dart.xml | 6 + frontend/where_child_bus/.idea/workspace.xml | 36 + frontend/where_child_bus/.metadata | 45 ++ frontend/where_child_bus/README.md | 16 + .../where_child_bus/analysis_options.yaml | 28 + frontend/where_child_bus/android/.gitignore | 13 + .../where_child_bus/android/app/build.gradle | 67 ++ .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 33 + .../example/where_child_bus/MainActivity.kt | 6 + .../res/drawable-v21/launch_background.xml | 12 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 + .../app/src/main/res/values/styles.xml | 18 + .../app/src/profile/AndroidManifest.xml | 7 + frontend/where_child_bus/android/build.gradle | 30 + .../where_child_bus/android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 5 + .../where_child_bus/android/settings.gradle | 29 + .../android/where_child_bus_android.iml | 29 + frontend/where_child_bus/ios/.gitignore | 34 + .../ios/Flutter/AppFrameworkInfo.plist | 26 + .../ios/Flutter/Debug.xcconfig | 1 + .../ios/Flutter/Release.xcconfig | 1 + .../ios/Runner.xcodeproj/project.pbxproj | 617 ++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 98 +++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../ios/Runner/AppDelegate.swift | 13 + .../AppIcon.appiconset/Contents.json | 122 +++ .../Icon-App-1024x1024@1x.png | Bin 0 -> 10932 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 295 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 406 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 450 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 282 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 462 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 704 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 406 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 0 -> 586 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 0 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 0 -> 1674 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 762 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 1226 bytes .../Icon-App-83.5x83.5@2x.png | Bin 0 -> 1418 bytes .../LaunchImage.imageset/Contents.json | 23 + .../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/README.md | 5 + .../Runner/Base.lproj/LaunchScreen.storyboard | 37 + .../ios/Runner/Base.lproj/Main.storyboard | 26 + .../where_child_bus/ios/Runner/Info.plist | 49 ++ .../ios/Runner/Runner-Bridging-Header.h | 1 + .../ios/RunnerTests/RunnerTests.swift | 12 + frontend/where_child_bus/lib/main.dart | 125 ++++ frontend/where_child_bus/linux/.gitignore | 1 + frontend/where_child_bus/linux/CMakeLists.txt | 145 ++++ .../linux/flutter/CMakeLists.txt | 88 +++ .../flutter/generated_plugin_registrant.cc | 11 + .../flutter/generated_plugin_registrant.h | 15 + .../linux/flutter/generated_plugins.cmake | 23 + frontend/where_child_bus/linux/main.cc | 6 + .../where_child_bus/linux/my_application.cc | 104 +++ .../where_child_bus/linux/my_application.h | 18 + frontend/where_child_bus/macos/.gitignore | 7 + .../macos/Flutter/Flutter-Debug.xcconfig | 1 + .../macos/Flutter/Flutter-Release.xcconfig | 1 + .../Flutter/GeneratedPluginRegistrant.swift | 10 + .../macos/Runner.xcodeproj/project.pbxproj | 695 ++++++++++++++++++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 98 +++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../macos/Runner/AppDelegate.swift | 9 + .../AppIcon.appiconset/Contents.json | 68 ++ .../AppIcon.appiconset/app_icon_1024.png | Bin 0 -> 102994 bytes .../AppIcon.appiconset/app_icon_128.png | Bin 0 -> 5680 bytes .../AppIcon.appiconset/app_icon_16.png | Bin 0 -> 520 bytes .../AppIcon.appiconset/app_icon_256.png | Bin 0 -> 14142 bytes .../AppIcon.appiconset/app_icon_32.png | Bin 0 -> 1066 bytes .../AppIcon.appiconset/app_icon_512.png | Bin 0 -> 36406 bytes .../AppIcon.appiconset/app_icon_64.png | Bin 0 -> 2218 bytes .../macos/Runner/Base.lproj/MainMenu.xib | 343 +++++++++ .../macos/Runner/Configs/AppInfo.xcconfig | 14 + .../macos/Runner/Configs/Debug.xcconfig | 2 + .../macos/Runner/Configs/Release.xcconfig | 2 + .../macos/Runner/Configs/Warnings.xcconfig | 13 + .../macos/Runner/DebugProfile.entitlements | 12 + .../where_child_bus/macos/Runner/Info.plist | 32 + .../macos/Runner/MainFlutterWindow.swift | 15 + .../macos/Runner/Release.entitlements | 8 + .../macos/RunnerTests/RunnerTests.swift | 12 + frontend/where_child_bus/pubspec.lock | 188 +++++ frontend/where_child_bus/pubspec.yaml | 90 +++ .../where_child_bus/test/widget_test.dart | 30 + frontend/where_child_bus/web/favicon.png | Bin 0 -> 917 bytes .../where_child_bus/web/icons/Icon-192.png | Bin 0 -> 5292 bytes .../where_child_bus/web/icons/Icon-512.png | Bin 0 -> 8252 bytes .../web/icons/Icon-maskable-192.png | Bin 0 -> 5594 bytes .../web/icons/Icon-maskable-512.png | Bin 0 -> 20998 bytes frontend/where_child_bus/web/index.html | 59 ++ frontend/where_child_bus/web/manifest.json | 35 + frontend/where_child_bus/where_child_bus.iml | 17 + frontend/where_child_bus/windows/.gitignore | 17 + .../where_child_bus/windows/CMakeLists.txt | 108 +++ .../windows/flutter/CMakeLists.txt | 109 +++ .../flutter/generated_plugin_registrant.cc | 11 + .../flutter/generated_plugin_registrant.h | 15 + .../windows/flutter/generated_plugins.cmake | 23 + .../windows/runner/CMakeLists.txt | 40 + .../where_child_bus/windows/runner/Runner.rc | 121 +++ .../windows/runner/flutter_window.cpp | 71 ++ .../windows/runner/flutter_window.h | 33 + .../where_child_bus/windows/runner/main.cpp | 43 ++ .../where_child_bus/windows/runner/resource.h | 16 + .../windows/runner/resources/app_icon.ico | Bin 0 -> 33772 bytes .../windows/runner/runner.exe.manifest | 20 + .../where_child_bus/windows/runner/utils.cpp | 65 ++ .../where_child_bus/windows/runner/utils.h | 19 + .../windows/runner/win32_window.cpp | 288 ++++++++ .../windows/runner/win32_window.h | 102 +++ 135 files changed, 5141 insertions(+) create mode 100644 frontend/where_child_bus/.gitignore create mode 100644 frontend/where_child_bus/.idea/libraries/Dart_SDK.xml create mode 100644 frontend/where_child_bus/.idea/libraries/KotlinJavaRuntime.xml create mode 100644 frontend/where_child_bus/.idea/modules.xml create mode 100644 frontend/where_child_bus/.idea/runConfigurations/main_dart.xml create mode 100644 frontend/where_child_bus/.idea/workspace.xml create mode 100644 frontend/where_child_bus/.metadata create mode 100644 frontend/where_child_bus/README.md create mode 100644 frontend/where_child_bus/analysis_options.yaml create mode 100644 frontend/where_child_bus/android/.gitignore create mode 100644 frontend/where_child_bus/android/app/build.gradle create mode 100644 frontend/where_child_bus/android/app/src/debug/AndroidManifest.xml create mode 100644 frontend/where_child_bus/android/app/src/main/AndroidManifest.xml create mode 100644 frontend/where_child_bus/android/app/src/main/kotlin/com/example/where_child_bus/MainActivity.kt create mode 100644 frontend/where_child_bus/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 frontend/where_child_bus/android/app/src/main/res/drawable/launch_background.xml create mode 100644 frontend/where_child_bus/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 frontend/where_child_bus/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 frontend/where_child_bus/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 frontend/where_child_bus/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 frontend/where_child_bus/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 frontend/where_child_bus/android/app/src/main/res/values-night/styles.xml create mode 100644 frontend/where_child_bus/android/app/src/main/res/values/styles.xml create mode 100644 frontend/where_child_bus/android/app/src/profile/AndroidManifest.xml create mode 100644 frontend/where_child_bus/android/build.gradle create mode 100644 frontend/where_child_bus/android/gradle.properties create mode 100644 frontend/where_child_bus/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 frontend/where_child_bus/android/settings.gradle create mode 100644 frontend/where_child_bus/android/where_child_bus_android.iml create mode 100644 frontend/where_child_bus/ios/.gitignore create mode 100644 frontend/where_child_bus/ios/Flutter/AppFrameworkInfo.plist create mode 100644 frontend/where_child_bus/ios/Flutter/Debug.xcconfig create mode 100644 frontend/where_child_bus/ios/Flutter/Release.xcconfig create mode 100644 frontend/where_child_bus/ios/Runner.xcodeproj/project.pbxproj create mode 100644 frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 frontend/where_child_bus/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 frontend/where_child_bus/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 frontend/where_child_bus/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 frontend/where_child_bus/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 frontend/where_child_bus/ios/Runner/AppDelegate.swift create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png create mode 100644 frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md create mode 100644 frontend/where_child_bus/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 frontend/where_child_bus/ios/Runner/Base.lproj/Main.storyboard create mode 100644 frontend/where_child_bus/ios/Runner/Info.plist create mode 100644 frontend/where_child_bus/ios/Runner/Runner-Bridging-Header.h create mode 100644 frontend/where_child_bus/ios/RunnerTests/RunnerTests.swift create mode 100644 frontend/where_child_bus/lib/main.dart create mode 100644 frontend/where_child_bus/linux/.gitignore create mode 100644 frontend/where_child_bus/linux/CMakeLists.txt create mode 100644 frontend/where_child_bus/linux/flutter/CMakeLists.txt create mode 100644 frontend/where_child_bus/linux/flutter/generated_plugin_registrant.cc create mode 100644 frontend/where_child_bus/linux/flutter/generated_plugin_registrant.h create mode 100644 frontend/where_child_bus/linux/flutter/generated_plugins.cmake create mode 100644 frontend/where_child_bus/linux/main.cc create mode 100644 frontend/where_child_bus/linux/my_application.cc create mode 100644 frontend/where_child_bus/linux/my_application.h create mode 100644 frontend/where_child_bus/macos/.gitignore create mode 100644 frontend/where_child_bus/macos/Flutter/Flutter-Debug.xcconfig create mode 100644 frontend/where_child_bus/macos/Flutter/Flutter-Release.xcconfig create mode 100644 frontend/where_child_bus/macos/Flutter/GeneratedPluginRegistrant.swift create mode 100644 frontend/where_child_bus/macos/Runner.xcodeproj/project.pbxproj create mode 100644 frontend/where_child_bus/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 frontend/where_child_bus/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 frontend/where_child_bus/macos/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 frontend/where_child_bus/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 frontend/where_child_bus/macos/Runner/AppDelegate.swift create mode 100644 frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png create mode 100644 frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png create mode 100644 frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png create mode 100644 frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png create mode 100644 frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png create mode 100644 frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png create mode 100644 frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png create mode 100644 frontend/where_child_bus/macos/Runner/Base.lproj/MainMenu.xib create mode 100644 frontend/where_child_bus/macos/Runner/Configs/AppInfo.xcconfig create mode 100644 frontend/where_child_bus/macos/Runner/Configs/Debug.xcconfig create mode 100644 frontend/where_child_bus/macos/Runner/Configs/Release.xcconfig create mode 100644 frontend/where_child_bus/macos/Runner/Configs/Warnings.xcconfig create mode 100644 frontend/where_child_bus/macos/Runner/DebugProfile.entitlements create mode 100644 frontend/where_child_bus/macos/Runner/Info.plist create mode 100644 frontend/where_child_bus/macos/Runner/MainFlutterWindow.swift create mode 100644 frontend/where_child_bus/macos/Runner/Release.entitlements create mode 100644 frontend/where_child_bus/macos/RunnerTests/RunnerTests.swift create mode 100644 frontend/where_child_bus/pubspec.lock create mode 100644 frontend/where_child_bus/pubspec.yaml create mode 100644 frontend/where_child_bus/test/widget_test.dart create mode 100644 frontend/where_child_bus/web/favicon.png create mode 100644 frontend/where_child_bus/web/icons/Icon-192.png create mode 100644 frontend/where_child_bus/web/icons/Icon-512.png create mode 100644 frontend/where_child_bus/web/icons/Icon-maskable-192.png create mode 100644 frontend/where_child_bus/web/icons/Icon-maskable-512.png create mode 100644 frontend/where_child_bus/web/index.html create mode 100644 frontend/where_child_bus/web/manifest.json create mode 100644 frontend/where_child_bus/where_child_bus.iml create mode 100644 frontend/where_child_bus/windows/.gitignore create mode 100644 frontend/where_child_bus/windows/CMakeLists.txt create mode 100644 frontend/where_child_bus/windows/flutter/CMakeLists.txt create mode 100644 frontend/where_child_bus/windows/flutter/generated_plugin_registrant.cc create mode 100644 frontend/where_child_bus/windows/flutter/generated_plugin_registrant.h create mode 100644 frontend/where_child_bus/windows/flutter/generated_plugins.cmake create mode 100644 frontend/where_child_bus/windows/runner/CMakeLists.txt create mode 100644 frontend/where_child_bus/windows/runner/Runner.rc create mode 100644 frontend/where_child_bus/windows/runner/flutter_window.cpp create mode 100644 frontend/where_child_bus/windows/runner/flutter_window.h create mode 100644 frontend/where_child_bus/windows/runner/main.cpp create mode 100644 frontend/where_child_bus/windows/runner/resource.h create mode 100644 frontend/where_child_bus/windows/runner/resources/app_icon.ico create mode 100644 frontend/where_child_bus/windows/runner/runner.exe.manifest create mode 100644 frontend/where_child_bus/windows/runner/utils.cpp create mode 100644 frontend/where_child_bus/windows/runner/utils.h create mode 100644 frontend/where_child_bus/windows/runner/win32_window.cpp create mode 100644 frontend/where_child_bus/windows/runner/win32_window.h diff --git a/frontend/where_child_bus/.gitignore b/frontend/where_child_bus/.gitignore new file mode 100644 index 00000000..40b28a92 --- /dev/null +++ b/frontend/where_child_bus/.gitignore @@ -0,0 +1,146 @@ +# Created by https://www.toptal.com/developers/gitignore/api/flutter,visualstudiocode,macos,windows +# Edit at https://www.toptal.com/developers/gitignore?templates=flutter,visualstudiocode,macos,windows + +### Flutter ### +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.fvm/flutter_sdk +.packages +.pub-cache/ +.pub/ +build/ +coverage/ +lib/generated_plugin_registrant.dart +# For library packages, don’t commit the pubspec.lock file. +# Regenerating the pubspec.lock file lets you test your package against the latest compatible versions of its dependencies. +# See https://dart.dev/guides/libraries/private-files#pubspeclock +#pubspec.lock + +# Android related +**/android/**/gradle-wrapper.jar +**/android/.gradle +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/key.properties +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/.last_build_id +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Flutter.podspec +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/flutter,visualstudiocode,macos,windows \ No newline at end of file diff --git a/frontend/where_child_bus/.idea/libraries/Dart_SDK.xml b/frontend/where_child_bus/.idea/libraries/Dart_SDK.xml new file mode 100644 index 00000000..35ac1da9 --- /dev/null +++ b/frontend/where_child_bus/.idea/libraries/Dart_SDK.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/frontend/where_child_bus/.idea/libraries/KotlinJavaRuntime.xml b/frontend/where_child_bus/.idea/libraries/KotlinJavaRuntime.xml new file mode 100644 index 00000000..2b96ac4b --- /dev/null +++ b/frontend/where_child_bus/.idea/libraries/KotlinJavaRuntime.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/.idea/modules.xml b/frontend/where_child_bus/.idea/modules.xml new file mode 100644 index 00000000..bacc96bd --- /dev/null +++ b/frontend/where_child_bus/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/frontend/where_child_bus/.idea/runConfigurations/main_dart.xml b/frontend/where_child_bus/.idea/runConfigurations/main_dart.xml new file mode 100644 index 00000000..aab7b5cd --- /dev/null +++ b/frontend/where_child_bus/.idea/runConfigurations/main_dart.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/frontend/where_child_bus/.idea/workspace.xml b/frontend/where_child_bus/.idea/workspace.xml new file mode 100644 index 00000000..5b3388cc --- /dev/null +++ b/frontend/where_child_bus/.idea/workspace.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/.metadata b/frontend/where_child_bus/.metadata new file mode 100644 index 00000000..b5c370f3 --- /dev/null +++ b/frontend/where_child_bus/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "41456452f29d64e8deb623a3c927524bcf9f111b" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: android + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: ios + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: linux + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: macos + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: web + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: windows + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/frontend/where_child_bus/README.md b/frontend/where_child_bus/README.md new file mode 100644 index 00000000..b9edeb30 --- /dev/null +++ b/frontend/where_child_bus/README.md @@ -0,0 +1,16 @@ +# where_child_bus + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/frontend/where_child_bus/analysis_options.yaml b/frontend/where_child_bus/analysis_options.yaml new file mode 100644 index 00000000..0d290213 --- /dev/null +++ b/frontend/where_child_bus/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/frontend/where_child_bus/android/.gitignore b/frontend/where_child_bus/android/.gitignore new file mode 100644 index 00000000..6f568019 --- /dev/null +++ b/frontend/where_child_bus/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/frontend/where_child_bus/android/app/build.gradle b/frontend/where_child_bus/android/app/build.gradle new file mode 100644 index 00000000..9f7a8711 --- /dev/null +++ b/frontend/where_child_bus/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "com.example.where_child_bus" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.where_child_bus" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/frontend/where_child_bus/android/app/src/debug/AndroidManifest.xml b/frontend/where_child_bus/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/frontend/where_child_bus/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml b/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..b5c1bef5 --- /dev/null +++ b/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/android/app/src/main/kotlin/com/example/where_child_bus/MainActivity.kt b/frontend/where_child_bus/android/app/src/main/kotlin/com/example/where_child_bus/MainActivity.kt new file mode 100644 index 00000000..02bb4025 --- /dev/null +++ b/frontend/where_child_bus/android/app/src/main/kotlin/com/example/where_child_bus/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.where_child_bus + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/frontend/where_child_bus/android/app/src/main/res/drawable-v21/launch_background.xml b/frontend/where_child_bus/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 00000000..f74085f3 --- /dev/null +++ b/frontend/where_child_bus/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/frontend/where_child_bus/android/app/src/main/res/drawable/launch_background.xml b/frontend/where_child_bus/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/frontend/where_child_bus/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/frontend/where_child_bus/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/frontend/where_child_bus/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/frontend/where_child_bus/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/frontend/where_child_bus/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/frontend/where_child_bus/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/android/app/src/main/res/values-night/styles.xml b/frontend/where_child_bus/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 00000000..06952be7 --- /dev/null +++ b/frontend/where_child_bus/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/frontend/where_child_bus/android/app/src/main/res/values/styles.xml b/frontend/where_child_bus/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..cb1ef880 --- /dev/null +++ b/frontend/where_child_bus/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/frontend/where_child_bus/android/app/src/profile/AndroidManifest.xml b/frontend/where_child_bus/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/frontend/where_child_bus/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/frontend/where_child_bus/android/build.gradle b/frontend/where_child_bus/android/build.gradle new file mode 100644 index 00000000..e83fb5da --- /dev/null +++ b/frontend/where_child_bus/android/build.gradle @@ -0,0 +1,30 @@ +buildscript { + ext.kotlin_version = '1.7.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/frontend/where_child_bus/android/gradle.properties b/frontend/where_child_bus/android/gradle.properties new file mode 100644 index 00000000..598d13fe --- /dev/null +++ b/frontend/where_child_bus/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/frontend/where_child_bus/android/gradle/wrapper/gradle-wrapper.properties b/frontend/where_child_bus/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..3c472b99 --- /dev/null +++ b/frontend/where_child_bus/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/frontend/where_child_bus/android/settings.gradle b/frontend/where_child_bus/android/settings.gradle new file mode 100644 index 00000000..7cd71285 --- /dev/null +++ b/frontend/where_child_bus/android/settings.gradle @@ -0,0 +1,29 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false +} + +include ":app" diff --git a/frontend/where_child_bus/android/where_child_bus_android.iml b/frontend/where_child_bus/android/where_child_bus_android.iml new file mode 100644 index 00000000..18999696 --- /dev/null +++ b/frontend/where_child_bus/android/where_child_bus_android.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/ios/.gitignore b/frontend/where_child_bus/ios/.gitignore new file mode 100644 index 00000000..7a7f9873 --- /dev/null +++ b/frontend/where_child_bus/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/frontend/where_child_bus/ios/Flutter/AppFrameworkInfo.plist b/frontend/where_child_bus/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..7c569640 --- /dev/null +++ b/frontend/where_child_bus/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/frontend/where_child_bus/ios/Flutter/Debug.xcconfig b/frontend/where_child_bus/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/frontend/where_child_bus/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/frontend/where_child_bus/ios/Flutter/Release.xcconfig b/frontend/where_child_bus/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/frontend/where_child_bus/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/frontend/where_child_bus/ios/Runner.xcodeproj/project.pbxproj b/frontend/where_child_bus/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..e332995e --- /dev/null +++ b/frontend/where_child_bus/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,617 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807E294A63A400263BE5 /* Frameworks */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = Y43PZADGA4; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBus; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBus.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBus.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBus.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = Y43PZADGA4; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBus; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = Y43PZADGA4; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBus; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/frontend/where_child_bus/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/frontend/where_child_bus/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/frontend/where_child_bus/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..87131a09 --- /dev/null +++ b/frontend/where_child_bus/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/ios/Runner.xcworkspace/contents.xcworkspacedata b/frontend/where_child_bus/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/frontend/where_child_bus/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/where_child_bus/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/where_child_bus/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/frontend/where_child_bus/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/frontend/where_child_bus/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/frontend/where_child_bus/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/frontend/where_child_bus/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/frontend/where_child_bus/ios/Runner/AppDelegate.swift b/frontend/where_child_bus/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..70693e4a --- /dev/null +++ b/frontend/where_child_bus/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d36b1fab --- /dev/null +++ b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..dc9ada4725e9b0ddb1deab583e5b5102493aa332 GIT binary patch literal 10932 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..797d452e458972bab9d994556c8305db4c827017 GIT binary patch literal 406 zcmV;H0crk;P))>cdjpWt&rLJgVp-t?DREyuq1A%0Z4)6_WsQ7{nzjN zo!X zGXV)2i3kcZIL~_j>uIKPK_zib+3T+Nt3Mb&Br)s)UIaA}@p{wDda>7=Q|mGRp7pqY zkJ!7E{MNz$9nOwoVqpFb)}$IP24Wn2JJ=Cw(!`OXJBr45rP>>AQr$6c7slJWvbpNW z@KTwna6d?PP>hvXCcp=4F;=GR@R4E7{4VU^0p4F>v^#A|>07*qoM6N<$f*5nx ACIA2c literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..6ed2d933e1120817fe9182483a228007b18ab6ae GIT binary patch literal 450 zcmV;z0X_bSP)iGWQ_5NJQ_~rNh*z)}eT%KUb z`7gNk0#AwF^#0T0?hIa^`~Ck;!}#m+_uT050aTR(J!bU#|IzRL%^UsMS#KsYnTF*!YeDOytlP4VhV?b} z%rz_<=#CPc)tU1MZTq~*2=8~iZ!lSa<{9b@2Jl;?IEV8)=fG217*|@)CCYgFze-x? zIFODUIA>nWKpE+bn~n7;-89sa>#DR>TSlqWk*!2hSN6D~Qb#VqbP~4Fk&m`@1$JGr zXPIdeRE&b2Thd#{MtDK$px*d3-Wx``>!oimf%|A-&-q*6KAH)e$3|6JV%HX{Hig)k suLT-RhftRq8b9;(V=235Wa|I=027H2wCDra;{X5v07*qoM6N<$f;9x^2LJ#7 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..4cd7b0099ca80c806f8fe495613e8d6c69460d76 GIT binary patch literal 282 zcmV+#0p(^bcu7P-R4C8Q z&e;xxFbF_Vrezo%_kH*OKhshZ6BFpG-Y1e10`QXJKbND7AMQ&cMj60B5TNObaZxYybcN07*qoM6N<$g3m;S%K!iX literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..fe730945a01f64a61e2235dbe3f45b08f7729182 GIT binary patch literal 462 zcmV;<0WtoGP)-}iV`2<;=$?g5M=KQbZ{F&YRNy7Nn@%_*5{gvDM0aKI4?ESmw z{NnZg)A0R`+4?NF_RZexyVB&^^ZvN!{I28tr{Vje;QNTz`dG&Jz0~Ek&f2;*Z7>B|cg}xYpxEFY+0YrKLF;^Q+-HreN0P{&i zK~zY`?b7ECf-n?@;d<&orQ*Q7KoR%4|C>{W^h6@&01>0SKS`dn{Q}GT%Qj_{PLZ_& zs`MFI#j-(>?bvdZ!8^xTwlY{qA)T4QLbY@j(!YJ7aXJervHy6HaG_2SB`6CC{He}f zHVw(fJWApwPq!6VY7r1w-Fs)@ox~N+q|w~e;JI~C4Vf^@d>Wvj=fl`^u9x9wd9 zR%3*Q+)t%S!MU_`id^@&Y{y7-r98lZX0?YrHlfmwb?#}^1b{8g&KzmkE(L>Z&)179 zp<)v6Y}pRl100G2FL_t(o!|l{-Q-VMg#&MKg7c{O0 z2wJImOS3Gy*Z2Qifdv~JYOp;v+U)a|nLoc7hNH;I$;lzDt$}rkaFw1mYK5_0Q(Sut zvbEloxON7$+HSOgC9Z8ltuC&0OSF!-mXv5caV>#bc3@hBPX@I$58-z}(ZZE!t-aOG zpjNkbau@>yEzH(5Yj4kZiMH32XI!4~gVXNnjAvRx;Sdg^`>2DpUEwoMhTs_st8pKG z(%SHyHdU&v%f36~uERh!bd`!T2dw;z6PrOTQ7Vt*#9F2uHlUVnb#ev_o^fh}Dzmq} zWtlk35}k=?xj28uO|5>>$yXadTUE@@IPpgH`gJ~Ro4>jd1IF|(+IX>8M4Ps{PNvmI zNj4D+XgN83gPt_Gm}`Ybv{;+&yu-C(Grdiahmo~BjG-l&mWM+{e5M1sm&=xduwgM9 z`8OEh`=F3r`^E{n_;%9weN{cf2%7=VzC@cYj+lg>+3|D|_1C@{hcU(DyQG_BvBWe? zvTv``=%b1zrol#=R`JB)>cdjpWt&rLJgVp-t?DREyuq1A%0Z4)6_WsQ7{nzjN zo!X zGXV)2i3kcZIL~_j>uIKPK_zib+3T+Nt3Mb&Br)s)UIaA}@p{wDda>7=Q|mGRp7pqY zkJ!7E{MNz$9nOwoVqpFb)}$IP24Wn2JJ=Cw(!`OXJBr45rP>>AQr$6c7slJWvbpNW z@KTwna6d?PP>hvXCcp=4F;=GR@R4E7{4VU^0p4F>v^#A|>07*qoM6N<$f*5nx ACIA2c literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..502f463a9bc882b461c96aadf492d1729e49e725 GIT binary patch literal 586 zcmV-Q0=4~#P)+}#`wDE{8-2Mebf5<{{PqV{TgVcv*r8?UZ3{-|G?_}T*&y;@cqf{ z{Q*~+qr%%p!1pS*_Uicl#q9lc(D`!D`LN62sNwq{oYw(Wmhk)k<@f$!$@ng~_5)Ru z0Z)trIA5^j{DIW^c+vT2%lW+2<(RtE2wR;4O@)Tm`Xr*?A(qYoM}7i5Yxw>D(&6ou zxz!_Xr~yNF+waPe00049Nkl*;a!v6h%{rlvIH#gW3s8p;bFr=l}mRqpW2h zw=OA%hdyL~z+UHOzl0eKhEr$YYOL-c-%Y<)=j?(bzDweB7{b+%_ypvm_cG{SvM=DK zhv{K@m>#Bw>2W$eUI#iU)Wdgs8Y3U+A$Gd&{+j)d)BmGKx+43U_!tik_YlN)>$7G! zhkE!s;%oku3;IwG3U^2kw?z+HM)jB{@zFhK8P#KMSytSthr+4!c(5c%+^UBn`0X*2 zy3(k600_CSZj?O$Qu%&$;|TGUJrptR(HzyIx>5E(2r{eA(<6t3e3I0B)7d6s7?Z5J zZ!rtKvA{MiEBm&KFtoifx>5P^Z=vl)95XJn()aS5%ad(s?4-=Tkis9IGu{`Fy8r+H07*qoM6N<$f20Z)wqMt%V?S?~D#06};F zA3KcL`Wb+>5ObvgQIG&ig8(;V04hz?@cqy3{mSh8o!|U|)cI!1_+!fWH@o*8vh^CU z^ws0;(c$gI+2~q^tO#GDHf@=;DncUw00J^eL_t(&-tE|HQ`%4vfZ;WsBqu-$0nu1R zq^Vj;p$clf^?twn|KHO+IGt^q#a3X?w9dXC@*yxhv&l}F322(8Y1&=P&I}~G@#h6; z1CV9ecD9ZEe87{{NtI*)_aJ<`kJa z?5=RBtFF50s;jQLFil-`)m2wrb=6h(&brpj%nG_U&ut~$?8Rokzxi8zJoWr#2dto5 zOX_URcc<1`Iky+jc;A%Vzx}1QU{2$|cKPom2Vf1{8m`vja4{F>HS?^Nc^rp}xo+Nh zxd}eOm`fm3@MQC1< zIk&aCjb~Yh%5+Yq0`)D;q{#-Uqlv*o+Oor zE!I71Z@ASH3grl8&P^L0WpavHoP|UX4e?!igT`4?AZk$hu*@%6WJ;zDOGlw7kj@ zY5!B-0ft0f?Lgb>C;$Ke07*qoM6N<$f~t1N9smFU literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0ec303439225b78712f49115768196d8d76f6790 GIT binary patch literal 862 zcmV-k1EKthP)20Z)wqMt%V?S?~D#06};F zA3KcL`Wb+>5ObvgQIG&ig8(;V04hz?@cqy3{mSh8o!|U|)cI!1_+!fWH@o*8vh^CU z^ws0;(c$gI+2~q^tO#GDHf@=;DncUw00J^eL_t(&-tE|HQ`%4vfZ;WsBqu-$0nu1R zq^Vj;p$clf^?twn|KHO+IGt^q#a3X?w9dXC@*yxhv&l}F322(8Y1&=P&I}~G@#h6; z1CV9ecD9ZEe87{{NtI*)_aJ<`kJa z?5=RBtFF50s;jQLFil-`)m2wrb=6h(&brpj%nG_U&ut~$?8Rokzxi8zJoWr#2dto5 zOX_URcc<1`Iky+jc;A%Vzx}1QU{2$|cKPom2Vf1{8m`vja4{F>HS?^Nc^rp}xo+Nh zxd}eOm`fm3@MQC1< zIk&aCjb~Yh%5+Yq0`)D;q{#-Uqlv*o+Oor zE!I71Z@ASH3grl8&P^L0WpavHoP|UX4e?!igT`4?AZk$hu*@%6WJ;zDOGlw7kj@ zY5!B-0ft0f?Lgb>C;$Ke07*qoM6N<$f~t1N9smFU literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..e9f5fea27c705180eb716271f41b582e76dcbd90 GIT binary patch literal 1674 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0467bf12aa4d28f374bb26596605a46dcbb3e7c8 GIT binary patch literal 1418 zcmV;51$Fv~P)q zKfU)WzW*n(@|xWGCA9ScMt*e9`2kdxPQ&&>|-UCa7_51w+ zLUsW@ZzZSW0y$)Hp~e9%PvP|a03ks1`~K?q{u;6NC8*{AOqIUq{CL&;p56Lf$oQGq z^={4hPQv)y=I|4n+?>7Fim=dxt1 z2H+Dm+1+fh+IF>G0SjJMkQQre1x4|G*Z==(Ot&kCnUrL4I(rf(ucITwmuHf^hXiJT zkdTm&kdTm&kdTm&kdP`esgWG0BcWCVkVZ&2dUwN`cgM8QJb`Z7Z~e<&Yj2(}>Tmf` zm1{eLgw!b{bXkjWbF%dTkTZEJWyWOb##Lfw4EK2}<0d6%>AGS{po>WCOy&f$Tay_> z?NBlkpo@s-O;0V%Y_Xa-G#_O08q5LR*~F%&)}{}r&L%Sbs8AS4t7Y0NEx*{soY=0MZExqA5XHQkqi#4gW3 zqODM^iyZl;dvf)-bOXtOru(s)Uc7~BFx{w-FK;2{`VA?(g&@3z&bfLFyctOH!cVsF z7IL=fo-qBndRUm;kAdXR4e6>k-z|21AaN%ubeVrHl*<|s&Ax@W-t?LR(P-24A5=>a z*R9#QvjzF8n%@1Nw@?CG@6(%>+-0ASK~jEmCV|&a*7-GKT72W<(TbSjf)&Eme6nGE z>Gkj4Sq&2e+-G%|+NM8OOm5zVl9{Z8Dd8A5z3y8mZ=4Bv4%>as_{9cN#bm~;h>62( zdqY93Zy}v&c4n($Vv!UybR8ocs7#zbfX1IY-*w~)p}XyZ-SFC~4w>BvMVr`dFbelV{lLL0bx7@*ZZdebr3`sP;? zVImji)kG)(6Juv0lz@q`F!k1FE;CQ(D0iG$wchPbKZQELlsZ#~rt8#90Y_Xh&3U-< z{s<&cCV_1`^TD^ia9!*mQDq& zn2{r`j};V|uV%_wsP!zB?m%;FeaRe+X47K0e+KE!8C{gAWF8)lCd1u1%~|M!XNRvw zvtqy3iz0WSpWdhn6$hP8PaRBmp)q`#PCA`Vd#Tc$@f1tAcM>f_I@bC)hkI9|o(Iqv zo}Piadq!j76}004RBio<`)70k^`K1NK)q>w?p^C6J2ZC!+UppiK6&y3Kmbv&O!oYF z34$0Z;QO!JOY#!`qyGH<3Pd}Pt@q*A0V=3SVtWKRR8d8Z&@)3qLPA19LPA19LPEUC YUoZo%k(ykuW&i*H07*qoM6N<$f+CH{y8r+H literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 00000000..0bedcf2f --- /dev/null +++ b/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000..89c2725b --- /dev/null +++ b/frontend/where_child_bus/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/frontend/where_child_bus/ios/Runner/Base.lproj/LaunchScreen.storyboard b/frontend/where_child_bus/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/frontend/where_child_bus/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/ios/Runner/Base.lproj/Main.storyboard b/frontend/where_child_bus/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/frontend/where_child_bus/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/ios/Runner/Info.plist b/frontend/where_child_bus/ios/Runner/Info.plist new file mode 100644 index 00000000..e4f2164c --- /dev/null +++ b/frontend/where_child_bus/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Where Child Bus + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + where_child_bus + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/frontend/where_child_bus/ios/Runner/Runner-Bridging-Header.h b/frontend/where_child_bus/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000..308a2a56 --- /dev/null +++ b/frontend/where_child_bus/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/frontend/where_child_bus/ios/RunnerTests/RunnerTests.swift b/frontend/where_child_bus/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 00000000..86a7c3b1 --- /dev/null +++ b/frontend/where_child_bus/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart new file mode 100644 index 00000000..8e940891 --- /dev/null +++ b/frontend/where_child_bus/lib/main.dart @@ -0,0 +1,125 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + // This is the theme of your application. + // + // TRY THIS: Try running your application with "flutter run". You'll see + // the application has a purple toolbar. Then, without quitting the app, + // try changing the seedColor in the colorScheme below to Colors.green + // and then invoke "hot reload" (save your changes or press the "hot + // reload" button in a Flutter-supported IDE, or press "r" if you used + // the command line to start the app). + // + // Notice that the counter didn't reset back to zero; the application + // state is not lost during the reload. To reset the state, use hot + // restart instead. + // + // This works for code too, not just values: Most code changes can be + // tested with just a hot reload. + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const MyHomePage(title: 'Flutter Demo Home Page'), + ); + } +} + +class MyHomePage extends StatefulWidget { + const MyHomePage({super.key, required this.title}); + + // This widget is the home page of your application. It is stateful, meaning + // that it has a State object (defined below) that contains fields that affect + // how it looks. + + // This class is the configuration for the state. It holds the values (in this + // case the title) provided by the parent (in this case the App widget) and + // used by the build method of the State. Fields in a Widget subclass are + // always marked "final". + + final String title; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + int _counter = 0; + + void _incrementCounter() { + setState(() { + // This call to setState tells the Flutter framework that something has + // changed in this State, which causes it to rerun the build method below + // so that the display can reflect the updated values. If we changed + // _counter without calling setState(), then the build method would not be + // called again, and so nothing would appear to happen. + _counter++; + }); + } + + @override + Widget build(BuildContext context) { + // This method is rerun every time setState is called, for instance as done + // by the _incrementCounter method above. + // + // The Flutter framework has been optimized to make rerunning build methods + // fast, so that you can just rebuild anything that needs updating rather + // than having to individually change instances of widgets. + return Scaffold( + appBar: AppBar( + // TRY THIS: Try changing the color here to a specific color (to + // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar + // change color while the other colors stay the same. + backgroundColor: Theme.of(context).colorScheme.inversePrimary, + // Here we take the value from the MyHomePage object that was created by + // the App.build method, and use it to set our appbar title. + title: Text(widget.title), + ), + body: Center( + // Center is a layout widget. It takes a single child and positions it + // in the middle of the parent. + child: Column( + // Column is also a layout widget. It takes a list of children and + // arranges them vertically. By default, it sizes itself to fit its + // children horizontally, and tries to be as tall as its parent. + // + // Column has various properties to control how it sizes itself and + // how it positions its children. Here we use mainAxisAlignment to + // center the children vertically; the main axis here is the vertical + // axis because Columns are vertical (the cross axis would be + // horizontal). + // + // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" + // action in the IDE, or press "p" in the console), to see the + // wireframe for each widget. + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'You have pushed the button this many times:', + ), + Text( + '$_counter', + style: Theme.of(context).textTheme.headlineMedium, + ), + ], + ), + ), + floatingActionButton: FloatingActionButton( + onPressed: _incrementCounter, + tooltip: 'Increment', + child: const Icon(Icons.add), + ), // This trailing comma makes auto-formatting nicer for build methods. + ); + } +} diff --git a/frontend/where_child_bus/linux/.gitignore b/frontend/where_child_bus/linux/.gitignore new file mode 100644 index 00000000..d3896c98 --- /dev/null +++ b/frontend/where_child_bus/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/frontend/where_child_bus/linux/CMakeLists.txt b/frontend/where_child_bus/linux/CMakeLists.txt new file mode 100644 index 00000000..ecc656d1 --- /dev/null +++ b/frontend/where_child_bus/linux/CMakeLists.txt @@ -0,0 +1,145 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "where_child_bus") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.where_child_bus") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Define the application target. To change its name, change BINARY_NAME above, +# not the value here, or `flutter run` will no longer work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/frontend/where_child_bus/linux/flutter/CMakeLists.txt b/frontend/where_child_bus/linux/flutter/CMakeLists.txt new file mode 100644 index 00000000..d5bd0164 --- /dev/null +++ b/frontend/where_child_bus/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/frontend/where_child_bus/linux/flutter/generated_plugin_registrant.cc b/frontend/where_child_bus/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 00000000..e71a16d2 --- /dev/null +++ b/frontend/where_child_bus/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void fl_register_plugins(FlPluginRegistry* registry) { +} diff --git a/frontend/where_child_bus/linux/flutter/generated_plugin_registrant.h b/frontend/where_child_bus/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 00000000..e0f0a47b --- /dev/null +++ b/frontend/where_child_bus/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/frontend/where_child_bus/linux/flutter/generated_plugins.cmake b/frontend/where_child_bus/linux/flutter/generated_plugins.cmake new file mode 100644 index 00000000..2e1de87a --- /dev/null +++ b/frontend/where_child_bus/linux/flutter/generated_plugins.cmake @@ -0,0 +1,23 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/frontend/where_child_bus/linux/main.cc b/frontend/where_child_bus/linux/main.cc new file mode 100644 index 00000000..e7c5c543 --- /dev/null +++ b/frontend/where_child_bus/linux/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/frontend/where_child_bus/linux/my_application.cc b/frontend/where_child_bus/linux/my_application.cc new file mode 100644 index 00000000..bcb2ebfc --- /dev/null +++ b/frontend/where_child_bus/linux/my_application.cc @@ -0,0 +1,104 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "where_child_bus"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "where_child_bus"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/frontend/where_child_bus/linux/my_application.h b/frontend/where_child_bus/linux/my_application.h new file mode 100644 index 00000000..72271d5e --- /dev/null +++ b/frontend/where_child_bus/linux/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/frontend/where_child_bus/macos/.gitignore b/frontend/where_child_bus/macos/.gitignore new file mode 100644 index 00000000..746adbb6 --- /dev/null +++ b/frontend/where_child_bus/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/frontend/where_child_bus/macos/Flutter/Flutter-Debug.xcconfig b/frontend/where_child_bus/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 00000000..c2efd0b6 --- /dev/null +++ b/frontend/where_child_bus/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/frontend/where_child_bus/macos/Flutter/Flutter-Release.xcconfig b/frontend/where_child_bus/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 00000000..c2efd0b6 --- /dev/null +++ b/frontend/where_child_bus/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/frontend/where_child_bus/macos/Flutter/GeneratedPluginRegistrant.swift b/frontend/where_child_bus/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 00000000..cccf817a --- /dev/null +++ b/frontend/where_child_bus/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,10 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { +} diff --git a/frontend/where_child_bus/macos/Runner.xcodeproj/project.pbxproj b/frontend/where_child_bus/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..32cd41bf --- /dev/null +++ b/frontend/where_child_bus/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,695 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* where_child_bus.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "where_child_bus.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* where_child_bus.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* where_child_bus.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBus.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/where_child_bus.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/where_child_bus"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBus.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/where_child_bus.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/where_child_bus"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBus.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/where_child_bus.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/where_child_bus"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/frontend/where_child_bus/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/where_child_bus/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/frontend/where_child_bus/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/frontend/where_child_bus/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..425fbb80 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/macos/Runner.xcworkspace/contents.xcworkspacedata b/frontend/where_child_bus/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/where_child_bus/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/where_child_bus/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/frontend/where_child_bus/macos/Runner/AppDelegate.swift b/frontend/where_child_bus/macos/Runner/AppDelegate.swift new file mode 100644 index 00000000..d53ef643 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..a2ec33f1 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000000000000000000000000000000000..82b6f9d9a33e198f5747104729e1fcef999772a5 GIT binary patch literal 102994 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ⅅ8MglG&ER{i5lN315cO?EdHNLrg? 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 z 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 Pe7HEdAEg|=c=LY&YVNkY literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000000000000000000000000000000000000..13b35eba55c6dabc3aac36f33d859266c18fa0d0 GIT binary patch literal 5680 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000000000000000000000000000000000000..0a3f5fa40fb3d1e0710331a48de5d256da3f275d GIT binary patch literal 520 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/frontend/where_child_bus/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000000000000000000000000000000000000..2f1632cfddf3d9dade342351e627a0a75609fb46 GIT binary patch literal 2218 zcmV;b2vzrqP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91K%fHv1ONa40RR91KmY&$07g+lumAuE6iGxuRCodHTWf3-RTMruyW6Fu zQYeUM04eX6D5c0FCjKKPrco1(K`<0SL=crI{PC3-^hZU0kQie$gh-5!7z6SH6Q0J% zqot*`H1q{R5fHFYS}dje@;kG=v$L0(yY0?wY2%*c?A&{2?!D*x?m71{of2gv!$5|C z3>qG_BW}7K_yUcT3A5C6QD<+{aq?x;MAUyAiJn#Jv8_zZtQ{P zTRzbL3U9!qVuZzS$xKU10KiW~Bgdcv1-!uAhQxf3a7q+dU6lj?yoO4Lq4TUN4}h{N z*fIM=SS8|C2$(T>w$`t@3Tka!(r!7W`x z-isCVgQD^mG-MJ;XtJuK3V{Vy72GQ83KRWsHU?e*wrhKk=ApIYeDqLi;JI1e zuvv}5^Dc=k7F7?nm3nIw$NVmU-+R>> zyqOR$-2SDpJ}Pt;^RkJytDVXNTsu|mI1`~G7yw`EJR?VkGfNdqK9^^8P`JdtTV&tX4CNcV4 z&N06nZa??Fw1AgQOUSE2AmPE@WO(Fvo`%m`cDgiv(fAeRA%3AGXUbsGw{7Q`cY;1BI#ac3iN$$Hw z0LT0;xc%=q)me?Y*$xI@GRAw?+}>=9D+KTk??-HJ4=A>`V&vKFS75@MKdSF1JTq{S zc1!^8?YA|t+uKigaq!sT;Z!&0F2=k7F0PIU;F$leJLaw2UI6FL^w}OG&!;+b%ya1c z1n+6-inU<0VM-Y_s5iTElq)ThyF?StVcebpGI znw#+zLx2@ah{$_2jn+@}(zJZ{+}_N9BM;z)0yr|gF-4=Iyu@hI*Lk=-A8f#bAzc9f z`Kd6K--x@t04swJVC3JK1cHY-Hq+=|PN-VO;?^_C#;coU6TDP7Bt`;{JTG;!+jj(` zw5cLQ-(Cz-Tlb`A^w7|R56Ce;Wmr0)$KWOUZ6ai0PhzPeHwdl0H(etP zUV`va_i0s-4#DkNM8lUlqI7>YQLf)(lz9Q3Uw`)nc(z3{m5ZE77Ul$V%m)E}3&8L0 z-XaU|eB~Is08eORPk;=<>!1w)Kf}FOVS2l&9~A+@R#koFJ$Czd%Y(ENTV&A~U(IPI z;UY+gf+&6ioZ=roly<0Yst8ck>(M=S?B-ys3mLdM&)ex!hbt+ol|T6CTS+Sc0jv(& z7ijdvFwBq;0a{%3GGwkDKTeG`b+lyj0jjS1OMkYnepCdoosNY`*zmBIo*981BU%%U z@~$z0V`OVtIbEx5pa|Tct|Lg#ZQf5OYMUMRD>Wdxm5SAqV2}3!ceE-M2 z@O~lQ0OiKQp}o9I;?uxCgYVV?FH|?Riri*U$Zi_`V2eiA>l zdSm6;SEm6#T+SpcE8Ro_f2AwxzI z44hfe^WE3!h@W3RDyA_H440cpmYkv*)6m1XazTqw%=E5Xv7^@^^T7Q2wxr+Z2kVYr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/macos/Runner/Configs/AppInfo.xcconfig b/frontend/where_child_bus/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 00000000..1b24d2e5 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = where_child_bus + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBus + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. diff --git a/frontend/where_child_bus/macos/Runner/Configs/Debug.xcconfig b/frontend/where_child_bus/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 00000000..36b0fd94 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/frontend/where_child_bus/macos/Runner/Configs/Release.xcconfig b/frontend/where_child_bus/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 00000000..dff4f495 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/frontend/where_child_bus/macos/Runner/Configs/Warnings.xcconfig b/frontend/where_child_bus/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 00000000..42bcbf47 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/frontend/where_child_bus/macos/Runner/DebugProfile.entitlements b/frontend/where_child_bus/macos/Runner/DebugProfile.entitlements new file mode 100644 index 00000000..dddb8a30 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/frontend/where_child_bus/macos/Runner/Info.plist b/frontend/where_child_bus/macos/Runner/Info.plist new file mode 100644 index 00000000..4789daa6 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/frontend/where_child_bus/macos/Runner/MainFlutterWindow.swift b/frontend/where_child_bus/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 00000000..3cc05eb2 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/frontend/where_child_bus/macos/Runner/Release.entitlements b/frontend/where_child_bus/macos/Runner/Release.entitlements new file mode 100644 index 00000000..852fa1a4 --- /dev/null +++ b/frontend/where_child_bus/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/frontend/where_child_bus/macos/RunnerTests/RunnerTests.swift b/frontend/where_child_bus/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 00000000..5418c9f5 --- /dev/null +++ b/frontend/where_child_bus/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import FlutterMacOS +import Cocoa +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock new file mode 100644 index 00000000..e4a8596d --- /dev/null +++ b/frontend/where_child_bus/pubspec.lock @@ -0,0 +1,188 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" + source: hosted + version: "1.0.6" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" + source: hosted + version: "0.12.16" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" + source: hosted + version: "0.5.0" + meta: + dependency: transitive + description: + name: meta + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + url: "https://pub.dev" + source: hosted + version: "1.10.0" + path: + dependency: transitive + description: + name: path + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" + source: hosted + version: "1.8.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" + source: hosted + version: "0.6.1" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + web: + dependency: transitive + description: + name: web + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + url: "https://pub.dev" + source: hosted + version: "0.3.0" +sdks: + dart: ">=3.2.6 <4.0.0" diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml new file mode 100644 index 00000000..3799a6aa --- /dev/null +++ b/frontend/where_child_bus/pubspec.yaml @@ -0,0 +1,90 @@ +name: where_child_bus +description: "A new Flutter project." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=3.2.6 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/frontend/where_child_bus/test/widget_test.dart b/frontend/where_child_bus/test/widget_test.dart new file mode 100644 index 00000000..360d8929 --- /dev/null +++ b/frontend/where_child_bus/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:where_child_bus/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/frontend/where_child_bus/web/favicon.png b/frontend/where_child_bus/web/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..8aaa46ac1ae21512746f852a42ba87e4165dfdd1 GIT binary patch literal 917 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0X7 zltGxWVyS%@P(fs7NJL45ua8x7ey(0(N`6wRUPW#JP&EUCO@$SZnVVXYs8ErclUHn2 zVXFjIVFhG^g!Ppaz)DK8ZIvQ?0~DO|i&7O#^-S~(l1AfjnEK zjFOT9D}DX)@^Za$W4-*MbbUihOG|wNBYh(yU7!lx;>x^|#0uTKVr7USFmqf|i<65o z3raHc^AtelCMM;Vme?vOfh>Xph&xL%(-1c06+^uR^q@XSM&D4+Kp$>4P^%3{)XKjo zGZknv$b36P8?Z_gF{nK@`XI}Z90TzwSQO}0J1!f2c(B=V`5aP@1P1a|PZ!4!3&Gl8 zTYqUsf!gYFyJnXpu0!n&N*SYAX-%d(5gVjrHJWqXQshj@!Zm{!01WsQrH~9=kTxW#6SvuapgMqt>$=j#%eyGrQzr zP{L-3gsMA^$I1&gsBAEL+vxi1*Igl=8#8`5?A-T5=z-sk46WA1IUT)AIZHx1rdUrf zVJrJn<74DDw`j)Ki#gt}mIT-Q`XRa2-jQXQoI%w`nb|XblvzK${ZzlV)m-XcwC(od z71_OEC5Bt9GEXosOXaPTYOia#R4ID2TiU~`zVMl08TV_C%DnU4^+HE>9(CE4D6?Fz oujB08i7adh9xk7*FX66dWH6F5TM;?E2b5PlUHx3vIVCg!0Dx9vYXATM literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/web/icons/Icon-192.png b/frontend/where_child_bus/web/icons/Icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..b749bfef07473333cf1dd31e9eed89862a5d52aa GIT binary patch literal 5292 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/web/icons/Icon-512.png b/frontend/where_child_bus/web/icons/Icon-512.png new file mode 100644 index 0000000000000000000000000000000000000000..88cfd48dff1169879ba46840804b412fe02fefd6 GIT binary patch literal 8252 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/web/icons/Icon-maskable-192.png b/frontend/where_child_bus/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9b4d76e525556d5d89141648c724331630325d GIT binary patch literal 5594 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 X>c!)3PgKfL&lX^$Z>Cpu&6)6jvi^Z! literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/web/icons/Icon-maskable-512.png b/frontend/where_child_bus/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000000000000000000000000000000000..d69c56691fbdb0b7efa65097c7cc1edac12a6d3e GIT binary patch literal 20998 zcmeFZ_gj-)&^4Nb2tlbLMU<{!p(#yjqEe+=0IA_oih%ScH9@5#MNp&}Y#;;(h=A0@ zh7{>lT2MkSQ344eAvrhici!td|HJuyvJm#Y_w1Q9Yu3!26dNlO-oxUDK_C#XnW^Co z5C{VN6#{~B0)K2j7}*1Xq(Nqemv23A-6&=ZpEijkVnSwVGqLv40?n0=p;k3-U5e5+ z+z3>aS`u9DS=!wg8ROu?X4TFoW6CFLL&{GzoVT)ldhLekLM|+j3tIxRd|*5=c{=s&*vfPdBr(Fyj(v@%eQj1Soy7m4^@VRl1~@-PV7y+c!xz$8436WBn$t{=}mEdK#k`aystimGgI{(IBx$!pAwFoE9Y`^t^;> zKAD)C(Dl^s%`?q5$P|fZf8Xymrtu^Pv(7D`rn>Z-w$Ahs!z9!94WNVxrJuXfHAaxg zC6s@|Z1$7R$(!#t%Jb{{s6(Y?NoQXDYq)!}X@jKPhe`{9KQ@sAU8y-5`xt?S9$jKH zoi}6m5PcG*^{kjvt+kwPpyQzVg4o)a>;LK`aaN2x4@itBD3Aq?yWTM20VRn1rrd+2 zKO=P0rMjEGq_UqpMa`~7B|p?xAN1SCoCp}QxAv8O`jLJ5CVh@umR%c%i^)6!o+~`F zaalSTQcl5iwOLC&H)efzd{8(88mo`GI(56T<(&p7>Qd^;R1hn1Y~jN~tApaL8>##U zd65bo8)79CplWxr#z4!6HvLz&N7_5AN#x;kLG?zQ(#p|lj<8VUlKY=Aw!ATqeL-VG z42gA!^cMNPj>(`ZMEbCrnkg*QTsn*u(nQPWI9pA{MQ=IsPTzd7q5E#7+z>Ch=fx$~ z;J|?(5jTo5UWGvsJa(Sx0?S#56+8SD!I^tftyeh_{5_31l6&Hywtn`bbqYDqGZXI( zCG7hBgvksX2ak8+)hB4jnxlO@A32C_RM&g&qDSb~3kM&)@A_j1*oTO@nicGUyv+%^ z=vB)4(q!ykzT==Z)3*3{atJ5}2PV*?Uw+HhN&+RvKvZL3p9E?gHjv{6zM!A|z|UHK z-r6jeLxbGn0D@q5aBzlco|nG2tr}N@m;CJX(4#Cn&p&sLKwzLFx1A5izu?X_X4x8r@K*d~7>t1~ zDW1Mv5O&WOxbzFC`DQ6yNJ(^u9vJdj$fl2dq`!Yba_0^vQHXV)vqv1gssZYzBct!j zHr9>ydtM8wIs}HI4=E}qAkv|BPWzh3^_yLH(|kdb?x56^BlDC)diWyPd*|f!`^12_U>TD^^94OCN0lVv~Sgvs94ecpE^}VY$w`qr_>Ue zTfH~;C<3H<0dS5Rkf_f@1x$Gms}gK#&k()IC0zb^QbR!YLoll)c$Agfi6MKI0dP_L z=Uou&u~~^2onea2%XZ@>`0x^L8CK6=I{ge;|HXMj)-@o~h&O{CuuwBX8pVqjJ*o}5 z#8&oF_p=uSo~8vn?R0!AMWvcbZmsrj{ZswRt(aEdbi~;HeVqIe)-6*1L%5u$Gbs}| zjFh?KL&U(rC2izSGtwP5FnsR@6$-1toz?RvLD^k~h9NfZgzHE7m!!7s6(;)RKo2z} zB$Ci@h({l?arO+vF;s35h=|WpefaOtKVx>l399}EsX@Oe3>>4MPy%h&^3N_`UTAHJ zI$u(|TYC~E4)|JwkWW3F!Tib=NzjHs5ii2uj0^m|Qlh-2VnB#+X~RZ|`SA*}}&8j9IDv?F;(Y^1=Z0?wWz;ikB zewU>MAXDi~O7a~?jx1x=&8GcR-fTp>{2Q`7#BE#N6D@FCp`?ht-<1|y(NArxE_WIu zP+GuG=Qq>SHWtS2M>34xwEw^uvo4|9)4s|Ac=ud?nHQ>ax@LvBqusFcjH0}{T3ZPQ zLO1l<@B_d-(IS682}5KA&qT1+{3jxKolW+1zL4inqBS-D>BohA!K5++41tM@ z@xe<-qz27}LnV#5lk&iC40M||JRmZ*A##K3+!j93eouU8@q-`W0r%7N`V$cR&JV;iX(@cS{#*5Q>~4BEDA)EikLSP@>Oo&Bt1Z~&0d5)COI%3$cLB_M?dK# z{yv2OqW!al-#AEs&QFd;WL5zCcp)JmCKJEdNsJlL9K@MnPegK23?G|O%v`@N{rIRa zi^7a}WBCD77@VQ-z_v{ZdRsWYrYgC$<^gRQwMCi6);%R~uIi31OMS}=gUTE(GKmCI z$zM>mytL{uNN+a&S38^ez(UT=iSw=l2f+a4)DyCA1Cs_N-r?Q@$3KTYosY!;pzQ0k zzh1G|kWCJjc(oZVBji@kN%)UBw(s{KaYGy=i{g3{)Z+&H8t2`^IuLLKWT6lL<-C(! zSF9K4xd-|VO;4}$s?Z7J_dYqD#Mt)WCDnsR{Kpjq275uUq6`v0y*!PHyS(}Zmv)_{>Vose9-$h8P0|y;YG)Bo}$(3Z%+Gs0RBmFiW!^5tBmDK-g zfe5%B*27ib+7|A*Fx5e)2%kIxh7xWoc3pZcXS2zik!63lAG1;sC1ja>BqH7D zODdi5lKW$$AFvxgC-l-)!c+9@YMC7a`w?G(P#MeEQ5xID#<}W$3bSmJ`8V*x2^3qz zVe<^^_8GHqYGF$nIQm0Xq2kAgYtm#UC1A(=&85w;rmg#v906 zT;RyMgbMpYOmS&S9c38^40oUp?!}#_84`aEVw;T;r%gTZkWeU;;FwM@0y0adt{-OK z(vGnPSlR=Nv2OUN!2=xazlnHPM9EWxXg2EKf0kI{iQb#FoP>xCB<)QY>OAM$Dcdbm zU6dU|%Mo(~avBYSjRc13@|s>axhrPl@Sr81{RSZUdz4(=|82XEbV*JAX6Lfbgqgz584lYgi0 z2-E{0XCVON$wHfvaLs;=dqhQJ&6aLn$D#0i(FkAVrXG9LGm3pSTf&f~RQb6|1_;W> z?n-;&hrq*~L=(;u#jS`*Yvh@3hU-33y_Kv1nxqrsf>pHVF&|OKkoC)4DWK%I!yq?P z=vXo8*_1iEWo8xCa{HJ4tzxOmqS0&$q+>LroMKI*V-rxhOc%3Y!)Y|N6p4PLE>Yek>Y(^KRECg8<|%g*nQib_Yc#A5q8Io z6Ig&V>k|~>B6KE%h4reAo*DfOH)_01tE0nWOxX0*YTJgyw7moaI^7gW*WBAeiLbD?FV9GSB zPv3`SX*^GRBM;zledO`!EbdBO_J@fEy)B{-XUTVQv}Qf~PSDpK9+@I`7G7|>Dgbbu z_7sX9%spVo$%qwRwgzq7!_N;#Td08m5HV#?^dF-EV1o)Q=Oa+rs2xH#g;ykLbwtCh znUnA^dW!XjspJ;otq$yV@I^s9Up(5k7rqhQd@OLMyyxVLj_+$#Vc*}Usevp^I(^vH zmDgHc0VMme|K&X?9&lkN{yq_(If)O`oUPW8X}1R5pSVBpfJe0t{sPA(F#`eONTh_) zxeLqHMfJX#?P(@6w4CqRE@Eiza; z;^5)Kk=^5)KDvd9Q<`=sJU8rjjxPmtWMTmzcH={o$U)j=QBuHarp?=}c??!`3d=H$nrJMyr3L-& zA#m?t(NqLM?I3mGgWA_C+0}BWy3-Gj7bR+d+U?n*mN$%5P`ugrB{PeV>jDUn;eVc- zzeMB1mI4?fVJatrNyq|+zn=!AiN~<}eoM#4uSx^K?Iw>P2*r=k`$<3kT00BE_1c(02MRz4(Hq`L^M&xt!pV2 zn+#U3@j~PUR>xIy+P>51iPayk-mqIK_5rlQMSe5&tDkKJk_$i(X&;K(11YGpEc-K= zq4Ln%^j>Zi_+Ae9eYEq_<`D+ddb8_aY!N;)(&EHFAk@Ekg&41ABmOXfWTo)Z&KotA zh*jgDGFYQ^y=m)<_LCWB+v48DTJw*5dwMm_YP0*_{@HANValf?kV-Ic3xsC}#x2h8 z`q5}d8IRmqWk%gR)s~M}(Qas5+`np^jW^oEd-pzERRPMXj$kS17g?H#4^trtKtq;C?;c ztd|%|WP2w2Nzg@)^V}!Gv++QF2!@FP9~DFVISRW6S?eP{H;;8EH;{>X_}NGj^0cg@ z!2@A>-CTcoN02^r6@c~^QUa={0xwK0v4i-tQ9wQq^=q*-{;zJ{Qe%7Qd!&X2>rV@4 z&wznCz*63_vw4>ZF8~%QCM?=vfzW0r_4O^>UA@otm_!N%mH)!ERy&b!n3*E*@?9d^ zu}s^By@FAhG(%?xgJMuMzuJw2&@$-oK>n z=UF}rt%vuaP9fzIFCYN-1&b#r^Cl6RDFIWsEsM|ROf`E?O(cy{BPO2Ie~kT+^kI^i zp>Kbc@C?}3vy-$ZFVX#-cx)Xj&G^ibX{pWggtr(%^?HeQL@Z( zM-430g<{>vT*)jK4aY9(a{lSy{8vxLbP~n1MXwM527ne#SHCC^F_2@o`>c>>KCq9c(4c$VSyMl*y3Nq1s+!DF| z^?d9PipQN(mw^j~{wJ^VOXDCaL$UtwwTpyv8IAwGOg<|NSghkAR1GSNLZ1JwdGJYm zP}t<=5=sNNUEjc=g(y)1n5)ynX(_$1-uGuDR*6Y^Wgg(LT)Jp><5X|}bt z_qMa&QP?l_n+iVS>v%s2Li_;AIeC=Ca^v1jX4*gvB$?H?2%ndnqOaK5-J%7a} zIF{qYa&NfVY}(fmS0OmXA70{znljBOiv5Yod!vFU{D~*3B3Ka{P8?^ zfhlF6o7aNT$qi8(w<}OPw5fqA7HUje*r*Oa(YV%*l0|9FP9KW@U&{VSW{&b0?@y)M zs%4k1Ax;TGYuZ9l;vP5@?3oQsp3)rjBeBvQQ>^B;z5pc=(yHhHtq6|0m(h4envn_j787fizY@V`o(!SSyE7vlMT zbo=Z1c=atz*G!kwzGB;*uPL$Ei|EbZLh8o+1BUMOpnU(uX&OG1MV@|!&HOOeU#t^x zr9=w2ow!SsTuJWT7%Wmt14U_M*3XiWBWHxqCVZI0_g0`}*^&yEG9RK9fHK8e+S^m? zfCNn$JTswUVbiC#>|=wS{t>-MI1aYPLtzO5y|LJ9nm>L6*wpr_m!)A2Fb1RceX&*|5|MwrvOk4+!0p99B9AgP*9D{Yt|x=X}O% zgIG$MrTB=n-!q%ROT|SzH#A$Xm;|ym)0>1KR}Yl0hr-KO&qMrV+0Ej3d@?FcgZ+B3 ztEk16g#2)@x=(ko8k7^Tq$*5pfZHC@O@}`SmzT1(V@x&NkZNM2F#Q-Go7-uf_zKC( zB(lHZ=3@dHaCOf6C!6i8rDL%~XM@rVTJbZL09?ht@r^Z_6x}}atLjvH^4Vk#Ibf(^LiBJFqorm?A=lE zzFmwvp4bT@Nv2V>YQT92X;t9<2s|Ru5#w?wCvlhcHLcsq0TaFLKy(?nzezJ>CECqj zggrI~Hd4LudM(m{L@ezfnpELsRFVFw>fx;CqZtie`$BXRn#Ns%AdoE$-Pf~{9A8rV zf7FbgpKmVzmvn-z(g+&+-ID=v`;6=)itq8oM*+Uz**SMm_{%eP_c0{<%1JGiZS19o z@Gj7$Se~0lsu}w!%;L%~mIAO;AY-2i`9A*ZfFs=X!LTd6nWOZ7BZH2M{l2*I>Xu)0 z`<=;ObglnXcVk!T>e$H?El}ra0WmPZ$YAN0#$?|1v26^(quQre8;k20*dpd4N{i=b zuN=y}_ew9SlE~R{2+Rh^7%PA1H5X(p8%0TpJ=cqa$65XL)$#ign-y!qij3;2>j}I; ziO@O|aYfn&up5F`YtjGw68rD3{OSGNYmBnl?zdwY$=RFsegTZ=kkzRQ`r7ZjQP!H( zp4>)&zf<*N!tI00xzm-ME_a{_I!TbDCr;8E;kCH4LlL-tqLxDuBn-+xgPk37S&S2^ z2QZumkIimwz!c@!r0)j3*(jPIs*V!iLTRl0Cpt_UVNUgGZzdvs0(-yUghJfKr7;=h zD~y?OJ-bWJg;VdZ^r@vlDoeGV&8^--!t1AsIMZ5S440HCVr%uk- z2wV>!W1WCvFB~p$P$$_}|H5>uBeAe>`N1FI8AxM|pq%oNs;ED8x+tb44E) zTj{^fbh@eLi%5AqT?;d>Es5D*Fi{Bpk)q$^iF!!U`r2hHAO_?#!aYmf>G+jHsES4W zgpTKY59d?hsb~F0WE&dUp6lPt;Pm zcbTUqRryw^%{ViNW%Z(o8}dd00H(H-MmQmOiTq{}_rnwOr*Ybo7*}3W-qBT!#s0Ie z-s<1rvvJx_W;ViUD`04%1pra*Yw0BcGe)fDKUK8aF#BwBwMPU;9`!6E(~!043?SZx z13K%z@$$#2%2ovVlgFIPp7Q6(vO)ud)=*%ZSucL2Dh~K4B|%q4KnSpj#n@(0B})!9 z8p*hY@5)NDn^&Pmo;|!>erSYg`LkO?0FB@PLqRvc>4IsUM5O&>rRv|IBRxi(RX(gJ ztQ2;??L~&Mv;aVr5Q@(?y^DGo%pO^~zijld41aA0KKsy_6FeHIn?fNHP-z>$OoWer zjZ5hFQTy*-f7KENRiCE$ZOp4|+Wah|2=n@|W=o}bFM}Y@0e62+_|#fND5cwa3;P{^pEzlJbF1Yq^}>=wy8^^^$I2M_MH(4Dw{F6hm+vrWV5!q;oX z;tTNhz5`-V={ew|bD$?qcF^WPR{L(E%~XG8eJx(DoGzt2G{l8r!QPJ>kpHeOvCv#w zr=SSwMDaUX^*~v%6K%O~i)<^6`{go>a3IdfZ8hFmz&;Y@P%ZygShQZ2DSHd`m5AR= zx$wWU06;GYwXOf(%MFyj{8rPFXD};JCe85Bdp4$YJ2$TzZ7Gr#+SwCvBI1o$QP0(c zy`P51FEBV2HTisM3bHqpmECT@H!Y2-bv2*SoSPoO?wLe{M#zDTy@ujAZ!Izzky~3k zRA1RQIIoC*Mej1PH!sUgtkR0VCNMX(_!b65mo66iM*KQ7xT8t2eev$v#&YdUXKwGm z7okYAqYF&bveHeu6M5p9xheRCTiU8PFeb1_Rht0VVSbm%|1cOVobc8mvqcw!RjrMRM#~=7xibH&Fa5Imc|lZ{eC|R__)OrFg4@X_ ze+kk*_sDNG5^ELmHnZ7Ue?)#6!O)#Nv*Dl2mr#2)w{#i-;}0*_h4A%HidnmclH#;Q zmQbq+P4DS%3}PpPm7K_K3d2s#k~x+PlTul7+kIKol0@`YN1NG=+&PYTS->AdzPv!> zQvzT=)9se*Jr1Yq+C{wbK82gAX`NkbXFZ)4==j4t51{|-v!!$H8@WKA={d>CWRW+g z*`L>9rRucS`vbXu0rzA1#AQ(W?6)}1+oJSF=80Kf_2r~Qm-EJ6bbB3k`80rCv(0d` zvCf3;L2ovYG_TES%6vSuoKfIHC6w;V31!oqHM8-I8AFzcd^+_86!EcCOX|Ta9k1!s z_Vh(EGIIsI3fb&dF$9V8v(sTBC%!#<&KIGF;R+;MyC0~}$gC}}= zR`DbUVc&Bx`lYykFZ4{R{xRaUQkWCGCQlEc;!mf=+nOk$RUg*7 z;kP7CVLEc$CA7@6VFpsp3_t~m)W0aPxjsA3e5U%SfY{tp5BV5jH-5n?YX7*+U+Zs%LGR>U- z!x4Y_|4{gx?ZPJobISy991O znrmrC3otC;#4^&Rg_iK}XH(XX+eUHN0@Oe06hJk}F?`$)KmH^eWz@@N%wEc)%>?Ft z#9QAroDeyfztQ5Qe{m*#R#T%-h*&XvSEn@N$hYRTCMXS|EPwzF3IIysD2waj`vQD{ zv_#^Pgr?s~I*NE=acf@dWVRNWTr(GN0wrL)Z2=`Dr>}&ZDNX|+^Anl{Di%v1Id$_p zK5_H5`RDjJx`BW7hc85|> zHMMsWJ4KTMRHGu+vy*kBEMjz*^K8VtU=bXJYdhdZ-?jTXa$&n)C?QQIZ7ln$qbGlr zS*TYE+ppOrI@AoPP=VI-OXm}FzgXRL)OPvR$a_=SsC<3Jb+>5makX|U!}3lx4tX&L z^C<{9TggZNoeX!P1jX_K5HkEVnQ#s2&c#umzV6s2U-Q;({l+j^?hi7JnQ7&&*oOy9 z(|0asVTWUCiCnjcOnB2pN0DpuTglKq;&SFOQ3pUdye*eT<2()7WKbXp1qq9=bhMWlF-7BHT|i3TEIT77AcjD(v=I207wi-=vyiw5mxgPdTVUC z&h^FEUrXwWs9en2C{ywZp;nvS(Mb$8sBEh-*_d-OEm%~p1b2EpcwUdf<~zmJmaSTO zSX&&GGCEz-M^)G$fBvLC2q@wM$;n4jp+mt0MJFLuJ%c`tSp8$xuP|G81GEd2ci$|M z4XmH{5$j?rqDWoL4vs!}W&!?!rtj=6WKJcE>)?NVske(p;|#>vL|M_$as=mi-n-()a*OU3Okmk0wC<9y7t^D(er-&jEEak2!NnDiOQ99Wx8{S8}=Ng!e0tzj*#T)+%7;aM$ z&H}|o|J1p{IK0Q7JggAwipvHvko6>Epmh4RFRUr}$*2K4dz85o7|3#Bec9SQ4Y*;> zXWjT~f+d)dp_J`sV*!w>B%)#GI_;USp7?0810&3S=WntGZ)+tzhZ+!|=XlQ&@G@~3 z-dw@I1>9n1{+!x^Hz|xC+P#Ab`E@=vY?3%Bc!Po~e&&&)Qp85!I|U<-fCXy*wMa&t zgDk!l;gk;$taOCV$&60z+}_$ykz=Ea*)wJQ3-M|p*EK(cvtIre0Pta~(95J7zoxBN zS(yE^3?>88AL0Wfuou$BM{lR1hkrRibz=+I9ccwd`ZC*{NNqL)3pCcw^ygMmrG^Yp zn5f}Xf>%gncC=Yq96;rnfp4FQL#{!Y*->e82rHgY4Zwy{`JH}b9*qr^VA{%~Z}jtp z_t$PlS6}5{NtTqXHN?uI8ut8rOaD#F1C^ls73S=b_yI#iZDOGz3#^L@YheGd>L;<( z)U=iYj;`{>VDNzIxcjbTk-X3keXR8Xbc`A$o5# zKGSk-7YcoBYuAFFSCjGi;7b<;n-*`USs)IX z=0q6WZ=L!)PkYtZE-6)azhXV|+?IVGTOmMCHjhkBjfy@k1>?yFO3u!)@cl{fFAXnRYsWk)kpT?X{_$J=|?g@Q}+kFw|%n!;Zo}|HE@j=SFMvT8v`6Y zNO;tXN^036nOB2%=KzxB?n~NQ1K8IO*UE{;Xy;N^ZNI#P+hRZOaHATz9(=)w=QwV# z`z3+P>9b?l-@$@P3<;w@O1BdKh+H;jo#_%rr!ute{|YX4g5}n?O7Mq^01S5;+lABE+7`&_?mR_z7k|Ja#8h{!~j)| zbBX;*fsbUak_!kXU%HfJ2J+G7;inu#uRjMb|8a){=^))y236LDZ$$q3LRlat1D)%7K0!q5hT5V1j3qHc7MG9 z_)Q=yQ>rs>3%l=vu$#VVd$&IgO}Za#?aN!xY>-<3PhzS&q!N<=1Q7VJBfHjug^4|) z*fW^;%3}P7X#W3d;tUs3;`O&>;NKZBMR8au6>7?QriJ@gBaorz-+`pUWOP73DJL=M z(33uT6Gz@Sv40F6bN|H=lpcO z^AJl}&=TIjdevuDQ!w0K*6oZ2JBOhb31q!XDArFyKpz!I$p4|;c}@^bX{>AXdt7Bm zaLTk?c%h@%xq02reu~;t@$bv`b3i(P=g}~ywgSFpM;}b$zAD+=I!7`V~}ARB(Wx0C(EAq@?GuxOL9X+ffbkn3+Op0*80TqmpAq~EXmv%cq36celXmRz z%0(!oMp&2?`W)ALA&#|fu)MFp{V~~zIIixOxY^YtO5^FSox8v$#d0*{qk0Z)pNTt0QVZ^$`4vImEB>;Lo2!7K05TpY-sl#sWBz_W-aDIV`Ksabi zvpa#93Svo!70W*Ydh)Qzm{0?CU`y;T^ITg-J9nfWeZ-sbw)G@W?$Eomf%Bg2frfh5 zRm1{|E0+(4zXy){$}uC3%Y-mSA2-^I>Tw|gQx|7TDli_hB>``)Q^aZ`LJC2V3U$SABP}T)%}9g2pF9dT}aC~!rFFgkl1J$ z`^z{Arn3On-m%}r}TGF8KQe*OjSJ=T|caa_E;v89A{t@$yT^(G9=N9F?^kT*#s3qhJq!IH5|AhnqFd z0B&^gm3w;YbMNUKU>naBAO@fbz zqw=n!@--}o5;k6DvTW9pw)IJVz;X}ncbPVrmH>4x);8cx;q3UyiML1PWp%bxSiS|^ zC5!kc4qw%NSOGQ*Kcd#&$30=lDvs#*4W4q0u8E02U)7d=!W7+NouEyuF1dyH$D@G& zaFaxo9Ex|ZXA5y{eZT*i*dP~INSMAi@mvEX@q5i<&o&#sM}Df?Og8n8Ku4vOux=T% zeuw~z1hR}ZNwTn8KsQHKLwe2>p^K`YWUJEdVEl|mO21Bov!D0D$qPoOv=vJJ`)|%_ z>l%`eexY7t{BlVKP!`a^U@nM?#9OC*t76My_E_<16vCz1x_#82qj2PkWiMWgF8bM9 z(1t4VdHcJ;B~;Q%x01k_gQ0>u2*OjuEWNOGX#4}+N?Gb5;+NQMqp}Puqw2HnkYuKA zzKFWGHc&K>gwVgI1Sc9OT1s6fq=>$gZU!!xsilA$fF`kLdGoX*^t}ao@+^WBpk>`8 z4v_~gK|c2rCq#DZ+H)$3v~Hoi=)=1D==e3P zpKrRQ+>O^cyTuWJ%2}__0Z9SM_z9rptd*;-9uC1tDw4+A!=+K%8~M&+Zk#13hY$Y$ zo-8$*8dD5@}XDi19RjK6T^J~DIXbF5w&l?JLHMrf0 zLv0{7*G!==o|B%$V!a=EtVHdMwXLtmO~vl}P6;S(R2Q>*kTJK~!}gloxj)m|_LYK{ zl(f1cB=EON&wVFwK?MGn^nWuh@f95SHatPs(jcwSY#Dnl1@_gkOJ5=f`%s$ZHljRH0 z+c%lrb=Gi&N&1>^L_}#m>=U=(oT^vTA&3!xXNyqi$pdW1BDJ#^{h|2tZc{t^vag3& zAD7*8C`chNF|27itjBUo^CCDyEpJLX3&u+(L;YeeMwnXEoyN(ytoEabcl$lSgx~Ltatn}b$@j_yyMrBb03)shJE*$;Mw=;mZd&8e>IzE+4WIoH zCSZE7WthNUL$|Y#m!Hn?x7V1CK}V`KwW2D$-7&ODy5Cj;!_tTOOo1Mm%(RUt)#$@3 zhurA)t<7qik%%1Et+N1?R#hdBB#LdQ7{%-C zn$(`5e0eFh(#c*hvF>WT*07fk$N_631?W>kfjySN8^XC9diiOd#s?4tybICF;wBjp zIPzilX3{j%4u7blhq)tnaOBZ_`h_JqHXuI7SuIlNTgBk9{HIS&3|SEPfrvcE<@}E` zKk$y*nzsqZ{J{uWW9;#n=de&&h>m#A#q)#zRonr(?mDOYU&h&aQWD;?Z(22wY?t$U3qo`?{+amA$^TkxL+Ex2dh`q7iR&TPd0Ymwzo#b? zP$#t=elB5?k$#uE$K>C$YZbYUX_JgnXA`oF_Ifz4H7LEOW~{Gww&3s=wH4+j8*TU| zSX%LtJWqhr-xGNSe{;(16kxnak6RnZ{0qZ^kJI5X*It_YuynSpi(^-}Lolr{)#z_~ zw!(J-8%7Ybo^c3(mED`Xz8xecP35a6M8HarxRn%+NJBE;dw>>Y2T&;jzRd4FSDO3T zt*y+zXCtZQ0bP0yf6HRpD|WmzP;DR^-g^}{z~0x~z4j8m zucTe%k&S9Nt-?Jb^gYW1w6!Y3AUZ0Jcq;pJ)Exz%7k+mUOm6%ApjjSmflfKwBo6`B zhNb@$NHTJ>guaj9S{@DX)!6)b-Shav=DNKWy(V00k(D!v?PAR0f0vDNq*#mYmUp6> z76KxbFDw5U{{qx{BRj(>?|C`82ICKbfLxoldov-M?4Xl+3;I4GzLHyPOzYw7{WQST zPNYcx5onA%MAO9??41Po*1zW(Y%Zzn06-lUp{s<3!_9vv9HBjT02On0Hf$}NP;wF) zP<`2p3}A^~1YbvOh{ePMx$!JGUPX-tbBzp3mDZMY;}h;sQ->!p97GA)9a|tF(Gh{1$xk7 zUw?ELkT({Xw!KIr);kTRb1b|UL`r2_`a+&UFVCdJ)1T#fdh;71EQl9790Br0m_`$x z9|ZANuchFci8GNZ{XbP=+uXSJRe(;V5laQz$u18#?X*9}x7cIEbnr%<=1cX3EIu7$ zhHW6pe5M(&qEtsqRa>?)*{O;OJT+YUhG5{km|YI7I@JL_3Hwao9aXneiSA~a* z|Lp@c-oMNyeAEuUz{F?kuou3x#C*gU?lon!RC1s37gW^0Frc`lqQWH&(J4NoZg3m8 z;Lin#8Q+cFPD7MCzj}#|ws7b@?D9Q4dVjS4dpco=4yX5SSH=A@U@yqPdp@?g?qeia zH=Tt_9)G=6C2QIPsi-QipnK(mc0xXIN;j$WLf@n8eYvMk;*H-Q4tK%(3$CN}NGgO8n}fD~+>?<3UzvsrMf*J~%i;VKQHbF%TPalFi=#sgj)(P#SM^0Q=Tr>4kJVw8X3iWsP|e8tj}NjlMdWp z@2+M4HQu~3!=bZpjh;;DIDk&X}=c8~kn)FWWH z2KL1w^rA5&1@@^X%MjZ7;u(kH=YhH2pJPFQe=hn>tZd5RC5cfGYis8s9PKaxi*}-s6*W zRA^PwR=y^5Z){!(4D9-KC;0~;b*ploznFOaU`bJ_7U?qAi#mTo!&rIECRL$_y@yI27x2?W+zqDBD5~KCVYKFZLK+>ABC(Kj zeAll)KMgIlAG`r^rS{loBrGLtzhHY8$)<_S<(Dpkr(Ym@@vnQ&rS@FC*>2@XCH}M+an74WcRDcoQ+a3@A z9tYhl5$z7bMdTvD2r&jztBuo37?*k~wcU9GK2-)MTFS-lux-mIRYUuGUCI~V$?s#< z?1qAWb(?ZLm(N>%S%y10COdaq_Tm5c^%ooIxpR=`3e4C|@O5wY+eLik&XVi5oT7oe zmxH)Jd*5eo@!7t`x8!K=-+zJ-Sz)B_V$)s1pW~CDU$=q^&ABvf6S|?TOMB-RIm@CoFg>mjIQE)?+A1_3s6zmFU_oW&BqyMz1mY*IcP_2knjq5 zqw~JK(cVsmzc7*EvTT2rvpeqhg)W=%TOZ^>f`rD4|7Z5fq*2D^lpCttIg#ictgqZ$P@ru6P#f$x#KfnfTZj~LG6U_d-kE~`;kU_X)`H5so@?C zWmb!7x|xk@0L~0JFall*@ltyiL^)@3m4MqC7(7H0sH!WidId1#f#6R{Q&A!XzO1IAcIx;$k66dumt6lpUw@nL2MvqJ5^kbOVZ<^2jt5-njy|2@`07}0w z;M%I1$FCoLy`8xp8Tk)bFr;7aJeQ9KK6p=O$U0-&JYYy8woV*>b+FB?xLX`=pirYM z5K$BA(u)+jR{?O2r$c_Qvl?M{=Ar{yQ!UVsVn4k@0!b?_lA;dVz9uaQUgBH8Oz(Sb zrEs;&Ey>_ex8&!N{PmQjp+-Hlh|OA&wvDai#GpU=^-B70V0*LF=^bi+Nhe_o|azZ%~ZZ1$}LTmWt4aoB1 zPgccm$EwYU+jrdBaQFxQfn5gd(gM`Y*Ro1n&Zi?j=(>T3kmf94vdhf?AuS8>$Va#P zGL5F+VHpxdsCUa}+RqavXCobI-@B;WJbMphpK2%6t=XvKWWE|ruvREgM+|V=i6;;O zx$g=7^`$XWn0fu!gF=Xe9cMB8Z_SelD>&o&{1XFS`|nInK3BXlaeD*rc;R-#osyIS zWv&>~^TLIyBB6oDX+#>3<_0+2C4u2zK^wmHXXDD9_)kmLYJ!0SzM|%G9{pi)`X$uf zW}|%%#LgyK7m(4{V&?x_0KEDq56tk|0YNY~B(Sr|>WVz-pO3A##}$JCT}5P7DY+@W z#gJv>pA5>$|E3WO2tV7G^SuymB?tY`ooKcN3!vaQMnBNk-WATF{-$#}FyzgtJ8M^; zUK6KWSG)}6**+rZ&?o@PK3??uN{Q)#+bDP9i1W&j)oaU5d0bIWJ_9T5ac!qc?x66Q z$KUSZ`nYY94qfN_dpTFr8OW~A?}LD;Yty-BA)-be5Z3S#t2Io%q+cAbnGj1t$|qFR z9o?8B7OA^KjCYL=-!p}w(dkC^G6Nd%_I=1))PC0w5}ZZGJxfK)jP4Fwa@b-SYBw?% zdz9B-<`*B2dOn(N;mcTm%Do)rIvfXRNFX&1h`?>Rzuj~Wx)$p13nrDlS8-jwq@e@n zNIj_|8or==8~1h*Ih?w*8K7rYkGlwlTWAwLKc5}~dfz3y`kM&^Q|@C%1VAp_$wnw6zG~W4O+^ z>i?NY?oXf^Puc~+fDM$VgRNBpOZj{2cMP~gCqWAX4 z7>%$ux8@a&_B(pt``KSt;r+sR-$N;jdpY>|pyvPiN)9ohd*>mVST3wMo)){`B(&eX z1?zZJ-4u9NZ|~j1rdZYq4R$?swf}<6(#ex%7r{kh%U@kT)&kWuAszS%oJts=*OcL9 zaZwK<5DZw%1IFHXgFplP6JiL^dk8+SgM$D?8X+gE4172hXh!WeqIO>}$I9?Nry$*S zQ#f)RuH{P7RwA3v9f<-w>{PSzom;>(i&^l{E0(&Xp4A-*q-@{W1oE3K;1zb{&n28dSC2$N+6auXe0}e4b z)KLJ?5c*>@9K#I^)W;uU_Z`enquTUxr>mNq z1{0_puF-M7j${rs!dxxo3EelGodF1TvjV;Zpo;s{5f1pyCuRp=HDZ?s#IA4f?h|-p zGd|Mq^4hDa@Bh!c4ZE?O&x&XZ_ptZGYK4$9F4~{%R!}G1leCBx`dtNUS|K zL-7J5s4W@%mhXg1!}a4PD%!t&Qn%f_oquRajn3@C*)`o&K9o7V6DwzVMEhjVdDJ1fjhr#@=lp#@4EBqi=CCQ>73>R(>QKPNM&_Jpe5G`n4wegeC`FYEPJ{|vwS>$-`fuRSp3927qOv|NC3T3G-0 zA{K`|+tQy1yqE$ShWt8ny&5~)%ITb@^+x$w0)f&om;P8B)@}=Wzy59BwUfZ1vqw87 za2lB8J(&*l#(V}Id8SyQ0C(2amzkz3EqG&Ed0Jq1)$|&>4_|NIe=5|n=3?siFV0fI z{As5DLW^gs|B-b4C;Hd(SM-S~GQhzb>HgF2|2Usww0nL^;x@1eaB)=+Clj+$fF@H( z-fqP??~QMT$KI-#m;QC*&6vkp&8699G3)Bq0*kFZXINw=b9OVaed(3(3kS|IZ)CM? zJdnW&%t8MveBuK21uiYj)_a{Fnw0OErMzMN?d$QoPwkhOwcP&p+t>P)4tHlYw-pPN z^oJ=uc$Sl>pv@fZH~ZqxSvdhF@F1s=oZawpr^-#l{IIOGG=T%QXjtwPhIg-F@k@uIlr?J->Ia zpEUQ*=4g|XYn4Gez&aHr*;t$u3oODPmc2Ku)2Og|xjc%w;q!Zz+zY)*3{7V8bK4;& zYV82FZ+8?v)`J|G1w4I0fWdKg|2b#iaazCv;|?(W-q}$o&Y}Q5d@BRk^jL7#{kbCK zSgkyu;=DV+or2)AxCBgq-nj5=@n^`%T#V+xBGEkW4lCqrE)LMv#f;AvD__cQ@Eg3`~x| zW+h9mofSXCq5|M)9|ez(#X?-sxB%Go8};sJ?2abp(Y!lyi>k)|{M*Z$c{e1-K4ky` MPgg&ebxsLQ025IeI{*Lx literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/web/index.html b/frontend/where_child_bus/web/index.html new file mode 100644 index 00000000..f7158f69 --- /dev/null +++ b/frontend/where_child_bus/web/index.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + where_child_bus + + + + + + + + + + diff --git a/frontend/where_child_bus/web/manifest.json b/frontend/where_child_bus/web/manifest.json new file mode 100644 index 00000000..b64db05d --- /dev/null +++ b/frontend/where_child_bus/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "where_child_bus", + "short_name": "where_child_bus", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/frontend/where_child_bus/where_child_bus.iml b/frontend/where_child_bus/where_child_bus.iml new file mode 100644 index 00000000..f66303d5 --- /dev/null +++ b/frontend/where_child_bus/where_child_bus.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/windows/.gitignore b/frontend/where_child_bus/windows/.gitignore new file mode 100644 index 00000000..d492d0d9 --- /dev/null +++ b/frontend/where_child_bus/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/frontend/where_child_bus/windows/CMakeLists.txt b/frontend/where_child_bus/windows/CMakeLists.txt new file mode 100644 index 00000000..d7c98651 --- /dev/null +++ b/frontend/where_child_bus/windows/CMakeLists.txt @@ -0,0 +1,108 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.14) +project(where_child_bus LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "where_child_bus") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(VERSION 3.14...3.25) + +# Define build configuration option. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") + endif() +endif() +# Define settings for the Profile build mode. +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/frontend/where_child_bus/windows/flutter/CMakeLists.txt b/frontend/where_child_bus/windows/flutter/CMakeLists.txt new file mode 100644 index 00000000..903f4899 --- /dev/null +++ b/frontend/where_child_bus/windows/flutter/CMakeLists.txt @@ -0,0 +1,109 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.14) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + ${FLUTTER_TARGET_PLATFORM} $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/frontend/where_child_bus/windows/flutter/generated_plugin_registrant.cc b/frontend/where_child_bus/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 00000000..8b6d4680 --- /dev/null +++ b/frontend/where_child_bus/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void RegisterPlugins(flutter::PluginRegistry* registry) { +} diff --git a/frontend/where_child_bus/windows/flutter/generated_plugin_registrant.h b/frontend/where_child_bus/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 00000000..dc139d85 --- /dev/null +++ b/frontend/where_child_bus/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void RegisterPlugins(flutter::PluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/frontend/where_child_bus/windows/flutter/generated_plugins.cmake b/frontend/where_child_bus/windows/flutter/generated_plugins.cmake new file mode 100644 index 00000000..b93c4c30 --- /dev/null +++ b/frontend/where_child_bus/windows/flutter/generated_plugins.cmake @@ -0,0 +1,23 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/frontend/where_child_bus/windows/runner/CMakeLists.txt b/frontend/where_child_bus/windows/runner/CMakeLists.txt new file mode 100644 index 00000000..394917c0 --- /dev/null +++ b/frontend/where_child_bus/windows/runner/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/frontend/where_child_bus/windows/runner/Runner.rc b/frontend/where_child_bus/windows/runner/Runner.rc new file mode 100644 index 00000000..16ef5a32 --- /dev/null +++ b/frontend/where_child_bus/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "com.example" "\0" + VALUE "FileDescription", "where_child_bus" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "where_child_bus" "\0" + VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "where_child_bus.exe" "\0" + VALUE "ProductName", "where_child_bus" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/frontend/where_child_bus/windows/runner/flutter_window.cpp b/frontend/where_child_bus/windows/runner/flutter_window.cpp new file mode 100644 index 00000000..955ee303 --- /dev/null +++ b/frontend/where_child_bus/windows/runner/flutter_window.cpp @@ -0,0 +1,71 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + + flutter_controller_->engine()->SetNextFrameCallback([&]() { + this->Show(); + }); + + // Flutter can complete the first frame before the "show window" callback is + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. + flutter_controller_->ForceRedraw(); + + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/frontend/where_child_bus/windows/runner/flutter_window.h b/frontend/where_child_bus/windows/runner/flutter_window.h new file mode 100644 index 00000000..6da0652f --- /dev/null +++ b/frontend/where_child_bus/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/frontend/where_child_bus/windows/runner/main.cpp b/frontend/where_child_bus/windows/runner/main.cpp new file mode 100644 index 00000000..8a3637cb --- /dev/null +++ b/frontend/where_child_bus/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.Create(L"where_child_bus", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/frontend/where_child_bus/windows/runner/resource.h b/frontend/where_child_bus/windows/runner/resource.h new file mode 100644 index 00000000..66a65d1e --- /dev/null +++ b/frontend/where_child_bus/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/frontend/where_child_bus/windows/runner/resources/app_icon.ico b/frontend/where_child_bus/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c04e20caf6370ebb9253ad831cc31de4a9c965f6 GIT binary patch literal 33772 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/windows/runner/runner.exe.manifest b/frontend/where_child_bus/windows/runner/runner.exe.manifest new file mode 100644 index 00000000..a42ea768 --- /dev/null +++ b/frontend/where_child_bus/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ + + + + + PerMonitorV2 + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus/windows/runner/utils.cpp b/frontend/where_child_bus/windows/runner/utils.cpp new file mode 100644 index 00000000..b2b08734 --- /dev/null +++ b/frontend/where_child_bus/windows/runner/utils.cpp @@ -0,0 +1,65 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr) + -1; // remove the trailing null character + int input_length = (int)wcslen(utf16_string); + std::string utf8_string; + if (target_length <= 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + input_length, utf8_string.data(), target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/frontend/where_child_bus/windows/runner/utils.h b/frontend/where_child_bus/windows/runner/utils.h new file mode 100644 index 00000000..3879d547 --- /dev/null +++ b/frontend/where_child_bus/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/frontend/where_child_bus/windows/runner/win32_window.cpp b/frontend/where_child_bus/windows/runner/win32_window.cpp new file mode 100644 index 00000000..60608d0f --- /dev/null +++ b/frontend/where_child_bus/windows/runner/win32_window.cpp @@ -0,0 +1,288 @@ +#include "win32_window.h" + +#include +#include + +#include "resource.h" + +namespace { + +/// Window attribute that enables dark mode window decorations. +/// +/// Redefined in case the developer's machine has a Windows SDK older than +/// version 10.0.22000.0. +/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +/// Registry key for app theme preference. +/// +/// A value of 0 indicates apps should use dark mode. A non-zero or missing +/// value indicates apps should use light mode. +constexpr const wchar_t kGetPreferredBrightnessRegKey[] = + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; +constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + } + FreeLibrary(user32_module); +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registrar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::Create(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + UpdateTheme(window); + + return OnCreate(); +} + +bool Win32Window::Show() { + return ShowWindow(window_handle_, SW_SHOWNORMAL); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + + case WM_DWMCOLORIZATIONCOLORCHANGED: + UpdateTheme(hwnd); + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} + +void Win32Window::UpdateTheme(HWND const window) { + DWORD light_mode; + DWORD light_mode_size = sizeof(light_mode); + LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, + kGetPreferredBrightnessRegValue, + RRF_RT_REG_DWORD, nullptr, &light_mode, + &light_mode_size); + + if (result == ERROR_SUCCESS) { + BOOL enable_dark_mode = light_mode == 0; + DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, + &enable_dark_mode, sizeof(enable_dark_mode)); + } +} diff --git a/frontend/where_child_bus/windows/runner/win32_window.h b/frontend/where_child_bus/windows/runner/win32_window.h new file mode 100644 index 00000000..e901dde6 --- /dev/null +++ b/frontend/where_child_bus/windows/runner/win32_window.h @@ -0,0 +1,102 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates a win32 window with |title| that is positioned and sized using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size this function will scale the inputted width and height as + // as appropriate for the default monitor. The window is invisible until + // |Show| is called. Returns true if the window was created successfully. + bool Create(const std::wstring& title, const Point& origin, const Size& size); + + // Show the current window. Returns true if the window was successfully shown. + bool Show(); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + // Update the window frame's theme to match the system theme. + static void UpdateTheme(HWND const window); + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_ From 259ed6201a00d205c283c44c9eeac114cc69ce36 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 12:52:02 +0900 Subject: [PATCH 018/771] =?UTF-8?q?chore:=20migration=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=AE=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/server/{local_main => for_local}/migration.go | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename backend/cmd/server/{local_main => for_local}/migration.go (100%) diff --git a/backend/cmd/server/local_main/migration.go b/backend/cmd/server/for_local/migration.go similarity index 100% rename from backend/cmd/server/local_main/migration.go rename to backend/cmd/server/for_local/migration.go From b5a56099cd9026a5eea15084bbb2af5a3f4054df Mon Sep 17 00:00:00 2001 From: xyzyxJP Date: Sat, 10 Feb 2024 12:52:24 +0900 Subject: [PATCH 019/771] =?UTF-8?q?chore(frontend):=20=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E3=81=AA=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/analysis_options.yaml | 24 ------ frontend/where_child_bus/lib/main.dart | 61 +--------------- frontend/where_child_bus/pubspec.yaml | 73 +------------------ .../where_child_bus/test/widget_test.dart | 31 +------- 4 files changed, 6 insertions(+), 183 deletions(-) diff --git a/frontend/where_child_bus/analysis_options.yaml b/frontend/where_child_bus/analysis_options.yaml index 0d290213..0bd999bf 100644 --- a/frontend/where_child_bus/analysis_options.yaml +++ b/frontend/where_child_bus/analysis_options.yaml @@ -1,28 +1,4 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 8e940891..cb22c6da 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -7,27 +7,11 @@ void main() { class MyApp extends StatelessWidget { const MyApp({super.key}); - // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( - title: 'Flutter Demo', + title: 'WhereChildBus', theme: ThemeData( - // This is the theme of your application. - // - // TRY THIS: Try running your application with "flutter run". You'll see - // the application has a purple toolbar. Then, without quitting the app, - // try changing the seedColor in the colorScheme below to Colors.green - // and then invoke "hot reload" (save your changes or press the "hot - // reload" button in a Flutter-supported IDE, or press "r" if you used - // the command line to start the app). - // - // Notice that the counter didn't reset back to zero; the application - // state is not lost during the reload. To reset the state, use hot - // restart instead. - // - // This works for code too, not just values: Most code changes can be - // tested with just a hot reload. colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), @@ -38,16 +22,6 @@ class MyApp extends StatelessWidget { class MyHomePage extends StatefulWidget { const MyHomePage({super.key, required this.title}); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - final String title; @override @@ -59,50 +33,19 @@ class _MyHomePageState extends State { void _incrementCounter() { setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. _counter++; }); } @override Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. return Scaffold( appBar: AppBar( - // TRY THIS: Try changing the color here to a specific color (to - // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar - // change color while the other colors stay the same. backgroundColor: Theme.of(context).colorScheme.inversePrimary, - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. title: Text(widget.title), ), body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - // - // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" - // action in the IDE, or press "p" in the console), to see the - // wireframe for each widget. mainAxisAlignment: MainAxisAlignment.center, children: [ const Text( @@ -119,7 +62,7 @@ class _MyHomePageState extends State { onPressed: _incrementCounter, tooltip: 'Increment', child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. + ), ); } } diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 3799a6aa..1940558b 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -1,90 +1,23 @@ name: where_child_bus -description: "A new Flutter project." -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +description: "WhereChildBus" +publish_to: "none" -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. version: 1.0.0+1 environment: - sdk: '>=3.2.6 <4.0.0' + sdk: ">=3.2.6 <4.0.0" -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 dev_dependencies: flutter_test: sdk: flutter - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. flutter_lints: ^2.0.0 -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/frontend/where_child_bus/test/widget_test.dart b/frontend/where_child_bus/test/widget_test.dart index 360d8929..ab73b3a2 100644 --- a/frontend/where_child_bus/test/widget_test.dart +++ b/frontend/where_child_bus/test/widget_test.dart @@ -1,30 +1 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:where_child_bus/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} +void main() {} From ea502911848d2543bbf91ef4b9a6575813bb6947 Mon Sep 17 00:00:00 2001 From: xyzyxJP Date: Sat, 10 Feb 2024 13:19:14 +0900 Subject: [PATCH 020/771] =?UTF-8?q?feat(frontend):=20=E5=88=9D=E6=9C=9F?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=81=AE=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/main.dart | 94 ++++++++----------- .../pages/bus_list_page/bus_list_page.dart | 24 +++++ .../notification_page/notification_page.dart | 24 +++++ .../student_list_page/student_list_page.dart | 24 +++++ 4 files changed, 113 insertions(+), 53 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart create mode 100644 frontend/where_child_bus/lib/pages/notification_page/notification_page.dart create mode 100644 frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index cb22c6da..1f6254b9 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -1,68 +1,56 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_list_page.dart'; +import 'package:where_child_bus/pages/notification_page/notification_page.dart'; +import 'package:where_child_bus/pages/student_list_page/student_list_page.dart'; void main() { - runApp(const MyApp()); + runApp(const App()); } -class MyApp extends StatelessWidget { - const MyApp({super.key}); +class App extends StatefulWidget { + const App({super.key}); @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'WhereChildBus', - theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), - useMaterial3: true, - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } + State createState() => _AppState(); } -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); - final String title; - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - _counter++; - }); - } +class _AppState extends State { + int _selectedIndex = 0; @override Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - backgroundColor: Theme.of(context).colorScheme.inversePrimary, - title: Text(widget.title), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], + return MaterialApp( + title: 'WhereChildBus', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), - ); + home: Scaffold( + appBar: AppBar( + title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定'][_selectedIndex]), + ), + body: [ + const StudentListPage(), + const BusListPage(), + const NotificationPage() + ][_selectedIndex], + bottomNavigationBar: BottomNavigationBar( + currentIndex: _selectedIndex, + onTap: (int index) => setState(() => _selectedIndex = index), + items: const [ + BottomNavigationBarItem( + icon: Icon(Icons.people), + label: '園児一覧', + ), + BottomNavigationBarItem( + icon: Icon(Icons.directions_bus), + label: '送迎バスコース一覧', + ), + BottomNavigationBarItem( + icon: Icon(Icons.notifications), + label: '連絡情報設定', + ), + ], + ))); } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart new file mode 100644 index 00000000..5e7d6bbe --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; + +class BusListPage extends StatefulWidget { + const BusListPage({super.key}); + + @override + State createState() => _BusListPageState(); +} + +class _BusListPageState extends State { + @override + Widget build(BuildContext context) { + return const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '送迎バスコース一覧', + ), + ], + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/notification_page/notification_page.dart b/frontend/where_child_bus/lib/pages/notification_page/notification_page.dart new file mode 100644 index 00000000..3733a369 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/notification_page/notification_page.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; + +class NotificationPage extends StatefulWidget { + const NotificationPage({super.key}); + + @override + State createState() => _NotificationPageState(); +} + +class _NotificationPageState extends State { + @override + Widget build(BuildContext context) { + return const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '連絡情報設定', + ), + ], + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart new file mode 100644 index 00000000..34f26c3d --- /dev/null +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; + +class StudentListPage extends StatefulWidget { + const StudentListPage({super.key}); + + @override + State createState() => _StudentListPageState(); +} + +class _StudentListPageState extends State { + @override + Widget build(BuildContext context) { + return const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '園児一覧', + ), + ], + ), + ); + } +} From 2544e7d97f668723305186713eba61b2fd03a703 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 14:17:17 +0900 Subject: [PATCH 021/771] =?UTF-8?q?style:=20=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=A2=E3=82=A6=E3=83=88=E3=82=92=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/schema/child_bus_association.go | 1 - backend/domain/repository/ent/schema/child_photo.go | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/domain/repository/ent/schema/child_bus_association.go b/backend/domain/repository/ent/schema/child_bus_association.go index fb82ff9a..3645bd35 100644 --- a/backend/domain/repository/ent/schema/child_bus_association.go +++ b/backend/domain/repository/ent/schema/child_bus_association.go @@ -16,7 +16,6 @@ type ChildBusAssociation struct { // Fields of the ChildBusAssociation. func (ChildBusAssociation) Fields() []ent.Field { return []ent.Field{ - // ! Optionalではなく、Requiredにすると、外部キー制約が効いてしまう。 field.UUID("child_id", uuid.UUID{}), field.UUID("bus_id", uuid.UUID{}), field.Enum("bus_type"). diff --git a/backend/domain/repository/ent/schema/child_photo.go b/backend/domain/repository/ent/schema/child_photo.go index 486dfad4..9c33d492 100644 --- a/backend/domain/repository/ent/schema/child_photo.go +++ b/backend/domain/repository/ent/schema/child_photo.go @@ -18,6 +18,7 @@ type ChildPhoto struct { func (ChildPhoto) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + // TODO: s3周りのfieldを要件等 field.String("s3_bucket").Comment("AWS S3のバケット名"), field.String("s3_key").Comment("S3内の画像ファイルのキー(ファイルパス含む)"), field.Time("created_at").Default(time.Now).Comment("レコードの作成日時"), From 3055120e6391128c3c5f6e11b3e1abc69bf25718 Mon Sep 17 00:00:00 2001 From: xyzyxJP Date: Sat, 10 Feb 2024 14:47:18 +0900 Subject: [PATCH 022/771] =?UTF-8?q?chore(frontend):=20Scaffold=E3=81=AE?= =?UTF-8?q?=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/app.dart | 52 ++++++++++++++++++++++++++ frontend/where_child_bus/lib/main.dart | 48 +++--------------------- 2 files changed, 58 insertions(+), 42 deletions(-) create mode 100644 frontend/where_child_bus/lib/app.dart diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart new file mode 100644 index 00000000..141572ea --- /dev/null +++ b/frontend/where_child_bus/lib/app.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_list_page.dart'; +import 'package:where_child_bus/pages/notification_page/notification_page.dart'; +import 'package:where_child_bus/pages/student_list_page/student_list_page.dart'; + +class App extends StatefulWidget { + const App({super.key}); + + @override + State createState() => _AppState(); +} + +class _AppState extends State { + int _selectedIndex = 0; + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'WhereChildBus', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: Scaffold( + appBar: AppBar( + title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定'][_selectedIndex]), + ), + body: [ + const StudentListPage(), + const BusListPage(), + const NotificationPage() + ][_selectedIndex], + bottomNavigationBar: BottomNavigationBar( + currentIndex: _selectedIndex, + onTap: (int index) => setState(() => _selectedIndex = index), + items: const [ + BottomNavigationBarItem( + icon: Icon(Icons.people), + label: '園児一覧', + ), + BottomNavigationBarItem( + icon: Icon(Icons.directions_bus), + label: '送迎バスコース一覧', + ), + BottomNavigationBarItem( + icon: Icon(Icons.notifications), + label: '連絡情報設定', + ), + ], + ))); + } +} diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 1f6254b9..cff185f4 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -1,56 +1,20 @@ import 'package:flutter/material.dart'; -import 'package:where_child_bus/pages/bus_list_page/bus_list_page.dart'; -import 'package:where_child_bus/pages/notification_page/notification_page.dart'; -import 'package:where_child_bus/pages/student_list_page/student_list_page.dart'; +import 'package:where_child_bus/app.dart'; void main() { runApp(const App()); } -class App extends StatefulWidget { - const App({super.key}); +class MyApp extends StatefulWidget { + const MyApp({super.key}); @override - State createState() => _AppState(); + State createState() => _MyAppState(); } -class _AppState extends State { - int _selectedIndex = 0; - +class _MyAppState extends State { @override Widget build(BuildContext context) { - return MaterialApp( - title: 'WhereChildBus', - theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), - useMaterial3: true, - ), - home: Scaffold( - appBar: AppBar( - title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定'][_selectedIndex]), - ), - body: [ - const StudentListPage(), - const BusListPage(), - const NotificationPage() - ][_selectedIndex], - bottomNavigationBar: BottomNavigationBar( - currentIndex: _selectedIndex, - onTap: (int index) => setState(() => _selectedIndex = index), - items: const [ - BottomNavigationBarItem( - icon: Icon(Icons.people), - label: '園児一覧', - ), - BottomNavigationBarItem( - icon: Icon(Icons.directions_bus), - label: '送迎バスコース一覧', - ), - BottomNavigationBarItem( - icon: Icon(Icons.notifications), - label: '連絡情報設定', - ), - ], - ))); + return const App(); } } From dab616f78a7d455da645034352dc7e5613529a81 Mon Sep 17 00:00:00 2001 From: xyzyxJP Date: Sat, 10 Feb 2024 15:36:47 +0900 Subject: [PATCH 023/771] =?UTF-8?q?feat(frontend):=20=E8=AA=8D=E8=A8=BC?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=81=AE=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/main.dart | 2 +- .../lib/pages/auth_page/auth_page.dart | 75 +++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 frontend/where_child_bus/lib/pages/auth_page/auth_page.dart diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index cff185f4..065d5c2c 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; void main() { - runApp(const App()); + runApp(const MyApp()); } class MyApp extends StatefulWidget { diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart new file mode 100644 index 00000000..1fecf62e --- /dev/null +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -0,0 +1,75 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +class AuthPage extends StatefulWidget { + const AuthPage({super.key}); + + @override + State createState() => _AuthPageState(); +} + +class _AuthPageState extends State { + final _emailController = TextEditingController(); + final _passwordController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( + body: Center( + child: Padding( + padding: const EdgeInsets.all(32), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'WhereChildBus', + style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 32), + Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'メールアドレス', + ), + controller: _emailController, + keyboardType: TextInputType.emailAddress, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'パスワード', + ), + controller: _passwordController, + obscureText: true, + keyboardType: TextInputType.visiblePassword, + ), + ), + const SizedBox(height: 32), + SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + child: ElevatedButton( + onPressed: () { + if (kDebugMode) { + debugPrint("email: ${_emailController.text}"); + debugPrint("password: ${_passwordController.text}"); + } + }, + child: const Text('ログイン'), + ), + ), + ], + ), + ), + )), + ), + ); + } +} From 8e9fea51ba0940384bf7a151a7c7a1e5fbb8b262 Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sat, 10 Feb 2024 15:45:32 +0900 Subject: [PATCH 024/771] feat: add face-detection and clipping feature --- src/face_detect_model/data/util.py | 52 ++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/src/face_detect_model/data/util.py b/src/face_detect_model/data/util.py index 6b25ed06..c7d514c7 100644 --- a/src/face_detect_model/data/util.py +++ b/src/face_detect_model/data/util.py @@ -1,3 +1,49 @@ -# TODO: OpenCVでbounty boxをとってきてクリップ -def clip_bounty_box(): - print("Clipping bounty box") +import cv2 +import os + +def load_cascade(cascade_path): + """Haar Cascadeを読み込む""" + return cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) + +def detect_faces(image_path, face_cascade): + """画像から顔を検出する""" + image = cv2.imread(image_path) + if image is None: + print(f"画像ファイルが見つからないか読み込めません: {image_path}") + return None, None + gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) + faces = face_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=5, minSize=(30, 30)) + return image, faces + +def save_faces(image, faces, save_dir, image_size): + """検出された顔を固定サイズで保存する""" + if not os.path.exists(save_dir): + os.makedirs(save_dir) + for i, (x, y, w, h) in enumerate(faces): + face_roi = image[y:y+h, x:x+w] + # 画像を固定サイズにリサイズ + resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) + save_path = os.path.join(save_dir, f'face_{i}.jpg') + if not cv2.imwrite(save_path, resized_face): + print(f"画像の保存に失敗しました: {save_path}") + else: + print(f"画像を保存しました: {save_path}") + +def main(): + # パスの指定 + face_cascade_path = 'haarcascade_frontalface_default.xml' + image_path = 'src/face_detect_model/data/test2.jpg' + save_dir = './detected_faces' + image_size = (100, 100) # 保存する画像サイズ + + # Haar Cascadeの読み込み + face_cascade = load_cascade(face_cascade_path) + + # 画像から顔を検出 + image, faces = detect_faces(image_path, face_cascade) + if image is not None and faces is not None: + # 検出された顔を固定サイズで保存 + save_faces(image, faces, save_dir, image_size) + +if __name__ == "__main__": + main() From 992431f3bb40d4294d6925de85d660603d1f285f Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 15:47:01 +0900 Subject: [PATCH 025/771] =?UTF-8?q?feat(ml):=20Model=E3=81=AE=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/model/model.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/machine_learning/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/model.py index 8b137891..a4994035 100644 --- a/machine_learning/src/face_detect_model/model/model.py +++ b/machine_learning/src/face_detect_model/model/model.py @@ -1 +1,27 @@ +import torch.nn as nn + +class Net(nn.Module): + def __init__(self, num_classes): + super(Net, self).__init__() + self.relu = nn.ReLU() + self.pool = nn.MaxPool2d(2, stride=2) + + self.conv1 = nn.Conv2d(in_channels=1, out_channels=16, kernel_size=3) + self.conv2 = nn.Conv2d(in_channels=16, out_channels=32, kernel_size=3) + + self.linear = nn.Linear(32 * 5 * 5, 120) + self.classier = nn.Linear(120, num_classes) + + def forward(self, x): + x = self.conv1(x) + x = self.relu(x) + x = self.pool(x) + x = self.conv2(x) + x = self.relu(x) + x = self.pool(x) + x = x.view(x.size()[0], -1) + x = self.linear(x) + x = self.relu(x) + x = self.classier(x) + return x From 34b4c2dcaac08d88bc84109af890e61ddbf4b4d3 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 15:53:32 +0900 Subject: [PATCH 026/771] =?UTF-8?q?chore(ml):=20pyyaml=E3=83=91=E3=83=83?= =?UTF-8?q?=E3=82=B1=E3=83=BC=E3=82=B8=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/README.md | 0 machine_learning/pyproject.toml | 1 + machine_learning/requirements-dev.lock | 1 + machine_learning/requirements.lock | 1 + 4 files changed, 3 insertions(+) create mode 100644 machine_learning/README.md diff --git a/machine_learning/README.md b/machine_learning/README.md new file mode 100644 index 00000000..e69de29b diff --git a/machine_learning/pyproject.toml b/machine_learning/pyproject.toml index 6407de17..61d5b3a1 100644 --- a/machine_learning/pyproject.toml +++ b/machine_learning/pyproject.toml @@ -8,6 +8,7 @@ dependencies = [ "torch>=2.2.0", "torchvision>=0.17.0", "numpy>=1.24.4", + "pyyaml>=6.0.1", ] readme = "README.md" requires-python = ">= 3.8" diff --git a/machine_learning/requirements-dev.lock b/machine_learning/requirements-dev.lock index e2b8ba92..22dbfcff 100644 --- a/machine_learning/requirements-dev.lock +++ b/machine_learning/requirements-dev.lock @@ -19,6 +19,7 @@ networkx==3.2.1 numpy==1.26.4 opencv-python==4.9.0.80 pillow==10.2.0 +pyyaml==6.0.1 requests==2.31.0 sympy==1.12 torch==2.2.0 diff --git a/machine_learning/requirements.lock b/machine_learning/requirements.lock index e2b8ba92..22dbfcff 100644 --- a/machine_learning/requirements.lock +++ b/machine_learning/requirements.lock @@ -19,6 +19,7 @@ networkx==3.2.1 numpy==1.26.4 opencv-python==4.9.0.80 pillow==10.2.0 +pyyaml==6.0.1 requests==2.31.0 sympy==1.12 torch==2.2.0 From 120db5cef195953c03cbe05b3e844d4fd85ae155 Mon Sep 17 00:00:00 2001 From: xyzyxJP Date: Sat, 10 Feb 2024 16:00:20 +0900 Subject: [PATCH 027/771] =?UTF-8?q?chore(frontend):=20MaterialApp=E3=82=92?= =?UTF-8?q?main.dart=E3=81=AB=E7=B5=B1=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/app.dart | 61 +++++++++---------- frontend/where_child_bus/lib/main.dart | 9 ++- .../lib/pages/auth_page/auth_page.dart | 13 ++-- 3 files changed, 42 insertions(+), 41 deletions(-) diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index 141572ea..0d09429c 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -15,38 +15,33 @@ class _AppState extends State { @override Widget build(BuildContext context) { - return MaterialApp( - title: 'WhereChildBus', - theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), - useMaterial3: true, - ), - home: Scaffold( - appBar: AppBar( - title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定'][_selectedIndex]), - ), - body: [ - const StudentListPage(), - const BusListPage(), - const NotificationPage() - ][_selectedIndex], - bottomNavigationBar: BottomNavigationBar( - currentIndex: _selectedIndex, - onTap: (int index) => setState(() => _selectedIndex = index), - items: const [ - BottomNavigationBarItem( - icon: Icon(Icons.people), - label: '園児一覧', - ), - BottomNavigationBarItem( - icon: Icon(Icons.directions_bus), - label: '送迎バスコース一覧', - ), - BottomNavigationBarItem( - icon: Icon(Icons.notifications), - label: '連絡情報設定', - ), - ], - ))); + return Scaffold( + appBar: AppBar( + title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定'][_selectedIndex]), + ), + body: [ + const StudentListPage(), + const BusListPage(), + const NotificationPage() + ][_selectedIndex], + bottomNavigationBar: BottomNavigationBar( + currentIndex: _selectedIndex, + onTap: (int index) => setState(() => _selectedIndex = index), + items: const [ + BottomNavigationBarItem( + icon: Icon(Icons.people), + label: '園児一覧', + ), + BottomNavigationBarItem( + icon: Icon(Icons.directions_bus), + label: '送迎バスコース一覧', + ), + BottomNavigationBarItem( + icon: Icon(Icons.notifications), + label: '連絡情報設定', + ), + ], + ), + ); } } diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 065d5c2c..b06324d6 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -15,6 +15,13 @@ class MyApp extends StatefulWidget { class _MyAppState extends State { @override Widget build(BuildContext context) { - return const App(); + return MaterialApp( + title: 'WhereChildBus', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const App(), + ); } } diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index 1fecf62e..171c0937 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -14,11 +14,10 @@ class _AuthPageState extends State { @override Widget build(BuildContext context) { - return MaterialApp( - home: GestureDetector( - onTap: () => FocusScope.of(context).unfocus(), - child: Scaffold( - body: Center( + return GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( + body: Center( child: Padding( padding: const EdgeInsets.all(32), child: Column( @@ -64,11 +63,11 @@ class _AuthPageState extends State { }, child: const Text('ログイン'), ), - ), + ) ], ), ), - )), + ), ), ); } From ef75f89ab2b97a7386366b2513457c722dee044d Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sat, 10 Feb 2024 16:02:15 +0900 Subject: [PATCH 028/771] fix: changed path for savidir --- src/face_detect_model/data/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/face_detect_model/data/util.py b/src/face_detect_model/data/util.py index c7d514c7..d917707e 100644 --- a/src/face_detect_model/data/util.py +++ b/src/face_detect_model/data/util.py @@ -32,9 +32,9 @@ def save_faces(image, faces, save_dir, image_size): def main(): # パスの指定 face_cascade_path = 'haarcascade_frontalface_default.xml' - image_path = 'src/face_detect_model/data/test2.jpg' - save_dir = './detected_faces' - image_size = (100, 100) # 保存する画像サイズ + image_path = 'src/face_detect_model/data/test2.jpg' #ローカルなのであとで変更する + save_dir = './src/face_detect_model/data/img' + image_size = (500, 500) # 保存する画像サイズ # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) From bdcf3c8dbe3303cfef1f7b80af9b6564cf002512 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 16:06:13 +0900 Subject: [PATCH 029/771] =?UTF-8?q?chore(ml):=20config.yaml=E3=82=92?= =?UTF-8?q?=E6=83=B3=E5=AE=9A=E3=81=97=E3=81=9F=E3=83=A2=E3=83=87=E3=83=AB?= =?UTF-8?q?=E5=AE=9A=E7=BE=A9=E3=81=B8=E3=81=AE=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/config.yaml | 12 ++++++++++ .../src/face_detect_model/model/model.py | 24 ++++++++++++++----- 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 machine_learning/src/face_detect_model/config.yaml diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml new file mode 100644 index 00000000..d59d9e4a --- /dev/null +++ b/machine_learning/src/face_detect_model/config.yaml @@ -0,0 +1,12 @@ +model: + hidden_size: 120 + Conv2d: + kernel_size: 3 + pooling: + kernel_size: 2 + stride: 2 +train: + epoch: 3 + train_batch_size: 128 + valid_batch_size: 64 + test_batch_size: 1 diff --git a/machine_learning/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/model.py index a4994035..0aa0bded 100644 --- a/machine_learning/src/face_detect_model/model/model.py +++ b/machine_learning/src/face_detect_model/model/model.py @@ -2,16 +2,28 @@ class Net(nn.Module): - def __init__(self, num_classes): + def __init__(self, config: dict, num_classes: int): super(Net, self).__init__() + self.config = config + self.relu = nn.ReLU() - self.pool = nn.MaxPool2d(2, stride=2) + self.pool = nn.MaxPool2d( + kernel_size=config["model"]["kernel_size"], stride=config["model"]["stride"] + ) - self.conv1 = nn.Conv2d(in_channels=1, out_channels=16, kernel_size=3) - self.conv2 = nn.Conv2d(in_channels=16, out_channels=32, kernel_size=3) + self.conv1 = nn.Conv2d( + in_channels=1, + out_channels=16, + kernel_size=config["model"]["Conv2d"]["kernel_size"], + ) + self.conv2 = nn.Conv2d( + in_channels=16, + out_channels=32, + kernel_size=config["model"]["Conv2d"]["kernel_size"], + ) - self.linear = nn.Linear(32 * 5 * 5, 120) - self.classier = nn.Linear(120, num_classes) + self.linear = nn.Linear(32 * 5 * 5, config["model"]["hidden_size"]) + self.classier = nn.Linear(config["model"]["hidden_size"], num_classes) def forward(self, x): x = self.conv1(x) From b687ba59e55e8a9b273fd4d9d63c91ff3950981a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 16:18:42 +0900 Subject: [PATCH 030/771] =?UTF-8?q?chore(backend0:=20.gitignore=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.gitignore | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 backend/.gitignore diff --git a/backend/.gitignore b/backend/.gitignore new file mode 100644 index 00000000..727236a5 --- /dev/null +++ b/backend/.gitignore @@ -0,0 +1,30 @@ +# Created by https://www.toptal.com/developers/gitignore/api/go +# Edit at https://www.toptal.com/developers/gitignore?templates=go + +### Go ### +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work + +# End of https://www.toptal.com/developers/gitignore/api/go + +# envfile +.env \ No newline at end of file From 0fb6703955d63479fd44e7065dff6034d146979c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 10 Feb 2024 17:09:02 +0900 Subject: [PATCH 031/771] =?UTF-8?q?feat[=E8=A1=A8=E7=A4=BA]:=E3=83=90?= =?UTF-8?q?=E3=82=B9=E3=81=AE=E3=83=AA=E3=82=B9=E3=83=88=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_list_page.dart | 93 ++++++++++++++++++- 1 file changed, 89 insertions(+), 4 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 5e7d6bbe..6116c4bc 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -8,15 +8,100 @@ class BusListPage extends StatefulWidget { } class _BusListPageState extends State { + final items = ["バス1", "バス2", "バス3", "バス4", "バス5", "バス5", "バス5", "バス5", "バス5"]; + + @override Widget build(BuildContext context) { - return const Center( + return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( - '送迎バスコース一覧', - ), + pageTitle(), + Expanded( + child: listViewBuilder(), + ) + ], + ), + ); + } + + Widget pageTitle() { + return const Padding( + padding: EdgeInsets.all(10), + child: Text( + '送迎バスコース一覧', + ), + ); + } + + Widget listViewBuilder() { + return ListView.builder( + //TODO: 実際にはAPIからデータを取得 + itemCount: items.length, + itemBuilder: (BuildContext context, int index) { + return busListCard(items[index]); + }, + ); + } + + Widget busListCard(String name) { + return Card( + elevation: 4, + margin: const EdgeInsets.all(16), + clipBehavior: Clip.antiAliasWithSaveLayer, + child: busNameAndDescription(name), + ); + } + + Widget busPhoto() { + return SizedBox( + width: 100, + height: 100, + child: Card( + child: Text("ここに画像が来る") + ), + ); + } + + Widget busName(name) { + return Container( + width: double.infinity, + padding: + const EdgeInsets.symmetric(vertical: 4, horizontal: 8), + child: Text( + name, + style: const TextStyle( + fontWeight: FontWeight.w600, + fontSize: 22, + ), + ), + ); + } + + Widget busDescription(String description) { + return Container( + width: double.infinity, + padding: const EdgeInsets.symmetric(horizontal: 8), + child: Text( + description, + style: const TextStyle( + color: Colors.grey, + fontSize: 16, + ), + overflow: TextOverflow.ellipsis, + maxLines: 2, + ), + ); + } + + Widget busNameAndDescription(String name) { + return Padding( + padding: const EdgeInsets.all(10), + child: Column( + children: [ + busName(name), + busDescription("テストの説明文") ], ), ); From 033ef2bb1f6c7ccf202583ada1f747ec8950dffc Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sat, 10 Feb 2024 17:25:27 +0900 Subject: [PATCH 032/771] [refactor]changed detect_faces, image_path to image --- .../src/face_detect_model/data/util.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/util.py b/machine_learning/src/face_detect_model/data/util.py index d917707e..108b98e7 100644 --- a/machine_learning/src/face_detect_model/data/util.py +++ b/machine_learning/src/face_detect_model/data/util.py @@ -5,15 +5,11 @@ def load_cascade(cascade_path): """Haar Cascadeを読み込む""" return cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) -def detect_faces(image_path, face_cascade): +def detect_faces(image, face_cascade): """画像から顔を検出する""" - image = cv2.imread(image_path) - if image is None: - print(f"画像ファイルが見つからないか読み込めません: {image_path}") - return None, None gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=5, minSize=(30, 30)) - return image, faces + return faces def save_faces(image, faces, save_dir, image_size): """検出された顔を固定サイズで保存する""" @@ -35,6 +31,12 @@ def main(): image_path = 'src/face_detect_model/data/test2.jpg' #ローカルなのであとで変更する save_dir = './src/face_detect_model/data/img' image_size = (500, 500) # 保存する画像サイズ + + # 画像読み込み + image = cv2.imread(image_path) + if image is None: + print(f"画像ファイルが見つからないか読み込めません: {image_path}") + return None, None # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) From 6423577ce7b777fe265ff7727a933be9898ff486 Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sat, 10 Feb 2024 17:34:28 +0900 Subject: [PATCH 033/771] [refactor]add clip and resize func --- .../src/face_detect_model/data/util.py | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/util.py b/machine_learning/src/face_detect_model/data/util.py index 108b98e7..34ef5099 100644 --- a/machine_learning/src/face_detect_model/data/util.py +++ b/machine_learning/src/face_detect_model/data/util.py @@ -11,19 +11,26 @@ def detect_faces(image, face_cascade): faces = face_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=5, minSize=(30, 30)) return faces -def save_faces(image, faces, save_dir, image_size): - """検出された顔を固定サイズで保存する""" - if not os.path.exists(save_dir): - os.makedirs(save_dir) - for i, (x, y, w, h) in enumerate(faces): +def clip_and_resize_faces(image, faces, image_size): + """検出された顔をクリップし、指定サイズにリサイズする""" + clipped_faces = [] + for (x, y, w, h) in faces: face_roi = image[y:y+h, x:x+w] - # 画像を固定サイズにリサイズ resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) + clipped_faces.append(resized_face) + return clipped_faces + +def save_faces(clipped_faces, save_dir): + """クリップされた顔画像を保存する""" + if not os.path.exists(save_dir): + os.makedirs(save_dir) + for i, face in enumerate(clipped_faces): save_path = os.path.join(save_dir, f'face_{i}.jpg') - if not cv2.imwrite(save_path, resized_face): - print(f"画像の保存に失敗しました: {save_path}") - else: + try: + cv2.imwrite(save_path, face) print(f"画像を保存しました: {save_path}") + except Exception as e: + print(f"画像の保存に失敗しました: {save_path}. エラー: {e}") def main(): # パスの指定 From d8d328e84f8dd8125c3bd638989ef78a4d67c032 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 10 Feb 2024 17:43:44 +0900 Subject: [PATCH 034/771] =?UTF-8?q?refactor:=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E7=94=A8=E3=81=AE=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_list_page.dart | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 6116c4bc..be32c1d0 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -17,7 +17,6 @@ class _BusListPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - pageTitle(), Expanded( child: listViewBuilder(), ) @@ -26,15 +25,6 @@ class _BusListPageState extends State { ); } - Widget pageTitle() { - return const Padding( - padding: EdgeInsets.all(10), - child: Text( - '送迎バスコース一覧', - ), - ); - } - Widget listViewBuilder() { return ListView.builder( //TODO: 実際にはAPIからデータを取得 @@ -46,11 +36,19 @@ class _BusListPageState extends State { } Widget busListCard(String name) { - return Card( - elevation: 4, - margin: const EdgeInsets.all(16), - clipBehavior: Clip.antiAliasWithSaveLayer, - child: busNameAndDescription(name), + return SizedBox( + width: 300, + child: Card( + elevation: 8, + margin: const EdgeInsets.all(16), + clipBehavior: Clip.antiAliasWithSaveLayer, + child: Row( + children: [ + busPhoto(), + busNameAndDescription(name), + ], + ), + ), ); } @@ -59,18 +57,18 @@ class _BusListPageState extends State { width: 100, height: 100, child: Card( - child: Text("ここに画像が来る") + child: const Text("ここに画像が来る") ), ); } Widget busName(name) { return Container( - width: double.infinity, padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8), child: Text( name, + textAlign: TextAlign.left, style: const TextStyle( fontWeight: FontWeight.w600, fontSize: 22, @@ -81,7 +79,6 @@ class _BusListPageState extends State { Widget busDescription(String description) { return Container( - width: double.infinity, padding: const EdgeInsets.symmetric(horizontal: 8), child: Text( description, @@ -99,6 +96,7 @@ class _BusListPageState extends State { return Padding( padding: const EdgeInsets.all(10), child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ busName(name), busDescription("テストの説明文") From bf068cac65297fc72a47be6014fd2f7f5bc11599 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 10 Feb 2024 18:00:26 +0900 Subject: [PATCH 035/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=81=AE=E6=A8=AA=E5=B9=85=E3=82=92?= =?UTF-8?q?=E5=89=8A=E6=B8=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bus_list_page.dart | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index be32c1d0..3bb13d99 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -36,8 +36,8 @@ class _BusListPageState extends State { } Widget busListCard(String name) { - return SizedBox( - width: 300, + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), child: Card( elevation: 8, margin: const EdgeInsets.all(16), @@ -64,8 +64,6 @@ class _BusListPageState extends State { Widget busName(name) { return Container( - padding: - const EdgeInsets.symmetric(vertical: 4, horizontal: 8), child: Text( name, textAlign: TextAlign.left, @@ -79,7 +77,6 @@ class _BusListPageState extends State { Widget busDescription(String description) { return Container( - padding: const EdgeInsets.symmetric(horizontal: 8), child: Text( description, style: const TextStyle( From 9ba4fe1b39a291e08aff30a4595ab804a4d314f1 Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sat, 10 Feb 2024 18:26:59 +0900 Subject: [PATCH 036/771] [refactor]changed main --- .../src/face_detect_model/data/util.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/util.py b/machine_learning/src/face_detect_model/data/util.py index 34ef5099..0ffdd30c 100644 --- a/machine_learning/src/face_detect_model/data/util.py +++ b/machine_learning/src/face_detect_model/data/util.py @@ -35,7 +35,7 @@ def save_faces(clipped_faces, save_dir): def main(): # パスの指定 face_cascade_path = 'haarcascade_frontalface_default.xml' - image_path = 'src/face_detect_model/data/test2.jpg' #ローカルなのであとで変更する + image_path = 'src/face_detect_model/data/Nanakusa.jpeg' #ローカルなのであとで変更する save_dir = './src/face_detect_model/data/img' image_size = (500, 500) # 保存する画像サイズ @@ -43,16 +43,12 @@ def main(): image = cv2.imread(image_path) if image is None: print(f"画像ファイルが見つからないか読み込めません: {image_path}") - return None, None + return - # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) - - # 画像から顔を検出 - image, faces = detect_faces(image_path, face_cascade) - if image is not None and faces is not None: - # 検出された顔を固定サイズで保存 - save_faces(image, faces, save_dir, image_size) + faces = detect_faces(image, face_cascade) + clipped_faces = clip_and_resize_faces(image, faces, image_size) + save_faces(clipped_faces, save_dir) if __name__ == "__main__": main() From 3ead2c63cf3f5796da2a9345df661081c2c96be5 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 10 Feb 2024 18:38:05 +0900 Subject: [PATCH 037/771] =?UTF-8?q?fix:=E3=82=AB=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=81=AE=E8=89=B2=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_list_page.dart | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 3bb13d99..d08e0ed8 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -37,16 +37,19 @@ class _BusListPageState extends State { Widget busListCard(String name) { return Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: const EdgeInsets.symmetric(horizontal: 0.0), child: Card( elevation: 8, margin: const EdgeInsets.all(16), clipBehavior: Clip.antiAliasWithSaveLayer, - child: Row( - children: [ - busPhoto(), - busNameAndDescription(name), - ], + child: Material( + color: Colors.white, + child: Row( + children: [ + busPhoto(), + busNameAndDescription(name), + ], + ), ), ), ); @@ -63,29 +66,25 @@ class _BusListPageState extends State { } Widget busName(name) { - return Container( - child: Text( - name, - textAlign: TextAlign.left, - style: const TextStyle( - fontWeight: FontWeight.w600, - fontSize: 22, - ), + return Text( + name, + textAlign: TextAlign.left, + style: const TextStyle( + fontWeight: FontWeight.w600, + fontSize: 22, ), ); } Widget busDescription(String description) { - return Container( - child: Text( - description, - style: const TextStyle( - color: Colors.grey, - fontSize: 16, - ), - overflow: TextOverflow.ellipsis, - maxLines: 2, + return Text( + description, + style: const TextStyle( + color: Colors.grey, + fontSize: 16, ), + overflow: TextOverflow.ellipsis, + maxLines: 2, ); } From e07a91286d50e66b2036061f54551e9b6c4700ce Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 10 Feb 2024 19:06:46 +0900 Subject: [PATCH 038/771] =?UTF-8?q?feat:=E5=9C=92=E5=85=90=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E7=94=BB=E9=9D=A2=E3=81=AE=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WhereChildBus | 1 + .../student_list_page/student_list_page.dart | 79 ++++++++++++++++--- 2 files changed, 70 insertions(+), 10 deletions(-) create mode 160000 WhereChildBus diff --git a/WhereChildBus b/WhereChildBus new file mode 160000 index 00000000..df5b0f47 --- /dev/null +++ b/WhereChildBus @@ -0,0 +1 @@ +Subproject commit df5b0f474e3b9f44a63df4e2a5f21b287ba2dbab diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 34f26c3d..9af1d6f5 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -10,15 +10,74 @@ class StudentListPage extends StatefulWidget { class _StudentListPageState extends State { @override Widget build(BuildContext context) { - return const Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - '園児一覧', - ), - ], - ), - ); + final List name = [ + "園児1", + "園児2", + "園児3", + "園児4", + "園児5", + ]; + final List group = [ + "1組", + "2組", + "3組", + "4組", + "5組", + ]; + + return ListView.separated( + itemCount: name.length, + separatorBuilder: (BuildContext context, int index) { + return Divider( + height: 20, + color: Colors.transparent, + ); + }, + itemBuilder: (BuildContext context, int index) { + return FractionallySizedBox( + widthFactor: 0.8, + child: Card( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row(children: [ + childImage(), + SizedBox( + width: 30, + ), + nameAndGroup(name[index], group[index]), + ])))); + }); + } + + Widget childImage() { + return SizedBox( + width: 100, + height: 100, + child: Card( + color: Colors.grey, + )); + } + + Widget nameAndGroup(String name, String group) { + return SizedBox( + width: 200, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(name, style: TextStyle(color: Colors.black, fontSize: 24)), + Text( + group, + style: TextStyle(color: Colors.black), + ), + place(), + ])); + } + + Widget place() { + return Row(children: [ + Text("乗降場所:"), + Text("停留所名"), + ]); } } From 5a7fa6fc2c0e31a9e930d90a7271fc04f59d1941 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 10 Feb 2024 19:12:30 +0900 Subject: [PATCH 039/771] =?UTF-8?q?feat:=E7=94=BB=E5=83=8F=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/images/bus_not_operating.png | Bin 0 -> 8185 bytes .../assets/images/bus_operating.png | Bin 0 -> 8852 bytes frontend/where_child_bus/pubspec.yaml | 3 +++ 3 files changed, 3 insertions(+) create mode 100644 frontend/where_child_bus/assets/images/bus_not_operating.png create mode 100644 frontend/where_child_bus/assets/images/bus_operating.png diff --git a/frontend/where_child_bus/assets/images/bus_not_operating.png b/frontend/where_child_bus/assets/images/bus_not_operating.png new file mode 100644 index 0000000000000000000000000000000000000000..8e9d4f498d2928904cfd8ba4727993e1980832d7 GIT binary patch literal 8185 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/assets/images/bus_operating.png b/frontend/where_child_bus/assets/images/bus_operating.png new file mode 100644 index 0000000000000000000000000000000000000000..ee7ff44feb48344349c3080b6901eeb777df2811 GIT binary patch literal 8852 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 a02ETMblza?#Bj$<04+6r)hcCF=>GtGe%pWm literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 1940558b..5cf3e69b 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -21,3 +21,6 @@ dev_dependencies: flutter: uses-material-design: true + assets: + - assets\images\bus_not_operating.png + - assets\images\bus_operating.png \ No newline at end of file From fa443c62ce641474a891c48fe1473826b7a70e80 Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sat, 10 Feb 2024 19:14:46 +0900 Subject: [PATCH 040/771] [refactor]conside singlular responsiblity, faces to face --- .../src/face_detect_model/data/util.py | 52 ++++++++++--------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/util.py b/machine_learning/src/face_detect_model/data/util.py index 0ffdd30c..7090a46f 100644 --- a/machine_learning/src/face_detect_model/data/util.py +++ b/machine_learning/src/face_detect_model/data/util.py @@ -5,50 +5,52 @@ def load_cascade(cascade_path): """Haar Cascadeを読み込む""" return cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) -def detect_faces(image, face_cascade): +def detect_face(image, face_cascade): """画像から顔を検出する""" gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=5, minSize=(30, 30)) return faces -def clip_and_resize_faces(image, faces, image_size): +def clip_and_resize_face(image, x, y, w, h, image_size): """検出された顔をクリップし、指定サイズにリサイズする""" - clipped_faces = [] - for (x, y, w, h) in faces: - face_roi = image[y:y+h, x:x+w] - resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) - clipped_faces.append(resized_face) - return clipped_faces + face_roi = image[y:y+h, x:x+w] + resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) + return resized_face -def save_faces(clipped_faces, save_dir): +def save_face(face, save_dir, index): """クリップされた顔画像を保存する""" if not os.path.exists(save_dir): os.makedirs(save_dir) - for i, face in enumerate(clipped_faces): - save_path = os.path.join(save_dir, f'face_{i}.jpg') - try: - cv2.imwrite(save_path, face) - print(f"画像を保存しました: {save_path}") - except Exception as e: - print(f"画像の保存に失敗しました: {save_path}. エラー: {e}") + save_path = os.path.join(save_dir, f'face_{index}.jpg') + try: + cv2.imwrite(save_path, face) + print(f"画像を保存しました: {save_path}") + except Exception as e: + print(f"画像の保存に失敗しました: {save_path}. エラー: {e}") def main(): - # パスの指定 + # パスの指定 face_cascade_path = 'haarcascade_frontalface_default.xml' - image_path = 'src/face_detect_model/data/Nanakusa.jpeg' #ローカルなのであとで変更する + image_path = 'src/face_detect_model/data/Nanakusa.jpeg' save_dir = './src/face_detect_model/data/img' - image_size = (500, 500) # 保存する画像サイズ - - # 画像読み込み + image_size = (100, 100) + + # 画像の読み込み image = cv2.imread(image_path) if image is None: print(f"画像ファイルが見つからないか読み込めません: {image_path}") return - + + # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) - faces = detect_faces(image, face_cascade) - clipped_faces = clip_and_resize_faces(image, faces, image_size) - save_faces(clipped_faces, save_dir) + + # 画像から顔を検出 + faces = detect_face(image, face_cascade) + + # 検出された各顔に対して処理 + for i, (x, y, w, h) in enumerate(faces): + clipped_face = clip_and_resize_face(image, x, y, w, h, image_size) + save_face(clipped_face, save_dir, i) if __name__ == "__main__": main() From 214383f1a42c3de78f91d2a63123d096e097741c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 10 Feb 2024 19:31:10 +0900 Subject: [PATCH 041/771] =?UTF-8?q?feat:=E9=81=8B=E8=B1=AA=E7=8A=B6?= =?UTF-8?q?=E6=B3=81=E3=82=92=E8=A1=A8=E3=81=99=E7=94=BB=E5=83=8F=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_list_page.dart | 23 +++++++++++++------ frontend/where_child_bus/pubspec.yaml | 3 +-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index d08e0ed8..ef2eec1f 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -9,6 +9,7 @@ class BusListPage extends StatefulWidget { class _BusListPageState extends State { final items = ["バス1", "バス2", "バス3", "バス4", "バス5", "バス5", "バス5", "バス5", "バス5"]; + final busesOperatingState = [true, false, true, false, false, false, false, false, false]; @override @@ -30,12 +31,12 @@ class _BusListPageState extends State { //TODO: 実際にはAPIからデータを取得 itemCount: items.length, itemBuilder: (BuildContext context, int index) { - return busListCard(items[index]); + return busListCard(items[index], busesOperatingState[index]); }, ); } - Widget busListCard(String name) { + Widget busListCard(String name, bool isBusOperating) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 0.0), child: Card( @@ -46,7 +47,7 @@ class _BusListPageState extends State { color: Colors.white, child: Row( children: [ - busPhoto(), + busPhoto(isBusOperating), busNameAndDescription(name), ], ), @@ -55,13 +56,21 @@ class _BusListPageState extends State { ); } - Widget busPhoto() { + Widget busPhoto(bool isBusOperating) { + String imagePath = isBusOperating + ? "assets/images/bus_operating.png" + : "assets/images/bus_not_operating.png"; + return SizedBox( width: 100, height: 100, - child: Card( - child: const Text("ここに画像が来る") - ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Image.asset( + imagePath, + fit:BoxFit.cover, + ), + ) ); } diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 5cf3e69b..cf144972 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -22,5 +22,4 @@ dev_dependencies: flutter: uses-material-design: true assets: - - assets\images\bus_not_operating.png - - assets\images\bus_operating.png \ No newline at end of file + - assets/images/ \ No newline at end of file From bcdb076e4381b949795698cae62ff66613d7d127 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 10 Feb 2024 19:36:20 +0900 Subject: [PATCH 042/771] =?UTF-8?q?chore:=E3=82=AB=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=81=AE=E6=A8=AA=E5=B9=85=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/pages/bus_list_page/bus_list_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index ef2eec1f..0f67e865 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -38,7 +38,7 @@ class _BusListPageState extends State { Widget busListCard(String name, bool isBusOperating) { return Padding( - padding: const EdgeInsets.symmetric(horizontal: 0.0), + padding: const EdgeInsets.symmetric(horizontal: 16.0), child: Card( elevation: 8, margin: const EdgeInsets.all(16), From ecb8a454055a4748e81f3c51ba0d108cfce674c0 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 19:38:59 +0900 Subject: [PATCH 043/771] =?UTF-8?q?feat(proto):=20healthcheck=E3=82=92?= =?UTF-8?q?=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dart/where_child_bus/health_check.pb.dart | 128 ++++++++++ .../where_child_bus/health_check.pbenum.dart | 11 + .../where_child_bus/health_check.pbjson.dart | 57 +++++ .../health_check.pbserver.dart | 43 ++++ .../go/where_child_bus/health_check.pb.go | 226 ++++++++++++++++++ .../where_child_bus/health_check_grpc.pb.go | 107 +++++++++ .../where_child_bus/health_check_pb2.py | 31 +++ .../where_child_bus/health_check_pb2_grpc.py | 66 +++++ backend/proto/buf.gen.yaml | 28 +++ backend/proto/buf.yaml | 7 + .../proto/where_child_bus/health_check.proto | 15 ++ backend/usecases/healthcheck/healthcheck.go | 17 ++ 12 files changed, 736 insertions(+) create mode 100644 backend/proto-gen/dart/where_child_bus/health_check.pb.dart create mode 100644 backend/proto-gen/dart/where_child_bus/health_check.pbenum.dart create mode 100644 backend/proto-gen/dart/where_child_bus/health_check.pbjson.dart create mode 100644 backend/proto-gen/dart/where_child_bus/health_check.pbserver.dart create mode 100644 backend/proto-gen/go/where_child_bus/health_check.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go create mode 100644 backend/proto-gen/python/where_child_bus/health_check_pb2.py create mode 100644 backend/proto-gen/python/where_child_bus/health_check_pb2_grpc.py create mode 100644 backend/proto/buf.gen.yaml create mode 100644 backend/proto/buf.yaml create mode 100644 backend/proto/where_child_bus/health_check.proto create mode 100644 backend/usecases/healthcheck/healthcheck.go diff --git a/backend/proto-gen/dart/where_child_bus/health_check.pb.dart b/backend/proto-gen/dart/where_child_bus/health_check.pb.dart new file mode 100644 index 00000000..207685c8 --- /dev/null +++ b/backend/proto-gen/dart/where_child_bus/health_check.pb.dart @@ -0,0 +1,128 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class PingRequest extends $pb.GeneratedMessage { + factory PingRequest({ + $core.String? name, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + return $result; + } + PingRequest._() : super(); + factory PingRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PingRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PingRequest clone() => PingRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PingRequest copyWith(void Function(PingRequest) updates) => super.copyWith((message) => updates(message as PingRequest)) as PingRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PingRequest create() => PingRequest._(); + PingRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PingRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PingRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); +} + +class PingResponse extends $pb.GeneratedMessage { + factory PingResponse({ + $core.String? message, + }) { + final $result = create(); + if (message != null) { + $result.message = message; + } + return $result; + } + PingResponse._() : super(); + factory PingResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PingResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'message') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PingResponse clone() => PingResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PingResponse copyWith(void Function(PingResponse) updates) => super.copyWith((message) => updates(message as PingResponse)) as PingResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PingResponse create() => PingResponse._(); + PingResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PingResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PingResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get message => $_getSZ(0); + @$pb.TagNumber(1) + set message($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasMessage() => $_has(0); + @$pb.TagNumber(1) + void clearMessage() => clearField(1); +} + +class HealthcheckServiceApi { + $pb.RpcClient _client; + HealthcheckServiceApi(this._client); + + $async.Future ping($pb.ClientContext? ctx, PingRequest request) => + _client.invoke(ctx, 'HealthcheckService', 'Ping', request, PingResponse()) + ; +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/backend/proto-gen/dart/where_child_bus/health_check.pbenum.dart b/backend/proto-gen/dart/where_child_bus/health_check.pbenum.dart new file mode 100644 index 00000000..2f4e39b3 --- /dev/null +++ b/backend/proto-gen/dart/where_child_bus/health_check.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/backend/proto-gen/dart/where_child_bus/health_check.pbjson.dart b/backend/proto-gen/dart/where_child_bus/health_check.pbjson.dart new file mode 100644 index 00000000..d7362fa5 --- /dev/null +++ b/backend/proto-gen/dart/where_child_bus/health_check.pbjson.dart @@ -0,0 +1,57 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use pingRequestDescriptor instead') +const PingRequest$json = { + '1': 'PingRequest', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + ], +}; + +/// Descriptor for `PingRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List pingRequestDescriptor = $convert.base64Decode( + 'CgtQaW5nUmVxdWVzdBISCgRuYW1lGAEgASgJUgRuYW1l'); + +@$core.Deprecated('Use pingResponseDescriptor instead') +const PingResponse$json = { + '1': 'PingResponse', + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + ], +}; + +/// Descriptor for `PingResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( + 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); + +const $core.Map<$core.String, $core.dynamic> HealthcheckServiceBase$json = { + '1': 'HealthcheckService', + '2': [ + {'1': 'Ping', '2': '.where_child_bus.PingRequest', '3': '.where_child_bus.PingResponse'}, + ], +}; + +@$core.Deprecated('Use healthcheckServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> HealthcheckServiceBase$messageJson = { + '.where_child_bus.PingRequest': PingRequest$json, + '.where_child_bus.PingResponse': PingResponse$json, +}; + +/// Descriptor for `HealthcheckService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List healthcheckServiceDescriptor = $convert.base64Decode( + 'ChJIZWFsdGhjaGVja1NlcnZpY2USQwoEUGluZxIcLndoZXJlX2NoaWxkX2J1cy5QaW5nUmVxdW' + 'VzdBodLndoZXJlX2NoaWxkX2J1cy5QaW5nUmVzcG9uc2U='); + diff --git a/backend/proto-gen/dart/where_child_bus/health_check.pbserver.dart b/backend/proto-gen/dart/where_child_bus/health_check.pbserver.dart new file mode 100644 index 00000000..b7bd5c58 --- /dev/null +++ b/backend/proto-gen/dart/where_child_bus/health_check.pbserver.dart @@ -0,0 +1,43 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'health_check.pb.dart' as $0; +import 'health_check.pbjson.dart'; + +export 'health_check.pb.dart'; + +abstract class HealthcheckServiceBase extends $pb.GeneratedService { + $async.Future<$0.PingResponse> ping($pb.ServerContext ctx, $0.PingRequest request); + + $pb.GeneratedMessage createRequest($core.String methodName) { + switch (methodName) { + case 'Ping': return $0.PingRequest(); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { + switch (methodName) { + case 'Ping': return this.ping(ctx, request as $0.PingRequest); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => HealthcheckServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => HealthcheckServiceBase$messageJson; +} + diff --git a/backend/proto-gen/go/where_child_bus/health_check.pb.go b/backend/proto-gen/go/where_child_bus/health_check.pb.go new file mode 100644 index 00000000..8cf8c326 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/health_check.pb.go @@ -0,0 +1,226 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/health_check.proto + +package where_child_bus + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *PingRequest) Reset() { + *x = PingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_health_check_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingRequest) ProtoMessage() {} + +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_health_check_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_health_check_proto_rawDescGZIP(), []int{0} +} + +func (x *PingRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type PingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *PingResponse) Reset() { + *x = PingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_health_check_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingResponse) ProtoMessage() {} + +func (x *PingResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_health_check_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. +func (*PingResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_health_check_proto_rawDescGZIP(), []int{1} +} + +func (x *PingResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_where_child_bus_health_check_proto protoreflect.FileDescriptor + +var file_where_child_bus_health_check_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x22, 0x21, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x32, 0x59, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, + 0x12, 0x1c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xce, 0x01, + 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0xa2, 0x02, 0x03, 0x57, + 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0xca, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0xe2, 0x02, 0x19, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_health_check_proto_rawDescOnce sync.Once + file_where_child_bus_health_check_proto_rawDescData = file_where_child_bus_health_check_proto_rawDesc +) + +func file_where_child_bus_health_check_proto_rawDescGZIP() []byte { + file_where_child_bus_health_check_proto_rawDescOnce.Do(func() { + file_where_child_bus_health_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_health_check_proto_rawDescData) + }) + return file_where_child_bus_health_check_proto_rawDescData +} + +var file_where_child_bus_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_where_child_bus_health_check_proto_goTypes = []interface{}{ + (*PingRequest)(nil), // 0: where_child_bus.PingRequest + (*PingResponse)(nil), // 1: where_child_bus.PingResponse +} +var file_where_child_bus_health_check_proto_depIdxs = []int32{ + 0, // 0: where_child_bus.HealthcheckService.Ping:input_type -> where_child_bus.PingRequest + 1, // 1: where_child_bus.HealthcheckService.Ping:output_type -> where_child_bus.PingResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_where_child_bus_health_check_proto_init() } +func file_where_child_bus_health_check_proto_init() { + if File_where_child_bus_health_check_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_where_child_bus_health_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_health_check_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_health_check_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_where_child_bus_health_check_proto_goTypes, + DependencyIndexes: file_where_child_bus_health_check_proto_depIdxs, + MessageInfos: file_where_child_bus_health_check_proto_msgTypes, + }.Build() + File_where_child_bus_health_check_proto = out.File + file_where_child_bus_health_check_proto_rawDesc = nil + file_where_child_bus_health_check_proto_goTypes = nil + file_where_child_bus_health_check_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go b/backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go new file mode 100644 index 00000000..ebdc5f3f --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: where_child_bus/health_check.proto + +package where_child_bus + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + HealthcheckService_Ping_FullMethodName = "/where_child_bus.HealthcheckService/Ping" +) + +// HealthcheckServiceClient is the client API for HealthcheckService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type HealthcheckServiceClient interface { + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) +} + +type healthcheckServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHealthcheckServiceClient(cc grpc.ClientConnInterface) HealthcheckServiceClient { + return &healthcheckServiceClient{cc} +} + +func (c *healthcheckServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { + out := new(PingResponse) + err := c.cc.Invoke(ctx, HealthcheckService_Ping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HealthcheckServiceServer is the server API for HealthcheckService service. +// All implementations should embed UnimplementedHealthcheckServiceServer +// for forward compatibility +type HealthcheckServiceServer interface { + Ping(context.Context, *PingRequest) (*PingResponse, error) +} + +// UnimplementedHealthcheckServiceServer should be embedded to have forward compatible implementations. +type UnimplementedHealthcheckServiceServer struct { +} + +func (UnimplementedHealthcheckServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} + +// UnsafeHealthcheckServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HealthcheckServiceServer will +// result in compilation errors. +type UnsafeHealthcheckServiceServer interface { + mustEmbedUnimplementedHealthcheckServiceServer() +} + +func RegisterHealthcheckServiceServer(s grpc.ServiceRegistrar, srv HealthcheckServiceServer) { + s.RegisterService(&HealthcheckService_ServiceDesc, srv) +} + +func _HealthcheckService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealthcheckServiceServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HealthcheckService_Ping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealthcheckServiceServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// HealthcheckService_ServiceDesc is the grpc.ServiceDesc for HealthcheckService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HealthcheckService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "where_child_bus.HealthcheckService", + HandlerType: (*HealthcheckServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Ping", + Handler: _HealthcheckService_Ping_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "where_child_bus/health_check.proto", +} diff --git a/backend/proto-gen/python/where_child_bus/health_check_pb2.py b/backend/proto-gen/python/where_child_bus/health_check_pb2.py new file mode 100644 index 00000000..32547cd6 --- /dev/null +++ b/backend/proto-gen/python/where_child_bus/health_check_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/health_check.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/health_check.proto\x12\x0fwhere_child_bus\"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2Y\n\x12HealthcheckService\x12\x43\n\x04Ping\x12\x1c.where_child_bus.PingRequest\x1a\x1d.where_child_bus.PingResponseB\xce\x01\n\x13\x63om.where_child_busB\x10HealthCheckProtoP\x01ZQgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus\xa2\x02\x03WXX\xaa\x02\rWhereChildBus\xca\x02\rWhereChildBus\xe2\x02\x19WhereChildBus\\GPBMetadata\xea\x02\rWhereChildBusb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.health_check_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\023com.where_child_busB\020HealthCheckProtoP\001ZQgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus\242\002\003WXX\252\002\rWhereChildBus\312\002\rWhereChildBus\342\002\031WhereChildBus\\GPBMetadata\352\002\rWhereChildBus' + _globals['_PINGREQUEST']._serialized_start=55 + _globals['_PINGREQUEST']._serialized_end=88 + _globals['_PINGRESPONSE']._serialized_start=90 + _globals['_PINGRESPONSE']._serialized_end=130 + _globals['_HEALTHCHECKSERVICE']._serialized_start=132 + _globals['_HEALTHCHECKSERVICE']._serialized_end=221 +# @@protoc_insertion_point(module_scope) diff --git a/backend/proto-gen/python/where_child_bus/health_check_pb2_grpc.py b/backend/proto-gen/python/where_child_bus/health_check_pb2_grpc.py new file mode 100644 index 00000000..2554614a --- /dev/null +++ b/backend/proto-gen/python/where_child_bus/health_check_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from where_child_bus import health_check_pb2 as where__child__bus_dot_health__check__pb2 + + +class HealthcheckServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Ping = channel.unary_unary( + '/where_child_bus.HealthcheckService/Ping', + request_serializer=where__child__bus_dot_health__check__pb2.PingRequest.SerializeToString, + response_deserializer=where__child__bus_dot_health__check__pb2.PingResponse.FromString, + ) + + +class HealthcheckServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Ping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_HealthcheckServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Ping': grpc.unary_unary_rpc_method_handler( + servicer.Ping, + request_deserializer=where__child__bus_dot_health__check__pb2.PingRequest.FromString, + response_serializer=where__child__bus_dot_health__check__pb2.PingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'where_child_bus.HealthcheckService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class HealthcheckService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Ping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.HealthcheckService/Ping', + where__child__bus_dot_health__check__pb2.PingRequest.SerializeToString, + where__child__bus_dot_health__check__pb2.PingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/backend/proto/buf.gen.yaml b/backend/proto/buf.gen.yaml new file mode 100644 index 00000000..07dbcfcc --- /dev/null +++ b/backend/proto/buf.gen.yaml @@ -0,0 +1,28 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go +plugins: + # Go用の設定 (サーバー側) + - plugin: buf.build/protocolbuffers/go + out: ../proto-gen/go + opt: + - paths=source_relative + - plugin: buf.build/grpc/go + out: ../proto-gen/go + opt: + - paths=source_relative + - require_unimplemented_servers=false + + # Python用の設定 (クライアント側) + - plugin: buf.build/grpc/python:v1.61.0 + out: + ../proto-gen/python + # dependencies + - plugin: buf.build/protocolbuffers/python + out: ../proto-gen/python + + # Dart用の設定 (クライアント側) + - plugin: buf.build/protocolbuffers/dart:v21.1.2 + out: ../proto-gen/dart diff --git a/backend/proto/buf.yaml b/backend/proto/buf.yaml new file mode 100644 index 00000000..1a519456 --- /dev/null +++ b/backend/proto/buf.yaml @@ -0,0 +1,7 @@ +version: v1 +breaking: + use: + - FILE +lint: + use: + - DEFAULT diff --git a/backend/proto/where_child_bus/health_check.proto b/backend/proto/where_child_bus/health_check.proto new file mode 100644 index 00000000..01092fbc --- /dev/null +++ b/backend/proto/where_child_bus/health_check.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package where_child_bus; + +service HealthcheckService { + rpc Ping(PingRequest) returns (PingResponse); +} + +message PingRequest { + string name = 1; +} + +message PingResponse { + string message = 1; +} diff --git a/backend/usecases/healthcheck/healthcheck.go b/backend/usecases/healthcheck/healthcheck.go new file mode 100644 index 00000000..c8155a94 --- /dev/null +++ b/backend/usecases/healthcheck/healthcheck.go @@ -0,0 +1,17 @@ +package healthcheck + +import ( + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" +) + +type Interactor struct{} + +func NewInteractor() *Interactor { + return &Interactor{} +} + +func (i *Interactor) Ping(req *pb.PingRequest) *pb.PingResponse { + return &pb.PingResponse{ + Message: req.Name + " pong:)", + } +} From 506e84c0cd655b9a50dce40c8f04cc65e6614c44 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 19:46:31 +0900 Subject: [PATCH 044/771] =?UTF-8?q?feat(backend):=20=E3=82=B5=E3=83=BC?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=81=AE=E8=B5=B7=E5=8B=95=E3=81=AB=E4=BF=82?= =?UTF-8?q?=E3=82=8B=E5=9F=BA=E6=9C=AC=E9=83=A8=E5=88=86=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/server/main.go | 95 ++++++++++++++++++++++++++++++ backend/config/config.go | 41 +++++++++++++ backend/go.mod | 12 ++++ backend/go.sum | 25 ++++++++ backend/gprc_server/grpc_server.go | 41 +++++++++++++ backend/gprc_server/option.go | 39 ++++++++++++ backend/interfaces/healthcheck.go | 22 +++++++ 7 files changed, 275 insertions(+) create mode 100644 backend/cmd/server/main.go create mode 100644 backend/config/config.go create mode 100644 backend/gprc_server/grpc_server.go create mode 100644 backend/gprc_server/option.go create mode 100644 backend/interfaces/healthcheck.go diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go new file mode 100644 index 00000000..659156bf --- /dev/null +++ b/backend/cmd/server/main.go @@ -0,0 +1,95 @@ +package main + +import ( + "context" + "database/sql" + "log" + "net" + "os" + "os/signal" + "syscall" + "time" + + "github.com/go-sql-driver/mysql" + _ "github.com/go-sql-driver/mysql" + "golang.org/x/exp/slog" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + grpc_server "github.com/GreenTeaProgrammers/WhereChildBus/backend/gprc_server" +) + +func main() { + config, _ := config.New() + + // Open a connection to the database + db, err := sql.Open("mysql", config.DSN) + if err != nil { + log.Fatal("failed to open db connection", err) + } + + // PlanetScaleへの接続をテスト + if err := db.Ping(); err != nil { + log.Fatalf("Failed to ping PlanetScale: %v", err) + } + log.Println("Successfully connected to PlanetScale!") + + // その他の設定 + jst, err := time.LoadLocation("Asia/Tokyo") + if err != nil { + log.Fatal(err) + } + mysqlConfig := &mysql.Config{ + User: config.DBUser, + Passwd: config.DBPassword, + Net: "tcp", + Addr: config.DBAddress, + DBName: config.DBName, + ParseTime: true, + Loc: jst, + TLSConfig: "true", // この行は必要に応じて調整してください。 + AllowNativePasswords: true, + InterpolateParams: true, + } + + log.Println("Connecting to PlanetScale...") + + entClient, err := ent.Open("mysql", mysqlConfig.FormatDSN()) + if err != nil { + log.Fatal(err) + } + + log.Println("Running migration...") + + defer entClient.Close() + if err := entClient.Schema.Create(context.Background()); err != nil { + log.Println("Migration failed!") + log.Fatal(err) + } + + log.Println("Migration done!") + + logger := slog.Default() + srv := grpc_server.New( + + grpc_server.WithLogger(logger), + grpc_server.WithEntClient(entClient), + grpc_server.WithReflection(config.ModeDev), + ) + lsnr, err := net.Listen("tcp", ":"+config.GrpcPort) + if err != nil { + log.Fatal(err) + } + defer lsnr.Close() + go func() { + logger.Info("server launched") + if err := srv.Serve(lsnr); err != nil { + log.Fatal(err) + } + }() + sigCh := make(chan os.Signal, 1) + signal.Notify(sigCh, os.Interrupt, syscall.SIGTERM) + <-sigCh + logger.Info("server is being stopped") + srv.GracefulStop() +} diff --git a/backend/config/config.go b/backend/config/config.go new file mode 100644 index 00000000..e93c955e --- /dev/null +++ b/backend/config/config.go @@ -0,0 +1,41 @@ +package config + +import ( + "log" + + "github.com/joho/godotenv" + "github.com/kelseyhightower/envconfig" +) + +type Config struct { + DSN string `envconfig:"DSN" required:"true"` + DBUser string `envconfig:"DB_USER_NAME" required:"true"` + DBPassword string `envconfig:"DB_PASSWORD" required:"true"` + DBAddress string `envconfig:"DB_ADDR" required:"true"` + DBName string `envconfig:"DB_NAME" required:"true"` + GrpcPort string `envconfig:"PORT" default:"50051"` + ModeDev bool `envconfig:"MODE_DEV" default:"true"` +} + +func New() (*Config, error) { + // .env ファイルから環境変数を読み込む + if err := godotenv.Load(); err != nil { + log.Println("Error loading .env file") + return nil, err + } + + config := &Config{} + if err := envconfig.Process("", config); err != nil { + log.Printf("Error processing env variables: %v", err) + return nil, err + } + + // デバッグログを出力 + log.Println("DSN:", config.DSN) + log.Println("DB User:", config.DBUser) + log.Println("DB Address:", config.DBAddress) + log.Println("DB Name:", config.DBName) + log.Println("Port:", config.GrpcPort) + + return config, nil +} diff --git a/backend/go.mod b/backend/go.mod index c5556e03..40edfc0f 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -7,6 +7,15 @@ require ( github.com/google/uuid v1.3.0 ) +require ( + github.com/golang/protobuf v1.5.2 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect + google.golang.org/grpc v1.53.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect +) + require ( ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43 // indirect github.com/agext/levenshtein v1.2.1 // indirect @@ -14,11 +23,14 @@ require ( github.com/go-openapi/inflect v0.19.0 // indirect github.com/go-sql-driver/mysql v1.7.1 github.com/google/go-cmp v0.6.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 github.com/hashicorp/hcl/v2 v2.13.0 // indirect github.com/joho/godotenv v1.5.1 github.com/kelseyhightower/envconfig v1.4.0 github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect github.com/zclconf/go-cty v1.8.0 // indirect + golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 golang.org/x/mod v0.14.0 // indirect golang.org/x/text v0.13.0 // indirect + gorm.io/gorm v1.25.7 ) diff --git a/backend/go.sum b/backend/go.sum index a3e532de..d08b1756 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -15,14 +15,22 @@ github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrt github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 h1:HcUWd006luQPljE73d5sk+/VgYPGUReEVz2y1/qylwY= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1/go.mod h1:w9Y7gY31krpLmrVU5ZPG9H7l9fZuRu5/3R3S3FMtVQ4= github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc= github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -46,11 +54,17 @@ github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgq github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -59,7 +73,18 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/gorm v1.25.7 h1:VsD6acwRjz2zFxGO50gPO6AkNs7KKnvfzUjHQhZDz/A= +gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= diff --git a/backend/gprc_server/grpc_server.go b/backend/gprc_server/grpc_server.go new file mode 100644 index 00000000..e42a9442 --- /dev/null +++ b/backend/gprc_server/grpc_server.go @@ -0,0 +1,41 @@ +package grpc_server + +import ( + "context" + + grpc_interfaces "github.com/GreenTeaProgrammers/WhereChildBus/backend/interfaces" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" + "golang.org/x/exp/slog" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" +) + +func New(opts ...optionFunc) *grpc.Server { + opt := defaultOption() + for _, f := range opts { + f(opt) + } + + serverOptions := make([]grpc.ServerOption, 0) + // set logging interceptor + serverOptions = append(serverOptions, + grpc.ChainUnaryInterceptor(logging.UnaryServerInterceptor(interceptorLogger(opt.logger))), + grpc.ChainStreamInterceptor(logging.StreamServerInterceptor(interceptorLogger(opt.logger))), + ) + + srv := grpc.NewServer(serverOptions...) + if opt.useReflection { + reflection.Register(srv) + } + healthcheckSrv := grpc_interfaces.NewHealthcheckServiceServer() + pb.RegisterHealthcheckServiceServer(srv, healthcheckSrv) + + return srv +} + +func interceptorLogger(l *slog.Logger) logging.Logger { + return logging.LoggerFunc(func(ctx context.Context, lvl logging.Level, msg string, fields ...any) { + l.Log(ctx, slog.Level(lvl), msg, fields...) + }) +} diff --git a/backend/gprc_server/option.go b/backend/gprc_server/option.go new file mode 100644 index 00000000..e9d5ed9f --- /dev/null +++ b/backend/gprc_server/option.go @@ -0,0 +1,39 @@ +package grpc_server + +import ( + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + "golang.org/x/exp/slog" +) + +type option struct { + logger *slog.Logger + entClient *ent.Client + useReflection bool +} + +func defaultOption() *option { + return &option{ + logger: slog.Default(), + } +} + +type optionFunc func(*option) + +func WithLogger(logger *slog.Logger) optionFunc { + return func(o *option) { + o.logger = logger + } +} + +// publish grpc server information(method, service, etc.) +func WithReflection(b bool) optionFunc { + return func(o *option) { + o.useReflection = b + } +} + +func WithEntClient(c *ent.Client) optionFunc { + return func(o *option) { + o.entClient = c + } +} diff --git a/backend/interfaces/healthcheck.go b/backend/interfaces/healthcheck.go new file mode 100644 index 00000000..5569fc1e --- /dev/null +++ b/backend/interfaces/healthcheck.go @@ -0,0 +1,22 @@ +package interfaces + +import ( + "context" + + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/healthcheck" +) + +type healthcheckServiceServer struct { + healthcheckInteractor *healthcheck.Interactor +} + +func NewHealthcheckServiceServer() pb.HealthcheckServiceServer { + return &healthcheckServiceServer{ + healthcheckInteractor: healthcheck.NewInteractor(), + } +} + +func (s *healthcheckServiceServer) Ping(ctx context.Context, req *pb.PingRequest) (*pb.PingResponse, error) { + return s.healthcheckInteractor.Ping(req), nil +} From 406e25657989a603a53483b9e029ab1dc1657ca5 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 19:50:56 +0900 Subject: [PATCH 045/771] =?UTF-8?q?chore(ci):=20DockerFile=E3=81=AE?= =?UTF-8?q?=E8=8D=89=E6=A1=88=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 backend/Dockerfile diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 00000000..7bfdc1e7 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,27 @@ +FROM golang:1.21.5 AS builder + +WORKDIR /src +COPY ./proto-gen ./proto-gen + +WORKDIR /src/backend +COPY backend/go.mod backend/go.sum ./ +RUN go mod download + +COPY ./backend . +RUN go build \ + -tags timetzdata \ + -o where-my-bus-backend \ + ./cmd/server + +FROM ubuntu:22.04 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + tzdata \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* +ENV TZ Asia/Tokyo + +WORKDIR /app +COPY --from=builder /src/backend/where-my-bus . + +ENTRYPOINT [ "/app/where-my-bus-backend" ] \ No newline at end of file From 058ee1a8783d248a206f1344557c638beb8cf9db Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 10 Feb 2024 20:15:21 +0900 Subject: [PATCH 046/771] =?UTF-8?q?style:=E5=B0=86=E6=9D=A5=E7=9A=84?= =?UTF-8?q?=E3=81=AA=E5=A4=89=E6=9B=B4=E7=AE=87=E6=89=80=E3=81=AB=E3=82=B3?= =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bus_list_page.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 0f67e865..06f4269f 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -7,7 +7,9 @@ class BusListPage extends StatefulWidget { State createState() => _BusListPageState(); } + class _BusListPageState extends State { + //TODO: 将来的には動的にデータを受け取る。そのためのメソッドが増える final items = ["バス1", "バス2", "バス3", "バス4", "バス5", "バス5", "バス5", "バス5", "バス5"]; final busesOperatingState = [true, false, true, false, false, false, false, false, false]; @@ -36,6 +38,7 @@ class _BusListPageState extends State { ); } + //TODO: 将来的にBus型を受け取る Widget busListCard(String name, bool isBusOperating) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), @@ -97,11 +100,13 @@ class _BusListPageState extends State { ); } + //TODO: 将来的には説明文も引数として受け取る Widget busNameAndDescription(String name) { return Padding( padding: const EdgeInsets.all(10), child: Column( crossAxisAlignment: CrossAxisAlignment.start, + //TODO:動的になる children: [ busName(name), busDescription("テストの説明文") From 045f31e8f962f18ba5bc6b0d244c5da9de5a8f21 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 20:26:49 +0900 Subject: [PATCH 047/771] =?UTF-8?q?fix(ci):=20Docker=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 7bfdc1e7..9a41e251 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,18 +1,20 @@ +# ビルドステージ FROM golang:1.21.5 AS builder WORKDIR /src COPY ./proto-gen ./proto-gen -WORKDIR /src/backend -COPY backend/go.mod backend/go.sum ./ +WORKDIR /src/ +COPY /go.mod /go.sum ./ RUN go mod download -COPY ./backend . +COPY . . RUN go build \ -tags timetzdata \ -o where-my-bus-backend \ ./cmd/server +# 実行ステージ FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -22,6 +24,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ENV TZ Asia/Tokyo WORKDIR /app -COPY --from=builder /src/backend/where-my-bus . +COPY --from=builder /src/where-my-bus-backend . -ENTRYPOINT [ "/app/where-my-bus-backend" ] \ No newline at end of file +# gRPCサービスが使用するポート50051を公開 +EXPOSE 50051 + +ENTRYPOINT [ "/app/where-my-bus-backend" ] From e1ecb2802a52d6f8548c9fcb95309df64e08b4f2 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 20:31:31 +0900 Subject: [PATCH 048/771] chore: fix go.mod go.sum --- backend/go.mod | 18 ++++++++-------- backend/go.sum | 58 +++++++++++++++++++++++++------------------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/backend/go.mod b/backend/go.mod index 40edfc0f..edf9e243 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -4,16 +4,17 @@ go 1.21.5 require ( entgo.io/ent v0.13.0 - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.4.0 ) +require google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect + require ( - github.com/golang/protobuf v1.5.2 // indirect - golang.org/x/net v0.14.0 // indirect - golang.org/x/sys v0.11.0 // indirect - google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect - google.golang.org/grpc v1.53.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect + golang.org/x/net v0.18.0 // indirect + golang.org/x/sys v0.14.0 // indirect + google.golang.org/grpc v1.61.0 + google.golang.org/protobuf v1.31.0 ) require ( @@ -31,6 +32,5 @@ require ( github.com/zclconf/go-cty v1.8.0 // indirect golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 golang.org/x/mod v0.14.0 // indirect - golang.org/x/text v0.13.0 // indirect - gorm.io/gorm v1.25.7 + golang.org/x/text v0.14.0 // indirect ) diff --git a/backend/go.sum b/backend/go.sum index d08b1756..ac9f77c3 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -1,8 +1,9 @@ ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43 h1:GwdJbXydHCYPedeeLt4x/lrlIISQ4JTH1mRWuE5ZZ14= ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43/go.mod h1:uj3pm+hUTVN/X5yfdBexHlZv+1Xu5u5ZbZx7+CDavNU= -entgo.io/ent v0.12.5/go.mod h1:Y3JVAjtlIk8xVZYSn3t3mf8xlZIn5SAOXZQxD6kKI+Q= entgo.io/ent v0.13.0 h1:DclxWczaCpyiKn6ZWVcJjq1zIKtJ11iNKy+08lNYsJE= entgo.io/ent v0.13.0/go.mod h1:+oU8oGna69xy29O+g+NEz+/TM7yJDhQQGJfuOWq1pT8= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= @@ -13,17 +14,19 @@ github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNP github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= +github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 h1:HcUWd006luQPljE73d5sk+/VgYPGUReEVz2y1/qylwY= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1/go.mod h1:w9Y7gY31krpLmrVU5ZPG9H7l9fZuRu5/3R3S3FMtVQ4= github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc= @@ -32,23 +35,24 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= @@ -60,25 +64,23 @@ golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= @@ -86,5 +88,3 @@ google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/gorm v1.25.7 h1:VsD6acwRjz2zFxGO50gPO6AkNs7KKnvfzUjHQhZDz/A= -gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= From 447d5d8f6513e738f99831335b99428416680020 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 20:52:21 +0900 Subject: [PATCH 049/771] =?UTF-8?q?chore(proto):=20proto-gen=E3=81=AE?= =?UTF-8?q?=E3=83=91=E3=82=B9=E3=82=92=E3=81=9D=E3=82=8C=E3=81=9E=E3=82=8C?= =?UTF-8?q?=E3=81=AE=E8=A8=80=E8=AA=9E=E3=81=A7=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/health_check_pb2_grpc.py | 66 ------------------- backend/proto/buf.gen.yaml | 4 +- .../dart/where_child_bus/health_check.pb.dart | 0 .../where_child_bus/health_check.pbenum.dart | 0 .../where_child_bus/health_check.pbjson.dart | 0 .../health_check.pbserver.dart | 0 .../where_child_bus/health_check_pb2.py | 0 7 files changed, 2 insertions(+), 68 deletions(-) delete mode 100644 backend/proto-gen/python/where_child_bus/health_check_pb2_grpc.py rename {backend => frontend}/proto-gen/dart/where_child_bus/health_check.pb.dart (100%) rename {backend => frontend}/proto-gen/dart/where_child_bus/health_check.pbenum.dart (100%) rename {backend => frontend}/proto-gen/dart/where_child_bus/health_check.pbjson.dart (100%) rename {backend => frontend}/proto-gen/dart/where_child_bus/health_check.pbserver.dart (100%) rename {backend => machine-learning}/proto-gen/python/where_child_bus/health_check_pb2.py (100%) diff --git a/backend/proto-gen/python/where_child_bus/health_check_pb2_grpc.py b/backend/proto-gen/python/where_child_bus/health_check_pb2_grpc.py deleted file mode 100644 index 2554614a..00000000 --- a/backend/proto-gen/python/where_child_bus/health_check_pb2_grpc.py +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - -from where_child_bus import health_check_pb2 as where__child__bus_dot_health__check__pb2 - - -class HealthcheckServiceStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.Ping = channel.unary_unary( - '/where_child_bus.HealthcheckService/Ping', - request_serializer=where__child__bus_dot_health__check__pb2.PingRequest.SerializeToString, - response_deserializer=where__child__bus_dot_health__check__pb2.PingResponse.FromString, - ) - - -class HealthcheckServiceServicer(object): - """Missing associated documentation comment in .proto file.""" - - def Ping(self, request, context): - """Missing associated documentation comment in .proto file.""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_HealthcheckServiceServicer_to_server(servicer, server): - rpc_method_handlers = { - 'Ping': grpc.unary_unary_rpc_method_handler( - servicer.Ping, - request_deserializer=where__child__bus_dot_health__check__pb2.PingRequest.FromString, - response_serializer=where__child__bus_dot_health__check__pb2.PingResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'where_child_bus.HealthcheckService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class HealthcheckService(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def Ping(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.HealthcheckService/Ping', - where__child__bus_dot_health__check__pb2.PingRequest.SerializeToString, - where__child__bus_dot_health__check__pb2.PingResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/backend/proto/buf.gen.yaml b/backend/proto/buf.gen.yaml index 07dbcfcc..6c8f5c1b 100644 --- a/backend/proto/buf.gen.yaml +++ b/backend/proto/buf.gen.yaml @@ -21,8 +21,8 @@ plugins: ../proto-gen/python # dependencies - plugin: buf.build/protocolbuffers/python - out: ../proto-gen/python + out: ../../machine-learning/proto-gen/python # Dart用の設定 (クライアント側) - plugin: buf.build/protocolbuffers/dart:v21.1.2 - out: ../proto-gen/dart + out: ../../frontend/proto-gen/dart diff --git a/backend/proto-gen/dart/where_child_bus/health_check.pb.dart b/frontend/proto-gen/dart/where_child_bus/health_check.pb.dart similarity index 100% rename from backend/proto-gen/dart/where_child_bus/health_check.pb.dart rename to frontend/proto-gen/dart/where_child_bus/health_check.pb.dart diff --git a/backend/proto-gen/dart/where_child_bus/health_check.pbenum.dart b/frontend/proto-gen/dart/where_child_bus/health_check.pbenum.dart similarity index 100% rename from backend/proto-gen/dart/where_child_bus/health_check.pbenum.dart rename to frontend/proto-gen/dart/where_child_bus/health_check.pbenum.dart diff --git a/backend/proto-gen/dart/where_child_bus/health_check.pbjson.dart b/frontend/proto-gen/dart/where_child_bus/health_check.pbjson.dart similarity index 100% rename from backend/proto-gen/dart/where_child_bus/health_check.pbjson.dart rename to frontend/proto-gen/dart/where_child_bus/health_check.pbjson.dart diff --git a/backend/proto-gen/dart/where_child_bus/health_check.pbserver.dart b/frontend/proto-gen/dart/where_child_bus/health_check.pbserver.dart similarity index 100% rename from backend/proto-gen/dart/where_child_bus/health_check.pbserver.dart rename to frontend/proto-gen/dart/where_child_bus/health_check.pbserver.dart diff --git a/backend/proto-gen/python/where_child_bus/health_check_pb2.py b/machine-learning/proto-gen/python/where_child_bus/health_check_pb2.py similarity index 100% rename from backend/proto-gen/python/where_child_bus/health_check_pb2.py rename to machine-learning/proto-gen/python/where_child_bus/health_check_pb2.py From 554db3c70a6439bf4cb7308f5448c7c4cd4c04e7 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 10 Feb 2024 21:26:51 +0900 Subject: [PATCH 050/771] =?UTF-8?q?feat:=E3=83=86=E3=82=AD=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=81=AE=E6=A8=AA=E5=B9=85=E3=81=AE=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_list_page.dart | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 9af1d6f5..edaf2fab 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -25,6 +25,8 @@ class _StudentListPageState extends State { "5組", ]; + var screenSize = MediaQuery.of(context).size; + return ListView.separated( itemCount: name.length, separatorBuilder: (BuildContext context, int index) { @@ -43,9 +45,9 @@ class _StudentListPageState extends State { child: Row(children: [ childImage(), SizedBox( - width: 30, + width: screenSize.width * 0.05, ), - nameAndGroup(name[index], group[index]), + nameAndGroup(name[index], group[index], screenSize), ])))); }); } @@ -59,24 +61,22 @@ class _StudentListPageState extends State { )); } - Widget nameAndGroup(String name, String group) { - return SizedBox( - width: 200, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(name, style: TextStyle(color: Colors.black, fontSize: 24)), - Text( - group, - style: TextStyle(color: Colors.black), - ), - place(), - ])); + Widget nameAndGroup(String name, String group, Size size) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(name, style: TextStyle(color: Colors.black, fontSize: 24)), + Text( + group, + style: TextStyle(color: Colors.black), + ), + place(), + ]); } Widget place() { return Row(children: [ - Text("乗降場所:"), + Icon(Icons.location_on), Text("停留所名"), ]); } From 9f13abc718682285651b0eb4a6266da9297c4d62 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 21:30:59 +0900 Subject: [PATCH 051/771] =?UTF-8?q?fix(proto):=20proto-gen=E3=81=8C?= =?UTF-8?q?=E3=81=9D=E3=82=8C=E3=81=9E=E3=82=8C=E9=81=A9=E5=88=87=E3=81=AA?= =?UTF-8?q?=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=81=AB?= =?UTF-8?q?=E7=94=9F=E6=88=90=E3=81=95=E3=82=8C=E3=82=8B=E7=94=A8=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/proto/buf.gen.yaml | 6 +- .../where_child_bus/health_check.pb.dart | 0 .../where_child_bus/health_check.pbenum.dart | 0 .../where_child_bus/health_check.pbjson.dart | 0 .../health_check.pbserver.dart | 0 .../where_child_bus/health_check_pb2.py | 0 .../where_child_bus/health_check_pb2_grpc.py | 66 +++++++++++++++++++ 7 files changed, 69 insertions(+), 3 deletions(-) rename frontend/{proto-gen/dart => where_child_bus/proto-gen}/where_child_bus/health_check.pb.dart (100%) rename frontend/{proto-gen/dart => where_child_bus/proto-gen}/where_child_bus/health_check.pbenum.dart (100%) rename frontend/{proto-gen/dart => where_child_bus/proto-gen}/where_child_bus/health_check.pbjson.dart (100%) rename frontend/{proto-gen/dart => where_child_bus/proto-gen}/where_child_bus/health_check.pbserver.dart (100%) rename {machine-learning/proto-gen/python => machine_learning/src/proto-gen}/where_child_bus/health_check_pb2.py (100%) create mode 100644 machine_learning/src/proto-gen/where_child_bus/health_check_pb2_grpc.py diff --git a/backend/proto/buf.gen.yaml b/backend/proto/buf.gen.yaml index 6c8f5c1b..c535e8c7 100644 --- a/backend/proto/buf.gen.yaml +++ b/backend/proto/buf.gen.yaml @@ -18,11 +18,11 @@ plugins: # Python用の設定 (クライアント側) - plugin: buf.build/grpc/python:v1.61.0 out: - ../proto-gen/python + ../../machine_learning/src/proto-gen/ # dependencies - plugin: buf.build/protocolbuffers/python - out: ../../machine-learning/proto-gen/python + out: ../../machine_learning/src/proto-gen/ # Dart用の設定 (クライアント側) - plugin: buf.build/protocolbuffers/dart:v21.1.2 - out: ../../frontend/proto-gen/dart + out: ../../frontend/where_child_bus/proto-gen/ diff --git a/frontend/proto-gen/dart/where_child_bus/health_check.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart similarity index 100% rename from frontend/proto-gen/dart/where_child_bus/health_check.pb.dart rename to frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart diff --git a/frontend/proto-gen/dart/where_child_bus/health_check.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbenum.dart similarity index 100% rename from frontend/proto-gen/dart/where_child_bus/health_check.pbenum.dart rename to frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbenum.dart diff --git a/frontend/proto-gen/dart/where_child_bus/health_check.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart similarity index 100% rename from frontend/proto-gen/dart/where_child_bus/health_check.pbjson.dart rename to frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart diff --git a/frontend/proto-gen/dart/where_child_bus/health_check.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbserver.dart similarity index 100% rename from frontend/proto-gen/dart/where_child_bus/health_check.pbserver.dart rename to frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbserver.dart diff --git a/machine-learning/proto-gen/python/where_child_bus/health_check_pb2.py b/machine_learning/src/proto-gen/where_child_bus/health_check_pb2.py similarity index 100% rename from machine-learning/proto-gen/python/where_child_bus/health_check_pb2.py rename to machine_learning/src/proto-gen/where_child_bus/health_check_pb2.py diff --git a/machine_learning/src/proto-gen/where_child_bus/health_check_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/health_check_pb2_grpc.py new file mode 100644 index 00000000..2554614a --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/health_check_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from where_child_bus import health_check_pb2 as where__child__bus_dot_health__check__pb2 + + +class HealthcheckServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Ping = channel.unary_unary( + '/where_child_bus.HealthcheckService/Ping', + request_serializer=where__child__bus_dot_health__check__pb2.PingRequest.SerializeToString, + response_deserializer=where__child__bus_dot_health__check__pb2.PingResponse.FromString, + ) + + +class HealthcheckServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Ping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_HealthcheckServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Ping': grpc.unary_unary_rpc_method_handler( + servicer.Ping, + request_deserializer=where__child__bus_dot_health__check__pb2.PingRequest.FromString, + response_serializer=where__child__bus_dot_health__check__pb2.PingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'where_child_bus.HealthcheckService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class HealthcheckService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Ping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.HealthcheckService/Ping', + where__child__bus_dot_health__check__pb2.PingRequest.SerializeToString, + where__child__bus_dot_health__check__pb2.PingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) From 096d4bc2c81d7bfe67b61146ff3bfe579b10433d Mon Sep 17 00:00:00 2001 From: Mizuki Baba <76275131+lovelovetrb@users.noreply.github.com> Date: Sat, 10 Feb 2024 21:45:54 +0900 Subject: [PATCH 052/771] =?UTF-8?q?perf(ml):=20=E5=85=A5=E5=8A=9B=E3=83=81?= =?UTF-8?q?=E3=83=A3=E3=83=B3=E3=83=8D=E3=83=AB=E6=95=B0=E3=82=92config?= =?UTF-8?q?=E3=81=8B=E3=82=89=E5=8F=96=E5=BE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: かわきん <93261102+KinjiKawaguchi@users.noreply.github.com> --- machine_learning/src/face_detect_model/model/model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/model.py index 0aa0bded..882024d8 100644 --- a/machine_learning/src/face_detect_model/model/model.py +++ b/machine_learning/src/face_detect_model/model/model.py @@ -5,7 +5,8 @@ class Net(nn.Module): def __init__(self, config: dict, num_classes: int): super(Net, self).__init__() self.config = config - + # 汎用性のために入力チャンネル数をconfigから取得(一応) + in_channels = config["model"]["in_channels"] self.relu = nn.ReLU() self.pool = nn.MaxPool2d( kernel_size=config["model"]["kernel_size"], stride=config["model"]["stride"] From 47a38e52f486712be4d6261755a733fc1eae71d4 Mon Sep 17 00:00:00 2001 From: Mizuki Baba <76275131+lovelovetrb@users.noreply.github.com> Date: Sat, 10 Feb 2024 21:46:52 +0900 Subject: [PATCH 053/771] =?UTF-8?q?perf(ml):=20Conv2d=E3=83=AC=E3=82=A4?= =?UTF-8?q?=E3=83=A4=E3=83=BC=E3=81=AB=E9=96=A2=E3=81=97=E3=81=A6=E5=85=A5?= =?UTF-8?q?=E5=8A=9B=E3=83=81=E3=83=A3=E3=83=B3=E3=83=8D=E3=83=AB=E6=95=B0?= =?UTF-8?q?=E3=82=92config=E3=81=8B=E3=82=89=E5=8F=96=E5=BE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: かわきん <93261102+KinjiKawaguchi@users.noreply.github.com> --- machine_learning/src/face_detect_model/model/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/model.py index 882024d8..d084c6df 100644 --- a/machine_learning/src/face_detect_model/model/model.py +++ b/machine_learning/src/face_detect_model/model/model.py @@ -13,7 +13,7 @@ def __init__(self, config: dict, num_classes: int): ) self.conv1 = nn.Conv2d( - in_channels=1, + in_channels=in_channels, out_channels=16, kernel_size=config["model"]["Conv2d"]["kernel_size"], ) From fdf00d4b7a4e2b090193323aefd5670163298ef1 Mon Sep 17 00:00:00 2001 From: Mizuki Baba <76275131+lovelovetrb@users.noreply.github.com> Date: Sat, 10 Feb 2024 21:48:17 +0900 Subject: [PATCH 054/771] =?UTF-8?q?perf(ml):=20Flatten=E3=83=AC=E3=82=A4?= =?UTF-8?q?=E3=83=A4=E3=83=BC=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: かわきん <93261102+KinjiKawaguchi@users.noreply.github.com> --- machine_learning/src/face_detect_model/model/model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/model.py index d084c6df..cf34186a 100644 --- a/machine_learning/src/face_detect_model/model/model.py +++ b/machine_learning/src/face_detect_model/model/model.py @@ -22,7 +22,8 @@ def __init__(self, config: dict, num_classes: int): out_channels=32, kernel_size=config["model"]["Conv2d"]["kernel_size"], ) - + # Flatten操作を明示的に + self.flatten = nn.Flatten() self.linear = nn.Linear(32 * 5 * 5, config["model"]["hidden_size"]) self.classier = nn.Linear(config["model"]["hidden_size"], num_classes) From 8f95997e1e725672bdde02d8e303168a72d132ac Mon Sep 17 00:00:00 2001 From: Mizuki Baba <76275131+lovelovetrb@users.noreply.github.com> Date: Sat, 10 Feb 2024 21:48:32 +0900 Subject: [PATCH 055/771] =?UTF-8?q?perf(ml):=20Flatten=E3=83=AC=E3=82=A4?= =?UTF-8?q?=E3=83=A4=E3=83=BC=E3=81=AE=E9=81=A9=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: かわきん <93261102+KinjiKawaguchi@users.noreply.github.com> --- machine_learning/src/face_detect_model/model/model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/model.py index cf34186a..b5362363 100644 --- a/machine_learning/src/face_detect_model/model/model.py +++ b/machine_learning/src/face_detect_model/model/model.py @@ -34,7 +34,8 @@ def forward(self, x): x = self.conv2(x) x = self.relu(x) x = self.pool(x) - x = x.view(x.size()[0], -1) + # Flatten層を使用 + x = self.flatten(x) x = self.linear(x) x = self.relu(x) x = self.classier(x) From 09f25d4b49528507e107964d1ef3db6d6dd2c73b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 10 Feb 2024 21:49:23 +0900 Subject: [PATCH 056/771] =?UTF-8?q?feat:=E3=82=AB=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=81=AB=E3=83=A2=E3=83=BC=E3=83=80=E3=83=AB=E9=81=B7=E7=A7=BB?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 20 ++++++++++++++ .../pages/bus_list_page/bus_list_page.dart | 26 +++++++++++++++---- 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart new file mode 100644 index 00000000..b339286d --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -0,0 +1,20 @@ +import 'package:flutter/material.dart'; + +class BottomSheetWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container( + height: double.infinity, + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10), + topRight: Radius.circular(10), + ), + ), + child: const Center( + child: Text("ルート詳細情報"), + ), + ); + } +} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 06f4269f..3cefced5 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; class BusListPage extends StatefulWidget { const BusListPage({super.key}); @@ -48,11 +49,25 @@ class _BusListPageState extends State { clipBehavior: Clip.antiAliasWithSaveLayer, child: Material( color: Colors.white, - child: Row( - children: [ - busPhoto(isBusOperating), - busNameAndDescription(name), - ], + child: InkWell( + onTap: () async { + await showModalBottomSheet( + context: context, + backgroundColor: Colors.transparent, + isScrollControlled: false, + enableDrag: true, + isDismissible: true, + barrierColor: Colors.black.withOpacity(0.5), + builder: (context) { + return BottomSheetWidget(); + }); + }, + child: Row( + children: [ + busPhoto(isBusOperating), + busNameAndDescription(name), + ], + ), ), ), ), @@ -115,3 +130,4 @@ class _BusListPageState extends State { ); } } + From e365e813d19386369c4eb4e7ba1ba0e7e8511dd1 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 22:08:45 +0900 Subject: [PATCH 057/771] style(ml): typo --- machine_learning/src/face_detect_model/model/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machine_learning/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/model.py index b5362363..85c5f5f3 100644 --- a/machine_learning/src/face_detect_model/model/model.py +++ b/machine_learning/src/face_detect_model/model/model.py @@ -25,7 +25,7 @@ def __init__(self, config: dict, num_classes: int): # Flatten操作を明示的に self.flatten = nn.Flatten() self.linear = nn.Linear(32 * 5 * 5, config["model"]["hidden_size"]) - self.classier = nn.Linear(config["model"]["hidden_size"], num_classes) + self.classifier = nn.Linear(config["model"]["hidden_size"], num_classes) def forward(self, x): x = self.conv1(x) @@ -38,5 +38,5 @@ def forward(self, x): x = self.flatten(x) x = self.linear(x) x = self.relu(x) - x = self.classier(x) + x = self.classifier(x) return x From 321a0e9cf06091c29c117dbb74b819c8ba2da3ad Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 22:22:57 +0900 Subject: [PATCH 058/771] =?UTF-8?q?perf(ml):=20in=5Fchannel=E3=82=92config?= =?UTF-8?q?.yaml=E3=81=A7=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index d59d9e4a..295158f8 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -1,5 +1,6 @@ model: hidden_size: 120 + in_channels: 1 Conv2d: kernel_size: 3 pooling: From 46f798307447f1b84263f4d04a115892ed1575fd Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 22:31:39 +0900 Subject: [PATCH 059/771] =?UTF-8?q?refactor(ml):=20TODO=E3=81=AE=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/model/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/model.py index 85c5f5f3..bc21d0c8 100644 --- a/machine_learning/src/face_detect_model/model/model.py +++ b/machine_learning/src/face_detect_model/model/model.py @@ -24,6 +24,7 @@ def __init__(self, config: dict, num_classes: int): ) # Flatten操作を明示的に self.flatten = nn.Flatten() + # TODO: 入力サイズを動的に取得する self.linear = nn.Linear(32 * 5 * 5, config["model"]["hidden_size"]) self.classifier = nn.Linear(config["model"]["hidden_size"], num_classes) @@ -34,7 +35,6 @@ def forward(self, x): x = self.conv2(x) x = self.relu(x) x = self.pool(x) - # Flatten層を使用 x = self.flatten(x) x = self.linear(x) x = self.relu(x) From c0d318333e4842ea1cc420b1df531e782e11cd1c Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 10 Feb 2024 22:35:32 +0900 Subject: [PATCH 060/771] =?UTF-8?q?feat:=E7=94=BB=E5=83=8F=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/assets/images/face_1.svg | 1 + frontend/where_child_bus/assets/images/face_2.svg | 1 + 2 files changed, 2 insertions(+) create mode 100644 frontend/where_child_bus/assets/images/face_1.svg create mode 100644 frontend/where_child_bus/assets/images/face_2.svg diff --git a/frontend/where_child_bus/assets/images/face_1.svg b/frontend/where_child_bus/assets/images/face_1.svg new file mode 100644 index 00000000..ccdea67b --- /dev/null +++ b/frontend/where_child_bus/assets/images/face_1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/where_child_bus/assets/images/face_2.svg b/frontend/where_child_bus/assets/images/face_2.svg new file mode 100644 index 00000000..f74a6546 --- /dev/null +++ b/frontend/where_child_bus/assets/images/face_2.svg @@ -0,0 +1 @@ + \ No newline at end of file From d4b24ab20601b04777c0937b187fa886b28c8d92 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 10 Feb 2024 22:36:19 +0900 Subject: [PATCH 061/771] =?UTF-8?q?feat:=E7=94=BB=E5=83=8F=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/pubspec.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 1940558b..dee0350c 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -21,3 +21,6 @@ dev_dependencies: flutter: uses-material-design: true + assets: + - assets/images/face_1.svg + - assets/images/face_2.svg From 89b45ae8ebc5ab472a5e099a913de952265c775c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 10 Feb 2024 22:45:52 +0900 Subject: [PATCH 062/771] =?UTF-8?q?fix(proto):=20buf.gen.yaml=E3=82=92?= =?UTF-8?q?=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/proto/buf.gen.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/proto/buf.gen.yaml b/backend/proto/buf.gen.yaml index c535e8c7..9da67fd8 100644 --- a/backend/proto/buf.gen.yaml +++ b/backend/proto/buf.gen.yaml @@ -24,5 +24,7 @@ plugins: out: ../../machine_learning/src/proto-gen/ # Dart用の設定 (クライアント側) - - plugin: buf.build/protocolbuffers/dart:v21.1.2 + - name: dart out: ../../frontend/where_child_bus/proto-gen/ + opt: + - grpc From 439ea1fb3c2247c4bd9c4712d8ef6c17093ee32a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 10 Feb 2024 22:49:14 +0900 Subject: [PATCH 063/771] =?UTF-8?q?chore(proto):=20proto-gen=E3=81=A7?= =?UTF-8?q?=E3=81=AE=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/health_check.pb.dart | 10 ---- .../where_child_bus/health_check.pbgrpc.dart | 59 +++++++++++++++++++ .../where_child_bus/health_check.pbjson.dart | 18 ------ .../health_check.pbserver.dart | 43 -------------- 4 files changed, 59 insertions(+), 71 deletions(-) create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbgrpc.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbserver.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart index 207685c8..f371a7b8 100644 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart +++ b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart @@ -9,7 +9,6 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; @@ -114,15 +113,6 @@ class PingResponse extends $pb.GeneratedMessage { void clearMessage() => clearField(1); } -class HealthcheckServiceApi { - $pb.RpcClient _client; - HealthcheckServiceApi(this._client); - - $async.Future ping($pb.ClientContext? ctx, PingRequest request) => - _client.invoke(ctx, 'HealthcheckService', 'Ping', request, PingResponse()) - ; -} - const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbgrpc.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbgrpc.dart new file mode 100644 index 00000000..7645d6c6 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'health_check.pb.dart' as $0; + +export 'health_check.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.HealthcheckService') +class HealthcheckServiceClient extends $grpc.Client { + static final _$ping = $grpc.ClientMethod<$0.PingRequest, $0.PingResponse>( + '/where_child_bus.HealthcheckService/Ping', + ($0.PingRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.PingResponse.fromBuffer(value)); + + HealthcheckServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$0.PingResponse> ping($0.PingRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$ping, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.HealthcheckService') +abstract class HealthcheckServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.HealthcheckService'; + + HealthcheckServiceBase() { + $addMethod($grpc.ServiceMethod<$0.PingRequest, $0.PingResponse>( + 'Ping', + ping_Pre, + false, + false, + ($core.List<$core.int> value) => $0.PingRequest.fromBuffer(value), + ($0.PingResponse value) => value.writeToBuffer())); + } + + $async.Future<$0.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$0.PingRequest> request) async { + return ping(call, await request); + } + + $async.Future<$0.PingResponse> ping($grpc.ServiceCall call, $0.PingRequest request); +} diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart index d7362fa5..a2a8c1aa 100644 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart +++ b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart @@ -37,21 +37,3 @@ const PingResponse$json = { final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); -const $core.Map<$core.String, $core.dynamic> HealthcheckServiceBase$json = { - '1': 'HealthcheckService', - '2': [ - {'1': 'Ping', '2': '.where_child_bus.PingRequest', '3': '.where_child_bus.PingResponse'}, - ], -}; - -@$core.Deprecated('Use healthcheckServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> HealthcheckServiceBase$messageJson = { - '.where_child_bus.PingRequest': PingRequest$json, - '.where_child_bus.PingResponse': PingResponse$json, -}; - -/// Descriptor for `HealthcheckService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List healthcheckServiceDescriptor = $convert.base64Decode( - 'ChJIZWFsdGhjaGVja1NlcnZpY2USQwoEUGluZxIcLndoZXJlX2NoaWxkX2J1cy5QaW5nUmVxdW' - 'VzdBodLndoZXJlX2NoaWxkX2J1cy5QaW5nUmVzcG9uc2U='); - diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbserver.dart deleted file mode 100644 index b7bd5c58..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbserver.dart +++ /dev/null @@ -1,43 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'health_check.pb.dart' as $0; -import 'health_check.pbjson.dart'; - -export 'health_check.pb.dart'; - -abstract class HealthcheckServiceBase extends $pb.GeneratedService { - $async.Future<$0.PingResponse> ping($pb.ServerContext ctx, $0.PingRequest request); - - $pb.GeneratedMessage createRequest($core.String methodName) { - switch (methodName) { - case 'Ping': return $0.PingRequest(); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { - switch (methodName) { - case 'Ping': return this.ping(ctx, request as $0.PingRequest); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => HealthcheckServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => HealthcheckServiceBase$messageJson; -} - From 9a2a616eb8dab0f0c7d425516c5ac1a48a1a6a4f Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 10 Feb 2024 23:16:53 +0900 Subject: [PATCH 064/771] =?UTF-8?q?chore(ml):=20gitignore=E3=81=ABvscode?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/.gitignore | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/machine_learning/.gitignore b/machine_learning/.gitignore index c67b3666..07fc58f9 100644 --- a/machine_learning/.gitignore +++ b/machine_learning/.gitignore @@ -1,5 +1,5 @@ -# Created by https://www.toptal.com/developers/gitignore/api/python,macos -# Edit at https://www.toptal.com/developers/gitignore?templates=python,macos +# Created by https://www.toptal.com/developers/gitignore/api/macos,python,visualstudiocode +# Edit at https://www.toptal.com/developers/gitignore?templates=macos,python,visualstudiocode ### macOS ### # General @@ -35,8 +35,6 @@ Temporary Items *.icloud ### Python ### -src/face_detect_model/pickle/* - # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -208,4 +206,23 @@ poetry.toml # LSP config files pyrightconfig.json -# End of https://www.toptal.com/developers/gitignore/api/python,macos +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +# End of https://www.toptal.com/developers/gitignore/api/macos,python,visualstudiocode \ No newline at end of file From 19eaa1aefd5319890c016f356cc35483d6915a2a Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 10 Feb 2024 23:20:17 +0900 Subject: [PATCH 065/771] =?UTF-8?q?feat:=E6=8B=A1=E5=BC=B5=E5=AD=90?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/assets/images/face_1.png | Bin 0 -> 5789 bytes .../where_child_bus/assets/images/face_1.svg | 1 - .../where_child_bus/assets/images/face_2.png | Bin 0 -> 5471 bytes .../where_child_bus/assets/images/face_2.svg | 1 - frontend/where_child_bus/pubspec.yaml | 4 ++-- 5 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 frontend/where_child_bus/assets/images/face_1.png delete mode 100644 frontend/where_child_bus/assets/images/face_1.svg create mode 100644 frontend/where_child_bus/assets/images/face_2.png delete mode 100644 frontend/where_child_bus/assets/images/face_2.svg diff --git a/frontend/where_child_bus/assets/images/face_1.png b/frontend/where_child_bus/assets/images/face_1.png new file mode 100644 index 0000000000000000000000000000000000000000..4cfdbcaec747b733a917c112cca756d3bf8d7f55 GIT binary patch literal 5789 zcmb7|XIK+W`0gpvLFu3G$E7#0tpa0p@bG9Ql#h$iX}n-je=AG=_T|g zy(2v$&4^S{di}5GoR83*7K~bK+6)1A?a&ky+`|7ZN+Zi# zzkyDKmlZ4+it-9DMFu0>5WxtbkAeaVa`p8JxbN?U3Pyue9I&8pkP27|gaPi6Qva(Z zt1SP2ZOcOL{GSp3d;Gt)W8~>CeG>`_t}jM<+E(FCoA1H`xWDjqL$Y|a=#9iEsj@gO zF=un;#;NG3P+b!ei?z_ZWD#@v@$qk0oQ2?H%N#~ay%%ia32b^J+8J;$4*Td49hNLe z$JzYPhfdnlFAkc%HOw^}91T27Y{GVYo1Z^u3iI!;)XtzYV7+~d_d=L{N}DY5fGIsQ zK-vw}Uj2f|Fs1YV*1>||T38+Zxbb_jqyG5~)vk)l%9$@oJRv_;R!%cD(B$OvgO@K~ z7Q6Mnl9H0zaBd6L)4Nn;RmfgsUoBB&Q<6at=@derw9YqSXS$y8&1`*Zurn}7K#_G5 zFE8ek?|(F4`L+r_oSueFX6rL?b8tL<&)%#>eiYphwp~$GrSNTlPstbFa<8g;Jr z$Xf>4pE_ZB`M;zj*O2u|q_(#9q4FZ+1#?Hy>TrfPbIqEAIm&aKIos3>lJ{^wZg>)xVTGxXUBWtUt)|~@h9ZL%vqc`v;bC2!w0YY14RO0B32 z%ppddA9+YCDB!T@yGyZo9XC`%;a;jdhUt6}Jd4tr%F1{w^zNVCY1b65@jTOxS79R0 zWy8$Oo=?{JIcz->OwR|xu3FPO!bY8c`MPrJ((>}m%bSJ)R}jK1*Azw!O;c|>UOP~x z{xR4Tc@jF=9EpugWkLvyj*j|%s}DK8#F+nK_xe3vhi{D-v|J69o4b33!Lw_>uJCnJ zn4`GT6@9pylqJMg>k}s>L_g#ZHBW!*qS{`4Wlf$-*NoDbmkzNQBHc86zQQeLqz=TJ zV>=^547r8FaiWA?edV;`OOtVa9%inNlZ7O&E^`SQ`L$Km0K00@(TYiUpvmP65slQ zGehrG_gDiZ;69>e!vys=3ZXzmWc3fJJ0Dqm+F0oIqcbuxx+ttI%)X}Ry?V6%y+!i? zZF!ynM#MTLgt{gX)1>U$r8&72u=~F1DG(HCgb=>Ou=V`~zchVlRmi$c)Ah~HAT)Mu zrZ2%k%(+>O{6|2rbcDV2#9{2Cb-9cF=F*oW*sFbbArbK)U~{&b7@rj@V)pjQou=-- zHNR{3IvDwnnTZyLk50D9j$&$sk=zTwFth=bcDI1=v!JF z!mSk|c0C8g-`{qu54aHcH5v;J1%6+bWfgb-z_$vd@z$3j!2%!WhENuCA05a}(Q7R3 zl+ZnY)hT2>oamc0U4Mm?8%as zak9|%n3QCt@87sXOa991*bw@IKdqDJG}hs1A^Fi}^;8{CVeEfAGPg;+0Y8Usl$gKQ zAT7T>%uw)RPbD1Tfi<2FH7HwGd5(ex3Y8TUhr;yr^$~^XDPClL{QL5}=+}6@YhiklI9VfP4X1JTBn%PCWN`LlD$kD-|BT9y-1zs^mbi+F zed$>GGjVc)0d`)0M*6UQbEc9G?RD8>m@q-WZr#~BGCFY6uWbxQzgG=2yW%#~AlRUY z`QtW_d&DfD@ivogO!Jd<5qByMa~E=OxU)>;ajmTn+kSqh>M}i6E3otLWC9CcS_hKBn2;CQspXM6tai9xhrXd@6Bk`KeB^a)q-LDDBFV|CXq=7E=gDPGgLyt{4#R-zUs+ho1Dl$v_7 zm?!`?91@X~G=7g`mR4`{3CV2l=%^-<9yCT^?#e=TPj}?}-oOvn@=Pw)e0=@VeEAGI9z6!iaXX(K8}Rwjf&D7S zd+Xigf%L}?F)Vt0fIwC9ub-x9o{wzz7DDrXL(%k1OyfMxk$-wc_fDKkoz!cv2dJ}V z-Zp5p+rPY#zC)j>Dl8n&!l%SsTfCSg(+q!1ccn`@mW~&>J>OKX)`HpqlK5C-1UM|t z&koLm%U!;}JUt6;(~Cr1D2d6*SwdtB9uR}V^RRCPB)$SqPPm}k_%3D}~ z@9)p~uYY$ppP)Nn|3oc=H?Uail|IQN(=gII-EKbpV{DVH$3QYxj+w3YscesDT277n zr{oT`sKr!e9dhcKX%Va(l&KL}?^K)MF4B%^mHGTLm%aAXkgWRl1rdqNd3f~4cecta zLQzy)oZ*1oOuv&PCxF)>C*;oPMW=n~eJxt~TGYG(^8FzP@K#hpf)RR-KKzX^d3w`r z%V+8{qA%(L2e6TnfK!M5fEA_PNt&6N!LxTOp~E(&*`RTA0r5mYlVZd##G!f2dGxiE z+xHE6dwbh(zyzBye?{_669+b(^fLSr%*j%51JV^JRpve+lF?|kzU&XpJ}YBA0!c_n z2w!o3lA3t$p^5 zYCnXZ?0MLj_&Z0dbrj!pn*a0a9i};OnHFN+Os_N4tJ8x-AP^+xW03hb#uS$utXxHY zb2X&Xm3$uOhioY>(l35;OWOzh#l7F?lkaq2`O(eOmKosGUFvir1@!y{as6vy$KVH<*l>(Z(D^B5(QcVF zyyu?V%1j?kYNHmO*2(Fi#ba8Q-(pMj)u~S!xjNpeOWHMtm){>3rs$xt`TXFi19=&< z#`yE7^C^e##3$=IBum5~s0c6i$J+MyGA1?0A6U+oQSuHxbbs?E9DZXEBh=7n0`fT0ax zd3jkDsX-(XrEcD&2DUOVJjOIOA$rSEInDypsdzbog0ScO>ep(MWlfz1}w&Yf1Dq&yNZ}&?2LZ>=RuYZ4eHTDi=ZGme*MesWP-fMWyr_o zzRwepqNW+RZOiLyY;6B%cPDB(WeuYdus{K9y?gtyMeRGpEFKn+{#7K98&X0-l(oe) z5o3ZqWI!-y_SUBYw>57t07x?K%Bl0#`%RDJu&{CJ*PF%rTi+b)PwHA8?oHVGF0{tf z{m>*hixDwX(zovd8$;lj`&goqr&hH1BXIbWup3Emxdh)hd*j9`-x+r3d1de~%TVBC zCxPDfRr^d$|Hma6&>y9zhU2ju*u-RZ<1SjQ&L@g&m$?_MQl;!b3W!F4^zg3|Inla~ z=5hYbN3_s5=uTs&OJ5Y6wxx$!PA1M-tVyf3aC8S0&&cKCG4!_lVe}OtI^GcacNl|` zuLTx2Ymoiiq*sYJQHY=%nQDy$h9(4vl(}X1$g{hY;bW>qA;AspkP$ILEwaY7`!X=M zOUXD+1`ifQ(jc#&_-607GK6kc)*IEZt*T%~9wEALXLea7DOThp*u{%X>lC?XZE|%v z>f%Hok6x5Q^Vqd3xlP*jmWYVUJ&mzX!W5^CRz)@}waMjy%LbDGBa=W@w8vr*du#Cy z=hW*zwMuX8e$I&bDhjbOCPePrk>t9j%Uxyl3x*0TK7x_V^jhAj<&=eF+T;DrBym?Q zUaFU}ZE=dHhs!DLOdJ122y5op7*nhU#>H5T-0lm&!S$pVE6vB(=EVMs-pDpFu)`|aaR-)0H}gZp`~z^BKpJa(3KuG=(=0n z#dXa`Zzl>YbUkyO>+(m6>~ik1kz6m2y(eiETIR;_7{}9}0NCCst-}Rxx<4vhyjbX0 zQ%(sbkSHF?OIj5~J9N!7V&r`Qh(xi4R`|}yO@1`ILXxAkazNyIrX$Axv;!fb=&$aD zaq+r$z;3XmhVzCW@qytKsH+}5FN9Kg9q0%ocgjGc1~2|4Q~Y(Vefo zv2|+uXrF}qhjdenToRp4;ZYO0#yp$Am%DCqRK&EVmzS55Dh_OavtzbMchoAX0fyI_ z>=zc3m1Rr0*Ruk!(J@s?qZ|bEuQc@I zHT4Ju{%=mc@&|xStC^%3-+5;srF)*wG5F0jkHqeiOZa zic_R4foLF79%5Fw@CBc&3bW6Se!dUqb^*#adl-zjwpi~{iL-=1&`qk5YW(;Jqv}%5%@2IWau^Qkkqjzc?t>Ze9#%ZU zgDk)?q7M-&4L~x^BBPFe@Te8Z_YMwDa7)2H0LqtweJ01n&YoT3)O2mQSg9|A4_w3* zpAQrd-T*vJ1_cHE-dIC#Ow0NW;AM4+dXH{;dIegFrjLst7p5{#_pCj8W} z+-K@GP?Fn_F+6YpLWyCJXqQ=qyT6EVSma3luN7z={~nutxU&*GnU zSXfv*psuq3@@Y!cvo$APt20m?m%TzJuQ3tZV^4t`=CKbn)rXf$)2lKw;c1WUbtpZy zPKXhE5)Kt^Pf@|1-$T4D;^N}U0L`fE?9`jg(xtO0gKMAODg(Tq#tKe%gii*~y?bp>KI5o>tK70`TS62ak zkR5f+;=%nj>ZPvG=yR&mu*BkLHWH>3yX;aLx zUg6QbL#lL#Xuw1~^V#PRHCxrS*DgEW$u&-c0j3)v0a2pm=9Z&zi@OWe3WnW%3<7~* z!NFB1_xn~>xbuTJ-hVEra;TM{_6ptqmnoXoK7B#?_hduRoqAs3pHXb2Z>INI2Oj%B Dzg#9R literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/assets/images/face_1.svg b/frontend/where_child_bus/assets/images/face_1.svg deleted file mode 100644 index ccdea67b..00000000 --- a/frontend/where_child_bus/assets/images/face_1.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/where_child_bus/assets/images/face_2.png b/frontend/where_child_bus/assets/images/face_2.png new file mode 100644 index 0000000000000000000000000000000000000000..4cf7c33736340e14bba84274b2f736079f096af0 GIT binary patch literal 5471 zcma)AWl$9Ew|!(%r0x z(z4(Jm*2fJcjkXT-4EwI^PK0L^WnVj%zNgEe`KT$CS@VT!@~pX>cC9ye8ruWfQatS zQBG%zJBROUqOFcsHGc2M9RRqf8LHvo)uxc)?0|Qe#9PP87Y~nt=U>CuHMxIu7tD1t zv-C4XxOp2o`Pn(z`PtpY@bH2m4jyjakG$Lve!dWS>tIL#L|#}%`hmy;2{}n2NZ=ik zl#v#Zk(8DW75X1mN=EEoRzmLoMT^Ty{zvtH_Wob?X{Z-*w=o_bouMvF%`D*AulIo& zW&`xGqGB`*C^b#BS7eBO@Y@I&rSUfy4gEkCFayRj$b(>dgyX(P-xPq>qDkd9>plp9>0*>zxDyQ6N(C%p1d%*_bfN(`S!6g3enH{l}F~E1XMh&VMd7td^hz zRFPD2!j~U70ZIH7sbnx?6r3|bV4J|$jEgZ2P1>SL_jnkHE>jmt1>ZKeU&~D9dbtN) zJVnzB#+g@5*SXKk&EUEe;9YxU<_bf63smP+K`eaO(zwo*=cghBYBG|3r)}{fo8`RI3 z!>t~ey+PXtyB=7geYWD>2ycBAD6*DCCyMgQ@7+UJHtl}JnKCC_jVr)pmsQW+c2QM6 z9m#x5!C>=fcBAh+4>A6w32i@cv$RHYeVhV2KZip-v~p!&MOto`gR;#M;oBC*hixes z*)Fat40jb(j$_kG9IpYV{2$AzVa7|-X%ty}*tuYbuIPQ@HULxP%f)!X6SdA)CL&#M z4&j8?Ig*|%lX<~3*T4PYX_P0EMZF-v2MM`w#^uN&D}Dq81-SRnI6veyrkhYx_dDJn za6sejwWvk3ese-X^37Ml^X;yxWI^Cw$Pxaef2YRTo{Fz#R`i224e^H$G%re#Dlz1f zd_njK2h@kML4z!2JT79)A&Qw7b5_fOP-3mmw+@tHJZ$nAqR}u; z8RU@5p0=@F8V5R?-Co%+rpB33F zFIdi-9F~&Z(a8yM&8hcAoySCzYQ(4?z2x~^^Y#pC*0ry%alTbl_NQZBG#$8qDo$t4 zV!~j8503l2uMemn7t9`Hlz`8|J8*{4_br|dfIXul35#wY7Q6jewkn_bc*)gTag3+4$59+qN*DJmK(#to?;O@& z&V&!pmka!enXPmilUb6|3H@je&&7k~8WHr$^iEdxMs3Tx{Dz~0e{UdJm(R;US&71V z8J0_(N;8=U-|1P58U)QB6ix$dy!gg}r7t*K1RswHO9-2VVO7MmbhIDuI z_OH!Gifq1&9DZY#_wmhkdwOeE?2qu8f;+i|`(omF~zJz3bEb<>qe78rAZ2qXdM1L;S#E z;n5nA;NxC;F51sE{-&^LaM_pd@9*S!moP>FE7Z*v}7v#32w z5%8*aMEbD%D`wWZfn<{}-`fcowf$VjI7RFYiH`D_$~m2lBf#KKURbL{23{7WIdDe74R?re;rz?}G~nOAEMfZD9BOE3r05<(_@$ zl{bp&{?NTXMj|2jFypaKX&KX#DL~&?$Hl&8)L0D!+f&LN_)EGoPCG<%V3|+2i{Ins z=4$TB`prwMdJmf=Jp1*Nl$;}0D%N%@gHN|-d}s=`W|Lu{T;Z#qb)7ukwc6w>S^XB% z(Q6UTJz@N~U*e1dv$3fvVl=
    b9-YIftR%c>YmK)MuU0R}wd@`-||W&5Hs68SD{ zLV};LjBTM5;$3oXKJjNoE_Q{(QAVQnOI{nPhas8`$G1H(N(7JJ`LkPq=%bR*y{bIC zVRYxsTUhlnIi%^doKGH$LoD0BsAgBpX-1&aH4mG>B1_>$hc3%Z9D4)tps}a1G4?#k z>RneWGw^uTZpwV+88l6$E@j_@AE+R1vl{BJKKgin^*ttKVx3a zrAa2zLEom?T{77+)c$)B@3(SnLhFQbh+V`)3%lGO%g!1=%T?$`#TX&c5sG;KXZ#zX z4J1B^pFo%n$2O$F>QT>6@3&8zQzhg`G$@@U52M^5aGnsWuom}IYp+W(>v%uSzrTin zg!UEeacf1JV@sC4U1u~l0eGkNAFDQzTspbG^>rgZ%KUv*nR6Dt@EElQm9o(vFLwB+H>};i6q7)@xelq#BsM%D`zvQ`h zpR7(&-Rl&sIq8`o_`UR)Y=GM;#Oz((JS;?O-mAZCg5X^NCmw6>KMr=5fZTDN4^deb zakMNnNewNH<`=EQVgUT8*}ZS|1X7iHbMvYbh;%U=`p^NV$V(jJ&(?qn`y`g9eo8ljnO z2r@ZfVzw;FJ}>JCTF6fCVVnPu8@o>QNz@~Q?hBOMkZ+8R9=FLDVmCZvaf(VM6FW*~ z?gMHVDI|%$c91zE^xK%nHQ_5Cg#P_U4a9N~$z2c&jk`$s&i}50*><(a9@8{-5;7(o z!UdS1w>Uy^fs9LpL>_G5fPY)KL3hw&w&zB>i7Xu*}VmUWtT7sb^<9!6Z z6PT6tFGbB(@+_CcuOKszMeeOUa1D-8Bh$O(L{EVS$gO>Xdhk+7z_JtmSAC%$JG2b! zRA%sH;sUM)r?^&k&^XNt66QmVJ})-zkV+l|nblnX`4c}z6^N}HY32kFoK)39WW<6zdMYogYa58s_6eT|#kakr-n>@>g2r`QR&Xm0U zr-z`Q1cgdY1zYYc2|!g}5yU1s_$vuS5H98g?{hZGa2^qU`uJxxR}dhoc=7JHp{(a7 zsfKO!D?+4sWpgk4U8-sZMSo!vkQkITJQ6a)!BiT4Wg5%_WTIvhfO>x{!&{BlzSjdJ z+nt!xYWz9pi%Mk?V~8ASPMoh$xoznH>i`h3H;}mO!1YLkq7gC0v^7t1S0O>vkHw8x z+OgardInp3l&R1`rNUrn3Mm!dbF8eAjiXwiKJOcC}l2x^^wM-!#gHe(6~l zoe=t|%3PDrE~nsV z=gXzFj78^MjEkGV-N!7Nr;KU~wBJxKXfae$X|} zP*VT1;n8fp2E@~wQctIK)e`gS-CU5(@wkHC`ER!CQIFzA^YY8nOWrX4I z@}RTLT#>@zPi%`ut+b@}J_R*_+G9WvFf7tnPI!j#d#UcB39-QnY zIf48mXgxn?Uih=}WVR8GCr^+{Pd}xmy?cHggn+5qdSM%v&frT!ai$qh{U5s@+aq91 z#m|+T2!#Ho(JZ4H0%_Lch?YhV!)^GcBgg_6+HrM85iw^;H3R41Pb&Nse zS454}-^1$kF^INO6*UQf{j;~bklv&wQyPU`ESdJe=0nG*Nc-L(l9R>fS6&*nxB#^8 z#EyDEbYuq3Bn~Q|x@i%u8U0o;$RY#fDmKb(yYR7^#pwkF3J1P6 z7J}>e^?_mOeEOgQ$ULvY-aV!2!zq;DslF4xJ9R)QL}w|Q1oq+u+{%d)w>QA}Gi}hA zYK5vyNK?4ZIcdE9pVP6$lnxd-3@4hJ`z+7b5Nu&iky&1*x&QOUl=S`F_sT0GzWQ;T zQ zbdgXj#Q}*er!VdprV)cVN`9>MLg232&931LyA_mUo1U^tKaYrNS&6`3+@_99`=}`P z?oI)-{YXYi);7~e??I|T}>lcmAWnRzW_XPJHh|} literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/assets/images/face_2.svg b/frontend/where_child_bus/assets/images/face_2.svg deleted file mode 100644 index f74a6546..00000000 --- a/frontend/where_child_bus/assets/images/face_2.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index dee0350c..62f10dcf 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -22,5 +22,5 @@ dev_dependencies: flutter: uses-material-design: true assets: - - assets/images/face_1.svg - - assets/images/face_2.svg + - assets/images/face_1.png + - assets/images/face_2.png From 8cf2c801f086d2faf9eba6a3ae426b0908bdbfc6 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 10 Feb 2024 23:26:12 +0900 Subject: [PATCH 066/771] =?UTF-8?q?feat:=E5=9C=92=E5=85=90=E3=81=AE?= =?UTF-8?q?=E5=86=99=E7=9C=9F=E3=82=92=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_list_page.dart | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index edaf2fab..e2a214bf 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -24,6 +24,13 @@ class _StudentListPageState extends State { "4組", "5組", ]; + final List image = [ + "1", + "2", + "1", + "1", + "2", + ]; var screenSize = MediaQuery.of(context).size; @@ -43,7 +50,7 @@ class _StudentListPageState extends State { child: Padding( padding: const EdgeInsets.all(20.0), child: Row(children: [ - childImage(), + childImage(image[index]), SizedBox( width: screenSize.width * 0.05, ), @@ -52,13 +59,11 @@ class _StudentListPageState extends State { }); } - Widget childImage() { + Widget childImage(String image) { return SizedBox( width: 100, height: 100, - child: Card( - color: Colors.grey, - )); + child: Image.asset("assets/images/face_${image}.png")); } Widget nameAndGroup(String name, String group, Size size) { From 3f93ed272855187f487ad00028878e7ae19e60ec Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 11 Feb 2024 00:45:05 +0900 Subject: [PATCH 067/771] =?UTF-8?q?chore(ml):=20=E5=AD=A6=E7=BF=92?= =?UTF-8?q?=E5=AF=BE=E8=B1=A1=E3=83=87=E3=83=BC=E3=82=BF=E3=81=8C=E5=85=A5?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B=E3=83=87=E3=82=A3=E3=83=AC?= =?UTF-8?q?=E3=82=AF=E3=83=88=E3=83=AA=E3=82=92gitignore=E3=81=AB=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/machine_learning/.gitignore b/machine_learning/.gitignore index c67b3666..e8a87675 100644 --- a/machine_learning/.gitignore +++ b/machine_learning/.gitignore @@ -36,6 +36,7 @@ Temporary Items ### Python ### src/face_detect_model/pickle/* +src/face_detect_model/data/img # Byte-compiled / optimized / DLL files __pycache__/ From b2e9729a818c18f62e6bb84c10e146e31f98f8f8 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 11 Feb 2024 00:50:07 +0900 Subject: [PATCH 068/771] =?UTF-8?q?refactor(ml):=20=E9=A1=94=E6=A4=9C?= =?UTF-8?q?=E7=9F=A5=E3=81=AB=E9=96=A2=E3=82=8F=E3=82=8Butil=E7=B3=BB?= =?UTF-8?q?=E3=81=AE=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=82=92=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=8B=E3=82=89?= =?UTF-8?q?=E4=BD=BF=E3=81=84=E3=82=84=E3=81=99=E3=81=84=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/data/util.py | 55 ++++++------------- 1 file changed, 18 insertions(+), 37 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/util.py b/machine_learning/src/face_detect_model/data/util.py index 7090a46f..7cb03fca 100644 --- a/machine_learning/src/face_detect_model/data/util.py +++ b/machine_learning/src/face_detect_model/data/util.py @@ -1,56 +1,37 @@ import cv2 import os + def load_cascade(cascade_path): """Haar Cascadeを読み込む""" return cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) -def detect_face(image, face_cascade): + +def detect_face( + image, face_cascade, scaleFactor=1.1, minNeighbors=15, minSize=(50, 50) +): """画像から顔を検出する""" gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) - faces = face_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=5, minSize=(30, 30)) + faces = face_cascade.detectMultiScale( + gray, scaleFactor=scaleFactor, minNeighbors=minNeighbors, minSize=minSize + ) return faces -def clip_and_resize_face(image, x, y, w, h, image_size): + +def clip_and_resize_face(face, image, image_size): """検出された顔をクリップし、指定サイズにリサイズする""" - face_roi = image[y:y+h, x:x+w] + (x, y, w, h) = face + face_roi = image[y : y + h, x : x + w] resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) return resized_face -def save_face(face, save_dir, index): + +def save_face(face, save_dir, save_file_name): """クリップされた顔画像を保存する""" - if not os.path.exists(save_dir): - os.makedirs(save_dir) - save_path = os.path.join(save_dir, f'face_{index}.jpg') + if not os.path.exists(os.path.dirname(save_dir)): + os.makedirs(os.path.dirname(save_dir)) + save_path = os.path.join(save_dir, save_file_name) try: cv2.imwrite(save_path, face) - print(f"画像を保存しました: {save_path}") except Exception as e: - print(f"画像の保存に失敗しました: {save_path}. エラー: {e}") - -def main(): - # パスの指定 - face_cascade_path = 'haarcascade_frontalface_default.xml' - image_path = 'src/face_detect_model/data/Nanakusa.jpeg' - save_dir = './src/face_detect_model/data/img' - image_size = (100, 100) - - # 画像の読み込み - image = cv2.imread(image_path) - if image is None: - print(f"画像ファイルが見つからないか読み込めません: {image_path}") - return - - # Haar Cascadeの読み込み - face_cascade = load_cascade(face_cascade_path) - - # 画像から顔を検出 - faces = detect_face(image, face_cascade) - - # 検出された各顔に対して処理 - for i, (x, y, w, h) in enumerate(faces): - clipped_face = clip_and_resize_face(image, x, y, w, h, image_size) - save_face(clipped_face, save_dir, i) - -if __name__ == "__main__": - main() + raise e From 3bbdeb8a94bd443c00926d4b01b2bcdaa83eae2a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 01:21:40 +0900 Subject: [PATCH 069/771] =?UTF-8?q?feat(ci):=20Docker=E3=82=92=E7=B7=A8?= =?UTF-8?q?=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Dockerfile | 40 +++++++++++++++----------------------- backend/docker-compose.yml | 17 ++++++++++++++++ 2 files changed, 33 insertions(+), 24 deletions(-) create mode 100644 backend/docker-compose.yml diff --git a/backend/Dockerfile b/backend/Dockerfile index 9a41e251..3005ffc4 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,32 +1,24 @@ -# ビルドステージ +# First stage: build environment FROM golang:1.21.5 AS builder -WORKDIR /src -COPY ./proto-gen ./proto-gen - -WORKDIR /src/ -COPY /go.mod /go.sum ./ -RUN go mod download - +WORKDIR /srv/grpc COPY . . -RUN go build \ - -tags timetzdata \ - -o where-my-bus-backend \ - ./cmd/server +# .env ファイルをイメージ内にコピー +COPY .env / +RUN go mod download -# 実行ステージ -FROM ubuntu:22.04 +ARG VERS="3.11.4" +ARG ARCH="linux-x86_64" -RUN apt-get update && apt-get install -y --no-install-recommends \ - tzdata \ - ca-certificates \ - && rm -rf /var/lib/apt/lists/* -ENV TZ Asia/Tokyo +RUN CGO_ENABLED=0 GOOS=linux \ + go build -a -installsuffix cgo \ + -o /go/bin/server \ + github.com/GreenTeaProgrammers/WhereChildBus/backend/cmd/server -WORKDIR /app -COPY --from=builder /src/where-my-bus-backend . +# Final stage: runtime environment +FROM scratch -# gRPCサービスが使用するポート50051を公開 -EXPOSE 50051 +# Corrected COPY command to use 'builder' instead of 'build' +COPY --from=builder /go/bin/server /server -ENTRYPOINT [ "/app/where-my-bus-backend" ] +ENTRYPOINT ["/server"] diff --git a/backend/docker-compose.yml b/backend/docker-compose.yml new file mode 100644 index 00000000..ee64171c --- /dev/null +++ b/backend/docker-compose.yml @@ -0,0 +1,17 @@ +version: "3.8" +services: + grpc-calculator: + image: gcr.io/wherechildbus/grpc-calculator:latest + ports: + - "50051:50051" + environment: + DSN: env + DB_USER_NAME: env + DB_PASSWORD: env + DB_ADDR: env + DB_NAME: "where_child_bus" + PORT: "50051" + ModeDev: "true" + volumes: + - "/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt" # ←重要 + From cca01ce6346259fed181c408adfd214da6aeefad Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 01:29:04 +0900 Subject: [PATCH 070/771] =?UTF-8?q?fix(docker):.env=E3=82=92=E3=82=B3?= =?UTF-8?q?=E3=83=94=E3=83=BC=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index 3005ffc4..eb9c716d 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -20,5 +20,7 @@ FROM scratch # Corrected COPY command to use 'builder' instead of 'build' COPY --from=builder /go/bin/server /server +COPY --from=builder /srv/grpc/.env / + ENTRYPOINT ["/server"] From a4fd703da56a95a00830a7fab0a5c9a9045b96e2 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 01:32:31 +0900 Subject: [PATCH 071/771] fix(docker): delete enviroment values --- backend/docker-compose.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/backend/docker-compose.yml b/backend/docker-compose.yml index ee64171c..7929c215 100644 --- a/backend/docker-compose.yml +++ b/backend/docker-compose.yml @@ -4,14 +4,6 @@ services: image: gcr.io/wherechildbus/grpc-calculator:latest ports: - "50051:50051" - environment: - DSN: env - DB_USER_NAME: env - DB_PASSWORD: env - DB_ADDR: env - DB_NAME: "where_child_bus" - PORT: "50051" - ModeDev: "true" volumes: - "/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt" # ←重要 From 0a9c08dbe85504f91750158797c29afeef453036 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 11 Feb 2024 02:40:38 +0900 Subject: [PATCH 072/771] =?UTF-8?q?feat(ml):=20=E3=83=87=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E3=82=BB=E3=83=83=E3=83=88=E4=BD=9C=E6=88=90=E3=81=AE=E3=81=9F?= =?UTF-8?q?=E3=82=81=E3=81=AE=E5=89=8D=E5=87=A6=E7=90=86=E3=82=92=E8=A1=8C?= =?UTF-8?q?=E3=81=88=E3=82=8B=E3=82=B9=E3=82=AF=E3=83=AA=E3=83=97=E3=83=88?= =?UTF-8?q?=E3=81=AE=E6=BA=96=E5=82=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/detectFaceAndClip.py | 92 +++++++++++++++++++ .../src/face_detect_model/data/util.py | 37 -------- 2 files changed, 92 insertions(+), 37 deletions(-) create mode 100644 machine_learning/src/face_detect_model/data/detectFaceAndClip.py delete mode 100644 machine_learning/src/face_detect_model/data/util.py diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py new file mode 100644 index 00000000..7059fcd7 --- /dev/null +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -0,0 +1,92 @@ +import cv2 +import os +import yaml + + +def load_cascade(cascade_path): + """Haar Cascadeを読み込む""" + return cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) + + +def detect_face( + image, face_cascade, scaleFactor=1.1, minNeighbors=15, minSize=(50, 50) +): + """画像から顔を検出する""" + gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) + faces = face_cascade.detectMultiScale( + gray, scaleFactor=scaleFactor, minNeighbors=minNeighbors, minSize=minSize + ) + return faces + + +def clip_and_resize_face(face, image, image_size): + """検出された顔をクリップし、指定サイズにリサイズする""" + (x, y, w, h) = face + face_roi = image[y : y + h, x : x + w] + resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) + return resized_face + + +def save_face(face, save_dir, save_file_name): + """クリップされた顔画像を保存する""" + if not os.path.exists(os.path.dirname(save_dir)): + os.makedirs(os.path.dirname(save_dir)) + save_path = os.path.join(save_dir, save_file_name) + try: + cv2.imwrite(save_path, face) + except Exception as e: + raise e + + +def main(): + # パスの指定 + with open("src/face_detect_model/config.yaml", "r") as f: + config = yaml.safe_load(f) + + face_cascade_path = config["face_detect"]["cascade_path"] + image_dir_path = "src/face_detect_model/data/img" + save_dir = "src/face_detect_model/data/detect_img" + image_size = ( + config["face_detect"]["clip_size"]["height"], + config["face_detect"]["clip_size"]["width"], + ) + + if not os.path.exists(save_dir): + os.makedirs(save_dir) + + for file in os.listdir(save_dir): + file_path = os.path.join(save_dir, file) + if os.path.isfile(file_path): + os.remove(file_path) + + # 画像の読み込み + for image_name in os.listdir(image_dir_path): + image = cv2.imread(image_path := os.path.join(image_dir_path, image_name)) + if image is None: + print(f"画像ファイルが見つからないか読み込めません: {image_path}") + return + # Haar Cascadeの読み込み + face_cascade = load_cascade(face_cascade_path) + + # 画像から顔を検出 + faces = detect_face( + image, + face_cascade, + scaleFactor=config["face_detect"]["scale_factor"], + minNeighbors=config["face_detect"]["min_neighbors"], + minSize=( + config["face_detect"]["min_size"]["height"], + config["face_detect"]["min_size"]["width"], + ), + ) + + # 検出された各顔に対して処理 + for i, face in enumerate(faces): + clipped_face = clip_and_resize_face(face, image, image_size) + image_name_without_ext = os.path.splitext(image_name)[0] + save_file_name = f"{image_name_without_ext}-{i}.png" + save_face(clipped_face, save_dir, save_file_name) + + +if __name__ == "__main__": + main() diff --git a/machine_learning/src/face_detect_model/data/util.py b/machine_learning/src/face_detect_model/data/util.py deleted file mode 100644 index 7cb03fca..00000000 --- a/machine_learning/src/face_detect_model/data/util.py +++ /dev/null @@ -1,37 +0,0 @@ -import cv2 -import os - - -def load_cascade(cascade_path): - """Haar Cascadeを読み込む""" - return cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) - - -def detect_face( - image, face_cascade, scaleFactor=1.1, minNeighbors=15, minSize=(50, 50) -): - """画像から顔を検出する""" - gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) - faces = face_cascade.detectMultiScale( - gray, scaleFactor=scaleFactor, minNeighbors=minNeighbors, minSize=minSize - ) - return faces - - -def clip_and_resize_face(face, image, image_size): - """検出された顔をクリップし、指定サイズにリサイズする""" - (x, y, w, h) = face - face_roi = image[y : y + h, x : x + w] - resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) - return resized_face - - -def save_face(face, save_dir, save_file_name): - """クリップされた顔画像を保存する""" - if not os.path.exists(os.path.dirname(save_dir)): - os.makedirs(os.path.dirname(save_dir)) - save_path = os.path.join(save_dir, save_file_name) - try: - cv2.imwrite(save_path, face) - except Exception as e: - raise e From b4f33fc2e27427a9954bd067517649d95ec0a744 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 11 Feb 2024 02:41:38 +0900 Subject: [PATCH 073/771] =?UTF-8?q?refactor(ml):=20model=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=90=8D=E7=A7=B0=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../face_detect_model/model/{model.py => faceDetectModel.py} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename machine_learning/src/face_detect_model/model/{model.py => faceDetectModel.py} (94%) diff --git a/machine_learning/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/faceDetectModel.py similarity index 94% rename from machine_learning/src/face_detect_model/model/model.py rename to machine_learning/src/face_detect_model/model/faceDetectModel.py index bc21d0c8..f488d6de 100644 --- a/machine_learning/src/face_detect_model/model/model.py +++ b/machine_learning/src/face_detect_model/model/faceDetectModel.py @@ -1,9 +1,9 @@ import torch.nn as nn -class Net(nn.Module): +class FaceDetectModel(nn.Module): def __init__(self, config: dict, num_classes: int): - super(Net, self).__init__() + super(FaceDetectModel, self).__init__() self.config = config # 汎用性のために入力チャンネル数をconfigから取得(一応) in_channels = config["model"]["in_channels"] From b110bab0a8660f0a7e1b787f2ffee1390c04c290 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 11 Feb 2024 02:42:38 +0900 Subject: [PATCH 074/771] =?UTF-8?q?feat(ml):=20=E3=83=87=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E3=82=BB=E3=83=83=E3=83=88=E3=81=AE=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/data/dataset.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/machine_learning/src/face_detect_model/data/dataset.py b/machine_learning/src/face_detect_model/data/dataset.py index 8b137891..b6315080 100644 --- a/machine_learning/src/face_detect_model/data/dataset.py +++ b/machine_learning/src/face_detect_model/data/dataset.py @@ -1 +1,38 @@ +import torch +from torch.utils.data import Dataset +import os +import cv2 + +class face_detect_dataset(Dataset): + def __init__(self, config): + self.data_dir = config["dataset"]["data_dir_path"] + self.data = [] + self.label_name_dict = {} + name_label_dict = {} + self.label_num = 0 + + for file in os.listdir(self.data_dir): + file_path = os.path.join(self.data_dir, file) + name = file.split("-")[0] + print(name) + image = cv2.imread(file_path) + one_data = [torch.Tensor(self.label_num), image] + self.data.append(one_data) + + if name_label_dict.get(name) is None: + self.label_name_dict[self.label_num] = name + name_label_dict[name] = self.label_num + self.label_num += 1 + + def __len__(self): + return len(self.data) + + def __getitem__(self, idx): + return self.data[idx] + + def get_label_name_dict(self): + return self.label_name_dict + + def get_label_num(self): + return self.label_num From cff40a9b1d0838f96ff2af3e26e58f858189496b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 13:29:32 +0900 Subject: [PATCH 075/771] =?UTF-8?q?fix(docker):=20alpine=E3=83=99=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=81=AB=E5=A4=89=E6=9B=B4=E3=80=81CA=E8=A8=BC?= =?UTF-8?q?=E6=98=8E=E6=9B=B8=E3=81=AE=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=80=81=E3=83=93=E3=83=AB=E3=83=89=E3=82=B9?= =?UTF-8?q?=E3=83=86=E3=83=BC=E3=82=B8=E3=81=8B=E3=82=89=E3=83=90=E3=82=A4?= =?UTF-8?q?=E3=83=8A=E3=83=AA=E3=81=A8.env=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=82=92=E3=82=B3=E3=83=94=E3=83=BC=E3=80=81=E3=82=A2?= =?UTF-8?q?=E3=83=97=E3=83=AA=E3=82=B1=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3?= =?UTF-8?q?=E3=81=AE=E8=B5=B7=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index eb9c716d..5fdecc22 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -16,11 +16,15 @@ RUN CGO_ENABLED=0 GOOS=linux \ github.com/GreenTeaProgrammers/WhereChildBus/backend/cmd/server # Final stage: runtime environment -FROM scratch +# CA証明書が必要なので、alpineをベースにする +FROM alpine:latest -# Corrected COPY command to use 'builder' instead of 'build' +# 必要なパッケージをインストール +RUN apk --no-cache add ca-certificates + +# ビルドステージからバイナリと.envファイルをコピー COPY --from=builder /go/bin/server /server COPY --from=builder /srv/grpc/.env / - +# アプリケーションの起動 ENTRYPOINT ["/server"] From 4c40db8093a246351fbe455ee1358ba8ce23339d Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 13:29:53 +0900 Subject: [PATCH 076/771] =?UTF-8?q?fix:=20main.go=E3=81=AE=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E3=81=AA=E8=A8=AD=E5=AE=9A=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/server/main.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index 659156bf..3fca68d5 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -8,7 +8,6 @@ import ( "os" "os/signal" "syscall" - "time" "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql" @@ -34,11 +33,6 @@ func main() { } log.Println("Successfully connected to PlanetScale!") - // その他の設定 - jst, err := time.LoadLocation("Asia/Tokyo") - if err != nil { - log.Fatal(err) - } mysqlConfig := &mysql.Config{ User: config.DBUser, Passwd: config.DBPassword, @@ -46,7 +40,6 @@ func main() { Addr: config.DBAddress, DBName: config.DBName, ParseTime: true, - Loc: jst, TLSConfig: "true", // この行は必要に応じて調整してください。 AllowNativePasswords: true, InterpolateParams: true, From 526a5152dad30d2dcc2ec2d418c29b2e94a1677a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 13:30:23 +0900 Subject: [PATCH 077/771] =?UTF-8?q?chore(backend):=20healthcheck=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=AEclient=E3=82=B3=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=82=92=E4=BD=9C=E6=88=90=E3=81=97=E3=80=81=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E3=81=AA=E3=83=9E=E3=82=A4=E3=82=B0=E3=83=AC=E3=83=BC=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/client/main.go | 67 +++++++++++++++++++++++ backend/cmd/server/for_local/migration.go | 36 ------------ 2 files changed, 67 insertions(+), 36 deletions(-) create mode 100644 backend/cmd/client/main.go delete mode 100644 backend/cmd/server/for_local/migration.go diff --git a/backend/cmd/client/main.go b/backend/cmd/client/main.go new file mode 100644 index 00000000..f9abac39 --- /dev/null +++ b/backend/cmd/client/main.go @@ -0,0 +1,67 @@ +package main + +import ( + "context" + "crypto/tls" + "flag" + "log" + + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" + + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" +) + +var ( + grpcEndpoint = flag.String("grpc_endpoint", "", "The gRPC Endpoint of the Server") +) + +func main() { + flag.Parse() + if *grpcEndpoint == "" { + log.Fatal("[main] unable to start client without gRPC endpoint to server") + } + + creds := credentials.NewTLS(&tls.Config{ + InsecureSkipVerify: true, + }) + + opts := []grpc.DialOption{ + grpc.WithTransportCredentials(creds), + } + + log.Printf("Connecting to gRPC Service [%s]", *grpcEndpoint) + conn, err := grpc.Dial(*grpcEndpoint, opts...) + if err != nil { + log.Fatal(err) + } + defer conn.Close() + + client := NewClient(conn) + ctx := context.Background() + + rqst := &pb.PingRequest{ + Name: "Ping", + } + resp, err := client.Ping(ctx, rqst) + if err != nil { + log.Fatal(err) + } + log.Printf("Ping Response: %s", resp.Message) +} + +// Client is a struct that implements the pb.CalculatorClient +type Client struct { + client pb.HealthcheckServiceClient +} + +// NewClient returns a new Client +func NewClient(conn *grpc.ClientConn) *Client { + return &Client{ + client: pb.NewHealthcheckServiceClient(conn), + } +} + +func (c *Client) Ping(ctx context.Context, r *pb.PingRequest) (*pb.PingResponse, error) { + return c.client.Ping(ctx, r) +} diff --git a/backend/cmd/server/for_local/migration.go b/backend/cmd/server/for_local/migration.go deleted file mode 100644 index f5790c50..00000000 --- a/backend/cmd/server/for_local/migration.go +++ /dev/null @@ -1,36 +0,0 @@ -package main - -import ( - "context" - "log" - "time" - - "github.com/go-sql-driver/mysql" - _ "github.com/go-sql-driver/mysql" - - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" -) - -func main() { - jst, err := time.LoadLocation("Asia/Tokyo") - if err != nil { - log.Fatal(err) - } - mysqlConfig := &mysql.Config{ - DBName: "where_child_bus", - User: "root", - Passwd: "password", - Addr: "localhost:3306", - Net: "tcp", - ParseTime: true, - Loc: jst, - } - entClient, err := ent.Open("mysql", mysqlConfig.FormatDSN()) - if err != nil { - log.Fatal(err) - } - defer entClient.Close() - if err := entClient.Schema.Create(context.Background()); err != nil { - log.Fatal(err) - } -} From 4c21be07cb511b19ff4b2b1332aab123808fa3c1 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 13:45:46 +0900 Subject: [PATCH 078/771] =?UTF-8?q?feat:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E9=81=B7=E7=A7=BB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_list_page.dart | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index e2a214bf..def5f59a 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -45,17 +45,21 @@ class _StudentListPageState extends State { itemBuilder: (BuildContext context, int index) { return FractionallySizedBox( widthFactor: 0.8, - child: Card( - color: Colors.white, - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Row(children: [ - childImage(image[index]), - SizedBox( - width: screenSize.width * 0.05, - ), - nameAndGroup(name[index], group[index], screenSize), - ])))); + child: InkWell( + onTap: () { + showBottomSheet(context); + }, + child: Card( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row(children: [ + childImage(image[index]), + SizedBox( + width: screenSize.width * 0.05, + ), + nameAndGroup(name[index], group[index], screenSize), + ]))))); }); } @@ -85,4 +89,15 @@ class _StudentListPageState extends State { Text("停留所名"), ]); } + + void showBottomSheet(BuildContext context) { + showModalBottomSheet( + context: context, + builder: (BuildContext context) { + return Container( + height: 1000, + child: Center(child: Text("園児詳細情報")), + ); + }); + } } From e8fa28189a781081a04ed77b07b51d1974617e2b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 13:50:33 +0900 Subject: [PATCH 079/771] =?UTF-8?q?feat(Schema):=20=E3=83=8F=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A5=E3=83=91=E3=82=B9=E3=83=AF=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=81=AE=E3=82=AB=E3=83=A9=E3=83=A0=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/guardian.go | 35 +- .../repository/ent/guardian/guardian.go | 24 +- .../domain/repository/ent/guardian/where.go | 220 +++++---- .../domain/repository/ent/guardian_create.go | 38 +- .../domain/repository/ent/guardian_query.go | 8 +- .../domain/repository/ent/guardian_update.go | 96 ++-- .../domain/repository/ent/migrate/schema.go | 10 +- backend/domain/repository/ent/mutation.go | 439 +++++++++++------- backend/domain/repository/ent/nursery.go | 35 +- .../domain/repository/ent/nursery/nursery.go | 24 +- .../domain/repository/ent/nursery/where.go | 230 +++++---- .../domain/repository/ent/nursery_create.go | 55 ++- .../domain/repository/ent/nursery_update.go | 138 +++--- backend/domain/repository/ent/runtime.go | 8 +- .../domain/repository/ent/schema/guardian.go | 3 +- .../domain/repository/ent/schema/nursery.go | 5 +- 16 files changed, 850 insertions(+), 518 deletions(-) diff --git a/backend/domain/repository/ent/guardian.go b/backend/domain/repository/ent/guardian.go index 5fbdaaf6..8b1dae24 100644 --- a/backend/domain/repository/ent/guardian.go +++ b/backend/domain/repository/ent/guardian.go @@ -20,10 +20,12 @@ type Guardian struct { config `json:"-"` // ID of the ent. ID uuid.UUID `json:"id,omitempty"` - // Name holds the value of the "name" field. - Name string `json:"name,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` + // EncryptedPassword holds the value of the "encrypted_password" field. + EncryptedPassword string `json:"encrypted_password,omitempty"` + // Name holds the value of the "name" field. + Name string `json:"name,omitempty"` // Phone holds the value of the "phone" field. Phone string `json:"phone,omitempty"` // CreatedAt holds the value of the "created_at" field. @@ -90,7 +92,7 @@ func (*Guardian) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { - case guardian.FieldName, guardian.FieldEmail, guardian.FieldPhone: + case guardian.FieldEmail, guardian.FieldEncryptedPassword, guardian.FieldName, guardian.FieldPhone: values[i] = new(sql.NullString) case guardian.FieldCreatedAt, guardian.FieldUpdatedAt: values[i] = new(sql.NullTime) @@ -119,18 +121,24 @@ func (gu *Guardian) assignValues(columns []string, values []any) error { } else if value != nil { gu.ID = *value } - case guardian.FieldName: - if value, ok := values[i].(*sql.NullString); !ok { - return fmt.Errorf("unexpected type %T for field name", values[i]) - } else if value.Valid { - gu.Name = value.String - } case guardian.FieldEmail: if value, ok := values[i].(*sql.NullString); !ok { return fmt.Errorf("unexpected type %T for field email", values[i]) } else if value.Valid { gu.Email = value.String } + case guardian.FieldEncryptedPassword: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field encrypted_password", values[i]) + } else if value.Valid { + gu.EncryptedPassword = value.String + } + case guardian.FieldName: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field name", values[i]) + } else if value.Valid { + gu.Name = value.String + } case guardian.FieldPhone: if value, ok := values[i].(*sql.NullString); !ok { return fmt.Errorf("unexpected type %T for field phone", values[i]) @@ -207,12 +215,15 @@ func (gu *Guardian) String() string { var builder strings.Builder builder.WriteString("Guardian(") builder.WriteString(fmt.Sprintf("id=%v, ", gu.ID)) - builder.WriteString("name=") - builder.WriteString(gu.Name) - builder.WriteString(", ") builder.WriteString("email=") builder.WriteString(gu.Email) builder.WriteString(", ") + builder.WriteString("encrypted_password=") + builder.WriteString(gu.EncryptedPassword) + builder.WriteString(", ") + builder.WriteString("name=") + builder.WriteString(gu.Name) + builder.WriteString(", ") builder.WriteString("phone=") builder.WriteString(gu.Phone) builder.WriteString(", ") diff --git a/backend/domain/repository/ent/guardian/guardian.go b/backend/domain/repository/ent/guardian/guardian.go index da62e7a2..f20fcedd 100644 --- a/backend/domain/repository/ent/guardian/guardian.go +++ b/backend/domain/repository/ent/guardian/guardian.go @@ -15,10 +15,12 @@ const ( Label = "guardian" // FieldID holds the string denoting the id field in the database. FieldID = "id" - // FieldName holds the string denoting the name field in the database. - FieldName = "name" // FieldEmail holds the string denoting the email field in the database. FieldEmail = "email" + // FieldEncryptedPassword holds the string denoting the encrypted_password field in the database. + FieldEncryptedPassword = "encrypted_password" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" // FieldPhone holds the string denoting the phone field in the database. FieldPhone = "phone" // FieldCreatedAt holds the string denoting the created_at field in the database. @@ -59,8 +61,9 @@ const ( // Columns holds all SQL columns for guardian fields. var Columns = []string{ FieldID, - FieldName, FieldEmail, + FieldEncryptedPassword, + FieldName, FieldPhone, FieldCreatedAt, FieldUpdatedAt, @@ -106,16 +109,21 @@ func ByID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldID, opts...).ToFunc() } -// ByName orders the results by the name field. -func ByName(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldName, opts...).ToFunc() -} - // ByEmail orders the results by the email field. func ByEmail(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldEmail, opts...).ToFunc() } +// ByEncryptedPassword orders the results by the encrypted_password field. +func ByEncryptedPassword(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEncryptedPassword, opts...).ToFunc() +} + +// ByName orders the results by the name field. +func ByName(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldName, opts...).ToFunc() +} + // ByPhone orders the results by the phone field. func ByPhone(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPhone, opts...).ToFunc() diff --git a/backend/domain/repository/ent/guardian/where.go b/backend/domain/repository/ent/guardian/where.go index 73f68389..fe3d1f90 100644 --- a/backend/domain/repository/ent/guardian/where.go +++ b/backend/domain/repository/ent/guardian/where.go @@ -56,16 +56,21 @@ func IDLTE(id uuid.UUID) predicate.Guardian { return predicate.Guardian(sql.FieldLTE(FieldID, id)) } -// Name applies equality check predicate on the "name" field. It's identical to NameEQ. -func Name(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldEQ(FieldName, v)) -} - // Email applies equality check predicate on the "email" field. It's identical to EmailEQ. func Email(v string) predicate.Guardian { return predicate.Guardian(sql.FieldEQ(FieldEmail, v)) } +// EncryptedPassword applies equality check predicate on the "encrypted_password" field. It's identical to EncryptedPasswordEQ. +func EncryptedPassword(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldEncryptedPassword, v)) +} + +// Name applies equality check predicate on the "name" field. It's identical to NameEQ. +func Name(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldName, v)) +} + // Phone applies equality check predicate on the "phone" field. It's identical to PhoneEQ. func Phone(v string) predicate.Guardian { return predicate.Guardian(sql.FieldEQ(FieldPhone, v)) @@ -81,71 +86,6 @@ func UpdatedAt(v time.Time) predicate.Guardian { return predicate.Guardian(sql.FieldEQ(FieldUpdatedAt, v)) } -// NameEQ applies the EQ predicate on the "name" field. -func NameEQ(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldEQ(FieldName, v)) -} - -// NameNEQ applies the NEQ predicate on the "name" field. -func NameNEQ(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldNEQ(FieldName, v)) -} - -// NameIn applies the In predicate on the "name" field. -func NameIn(vs ...string) predicate.Guardian { - return predicate.Guardian(sql.FieldIn(FieldName, vs...)) -} - -// NameNotIn applies the NotIn predicate on the "name" field. -func NameNotIn(vs ...string) predicate.Guardian { - return predicate.Guardian(sql.FieldNotIn(FieldName, vs...)) -} - -// NameGT applies the GT predicate on the "name" field. -func NameGT(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldGT(FieldName, v)) -} - -// NameGTE applies the GTE predicate on the "name" field. -func NameGTE(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldGTE(FieldName, v)) -} - -// NameLT applies the LT predicate on the "name" field. -func NameLT(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldLT(FieldName, v)) -} - -// NameLTE applies the LTE predicate on the "name" field. -func NameLTE(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldLTE(FieldName, v)) -} - -// NameContains applies the Contains predicate on the "name" field. -func NameContains(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldContains(FieldName, v)) -} - -// NameHasPrefix applies the HasPrefix predicate on the "name" field. -func NameHasPrefix(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldHasPrefix(FieldName, v)) -} - -// NameHasSuffix applies the HasSuffix predicate on the "name" field. -func NameHasSuffix(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldHasSuffix(FieldName, v)) -} - -// NameEqualFold applies the EqualFold predicate on the "name" field. -func NameEqualFold(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldEqualFold(FieldName, v)) -} - -// NameContainsFold applies the ContainsFold predicate on the "name" field. -func NameContainsFold(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldContainsFold(FieldName, v)) -} - // EmailEQ applies the EQ predicate on the "email" field. func EmailEQ(v string) predicate.Guardian { return predicate.Guardian(sql.FieldEQ(FieldEmail, v)) @@ -201,16 +141,6 @@ func EmailHasSuffix(v string) predicate.Guardian { return predicate.Guardian(sql.FieldHasSuffix(FieldEmail, v)) } -// EmailIsNil applies the IsNil predicate on the "email" field. -func EmailIsNil() predicate.Guardian { - return predicate.Guardian(sql.FieldIsNull(FieldEmail)) -} - -// EmailNotNil applies the NotNil predicate on the "email" field. -func EmailNotNil() predicate.Guardian { - return predicate.Guardian(sql.FieldNotNull(FieldEmail)) -} - // EmailEqualFold applies the EqualFold predicate on the "email" field. func EmailEqualFold(v string) predicate.Guardian { return predicate.Guardian(sql.FieldEqualFold(FieldEmail, v)) @@ -221,6 +151,136 @@ func EmailContainsFold(v string) predicate.Guardian { return predicate.Guardian(sql.FieldContainsFold(FieldEmail, v)) } +// EncryptedPasswordEQ applies the EQ predicate on the "encrypted_password" field. +func EncryptedPasswordEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordNEQ applies the NEQ predicate on the "encrypted_password" field. +func EncryptedPasswordNEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordIn applies the In predicate on the "encrypted_password" field. +func EncryptedPasswordIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldIn(FieldEncryptedPassword, vs...)) +} + +// EncryptedPasswordNotIn applies the NotIn predicate on the "encrypted_password" field. +func EncryptedPasswordNotIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldNotIn(FieldEncryptedPassword, vs...)) +} + +// EncryptedPasswordGT applies the GT predicate on the "encrypted_password" field. +func EncryptedPasswordGT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGT(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordGTE applies the GTE predicate on the "encrypted_password" field. +func EncryptedPasswordGTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGTE(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordLT applies the LT predicate on the "encrypted_password" field. +func EncryptedPasswordLT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLT(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordLTE applies the LTE predicate on the "encrypted_password" field. +func EncryptedPasswordLTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLTE(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordContains applies the Contains predicate on the "encrypted_password" field. +func EncryptedPasswordContains(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContains(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordHasPrefix applies the HasPrefix predicate on the "encrypted_password" field. +func EncryptedPasswordHasPrefix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasPrefix(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordHasSuffix applies the HasSuffix predicate on the "encrypted_password" field. +func EncryptedPasswordHasSuffix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasSuffix(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordEqualFold applies the EqualFold predicate on the "encrypted_password" field. +func EncryptedPasswordEqualFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEqualFold(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordContainsFold applies the ContainsFold predicate on the "encrypted_password" field. +func EncryptedPasswordContainsFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContainsFold(FieldEncryptedPassword, v)) +} + +// NameEQ applies the EQ predicate on the "name" field. +func NameEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldName, v)) +} + +// NameNEQ applies the NEQ predicate on the "name" field. +func NameNEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldName, v)) +} + +// NameIn applies the In predicate on the "name" field. +func NameIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldIn(FieldName, vs...)) +} + +// NameNotIn applies the NotIn predicate on the "name" field. +func NameNotIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldNotIn(FieldName, vs...)) +} + +// NameGT applies the GT predicate on the "name" field. +func NameGT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGT(FieldName, v)) +} + +// NameGTE applies the GTE predicate on the "name" field. +func NameGTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGTE(FieldName, v)) +} + +// NameLT applies the LT predicate on the "name" field. +func NameLT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLT(FieldName, v)) +} + +// NameLTE applies the LTE predicate on the "name" field. +func NameLTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLTE(FieldName, v)) +} + +// NameContains applies the Contains predicate on the "name" field. +func NameContains(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContains(FieldName, v)) +} + +// NameHasPrefix applies the HasPrefix predicate on the "name" field. +func NameHasPrefix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasPrefix(FieldName, v)) +} + +// NameHasSuffix applies the HasSuffix predicate on the "name" field. +func NameHasSuffix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasSuffix(FieldName, v)) +} + +// NameEqualFold applies the EqualFold predicate on the "name" field. +func NameEqualFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEqualFold(FieldName, v)) +} + +// NameContainsFold applies the ContainsFold predicate on the "name" field. +func NameContainsFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContainsFold(FieldName, v)) +} + // PhoneEQ applies the EQ predicate on the "phone" field. func PhoneEQ(v string) predicate.Guardian { return predicate.Guardian(sql.FieldEQ(FieldPhone, v)) diff --git a/backend/domain/repository/ent/guardian_create.go b/backend/domain/repository/ent/guardian_create.go index eb5ddea3..9f8cfec2 100644 --- a/backend/domain/repository/ent/guardian_create.go +++ b/backend/domain/repository/ent/guardian_create.go @@ -24,23 +24,21 @@ type GuardianCreate struct { hooks []Hook } -// SetName sets the "name" field. -func (gc *GuardianCreate) SetName(s string) *GuardianCreate { - gc.mutation.SetName(s) - return gc -} - // SetEmail sets the "email" field. func (gc *GuardianCreate) SetEmail(s string) *GuardianCreate { gc.mutation.SetEmail(s) return gc } -// SetNillableEmail sets the "email" field if the given value is not nil. -func (gc *GuardianCreate) SetNillableEmail(s *string) *GuardianCreate { - if s != nil { - gc.SetEmail(*s) - } +// SetEncryptedPassword sets the "encrypted_password" field. +func (gc *GuardianCreate) SetEncryptedPassword(s string) *GuardianCreate { + gc.mutation.SetEncryptedPassword(s) + return gc +} + +// SetName sets the "name" field. +func (gc *GuardianCreate) SetName(s string) *GuardianCreate { + gc.mutation.SetName(s) return gc } @@ -204,6 +202,12 @@ func (gc *GuardianCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (gc *GuardianCreate) check() error { + if _, ok := gc.mutation.Email(); !ok { + return &ValidationError{Name: "email", err: errors.New(`ent: missing required field "Guardian.email"`)} + } + if _, ok := gc.mutation.EncryptedPassword(); !ok { + return &ValidationError{Name: "encrypted_password", err: errors.New(`ent: missing required field "Guardian.encrypted_password"`)} + } if _, ok := gc.mutation.Name(); !ok { return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Guardian.name"`)} } @@ -248,14 +252,18 @@ func (gc *GuardianCreate) createSpec() (*Guardian, *sqlgraph.CreateSpec) { _node.ID = id _spec.ID.Value = &id } - if value, ok := gc.mutation.Name(); ok { - _spec.SetField(guardian.FieldName, field.TypeString, value) - _node.Name = value - } if value, ok := gc.mutation.Email(); ok { _spec.SetField(guardian.FieldEmail, field.TypeString, value) _node.Email = value } + if value, ok := gc.mutation.EncryptedPassword(); ok { + _spec.SetField(guardian.FieldEncryptedPassword, field.TypeString, value) + _node.EncryptedPassword = value + } + if value, ok := gc.mutation.Name(); ok { + _spec.SetField(guardian.FieldName, field.TypeString, value) + _node.Name = value + } if value, ok := gc.mutation.Phone(); ok { _spec.SetField(guardian.FieldPhone, field.TypeString, value) _node.Phone = value diff --git a/backend/domain/repository/ent/guardian_query.go b/backend/domain/repository/ent/guardian_query.go index 0c9283a9..2993b517 100644 --- a/backend/domain/repository/ent/guardian_query.go +++ b/backend/domain/repository/ent/guardian_query.go @@ -372,12 +372,12 @@ func (gq *GuardianQuery) WithStation(opts ...func(*StationQuery)) *GuardianQuery // Example: // // var v []struct { -// Name string `json:"name,omitempty"` +// Email string `json:"email,omitempty"` // Count int `json:"count,omitempty"` // } // // client.Guardian.Query(). -// GroupBy(guardian.FieldName). +// GroupBy(guardian.FieldEmail). // Aggregate(ent.Count()). // Scan(ctx, &v) func (gq *GuardianQuery) GroupBy(field string, fields ...string) *GuardianGroupBy { @@ -395,11 +395,11 @@ func (gq *GuardianQuery) GroupBy(field string, fields ...string) *GuardianGroupB // Example: // // var v []struct { -// Name string `json:"name,omitempty"` +// Email string `json:"email,omitempty"` // } // // client.Guardian.Query(). -// Select(guardian.FieldName). +// Select(guardian.FieldEmail). // Scan(ctx, &v) func (gq *GuardianQuery) Select(fields ...string) *GuardianSelect { gq.ctx.Fields = append(gq.ctx.Fields, fields...) diff --git a/backend/domain/repository/ent/guardian_update.go b/backend/domain/repository/ent/guardian_update.go index acd453d4..1db43b5d 100644 --- a/backend/domain/repository/ent/guardian_update.go +++ b/backend/domain/repository/ent/guardian_update.go @@ -32,37 +32,45 @@ func (gu *GuardianUpdate) Where(ps ...predicate.Guardian) *GuardianUpdate { return gu } -// SetName sets the "name" field. -func (gu *GuardianUpdate) SetName(s string) *GuardianUpdate { - gu.mutation.SetName(s) +// SetEmail sets the "email" field. +func (gu *GuardianUpdate) SetEmail(s string) *GuardianUpdate { + gu.mutation.SetEmail(s) return gu } -// SetNillableName sets the "name" field if the given value is not nil. -func (gu *GuardianUpdate) SetNillableName(s *string) *GuardianUpdate { +// SetNillableEmail sets the "email" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillableEmail(s *string) *GuardianUpdate { if s != nil { - gu.SetName(*s) + gu.SetEmail(*s) } return gu } -// SetEmail sets the "email" field. -func (gu *GuardianUpdate) SetEmail(s string) *GuardianUpdate { - gu.mutation.SetEmail(s) +// SetEncryptedPassword sets the "encrypted_password" field. +func (gu *GuardianUpdate) SetEncryptedPassword(s string) *GuardianUpdate { + gu.mutation.SetEncryptedPassword(s) return gu } -// SetNillableEmail sets the "email" field if the given value is not nil. -func (gu *GuardianUpdate) SetNillableEmail(s *string) *GuardianUpdate { +// SetNillableEncryptedPassword sets the "encrypted_password" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillableEncryptedPassword(s *string) *GuardianUpdate { if s != nil { - gu.SetEmail(*s) + gu.SetEncryptedPassword(*s) } return gu } -// ClearEmail clears the value of the "email" field. -func (gu *GuardianUpdate) ClearEmail() *GuardianUpdate { - gu.mutation.ClearEmail() +// SetName sets the "name" field. +func (gu *GuardianUpdate) SetName(s string) *GuardianUpdate { + gu.mutation.SetName(s) + return gu +} + +// SetNillableName sets the "name" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillableName(s *string) *GuardianUpdate { + if s != nil { + gu.SetName(*s) + } return gu } @@ -242,14 +250,14 @@ func (gu *GuardianUpdate) sqlSave(ctx context.Context) (n int, err error) { } } } - if value, ok := gu.mutation.Name(); ok { - _spec.SetField(guardian.FieldName, field.TypeString, value) - } if value, ok := gu.mutation.Email(); ok { _spec.SetField(guardian.FieldEmail, field.TypeString, value) } - if gu.mutation.EmailCleared() { - _spec.ClearField(guardian.FieldEmail, field.TypeString) + if value, ok := gu.mutation.EncryptedPassword(); ok { + _spec.SetField(guardian.FieldEncryptedPassword, field.TypeString, value) + } + if value, ok := gu.mutation.Name(); ok { + _spec.SetField(guardian.FieldName, field.TypeString, value) } if value, ok := gu.mutation.Phone(); ok { _spec.SetField(guardian.FieldPhone, field.TypeString, value) @@ -386,37 +394,45 @@ type GuardianUpdateOne struct { mutation *GuardianMutation } -// SetName sets the "name" field. -func (guo *GuardianUpdateOne) SetName(s string) *GuardianUpdateOne { - guo.mutation.SetName(s) +// SetEmail sets the "email" field. +func (guo *GuardianUpdateOne) SetEmail(s string) *GuardianUpdateOne { + guo.mutation.SetEmail(s) return guo } -// SetNillableName sets the "name" field if the given value is not nil. -func (guo *GuardianUpdateOne) SetNillableName(s *string) *GuardianUpdateOne { +// SetNillableEmail sets the "email" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableEmail(s *string) *GuardianUpdateOne { if s != nil { - guo.SetName(*s) + guo.SetEmail(*s) } return guo } -// SetEmail sets the "email" field. -func (guo *GuardianUpdateOne) SetEmail(s string) *GuardianUpdateOne { - guo.mutation.SetEmail(s) +// SetEncryptedPassword sets the "encrypted_password" field. +func (guo *GuardianUpdateOne) SetEncryptedPassword(s string) *GuardianUpdateOne { + guo.mutation.SetEncryptedPassword(s) return guo } -// SetNillableEmail sets the "email" field if the given value is not nil. -func (guo *GuardianUpdateOne) SetNillableEmail(s *string) *GuardianUpdateOne { +// SetNillableEncryptedPassword sets the "encrypted_password" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableEncryptedPassword(s *string) *GuardianUpdateOne { if s != nil { - guo.SetEmail(*s) + guo.SetEncryptedPassword(*s) } return guo } -// ClearEmail clears the value of the "email" field. -func (guo *GuardianUpdateOne) ClearEmail() *GuardianUpdateOne { - guo.mutation.ClearEmail() +// SetName sets the "name" field. +func (guo *GuardianUpdateOne) SetName(s string) *GuardianUpdateOne { + guo.mutation.SetName(s) + return guo +} + +// SetNillableName sets the "name" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableName(s *string) *GuardianUpdateOne { + if s != nil { + guo.SetName(*s) + } return guo } @@ -626,14 +642,14 @@ func (guo *GuardianUpdateOne) sqlSave(ctx context.Context) (_node *Guardian, err } } } - if value, ok := guo.mutation.Name(); ok { - _spec.SetField(guardian.FieldName, field.TypeString, value) - } if value, ok := guo.mutation.Email(); ok { _spec.SetField(guardian.FieldEmail, field.TypeString, value) } - if guo.mutation.EmailCleared() { - _spec.ClearField(guardian.FieldEmail, field.TypeString) + if value, ok := guo.mutation.EncryptedPassword(); ok { + _spec.SetField(guardian.FieldEncryptedPassword, field.TypeString, value) + } + if value, ok := guo.mutation.Name(); ok { + _spec.SetField(guardian.FieldName, field.TypeString, value) } if value, ok := guo.mutation.Phone(); ok { _spec.SetField(guardian.FieldPhone, field.TypeString, value) diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index f83cddf4..d7b0b2b0 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -154,8 +154,9 @@ var ( // GuardiansColumns holds the columns for the "guardians" table. GuardiansColumns = []*schema.Column{ {Name: "id", Type: field.TypeUUID, Unique: true}, + {Name: "email", Type: field.TypeString}, + {Name: "encrypted_password", Type: field.TypeString}, {Name: "name", Type: field.TypeString}, - {Name: "email", Type: field.TypeString, Nullable: true}, {Name: "phone", Type: field.TypeString, Nullable: true}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, @@ -169,7 +170,7 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "guardians_nurseries_nursery", - Columns: []*schema.Column{GuardiansColumns[6]}, + Columns: []*schema.Column{GuardiansColumns[7]}, RefColumns: []*schema.Column{NurseriesColumns[0]}, OnDelete: schema.SetNull, }, @@ -179,10 +180,11 @@ var ( NurseriesColumns = []*schema.Column{ {Name: "id", Type: field.TypeUUID, Unique: true}, {Name: "nursery_code", Type: field.TypeString, Unique: true}, + {Name: "email", Type: field.TypeString}, + {Name: "encrypted_password", Type: field.TypeString}, {Name: "name", Type: field.TypeString}, - {Name: "address", Type: field.TypeString}, + {Name: "address", Type: field.TypeString, Nullable: true}, {Name: "phone_number", Type: field.TypeString, Nullable: true}, - {Name: "email", Type: field.TypeString, Nullable: true}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, } diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index 45e5afd1..27e7f4bc 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -4150,25 +4150,26 @@ func (m *ChildPhotoMutation) ResetEdge(name string) error { // GuardianMutation represents an operation that mutates the Guardian nodes in the graph. type GuardianMutation struct { config - op Op - typ string - id *uuid.UUID - name *string - email *string - phone *string - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - children map[uuid.UUID]struct{} - removedchildren map[uuid.UUID]struct{} - clearedchildren bool - nursery *uuid.UUID - clearednursery bool - station *uuid.UUID - clearedstation bool - done bool - oldValue func(context.Context) (*Guardian, error) - predicates []predicate.Guardian + op Op + typ string + id *uuid.UUID + email *string + encrypted_password *string + name *string + phone *string + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + children map[uuid.UUID]struct{} + removedchildren map[uuid.UUID]struct{} + clearedchildren bool + nursery *uuid.UUID + clearednursery bool + station *uuid.UUID + clearedstation bool + done bool + oldValue func(context.Context) (*Guardian, error) + predicates []predicate.Guardian } var _ ent.Mutation = (*GuardianMutation)(nil) @@ -4275,89 +4276,112 @@ func (m *GuardianMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { } } -// SetName sets the "name" field. -func (m *GuardianMutation) SetName(s string) { - m.name = &s +// SetEmail sets the "email" field. +func (m *GuardianMutation) SetEmail(s string) { + m.email = &s } -// Name returns the value of the "name" field in the mutation. -func (m *GuardianMutation) Name() (r string, exists bool) { - v := m.name +// Email returns the value of the "email" field in the mutation. +func (m *GuardianMutation) Email() (r string, exists bool) { + v := m.email if v == nil { return } return *v, true } -// OldName returns the old "name" field's value of the Guardian entity. +// OldEmail returns the old "email" field's value of the Guardian entity. // If the Guardian object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *GuardianMutation) OldName(ctx context.Context) (v string, err error) { +func (m *GuardianMutation) OldEmail(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldName is only allowed on UpdateOne operations") + return v, errors.New("OldEmail is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, errors.New("OldName requires an ID field in the mutation") + return v, errors.New("OldEmail requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { - return v, fmt.Errorf("querying old value for OldName: %w", err) + return v, fmt.Errorf("querying old value for OldEmail: %w", err) } - return oldValue.Name, nil + return oldValue.Email, nil } -// ResetName resets all changes to the "name" field. -func (m *GuardianMutation) ResetName() { - m.name = nil +// ResetEmail resets all changes to the "email" field. +func (m *GuardianMutation) ResetEmail() { + m.email = nil } -// SetEmail sets the "email" field. -func (m *GuardianMutation) SetEmail(s string) { - m.email = &s +// SetEncryptedPassword sets the "encrypted_password" field. +func (m *GuardianMutation) SetEncryptedPassword(s string) { + m.encrypted_password = &s } -// Email returns the value of the "email" field in the mutation. -func (m *GuardianMutation) Email() (r string, exists bool) { - v := m.email +// EncryptedPassword returns the value of the "encrypted_password" field in the mutation. +func (m *GuardianMutation) EncryptedPassword() (r string, exists bool) { + v := m.encrypted_password if v == nil { return } return *v, true } -// OldEmail returns the old "email" field's value of the Guardian entity. +// OldEncryptedPassword returns the old "encrypted_password" field's value of the Guardian entity. // If the Guardian object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *GuardianMutation) OldEmail(ctx context.Context) (v string, err error) { +func (m *GuardianMutation) OldEncryptedPassword(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldEmail is only allowed on UpdateOne operations") + return v, errors.New("OldEncryptedPassword is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, errors.New("OldEmail requires an ID field in the mutation") + return v, errors.New("OldEncryptedPassword requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { - return v, fmt.Errorf("querying old value for OldEmail: %w", err) + return v, fmt.Errorf("querying old value for OldEncryptedPassword: %w", err) } - return oldValue.Email, nil + return oldValue.EncryptedPassword, nil } -// ClearEmail clears the value of the "email" field. -func (m *GuardianMutation) ClearEmail() { - m.email = nil - m.clearedFields[guardian.FieldEmail] = struct{}{} +// ResetEncryptedPassword resets all changes to the "encrypted_password" field. +func (m *GuardianMutation) ResetEncryptedPassword() { + m.encrypted_password = nil } -// EmailCleared returns if the "email" field was cleared in this mutation. -func (m *GuardianMutation) EmailCleared() bool { - _, ok := m.clearedFields[guardian.FieldEmail] - return ok +// SetName sets the "name" field. +func (m *GuardianMutation) SetName(s string) { + m.name = &s } -// ResetEmail resets all changes to the "email" field. -func (m *GuardianMutation) ResetEmail() { - m.email = nil - delete(m.clearedFields, guardian.FieldEmail) +// Name returns the value of the "name" field in the mutation. +func (m *GuardianMutation) Name() (r string, exists bool) { + v := m.name + if v == nil { + return + } + return *v, true +} + +// OldName returns the old "name" field's value of the Guardian entity. +// If the Guardian object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *GuardianMutation) OldName(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldName is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldName requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldName: %w", err) + } + return oldValue.Name, nil +} + +// ResetName resets all changes to the "name" field. +func (m *GuardianMutation) ResetName() { + m.name = nil } // SetPhone sets the "phone" field. @@ -4647,13 +4671,16 @@ func (m *GuardianMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *GuardianMutation) Fields() []string { - fields := make([]string, 0, 5) - if m.name != nil { - fields = append(fields, guardian.FieldName) - } + fields := make([]string, 0, 6) if m.email != nil { fields = append(fields, guardian.FieldEmail) } + if m.encrypted_password != nil { + fields = append(fields, guardian.FieldEncryptedPassword) + } + if m.name != nil { + fields = append(fields, guardian.FieldName) + } if m.phone != nil { fields = append(fields, guardian.FieldPhone) } @@ -4671,10 +4698,12 @@ func (m *GuardianMutation) Fields() []string { // schema. func (m *GuardianMutation) Field(name string) (ent.Value, bool) { switch name { - case guardian.FieldName: - return m.Name() case guardian.FieldEmail: return m.Email() + case guardian.FieldEncryptedPassword: + return m.EncryptedPassword() + case guardian.FieldName: + return m.Name() case guardian.FieldPhone: return m.Phone() case guardian.FieldCreatedAt: @@ -4690,10 +4719,12 @@ func (m *GuardianMutation) Field(name string) (ent.Value, bool) { // database failed. func (m *GuardianMutation) OldField(ctx context.Context, name string) (ent.Value, error) { switch name { - case guardian.FieldName: - return m.OldName(ctx) case guardian.FieldEmail: return m.OldEmail(ctx) + case guardian.FieldEncryptedPassword: + return m.OldEncryptedPassword(ctx) + case guardian.FieldName: + return m.OldName(ctx) case guardian.FieldPhone: return m.OldPhone(ctx) case guardian.FieldCreatedAt: @@ -4709,19 +4740,26 @@ func (m *GuardianMutation) OldField(ctx context.Context, name string) (ent.Value // type. func (m *GuardianMutation) SetField(name string, value ent.Value) error { switch name { - case guardian.FieldName: + case guardian.FieldEmail: v, ok := value.(string) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetName(v) + m.SetEmail(v) return nil - case guardian.FieldEmail: + case guardian.FieldEncryptedPassword: v, ok := value.(string) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetEmail(v) + m.SetEncryptedPassword(v) + return nil + case guardian.FieldName: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetName(v) return nil case guardian.FieldPhone: v, ok := value.(string) @@ -4774,9 +4812,6 @@ func (m *GuardianMutation) AddField(name string, value ent.Value) error { // mutation. func (m *GuardianMutation) ClearedFields() []string { var fields []string - if m.FieldCleared(guardian.FieldEmail) { - fields = append(fields, guardian.FieldEmail) - } if m.FieldCleared(guardian.FieldPhone) { fields = append(fields, guardian.FieldPhone) } @@ -4794,9 +4829,6 @@ func (m *GuardianMutation) FieldCleared(name string) bool { // error if the field is not defined in the schema. func (m *GuardianMutation) ClearField(name string) error { switch name { - case guardian.FieldEmail: - m.ClearEmail() - return nil case guardian.FieldPhone: m.ClearPhone() return nil @@ -4808,12 +4840,15 @@ func (m *GuardianMutation) ClearField(name string) error { // It returns an error if the field is not defined in the schema. func (m *GuardianMutation) ResetField(name string) error { switch name { - case guardian.FieldName: - m.ResetName() - return nil case guardian.FieldEmail: m.ResetEmail() return nil + case guardian.FieldEncryptedPassword: + m.ResetEncryptedPassword() + return nil + case guardian.FieldName: + m.ResetName() + return nil case guardian.FieldPhone: m.ResetPhone() return nil @@ -4950,29 +4985,30 @@ func (m *GuardianMutation) ResetEdge(name string) error { // NurseryMutation represents an operation that mutates the Nursery nodes in the graph. type NurseryMutation struct { config - op Op - typ string - id *uuid.UUID - nursery_code *string - name *string - address *string - phone_number *string - email *string - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - children map[uuid.UUID]struct{} - removedchildren map[uuid.UUID]struct{} - clearedchildren bool - guardians map[uuid.UUID]struct{} - removedguardians map[uuid.UUID]struct{} - clearedguardians bool - buses map[uuid.UUID]struct{} - removedbuses map[uuid.UUID]struct{} - clearedbuses bool - done bool - oldValue func(context.Context) (*Nursery, error) - predicates []predicate.Nursery + op Op + typ string + id *uuid.UUID + nursery_code *string + email *string + encrypted_password *string + name *string + address *string + phone_number *string + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + children map[uuid.UUID]struct{} + removedchildren map[uuid.UUID]struct{} + clearedchildren bool + guardians map[uuid.UUID]struct{} + removedguardians map[uuid.UUID]struct{} + clearedguardians bool + buses map[uuid.UUID]struct{} + removedbuses map[uuid.UUID]struct{} + clearedbuses bool + done bool + oldValue func(context.Context) (*Nursery, error) + predicates []predicate.Nursery } var _ ent.Mutation = (*NurseryMutation)(nil) @@ -5115,6 +5151,78 @@ func (m *NurseryMutation) ResetNurseryCode() { m.nursery_code = nil } +// SetEmail sets the "email" field. +func (m *NurseryMutation) SetEmail(s string) { + m.email = &s +} + +// Email returns the value of the "email" field in the mutation. +func (m *NurseryMutation) Email() (r string, exists bool) { + v := m.email + if v == nil { + return + } + return *v, true +} + +// OldEmail returns the old "email" field's value of the Nursery entity. +// If the Nursery object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *NurseryMutation) OldEmail(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldEmail is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldEmail requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldEmail: %w", err) + } + return oldValue.Email, nil +} + +// ResetEmail resets all changes to the "email" field. +func (m *NurseryMutation) ResetEmail() { + m.email = nil +} + +// SetEncryptedPassword sets the "encrypted_password" field. +func (m *NurseryMutation) SetEncryptedPassword(s string) { + m.encrypted_password = &s +} + +// EncryptedPassword returns the value of the "encrypted_password" field in the mutation. +func (m *NurseryMutation) EncryptedPassword() (r string, exists bool) { + v := m.encrypted_password + if v == nil { + return + } + return *v, true +} + +// OldEncryptedPassword returns the old "encrypted_password" field's value of the Nursery entity. +// If the Nursery object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *NurseryMutation) OldEncryptedPassword(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldEncryptedPassword is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldEncryptedPassword requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldEncryptedPassword: %w", err) + } + return oldValue.EncryptedPassword, nil +} + +// ResetEncryptedPassword resets all changes to the "encrypted_password" field. +func (m *NurseryMutation) ResetEncryptedPassword() { + m.encrypted_password = nil +} + // SetName sets the "name" field. func (m *NurseryMutation) SetName(s string) { m.name = &s @@ -5182,9 +5290,22 @@ func (m *NurseryMutation) OldAddress(ctx context.Context) (v string, err error) return oldValue.Address, nil } +// ClearAddress clears the value of the "address" field. +func (m *NurseryMutation) ClearAddress() { + m.address = nil + m.clearedFields[nursery.FieldAddress] = struct{}{} +} + +// AddressCleared returns if the "address" field was cleared in this mutation. +func (m *NurseryMutation) AddressCleared() bool { + _, ok := m.clearedFields[nursery.FieldAddress] + return ok +} + // ResetAddress resets all changes to the "address" field. func (m *NurseryMutation) ResetAddress() { m.address = nil + delete(m.clearedFields, nursery.FieldAddress) } // SetPhoneNumber sets the "phone_number" field. @@ -5236,55 +5357,6 @@ func (m *NurseryMutation) ResetPhoneNumber() { delete(m.clearedFields, nursery.FieldPhoneNumber) } -// SetEmail sets the "email" field. -func (m *NurseryMutation) SetEmail(s string) { - m.email = &s -} - -// Email returns the value of the "email" field in the mutation. -func (m *NurseryMutation) Email() (r string, exists bool) { - v := m.email - if v == nil { - return - } - return *v, true -} - -// OldEmail returns the old "email" field's value of the Nursery entity. -// If the Nursery object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *NurseryMutation) OldEmail(ctx context.Context) (v string, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldEmail is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldEmail requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldEmail: %w", err) - } - return oldValue.Email, nil -} - -// ClearEmail clears the value of the "email" field. -func (m *NurseryMutation) ClearEmail() { - m.email = nil - m.clearedFields[nursery.FieldEmail] = struct{}{} -} - -// EmailCleared returns if the "email" field was cleared in this mutation. -func (m *NurseryMutation) EmailCleared() bool { - _, ok := m.clearedFields[nursery.FieldEmail] - return ok -} - -// ResetEmail resets all changes to the "email" field. -func (m *NurseryMutation) ResetEmail() { - m.email = nil - delete(m.clearedFields, nursery.FieldEmail) -} - // SetCreatedAt sets the "created_at" field. func (m *NurseryMutation) SetCreatedAt(t time.Time) { m.created_at = &t @@ -5553,10 +5625,16 @@ func (m *NurseryMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *NurseryMutation) Fields() []string { - fields := make([]string, 0, 7) + fields := make([]string, 0, 8) if m.nursery_code != nil { fields = append(fields, nursery.FieldNurseryCode) } + if m.email != nil { + fields = append(fields, nursery.FieldEmail) + } + if m.encrypted_password != nil { + fields = append(fields, nursery.FieldEncryptedPassword) + } if m.name != nil { fields = append(fields, nursery.FieldName) } @@ -5566,9 +5644,6 @@ func (m *NurseryMutation) Fields() []string { if m.phone_number != nil { fields = append(fields, nursery.FieldPhoneNumber) } - if m.email != nil { - fields = append(fields, nursery.FieldEmail) - } if m.created_at != nil { fields = append(fields, nursery.FieldCreatedAt) } @@ -5585,14 +5660,16 @@ func (m *NurseryMutation) Field(name string) (ent.Value, bool) { switch name { case nursery.FieldNurseryCode: return m.NurseryCode() + case nursery.FieldEmail: + return m.Email() + case nursery.FieldEncryptedPassword: + return m.EncryptedPassword() case nursery.FieldName: return m.Name() case nursery.FieldAddress: return m.Address() case nursery.FieldPhoneNumber: return m.PhoneNumber() - case nursery.FieldEmail: - return m.Email() case nursery.FieldCreatedAt: return m.CreatedAt() case nursery.FieldUpdatedAt: @@ -5608,14 +5685,16 @@ func (m *NurseryMutation) OldField(ctx context.Context, name string) (ent.Value, switch name { case nursery.FieldNurseryCode: return m.OldNurseryCode(ctx) + case nursery.FieldEmail: + return m.OldEmail(ctx) + case nursery.FieldEncryptedPassword: + return m.OldEncryptedPassword(ctx) case nursery.FieldName: return m.OldName(ctx) case nursery.FieldAddress: return m.OldAddress(ctx) case nursery.FieldPhoneNumber: return m.OldPhoneNumber(ctx) - case nursery.FieldEmail: - return m.OldEmail(ctx) case nursery.FieldCreatedAt: return m.OldCreatedAt(ctx) case nursery.FieldUpdatedAt: @@ -5636,6 +5715,20 @@ func (m *NurseryMutation) SetField(name string, value ent.Value) error { } m.SetNurseryCode(v) return nil + case nursery.FieldEmail: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetEmail(v) + return nil + case nursery.FieldEncryptedPassword: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetEncryptedPassword(v) + return nil case nursery.FieldName: v, ok := value.(string) if !ok { @@ -5657,13 +5750,6 @@ func (m *NurseryMutation) SetField(name string, value ent.Value) error { } m.SetPhoneNumber(v) return nil - case nursery.FieldEmail: - v, ok := value.(string) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetEmail(v) - return nil case nursery.FieldCreatedAt: v, ok := value.(time.Time) if !ok { @@ -5708,12 +5794,12 @@ func (m *NurseryMutation) AddField(name string, value ent.Value) error { // mutation. func (m *NurseryMutation) ClearedFields() []string { var fields []string + if m.FieldCleared(nursery.FieldAddress) { + fields = append(fields, nursery.FieldAddress) + } if m.FieldCleared(nursery.FieldPhoneNumber) { fields = append(fields, nursery.FieldPhoneNumber) } - if m.FieldCleared(nursery.FieldEmail) { - fields = append(fields, nursery.FieldEmail) - } return fields } @@ -5728,12 +5814,12 @@ func (m *NurseryMutation) FieldCleared(name string) bool { // error if the field is not defined in the schema. func (m *NurseryMutation) ClearField(name string) error { switch name { + case nursery.FieldAddress: + m.ClearAddress() + return nil case nursery.FieldPhoneNumber: m.ClearPhoneNumber() return nil - case nursery.FieldEmail: - m.ClearEmail() - return nil } return fmt.Errorf("unknown Nursery nullable field %s", name) } @@ -5745,6 +5831,12 @@ func (m *NurseryMutation) ResetField(name string) error { case nursery.FieldNurseryCode: m.ResetNurseryCode() return nil + case nursery.FieldEmail: + m.ResetEmail() + return nil + case nursery.FieldEncryptedPassword: + m.ResetEncryptedPassword() + return nil case nursery.FieldName: m.ResetName() return nil @@ -5754,9 +5846,6 @@ func (m *NurseryMutation) ResetField(name string) error { case nursery.FieldPhoneNumber: m.ResetPhoneNumber() return nil - case nursery.FieldEmail: - m.ResetEmail() - return nil case nursery.FieldCreatedAt: m.ResetCreatedAt() return nil diff --git a/backend/domain/repository/ent/nursery.go b/backend/domain/repository/ent/nursery.go index 96ea607d..f3435131 100644 --- a/backend/domain/repository/ent/nursery.go +++ b/backend/domain/repository/ent/nursery.go @@ -20,14 +20,16 @@ type Nursery struct { ID uuid.UUID `json:"id,omitempty"` // ユニークな数字(文字列)のコード NurseryCode string `json:"nursery_code,omitempty"` + // Email holds the value of the "email" field. + Email string `json:"email,omitempty"` + // EncryptedPassword holds the value of the "encrypted_password" field. + EncryptedPassword string `json:"encrypted_password,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Address holds the value of the "address" field. Address string `json:"address,omitempty"` // PhoneNumber holds the value of the "phone_number" field. PhoneNumber string `json:"phone_number,omitempty"` - // Email holds the value of the "email" field. - Email string `json:"email,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. @@ -83,7 +85,7 @@ func (*Nursery) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { - case nursery.FieldNurseryCode, nursery.FieldName, nursery.FieldAddress, nursery.FieldPhoneNumber, nursery.FieldEmail: + case nursery.FieldNurseryCode, nursery.FieldEmail, nursery.FieldEncryptedPassword, nursery.FieldName, nursery.FieldAddress, nursery.FieldPhoneNumber: values[i] = new(sql.NullString) case nursery.FieldCreatedAt, nursery.FieldUpdatedAt: values[i] = new(sql.NullTime) @@ -116,6 +118,18 @@ func (n *Nursery) assignValues(columns []string, values []any) error { } else if value.Valid { n.NurseryCode = value.String } + case nursery.FieldEmail: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field email", values[i]) + } else if value.Valid { + n.Email = value.String + } + case nursery.FieldEncryptedPassword: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field encrypted_password", values[i]) + } else if value.Valid { + n.EncryptedPassword = value.String + } case nursery.FieldName: if value, ok := values[i].(*sql.NullString); !ok { return fmt.Errorf("unexpected type %T for field name", values[i]) @@ -134,12 +148,6 @@ func (n *Nursery) assignValues(columns []string, values []any) error { } else if value.Valid { n.PhoneNumber = value.String } - case nursery.FieldEmail: - if value, ok := values[i].(*sql.NullString); !ok { - return fmt.Errorf("unexpected type %T for field email", values[i]) - } else if value.Valid { - n.Email = value.String - } case nursery.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { return fmt.Errorf("unexpected type %T for field created_at", values[i]) @@ -206,6 +214,12 @@ func (n *Nursery) String() string { builder.WriteString("nursery_code=") builder.WriteString(n.NurseryCode) builder.WriteString(", ") + builder.WriteString("email=") + builder.WriteString(n.Email) + builder.WriteString(", ") + builder.WriteString("encrypted_password=") + builder.WriteString(n.EncryptedPassword) + builder.WriteString(", ") builder.WriteString("name=") builder.WriteString(n.Name) builder.WriteString(", ") @@ -215,9 +229,6 @@ func (n *Nursery) String() string { builder.WriteString("phone_number=") builder.WriteString(n.PhoneNumber) builder.WriteString(", ") - builder.WriteString("email=") - builder.WriteString(n.Email) - builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(n.CreatedAt.Format(time.ANSIC)) builder.WriteString(", ") diff --git a/backend/domain/repository/ent/nursery/nursery.go b/backend/domain/repository/ent/nursery/nursery.go index 08173380..f00a402a 100644 --- a/backend/domain/repository/ent/nursery/nursery.go +++ b/backend/domain/repository/ent/nursery/nursery.go @@ -17,14 +17,16 @@ const ( FieldID = "id" // FieldNurseryCode holds the string denoting the nursery_code field in the database. FieldNurseryCode = "nursery_code" + // FieldEmail holds the string denoting the email field in the database. + FieldEmail = "email" + // FieldEncryptedPassword holds the string denoting the encrypted_password field in the database. + FieldEncryptedPassword = "encrypted_password" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldAddress holds the string denoting the address field in the database. FieldAddress = "address" // FieldPhoneNumber holds the string denoting the phone_number field in the database. FieldPhoneNumber = "phone_number" - // FieldEmail holds the string denoting the email field in the database. - FieldEmail = "email" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -64,10 +66,11 @@ const ( var Columns = []string{ FieldID, FieldNurseryCode, + FieldEmail, + FieldEncryptedPassword, FieldName, FieldAddress, FieldPhoneNumber, - FieldEmail, FieldCreatedAt, FieldUpdatedAt, } @@ -108,6 +111,16 @@ func ByNurseryCode(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNurseryCode, opts...).ToFunc() } +// ByEmail orders the results by the email field. +func ByEmail(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEmail, opts...).ToFunc() +} + +// ByEncryptedPassword orders the results by the encrypted_password field. +func ByEncryptedPassword(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEncryptedPassword, opts...).ToFunc() +} + // ByName orders the results by the name field. func ByName(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldName, opts...).ToFunc() @@ -123,11 +136,6 @@ func ByPhoneNumber(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPhoneNumber, opts...).ToFunc() } -// ByEmail orders the results by the email field. -func ByEmail(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldEmail, opts...).ToFunc() -} - // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() diff --git a/backend/domain/repository/ent/nursery/where.go b/backend/domain/repository/ent/nursery/where.go index 0a8cbb71..2760acf4 100644 --- a/backend/domain/repository/ent/nursery/where.go +++ b/backend/domain/repository/ent/nursery/where.go @@ -61,6 +61,16 @@ func NurseryCode(v string) predicate.Nursery { return predicate.Nursery(sql.FieldEQ(FieldNurseryCode, v)) } +// Email applies equality check predicate on the "email" field. It's identical to EmailEQ. +func Email(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldEmail, v)) +} + +// EncryptedPassword applies equality check predicate on the "encrypted_password" field. It's identical to EncryptedPasswordEQ. +func EncryptedPassword(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldEncryptedPassword, v)) +} + // Name applies equality check predicate on the "name" field. It's identical to NameEQ. func Name(v string) predicate.Nursery { return predicate.Nursery(sql.FieldEQ(FieldName, v)) @@ -76,11 +86,6 @@ func PhoneNumber(v string) predicate.Nursery { return predicate.Nursery(sql.FieldEQ(FieldPhoneNumber, v)) } -// Email applies equality check predicate on the "email" field. It's identical to EmailEQ. -func Email(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldEQ(FieldEmail, v)) -} - // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. func CreatedAt(v time.Time) predicate.Nursery { return predicate.Nursery(sql.FieldEQ(FieldCreatedAt, v)) @@ -156,6 +161,136 @@ func NurseryCodeContainsFold(v string) predicate.Nursery { return predicate.Nursery(sql.FieldContainsFold(FieldNurseryCode, v)) } +// EmailEQ applies the EQ predicate on the "email" field. +func EmailEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldEmail, v)) +} + +// EmailNEQ applies the NEQ predicate on the "email" field. +func EmailNEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldEmail, v)) +} + +// EmailIn applies the In predicate on the "email" field. +func EmailIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldEmail, vs...)) +} + +// EmailNotIn applies the NotIn predicate on the "email" field. +func EmailNotIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldEmail, vs...)) +} + +// EmailGT applies the GT predicate on the "email" field. +func EmailGT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldEmail, v)) +} + +// EmailGTE applies the GTE predicate on the "email" field. +func EmailGTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldEmail, v)) +} + +// EmailLT applies the LT predicate on the "email" field. +func EmailLT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldEmail, v)) +} + +// EmailLTE applies the LTE predicate on the "email" field. +func EmailLTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldEmail, v)) +} + +// EmailContains applies the Contains predicate on the "email" field. +func EmailContains(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContains(FieldEmail, v)) +} + +// EmailHasPrefix applies the HasPrefix predicate on the "email" field. +func EmailHasPrefix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasPrefix(FieldEmail, v)) +} + +// EmailHasSuffix applies the HasSuffix predicate on the "email" field. +func EmailHasSuffix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasSuffix(FieldEmail, v)) +} + +// EmailEqualFold applies the EqualFold predicate on the "email" field. +func EmailEqualFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEqualFold(FieldEmail, v)) +} + +// EmailContainsFold applies the ContainsFold predicate on the "email" field. +func EmailContainsFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContainsFold(FieldEmail, v)) +} + +// EncryptedPasswordEQ applies the EQ predicate on the "encrypted_password" field. +func EncryptedPasswordEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordNEQ applies the NEQ predicate on the "encrypted_password" field. +func EncryptedPasswordNEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordIn applies the In predicate on the "encrypted_password" field. +func EncryptedPasswordIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldEncryptedPassword, vs...)) +} + +// EncryptedPasswordNotIn applies the NotIn predicate on the "encrypted_password" field. +func EncryptedPasswordNotIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldEncryptedPassword, vs...)) +} + +// EncryptedPasswordGT applies the GT predicate on the "encrypted_password" field. +func EncryptedPasswordGT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordGTE applies the GTE predicate on the "encrypted_password" field. +func EncryptedPasswordGTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordLT applies the LT predicate on the "encrypted_password" field. +func EncryptedPasswordLT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordLTE applies the LTE predicate on the "encrypted_password" field. +func EncryptedPasswordLTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordContains applies the Contains predicate on the "encrypted_password" field. +func EncryptedPasswordContains(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContains(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordHasPrefix applies the HasPrefix predicate on the "encrypted_password" field. +func EncryptedPasswordHasPrefix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasPrefix(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordHasSuffix applies the HasSuffix predicate on the "encrypted_password" field. +func EncryptedPasswordHasSuffix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasSuffix(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordEqualFold applies the EqualFold predicate on the "encrypted_password" field. +func EncryptedPasswordEqualFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEqualFold(FieldEncryptedPassword, v)) +} + +// EncryptedPasswordContainsFold applies the ContainsFold predicate on the "encrypted_password" field. +func EncryptedPasswordContainsFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContainsFold(FieldEncryptedPassword, v)) +} + // NameEQ applies the EQ predicate on the "name" field. func NameEQ(v string) predicate.Nursery { return predicate.Nursery(sql.FieldEQ(FieldName, v)) @@ -276,6 +411,16 @@ func AddressHasSuffix(v string) predicate.Nursery { return predicate.Nursery(sql.FieldHasSuffix(FieldAddress, v)) } +// AddressIsNil applies the IsNil predicate on the "address" field. +func AddressIsNil() predicate.Nursery { + return predicate.Nursery(sql.FieldIsNull(FieldAddress)) +} + +// AddressNotNil applies the NotNil predicate on the "address" field. +func AddressNotNil() predicate.Nursery { + return predicate.Nursery(sql.FieldNotNull(FieldAddress)) +} + // AddressEqualFold applies the EqualFold predicate on the "address" field. func AddressEqualFold(v string) predicate.Nursery { return predicate.Nursery(sql.FieldEqualFold(FieldAddress, v)) @@ -361,81 +506,6 @@ func PhoneNumberContainsFold(v string) predicate.Nursery { return predicate.Nursery(sql.FieldContainsFold(FieldPhoneNumber, v)) } -// EmailEQ applies the EQ predicate on the "email" field. -func EmailEQ(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldEQ(FieldEmail, v)) -} - -// EmailNEQ applies the NEQ predicate on the "email" field. -func EmailNEQ(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldNEQ(FieldEmail, v)) -} - -// EmailIn applies the In predicate on the "email" field. -func EmailIn(vs ...string) predicate.Nursery { - return predicate.Nursery(sql.FieldIn(FieldEmail, vs...)) -} - -// EmailNotIn applies the NotIn predicate on the "email" field. -func EmailNotIn(vs ...string) predicate.Nursery { - return predicate.Nursery(sql.FieldNotIn(FieldEmail, vs...)) -} - -// EmailGT applies the GT predicate on the "email" field. -func EmailGT(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldGT(FieldEmail, v)) -} - -// EmailGTE applies the GTE predicate on the "email" field. -func EmailGTE(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldGTE(FieldEmail, v)) -} - -// EmailLT applies the LT predicate on the "email" field. -func EmailLT(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldLT(FieldEmail, v)) -} - -// EmailLTE applies the LTE predicate on the "email" field. -func EmailLTE(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldLTE(FieldEmail, v)) -} - -// EmailContains applies the Contains predicate on the "email" field. -func EmailContains(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldContains(FieldEmail, v)) -} - -// EmailHasPrefix applies the HasPrefix predicate on the "email" field. -func EmailHasPrefix(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldHasPrefix(FieldEmail, v)) -} - -// EmailHasSuffix applies the HasSuffix predicate on the "email" field. -func EmailHasSuffix(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldHasSuffix(FieldEmail, v)) -} - -// EmailIsNil applies the IsNil predicate on the "email" field. -func EmailIsNil() predicate.Nursery { - return predicate.Nursery(sql.FieldIsNull(FieldEmail)) -} - -// EmailNotNil applies the NotNil predicate on the "email" field. -func EmailNotNil() predicate.Nursery { - return predicate.Nursery(sql.FieldNotNull(FieldEmail)) -} - -// EmailEqualFold applies the EqualFold predicate on the "email" field. -func EmailEqualFold(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldEqualFold(FieldEmail, v)) -} - -// EmailContainsFold applies the ContainsFold predicate on the "email" field. -func EmailContainsFold(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldContainsFold(FieldEmail, v)) -} - // CreatedAtEQ applies the EQ predicate on the "created_at" field. func CreatedAtEQ(v time.Time) predicate.Nursery { return predicate.Nursery(sql.FieldEQ(FieldCreatedAt, v)) diff --git a/backend/domain/repository/ent/nursery_create.go b/backend/domain/repository/ent/nursery_create.go index cc6c4d47..70e57e1c 100644 --- a/backend/domain/repository/ent/nursery_create.go +++ b/backend/domain/repository/ent/nursery_create.go @@ -38,6 +38,18 @@ func (nc *NurseryCreate) SetNillableNurseryCode(s *string) *NurseryCreate { return nc } +// SetEmail sets the "email" field. +func (nc *NurseryCreate) SetEmail(s string) *NurseryCreate { + nc.mutation.SetEmail(s) + return nc +} + +// SetEncryptedPassword sets the "encrypted_password" field. +func (nc *NurseryCreate) SetEncryptedPassword(s string) *NurseryCreate { + nc.mutation.SetEncryptedPassword(s) + return nc +} + // SetName sets the "name" field. func (nc *NurseryCreate) SetName(s string) *NurseryCreate { nc.mutation.SetName(s) @@ -50,6 +62,14 @@ func (nc *NurseryCreate) SetAddress(s string) *NurseryCreate { return nc } +// SetNillableAddress sets the "address" field if the given value is not nil. +func (nc *NurseryCreate) SetNillableAddress(s *string) *NurseryCreate { + if s != nil { + nc.SetAddress(*s) + } + return nc +} + // SetPhoneNumber sets the "phone_number" field. func (nc *NurseryCreate) SetPhoneNumber(s string) *NurseryCreate { nc.mutation.SetPhoneNumber(s) @@ -64,20 +84,6 @@ func (nc *NurseryCreate) SetNillablePhoneNumber(s *string) *NurseryCreate { return nc } -// SetEmail sets the "email" field. -func (nc *NurseryCreate) SetEmail(s string) *NurseryCreate { - nc.mutation.SetEmail(s) - return nc -} - -// SetNillableEmail sets the "email" field if the given value is not nil. -func (nc *NurseryCreate) SetNillableEmail(s *string) *NurseryCreate { - if s != nil { - nc.SetEmail(*s) - } - return nc -} - // SetCreatedAt sets the "created_at" field. func (nc *NurseryCreate) SetCreatedAt(t time.Time) *NurseryCreate { nc.mutation.SetCreatedAt(t) @@ -223,12 +229,15 @@ func (nc *NurseryCreate) check() error { if _, ok := nc.mutation.NurseryCode(); !ok { return &ValidationError{Name: "nursery_code", err: errors.New(`ent: missing required field "Nursery.nursery_code"`)} } + if _, ok := nc.mutation.Email(); !ok { + return &ValidationError{Name: "email", err: errors.New(`ent: missing required field "Nursery.email"`)} + } + if _, ok := nc.mutation.EncryptedPassword(); !ok { + return &ValidationError{Name: "encrypted_password", err: errors.New(`ent: missing required field "Nursery.encrypted_password"`)} + } if _, ok := nc.mutation.Name(); !ok { return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Nursery.name"`)} } - if _, ok := nc.mutation.Address(); !ok { - return &ValidationError{Name: "address", err: errors.New(`ent: missing required field "Nursery.address"`)} - } if _, ok := nc.mutation.CreatedAt(); !ok { return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Nursery.created_at"`)} } @@ -274,6 +283,14 @@ func (nc *NurseryCreate) createSpec() (*Nursery, *sqlgraph.CreateSpec) { _spec.SetField(nursery.FieldNurseryCode, field.TypeString, value) _node.NurseryCode = value } + if value, ok := nc.mutation.Email(); ok { + _spec.SetField(nursery.FieldEmail, field.TypeString, value) + _node.Email = value + } + if value, ok := nc.mutation.EncryptedPassword(); ok { + _spec.SetField(nursery.FieldEncryptedPassword, field.TypeString, value) + _node.EncryptedPassword = value + } if value, ok := nc.mutation.Name(); ok { _spec.SetField(nursery.FieldName, field.TypeString, value) _node.Name = value @@ -286,10 +303,6 @@ func (nc *NurseryCreate) createSpec() (*Nursery, *sqlgraph.CreateSpec) { _spec.SetField(nursery.FieldPhoneNumber, field.TypeString, value) _node.PhoneNumber = value } - if value, ok := nc.mutation.Email(); ok { - _spec.SetField(nursery.FieldEmail, field.TypeString, value) - _node.Email = value - } if value, ok := nc.mutation.CreatedAt(); ok { _spec.SetField(nursery.FieldCreatedAt, field.TypeTime, value) _node.CreatedAt = value diff --git a/backend/domain/repository/ent/nursery_update.go b/backend/domain/repository/ent/nursery_update.go index bab98a44..1a794203 100644 --- a/backend/domain/repository/ent/nursery_update.go +++ b/backend/domain/repository/ent/nursery_update.go @@ -46,6 +46,34 @@ func (nu *NurseryUpdate) SetNillableNurseryCode(s *string) *NurseryUpdate { return nu } +// SetEmail sets the "email" field. +func (nu *NurseryUpdate) SetEmail(s string) *NurseryUpdate { + nu.mutation.SetEmail(s) + return nu +} + +// SetNillableEmail sets the "email" field if the given value is not nil. +func (nu *NurseryUpdate) SetNillableEmail(s *string) *NurseryUpdate { + if s != nil { + nu.SetEmail(*s) + } + return nu +} + +// SetEncryptedPassword sets the "encrypted_password" field. +func (nu *NurseryUpdate) SetEncryptedPassword(s string) *NurseryUpdate { + nu.mutation.SetEncryptedPassword(s) + return nu +} + +// SetNillableEncryptedPassword sets the "encrypted_password" field if the given value is not nil. +func (nu *NurseryUpdate) SetNillableEncryptedPassword(s *string) *NurseryUpdate { + if s != nil { + nu.SetEncryptedPassword(*s) + } + return nu +} + // SetName sets the "name" field. func (nu *NurseryUpdate) SetName(s string) *NurseryUpdate { nu.mutation.SetName(s) @@ -74,6 +102,12 @@ func (nu *NurseryUpdate) SetNillableAddress(s *string) *NurseryUpdate { return nu } +// ClearAddress clears the value of the "address" field. +func (nu *NurseryUpdate) ClearAddress() *NurseryUpdate { + nu.mutation.ClearAddress() + return nu +} + // SetPhoneNumber sets the "phone_number" field. func (nu *NurseryUpdate) SetPhoneNumber(s string) *NurseryUpdate { nu.mutation.SetPhoneNumber(s) @@ -94,26 +128,6 @@ func (nu *NurseryUpdate) ClearPhoneNumber() *NurseryUpdate { return nu } -// SetEmail sets the "email" field. -func (nu *NurseryUpdate) SetEmail(s string) *NurseryUpdate { - nu.mutation.SetEmail(s) - return nu -} - -// SetNillableEmail sets the "email" field if the given value is not nil. -func (nu *NurseryUpdate) SetNillableEmail(s *string) *NurseryUpdate { - if s != nil { - nu.SetEmail(*s) - } - return nu -} - -// ClearEmail clears the value of the "email" field. -func (nu *NurseryUpdate) ClearEmail() *NurseryUpdate { - nu.mutation.ClearEmail() - return nu -} - // SetCreatedAt sets the "created_at" field. func (nu *NurseryUpdate) SetCreatedAt(t time.Time) *NurseryUpdate { nu.mutation.SetCreatedAt(t) @@ -295,24 +309,27 @@ func (nu *NurseryUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := nu.mutation.NurseryCode(); ok { _spec.SetField(nursery.FieldNurseryCode, field.TypeString, value) } + if value, ok := nu.mutation.Email(); ok { + _spec.SetField(nursery.FieldEmail, field.TypeString, value) + } + if value, ok := nu.mutation.EncryptedPassword(); ok { + _spec.SetField(nursery.FieldEncryptedPassword, field.TypeString, value) + } if value, ok := nu.mutation.Name(); ok { _spec.SetField(nursery.FieldName, field.TypeString, value) } if value, ok := nu.mutation.Address(); ok { _spec.SetField(nursery.FieldAddress, field.TypeString, value) } + if nu.mutation.AddressCleared() { + _spec.ClearField(nursery.FieldAddress, field.TypeString) + } if value, ok := nu.mutation.PhoneNumber(); ok { _spec.SetField(nursery.FieldPhoneNumber, field.TypeString, value) } if nu.mutation.PhoneNumberCleared() { _spec.ClearField(nursery.FieldPhoneNumber, field.TypeString) } - if value, ok := nu.mutation.Email(); ok { - _spec.SetField(nursery.FieldEmail, field.TypeString, value) - } - if nu.mutation.EmailCleared() { - _spec.ClearField(nursery.FieldEmail, field.TypeString) - } if value, ok := nu.mutation.CreatedAt(); ok { _spec.SetField(nursery.FieldCreatedAt, field.TypeTime, value) } @@ -488,6 +505,34 @@ func (nuo *NurseryUpdateOne) SetNillableNurseryCode(s *string) *NurseryUpdateOne return nuo } +// SetEmail sets the "email" field. +func (nuo *NurseryUpdateOne) SetEmail(s string) *NurseryUpdateOne { + nuo.mutation.SetEmail(s) + return nuo +} + +// SetNillableEmail sets the "email" field if the given value is not nil. +func (nuo *NurseryUpdateOne) SetNillableEmail(s *string) *NurseryUpdateOne { + if s != nil { + nuo.SetEmail(*s) + } + return nuo +} + +// SetEncryptedPassword sets the "encrypted_password" field. +func (nuo *NurseryUpdateOne) SetEncryptedPassword(s string) *NurseryUpdateOne { + nuo.mutation.SetEncryptedPassword(s) + return nuo +} + +// SetNillableEncryptedPassword sets the "encrypted_password" field if the given value is not nil. +func (nuo *NurseryUpdateOne) SetNillableEncryptedPassword(s *string) *NurseryUpdateOne { + if s != nil { + nuo.SetEncryptedPassword(*s) + } + return nuo +} + // SetName sets the "name" field. func (nuo *NurseryUpdateOne) SetName(s string) *NurseryUpdateOne { nuo.mutation.SetName(s) @@ -516,6 +561,12 @@ func (nuo *NurseryUpdateOne) SetNillableAddress(s *string) *NurseryUpdateOne { return nuo } +// ClearAddress clears the value of the "address" field. +func (nuo *NurseryUpdateOne) ClearAddress() *NurseryUpdateOne { + nuo.mutation.ClearAddress() + return nuo +} + // SetPhoneNumber sets the "phone_number" field. func (nuo *NurseryUpdateOne) SetPhoneNumber(s string) *NurseryUpdateOne { nuo.mutation.SetPhoneNumber(s) @@ -536,26 +587,6 @@ func (nuo *NurseryUpdateOne) ClearPhoneNumber() *NurseryUpdateOne { return nuo } -// SetEmail sets the "email" field. -func (nuo *NurseryUpdateOne) SetEmail(s string) *NurseryUpdateOne { - nuo.mutation.SetEmail(s) - return nuo -} - -// SetNillableEmail sets the "email" field if the given value is not nil. -func (nuo *NurseryUpdateOne) SetNillableEmail(s *string) *NurseryUpdateOne { - if s != nil { - nuo.SetEmail(*s) - } - return nuo -} - -// ClearEmail clears the value of the "email" field. -func (nuo *NurseryUpdateOne) ClearEmail() *NurseryUpdateOne { - nuo.mutation.ClearEmail() - return nuo -} - // SetCreatedAt sets the "created_at" field. func (nuo *NurseryUpdateOne) SetCreatedAt(t time.Time) *NurseryUpdateOne { nuo.mutation.SetCreatedAt(t) @@ -767,24 +798,27 @@ func (nuo *NurseryUpdateOne) sqlSave(ctx context.Context) (_node *Nursery, err e if value, ok := nuo.mutation.NurseryCode(); ok { _spec.SetField(nursery.FieldNurseryCode, field.TypeString, value) } + if value, ok := nuo.mutation.Email(); ok { + _spec.SetField(nursery.FieldEmail, field.TypeString, value) + } + if value, ok := nuo.mutation.EncryptedPassword(); ok { + _spec.SetField(nursery.FieldEncryptedPassword, field.TypeString, value) + } if value, ok := nuo.mutation.Name(); ok { _spec.SetField(nursery.FieldName, field.TypeString, value) } if value, ok := nuo.mutation.Address(); ok { _spec.SetField(nursery.FieldAddress, field.TypeString, value) } + if nuo.mutation.AddressCleared() { + _spec.ClearField(nursery.FieldAddress, field.TypeString) + } if value, ok := nuo.mutation.PhoneNumber(); ok { _spec.SetField(nursery.FieldPhoneNumber, field.TypeString, value) } if nuo.mutation.PhoneNumberCleared() { _spec.ClearField(nursery.FieldPhoneNumber, field.TypeString) } - if value, ok := nuo.mutation.Email(); ok { - _spec.SetField(nursery.FieldEmail, field.TypeString, value) - } - if nuo.mutation.EmailCleared() { - _spec.ClearField(nursery.FieldEmail, field.TypeString) - } if value, ok := nuo.mutation.CreatedAt(); ok { _spec.SetField(nursery.FieldCreatedAt, field.TypeTime, value) } diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index af5a5f1f..3434ca0f 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -113,11 +113,11 @@ func init() { guardianFields := schema.Guardian{}.Fields() _ = guardianFields // guardianDescCreatedAt is the schema descriptor for created_at field. - guardianDescCreatedAt := guardianFields[4].Descriptor() + guardianDescCreatedAt := guardianFields[5].Descriptor() // guardian.DefaultCreatedAt holds the default value on creation for the created_at field. guardian.DefaultCreatedAt = guardianDescCreatedAt.Default.(func() time.Time) // guardianDescUpdatedAt is the schema descriptor for updated_at field. - guardianDescUpdatedAt := guardianFields[5].Descriptor() + guardianDescUpdatedAt := guardianFields[6].Descriptor() // guardian.DefaultUpdatedAt holds the default value on creation for the updated_at field. guardian.DefaultUpdatedAt = guardianDescUpdatedAt.Default.(func() time.Time) // guardian.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. @@ -133,11 +133,11 @@ func init() { // nursery.DefaultNurseryCode holds the default value on creation for the nursery_code field. nursery.DefaultNurseryCode = nurseryDescNurseryCode.Default.(func() string) // nurseryDescCreatedAt is the schema descriptor for created_at field. - nurseryDescCreatedAt := nurseryFields[6].Descriptor() + nurseryDescCreatedAt := nurseryFields[7].Descriptor() // nursery.DefaultCreatedAt holds the default value on creation for the created_at field. nursery.DefaultCreatedAt = nurseryDescCreatedAt.Default.(func() time.Time) // nurseryDescUpdatedAt is the schema descriptor for updated_at field. - nurseryDescUpdatedAt := nurseryFields[7].Descriptor() + nurseryDescUpdatedAt := nurseryFields[8].Descriptor() // nursery.DefaultUpdatedAt holds the default value on creation for the updated_at field. nursery.DefaultUpdatedAt = nurseryDescUpdatedAt.Default.(func() time.Time) // nursery.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. diff --git a/backend/domain/repository/ent/schema/guardian.go b/backend/domain/repository/ent/schema/guardian.go index a81c339b..972c15bf 100644 --- a/backend/domain/repository/ent/schema/guardian.go +++ b/backend/domain/repository/ent/schema/guardian.go @@ -18,8 +18,9 @@ type Guardian struct { func (Guardian) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + field.String("email"), + field.String("encrypted_password"), field.String("name"), - field.String("email").Optional(), field.String("phone").Optional(), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), diff --git a/backend/domain/repository/ent/schema/nursery.go b/backend/domain/repository/ent/schema/nursery.go index d0641442..0b8ecdd7 100644 --- a/backend/domain/repository/ent/schema/nursery.go +++ b/backend/domain/repository/ent/schema/nursery.go @@ -28,10 +28,11 @@ func (Nursery) Fields() []ent.Field { field.String("nursery_code").DefaultFunc(func() string { return strconv.Itoa(rand.Intn(90000) + 10000) }).Unique().Comment("ユニークな数字(文字列)のコード"), //!: ユニークじゃないコードが生成される可能性がある + field.String("email"), + field.String("encrypted_password"), field.String("name"), - field.String("address"), + field.String("address").Optional(), field.String("phone_number").Optional(), - field.String("email").Optional(), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } From 138f204b68b47b2eb81af891b11735873e0261d9 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 14:01:45 +0900 Subject: [PATCH 080/771] =?UTF-8?q?fix(Schema):=20=E9=9B=BB=E8=A9=B1?= =?UTF-8?q?=E7=95=AA=E5=8F=B7=E3=81=AE=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=83=89=E5=90=8D=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/guardian.go | 16 ++-- .../repository/ent/guardian/guardian.go | 12 +-- .../domain/repository/ent/guardian/where.go | 96 +++++++++---------- .../domain/repository/ent/guardian_create.go | 18 ++-- .../domain/repository/ent/guardian_update.go | 52 +++++----- .../domain/repository/ent/migrate/schema.go | 2 +- backend/domain/repository/ent/mutation.go | 76 +++++++-------- .../domain/repository/ent/schema/guardian.go | 2 +- 8 files changed, 137 insertions(+), 137 deletions(-) diff --git a/backend/domain/repository/ent/guardian.go b/backend/domain/repository/ent/guardian.go index 8b1dae24..5eec6301 100644 --- a/backend/domain/repository/ent/guardian.go +++ b/backend/domain/repository/ent/guardian.go @@ -26,8 +26,8 @@ type Guardian struct { EncryptedPassword string `json:"encrypted_password,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` - // Phone holds the value of the "phone" field. - Phone string `json:"phone,omitempty"` + // PhoneNumber holds the value of the "phone_number" field. + PhoneNumber string `json:"phone_number,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. @@ -92,7 +92,7 @@ func (*Guardian) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { - case guardian.FieldEmail, guardian.FieldEncryptedPassword, guardian.FieldName, guardian.FieldPhone: + case guardian.FieldEmail, guardian.FieldEncryptedPassword, guardian.FieldName, guardian.FieldPhoneNumber: values[i] = new(sql.NullString) case guardian.FieldCreatedAt, guardian.FieldUpdatedAt: values[i] = new(sql.NullTime) @@ -139,11 +139,11 @@ func (gu *Guardian) assignValues(columns []string, values []any) error { } else if value.Valid { gu.Name = value.String } - case guardian.FieldPhone: + case guardian.FieldPhoneNumber: if value, ok := values[i].(*sql.NullString); !ok { - return fmt.Errorf("unexpected type %T for field phone", values[i]) + return fmt.Errorf("unexpected type %T for field phone_number", values[i]) } else if value.Valid { - gu.Phone = value.String + gu.PhoneNumber = value.String } case guardian.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { @@ -224,8 +224,8 @@ func (gu *Guardian) String() string { builder.WriteString("name=") builder.WriteString(gu.Name) builder.WriteString(", ") - builder.WriteString("phone=") - builder.WriteString(gu.Phone) + builder.WriteString("phone_number=") + builder.WriteString(gu.PhoneNumber) builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(gu.CreatedAt.Format(time.ANSIC)) diff --git a/backend/domain/repository/ent/guardian/guardian.go b/backend/domain/repository/ent/guardian/guardian.go index f20fcedd..c3cc750c 100644 --- a/backend/domain/repository/ent/guardian/guardian.go +++ b/backend/domain/repository/ent/guardian/guardian.go @@ -21,8 +21,8 @@ const ( FieldEncryptedPassword = "encrypted_password" // FieldName holds the string denoting the name field in the database. FieldName = "name" - // FieldPhone holds the string denoting the phone field in the database. - FieldPhone = "phone" + // FieldPhoneNumber holds the string denoting the phone_number field in the database. + FieldPhoneNumber = "phone_number" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -64,7 +64,7 @@ var Columns = []string{ FieldEmail, FieldEncryptedPassword, FieldName, - FieldPhone, + FieldPhoneNumber, FieldCreatedAt, FieldUpdatedAt, } @@ -124,9 +124,9 @@ func ByName(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldName, opts...).ToFunc() } -// ByPhone orders the results by the phone field. -func ByPhone(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldPhone, opts...).ToFunc() +// ByPhoneNumber orders the results by the phone_number field. +func ByPhoneNumber(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldPhoneNumber, opts...).ToFunc() } // ByCreatedAt orders the results by the created_at field. diff --git a/backend/domain/repository/ent/guardian/where.go b/backend/domain/repository/ent/guardian/where.go index fe3d1f90..822596d0 100644 --- a/backend/domain/repository/ent/guardian/where.go +++ b/backend/domain/repository/ent/guardian/where.go @@ -71,9 +71,9 @@ func Name(v string) predicate.Guardian { return predicate.Guardian(sql.FieldEQ(FieldName, v)) } -// Phone applies equality check predicate on the "phone" field. It's identical to PhoneEQ. -func Phone(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldEQ(FieldPhone, v)) +// PhoneNumber applies equality check predicate on the "phone_number" field. It's identical to PhoneNumberEQ. +func PhoneNumber(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldPhoneNumber, v)) } // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. @@ -281,79 +281,79 @@ func NameContainsFold(v string) predicate.Guardian { return predicate.Guardian(sql.FieldContainsFold(FieldName, v)) } -// PhoneEQ applies the EQ predicate on the "phone" field. -func PhoneEQ(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldEQ(FieldPhone, v)) +// PhoneNumberEQ applies the EQ predicate on the "phone_number" field. +func PhoneNumberEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldPhoneNumber, v)) } -// PhoneNEQ applies the NEQ predicate on the "phone" field. -func PhoneNEQ(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldNEQ(FieldPhone, v)) +// PhoneNumberNEQ applies the NEQ predicate on the "phone_number" field. +func PhoneNumberNEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldPhoneNumber, v)) } -// PhoneIn applies the In predicate on the "phone" field. -func PhoneIn(vs ...string) predicate.Guardian { - return predicate.Guardian(sql.FieldIn(FieldPhone, vs...)) +// PhoneNumberIn applies the In predicate on the "phone_number" field. +func PhoneNumberIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldIn(FieldPhoneNumber, vs...)) } -// PhoneNotIn applies the NotIn predicate on the "phone" field. -func PhoneNotIn(vs ...string) predicate.Guardian { - return predicate.Guardian(sql.FieldNotIn(FieldPhone, vs...)) +// PhoneNumberNotIn applies the NotIn predicate on the "phone_number" field. +func PhoneNumberNotIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldNotIn(FieldPhoneNumber, vs...)) } -// PhoneGT applies the GT predicate on the "phone" field. -func PhoneGT(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldGT(FieldPhone, v)) +// PhoneNumberGT applies the GT predicate on the "phone_number" field. +func PhoneNumberGT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGT(FieldPhoneNumber, v)) } -// PhoneGTE applies the GTE predicate on the "phone" field. -func PhoneGTE(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldGTE(FieldPhone, v)) +// PhoneNumberGTE applies the GTE predicate on the "phone_number" field. +func PhoneNumberGTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGTE(FieldPhoneNumber, v)) } -// PhoneLT applies the LT predicate on the "phone" field. -func PhoneLT(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldLT(FieldPhone, v)) +// PhoneNumberLT applies the LT predicate on the "phone_number" field. +func PhoneNumberLT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLT(FieldPhoneNumber, v)) } -// PhoneLTE applies the LTE predicate on the "phone" field. -func PhoneLTE(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldLTE(FieldPhone, v)) +// PhoneNumberLTE applies the LTE predicate on the "phone_number" field. +func PhoneNumberLTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLTE(FieldPhoneNumber, v)) } -// PhoneContains applies the Contains predicate on the "phone" field. -func PhoneContains(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldContains(FieldPhone, v)) +// PhoneNumberContains applies the Contains predicate on the "phone_number" field. +func PhoneNumberContains(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContains(FieldPhoneNumber, v)) } -// PhoneHasPrefix applies the HasPrefix predicate on the "phone" field. -func PhoneHasPrefix(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldHasPrefix(FieldPhone, v)) +// PhoneNumberHasPrefix applies the HasPrefix predicate on the "phone_number" field. +func PhoneNumberHasPrefix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasPrefix(FieldPhoneNumber, v)) } -// PhoneHasSuffix applies the HasSuffix predicate on the "phone" field. -func PhoneHasSuffix(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldHasSuffix(FieldPhone, v)) +// PhoneNumberHasSuffix applies the HasSuffix predicate on the "phone_number" field. +func PhoneNumberHasSuffix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasSuffix(FieldPhoneNumber, v)) } -// PhoneIsNil applies the IsNil predicate on the "phone" field. -func PhoneIsNil() predicate.Guardian { - return predicate.Guardian(sql.FieldIsNull(FieldPhone)) +// PhoneNumberIsNil applies the IsNil predicate on the "phone_number" field. +func PhoneNumberIsNil() predicate.Guardian { + return predicate.Guardian(sql.FieldIsNull(FieldPhoneNumber)) } -// PhoneNotNil applies the NotNil predicate on the "phone" field. -func PhoneNotNil() predicate.Guardian { - return predicate.Guardian(sql.FieldNotNull(FieldPhone)) +// PhoneNumberNotNil applies the NotNil predicate on the "phone_number" field. +func PhoneNumberNotNil() predicate.Guardian { + return predicate.Guardian(sql.FieldNotNull(FieldPhoneNumber)) } -// PhoneEqualFold applies the EqualFold predicate on the "phone" field. -func PhoneEqualFold(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldEqualFold(FieldPhone, v)) +// PhoneNumberEqualFold applies the EqualFold predicate on the "phone_number" field. +func PhoneNumberEqualFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEqualFold(FieldPhoneNumber, v)) } -// PhoneContainsFold applies the ContainsFold predicate on the "phone" field. -func PhoneContainsFold(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldContainsFold(FieldPhone, v)) +// PhoneNumberContainsFold applies the ContainsFold predicate on the "phone_number" field. +func PhoneNumberContainsFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContainsFold(FieldPhoneNumber, v)) } // CreatedAtEQ applies the EQ predicate on the "created_at" field. diff --git a/backend/domain/repository/ent/guardian_create.go b/backend/domain/repository/ent/guardian_create.go index 9f8cfec2..2586b82a 100644 --- a/backend/domain/repository/ent/guardian_create.go +++ b/backend/domain/repository/ent/guardian_create.go @@ -42,16 +42,16 @@ func (gc *GuardianCreate) SetName(s string) *GuardianCreate { return gc } -// SetPhone sets the "phone" field. -func (gc *GuardianCreate) SetPhone(s string) *GuardianCreate { - gc.mutation.SetPhone(s) +// SetPhoneNumber sets the "phone_number" field. +func (gc *GuardianCreate) SetPhoneNumber(s string) *GuardianCreate { + gc.mutation.SetPhoneNumber(s) return gc } -// SetNillablePhone sets the "phone" field if the given value is not nil. -func (gc *GuardianCreate) SetNillablePhone(s *string) *GuardianCreate { +// SetNillablePhoneNumber sets the "phone_number" field if the given value is not nil. +func (gc *GuardianCreate) SetNillablePhoneNumber(s *string) *GuardianCreate { if s != nil { - gc.SetPhone(*s) + gc.SetPhoneNumber(*s) } return gc } @@ -264,9 +264,9 @@ func (gc *GuardianCreate) createSpec() (*Guardian, *sqlgraph.CreateSpec) { _spec.SetField(guardian.FieldName, field.TypeString, value) _node.Name = value } - if value, ok := gc.mutation.Phone(); ok { - _spec.SetField(guardian.FieldPhone, field.TypeString, value) - _node.Phone = value + if value, ok := gc.mutation.PhoneNumber(); ok { + _spec.SetField(guardian.FieldPhoneNumber, field.TypeString, value) + _node.PhoneNumber = value } if value, ok := gc.mutation.CreatedAt(); ok { _spec.SetField(guardian.FieldCreatedAt, field.TypeTime, value) diff --git a/backend/domain/repository/ent/guardian_update.go b/backend/domain/repository/ent/guardian_update.go index 1db43b5d..ed420fa2 100644 --- a/backend/domain/repository/ent/guardian_update.go +++ b/backend/domain/repository/ent/guardian_update.go @@ -74,23 +74,23 @@ func (gu *GuardianUpdate) SetNillableName(s *string) *GuardianUpdate { return gu } -// SetPhone sets the "phone" field. -func (gu *GuardianUpdate) SetPhone(s string) *GuardianUpdate { - gu.mutation.SetPhone(s) +// SetPhoneNumber sets the "phone_number" field. +func (gu *GuardianUpdate) SetPhoneNumber(s string) *GuardianUpdate { + gu.mutation.SetPhoneNumber(s) return gu } -// SetNillablePhone sets the "phone" field if the given value is not nil. -func (gu *GuardianUpdate) SetNillablePhone(s *string) *GuardianUpdate { +// SetNillablePhoneNumber sets the "phone_number" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillablePhoneNumber(s *string) *GuardianUpdate { if s != nil { - gu.SetPhone(*s) + gu.SetPhoneNumber(*s) } return gu } -// ClearPhone clears the value of the "phone" field. -func (gu *GuardianUpdate) ClearPhone() *GuardianUpdate { - gu.mutation.ClearPhone() +// ClearPhoneNumber clears the value of the "phone_number" field. +func (gu *GuardianUpdate) ClearPhoneNumber() *GuardianUpdate { + gu.mutation.ClearPhoneNumber() return gu } @@ -259,11 +259,11 @@ func (gu *GuardianUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := gu.mutation.Name(); ok { _spec.SetField(guardian.FieldName, field.TypeString, value) } - if value, ok := gu.mutation.Phone(); ok { - _spec.SetField(guardian.FieldPhone, field.TypeString, value) + if value, ok := gu.mutation.PhoneNumber(); ok { + _spec.SetField(guardian.FieldPhoneNumber, field.TypeString, value) } - if gu.mutation.PhoneCleared() { - _spec.ClearField(guardian.FieldPhone, field.TypeString) + if gu.mutation.PhoneNumberCleared() { + _spec.ClearField(guardian.FieldPhoneNumber, field.TypeString) } if value, ok := gu.mutation.CreatedAt(); ok { _spec.SetField(guardian.FieldCreatedAt, field.TypeTime, value) @@ -436,23 +436,23 @@ func (guo *GuardianUpdateOne) SetNillableName(s *string) *GuardianUpdateOne { return guo } -// SetPhone sets the "phone" field. -func (guo *GuardianUpdateOne) SetPhone(s string) *GuardianUpdateOne { - guo.mutation.SetPhone(s) +// SetPhoneNumber sets the "phone_number" field. +func (guo *GuardianUpdateOne) SetPhoneNumber(s string) *GuardianUpdateOne { + guo.mutation.SetPhoneNumber(s) return guo } -// SetNillablePhone sets the "phone" field if the given value is not nil. -func (guo *GuardianUpdateOne) SetNillablePhone(s *string) *GuardianUpdateOne { +// SetNillablePhoneNumber sets the "phone_number" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillablePhoneNumber(s *string) *GuardianUpdateOne { if s != nil { - guo.SetPhone(*s) + guo.SetPhoneNumber(*s) } return guo } -// ClearPhone clears the value of the "phone" field. -func (guo *GuardianUpdateOne) ClearPhone() *GuardianUpdateOne { - guo.mutation.ClearPhone() +// ClearPhoneNumber clears the value of the "phone_number" field. +func (guo *GuardianUpdateOne) ClearPhoneNumber() *GuardianUpdateOne { + guo.mutation.ClearPhoneNumber() return guo } @@ -651,11 +651,11 @@ func (guo *GuardianUpdateOne) sqlSave(ctx context.Context) (_node *Guardian, err if value, ok := guo.mutation.Name(); ok { _spec.SetField(guardian.FieldName, field.TypeString, value) } - if value, ok := guo.mutation.Phone(); ok { - _spec.SetField(guardian.FieldPhone, field.TypeString, value) + if value, ok := guo.mutation.PhoneNumber(); ok { + _spec.SetField(guardian.FieldPhoneNumber, field.TypeString, value) } - if guo.mutation.PhoneCleared() { - _spec.ClearField(guardian.FieldPhone, field.TypeString) + if guo.mutation.PhoneNumberCleared() { + _spec.ClearField(guardian.FieldPhoneNumber, field.TypeString) } if value, ok := guo.mutation.CreatedAt(); ok { _spec.SetField(guardian.FieldCreatedAt, field.TypeTime, value) diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index d7b0b2b0..be38e999 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -157,7 +157,7 @@ var ( {Name: "email", Type: field.TypeString}, {Name: "encrypted_password", Type: field.TypeString}, {Name: "name", Type: field.TypeString}, - {Name: "phone", Type: field.TypeString, Nullable: true}, + {Name: "phone_number", Type: field.TypeString, Nullable: true}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "guardian_nursery", Type: field.TypeUUID, Nullable: true}, diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index 27e7f4bc..3605b145 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -4156,7 +4156,7 @@ type GuardianMutation struct { email *string encrypted_password *string name *string - phone *string + phone_number *string created_at *time.Time updated_at *time.Time clearedFields map[string]struct{} @@ -4384,53 +4384,53 @@ func (m *GuardianMutation) ResetName() { m.name = nil } -// SetPhone sets the "phone" field. -func (m *GuardianMutation) SetPhone(s string) { - m.phone = &s +// SetPhoneNumber sets the "phone_number" field. +func (m *GuardianMutation) SetPhoneNumber(s string) { + m.phone_number = &s } -// Phone returns the value of the "phone" field in the mutation. -func (m *GuardianMutation) Phone() (r string, exists bool) { - v := m.phone +// PhoneNumber returns the value of the "phone_number" field in the mutation. +func (m *GuardianMutation) PhoneNumber() (r string, exists bool) { + v := m.phone_number if v == nil { return } return *v, true } -// OldPhone returns the old "phone" field's value of the Guardian entity. +// OldPhoneNumber returns the old "phone_number" field's value of the Guardian entity. // If the Guardian object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *GuardianMutation) OldPhone(ctx context.Context) (v string, err error) { +func (m *GuardianMutation) OldPhoneNumber(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldPhone is only allowed on UpdateOne operations") + return v, errors.New("OldPhoneNumber is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, errors.New("OldPhone requires an ID field in the mutation") + return v, errors.New("OldPhoneNumber requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { - return v, fmt.Errorf("querying old value for OldPhone: %w", err) + return v, fmt.Errorf("querying old value for OldPhoneNumber: %w", err) } - return oldValue.Phone, nil + return oldValue.PhoneNumber, nil } -// ClearPhone clears the value of the "phone" field. -func (m *GuardianMutation) ClearPhone() { - m.phone = nil - m.clearedFields[guardian.FieldPhone] = struct{}{} +// ClearPhoneNumber clears the value of the "phone_number" field. +func (m *GuardianMutation) ClearPhoneNumber() { + m.phone_number = nil + m.clearedFields[guardian.FieldPhoneNumber] = struct{}{} } -// PhoneCleared returns if the "phone" field was cleared in this mutation. -func (m *GuardianMutation) PhoneCleared() bool { - _, ok := m.clearedFields[guardian.FieldPhone] +// PhoneNumberCleared returns if the "phone_number" field was cleared in this mutation. +func (m *GuardianMutation) PhoneNumberCleared() bool { + _, ok := m.clearedFields[guardian.FieldPhoneNumber] return ok } -// ResetPhone resets all changes to the "phone" field. -func (m *GuardianMutation) ResetPhone() { - m.phone = nil - delete(m.clearedFields, guardian.FieldPhone) +// ResetPhoneNumber resets all changes to the "phone_number" field. +func (m *GuardianMutation) ResetPhoneNumber() { + m.phone_number = nil + delete(m.clearedFields, guardian.FieldPhoneNumber) } // SetCreatedAt sets the "created_at" field. @@ -4681,8 +4681,8 @@ func (m *GuardianMutation) Fields() []string { if m.name != nil { fields = append(fields, guardian.FieldName) } - if m.phone != nil { - fields = append(fields, guardian.FieldPhone) + if m.phone_number != nil { + fields = append(fields, guardian.FieldPhoneNumber) } if m.created_at != nil { fields = append(fields, guardian.FieldCreatedAt) @@ -4704,8 +4704,8 @@ func (m *GuardianMutation) Field(name string) (ent.Value, bool) { return m.EncryptedPassword() case guardian.FieldName: return m.Name() - case guardian.FieldPhone: - return m.Phone() + case guardian.FieldPhoneNumber: + return m.PhoneNumber() case guardian.FieldCreatedAt: return m.CreatedAt() case guardian.FieldUpdatedAt: @@ -4725,8 +4725,8 @@ func (m *GuardianMutation) OldField(ctx context.Context, name string) (ent.Value return m.OldEncryptedPassword(ctx) case guardian.FieldName: return m.OldName(ctx) - case guardian.FieldPhone: - return m.OldPhone(ctx) + case guardian.FieldPhoneNumber: + return m.OldPhoneNumber(ctx) case guardian.FieldCreatedAt: return m.OldCreatedAt(ctx) case guardian.FieldUpdatedAt: @@ -4761,12 +4761,12 @@ func (m *GuardianMutation) SetField(name string, value ent.Value) error { } m.SetName(v) return nil - case guardian.FieldPhone: + case guardian.FieldPhoneNumber: v, ok := value.(string) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetPhone(v) + m.SetPhoneNumber(v) return nil case guardian.FieldCreatedAt: v, ok := value.(time.Time) @@ -4812,8 +4812,8 @@ func (m *GuardianMutation) AddField(name string, value ent.Value) error { // mutation. func (m *GuardianMutation) ClearedFields() []string { var fields []string - if m.FieldCleared(guardian.FieldPhone) { - fields = append(fields, guardian.FieldPhone) + if m.FieldCleared(guardian.FieldPhoneNumber) { + fields = append(fields, guardian.FieldPhoneNumber) } return fields } @@ -4829,8 +4829,8 @@ func (m *GuardianMutation) FieldCleared(name string) bool { // error if the field is not defined in the schema. func (m *GuardianMutation) ClearField(name string) error { switch name { - case guardian.FieldPhone: - m.ClearPhone() + case guardian.FieldPhoneNumber: + m.ClearPhoneNumber() return nil } return fmt.Errorf("unknown Guardian nullable field %s", name) @@ -4849,8 +4849,8 @@ func (m *GuardianMutation) ResetField(name string) error { case guardian.FieldName: m.ResetName() return nil - case guardian.FieldPhone: - m.ResetPhone() + case guardian.FieldPhoneNumber: + m.ResetPhoneNumber() return nil case guardian.FieldCreatedAt: m.ResetCreatedAt() diff --git a/backend/domain/repository/ent/schema/guardian.go b/backend/domain/repository/ent/schema/guardian.go index 972c15bf..6d8339f7 100644 --- a/backend/domain/repository/ent/schema/guardian.go +++ b/backend/domain/repository/ent/schema/guardian.go @@ -21,7 +21,7 @@ func (Guardian) Fields() []ent.Field { field.String("email"), field.String("encrypted_password"), field.String("name"), - field.String("phone").Optional(), + field.String("phone_number").Optional(), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } From 98ce1f6873e5d689ae2579212a206411a462aa6b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 14:16:28 +0900 Subject: [PATCH 081/771] =?UTF-8?q?fix(Schema):=20=E3=83=90=E3=82=B9?= =?UTF-8?q?=E5=81=9C=E3=81=AE=E9=A0=86=E7=95=AA=E3=81=AB=E9=96=A2=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=AB=E3=83=A9=E3=83=A0=E5=90=8D=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/repository/ent/migrate/schema.go | 2 +- backend/domain/repository/ent/mutation.go | 126 +++++++++--------- .../domain/repository/ent/schema/station.go | 2 +- backend/domain/repository/ent/station.go | 14 +- .../domain/repository/ent/station/station.go | 12 +- .../domain/repository/ent/station/where.go | 54 ++++---- .../domain/repository/ent/station_create.go | 16 +-- .../domain/repository/ent/station_update.go | 56 ++++---- 8 files changed, 141 insertions(+), 141 deletions(-) diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index be38e999..057d17c7 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -200,7 +200,7 @@ var ( {Name: "latitude", Type: field.TypeFloat64, Nullable: true}, {Name: "longitude", Type: field.TypeFloat64, Nullable: true}, {Name: "morning_order", Type: field.TypeInt}, - {Name: "evening_order", Type: field.TypeInt}, + {Name: "afternoon_order", Type: field.TypeInt}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "guardian_station", Type: field.TypeUUID, Unique: true, Nullable: true}, diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index 3605b145..9040b126 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -5995,28 +5995,28 @@ func (m *NurseryMutation) ResetEdge(name string) error { // StationMutation represents an operation that mutates the Station nodes in the graph. type StationMutation struct { config - op Op - typ string - id *uuid.UUID - latitude *float64 - addlatitude *float64 - longitude *float64 - addlongitude *float64 - morning_order *int - addmorning_order *int - evening_order *int - addevening_order *int - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - guardian *uuid.UUID - clearedguardian bool - bus map[uuid.UUID]struct{} - removedbus map[uuid.UUID]struct{} - clearedbus bool - done bool - oldValue func(context.Context) (*Station, error) - predicates []predicate.Station + op Op + typ string + id *uuid.UUID + latitude *float64 + addlatitude *float64 + longitude *float64 + addlongitude *float64 + morning_order *int + addmorning_order *int + afternoon_order *int + addafternoon_order *int + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + guardian *uuid.UUID + clearedguardian bool + bus map[uuid.UUID]struct{} + removedbus map[uuid.UUID]struct{} + clearedbus bool + done bool + oldValue func(context.Context) (*Station, error) + predicates []predicate.Station } var _ ent.Mutation = (*StationMutation)(nil) @@ -6319,60 +6319,60 @@ func (m *StationMutation) ResetMorningOrder() { m.addmorning_order = nil } -// SetEveningOrder sets the "evening_order" field. -func (m *StationMutation) SetEveningOrder(i int) { - m.evening_order = &i - m.addevening_order = nil +// SetAfternoonOrder sets the "afternoon_order" field. +func (m *StationMutation) SetAfternoonOrder(i int) { + m.afternoon_order = &i + m.addafternoon_order = nil } -// EveningOrder returns the value of the "evening_order" field in the mutation. -func (m *StationMutation) EveningOrder() (r int, exists bool) { - v := m.evening_order +// AfternoonOrder returns the value of the "afternoon_order" field in the mutation. +func (m *StationMutation) AfternoonOrder() (r int, exists bool) { + v := m.afternoon_order if v == nil { return } return *v, true } -// OldEveningOrder returns the old "evening_order" field's value of the Station entity. +// OldAfternoonOrder returns the old "afternoon_order" field's value of the Station entity. // If the Station object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *StationMutation) OldEveningOrder(ctx context.Context) (v int, err error) { +func (m *StationMutation) OldAfternoonOrder(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldEveningOrder is only allowed on UpdateOne operations") + return v, errors.New("OldAfternoonOrder is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, errors.New("OldEveningOrder requires an ID field in the mutation") + return v, errors.New("OldAfternoonOrder requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { - return v, fmt.Errorf("querying old value for OldEveningOrder: %w", err) + return v, fmt.Errorf("querying old value for OldAfternoonOrder: %w", err) } - return oldValue.EveningOrder, nil + return oldValue.AfternoonOrder, nil } -// AddEveningOrder adds i to the "evening_order" field. -func (m *StationMutation) AddEveningOrder(i int) { - if m.addevening_order != nil { - *m.addevening_order += i +// AddAfternoonOrder adds i to the "afternoon_order" field. +func (m *StationMutation) AddAfternoonOrder(i int) { + if m.addafternoon_order != nil { + *m.addafternoon_order += i } else { - m.addevening_order = &i + m.addafternoon_order = &i } } -// AddedEveningOrder returns the value that was added to the "evening_order" field in this mutation. -func (m *StationMutation) AddedEveningOrder() (r int, exists bool) { - v := m.addevening_order +// AddedAfternoonOrder returns the value that was added to the "afternoon_order" field in this mutation. +func (m *StationMutation) AddedAfternoonOrder() (r int, exists bool) { + v := m.addafternoon_order if v == nil { return } return *v, true } -// ResetEveningOrder resets all changes to the "evening_order" field. -func (m *StationMutation) ResetEveningOrder() { - m.evening_order = nil - m.addevening_order = nil +// ResetAfternoonOrder resets all changes to the "afternoon_order" field. +func (m *StationMutation) ResetAfternoonOrder() { + m.afternoon_order = nil + m.addafternoon_order = nil } // SetCreatedAt sets the "created_at" field. @@ -6584,8 +6584,8 @@ func (m *StationMutation) Fields() []string { if m.morning_order != nil { fields = append(fields, station.FieldMorningOrder) } - if m.evening_order != nil { - fields = append(fields, station.FieldEveningOrder) + if m.afternoon_order != nil { + fields = append(fields, station.FieldAfternoonOrder) } if m.created_at != nil { fields = append(fields, station.FieldCreatedAt) @@ -6607,8 +6607,8 @@ func (m *StationMutation) Field(name string) (ent.Value, bool) { return m.Longitude() case station.FieldMorningOrder: return m.MorningOrder() - case station.FieldEveningOrder: - return m.EveningOrder() + case station.FieldAfternoonOrder: + return m.AfternoonOrder() case station.FieldCreatedAt: return m.CreatedAt() case station.FieldUpdatedAt: @@ -6628,8 +6628,8 @@ func (m *StationMutation) OldField(ctx context.Context, name string) (ent.Value, return m.OldLongitude(ctx) case station.FieldMorningOrder: return m.OldMorningOrder(ctx) - case station.FieldEveningOrder: - return m.OldEveningOrder(ctx) + case station.FieldAfternoonOrder: + return m.OldAfternoonOrder(ctx) case station.FieldCreatedAt: return m.OldCreatedAt(ctx) case station.FieldUpdatedAt: @@ -6664,12 +6664,12 @@ func (m *StationMutation) SetField(name string, value ent.Value) error { } m.SetMorningOrder(v) return nil - case station.FieldEveningOrder: + case station.FieldAfternoonOrder: v, ok := value.(int) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetEveningOrder(v) + m.SetAfternoonOrder(v) return nil case station.FieldCreatedAt: v, ok := value.(time.Time) @@ -6702,8 +6702,8 @@ func (m *StationMutation) AddedFields() []string { if m.addmorning_order != nil { fields = append(fields, station.FieldMorningOrder) } - if m.addevening_order != nil { - fields = append(fields, station.FieldEveningOrder) + if m.addafternoon_order != nil { + fields = append(fields, station.FieldAfternoonOrder) } return fields } @@ -6719,8 +6719,8 @@ func (m *StationMutation) AddedField(name string) (ent.Value, bool) { return m.AddedLongitude() case station.FieldMorningOrder: return m.AddedMorningOrder() - case station.FieldEveningOrder: - return m.AddedEveningOrder() + case station.FieldAfternoonOrder: + return m.AddedAfternoonOrder() } return nil, false } @@ -6751,12 +6751,12 @@ func (m *StationMutation) AddField(name string, value ent.Value) error { } m.AddMorningOrder(v) return nil - case station.FieldEveningOrder: + case station.FieldAfternoonOrder: v, ok := value.(int) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.AddEveningOrder(v) + m.AddAfternoonOrder(v) return nil } return fmt.Errorf("unknown Station numeric field %s", name) @@ -6809,8 +6809,8 @@ func (m *StationMutation) ResetField(name string) error { case station.FieldMorningOrder: m.ResetMorningOrder() return nil - case station.FieldEveningOrder: - m.ResetEveningOrder() + case station.FieldAfternoonOrder: + m.ResetAfternoonOrder() return nil case station.FieldCreatedAt: m.ResetCreatedAt() diff --git a/backend/domain/repository/ent/schema/station.go b/backend/domain/repository/ent/schema/station.go index 116ead7e..d89d30ed 100644 --- a/backend/domain/repository/ent/schema/station.go +++ b/backend/domain/repository/ent/schema/station.go @@ -21,7 +21,7 @@ func (Station) Fields() []ent.Field { field.Float("latitude").Optional(), field.Float("longitude").Optional(), field.Int("morning_order").Comment("朝のバス停の順番"), - field.Int("evening_order").Comment("帰りのバス停の順番"), + field.Int("afternoon_order").Comment("帰りのバス停の順番"), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } diff --git a/backend/domain/repository/ent/station.go b/backend/domain/repository/ent/station.go index 2edbce17..318fbfc4 100644 --- a/backend/domain/repository/ent/station.go +++ b/backend/domain/repository/ent/station.go @@ -26,7 +26,7 @@ type Station struct { // 朝のバス停の順番 MorningOrder int `json:"morning_order,omitempty"` // 帰りのバス停の順番 - EveningOrder int `json:"evening_order,omitempty"` + AfternoonOrder int `json:"afternoon_order,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. @@ -78,7 +78,7 @@ func (*Station) scanValues(columns []string) ([]any, error) { switch columns[i] { case station.FieldLatitude, station.FieldLongitude: values[i] = new(sql.NullFloat64) - case station.FieldMorningOrder, station.FieldEveningOrder: + case station.FieldMorningOrder, station.FieldAfternoonOrder: values[i] = new(sql.NullInt64) case station.FieldCreatedAt, station.FieldUpdatedAt: values[i] = new(sql.NullTime) @@ -125,11 +125,11 @@ func (s *Station) assignValues(columns []string, values []any) error { } else if value.Valid { s.MorningOrder = int(value.Int64) } - case station.FieldEveningOrder: + case station.FieldAfternoonOrder: if value, ok := values[i].(*sql.NullInt64); !ok { - return fmt.Errorf("unexpected type %T for field evening_order", values[i]) + return fmt.Errorf("unexpected type %T for field afternoon_order", values[i]) } else if value.Valid { - s.EveningOrder = int(value.Int64) + s.AfternoonOrder = int(value.Int64) } case station.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { @@ -205,8 +205,8 @@ func (s *Station) String() string { builder.WriteString("morning_order=") builder.WriteString(fmt.Sprintf("%v", s.MorningOrder)) builder.WriteString(", ") - builder.WriteString("evening_order=") - builder.WriteString(fmt.Sprintf("%v", s.EveningOrder)) + builder.WriteString("afternoon_order=") + builder.WriteString(fmt.Sprintf("%v", s.AfternoonOrder)) builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(s.CreatedAt.Format(time.ANSIC)) diff --git a/backend/domain/repository/ent/station/station.go b/backend/domain/repository/ent/station/station.go index 73f96037..0c1e63f4 100644 --- a/backend/domain/repository/ent/station/station.go +++ b/backend/domain/repository/ent/station/station.go @@ -21,8 +21,8 @@ const ( FieldLongitude = "longitude" // FieldMorningOrder holds the string denoting the morning_order field in the database. FieldMorningOrder = "morning_order" - // FieldEveningOrder holds the string denoting the evening_order field in the database. - FieldEveningOrder = "evening_order" + // FieldAfternoonOrder holds the string denoting the afternoon_order field in the database. + FieldAfternoonOrder = "afternoon_order" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -53,7 +53,7 @@ var Columns = []string{ FieldLatitude, FieldLongitude, FieldMorningOrder, - FieldEveningOrder, + FieldAfternoonOrder, FieldCreatedAt, FieldUpdatedAt, } @@ -119,9 +119,9 @@ func ByMorningOrder(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMorningOrder, opts...).ToFunc() } -// ByEveningOrder orders the results by the evening_order field. -func ByEveningOrder(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldEveningOrder, opts...).ToFunc() +// ByAfternoonOrder orders the results by the afternoon_order field. +func ByAfternoonOrder(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldAfternoonOrder, opts...).ToFunc() } // ByCreatedAt orders the results by the created_at field. diff --git a/backend/domain/repository/ent/station/where.go b/backend/domain/repository/ent/station/where.go index 2de60d55..3f686700 100644 --- a/backend/domain/repository/ent/station/where.go +++ b/backend/domain/repository/ent/station/where.go @@ -71,9 +71,9 @@ func MorningOrder(v int) predicate.Station { return predicate.Station(sql.FieldEQ(FieldMorningOrder, v)) } -// EveningOrder applies equality check predicate on the "evening_order" field. It's identical to EveningOrderEQ. -func EveningOrder(v int) predicate.Station { - return predicate.Station(sql.FieldEQ(FieldEveningOrder, v)) +// AfternoonOrder applies equality check predicate on the "afternoon_order" field. It's identical to AfternoonOrderEQ. +func AfternoonOrder(v int) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldAfternoonOrder, v)) } // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. @@ -226,44 +226,44 @@ func MorningOrderLTE(v int) predicate.Station { return predicate.Station(sql.FieldLTE(FieldMorningOrder, v)) } -// EveningOrderEQ applies the EQ predicate on the "evening_order" field. -func EveningOrderEQ(v int) predicate.Station { - return predicate.Station(sql.FieldEQ(FieldEveningOrder, v)) +// AfternoonOrderEQ applies the EQ predicate on the "afternoon_order" field. +func AfternoonOrderEQ(v int) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldAfternoonOrder, v)) } -// EveningOrderNEQ applies the NEQ predicate on the "evening_order" field. -func EveningOrderNEQ(v int) predicate.Station { - return predicate.Station(sql.FieldNEQ(FieldEveningOrder, v)) +// AfternoonOrderNEQ applies the NEQ predicate on the "afternoon_order" field. +func AfternoonOrderNEQ(v int) predicate.Station { + return predicate.Station(sql.FieldNEQ(FieldAfternoonOrder, v)) } -// EveningOrderIn applies the In predicate on the "evening_order" field. -func EveningOrderIn(vs ...int) predicate.Station { - return predicate.Station(sql.FieldIn(FieldEveningOrder, vs...)) +// AfternoonOrderIn applies the In predicate on the "afternoon_order" field. +func AfternoonOrderIn(vs ...int) predicate.Station { + return predicate.Station(sql.FieldIn(FieldAfternoonOrder, vs...)) } -// EveningOrderNotIn applies the NotIn predicate on the "evening_order" field. -func EveningOrderNotIn(vs ...int) predicate.Station { - return predicate.Station(sql.FieldNotIn(FieldEveningOrder, vs...)) +// AfternoonOrderNotIn applies the NotIn predicate on the "afternoon_order" field. +func AfternoonOrderNotIn(vs ...int) predicate.Station { + return predicate.Station(sql.FieldNotIn(FieldAfternoonOrder, vs...)) } -// EveningOrderGT applies the GT predicate on the "evening_order" field. -func EveningOrderGT(v int) predicate.Station { - return predicate.Station(sql.FieldGT(FieldEveningOrder, v)) +// AfternoonOrderGT applies the GT predicate on the "afternoon_order" field. +func AfternoonOrderGT(v int) predicate.Station { + return predicate.Station(sql.FieldGT(FieldAfternoonOrder, v)) } -// EveningOrderGTE applies the GTE predicate on the "evening_order" field. -func EveningOrderGTE(v int) predicate.Station { - return predicate.Station(sql.FieldGTE(FieldEveningOrder, v)) +// AfternoonOrderGTE applies the GTE predicate on the "afternoon_order" field. +func AfternoonOrderGTE(v int) predicate.Station { + return predicate.Station(sql.FieldGTE(FieldAfternoonOrder, v)) } -// EveningOrderLT applies the LT predicate on the "evening_order" field. -func EveningOrderLT(v int) predicate.Station { - return predicate.Station(sql.FieldLT(FieldEveningOrder, v)) +// AfternoonOrderLT applies the LT predicate on the "afternoon_order" field. +func AfternoonOrderLT(v int) predicate.Station { + return predicate.Station(sql.FieldLT(FieldAfternoonOrder, v)) } -// EveningOrderLTE applies the LTE predicate on the "evening_order" field. -func EveningOrderLTE(v int) predicate.Station { - return predicate.Station(sql.FieldLTE(FieldEveningOrder, v)) +// AfternoonOrderLTE applies the LTE predicate on the "afternoon_order" field. +func AfternoonOrderLTE(v int) predicate.Station { + return predicate.Station(sql.FieldLTE(FieldAfternoonOrder, v)) } // CreatedAtEQ applies the EQ predicate on the "created_at" field. diff --git a/backend/domain/repository/ent/station_create.go b/backend/domain/repository/ent/station_create.go index f98a53b7..f92e2bd9 100644 --- a/backend/domain/repository/ent/station_create.go +++ b/backend/domain/repository/ent/station_create.go @@ -57,9 +57,9 @@ func (sc *StationCreate) SetMorningOrder(i int) *StationCreate { return sc } -// SetEveningOrder sets the "evening_order" field. -func (sc *StationCreate) SetEveningOrder(i int) *StationCreate { - sc.mutation.SetEveningOrder(i) +// SetAfternoonOrder sets the "afternoon_order" field. +func (sc *StationCreate) SetAfternoonOrder(i int) *StationCreate { + sc.mutation.SetAfternoonOrder(i) return sc } @@ -193,8 +193,8 @@ func (sc *StationCreate) check() error { if _, ok := sc.mutation.MorningOrder(); !ok { return &ValidationError{Name: "morning_order", err: errors.New(`ent: missing required field "Station.morning_order"`)} } - if _, ok := sc.mutation.EveningOrder(); !ok { - return &ValidationError{Name: "evening_order", err: errors.New(`ent: missing required field "Station.evening_order"`)} + if _, ok := sc.mutation.AfternoonOrder(); !ok { + return &ValidationError{Name: "afternoon_order", err: errors.New(`ent: missing required field "Station.afternoon_order"`)} } if _, ok := sc.mutation.CreatedAt(); !ok { return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Station.created_at"`)} @@ -249,9 +249,9 @@ func (sc *StationCreate) createSpec() (*Station, *sqlgraph.CreateSpec) { _spec.SetField(station.FieldMorningOrder, field.TypeInt, value) _node.MorningOrder = value } - if value, ok := sc.mutation.EveningOrder(); ok { - _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) - _node.EveningOrder = value + if value, ok := sc.mutation.AfternoonOrder(); ok { + _spec.SetField(station.FieldAfternoonOrder, field.TypeInt, value) + _node.AfternoonOrder = value } if value, ok := sc.mutation.CreatedAt(); ok { _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) diff --git a/backend/domain/repository/ent/station_update.go b/backend/domain/repository/ent/station_update.go index d3fc2669..5f7a1964 100644 --- a/backend/domain/repository/ent/station_update.go +++ b/backend/domain/repository/ent/station_update.go @@ -106,24 +106,24 @@ func (su *StationUpdate) AddMorningOrder(i int) *StationUpdate { return su } -// SetEveningOrder sets the "evening_order" field. -func (su *StationUpdate) SetEveningOrder(i int) *StationUpdate { - su.mutation.ResetEveningOrder() - su.mutation.SetEveningOrder(i) +// SetAfternoonOrder sets the "afternoon_order" field. +func (su *StationUpdate) SetAfternoonOrder(i int) *StationUpdate { + su.mutation.ResetAfternoonOrder() + su.mutation.SetAfternoonOrder(i) return su } -// SetNillableEveningOrder sets the "evening_order" field if the given value is not nil. -func (su *StationUpdate) SetNillableEveningOrder(i *int) *StationUpdate { +// SetNillableAfternoonOrder sets the "afternoon_order" field if the given value is not nil. +func (su *StationUpdate) SetNillableAfternoonOrder(i *int) *StationUpdate { if i != nil { - su.SetEveningOrder(*i) + su.SetAfternoonOrder(*i) } return su } -// AddEveningOrder adds i to the "evening_order" field. -func (su *StationUpdate) AddEveningOrder(i int) *StationUpdate { - su.mutation.AddEveningOrder(i) +// AddAfternoonOrder adds i to the "afternoon_order" field. +func (su *StationUpdate) AddAfternoonOrder(i int) *StationUpdate { + su.mutation.AddAfternoonOrder(i) return su } @@ -282,11 +282,11 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := su.mutation.AddedMorningOrder(); ok { _spec.AddField(station.FieldMorningOrder, field.TypeInt, value) } - if value, ok := su.mutation.EveningOrder(); ok { - _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) + if value, ok := su.mutation.AfternoonOrder(); ok { + _spec.SetField(station.FieldAfternoonOrder, field.TypeInt, value) } - if value, ok := su.mutation.AddedEveningOrder(); ok { - _spec.AddField(station.FieldEveningOrder, field.TypeInt, value) + if value, ok := su.mutation.AddedAfternoonOrder(); ok { + _spec.AddField(station.FieldAfternoonOrder, field.TypeInt, value) } if value, ok := su.mutation.CreatedAt(); ok { _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) @@ -463,24 +463,24 @@ func (suo *StationUpdateOne) AddMorningOrder(i int) *StationUpdateOne { return suo } -// SetEveningOrder sets the "evening_order" field. -func (suo *StationUpdateOne) SetEveningOrder(i int) *StationUpdateOne { - suo.mutation.ResetEveningOrder() - suo.mutation.SetEveningOrder(i) +// SetAfternoonOrder sets the "afternoon_order" field. +func (suo *StationUpdateOne) SetAfternoonOrder(i int) *StationUpdateOne { + suo.mutation.ResetAfternoonOrder() + suo.mutation.SetAfternoonOrder(i) return suo } -// SetNillableEveningOrder sets the "evening_order" field if the given value is not nil. -func (suo *StationUpdateOne) SetNillableEveningOrder(i *int) *StationUpdateOne { +// SetNillableAfternoonOrder sets the "afternoon_order" field if the given value is not nil. +func (suo *StationUpdateOne) SetNillableAfternoonOrder(i *int) *StationUpdateOne { if i != nil { - suo.SetEveningOrder(*i) + suo.SetAfternoonOrder(*i) } return suo } -// AddEveningOrder adds i to the "evening_order" field. -func (suo *StationUpdateOne) AddEveningOrder(i int) *StationUpdateOne { - suo.mutation.AddEveningOrder(i) +// AddAfternoonOrder adds i to the "afternoon_order" field. +func (suo *StationUpdateOne) AddAfternoonOrder(i int) *StationUpdateOne { + suo.mutation.AddAfternoonOrder(i) return suo } @@ -669,11 +669,11 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e if value, ok := suo.mutation.AddedMorningOrder(); ok { _spec.AddField(station.FieldMorningOrder, field.TypeInt, value) } - if value, ok := suo.mutation.EveningOrder(); ok { - _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) + if value, ok := suo.mutation.AfternoonOrder(); ok { + _spec.SetField(station.FieldAfternoonOrder, field.TypeInt, value) } - if value, ok := suo.mutation.AddedEveningOrder(); ok { - _spec.AddField(station.FieldEveningOrder, field.TypeInt, value) + if value, ok := suo.mutation.AddedAfternoonOrder(); ok { + _spec.AddField(station.FieldAfternoonOrder, field.TypeInt, value) } if value, ok := suo.mutation.CreatedAt(); ok { _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) From 176eb03cc873f1834a657cbc2b174d0360bde02f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 14:26:52 +0900 Subject: [PATCH 082/771] =?UTF-8?q?fix(schema):=20afternoon=E3=82=92evenin?= =?UTF-8?q?g=E3=81=AB=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/child.go | 14 +- backend/domain/repository/ent/child/child.go | 16 +- backend/domain/repository/ent/child/where.go | 18 +- backend/domain/repository/ent/child_create.go | 28 +-- backend/domain/repository/ent/child_update.go | 32 ++-- .../domain/repository/ent/migrate/schema.go | 4 +- backend/domain/repository/ent/mutation.go | 178 +++++++++--------- backend/domain/repository/ent/runtime.go | 8 +- backend/domain/repository/ent/schema/child.go | 2 +- .../domain/repository/ent/schema/station.go | 2 +- backend/domain/repository/ent/station.go | 14 +- .../domain/repository/ent/station/station.go | 12 +- .../domain/repository/ent/station/where.go | 54 +++--- .../domain/repository/ent/station_create.go | 16 +- .../domain/repository/ent/station_update.go | 56 +++--- 15 files changed, 227 insertions(+), 227 deletions(-) diff --git a/backend/domain/repository/ent/child.go b/backend/domain/repository/ent/child.go index a1295ea8..629ab85a 100644 --- a/backend/domain/repository/ent/child.go +++ b/backend/domain/repository/ent/child.go @@ -29,7 +29,7 @@ type Child struct { // 朝のバスに乗るかどうか IsRideMorningBus bool `json:"is_ride_morning_bus,omitempty"` // 放課後のバスに乗るかどうか - IsRideAfternoonBus bool `json:"is_ride_afternoon_bus,omitempty"` + IsRideEveningBus bool `json:"is_ride_evening_bus,omitempty"` // 持ち物が欠けていないかをチェックするかどうか CheckForMissingItems bool `json:"check_for_missing_items,omitempty"` // HasBag holds the value of the "has_bag" field. @@ -129,7 +129,7 @@ func (*Child) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { - case child.FieldIsRideMorningBus, child.FieldIsRideAfternoonBus, child.FieldCheckForMissingItems, child.FieldHasBag, child.FieldHasLunchBox, child.FieldHasWaterBottle, child.FieldHasUmbrella, child.FieldHasOther: + case child.FieldIsRideMorningBus, child.FieldIsRideEveningBus, child.FieldCheckForMissingItems, child.FieldHasBag, child.FieldHasLunchBox, child.FieldHasWaterBottle, child.FieldHasUmbrella, child.FieldHasOther: values[i] = new(sql.NullBool) case child.FieldAge: values[i] = new(sql.NullInt64) @@ -188,11 +188,11 @@ func (c *Child) assignValues(columns []string, values []any) error { } else if value.Valid { c.IsRideMorningBus = value.Bool } - case child.FieldIsRideAfternoonBus: + case child.FieldIsRideEveningBus: if value, ok := values[i].(*sql.NullBool); !ok { - return fmt.Errorf("unexpected type %T for field is_ride_afternoon_bus", values[i]) + return fmt.Errorf("unexpected type %T for field is_ride_evening_bus", values[i]) } else if value.Valid { - c.IsRideAfternoonBus = value.Bool + c.IsRideEveningBus = value.Bool } case child.FieldCheckForMissingItems: if value, ok := values[i].(*sql.NullBool); !ok { @@ -329,8 +329,8 @@ func (c *Child) String() string { builder.WriteString("is_ride_morning_bus=") builder.WriteString(fmt.Sprintf("%v", c.IsRideMorningBus)) builder.WriteString(", ") - builder.WriteString("is_ride_afternoon_bus=") - builder.WriteString(fmt.Sprintf("%v", c.IsRideAfternoonBus)) + builder.WriteString("is_ride_evening_bus=") + builder.WriteString(fmt.Sprintf("%v", c.IsRideEveningBus)) builder.WriteString(", ") builder.WriteString("check_for_missing_items=") builder.WriteString(fmt.Sprintf("%v", c.CheckForMissingItems)) diff --git a/backend/domain/repository/ent/child/child.go b/backend/domain/repository/ent/child/child.go index 85b9403f..ee71c92c 100644 --- a/backend/domain/repository/ent/child/child.go +++ b/backend/domain/repository/ent/child/child.go @@ -24,8 +24,8 @@ const ( FieldSex = "sex" // FieldIsRideMorningBus holds the string denoting the is_ride_morning_bus field in the database. FieldIsRideMorningBus = "is_ride_morning_bus" - // FieldIsRideAfternoonBus holds the string denoting the is_ride_afternoon_bus field in the database. - FieldIsRideAfternoonBus = "is_ride_afternoon_bus" + // FieldIsRideEveningBus holds the string denoting the is_ride_evening_bus field in the database. + FieldIsRideEveningBus = "is_ride_evening_bus" // FieldCheckForMissingItems holds the string denoting the check_for_missing_items field in the database. FieldCheckForMissingItems = "check_for_missing_items" // FieldHasBag holds the string denoting the has_bag field in the database. @@ -98,7 +98,7 @@ var Columns = []string{ FieldAge, FieldSex, FieldIsRideMorningBus, - FieldIsRideAfternoonBus, + FieldIsRideEveningBus, FieldCheckForMissingItems, FieldHasBag, FieldHasLunchBox, @@ -134,8 +134,8 @@ func ValidColumn(column string) bool { var ( // DefaultIsRideMorningBus holds the default value on creation for the "is_ride_morning_bus" field. DefaultIsRideMorningBus bool - // DefaultIsRideAfternoonBus holds the default value on creation for the "is_ride_afternoon_bus" field. - DefaultIsRideAfternoonBus bool + // DefaultIsRideEveningBus holds the default value on creation for the "is_ride_evening_bus" field. + DefaultIsRideEveningBus bool // DefaultCheckForMissingItems holds the default value on creation for the "check_for_missing_items" field. DefaultCheckForMissingItems bool // DefaultHasBag holds the default value on creation for the "has_bag" field. @@ -210,9 +210,9 @@ func ByIsRideMorningBus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldIsRideMorningBus, opts...).ToFunc() } -// ByIsRideAfternoonBus orders the results by the is_ride_afternoon_bus field. -func ByIsRideAfternoonBus(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldIsRideAfternoonBus, opts...).ToFunc() +// ByIsRideEveningBus orders the results by the is_ride_evening_bus field. +func ByIsRideEveningBus(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldIsRideEveningBus, opts...).ToFunc() } // ByCheckForMissingItems orders the results by the check_for_missing_items field. diff --git a/backend/domain/repository/ent/child/where.go b/backend/domain/repository/ent/child/where.go index 14d5b78e..9ba51ff3 100644 --- a/backend/domain/repository/ent/child/where.go +++ b/backend/domain/repository/ent/child/where.go @@ -71,9 +71,9 @@ func IsRideMorningBus(v bool) predicate.Child { return predicate.Child(sql.FieldEQ(FieldIsRideMorningBus, v)) } -// IsRideAfternoonBus applies equality check predicate on the "is_ride_afternoon_bus" field. It's identical to IsRideAfternoonBusEQ. -func IsRideAfternoonBus(v bool) predicate.Child { - return predicate.Child(sql.FieldEQ(FieldIsRideAfternoonBus, v)) +// IsRideEveningBus applies equality check predicate on the "is_ride_evening_bus" field. It's identical to IsRideEveningBusEQ. +func IsRideEveningBus(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldIsRideEveningBus, v)) } // CheckForMissingItems applies equality check predicate on the "check_for_missing_items" field. It's identical to CheckForMissingItemsEQ. @@ -251,14 +251,14 @@ func IsRideMorningBusNEQ(v bool) predicate.Child { return predicate.Child(sql.FieldNEQ(FieldIsRideMorningBus, v)) } -// IsRideAfternoonBusEQ applies the EQ predicate on the "is_ride_afternoon_bus" field. -func IsRideAfternoonBusEQ(v bool) predicate.Child { - return predicate.Child(sql.FieldEQ(FieldIsRideAfternoonBus, v)) +// IsRideEveningBusEQ applies the EQ predicate on the "is_ride_evening_bus" field. +func IsRideEveningBusEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldEQ(FieldIsRideEveningBus, v)) } -// IsRideAfternoonBusNEQ applies the NEQ predicate on the "is_ride_afternoon_bus" field. -func IsRideAfternoonBusNEQ(v bool) predicate.Child { - return predicate.Child(sql.FieldNEQ(FieldIsRideAfternoonBus, v)) +// IsRideEveningBusNEQ applies the NEQ predicate on the "is_ride_evening_bus" field. +func IsRideEveningBusNEQ(v bool) predicate.Child { + return predicate.Child(sql.FieldNEQ(FieldIsRideEveningBus, v)) } // CheckForMissingItemsEQ applies the EQ predicate on the "check_for_missing_items" field. diff --git a/backend/domain/repository/ent/child_create.go b/backend/domain/repository/ent/child_create.go index acc21f86..f0cc6369 100644 --- a/backend/domain/repository/ent/child_create.go +++ b/backend/domain/repository/ent/child_create.go @@ -58,16 +58,16 @@ func (cc *ChildCreate) SetNillableIsRideMorningBus(b *bool) *ChildCreate { return cc } -// SetIsRideAfternoonBus sets the "is_ride_afternoon_bus" field. -func (cc *ChildCreate) SetIsRideAfternoonBus(b bool) *ChildCreate { - cc.mutation.SetIsRideAfternoonBus(b) +// SetIsRideEveningBus sets the "is_ride_evening_bus" field. +func (cc *ChildCreate) SetIsRideEveningBus(b bool) *ChildCreate { + cc.mutation.SetIsRideEveningBus(b) return cc } -// SetNillableIsRideAfternoonBus sets the "is_ride_afternoon_bus" field if the given value is not nil. -func (cc *ChildCreate) SetNillableIsRideAfternoonBus(b *bool) *ChildCreate { +// SetNillableIsRideEveningBus sets the "is_ride_evening_bus" field if the given value is not nil. +func (cc *ChildCreate) SetNillableIsRideEveningBus(b *bool) *ChildCreate { if b != nil { - cc.SetIsRideAfternoonBus(*b) + cc.SetIsRideEveningBus(*b) } return cc } @@ -320,9 +320,9 @@ func (cc *ChildCreate) defaults() { v := child.DefaultIsRideMorningBus cc.mutation.SetIsRideMorningBus(v) } - if _, ok := cc.mutation.IsRideAfternoonBus(); !ok { - v := child.DefaultIsRideAfternoonBus - cc.mutation.SetIsRideAfternoonBus(v) + if _, ok := cc.mutation.IsRideEveningBus(); !ok { + v := child.DefaultIsRideEveningBus + cc.mutation.SetIsRideEveningBus(v) } if _, ok := cc.mutation.CheckForMissingItems(); !ok { v := child.DefaultCheckForMissingItems @@ -381,8 +381,8 @@ func (cc *ChildCreate) check() error { if _, ok := cc.mutation.IsRideMorningBus(); !ok { return &ValidationError{Name: "is_ride_morning_bus", err: errors.New(`ent: missing required field "Child.is_ride_morning_bus"`)} } - if _, ok := cc.mutation.IsRideAfternoonBus(); !ok { - return &ValidationError{Name: "is_ride_afternoon_bus", err: errors.New(`ent: missing required field "Child.is_ride_afternoon_bus"`)} + if _, ok := cc.mutation.IsRideEveningBus(); !ok { + return &ValidationError{Name: "is_ride_evening_bus", err: errors.New(`ent: missing required field "Child.is_ride_evening_bus"`)} } if _, ok := cc.mutation.CheckForMissingItems(); !ok { return &ValidationError{Name: "check_for_missing_items", err: errors.New(`ent: missing required field "Child.check_for_missing_items"`)} @@ -459,9 +459,9 @@ func (cc *ChildCreate) createSpec() (*Child, *sqlgraph.CreateSpec) { _spec.SetField(child.FieldIsRideMorningBus, field.TypeBool, value) _node.IsRideMorningBus = value } - if value, ok := cc.mutation.IsRideAfternoonBus(); ok { - _spec.SetField(child.FieldIsRideAfternoonBus, field.TypeBool, value) - _node.IsRideAfternoonBus = value + if value, ok := cc.mutation.IsRideEveningBus(); ok { + _spec.SetField(child.FieldIsRideEveningBus, field.TypeBool, value) + _node.IsRideEveningBus = value } if value, ok := cc.mutation.CheckForMissingItems(); ok { _spec.SetField(child.FieldCheckForMissingItems, field.TypeBool, value) diff --git a/backend/domain/repository/ent/child_update.go b/backend/domain/repository/ent/child_update.go index 5d45863f..2cfeef5a 100644 --- a/backend/domain/repository/ent/child_update.go +++ b/backend/domain/repository/ent/child_update.go @@ -97,16 +97,16 @@ func (cu *ChildUpdate) SetNillableIsRideMorningBus(b *bool) *ChildUpdate { return cu } -// SetIsRideAfternoonBus sets the "is_ride_afternoon_bus" field. -func (cu *ChildUpdate) SetIsRideAfternoonBus(b bool) *ChildUpdate { - cu.mutation.SetIsRideAfternoonBus(b) +// SetIsRideEveningBus sets the "is_ride_evening_bus" field. +func (cu *ChildUpdate) SetIsRideEveningBus(b bool) *ChildUpdate { + cu.mutation.SetIsRideEveningBus(b) return cu } -// SetNillableIsRideAfternoonBus sets the "is_ride_afternoon_bus" field if the given value is not nil. -func (cu *ChildUpdate) SetNillableIsRideAfternoonBus(b *bool) *ChildUpdate { +// SetNillableIsRideEveningBus sets the "is_ride_evening_bus" field if the given value is not nil. +func (cu *ChildUpdate) SetNillableIsRideEveningBus(b *bool) *ChildUpdate { if b != nil { - cu.SetIsRideAfternoonBus(*b) + cu.SetIsRideEveningBus(*b) } return cu } @@ -451,8 +451,8 @@ func (cu *ChildUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := cu.mutation.IsRideMorningBus(); ok { _spec.SetField(child.FieldIsRideMorningBus, field.TypeBool, value) } - if value, ok := cu.mutation.IsRideAfternoonBus(); ok { - _spec.SetField(child.FieldIsRideAfternoonBus, field.TypeBool, value) + if value, ok := cu.mutation.IsRideEveningBus(); ok { + _spec.SetField(child.FieldIsRideEveningBus, field.TypeBool, value) } if value, ok := cu.mutation.CheckForMissingItems(); ok { _spec.SetField(child.FieldCheckForMissingItems, field.TypeBool, value) @@ -754,16 +754,16 @@ func (cuo *ChildUpdateOne) SetNillableIsRideMorningBus(b *bool) *ChildUpdateOne return cuo } -// SetIsRideAfternoonBus sets the "is_ride_afternoon_bus" field. -func (cuo *ChildUpdateOne) SetIsRideAfternoonBus(b bool) *ChildUpdateOne { - cuo.mutation.SetIsRideAfternoonBus(b) +// SetIsRideEveningBus sets the "is_ride_evening_bus" field. +func (cuo *ChildUpdateOne) SetIsRideEveningBus(b bool) *ChildUpdateOne { + cuo.mutation.SetIsRideEveningBus(b) return cuo } -// SetNillableIsRideAfternoonBus sets the "is_ride_afternoon_bus" field if the given value is not nil. -func (cuo *ChildUpdateOne) SetNillableIsRideAfternoonBus(b *bool) *ChildUpdateOne { +// SetNillableIsRideEveningBus sets the "is_ride_evening_bus" field if the given value is not nil. +func (cuo *ChildUpdateOne) SetNillableIsRideEveningBus(b *bool) *ChildUpdateOne { if b != nil { - cuo.SetIsRideAfternoonBus(*b) + cuo.SetIsRideEveningBus(*b) } return cuo } @@ -1138,8 +1138,8 @@ func (cuo *ChildUpdateOne) sqlSave(ctx context.Context) (_node *Child, err error if value, ok := cuo.mutation.IsRideMorningBus(); ok { _spec.SetField(child.FieldIsRideMorningBus, field.TypeBool, value) } - if value, ok := cuo.mutation.IsRideAfternoonBus(); ok { - _spec.SetField(child.FieldIsRideAfternoonBus, field.TypeBool, value) + if value, ok := cuo.mutation.IsRideEveningBus(); ok { + _spec.SetField(child.FieldIsRideEveningBus, field.TypeBool, value) } if value, ok := cuo.mutation.CheckForMissingItems(); ok { _spec.SetField(child.FieldCheckForMissingItems, field.TypeBool, value) diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 057d17c7..7b75df34 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -69,7 +69,7 @@ var ( {Name: "age", Type: field.TypeInt}, {Name: "sex", Type: field.TypeEnum, Enums: []string{"man", "women", "other"}}, {Name: "is_ride_morning_bus", Type: field.TypeBool, Default: false}, - {Name: "is_ride_afternoon_bus", Type: field.TypeBool, Default: false}, + {Name: "is_ride_evening_bus", Type: field.TypeBool, Default: false}, {Name: "check_for_missing_items", Type: field.TypeBool, Default: false}, {Name: "has_bag", Type: field.TypeBool, Default: true}, {Name: "has_lunch_box", Type: field.TypeBool, Default: true}, @@ -200,7 +200,7 @@ var ( {Name: "latitude", Type: field.TypeFloat64, Nullable: true}, {Name: "longitude", Type: field.TypeFloat64, Nullable: true}, {Name: "morning_order", Type: field.TypeInt}, - {Name: "afternoon_order", Type: field.TypeInt}, + {Name: "evening_order", Type: field.TypeInt}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "guardian_station", Type: field.TypeUUID, Unique: true, Nullable: true}, diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index 9040b126..68c634ad 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -1670,7 +1670,7 @@ type ChildMutation struct { addage *int sex *child.Sex is_ride_morning_bus *bool - is_ride_afternoon_bus *bool + is_ride_evening_bus *bool check_for_missing_items *bool has_bag *bool has_lunch_box *bool @@ -1966,40 +1966,40 @@ func (m *ChildMutation) ResetIsRideMorningBus() { m.is_ride_morning_bus = nil } -// SetIsRideAfternoonBus sets the "is_ride_afternoon_bus" field. -func (m *ChildMutation) SetIsRideAfternoonBus(b bool) { - m.is_ride_afternoon_bus = &b +// SetIsRideEveningBus sets the "is_ride_evening_bus" field. +func (m *ChildMutation) SetIsRideEveningBus(b bool) { + m.is_ride_evening_bus = &b } -// IsRideAfternoonBus returns the value of the "is_ride_afternoon_bus" field in the mutation. -func (m *ChildMutation) IsRideAfternoonBus() (r bool, exists bool) { - v := m.is_ride_afternoon_bus +// IsRideEveningBus returns the value of the "is_ride_evening_bus" field in the mutation. +func (m *ChildMutation) IsRideEveningBus() (r bool, exists bool) { + v := m.is_ride_evening_bus if v == nil { return } return *v, true } -// OldIsRideAfternoonBus returns the old "is_ride_afternoon_bus" field's value of the Child entity. +// OldIsRideEveningBus returns the old "is_ride_evening_bus" field's value of the Child entity. // If the Child object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *ChildMutation) OldIsRideAfternoonBus(ctx context.Context) (v bool, err error) { +func (m *ChildMutation) OldIsRideEveningBus(ctx context.Context) (v bool, err error) { if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldIsRideAfternoonBus is only allowed on UpdateOne operations") + return v, errors.New("OldIsRideEveningBus is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, errors.New("OldIsRideAfternoonBus requires an ID field in the mutation") + return v, errors.New("OldIsRideEveningBus requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { - return v, fmt.Errorf("querying old value for OldIsRideAfternoonBus: %w", err) + return v, fmt.Errorf("querying old value for OldIsRideEveningBus: %w", err) } - return oldValue.IsRideAfternoonBus, nil + return oldValue.IsRideEveningBus, nil } -// ResetIsRideAfternoonBus resets all changes to the "is_ride_afternoon_bus" field. -func (m *ChildMutation) ResetIsRideAfternoonBus() { - m.is_ride_afternoon_bus = nil +// ResetIsRideEveningBus resets all changes to the "is_ride_evening_bus" field. +func (m *ChildMutation) ResetIsRideEveningBus() { + m.is_ride_evening_bus = nil } // SetCheckForMissingItems sets the "check_for_missing_items" field. @@ -2577,8 +2577,8 @@ func (m *ChildMutation) Fields() []string { if m.is_ride_morning_bus != nil { fields = append(fields, child.FieldIsRideMorningBus) } - if m.is_ride_afternoon_bus != nil { - fields = append(fields, child.FieldIsRideAfternoonBus) + if m.is_ride_evening_bus != nil { + fields = append(fields, child.FieldIsRideEveningBus) } if m.check_for_missing_items != nil { fields = append(fields, child.FieldCheckForMissingItems) @@ -2620,8 +2620,8 @@ func (m *ChildMutation) Field(name string) (ent.Value, bool) { return m.Sex() case child.FieldIsRideMorningBus: return m.IsRideMorningBus() - case child.FieldIsRideAfternoonBus: - return m.IsRideAfternoonBus() + case child.FieldIsRideEveningBus: + return m.IsRideEveningBus() case child.FieldCheckForMissingItems: return m.CheckForMissingItems() case child.FieldHasBag: @@ -2655,8 +2655,8 @@ func (m *ChildMutation) OldField(ctx context.Context, name string) (ent.Value, e return m.OldSex(ctx) case child.FieldIsRideMorningBus: return m.OldIsRideMorningBus(ctx) - case child.FieldIsRideAfternoonBus: - return m.OldIsRideAfternoonBus(ctx) + case child.FieldIsRideEveningBus: + return m.OldIsRideEveningBus(ctx) case child.FieldCheckForMissingItems: return m.OldCheckForMissingItems(ctx) case child.FieldHasBag: @@ -2710,12 +2710,12 @@ func (m *ChildMutation) SetField(name string, value ent.Value) error { } m.SetIsRideMorningBus(v) return nil - case child.FieldIsRideAfternoonBus: + case child.FieldIsRideEveningBus: v, ok := value.(bool) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetIsRideAfternoonBus(v) + m.SetIsRideEveningBus(v) return nil case child.FieldCheckForMissingItems: v, ok := value.(bool) @@ -2849,8 +2849,8 @@ func (m *ChildMutation) ResetField(name string) error { case child.FieldIsRideMorningBus: m.ResetIsRideMorningBus() return nil - case child.FieldIsRideAfternoonBus: - m.ResetIsRideAfternoonBus() + case child.FieldIsRideEveningBus: + m.ResetIsRideEveningBus() return nil case child.FieldCheckForMissingItems: m.ResetCheckForMissingItems() @@ -5995,28 +5995,28 @@ func (m *NurseryMutation) ResetEdge(name string) error { // StationMutation represents an operation that mutates the Station nodes in the graph. type StationMutation struct { config - op Op - typ string - id *uuid.UUID - latitude *float64 - addlatitude *float64 - longitude *float64 - addlongitude *float64 - morning_order *int - addmorning_order *int - afternoon_order *int - addafternoon_order *int - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - guardian *uuid.UUID - clearedguardian bool - bus map[uuid.UUID]struct{} - removedbus map[uuid.UUID]struct{} - clearedbus bool - done bool - oldValue func(context.Context) (*Station, error) - predicates []predicate.Station + op Op + typ string + id *uuid.UUID + latitude *float64 + addlatitude *float64 + longitude *float64 + addlongitude *float64 + morning_order *int + addmorning_order *int + evening_order *int + addevening_order *int + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + guardian *uuid.UUID + clearedguardian bool + bus map[uuid.UUID]struct{} + removedbus map[uuid.UUID]struct{} + clearedbus bool + done bool + oldValue func(context.Context) (*Station, error) + predicates []predicate.Station } var _ ent.Mutation = (*StationMutation)(nil) @@ -6319,60 +6319,60 @@ func (m *StationMutation) ResetMorningOrder() { m.addmorning_order = nil } -// SetAfternoonOrder sets the "afternoon_order" field. -func (m *StationMutation) SetAfternoonOrder(i int) { - m.afternoon_order = &i - m.addafternoon_order = nil +// SetEveningOrder sets the "evening_order" field. +func (m *StationMutation) SetEveningOrder(i int) { + m.evening_order = &i + m.addevening_order = nil } -// AfternoonOrder returns the value of the "afternoon_order" field in the mutation. -func (m *StationMutation) AfternoonOrder() (r int, exists bool) { - v := m.afternoon_order +// EveningOrder returns the value of the "evening_order" field in the mutation. +func (m *StationMutation) EveningOrder() (r int, exists bool) { + v := m.evening_order if v == nil { return } return *v, true } -// OldAfternoonOrder returns the old "afternoon_order" field's value of the Station entity. +// OldEveningOrder returns the old "evening_order" field's value of the Station entity. // If the Station object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *StationMutation) OldAfternoonOrder(ctx context.Context) (v int, err error) { +func (m *StationMutation) OldEveningOrder(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldAfternoonOrder is only allowed on UpdateOne operations") + return v, errors.New("OldEveningOrder is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, errors.New("OldAfternoonOrder requires an ID field in the mutation") + return v, errors.New("OldEveningOrder requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { - return v, fmt.Errorf("querying old value for OldAfternoonOrder: %w", err) + return v, fmt.Errorf("querying old value for OldEveningOrder: %w", err) } - return oldValue.AfternoonOrder, nil + return oldValue.EveningOrder, nil } -// AddAfternoonOrder adds i to the "afternoon_order" field. -func (m *StationMutation) AddAfternoonOrder(i int) { - if m.addafternoon_order != nil { - *m.addafternoon_order += i +// AddEveningOrder adds i to the "evening_order" field. +func (m *StationMutation) AddEveningOrder(i int) { + if m.addevening_order != nil { + *m.addevening_order += i } else { - m.addafternoon_order = &i + m.addevening_order = &i } } -// AddedAfternoonOrder returns the value that was added to the "afternoon_order" field in this mutation. -func (m *StationMutation) AddedAfternoonOrder() (r int, exists bool) { - v := m.addafternoon_order +// AddedEveningOrder returns the value that was added to the "evening_order" field in this mutation. +func (m *StationMutation) AddedEveningOrder() (r int, exists bool) { + v := m.addevening_order if v == nil { return } return *v, true } -// ResetAfternoonOrder resets all changes to the "afternoon_order" field. -func (m *StationMutation) ResetAfternoonOrder() { - m.afternoon_order = nil - m.addafternoon_order = nil +// ResetEveningOrder resets all changes to the "evening_order" field. +func (m *StationMutation) ResetEveningOrder() { + m.evening_order = nil + m.addevening_order = nil } // SetCreatedAt sets the "created_at" field. @@ -6584,8 +6584,8 @@ func (m *StationMutation) Fields() []string { if m.morning_order != nil { fields = append(fields, station.FieldMorningOrder) } - if m.afternoon_order != nil { - fields = append(fields, station.FieldAfternoonOrder) + if m.evening_order != nil { + fields = append(fields, station.FieldEveningOrder) } if m.created_at != nil { fields = append(fields, station.FieldCreatedAt) @@ -6607,8 +6607,8 @@ func (m *StationMutation) Field(name string) (ent.Value, bool) { return m.Longitude() case station.FieldMorningOrder: return m.MorningOrder() - case station.FieldAfternoonOrder: - return m.AfternoonOrder() + case station.FieldEveningOrder: + return m.EveningOrder() case station.FieldCreatedAt: return m.CreatedAt() case station.FieldUpdatedAt: @@ -6628,8 +6628,8 @@ func (m *StationMutation) OldField(ctx context.Context, name string) (ent.Value, return m.OldLongitude(ctx) case station.FieldMorningOrder: return m.OldMorningOrder(ctx) - case station.FieldAfternoonOrder: - return m.OldAfternoonOrder(ctx) + case station.FieldEveningOrder: + return m.OldEveningOrder(ctx) case station.FieldCreatedAt: return m.OldCreatedAt(ctx) case station.FieldUpdatedAt: @@ -6664,12 +6664,12 @@ func (m *StationMutation) SetField(name string, value ent.Value) error { } m.SetMorningOrder(v) return nil - case station.FieldAfternoonOrder: + case station.FieldEveningOrder: v, ok := value.(int) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetAfternoonOrder(v) + m.SetEveningOrder(v) return nil case station.FieldCreatedAt: v, ok := value.(time.Time) @@ -6702,8 +6702,8 @@ func (m *StationMutation) AddedFields() []string { if m.addmorning_order != nil { fields = append(fields, station.FieldMorningOrder) } - if m.addafternoon_order != nil { - fields = append(fields, station.FieldAfternoonOrder) + if m.addevening_order != nil { + fields = append(fields, station.FieldEveningOrder) } return fields } @@ -6719,8 +6719,8 @@ func (m *StationMutation) AddedField(name string) (ent.Value, bool) { return m.AddedLongitude() case station.FieldMorningOrder: return m.AddedMorningOrder() - case station.FieldAfternoonOrder: - return m.AddedAfternoonOrder() + case station.FieldEveningOrder: + return m.AddedEveningOrder() } return nil, false } @@ -6751,12 +6751,12 @@ func (m *StationMutation) AddField(name string, value ent.Value) error { } m.AddMorningOrder(v) return nil - case station.FieldAfternoonOrder: + case station.FieldEveningOrder: v, ok := value.(int) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.AddAfternoonOrder(v) + m.AddEveningOrder(v) return nil } return fmt.Errorf("unknown Station numeric field %s", name) @@ -6809,8 +6809,8 @@ func (m *StationMutation) ResetField(name string) error { case station.FieldMorningOrder: m.ResetMorningOrder() return nil - case station.FieldAfternoonOrder: - m.ResetAfternoonOrder() + case station.FieldEveningOrder: + m.ResetEveningOrder() return nil case station.FieldCreatedAt: m.ResetCreatedAt() diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index 3434ca0f..a4a4a3e2 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -52,10 +52,10 @@ func init() { childDescIsRideMorningBus := childFields[4].Descriptor() // child.DefaultIsRideMorningBus holds the default value on creation for the is_ride_morning_bus field. child.DefaultIsRideMorningBus = childDescIsRideMorningBus.Default.(bool) - // childDescIsRideAfternoonBus is the schema descriptor for is_ride_afternoon_bus field. - childDescIsRideAfternoonBus := childFields[5].Descriptor() - // child.DefaultIsRideAfternoonBus holds the default value on creation for the is_ride_afternoon_bus field. - child.DefaultIsRideAfternoonBus = childDescIsRideAfternoonBus.Default.(bool) + // childDescIsRideEveningBus is the schema descriptor for is_ride_evening_bus field. + childDescIsRideEveningBus := childFields[5].Descriptor() + // child.DefaultIsRideEveningBus holds the default value on creation for the is_ride_evening_bus field. + child.DefaultIsRideEveningBus = childDescIsRideEveningBus.Default.(bool) // childDescCheckForMissingItems is the schema descriptor for check_for_missing_items field. childDescCheckForMissingItems := childFields[6].Descriptor() // child.DefaultCheckForMissingItems holds the default value on creation for the check_for_missing_items field. diff --git a/backend/domain/repository/ent/schema/child.go b/backend/domain/repository/ent/schema/child.go index 231e52a4..6b354762 100644 --- a/backend/domain/repository/ent/schema/child.go +++ b/backend/domain/repository/ent/schema/child.go @@ -23,7 +23,7 @@ func (Child) Fields() []ent.Field { field.Enum("sex"). Values("man", "women", "other"), field.Bool("is_ride_morning_bus").Default(false).Comment("朝のバスに乗るかどうか"), - field.Bool("is_ride_afternoon_bus").Default(false).Comment("放課後のバスに乗るかどうか"), + field.Bool("is_ride_evening_bus").Default(false).Comment("放課後のバスに乗るかどうか"), field.Bool("check_for_missing_items").Default(false).Comment("持ち物が欠けていないかをチェックするかどうか"), // ?: 持ち物エンティティを作成する? field.Bool("has_bag").Default(true), diff --git a/backend/domain/repository/ent/schema/station.go b/backend/domain/repository/ent/schema/station.go index d89d30ed..116ead7e 100644 --- a/backend/domain/repository/ent/schema/station.go +++ b/backend/domain/repository/ent/schema/station.go @@ -21,7 +21,7 @@ func (Station) Fields() []ent.Field { field.Float("latitude").Optional(), field.Float("longitude").Optional(), field.Int("morning_order").Comment("朝のバス停の順番"), - field.Int("afternoon_order").Comment("帰りのバス停の順番"), + field.Int("evening_order").Comment("帰りのバス停の順番"), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } diff --git a/backend/domain/repository/ent/station.go b/backend/domain/repository/ent/station.go index 318fbfc4..2edbce17 100644 --- a/backend/domain/repository/ent/station.go +++ b/backend/domain/repository/ent/station.go @@ -26,7 +26,7 @@ type Station struct { // 朝のバス停の順番 MorningOrder int `json:"morning_order,omitempty"` // 帰りのバス停の順番 - AfternoonOrder int `json:"afternoon_order,omitempty"` + EveningOrder int `json:"evening_order,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. @@ -78,7 +78,7 @@ func (*Station) scanValues(columns []string) ([]any, error) { switch columns[i] { case station.FieldLatitude, station.FieldLongitude: values[i] = new(sql.NullFloat64) - case station.FieldMorningOrder, station.FieldAfternoonOrder: + case station.FieldMorningOrder, station.FieldEveningOrder: values[i] = new(sql.NullInt64) case station.FieldCreatedAt, station.FieldUpdatedAt: values[i] = new(sql.NullTime) @@ -125,11 +125,11 @@ func (s *Station) assignValues(columns []string, values []any) error { } else if value.Valid { s.MorningOrder = int(value.Int64) } - case station.FieldAfternoonOrder: + case station.FieldEveningOrder: if value, ok := values[i].(*sql.NullInt64); !ok { - return fmt.Errorf("unexpected type %T for field afternoon_order", values[i]) + return fmt.Errorf("unexpected type %T for field evening_order", values[i]) } else if value.Valid { - s.AfternoonOrder = int(value.Int64) + s.EveningOrder = int(value.Int64) } case station.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { @@ -205,8 +205,8 @@ func (s *Station) String() string { builder.WriteString("morning_order=") builder.WriteString(fmt.Sprintf("%v", s.MorningOrder)) builder.WriteString(", ") - builder.WriteString("afternoon_order=") - builder.WriteString(fmt.Sprintf("%v", s.AfternoonOrder)) + builder.WriteString("evening_order=") + builder.WriteString(fmt.Sprintf("%v", s.EveningOrder)) builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(s.CreatedAt.Format(time.ANSIC)) diff --git a/backend/domain/repository/ent/station/station.go b/backend/domain/repository/ent/station/station.go index 0c1e63f4..73f96037 100644 --- a/backend/domain/repository/ent/station/station.go +++ b/backend/domain/repository/ent/station/station.go @@ -21,8 +21,8 @@ const ( FieldLongitude = "longitude" // FieldMorningOrder holds the string denoting the morning_order field in the database. FieldMorningOrder = "morning_order" - // FieldAfternoonOrder holds the string denoting the afternoon_order field in the database. - FieldAfternoonOrder = "afternoon_order" + // FieldEveningOrder holds the string denoting the evening_order field in the database. + FieldEveningOrder = "evening_order" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -53,7 +53,7 @@ var Columns = []string{ FieldLatitude, FieldLongitude, FieldMorningOrder, - FieldAfternoonOrder, + FieldEveningOrder, FieldCreatedAt, FieldUpdatedAt, } @@ -119,9 +119,9 @@ func ByMorningOrder(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMorningOrder, opts...).ToFunc() } -// ByAfternoonOrder orders the results by the afternoon_order field. -func ByAfternoonOrder(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldAfternoonOrder, opts...).ToFunc() +// ByEveningOrder orders the results by the evening_order field. +func ByEveningOrder(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEveningOrder, opts...).ToFunc() } // ByCreatedAt orders the results by the created_at field. diff --git a/backend/domain/repository/ent/station/where.go b/backend/domain/repository/ent/station/where.go index 3f686700..2de60d55 100644 --- a/backend/domain/repository/ent/station/where.go +++ b/backend/domain/repository/ent/station/where.go @@ -71,9 +71,9 @@ func MorningOrder(v int) predicate.Station { return predicate.Station(sql.FieldEQ(FieldMorningOrder, v)) } -// AfternoonOrder applies equality check predicate on the "afternoon_order" field. It's identical to AfternoonOrderEQ. -func AfternoonOrder(v int) predicate.Station { - return predicate.Station(sql.FieldEQ(FieldAfternoonOrder, v)) +// EveningOrder applies equality check predicate on the "evening_order" field. It's identical to EveningOrderEQ. +func EveningOrder(v int) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldEveningOrder, v)) } // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. @@ -226,44 +226,44 @@ func MorningOrderLTE(v int) predicate.Station { return predicate.Station(sql.FieldLTE(FieldMorningOrder, v)) } -// AfternoonOrderEQ applies the EQ predicate on the "afternoon_order" field. -func AfternoonOrderEQ(v int) predicate.Station { - return predicate.Station(sql.FieldEQ(FieldAfternoonOrder, v)) +// EveningOrderEQ applies the EQ predicate on the "evening_order" field. +func EveningOrderEQ(v int) predicate.Station { + return predicate.Station(sql.FieldEQ(FieldEveningOrder, v)) } -// AfternoonOrderNEQ applies the NEQ predicate on the "afternoon_order" field. -func AfternoonOrderNEQ(v int) predicate.Station { - return predicate.Station(sql.FieldNEQ(FieldAfternoonOrder, v)) +// EveningOrderNEQ applies the NEQ predicate on the "evening_order" field. +func EveningOrderNEQ(v int) predicate.Station { + return predicate.Station(sql.FieldNEQ(FieldEveningOrder, v)) } -// AfternoonOrderIn applies the In predicate on the "afternoon_order" field. -func AfternoonOrderIn(vs ...int) predicate.Station { - return predicate.Station(sql.FieldIn(FieldAfternoonOrder, vs...)) +// EveningOrderIn applies the In predicate on the "evening_order" field. +func EveningOrderIn(vs ...int) predicate.Station { + return predicate.Station(sql.FieldIn(FieldEveningOrder, vs...)) } -// AfternoonOrderNotIn applies the NotIn predicate on the "afternoon_order" field. -func AfternoonOrderNotIn(vs ...int) predicate.Station { - return predicate.Station(sql.FieldNotIn(FieldAfternoonOrder, vs...)) +// EveningOrderNotIn applies the NotIn predicate on the "evening_order" field. +func EveningOrderNotIn(vs ...int) predicate.Station { + return predicate.Station(sql.FieldNotIn(FieldEveningOrder, vs...)) } -// AfternoonOrderGT applies the GT predicate on the "afternoon_order" field. -func AfternoonOrderGT(v int) predicate.Station { - return predicate.Station(sql.FieldGT(FieldAfternoonOrder, v)) +// EveningOrderGT applies the GT predicate on the "evening_order" field. +func EveningOrderGT(v int) predicate.Station { + return predicate.Station(sql.FieldGT(FieldEveningOrder, v)) } -// AfternoonOrderGTE applies the GTE predicate on the "afternoon_order" field. -func AfternoonOrderGTE(v int) predicate.Station { - return predicate.Station(sql.FieldGTE(FieldAfternoonOrder, v)) +// EveningOrderGTE applies the GTE predicate on the "evening_order" field. +func EveningOrderGTE(v int) predicate.Station { + return predicate.Station(sql.FieldGTE(FieldEveningOrder, v)) } -// AfternoonOrderLT applies the LT predicate on the "afternoon_order" field. -func AfternoonOrderLT(v int) predicate.Station { - return predicate.Station(sql.FieldLT(FieldAfternoonOrder, v)) +// EveningOrderLT applies the LT predicate on the "evening_order" field. +func EveningOrderLT(v int) predicate.Station { + return predicate.Station(sql.FieldLT(FieldEveningOrder, v)) } -// AfternoonOrderLTE applies the LTE predicate on the "afternoon_order" field. -func AfternoonOrderLTE(v int) predicate.Station { - return predicate.Station(sql.FieldLTE(FieldAfternoonOrder, v)) +// EveningOrderLTE applies the LTE predicate on the "evening_order" field. +func EveningOrderLTE(v int) predicate.Station { + return predicate.Station(sql.FieldLTE(FieldEveningOrder, v)) } // CreatedAtEQ applies the EQ predicate on the "created_at" field. diff --git a/backend/domain/repository/ent/station_create.go b/backend/domain/repository/ent/station_create.go index f92e2bd9..f98a53b7 100644 --- a/backend/domain/repository/ent/station_create.go +++ b/backend/domain/repository/ent/station_create.go @@ -57,9 +57,9 @@ func (sc *StationCreate) SetMorningOrder(i int) *StationCreate { return sc } -// SetAfternoonOrder sets the "afternoon_order" field. -func (sc *StationCreate) SetAfternoonOrder(i int) *StationCreate { - sc.mutation.SetAfternoonOrder(i) +// SetEveningOrder sets the "evening_order" field. +func (sc *StationCreate) SetEveningOrder(i int) *StationCreate { + sc.mutation.SetEveningOrder(i) return sc } @@ -193,8 +193,8 @@ func (sc *StationCreate) check() error { if _, ok := sc.mutation.MorningOrder(); !ok { return &ValidationError{Name: "morning_order", err: errors.New(`ent: missing required field "Station.morning_order"`)} } - if _, ok := sc.mutation.AfternoonOrder(); !ok { - return &ValidationError{Name: "afternoon_order", err: errors.New(`ent: missing required field "Station.afternoon_order"`)} + if _, ok := sc.mutation.EveningOrder(); !ok { + return &ValidationError{Name: "evening_order", err: errors.New(`ent: missing required field "Station.evening_order"`)} } if _, ok := sc.mutation.CreatedAt(); !ok { return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Station.created_at"`)} @@ -249,9 +249,9 @@ func (sc *StationCreate) createSpec() (*Station, *sqlgraph.CreateSpec) { _spec.SetField(station.FieldMorningOrder, field.TypeInt, value) _node.MorningOrder = value } - if value, ok := sc.mutation.AfternoonOrder(); ok { - _spec.SetField(station.FieldAfternoonOrder, field.TypeInt, value) - _node.AfternoonOrder = value + if value, ok := sc.mutation.EveningOrder(); ok { + _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) + _node.EveningOrder = value } if value, ok := sc.mutation.CreatedAt(); ok { _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) diff --git a/backend/domain/repository/ent/station_update.go b/backend/domain/repository/ent/station_update.go index 5f7a1964..d3fc2669 100644 --- a/backend/domain/repository/ent/station_update.go +++ b/backend/domain/repository/ent/station_update.go @@ -106,24 +106,24 @@ func (su *StationUpdate) AddMorningOrder(i int) *StationUpdate { return su } -// SetAfternoonOrder sets the "afternoon_order" field. -func (su *StationUpdate) SetAfternoonOrder(i int) *StationUpdate { - su.mutation.ResetAfternoonOrder() - su.mutation.SetAfternoonOrder(i) +// SetEveningOrder sets the "evening_order" field. +func (su *StationUpdate) SetEveningOrder(i int) *StationUpdate { + su.mutation.ResetEveningOrder() + su.mutation.SetEveningOrder(i) return su } -// SetNillableAfternoonOrder sets the "afternoon_order" field if the given value is not nil. -func (su *StationUpdate) SetNillableAfternoonOrder(i *int) *StationUpdate { +// SetNillableEveningOrder sets the "evening_order" field if the given value is not nil. +func (su *StationUpdate) SetNillableEveningOrder(i *int) *StationUpdate { if i != nil { - su.SetAfternoonOrder(*i) + su.SetEveningOrder(*i) } return su } -// AddAfternoonOrder adds i to the "afternoon_order" field. -func (su *StationUpdate) AddAfternoonOrder(i int) *StationUpdate { - su.mutation.AddAfternoonOrder(i) +// AddEveningOrder adds i to the "evening_order" field. +func (su *StationUpdate) AddEveningOrder(i int) *StationUpdate { + su.mutation.AddEveningOrder(i) return su } @@ -282,11 +282,11 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := su.mutation.AddedMorningOrder(); ok { _spec.AddField(station.FieldMorningOrder, field.TypeInt, value) } - if value, ok := su.mutation.AfternoonOrder(); ok { - _spec.SetField(station.FieldAfternoonOrder, field.TypeInt, value) + if value, ok := su.mutation.EveningOrder(); ok { + _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) } - if value, ok := su.mutation.AddedAfternoonOrder(); ok { - _spec.AddField(station.FieldAfternoonOrder, field.TypeInt, value) + if value, ok := su.mutation.AddedEveningOrder(); ok { + _spec.AddField(station.FieldEveningOrder, field.TypeInt, value) } if value, ok := su.mutation.CreatedAt(); ok { _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) @@ -463,24 +463,24 @@ func (suo *StationUpdateOne) AddMorningOrder(i int) *StationUpdateOne { return suo } -// SetAfternoonOrder sets the "afternoon_order" field. -func (suo *StationUpdateOne) SetAfternoonOrder(i int) *StationUpdateOne { - suo.mutation.ResetAfternoonOrder() - suo.mutation.SetAfternoonOrder(i) +// SetEveningOrder sets the "evening_order" field. +func (suo *StationUpdateOne) SetEveningOrder(i int) *StationUpdateOne { + suo.mutation.ResetEveningOrder() + suo.mutation.SetEveningOrder(i) return suo } -// SetNillableAfternoonOrder sets the "afternoon_order" field if the given value is not nil. -func (suo *StationUpdateOne) SetNillableAfternoonOrder(i *int) *StationUpdateOne { +// SetNillableEveningOrder sets the "evening_order" field if the given value is not nil. +func (suo *StationUpdateOne) SetNillableEveningOrder(i *int) *StationUpdateOne { if i != nil { - suo.SetAfternoonOrder(*i) + suo.SetEveningOrder(*i) } return suo } -// AddAfternoonOrder adds i to the "afternoon_order" field. -func (suo *StationUpdateOne) AddAfternoonOrder(i int) *StationUpdateOne { - suo.mutation.AddAfternoonOrder(i) +// AddEveningOrder adds i to the "evening_order" field. +func (suo *StationUpdateOne) AddEveningOrder(i int) *StationUpdateOne { + suo.mutation.AddEveningOrder(i) return suo } @@ -669,11 +669,11 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e if value, ok := suo.mutation.AddedMorningOrder(); ok { _spec.AddField(station.FieldMorningOrder, field.TypeInt, value) } - if value, ok := suo.mutation.AfternoonOrder(); ok { - _spec.SetField(station.FieldAfternoonOrder, field.TypeInt, value) + if value, ok := suo.mutation.EveningOrder(); ok { + _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) } - if value, ok := suo.mutation.AddedAfternoonOrder(); ok { - _spec.AddField(station.FieldAfternoonOrder, field.TypeInt, value) + if value, ok := suo.mutation.AddedEveningOrder(); ok { + _spec.AddField(station.FieldEveningOrder, field.TypeInt, value) } if value, ok := suo.mutation.CreatedAt(); ok { _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) From 1ac797845038056584edf06117ec55ef47bd8714 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 14:36:48 +0900 Subject: [PATCH 083/771] =?UTF-8?q?chore(proto):=20=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/proto/where_child_bus/{ => v1}/health_check.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename backend/proto/where_child_bus/{ => v1}/health_check.proto (87%) diff --git a/backend/proto/where_child_bus/health_check.proto b/backend/proto/where_child_bus/v1/health_check.proto similarity index 87% rename from backend/proto/where_child_bus/health_check.proto rename to backend/proto/where_child_bus/v1/health_check.proto index 01092fbc..327e9727 100644 --- a/backend/proto/where_child_bus/health_check.proto +++ b/backend/proto/where_child_bus/v1/health_check.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package where_child_bus; +package where_child_bus.v1; service HealthcheckService { rpc Ping(PingRequest) returns (PingResponse); From e84bcb0e39ccaf2f5b185f311ee22e8f1dd39d94 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 14:37:10 +0900 Subject: [PATCH 084/771] =?UTF-8?q?feat(proto):=20resoruces.proto=E3=82=92?= =?UTF-8?q?=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/where_child_bus/resources.pb.go | 1434 ++++++++++++++++ .../go/where_child_bus/v1/health_check.pb.go | 229 +++ .../v1/health_check_grpc.pb.go | 107 ++ .../go/where_child_bus/v1/resources.pb.go | 1453 +++++++++++++++++ .../proto/where_child_bus/v1/resources.proto | 117 ++ .../where_child_bus/resources.pb.dart | 1312 +++++++++++++++ .../where_child_bus/resources.pbenum.dart | 66 + .../where_child_bus/resources.pbjson.dart | 257 +++ .../where_child_bus/resources.pbserver.dart | 14 + .../where_child_bus/v1/health_check.pb.dart | 128 ++ .../v1/health_check.pbenum.dart | 11 + .../v1/health_check.pbjson.dart | 57 + .../v1/health_check.pbserver.dart | 43 + .../where_child_bus/v1/resources.pb.dart | 1312 +++++++++++++++ .../where_child_bus/v1/resources.pbenum.dart | 72 + .../where_child_bus/v1/resources.pbjson.dart | 262 +++ .../v1/resources.pbserver.dart | 14 + .../where_child_bus/resources_pb2.py | 50 + .../where_child_bus/resources_pb2_grpc.py | 4 + .../where_child_bus/v1/health_check_pb2.py | 31 + .../v1/health_check_pb2_grpc.py | 66 + .../where_child_bus/v1/resources_pb2.py | 50 + .../where_child_bus/v1/resources_pb2_grpc.py | 4 + 23 files changed, 7093 insertions(+) create mode 100644 backend/proto-gen/go/where_child_bus/resources.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/health_check.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/health_check_grpc.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/resources.pb.go create mode 100644 backend/proto/where_child_bus/v1/resources.proto create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/resources.pb.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/resources.pbenum.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/resources.pbjson.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/resources.pbserver.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pb.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbenum.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbjson.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbserver.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbenum.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbjson.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbserver.dart create mode 100644 machine_learning/src/proto-gen/where_child_bus/resources_pb2.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/resources_pb2_grpc.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2_grpc.py diff --git a/backend/proto-gen/go/where_child_bus/resources.pb.go b/backend/proto-gen/go/where_child_bus/resources.pb.go new file mode 100644 index 00000000..817b8667 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/resources.pb.go @@ -0,0 +1,1434 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/resources.proto + +package where_child_bus + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Bus_Status int32 + +const ( + Bus_STOPPED Bus_Status = 0 + Bus_RUNNING Bus_Status = 1 + Bus_MAINTEINANCE Bus_Status = 2 +) + +// Enum value maps for Bus_Status. +var ( + Bus_Status_name = map[int32]string{ + 0: "STOPPED", + 1: "RUNNING", + 2: "MAINTEINANCE", + } + Bus_Status_value = map[string]int32{ + "STOPPED": 0, + "RUNNING": 1, + "MAINTEINANCE": 2, + } +) + +func (x Bus_Status) Enum() *Bus_Status { + p := new(Bus_Status) + *p = x + return p +} + +func (x Bus_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Bus_Status) Descriptor() protoreflect.EnumDescriptor { + return file_where_child_bus_resources_proto_enumTypes[0].Descriptor() +} + +func (Bus_Status) Type() protoreflect.EnumType { + return &file_where_child_bus_resources_proto_enumTypes[0] +} + +func (x Bus_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Bus_Status.Descriptor instead. +func (Bus_Status) EnumDescriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{2, 0} +} + +type Child_Sex int32 + +const ( + Child_MAN Child_Sex = 0 + Child_WOMEN Child_Sex = 1 + Child_OTHER Child_Sex = 2 +) + +// Enum value maps for Child_Sex. +var ( + Child_Sex_name = map[int32]string{ + 0: "MAN", + 1: "WOMEN", + 2: "OTHER", + } + Child_Sex_value = map[string]int32{ + "MAN": 0, + "WOMEN": 1, + "OTHER": 2, + } +) + +func (x Child_Sex) Enum() *Child_Sex { + p := new(Child_Sex) + *p = x + return p +} + +func (x Child_Sex) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Child_Sex) Descriptor() protoreflect.EnumDescriptor { + return file_where_child_bus_resources_proto_enumTypes[1].Descriptor() +} + +func (Child_Sex) Type() protoreflect.EnumType { + return &file_where_child_bus_resources_proto_enumTypes[1] +} + +func (x Child_Sex) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Child_Sex.Descriptor instead. +func (Child_Sex) EnumDescriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{3, 0} +} + +type ChildBusAssociation_BusType int32 + +const ( + ChildBusAssociation_MORNING ChildBusAssociation_BusType = 0 + ChildBusAssociation_AFTERNOON ChildBusAssociation_BusType = 1 +) + +// Enum value maps for ChildBusAssociation_BusType. +var ( + ChildBusAssociation_BusType_name = map[int32]string{ + 0: "MORNING", + 1: "AFTERNOON", + } + ChildBusAssociation_BusType_value = map[string]int32{ + "MORNING": 0, + "AFTERNOON": 1, + } +) + +func (x ChildBusAssociation_BusType) Enum() *ChildBusAssociation_BusType { + p := new(ChildBusAssociation_BusType) + *p = x + return p +} + +func (x ChildBusAssociation_BusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChildBusAssociation_BusType) Descriptor() protoreflect.EnumDescriptor { + return file_where_child_bus_resources_proto_enumTypes[2].Descriptor() +} + +func (ChildBusAssociation_BusType) Type() protoreflect.EnumType { + return &file_where_child_bus_resources_proto_enumTypes[2] +} + +func (x ChildBusAssociation_BusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ChildBusAssociation_BusType.Descriptor instead. +func (ChildBusAssociation_BusType) EnumDescriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{5, 0} +} + +type Nursery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryCode string `protobuf:"bytes,2,opt,name=nursery_code,json=nurseryCode,proto3" json:"nursery_code,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` + EncryptedPassword string `protobuf:"bytes,7,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Nursery) Reset() { + *x = Nursery{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Nursery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Nursery) ProtoMessage() {} + +func (x *Nursery) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_resources_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Nursery.ProtoReflect.Descriptor instead. +func (*Nursery) Descriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{0} +} + +func (x *Nursery) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Nursery) GetNurseryCode() string { + if x != nil { + return x.NurseryCode + } + return "" +} + +func (x *Nursery) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Nursery) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Nursery) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *Nursery) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *Nursery) GetEncryptedPassword() string { + if x != nil { + return x.EncryptedPassword + } + return "" +} + +func (x *Nursery) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Nursery) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Guardian struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + EncryptedPassword string `protobuf:"bytes,6,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Guardian) Reset() { + *x = Guardian{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Guardian) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Guardian) ProtoMessage() {} + +func (x *Guardian) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_resources_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Guardian.ProtoReflect.Descriptor instead. +func (*Guardian) Descriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{1} +} + +func (x *Guardian) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Guardian) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *Guardian) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Guardian) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *Guardian) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *Guardian) GetEncryptedPassword() string { + if x != nil { + return x.EncryptedPassword + } + return "" +} + +func (x *Guardian) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Guardian) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Bus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + PlateNumber string `protobuf:"bytes,4,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` + Status Bus_Status `protobuf:"varint,5,opt,name=status,proto3,enum=where_child_bus.Bus_Status" json:"status,omitempty"` + // 緯度経度 + Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Bus) Reset() { + *x = Bus{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bus) ProtoMessage() {} + +func (x *Bus) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_resources_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bus.ProtoReflect.Descriptor instead. +func (*Bus) Descriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{2} +} + +func (x *Bus) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Bus) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *Bus) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Bus) GetPlateNumber() string { + if x != nil { + return x.PlateNumber + } + return "" +} + +func (x *Bus) GetStatus() Bus_Status { + if x != nil { + return x.Status + } + return Bus_STOPPED +} + +func (x *Bus) GetLatitude() float64 { + if x != nil { + return x.Latitude + } + return 0 +} + +func (x *Bus) GetLongitude() float64 { + if x != nil { + return x.Longitude + } + return 0 +} + +func (x *Bus) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Bus) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Child struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + GuardianId string `protobuf:"bytes,3,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Age int32 `protobuf:"varint,5,opt,name=age,proto3" json:"age,omitempty"` + Sex Child_Sex `protobuf:"varint,6,opt,name=sex,proto3,enum=where_child_bus.Child_Sex" json:"sex,omitempty"` + IsRideMorningBus bool `protobuf:"varint,7,opt,name=is_ride_morning_bus,json=isRideMorningBus,proto3" json:"is_ride_morning_bus,omitempty"` + IsRideAfternoonBus bool `protobuf:"varint,8,opt,name=is_ride_afternoon_bus,json=isRideAfternoonBus,proto3" json:"is_ride_afternoon_bus,omitempty"` + CheckForMissingItems bool `protobuf:"varint,9,opt,name=check_for_missing_items,json=checkForMissingItems,proto3" json:"check_for_missing_items,omitempty"` + HasBag bool `protobuf:"varint,10,opt,name=has_bag,json=hasBag,proto3" json:"has_bag,omitempty"` + HasLunchBox bool `protobuf:"varint,11,opt,name=has_lunch_box,json=hasLunchBox,proto3" json:"has_lunch_box,omitempty"` + HasWaterBottle bool `protobuf:"varint,12,opt,name=has_water_bottle,json=hasWaterBottle,proto3" json:"has_water_bottle,omitempty"` + HasUmbrera bool `protobuf:"varint,13,opt,name=has_umbrera,json=hasUmbrera,proto3" json:"has_umbrera,omitempty"` + HasOther bool `protobuf:"varint,14,opt,name=has_other,json=hasOther,proto3" json:"has_other,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Child) Reset() { + *x = Child{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Child) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Child) ProtoMessage() {} + +func (x *Child) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_resources_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Child.ProtoReflect.Descriptor instead. +func (*Child) Descriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{3} +} + +func (x *Child) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Child) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *Child) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +func (x *Child) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Child) GetAge() int32 { + if x != nil { + return x.Age + } + return 0 +} + +func (x *Child) GetSex() Child_Sex { + if x != nil { + return x.Sex + } + return Child_MAN +} + +func (x *Child) GetIsRideMorningBus() bool { + if x != nil { + return x.IsRideMorningBus + } + return false +} + +func (x *Child) GetIsRideAfternoonBus() bool { + if x != nil { + return x.IsRideAfternoonBus + } + return false +} + +func (x *Child) GetCheckForMissingItems() bool { + if x != nil { + return x.CheckForMissingItems + } + return false +} + +func (x *Child) GetHasBag() bool { + if x != nil { + return x.HasBag + } + return false +} + +func (x *Child) GetHasLunchBox() bool { + if x != nil { + return x.HasLunchBox + } + return false +} + +func (x *Child) GetHasWaterBottle() bool { + if x != nil { + return x.HasWaterBottle + } + return false +} + +func (x *Child) GetHasUmbrera() bool { + if x != nil { + return x.HasUmbrera + } + return false +} + +func (x *Child) GetHasOther() bool { + if x != nil { + return x.HasOther + } + return false +} + +func (x *Child) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Child) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Station struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + GuardianId string `protobuf:"bytes,2,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` + Latitude float64 `protobuf:"fixed64,3,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,4,opt,name=longitude,proto3" json:"longitude,omitempty"` + MorningOrder int32 `protobuf:"varint,5,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` + AfternoonOrder int32 `protobuf:"varint,6,opt,name=afternoon_order,json=afternoonOrder,proto3" json:"afternoon_order,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Station) Reset() { + *x = Station{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Station) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Station) ProtoMessage() {} + +func (x *Station) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_resources_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Station.ProtoReflect.Descriptor instead. +func (*Station) Descriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{4} +} + +func (x *Station) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Station) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +func (x *Station) GetLatitude() float64 { + if x != nil { + return x.Latitude + } + return 0 +} + +func (x *Station) GetLongitude() float64 { + if x != nil { + return x.Longitude + } + return 0 +} + +func (x *Station) GetMorningOrder() int32 { + if x != nil { + return x.MorningOrder + } + return 0 +} + +func (x *Station) GetAfternoonOrder() int32 { + if x != nil { + return x.AfternoonOrder + } + return 0 +} + +func (x *Station) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Station) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type ChildBusAssociation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + ChildId string `protobuf:"bytes,3,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` + BusType ChildBusAssociation_BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.ChildBusAssociation_BusType" json:"bus_type,omitempty"` +} + +func (x *ChildBusAssociation) Reset() { + *x = ChildBusAssociation{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChildBusAssociation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChildBusAssociation) ProtoMessage() {} + +func (x *ChildBusAssociation) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_resources_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChildBusAssociation.ProtoReflect.Descriptor instead. +func (*ChildBusAssociation) Descriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{5} +} + +func (x *ChildBusAssociation) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChildBusAssociation) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *ChildBusAssociation) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +func (x *ChildBusAssociation) GetBusType() ChildBusAssociation_BusType { + if x != nil { + return x.BusType + } + return ChildBusAssociation_MORNING +} + +type BusStationAssociation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + StationId string `protobuf:"bytes,2,opt,name=station_id,json=stationId,proto3" json:"station_id,omitempty"` +} + +func (x *BusStationAssociation) Reset() { + *x = BusStationAssociation{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BusStationAssociation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BusStationAssociation) ProtoMessage() {} + +func (x *BusStationAssociation) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_resources_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BusStationAssociation.ProtoReflect.Descriptor instead. +func (*BusStationAssociation) Descriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{6} +} + +func (x *BusStationAssociation) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *BusStationAssociation) GetStationId() string { + if x != nil { + return x.StationId + } + return "" +} + +type ChildPhoto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` + S3Bucket string `protobuf:"bytes,3,opt,name=s3_bucket,json=s3Bucket,proto3" json:"s3_bucket,omitempty"` + S3Key string `protobuf:"bytes,4,opt,name=s3_key,json=s3Key,proto3" json:"s3_key,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *ChildPhoto) Reset() { + *x = ChildPhoto{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChildPhoto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChildPhoto) ProtoMessage() {} + +func (x *ChildPhoto) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_resources_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChildPhoto.ProtoReflect.Descriptor instead. +func (*ChildPhoto) Descriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{7} +} + +func (x *ChildPhoto) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChildPhoto) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +func (x *ChildPhoto) GetS3Bucket() string { + if x != nil { + return x.S3Bucket + } + return "" +} + +func (x *ChildPhoto) GetS3Key() string { + if x != nil { + return x.S3Key + } + return "" +} + +func (x *ChildPhoto) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *ChildPhoto) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type BoardingRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` + BusId string `protobuf:"bytes,3,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + IsBoarding bool `protobuf:"varint,4,opt,name=is_boarding,json=isBoarding,proto3" json:"is_boarding,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *BoardingRecord) Reset() { + *x = BoardingRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoardingRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoardingRecord) ProtoMessage() {} + +func (x *BoardingRecord) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_resources_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoardingRecord.ProtoReflect.Descriptor instead. +func (*BoardingRecord) Descriptor() ([]byte, []int) { + return file_where_child_bus_resources_proto_rawDescGZIP(), []int{8} +} + +func (x *BoardingRecord) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BoardingRecord) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +func (x *BoardingRecord) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *BoardingRecord) GetIsBoarding() bool { + if x != nil { + return x.IsBoarding + } + return false +} + +func (x *BoardingRecord) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +var File_where_child_bus_resources_proto protoreflect.FileDescriptor + +var file_where_child_bus_resources_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x02, 0x0a, 0x07, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, + 0x02, 0x0a, 0x08, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x86, 0x03, 0x0a, + 0x03, 0x62, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x62, 0x75, 0x73, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, + 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, + 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, + 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, + 0x50, 0x50, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, 0x4e, 0x41, + 0x4e, 0x43, 0x45, 0x10, 0x02, 0x22, 0x85, 0x05, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, + 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6d, + 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, + 0x75, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x69, 0x73, 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x6e, 0x6f, 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x12, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x6e, 0x6f, + 0x6f, 0x6e, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, + 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, + 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, + 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, + 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, + 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, + 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, + 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, + 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, + 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, + 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, + 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, + 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x24, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x07, + 0x0a, 0x03, 0x4d, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x4f, 0x4d, 0x45, 0x4e, + 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x22, 0xb8, 0x02, + 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, + 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, + 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x66, 0x74, + 0x65, 0x72, 0x6e, 0x6f, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0e, 0x61, 0x66, 0x74, 0x65, 0x72, 0x6e, 0x6f, 0x6f, 0x6e, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xc7, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x49, 0x64, 0x12, 0x47, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x25, 0x0a, 0x07, 0x42, + 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x46, 0x54, 0x45, 0x52, 0x4e, 0x4f, 0x4f, 0x4e, + 0x10, 0x01, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, + 0x33, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x73, 0x33, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, + 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, + 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0xcc, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x42, 0x0e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, + 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0xca, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0xe2, 0x02, 0x19, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_resources_proto_rawDescOnce sync.Once + file_where_child_bus_resources_proto_rawDescData = file_where_child_bus_resources_proto_rawDesc +) + +func file_where_child_bus_resources_proto_rawDescGZIP() []byte { + file_where_child_bus_resources_proto_rawDescOnce.Do(func() { + file_where_child_bus_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_resources_proto_rawDescData) + }) + return file_where_child_bus_resources_proto_rawDescData +} + +var file_where_child_bus_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_where_child_bus_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_where_child_bus_resources_proto_goTypes = []interface{}{ + (Bus_Status)(0), // 0: where_child_bus.bus.Status + (Child_Sex)(0), // 1: where_child_bus.Child.Sex + (ChildBusAssociation_BusType)(0), // 2: where_child_bus.ChildBusAssociation.BusType + (*Nursery)(nil), // 3: where_child_bus.Nursery + (*Guardian)(nil), // 4: where_child_bus.Guardian + (*Bus)(nil), // 5: where_child_bus.bus + (*Child)(nil), // 6: where_child_bus.Child + (*Station)(nil), // 7: where_child_bus.Station + (*ChildBusAssociation)(nil), // 8: where_child_bus.ChildBusAssociation + (*BusStationAssociation)(nil), // 9: where_child_bus.BusStationAssociation + (*ChildPhoto)(nil), // 10: where_child_bus.ChildPhoto + (*BoardingRecord)(nil), // 11: where_child_bus.BoardingRecord + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp +} +var file_where_child_bus_resources_proto_depIdxs = []int32{ + 12, // 0: where_child_bus.Nursery.created_at:type_name -> google.protobuf.Timestamp + 12, // 1: where_child_bus.Nursery.updated_at:type_name -> google.protobuf.Timestamp + 12, // 2: where_child_bus.Guardian.created_at:type_name -> google.protobuf.Timestamp + 12, // 3: where_child_bus.Guardian.updated_at:type_name -> google.protobuf.Timestamp + 0, // 4: where_child_bus.bus.status:type_name -> where_child_bus.bus.Status + 12, // 5: where_child_bus.bus.created_at:type_name -> google.protobuf.Timestamp + 12, // 6: where_child_bus.bus.updated_at:type_name -> google.protobuf.Timestamp + 1, // 7: where_child_bus.Child.sex:type_name -> where_child_bus.Child.Sex + 12, // 8: where_child_bus.Child.created_at:type_name -> google.protobuf.Timestamp + 12, // 9: where_child_bus.Child.updated_at:type_name -> google.protobuf.Timestamp + 12, // 10: where_child_bus.Station.created_at:type_name -> google.protobuf.Timestamp + 12, // 11: where_child_bus.Station.updated_at:type_name -> google.protobuf.Timestamp + 2, // 12: where_child_bus.ChildBusAssociation.bus_type:type_name -> where_child_bus.ChildBusAssociation.BusType + 12, // 13: where_child_bus.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp + 12, // 14: where_child_bus.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp + 12, // 15: where_child_bus.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_where_child_bus_resources_proto_init() } +func file_where_child_bus_resources_proto_init() { + if File_where_child_bus_resources_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_where_child_bus_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Nursery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Guardian); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Child); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Station); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_resources_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChildBusAssociation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_resources_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BusStationAssociation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_resources_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChildPhoto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_resources_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoardingRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_resources_proto_rawDesc, + NumEnums: 3, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_where_child_bus_resources_proto_goTypes, + DependencyIndexes: file_where_child_bus_resources_proto_depIdxs, + EnumInfos: file_where_child_bus_resources_proto_enumTypes, + MessageInfos: file_where_child_bus_resources_proto_msgTypes, + }.Build() + File_where_child_bus_resources_proto = out.File + file_where_child_bus_resources_proto_rawDesc = nil + file_where_child_bus_resources_proto_goTypes = nil + file_where_child_bus_resources_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/where_child_bus/v1/health_check.pb.go b/backend/proto-gen/go/where_child_bus/v1/health_check.pb.go new file mode 100644 index 00000000..78d644b1 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/health_check.pb.go @@ -0,0 +1,229 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/v1/health_check.proto + +package where_child_busv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *PingRequest) Reset() { + *x = PingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_health_check_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingRequest) ProtoMessage() {} + +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_health_check_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_health_check_proto_rawDescGZIP(), []int{0} +} + +func (x *PingRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type PingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *PingResponse) Reset() { + *x = PingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_health_check_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingResponse) ProtoMessage() {} + +func (x *PingResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_health_check_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. +func (*PingResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_health_check_proto_rawDescGZIP(), []int{1} +} + +func (x *PingResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_where_child_bus_v1_health_check_proto protoreflect.FileDescriptor + +var file_where_child_bus_v1_health_check_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x21, 0x0a, 0x0b, 0x50, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x28, + 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x5f, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, + 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf3, 0x01, 0x0a, 0x16, 0x63, 0x6f, + 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_v1_health_check_proto_rawDescOnce sync.Once + file_where_child_bus_v1_health_check_proto_rawDescData = file_where_child_bus_v1_health_check_proto_rawDesc +) + +func file_where_child_bus_v1_health_check_proto_rawDescGZIP() []byte { + file_where_child_bus_v1_health_check_proto_rawDescOnce.Do(func() { + file_where_child_bus_v1_health_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_v1_health_check_proto_rawDescData) + }) + return file_where_child_bus_v1_health_check_proto_rawDescData +} + +var file_where_child_bus_v1_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_where_child_bus_v1_health_check_proto_goTypes = []interface{}{ + (*PingRequest)(nil), // 0: where_child_bus.v1.PingRequest + (*PingResponse)(nil), // 1: where_child_bus.v1.PingResponse +} +var file_where_child_bus_v1_health_check_proto_depIdxs = []int32{ + 0, // 0: where_child_bus.v1.HealthcheckService.Ping:input_type -> where_child_bus.v1.PingRequest + 1, // 1: where_child_bus.v1.HealthcheckService.Ping:output_type -> where_child_bus.v1.PingResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_where_child_bus_v1_health_check_proto_init() } +func file_where_child_bus_v1_health_check_proto_init() { + if File_where_child_bus_v1_health_check_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_where_child_bus_v1_health_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_health_check_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_v1_health_check_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_where_child_bus_v1_health_check_proto_goTypes, + DependencyIndexes: file_where_child_bus_v1_health_check_proto_depIdxs, + MessageInfos: file_where_child_bus_v1_health_check_proto_msgTypes, + }.Build() + File_where_child_bus_v1_health_check_proto = out.File + file_where_child_bus_v1_health_check_proto_rawDesc = nil + file_where_child_bus_v1_health_check_proto_goTypes = nil + file_where_child_bus_v1_health_check_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/where_child_bus/v1/health_check_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/health_check_grpc.pb.go new file mode 100644 index 00000000..44529239 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/health_check_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: where_child_bus/v1/health_check.proto + +package where_child_busv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + HealthcheckService_Ping_FullMethodName = "/where_child_bus.v1.HealthcheckService/Ping" +) + +// HealthcheckServiceClient is the client API for HealthcheckService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type HealthcheckServiceClient interface { + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) +} + +type healthcheckServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHealthcheckServiceClient(cc grpc.ClientConnInterface) HealthcheckServiceClient { + return &healthcheckServiceClient{cc} +} + +func (c *healthcheckServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { + out := new(PingResponse) + err := c.cc.Invoke(ctx, HealthcheckService_Ping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HealthcheckServiceServer is the server API for HealthcheckService service. +// All implementations should embed UnimplementedHealthcheckServiceServer +// for forward compatibility +type HealthcheckServiceServer interface { + Ping(context.Context, *PingRequest) (*PingResponse, error) +} + +// UnimplementedHealthcheckServiceServer should be embedded to have forward compatible implementations. +type UnimplementedHealthcheckServiceServer struct { +} + +func (UnimplementedHealthcheckServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} + +// UnsafeHealthcheckServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HealthcheckServiceServer will +// result in compilation errors. +type UnsafeHealthcheckServiceServer interface { + mustEmbedUnimplementedHealthcheckServiceServer() +} + +func RegisterHealthcheckServiceServer(s grpc.ServiceRegistrar, srv HealthcheckServiceServer) { + s.RegisterService(&HealthcheckService_ServiceDesc, srv) +} + +func _HealthcheckService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealthcheckServiceServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HealthcheckService_Ping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealthcheckServiceServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// HealthcheckService_ServiceDesc is the grpc.ServiceDesc for HealthcheckService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HealthcheckService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "where_child_bus.v1.HealthcheckService", + HandlerType: (*HealthcheckServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Ping", + Handler: _HealthcheckService_Ping_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "where_child_bus/v1/health_check.proto", +} diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go new file mode 100644 index 00000000..1026e351 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -0,0 +1,1453 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/v1/resources.proto + +package where_child_busv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Bus_Status int32 + +const ( + Bus_STATUS_UNSPECIFIED Bus_Status = 0 + Bus_STATUS_STOPPED Bus_Status = 1 + Bus_STATUS_RUNNING Bus_Status = 2 + Bus_STATUS_MAINTEINANCE Bus_Status = 3 +) + +// Enum value maps for Bus_Status. +var ( + Bus_Status_name = map[int32]string{ + 0: "STATUS_UNSPECIFIED", + 1: "STATUS_STOPPED", + 2: "STATUS_RUNNING", + 3: "STATUS_MAINTEINANCE", + } + Bus_Status_value = map[string]int32{ + "STATUS_UNSPECIFIED": 0, + "STATUS_STOPPED": 1, + "STATUS_RUNNING": 2, + "STATUS_MAINTEINANCE": 3, + } +) + +func (x Bus_Status) Enum() *Bus_Status { + p := new(Bus_Status) + *p = x + return p +} + +func (x Bus_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Bus_Status) Descriptor() protoreflect.EnumDescriptor { + return file_where_child_bus_v1_resources_proto_enumTypes[0].Descriptor() +} + +func (Bus_Status) Type() protoreflect.EnumType { + return &file_where_child_bus_v1_resources_proto_enumTypes[0] +} + +func (x Bus_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Bus_Status.Descriptor instead. +func (Bus_Status) EnumDescriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{2, 0} +} + +type Child_Sex int32 + +const ( + Child_SEX_UNSPECIFIED Child_Sex = 0 + Child_SEX_MAN Child_Sex = 1 + Child_SEX_WOMEN Child_Sex = 2 + Child_SEX_OTHER Child_Sex = 3 +) + +// Enum value maps for Child_Sex. +var ( + Child_Sex_name = map[int32]string{ + 0: "SEX_UNSPECIFIED", + 1: "SEX_MAN", + 2: "SEX_WOMEN", + 3: "SEX_OTHER", + } + Child_Sex_value = map[string]int32{ + "SEX_UNSPECIFIED": 0, + "SEX_MAN": 1, + "SEX_WOMEN": 2, + "SEX_OTHER": 3, + } +) + +func (x Child_Sex) Enum() *Child_Sex { + p := new(Child_Sex) + *p = x + return p +} + +func (x Child_Sex) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Child_Sex) Descriptor() protoreflect.EnumDescriptor { + return file_where_child_bus_v1_resources_proto_enumTypes[1].Descriptor() +} + +func (Child_Sex) Type() protoreflect.EnumType { + return &file_where_child_bus_v1_resources_proto_enumTypes[1] +} + +func (x Child_Sex) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Child_Sex.Descriptor instead. +func (Child_Sex) EnumDescriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{3, 0} +} + +type ChildBusAssociation_BusType int32 + +const ( + ChildBusAssociation_BUS_TYPE_UNSPECIFIED ChildBusAssociation_BusType = 0 + ChildBusAssociation_BUS_TYPE_MORNING ChildBusAssociation_BusType = 1 + ChildBusAssociation_BUS_TYPE_EVENING ChildBusAssociation_BusType = 2 +) + +// Enum value maps for ChildBusAssociation_BusType. +var ( + ChildBusAssociation_BusType_name = map[int32]string{ + 0: "BUS_TYPE_UNSPECIFIED", + 1: "BUS_TYPE_MORNING", + 2: "BUS_TYPE_EVENING", + } + ChildBusAssociation_BusType_value = map[string]int32{ + "BUS_TYPE_UNSPECIFIED": 0, + "BUS_TYPE_MORNING": 1, + "BUS_TYPE_EVENING": 2, + } +) + +func (x ChildBusAssociation_BusType) Enum() *ChildBusAssociation_BusType { + p := new(ChildBusAssociation_BusType) + *p = x + return p +} + +func (x ChildBusAssociation_BusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChildBusAssociation_BusType) Descriptor() protoreflect.EnumDescriptor { + return file_where_child_bus_v1_resources_proto_enumTypes[2].Descriptor() +} + +func (ChildBusAssociation_BusType) Type() protoreflect.EnumType { + return &file_where_child_bus_v1_resources_proto_enumTypes[2] +} + +func (x ChildBusAssociation_BusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ChildBusAssociation_BusType.Descriptor instead. +func (ChildBusAssociation_BusType) EnumDescriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{5, 0} +} + +type Nursery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryCode string `protobuf:"bytes,2,opt,name=nursery_code,json=nurseryCode,proto3" json:"nursery_code,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` + EncryptedPassword string `protobuf:"bytes,7,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Nursery) Reset() { + *x = Nursery{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Nursery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Nursery) ProtoMessage() {} + +func (x *Nursery) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Nursery.ProtoReflect.Descriptor instead. +func (*Nursery) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{0} +} + +func (x *Nursery) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Nursery) GetNurseryCode() string { + if x != nil { + return x.NurseryCode + } + return "" +} + +func (x *Nursery) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Nursery) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Nursery) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *Nursery) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *Nursery) GetEncryptedPassword() string { + if x != nil { + return x.EncryptedPassword + } + return "" +} + +func (x *Nursery) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Nursery) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Guardian struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + EncryptedPassword string `protobuf:"bytes,6,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Guardian) Reset() { + *x = Guardian{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Guardian) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Guardian) ProtoMessage() {} + +func (x *Guardian) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Guardian.ProtoReflect.Descriptor instead. +func (*Guardian) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{1} +} + +func (x *Guardian) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Guardian) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *Guardian) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Guardian) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *Guardian) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *Guardian) GetEncryptedPassword() string { + if x != nil { + return x.EncryptedPassword + } + return "" +} + +func (x *Guardian) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Guardian) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Bus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + PlateNumber string `protobuf:"bytes,4,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` + Status Bus_Status `protobuf:"varint,5,opt,name=status,proto3,enum=where_child_bus.v1.Bus_Status" json:"status,omitempty"` + // 緯度経度 + Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Bus) Reset() { + *x = Bus{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bus) ProtoMessage() {} + +func (x *Bus) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bus.ProtoReflect.Descriptor instead. +func (*Bus) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{2} +} + +func (x *Bus) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Bus) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *Bus) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Bus) GetPlateNumber() string { + if x != nil { + return x.PlateNumber + } + return "" +} + +func (x *Bus) GetStatus() Bus_Status { + if x != nil { + return x.Status + } + return Bus_STATUS_UNSPECIFIED +} + +func (x *Bus) GetLatitude() float64 { + if x != nil { + return x.Latitude + } + return 0 +} + +func (x *Bus) GetLongitude() float64 { + if x != nil { + return x.Longitude + } + return 0 +} + +func (x *Bus) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Bus) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Child struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + GuardianId string `protobuf:"bytes,3,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Age int32 `protobuf:"varint,5,opt,name=age,proto3" json:"age,omitempty"` + Sex Child_Sex `protobuf:"varint,6,opt,name=sex,proto3,enum=where_child_bus.v1.Child_Sex" json:"sex,omitempty"` + IsRideMorningBus bool `protobuf:"varint,7,opt,name=is_ride_morning_bus,json=isRideMorningBus,proto3" json:"is_ride_morning_bus,omitempty"` + IsRideEveningBus bool `protobuf:"varint,8,opt,name=is_ride_evening_bus,json=isRideEveningBus,proto3" json:"is_ride_evening_bus,omitempty"` + CheckForMissingItems bool `protobuf:"varint,9,opt,name=check_for_missing_items,json=checkForMissingItems,proto3" json:"check_for_missing_items,omitempty"` + HasBag bool `protobuf:"varint,10,opt,name=has_bag,json=hasBag,proto3" json:"has_bag,omitempty"` + HasLunchBox bool `protobuf:"varint,11,opt,name=has_lunch_box,json=hasLunchBox,proto3" json:"has_lunch_box,omitempty"` + HasWaterBottle bool `protobuf:"varint,12,opt,name=has_water_bottle,json=hasWaterBottle,proto3" json:"has_water_bottle,omitempty"` + HasUmbrera bool `protobuf:"varint,13,opt,name=has_umbrera,json=hasUmbrera,proto3" json:"has_umbrera,omitempty"` + HasOther bool `protobuf:"varint,14,opt,name=has_other,json=hasOther,proto3" json:"has_other,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Child) Reset() { + *x = Child{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Child) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Child) ProtoMessage() {} + +func (x *Child) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Child.ProtoReflect.Descriptor instead. +func (*Child) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{3} +} + +func (x *Child) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Child) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *Child) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +func (x *Child) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Child) GetAge() int32 { + if x != nil { + return x.Age + } + return 0 +} + +func (x *Child) GetSex() Child_Sex { + if x != nil { + return x.Sex + } + return Child_SEX_UNSPECIFIED +} + +func (x *Child) GetIsRideMorningBus() bool { + if x != nil { + return x.IsRideMorningBus + } + return false +} + +func (x *Child) GetIsRideEveningBus() bool { + if x != nil { + return x.IsRideEveningBus + } + return false +} + +func (x *Child) GetCheckForMissingItems() bool { + if x != nil { + return x.CheckForMissingItems + } + return false +} + +func (x *Child) GetHasBag() bool { + if x != nil { + return x.HasBag + } + return false +} + +func (x *Child) GetHasLunchBox() bool { + if x != nil { + return x.HasLunchBox + } + return false +} + +func (x *Child) GetHasWaterBottle() bool { + if x != nil { + return x.HasWaterBottle + } + return false +} + +func (x *Child) GetHasUmbrera() bool { + if x != nil { + return x.HasUmbrera + } + return false +} + +func (x *Child) GetHasOther() bool { + if x != nil { + return x.HasOther + } + return false +} + +func (x *Child) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Child) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Station struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + GuardianId string `protobuf:"bytes,2,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` + Latitude float64 `protobuf:"fixed64,3,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,4,opt,name=longitude,proto3" json:"longitude,omitempty"` + MorningOrder int32 `protobuf:"varint,5,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` + EveningOrder int32 `protobuf:"varint,6,opt,name=evening_order,json=eveningOrder,proto3" json:"evening_order,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Station) Reset() { + *x = Station{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Station) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Station) ProtoMessage() {} + +func (x *Station) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Station.ProtoReflect.Descriptor instead. +func (*Station) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{4} +} + +func (x *Station) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Station) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +func (x *Station) GetLatitude() float64 { + if x != nil { + return x.Latitude + } + return 0 +} + +func (x *Station) GetLongitude() float64 { + if x != nil { + return x.Longitude + } + return 0 +} + +func (x *Station) GetMorningOrder() int32 { + if x != nil { + return x.MorningOrder + } + return 0 +} + +func (x *Station) GetEveningOrder() int32 { + if x != nil { + return x.EveningOrder + } + return 0 +} + +func (x *Station) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Station) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type ChildBusAssociation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + ChildId string `protobuf:"bytes,3,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` + BusType ChildBusAssociation_BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.ChildBusAssociation_BusType" json:"bus_type,omitempty"` +} + +func (x *ChildBusAssociation) Reset() { + *x = ChildBusAssociation{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChildBusAssociation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChildBusAssociation) ProtoMessage() {} + +func (x *ChildBusAssociation) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChildBusAssociation.ProtoReflect.Descriptor instead. +func (*ChildBusAssociation) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{5} +} + +func (x *ChildBusAssociation) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChildBusAssociation) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *ChildBusAssociation) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +func (x *ChildBusAssociation) GetBusType() ChildBusAssociation_BusType { + if x != nil { + return x.BusType + } + return ChildBusAssociation_BUS_TYPE_UNSPECIFIED +} + +type BusStationAssociation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + StationId string `protobuf:"bytes,2,opt,name=station_id,json=stationId,proto3" json:"station_id,omitempty"` +} + +func (x *BusStationAssociation) Reset() { + *x = BusStationAssociation{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BusStationAssociation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BusStationAssociation) ProtoMessage() {} + +func (x *BusStationAssociation) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BusStationAssociation.ProtoReflect.Descriptor instead. +func (*BusStationAssociation) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{6} +} + +func (x *BusStationAssociation) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *BusStationAssociation) GetStationId() string { + if x != nil { + return x.StationId + } + return "" +} + +type ChildPhoto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` + S3Bucket string `protobuf:"bytes,3,opt,name=s3_bucket,json=s3Bucket,proto3" json:"s3_bucket,omitempty"` + S3Key string `protobuf:"bytes,4,opt,name=s3_key,json=s3Key,proto3" json:"s3_key,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *ChildPhoto) Reset() { + *x = ChildPhoto{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChildPhoto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChildPhoto) ProtoMessage() {} + +func (x *ChildPhoto) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChildPhoto.ProtoReflect.Descriptor instead. +func (*ChildPhoto) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{7} +} + +func (x *ChildPhoto) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChildPhoto) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +func (x *ChildPhoto) GetS3Bucket() string { + if x != nil { + return x.S3Bucket + } + return "" +} + +func (x *ChildPhoto) GetS3Key() string { + if x != nil { + return x.S3Key + } + return "" +} + +func (x *ChildPhoto) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *ChildPhoto) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type BoardingRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` + BusId string `protobuf:"bytes,3,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + IsBoarding bool `protobuf:"varint,4,opt,name=is_boarding,json=isBoarding,proto3" json:"is_boarding,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *BoardingRecord) Reset() { + *x = BoardingRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoardingRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoardingRecord) ProtoMessage() {} + +func (x *BoardingRecord) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoardingRecord.ProtoReflect.Descriptor instead. +func (*BoardingRecord) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{8} +} + +func (x *BoardingRecord) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BoardingRecord) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +func (x *BoardingRecord) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *BoardingRecord) GetIsBoarding() bool { + if x != nil { + return x.IsBoarding + } + return false +} + +func (x *BoardingRecord) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +var File_where_child_bus_v1_resources_proto protoreflect.FileDescriptor + +var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x02, 0x0a, 0x07, 0x4e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, + 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x02, 0x0a, 0x08, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x0a, + 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x22, 0xb6, 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, + 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, + 0x4e, 0x54, 0x45, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x22, 0xa5, 0x05, 0x0a, 0x05, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x73, + 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, + 0x69, 0x73, 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, + 0x62, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, + 0x65, 0x4d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x69, + 0x73, 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, + 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, + 0x45, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, + 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, + 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, + 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, + 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, + 0x75, 0x6d, 0x62, 0x72, 0x65, 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, + 0x61, 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, + 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, + 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x45, 0x0a, 0x03, + 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, + 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, + 0x45, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, + 0x52, 0x10, 0x03, 0x22, 0xb4, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, + 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xf4, 0x01, 0x0a, 0x13, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, + 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, + 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, + 0x02, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, + 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x22, 0xe1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x33, + 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x33, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, + 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, + 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, + 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, + 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_v1_resources_proto_rawDescOnce sync.Once + file_where_child_bus_v1_resources_proto_rawDescData = file_where_child_bus_v1_resources_proto_rawDesc +) + +func file_where_child_bus_v1_resources_proto_rawDescGZIP() []byte { + file_where_child_bus_v1_resources_proto_rawDescOnce.Do(func() { + file_where_child_bus_v1_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_v1_resources_proto_rawDescData) + }) + return file_where_child_bus_v1_resources_proto_rawDescData +} + +var file_where_child_bus_v1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_where_child_bus_v1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_where_child_bus_v1_resources_proto_goTypes = []interface{}{ + (Bus_Status)(0), // 0: where_child_bus.v1.Bus.Status + (Child_Sex)(0), // 1: where_child_bus.v1.Child.Sex + (ChildBusAssociation_BusType)(0), // 2: where_child_bus.v1.ChildBusAssociation.BusType + (*Nursery)(nil), // 3: where_child_bus.v1.Nursery + (*Guardian)(nil), // 4: where_child_bus.v1.Guardian + (*Bus)(nil), // 5: where_child_bus.v1.Bus + (*Child)(nil), // 6: where_child_bus.v1.Child + (*Station)(nil), // 7: where_child_bus.v1.Station + (*ChildBusAssociation)(nil), // 8: where_child_bus.v1.ChildBusAssociation + (*BusStationAssociation)(nil), // 9: where_child_bus.v1.BusStationAssociation + (*ChildPhoto)(nil), // 10: where_child_bus.v1.ChildPhoto + (*BoardingRecord)(nil), // 11: where_child_bus.v1.BoardingRecord + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp +} +var file_where_child_bus_v1_resources_proto_depIdxs = []int32{ + 12, // 0: where_child_bus.v1.Nursery.created_at:type_name -> google.protobuf.Timestamp + 12, // 1: where_child_bus.v1.Nursery.updated_at:type_name -> google.protobuf.Timestamp + 12, // 2: where_child_bus.v1.Guardian.created_at:type_name -> google.protobuf.Timestamp + 12, // 3: where_child_bus.v1.Guardian.updated_at:type_name -> google.protobuf.Timestamp + 0, // 4: where_child_bus.v1.Bus.status:type_name -> where_child_bus.v1.Bus.Status + 12, // 5: where_child_bus.v1.Bus.created_at:type_name -> google.protobuf.Timestamp + 12, // 6: where_child_bus.v1.Bus.updated_at:type_name -> google.protobuf.Timestamp + 1, // 7: where_child_bus.v1.Child.sex:type_name -> where_child_bus.v1.Child.Sex + 12, // 8: where_child_bus.v1.Child.created_at:type_name -> google.protobuf.Timestamp + 12, // 9: where_child_bus.v1.Child.updated_at:type_name -> google.protobuf.Timestamp + 12, // 10: where_child_bus.v1.Station.created_at:type_name -> google.protobuf.Timestamp + 12, // 11: where_child_bus.v1.Station.updated_at:type_name -> google.protobuf.Timestamp + 2, // 12: where_child_bus.v1.ChildBusAssociation.bus_type:type_name -> where_child_bus.v1.ChildBusAssociation.BusType + 12, // 13: where_child_bus.v1.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp + 12, // 14: where_child_bus.v1.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp + 12, // 15: where_child_bus.v1.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_where_child_bus_v1_resources_proto_init() } +func file_where_child_bus_v1_resources_proto_init() { + if File_where_child_bus_v1_resources_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_where_child_bus_v1_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Nursery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Guardian); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Child); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Station); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_resources_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChildBusAssociation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_resources_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BusStationAssociation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_resources_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChildPhoto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_resources_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoardingRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_v1_resources_proto_rawDesc, + NumEnums: 3, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_where_child_bus_v1_resources_proto_goTypes, + DependencyIndexes: file_where_child_bus_v1_resources_proto_depIdxs, + EnumInfos: file_where_child_bus_v1_resources_proto_enumTypes, + MessageInfos: file_where_child_bus_v1_resources_proto_msgTypes, + }.Build() + File_where_child_bus_v1_resources_proto = out.File + file_where_child_bus_v1_resources_proto_rawDesc = nil + file_where_child_bus_v1_resources_proto_goTypes = nil + file_where_child_bus_v1_resources_proto_depIdxs = nil +} diff --git a/backend/proto/where_child_bus/v1/resources.proto b/backend/proto/where_child_bus/v1/resources.proto new file mode 100644 index 00000000..85d3c3b6 --- /dev/null +++ b/backend/proto/where_child_bus/v1/resources.proto @@ -0,0 +1,117 @@ +syntax = "proto3"; + +package where_child_bus.v1; + +import "google/protobuf/timestamp.proto"; + +message Nursery { + string id = 1; + string nursery_code = 2; + string name = 3; + string address = 4; + string phone_number = 5; + string email = 6; + string encrypted_password = 7; + google.protobuf.Timestamp created_at = 8; + google.protobuf.Timestamp updated_at = 9; +} + +message Guardian { + string id = 1; + string nursery_id = 2; + string name = 3; + string email = 4; + string phone_number = 5; + string encrypted_password = 6; + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at =8; +} + +message Bus { + string id = 1; + string nursery_id = 2; + string name = 3; + string plate_number = 4; + enum Status { + STATUS_UNSPECIFIED = 0; + STATUS_STOPPED = 1; + STATUS_RUNNING = 2; + STATUS_MAINTEINANCE = 3; + } + Status status = 5; + //緯度経度 + double latitude = 6; + double longitude = 7; + google.protobuf.Timestamp created_at = 8; + google.protobuf.Timestamp updated_at = 9; +} + +message Child { + string id = 1; + string nursery_id = 2; + string guardian_id = 3; + string name = 4; + int32 age = 5; + enum Sex { + SEX_UNSPECIFIED = 0; + SEX_MAN = 1; + SEX_WOMEN = 2; + SEX_OTHER = 3; + } + Sex sex = 6; + bool is_ride_morning_bus = 7; + bool is_ride_evening_bus = 8; + bool check_for_missing_items = 9; + bool has_bag = 10; + bool has_lunch_box = 11; + bool has_water_bottle = 12; + bool has_umbrera = 13; + bool has_other = 14; + google.protobuf.Timestamp created_at = 15; + google.protobuf.Timestamp updated_at = 16; +} + +message Station { + string id = 1; + string guardian_id = 2; + double latitude = 3; + double longitude = 4; + int32 morning_order = 5; + int32 evening_order = 6; + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at = 8; +} + +message ChildBusAssociation { + string id = 1; + string bus_id = 2; + string child_id = 3; + enum BusType { + BUS_TYPE_UNSPECIFIED = 0; + BUS_TYPE_MORNING = 1; + BUS_TYPE_EVENING = 2; + } + BusType bus_type = 4; +} + +message BusStationAssociation { + string bus_id = 1; + string station_id = 2; +} + +message ChildPhoto { + string id = 1; + string child_id = 2; + string s3_bucket = 3; + string s3_key = 4; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp updated_at = 6; +} + +message BoardingRecord { + string id = 1; + string child_id = 2; + string bus_id = 3; + bool is_boarding = 4; + google.protobuf.Timestamp timestamp = 5; +} \ No newline at end of file diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pb.dart new file mode 100644 index 00000000..a828da0b --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pb.dart @@ -0,0 +1,1312 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/resources.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import '../google/protobuf/timestamp.pb.dart' as $1; +import 'resources.pbenum.dart'; + +export 'resources.pbenum.dart'; + +class Nursery extends $pb.GeneratedMessage { + factory Nursery({ + $core.String? id, + $core.String? nurseryCode, + $core.String? name, + $core.String? address, + $core.String? phoneNumber, + $core.String? email, + $core.String? encryptedPassword, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (nurseryCode != null) { + $result.nurseryCode = nurseryCode; + } + if (name != null) { + $result.name = name; + } + if (address != null) { + $result.address = address; + } + if (phoneNumber != null) { + $result.phoneNumber = phoneNumber; + } + if (email != null) { + $result.email = email; + } + if (encryptedPassword != null) { + $result.encryptedPassword = encryptedPassword; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + Nursery._() : super(); + factory Nursery.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Nursery.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Nursery', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'nurseryCode') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..aOS(4, _omitFieldNames ? '' : 'address') + ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') + ..aOS(6, _omitFieldNames ? '' : 'email') + ..aOS(7, _omitFieldNames ? '' : 'encryptedPassword') + ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Nursery clone() => Nursery()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Nursery copyWith(void Function(Nursery) updates) => super.copyWith((message) => updates(message as Nursery)) as Nursery; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Nursery create() => Nursery._(); + Nursery createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Nursery getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Nursery? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get nurseryCode => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryCode($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryCode() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryCode() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $core.String get address => $_getSZ(3); + @$pb.TagNumber(4) + set address($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasAddress() => $_has(3); + @$pb.TagNumber(4) + void clearAddress() => clearField(4); + + @$pb.TagNumber(5) + $core.String get phoneNumber => $_getSZ(4); + @$pb.TagNumber(5) + set phoneNumber($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPhoneNumber() => $_has(4); + @$pb.TagNumber(5) + void clearPhoneNumber() => clearField(5); + + @$pb.TagNumber(6) + $core.String get email => $_getSZ(5); + @$pb.TagNumber(6) + set email($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasEmail() => $_has(5); + @$pb.TagNumber(6) + void clearEmail() => clearField(6); + + @$pb.TagNumber(7) + $core.String get encryptedPassword => $_getSZ(6); + @$pb.TagNumber(7) + set encryptedPassword($core.String v) { $_setString(6, v); } + @$pb.TagNumber(7) + $core.bool hasEncryptedPassword() => $_has(6); + @$pb.TagNumber(7) + void clearEncryptedPassword() => clearField(7); + + @$pb.TagNumber(8) + $1.Timestamp get createdAt => $_getN(7); + @$pb.TagNumber(8) + set createdAt($1.Timestamp v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasCreatedAt() => $_has(7); + @$pb.TagNumber(8) + void clearCreatedAt() => clearField(8); + @$pb.TagNumber(8) + $1.Timestamp ensureCreatedAt() => $_ensure(7); + + @$pb.TagNumber(9) + $1.Timestamp get updatedAt => $_getN(8); + @$pb.TagNumber(9) + set updatedAt($1.Timestamp v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasUpdatedAt() => $_has(8); + @$pb.TagNumber(9) + void clearUpdatedAt() => clearField(9); + @$pb.TagNumber(9) + $1.Timestamp ensureUpdatedAt() => $_ensure(8); +} + +class Guardian extends $pb.GeneratedMessage { + factory Guardian({ + $core.String? id, + $core.String? nurseryId, + $core.String? name, + $core.String? email, + $core.String? phoneNumber, + $core.String? encryptedPassword, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (name != null) { + $result.name = name; + } + if (email != null) { + $result.email = email; + } + if (phoneNumber != null) { + $result.phoneNumber = phoneNumber; + } + if (encryptedPassword != null) { + $result.encryptedPassword = encryptedPassword; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + Guardian._() : super(); + factory Guardian.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Guardian.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Guardian', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'nurseryId') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..aOS(4, _omitFieldNames ? '' : 'email') + ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') + ..aOS(6, _omitFieldNames ? '' : 'encryptedPassword') + ..aOM<$1.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Guardian clone() => Guardian()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Guardian copyWith(void Function(Guardian) updates) => super.copyWith((message) => updates(message as Guardian)) as Guardian; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Guardian create() => Guardian._(); + Guardian createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Guardian getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Guardian? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get nurseryId => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryId() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $core.String get email => $_getSZ(3); + @$pb.TagNumber(4) + set email($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasEmail() => $_has(3); + @$pb.TagNumber(4) + void clearEmail() => clearField(4); + + @$pb.TagNumber(5) + $core.String get phoneNumber => $_getSZ(4); + @$pb.TagNumber(5) + set phoneNumber($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPhoneNumber() => $_has(4); + @$pb.TagNumber(5) + void clearPhoneNumber() => clearField(5); + + @$pb.TagNumber(6) + $core.String get encryptedPassword => $_getSZ(5); + @$pb.TagNumber(6) + set encryptedPassword($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasEncryptedPassword() => $_has(5); + @$pb.TagNumber(6) + void clearEncryptedPassword() => clearField(6); + + @$pb.TagNumber(7) + $1.Timestamp get createdAt => $_getN(6); + @$pb.TagNumber(7) + set createdAt($1.Timestamp v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasCreatedAt() => $_has(6); + @$pb.TagNumber(7) + void clearCreatedAt() => clearField(7); + @$pb.TagNumber(7) + $1.Timestamp ensureCreatedAt() => $_ensure(6); + + @$pb.TagNumber(8) + $1.Timestamp get updatedAt => $_getN(7); + @$pb.TagNumber(8) + set updatedAt($1.Timestamp v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasUpdatedAt() => $_has(7); + @$pb.TagNumber(8) + void clearUpdatedAt() => clearField(8); + @$pb.TagNumber(8) + $1.Timestamp ensureUpdatedAt() => $_ensure(7); +} + +class bus extends $pb.GeneratedMessage { + factory bus({ + $core.String? id, + $core.String? nurseryId, + $core.String? name, + $core.String? plateNumber, + bus_Status? status, + $core.double? latitude, + $core.double? longitude, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (name != null) { + $result.name = name; + } + if (plateNumber != null) { + $result.plateNumber = plateNumber; + } + if (status != null) { + $result.status = status; + } + if (latitude != null) { + $result.latitude = latitude; + } + if (longitude != null) { + $result.longitude = longitude; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + bus._() : super(); + factory bus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory bus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'bus', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'nurseryId') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..aOS(4, _omitFieldNames ? '' : 'plateNumber') + ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: bus_Status.STOPPED, valueOf: bus_Status.valueOf, enumValues: bus_Status.values) + ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + bus clone() => bus()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + bus copyWith(void Function(bus) updates) => super.copyWith((message) => updates(message as bus)) as bus; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static bus create() => bus._(); + bus createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static bus getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static bus? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get nurseryId => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryId() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $core.String get plateNumber => $_getSZ(3); + @$pb.TagNumber(4) + set plateNumber($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPlateNumber() => $_has(3); + @$pb.TagNumber(4) + void clearPlateNumber() => clearField(4); + + @$pb.TagNumber(5) + bus_Status get status => $_getN(4); + @$pb.TagNumber(5) + set status(bus_Status v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasStatus() => $_has(4); + @$pb.TagNumber(5) + void clearStatus() => clearField(5); + + /// 緯度経度 + @$pb.TagNumber(6) + $core.double get latitude => $_getN(5); + @$pb.TagNumber(6) + set latitude($core.double v) { $_setDouble(5, v); } + @$pb.TagNumber(6) + $core.bool hasLatitude() => $_has(5); + @$pb.TagNumber(6) + void clearLatitude() => clearField(6); + + @$pb.TagNumber(7) + $core.double get longitude => $_getN(6); + @$pb.TagNumber(7) + set longitude($core.double v) { $_setDouble(6, v); } + @$pb.TagNumber(7) + $core.bool hasLongitude() => $_has(6); + @$pb.TagNumber(7) + void clearLongitude() => clearField(7); + + @$pb.TagNumber(8) + $1.Timestamp get createdAt => $_getN(7); + @$pb.TagNumber(8) + set createdAt($1.Timestamp v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasCreatedAt() => $_has(7); + @$pb.TagNumber(8) + void clearCreatedAt() => clearField(8); + @$pb.TagNumber(8) + $1.Timestamp ensureCreatedAt() => $_ensure(7); + + @$pb.TagNumber(9) + $1.Timestamp get updatedAt => $_getN(8); + @$pb.TagNumber(9) + set updatedAt($1.Timestamp v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasUpdatedAt() => $_has(8); + @$pb.TagNumber(9) + void clearUpdatedAt() => clearField(9); + @$pb.TagNumber(9) + $1.Timestamp ensureUpdatedAt() => $_ensure(8); +} + +class Child extends $pb.GeneratedMessage { + factory Child({ + $core.String? id, + $core.String? nurseryId, + $core.String? guardianId, + $core.String? name, + $core.int? age, + Child_Sex? sex, + $core.bool? isRideMorningBus, + $core.bool? isRideAfternoonBus, + $core.bool? checkForMissingItems, + $core.bool? hasBag, + $core.bool? hasLunchBox, + $core.bool? hasWaterBottle, + $core.bool? hasUmbrera, + $core.bool? hasOther, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (guardianId != null) { + $result.guardianId = guardianId; + } + if (name != null) { + $result.name = name; + } + if (age != null) { + $result.age = age; + } + if (sex != null) { + $result.sex = sex; + } + if (isRideMorningBus != null) { + $result.isRideMorningBus = isRideMorningBus; + } + if (isRideAfternoonBus != null) { + $result.isRideAfternoonBus = isRideAfternoonBus; + } + if (checkForMissingItems != null) { + $result.checkForMissingItems = checkForMissingItems; + } + if (hasBag != null) { + $result.hasBag = hasBag; + } + if (hasLunchBox != null) { + $result.hasLunchBox = hasLunchBox; + } + if (hasWaterBottle != null) { + $result.hasWaterBottle = hasWaterBottle; + } + if (hasUmbrera != null) { + $result.hasUmbrera = hasUmbrera; + } + if (hasOther != null) { + $result.hasOther = hasOther; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + Child._() : super(); + factory Child.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Child.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Child', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'nurseryId') + ..aOS(3, _omitFieldNames ? '' : 'guardianId') + ..aOS(4, _omitFieldNames ? '' : 'name') + ..a<$core.int>(5, _omitFieldNames ? '' : 'age', $pb.PbFieldType.O3) + ..e(6, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: Child_Sex.MAN, valueOf: Child_Sex.valueOf, enumValues: Child_Sex.values) + ..aOB(7, _omitFieldNames ? '' : 'isRideMorningBus') + ..aOB(8, _omitFieldNames ? '' : 'isRideAfternoonBus') + ..aOB(9, _omitFieldNames ? '' : 'checkForMissingItems') + ..aOB(10, _omitFieldNames ? '' : 'hasBag') + ..aOB(11, _omitFieldNames ? '' : 'hasLunchBox') + ..aOB(12, _omitFieldNames ? '' : 'hasWaterBottle') + ..aOB(13, _omitFieldNames ? '' : 'hasUmbrera') + ..aOB(14, _omitFieldNames ? '' : 'hasOther') + ..aOM<$1.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Child clone() => Child()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Child copyWith(void Function(Child) updates) => super.copyWith((message) => updates(message as Child)) as Child; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Child create() => Child._(); + Child createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Child getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Child? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get nurseryId => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryId() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get guardianId => $_getSZ(2); + @$pb.TagNumber(3) + set guardianId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasGuardianId() => $_has(2); + @$pb.TagNumber(3) + void clearGuardianId() => clearField(3); + + @$pb.TagNumber(4) + $core.String get name => $_getSZ(3); + @$pb.TagNumber(4) + set name($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasName() => $_has(3); + @$pb.TagNumber(4) + void clearName() => clearField(4); + + @$pb.TagNumber(5) + $core.int get age => $_getIZ(4); + @$pb.TagNumber(5) + set age($core.int v) { $_setSignedInt32(4, v); } + @$pb.TagNumber(5) + $core.bool hasAge() => $_has(4); + @$pb.TagNumber(5) + void clearAge() => clearField(5); + + @$pb.TagNumber(6) + Child_Sex get sex => $_getN(5); + @$pb.TagNumber(6) + set sex(Child_Sex v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasSex() => $_has(5); + @$pb.TagNumber(6) + void clearSex() => clearField(6); + + @$pb.TagNumber(7) + $core.bool get isRideMorningBus => $_getBF(6); + @$pb.TagNumber(7) + set isRideMorningBus($core.bool v) { $_setBool(6, v); } + @$pb.TagNumber(7) + $core.bool hasIsRideMorningBus() => $_has(6); + @$pb.TagNumber(7) + void clearIsRideMorningBus() => clearField(7); + + @$pb.TagNumber(8) + $core.bool get isRideAfternoonBus => $_getBF(7); + @$pb.TagNumber(8) + set isRideAfternoonBus($core.bool v) { $_setBool(7, v); } + @$pb.TagNumber(8) + $core.bool hasIsRideAfternoonBus() => $_has(7); + @$pb.TagNumber(8) + void clearIsRideAfternoonBus() => clearField(8); + + @$pb.TagNumber(9) + $core.bool get checkForMissingItems => $_getBF(8); + @$pb.TagNumber(9) + set checkForMissingItems($core.bool v) { $_setBool(8, v); } + @$pb.TagNumber(9) + $core.bool hasCheckForMissingItems() => $_has(8); + @$pb.TagNumber(9) + void clearCheckForMissingItems() => clearField(9); + + @$pb.TagNumber(10) + $core.bool get hasBag => $_getBF(9); + @$pb.TagNumber(10) + set hasBag($core.bool v) { $_setBool(9, v); } + @$pb.TagNumber(10) + $core.bool hasHasBag() => $_has(9); + @$pb.TagNumber(10) + void clearHasBag() => clearField(10); + + @$pb.TagNumber(11) + $core.bool get hasLunchBox => $_getBF(10); + @$pb.TagNumber(11) + set hasLunchBox($core.bool v) { $_setBool(10, v); } + @$pb.TagNumber(11) + $core.bool hasHasLunchBox() => $_has(10); + @$pb.TagNumber(11) + void clearHasLunchBox() => clearField(11); + + @$pb.TagNumber(12) + $core.bool get hasWaterBottle => $_getBF(11); + @$pb.TagNumber(12) + set hasWaterBottle($core.bool v) { $_setBool(11, v); } + @$pb.TagNumber(12) + $core.bool hasHasWaterBottle() => $_has(11); + @$pb.TagNumber(12) + void clearHasWaterBottle() => clearField(12); + + @$pb.TagNumber(13) + $core.bool get hasUmbrera => $_getBF(12); + @$pb.TagNumber(13) + set hasUmbrera($core.bool v) { $_setBool(12, v); } + @$pb.TagNumber(13) + $core.bool hasHasUmbrera() => $_has(12); + @$pb.TagNumber(13) + void clearHasUmbrera() => clearField(13); + + @$pb.TagNumber(14) + $core.bool get hasOther => $_getBF(13); + @$pb.TagNumber(14) + set hasOther($core.bool v) { $_setBool(13, v); } + @$pb.TagNumber(14) + $core.bool hasHasOther() => $_has(13); + @$pb.TagNumber(14) + void clearHasOther() => clearField(14); + + @$pb.TagNumber(15) + $1.Timestamp get createdAt => $_getN(14); + @$pb.TagNumber(15) + set createdAt($1.Timestamp v) { setField(15, v); } + @$pb.TagNumber(15) + $core.bool hasCreatedAt() => $_has(14); + @$pb.TagNumber(15) + void clearCreatedAt() => clearField(15); + @$pb.TagNumber(15) + $1.Timestamp ensureCreatedAt() => $_ensure(14); + + @$pb.TagNumber(16) + $1.Timestamp get updatedAt => $_getN(15); + @$pb.TagNumber(16) + set updatedAt($1.Timestamp v) { setField(16, v); } + @$pb.TagNumber(16) + $core.bool hasUpdatedAt() => $_has(15); + @$pb.TagNumber(16) + void clearUpdatedAt() => clearField(16); + @$pb.TagNumber(16) + $1.Timestamp ensureUpdatedAt() => $_ensure(15); +} + +class Station extends $pb.GeneratedMessage { + factory Station({ + $core.String? id, + $core.String? guardianId, + $core.double? latitude, + $core.double? longitude, + $core.int? morningOrder, + $core.int? afternoonOrder, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (guardianId != null) { + $result.guardianId = guardianId; + } + if (latitude != null) { + $result.latitude = latitude; + } + if (longitude != null) { + $result.longitude = longitude; + } + if (morningOrder != null) { + $result.morningOrder = morningOrder; + } + if (afternoonOrder != null) { + $result.afternoonOrder = afternoonOrder; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + Station._() : super(); + factory Station.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Station.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Station', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'guardianId') + ..a<$core.double>(3, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..a<$core.int>(5, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) + ..a<$core.int>(6, _omitFieldNames ? '' : 'afternoonOrder', $pb.PbFieldType.O3) + ..aOM<$1.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Station clone() => Station()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Station copyWith(void Function(Station) updates) => super.copyWith((message) => updates(message as Station)) as Station; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Station create() => Station._(); + Station createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Station getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Station? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get guardianId => $_getSZ(1); + @$pb.TagNumber(2) + set guardianId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasGuardianId() => $_has(1); + @$pb.TagNumber(2) + void clearGuardianId() => clearField(2); + + @$pb.TagNumber(3) + $core.double get latitude => $_getN(2); + @$pb.TagNumber(3) + set latitude($core.double v) { $_setDouble(2, v); } + @$pb.TagNumber(3) + $core.bool hasLatitude() => $_has(2); + @$pb.TagNumber(3) + void clearLatitude() => clearField(3); + + @$pb.TagNumber(4) + $core.double get longitude => $_getN(3); + @$pb.TagNumber(4) + set longitude($core.double v) { $_setDouble(3, v); } + @$pb.TagNumber(4) + $core.bool hasLongitude() => $_has(3); + @$pb.TagNumber(4) + void clearLongitude() => clearField(4); + + @$pb.TagNumber(5) + $core.int get morningOrder => $_getIZ(4); + @$pb.TagNumber(5) + set morningOrder($core.int v) { $_setSignedInt32(4, v); } + @$pb.TagNumber(5) + $core.bool hasMorningOrder() => $_has(4); + @$pb.TagNumber(5) + void clearMorningOrder() => clearField(5); + + @$pb.TagNumber(6) + $core.int get afternoonOrder => $_getIZ(5); + @$pb.TagNumber(6) + set afternoonOrder($core.int v) { $_setSignedInt32(5, v); } + @$pb.TagNumber(6) + $core.bool hasAfternoonOrder() => $_has(5); + @$pb.TagNumber(6) + void clearAfternoonOrder() => clearField(6); + + @$pb.TagNumber(7) + $1.Timestamp get createdAt => $_getN(6); + @$pb.TagNumber(7) + set createdAt($1.Timestamp v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasCreatedAt() => $_has(6); + @$pb.TagNumber(7) + void clearCreatedAt() => clearField(7); + @$pb.TagNumber(7) + $1.Timestamp ensureCreatedAt() => $_ensure(6); + + @$pb.TagNumber(8) + $1.Timestamp get updatedAt => $_getN(7); + @$pb.TagNumber(8) + set updatedAt($1.Timestamp v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasUpdatedAt() => $_has(7); + @$pb.TagNumber(8) + void clearUpdatedAt() => clearField(8); + @$pb.TagNumber(8) + $1.Timestamp ensureUpdatedAt() => $_ensure(7); +} + +class ChildBusAssociation extends $pb.GeneratedMessage { + factory ChildBusAssociation({ + $core.String? id, + $core.String? busId, + $core.String? childId, + ChildBusAssociation_BusType? busType, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (busId != null) { + $result.busId = busId; + } + if (childId != null) { + $result.childId = childId; + } + if (busType != null) { + $result.busType = busType; + } + return $result; + } + ChildBusAssociation._() : super(); + factory ChildBusAssociation.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ChildBusAssociation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildBusAssociation', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'busId') + ..aOS(3, _omitFieldNames ? '' : 'childId') + ..e(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: ChildBusAssociation_BusType.MORNING, valueOf: ChildBusAssociation_BusType.valueOf, enumValues: ChildBusAssociation_BusType.values) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ChildBusAssociation clone() => ChildBusAssociation()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ChildBusAssociation copyWith(void Function(ChildBusAssociation) updates) => super.copyWith((message) => updates(message as ChildBusAssociation)) as ChildBusAssociation; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ChildBusAssociation create() => ChildBusAssociation._(); + ChildBusAssociation createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ChildBusAssociation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ChildBusAssociation? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get busId => $_getSZ(1); + @$pb.TagNumber(2) + set busId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasBusId() => $_has(1); + @$pb.TagNumber(2) + void clearBusId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get childId => $_getSZ(2); + @$pb.TagNumber(3) + set childId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasChildId() => $_has(2); + @$pb.TagNumber(3) + void clearChildId() => clearField(3); + + @$pb.TagNumber(4) + ChildBusAssociation_BusType get busType => $_getN(3); + @$pb.TagNumber(4) + set busType(ChildBusAssociation_BusType v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasBusType() => $_has(3); + @$pb.TagNumber(4) + void clearBusType() => clearField(4); +} + +class BusStationAssociation extends $pb.GeneratedMessage { + factory BusStationAssociation({ + $core.String? busId, + $core.String? stationId, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + if (stationId != null) { + $result.stationId = stationId; + } + return $result; + } + BusStationAssociation._() : super(); + factory BusStationAssociation.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BusStationAssociation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BusStationAssociation', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..aOS(2, _omitFieldNames ? '' : 'stationId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + BusStationAssociation clone() => BusStationAssociation()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + BusStationAssociation copyWith(void Function(BusStationAssociation) updates) => super.copyWith((message) => updates(message as BusStationAssociation)) as BusStationAssociation; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BusStationAssociation create() => BusStationAssociation._(); + BusStationAssociation createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BusStationAssociation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BusStationAssociation? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get stationId => $_getSZ(1); + @$pb.TagNumber(2) + set stationId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasStationId() => $_has(1); + @$pb.TagNumber(2) + void clearStationId() => clearField(2); +} + +class ChildPhoto extends $pb.GeneratedMessage { + factory ChildPhoto({ + $core.String? id, + $core.String? childId, + $core.String? s3Bucket, + $core.String? s3Key, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (childId != null) { + $result.childId = childId; + } + if (s3Bucket != null) { + $result.s3Bucket = s3Bucket; + } + if (s3Key != null) { + $result.s3Key = s3Key; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + ChildPhoto._() : super(); + factory ChildPhoto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ChildPhoto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildPhoto', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'childId') + ..aOS(3, _omitFieldNames ? '' : 's3Bucket') + ..aOS(4, _omitFieldNames ? '' : 's3Key') + ..aOM<$1.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ChildPhoto clone() => ChildPhoto()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ChildPhoto copyWith(void Function(ChildPhoto) updates) => super.copyWith((message) => updates(message as ChildPhoto)) as ChildPhoto; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ChildPhoto create() => ChildPhoto._(); + ChildPhoto createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ChildPhoto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ChildPhoto? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get childId => $_getSZ(1); + @$pb.TagNumber(2) + set childId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasChildId() => $_has(1); + @$pb.TagNumber(2) + void clearChildId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get s3Bucket => $_getSZ(2); + @$pb.TagNumber(3) + set s3Bucket($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasS3Bucket() => $_has(2); + @$pb.TagNumber(3) + void clearS3Bucket() => clearField(3); + + @$pb.TagNumber(4) + $core.String get s3Key => $_getSZ(3); + @$pb.TagNumber(4) + set s3Key($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasS3Key() => $_has(3); + @$pb.TagNumber(4) + void clearS3Key() => clearField(4); + + @$pb.TagNumber(5) + $1.Timestamp get createdAt => $_getN(4); + @$pb.TagNumber(5) + set createdAt($1.Timestamp v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasCreatedAt() => $_has(4); + @$pb.TagNumber(5) + void clearCreatedAt() => clearField(5); + @$pb.TagNumber(5) + $1.Timestamp ensureCreatedAt() => $_ensure(4); + + @$pb.TagNumber(6) + $1.Timestamp get updatedAt => $_getN(5); + @$pb.TagNumber(6) + set updatedAt($1.Timestamp v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasUpdatedAt() => $_has(5); + @$pb.TagNumber(6) + void clearUpdatedAt() => clearField(6); + @$pb.TagNumber(6) + $1.Timestamp ensureUpdatedAt() => $_ensure(5); +} + +class BoardingRecord extends $pb.GeneratedMessage { + factory BoardingRecord({ + $core.String? id, + $core.String? childId, + $core.String? busId, + $core.bool? isBoarding, + $1.Timestamp? timestamp, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (childId != null) { + $result.childId = childId; + } + if (busId != null) { + $result.busId = busId; + } + if (isBoarding != null) { + $result.isBoarding = isBoarding; + } + if (timestamp != null) { + $result.timestamp = timestamp; + } + return $result; + } + BoardingRecord._() : super(); + factory BoardingRecord.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BoardingRecord.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BoardingRecord', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'childId') + ..aOS(3, _omitFieldNames ? '' : 'busId') + ..aOB(4, _omitFieldNames ? '' : 'isBoarding') + ..aOM<$1.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + BoardingRecord clone() => BoardingRecord()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + BoardingRecord copyWith(void Function(BoardingRecord) updates) => super.copyWith((message) => updates(message as BoardingRecord)) as BoardingRecord; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BoardingRecord create() => BoardingRecord._(); + BoardingRecord createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BoardingRecord getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BoardingRecord? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get childId => $_getSZ(1); + @$pb.TagNumber(2) + set childId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasChildId() => $_has(1); + @$pb.TagNumber(2) + void clearChildId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get busId => $_getSZ(2); + @$pb.TagNumber(3) + set busId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasBusId() => $_has(2); + @$pb.TagNumber(3) + void clearBusId() => clearField(3); + + @$pb.TagNumber(4) + $core.bool get isBoarding => $_getBF(3); + @$pb.TagNumber(4) + set isBoarding($core.bool v) { $_setBool(3, v); } + @$pb.TagNumber(4) + $core.bool hasIsBoarding() => $_has(3); + @$pb.TagNumber(4) + void clearIsBoarding() => clearField(4); + + @$pb.TagNumber(5) + $1.Timestamp get timestamp => $_getN(4); + @$pb.TagNumber(5) + set timestamp($1.Timestamp v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasTimestamp() => $_has(4); + @$pb.TagNumber(5) + void clearTimestamp() => clearField(5); + @$pb.TagNumber(5) + $1.Timestamp ensureTimestamp() => $_ensure(4); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbenum.dart new file mode 100644 index 00000000..d4093154 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbenum.dart @@ -0,0 +1,66 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/resources.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class bus_Status extends $pb.ProtobufEnum { + static const bus_Status STOPPED = bus_Status._(0, _omitEnumNames ? '' : 'STOPPED'); + static const bus_Status RUNNING = bus_Status._(1, _omitEnumNames ? '' : 'RUNNING'); + static const bus_Status MAINTEINANCE = bus_Status._(2, _omitEnumNames ? '' : 'MAINTEINANCE'); + + static const $core.List values = [ + STOPPED, + RUNNING, + MAINTEINANCE, + ]; + + static final $core.Map<$core.int, bus_Status> _byValue = $pb.ProtobufEnum.initByValue(values); + static bus_Status? valueOf($core.int value) => _byValue[value]; + + const bus_Status._($core.int v, $core.String n) : super(v, n); +} + +class Child_Sex extends $pb.ProtobufEnum { + static const Child_Sex MAN = Child_Sex._(0, _omitEnumNames ? '' : 'MAN'); + static const Child_Sex WOMEN = Child_Sex._(1, _omitEnumNames ? '' : 'WOMEN'); + static const Child_Sex OTHER = Child_Sex._(2, _omitEnumNames ? '' : 'OTHER'); + + static const $core.List values = [ + MAN, + WOMEN, + OTHER, + ]; + + static final $core.Map<$core.int, Child_Sex> _byValue = $pb.ProtobufEnum.initByValue(values); + static Child_Sex? valueOf($core.int value) => _byValue[value]; + + const Child_Sex._($core.int v, $core.String n) : super(v, n); +} + +class ChildBusAssociation_BusType extends $pb.ProtobufEnum { + static const ChildBusAssociation_BusType MORNING = ChildBusAssociation_BusType._(0, _omitEnumNames ? '' : 'MORNING'); + static const ChildBusAssociation_BusType AFTERNOON = ChildBusAssociation_BusType._(1, _omitEnumNames ? '' : 'AFTERNOON'); + + static const $core.List values = [ + MORNING, + AFTERNOON, + ]; + + static final $core.Map<$core.int, ChildBusAssociation_BusType> _byValue = $pb.ProtobufEnum.initByValue(values); + static ChildBusAssociation_BusType? valueOf($core.int value) => _byValue[value]; + + const ChildBusAssociation_BusType._($core.int v, $core.String n) : super(v, n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbjson.dart new file mode 100644 index 00000000..37e513c9 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbjson.dart @@ -0,0 +1,257 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/resources.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use nurseryDescriptor instead') +const Nursery$json = { + '1': 'Nursery', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'nursery_code', '3': 2, '4': 1, '5': 9, '10': 'nurseryCode'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'address', '3': 4, '4': 1, '5': 9, '10': 'address'}, + {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, + {'1': 'email', '3': 6, '4': 1, '5': 9, '10': 'email'}, + {'1': 'encrypted_password', '3': 7, '4': 1, '5': 9, '10': 'encryptedPassword'}, + {'1': 'created_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], +}; + +/// Descriptor for `Nursery`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List nurseryDescriptor = $convert.base64Decode( + 'CgdOdXJzZXJ5Eg4KAmlkGAEgASgJUgJpZBIhCgxudXJzZXJ5X2NvZGUYAiABKAlSC251cnNlcn' + 'lDb2RlEhIKBG5hbWUYAyABKAlSBG5hbWUSGAoHYWRkcmVzcxgEIAEoCVIHYWRkcmVzcxIhCgxw' + 'aG9uZV9udW1iZXIYBSABKAlSC3Bob25lTnVtYmVyEhQKBWVtYWlsGAYgASgJUgVlbWFpbBItCh' + 'JlbmNyeXB0ZWRfcGFzc3dvcmQYByABKAlSEWVuY3J5cHRlZFBhc3N3b3JkEjkKCmNyZWF0ZWRf' + 'YXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYX' + 'RlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); + +@$core.Deprecated('Use guardianDescriptor instead') +const Guardian$json = { + '1': 'Guardian', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'email', '3': 4, '4': 1, '5': 9, '10': 'email'}, + {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, + {'1': 'encrypted_password', '3': 6, '4': 1, '5': 9, '10': 'encryptedPassword'}, + {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], +}; + +/// Descriptor for `Guardian`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List guardianDescriptor = $convert.base64Decode( + 'CghHdWFyZGlhbhIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbnVyc2VyeU' + 'lkEhIKBG5hbWUYAyABKAlSBG5hbWUSFAoFZW1haWwYBCABKAlSBWVtYWlsEiEKDHBob25lX251' + 'bWJlchgFIAEoCVILcGhvbmVOdW1iZXISLQoSZW5jcnlwdGVkX3Bhc3N3b3JkGAYgASgJUhFlbm' + 'NyeXB0ZWRQYXNzd29yZBI5CgpjcmVhdGVkX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRp' + 'bWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idW' + 'YuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); + +@$core.Deprecated('Use busDescriptor instead') +const bus$json = { + '1': 'bus', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'plate_number', '3': 4, '4': 1, '5': 9, '10': 'plateNumber'}, + {'1': 'status', '3': 5, '4': 1, '5': 14, '6': '.where_child_bus.bus.Status', '10': 'status'}, + {'1': 'latitude', '3': 6, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 7, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'created_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], + '4': [bus_Status$json], +}; + +@$core.Deprecated('Use busDescriptor instead') +const bus_Status$json = { + '1': 'Status', + '2': [ + {'1': 'STOPPED', '2': 0}, + {'1': 'RUNNING', '2': 1}, + {'1': 'MAINTEINANCE', '2': 2}, + ], +}; + +/// Descriptor for `bus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List busDescriptor = $convert.base64Decode( + 'CgNidXMSDgoCaWQYASABKAlSAmlkEh0KCm51cnNlcnlfaWQYAiABKAlSCW51cnNlcnlJZBISCg' + 'RuYW1lGAMgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgEIAEoCVILcGxhdGVOdW1iZXISMwoG' + 'c3RhdHVzGAUgASgOMhsud2hlcmVfY2hpbGRfYnVzLmJ1cy5TdGF0dXNSBnN0YXR1cxIaCghsYX' + 'RpdHVkZRgGIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAcgASgBUglsb25naXR1ZGUSOQoK' + 'Y3JlYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdB' + 'I5Cgp1cGRhdGVkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRl' + 'ZEF0IjQKBlN0YXR1cxILCgdTVE9QUEVEEAASCwoHUlVOTklORxABEhAKDE1BSU5URUlOQU5DRR' + 'AC'); + +@$core.Deprecated('Use childDescriptor instead') +const Child$json = { + '1': 'Child', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'guardian_id', '3': 3, '4': 1, '5': 9, '10': 'guardianId'}, + {'1': 'name', '3': 4, '4': 1, '5': 9, '10': 'name'}, + {'1': 'age', '3': 5, '4': 1, '5': 5, '10': 'age'}, + {'1': 'sex', '3': 6, '4': 1, '5': 14, '6': '.where_child_bus.Child.Sex', '10': 'sex'}, + {'1': 'is_ride_morning_bus', '3': 7, '4': 1, '5': 8, '10': 'isRideMorningBus'}, + {'1': 'is_ride_afternoon_bus', '3': 8, '4': 1, '5': 8, '10': 'isRideAfternoonBus'}, + {'1': 'check_for_missing_items', '3': 9, '4': 1, '5': 8, '10': 'checkForMissingItems'}, + {'1': 'has_bag', '3': 10, '4': 1, '5': 8, '10': 'hasBag'}, + {'1': 'has_lunch_box', '3': 11, '4': 1, '5': 8, '10': 'hasLunchBox'}, + {'1': 'has_water_bottle', '3': 12, '4': 1, '5': 8, '10': 'hasWaterBottle'}, + {'1': 'has_umbrera', '3': 13, '4': 1, '5': 8, '10': 'hasUmbrera'}, + {'1': 'has_other', '3': 14, '4': 1, '5': 8, '10': 'hasOther'}, + {'1': 'created_at', '3': 15, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 16, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], + '4': [Child_Sex$json], +}; + +@$core.Deprecated('Use childDescriptor instead') +const Child_Sex$json = { + '1': 'Sex', + '2': [ + {'1': 'MAN', '2': 0}, + {'1': 'WOMEN', '2': 1}, + {'1': 'OTHER', '2': 2}, + ], +}; + +/// Descriptor for `Child`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List childDescriptor = $convert.base64Decode( + 'CgVDaGlsZBIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbnVyc2VyeUlkEh' + '8KC2d1YXJkaWFuX2lkGAMgASgJUgpndWFyZGlhbklkEhIKBG5hbWUYBCABKAlSBG5hbWUSEAoD' + 'YWdlGAUgASgFUgNhZ2USLAoDc2V4GAYgASgOMhoud2hlcmVfY2hpbGRfYnVzLkNoaWxkLlNleF' + 'IDc2V4Ei0KE2lzX3JpZGVfbW9ybmluZ19idXMYByABKAhSEGlzUmlkZU1vcm5pbmdCdXMSMQoV' + 'aXNfcmlkZV9hZnRlcm5vb25fYnVzGAggASgIUhJpc1JpZGVBZnRlcm5vb25CdXMSNQoXY2hlY2' + 'tfZm9yX21pc3NpbmdfaXRlbXMYCSABKAhSFGNoZWNrRm9yTWlzc2luZ0l0ZW1zEhcKB2hhc19i' + 'YWcYCiABKAhSBmhhc0JhZxIiCg1oYXNfbHVuY2hfYm94GAsgASgIUgtoYXNMdW5jaEJveBIoCh' + 'BoYXNfd2F0ZXJfYm90dGxlGAwgASgIUg5oYXNXYXRlckJvdHRsZRIfCgtoYXNfdW1icmVyYRgN' + 'IAEoCFIKaGFzVW1icmVyYRIbCgloYXNfb3RoZXIYDiABKAhSCGhhc090aGVyEjkKCmNyZWF0ZW' + 'RfYXQYDyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBk' + 'YXRlZF9hdBgQIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdCIkCg' + 'NTZXgSBwoDTUFOEAASCQoFV09NRU4QARIJCgVPVEhFUhAC'); + +@$core.Deprecated('Use stationDescriptor instead') +const Station$json = { + '1': 'Station', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'guardian_id', '3': 2, '4': 1, '5': 9, '10': 'guardianId'}, + {'1': 'latitude', '3': 3, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 4, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'morning_order', '3': 5, '4': 1, '5': 5, '10': 'morningOrder'}, + {'1': 'afternoon_order', '3': 6, '4': 1, '5': 5, '10': 'afternoonOrder'}, + {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], +}; + +/// Descriptor for `Station`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List stationDescriptor = $convert.base64Decode( + 'CgdTdGF0aW9uEg4KAmlkGAEgASgJUgJpZBIfCgtndWFyZGlhbl9pZBgCIAEoCVIKZ3VhcmRpYW' + '5JZBIaCghsYXRpdHVkZRgDIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAQgASgBUglsb25n' + 'aXR1ZGUSIwoNbW9ybmluZ19vcmRlchgFIAEoBVIMbW9ybmluZ09yZGVyEicKD2FmdGVybm9vbl' + '9vcmRlchgGIAEoBVIOYWZ0ZXJub29uT3JkZXISOQoKY3JlYXRlZF9hdBgHIAEoCzIaLmdvb2ds' + 'ZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRhdGVkX2F0GAggASgLMhouZ2' + '9vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); + +@$core.Deprecated('Use childBusAssociationDescriptor instead') +const ChildBusAssociation$json = { + '1': 'ChildBusAssociation', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'bus_id', '3': 2, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'child_id', '3': 3, '4': 1, '5': 9, '10': 'childId'}, + {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.ChildBusAssociation.BusType', '10': 'busType'}, + ], + '4': [ChildBusAssociation_BusType$json], +}; + +@$core.Deprecated('Use childBusAssociationDescriptor instead') +const ChildBusAssociation_BusType$json = { + '1': 'BusType', + '2': [ + {'1': 'MORNING', '2': 0}, + {'1': 'AFTERNOON', '2': 1}, + ], +}; + +/// Descriptor for `ChildBusAssociation`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List childBusAssociationDescriptor = $convert.base64Decode( + 'ChNDaGlsZEJ1c0Fzc29jaWF0aW9uEg4KAmlkGAEgASgJUgJpZBIVCgZidXNfaWQYAiABKAlSBW' + 'J1c0lkEhkKCGNoaWxkX2lkGAMgASgJUgdjaGlsZElkEkcKCGJ1c190eXBlGAQgASgOMiwud2hl' + 'cmVfY2hpbGRfYnVzLkNoaWxkQnVzQXNzb2NpYXRpb24uQnVzVHlwZVIHYnVzVHlwZSIlCgdCdX' + 'NUeXBlEgsKB01PUk5JTkcQABINCglBRlRFUk5PT04QAQ=='); + +@$core.Deprecated('Use busStationAssociationDescriptor instead') +const BusStationAssociation$json = { + '1': 'BusStationAssociation', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'station_id', '3': 2, '4': 1, '5': 9, '10': 'stationId'}, + ], +}; + +/// Descriptor for `BusStationAssociation`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List busStationAssociationDescriptor = $convert.base64Decode( + 'ChVCdXNTdGF0aW9uQXNzb2NpYXRpb24SFQoGYnVzX2lkGAEgASgJUgVidXNJZBIdCgpzdGF0aW' + '9uX2lkGAIgASgJUglzdGF0aW9uSWQ='); + +@$core.Deprecated('Use childPhotoDescriptor instead') +const ChildPhoto$json = { + '1': 'ChildPhoto', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, + {'1': 's3_bucket', '3': 3, '4': 1, '5': 9, '10': 's3Bucket'}, + {'1': 's3_key', '3': 4, '4': 1, '5': 9, '10': 's3Key'}, + {'1': 'created_at', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], +}; + +/// Descriptor for `ChildPhoto`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List childPhotoDescriptor = $convert.base64Decode( + 'CgpDaGlsZFBob3RvEg4KAmlkGAEgASgJUgJpZBIZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZB' + 'IbCglzM19idWNrZXQYAyABKAlSCHMzQnVja2V0EhUKBnMzX2tleRgEIAEoCVIFczNLZXkSOQoK' + 'Y3JlYXRlZF9hdBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdB' + 'I5Cgp1cGRhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRl' + 'ZEF0'); + +@$core.Deprecated('Use boardingRecordDescriptor instead') +const BoardingRecord$json = { + '1': 'BoardingRecord', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, + {'1': 'bus_id', '3': 3, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'is_boarding', '3': 4, '4': 1, '5': 8, '10': 'isBoarding'}, + {'1': 'timestamp', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timestamp'}, + ], +}; + +/// Descriptor for `BoardingRecord`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List boardingRecordDescriptor = $convert.base64Decode( + 'Cg5Cb2FyZGluZ1JlY29yZBIOCgJpZBgBIAEoCVICaWQSGQoIY2hpbGRfaWQYAiABKAlSB2NoaW' + 'xkSWQSFQoGYnVzX2lkGAMgASgJUgVidXNJZBIfCgtpc19ib2FyZGluZxgEIAEoCFIKaXNCb2Fy' + 'ZGluZxI4Cgl0aW1lc3RhbXAYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl0aW' + '1lc3RhbXA='); + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbserver.dart new file mode 100644 index 00000000..692ca774 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/resources.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'resources.pb.dart'; + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pb.dart new file mode 100644 index 00000000..a01651da --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pb.dart @@ -0,0 +1,128 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class PingRequest extends $pb.GeneratedMessage { + factory PingRequest({ + $core.String? name, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + return $result; + } + PingRequest._() : super(); + factory PingRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PingRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PingRequest clone() => PingRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PingRequest copyWith(void Function(PingRequest) updates) => super.copyWith((message) => updates(message as PingRequest)) as PingRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PingRequest create() => PingRequest._(); + PingRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PingRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PingRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); +} + +class PingResponse extends $pb.GeneratedMessage { + factory PingResponse({ + $core.String? message, + }) { + final $result = create(); + if (message != null) { + $result.message = message; + } + return $result; + } + PingResponse._() : super(); + factory PingResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PingResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'message') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PingResponse clone() => PingResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PingResponse copyWith(void Function(PingResponse) updates) => super.copyWith((message) => updates(message as PingResponse)) as PingResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PingResponse create() => PingResponse._(); + PingResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PingResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PingResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get message => $_getSZ(0); + @$pb.TagNumber(1) + set message($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasMessage() => $_has(0); + @$pb.TagNumber(1) + void clearMessage() => clearField(1); +} + +class HealthcheckServiceApi { + $pb.RpcClient _client; + HealthcheckServiceApi(this._client); + + $async.Future ping($pb.ClientContext? ctx, PingRequest request) => + _client.invoke(ctx, 'HealthcheckService', 'Ping', request, PingResponse()) + ; +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbenum.dart new file mode 100644 index 00000000..c9450c86 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbjson.dart new file mode 100644 index 00000000..8255d4ea --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbjson.dart @@ -0,0 +1,57 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use pingRequestDescriptor instead') +const PingRequest$json = { + '1': 'PingRequest', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + ], +}; + +/// Descriptor for `PingRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List pingRequestDescriptor = $convert.base64Decode( + 'CgtQaW5nUmVxdWVzdBISCgRuYW1lGAEgASgJUgRuYW1l'); + +@$core.Deprecated('Use pingResponseDescriptor instead') +const PingResponse$json = { + '1': 'PingResponse', + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + ], +}; + +/// Descriptor for `PingResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( + 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); + +const $core.Map<$core.String, $core.dynamic> HealthcheckServiceBase$json = { + '1': 'HealthcheckService', + '2': [ + {'1': 'Ping', '2': '.where_child_bus.v1.PingRequest', '3': '.where_child_bus.v1.PingResponse'}, + ], +}; + +@$core.Deprecated('Use healthcheckServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> HealthcheckServiceBase$messageJson = { + '.where_child_bus.v1.PingRequest': PingRequest$json, + '.where_child_bus.v1.PingResponse': PingResponse$json, +}; + +/// Descriptor for `HealthcheckService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List healthcheckServiceDescriptor = $convert.base64Decode( + 'ChJIZWFsdGhjaGVja1NlcnZpY2USSQoEUGluZxIfLndoZXJlX2NoaWxkX2J1cy52MS5QaW5nUm' + 'VxdWVzdBogLndoZXJlX2NoaWxkX2J1cy52MS5QaW5nUmVzcG9uc2U='); + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbserver.dart new file mode 100644 index 00000000..ce048fad --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbserver.dart @@ -0,0 +1,43 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'health_check.pb.dart' as $0; +import 'health_check.pbjson.dart'; + +export 'health_check.pb.dart'; + +abstract class HealthcheckServiceBase extends $pb.GeneratedService { + $async.Future<$0.PingResponse> ping($pb.ServerContext ctx, $0.PingRequest request); + + $pb.GeneratedMessage createRequest($core.String methodName) { + switch (methodName) { + case 'Ping': return $0.PingRequest(); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { + switch (methodName) { + case 'Ping': return this.ping(ctx, request as $0.PingRequest); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => HealthcheckServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => HealthcheckServiceBase$messageJson; +} + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart new file mode 100644 index 00000000..c83cac22 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart @@ -0,0 +1,1312 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/resources.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../google/protobuf/timestamp.pb.dart' as $1; +import 'resources.pbenum.dart'; + +export 'resources.pbenum.dart'; + +class Nursery extends $pb.GeneratedMessage { + factory Nursery({ + $core.String? id, + $core.String? nurseryCode, + $core.String? name, + $core.String? address, + $core.String? phoneNumber, + $core.String? email, + $core.String? encryptedPassword, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (nurseryCode != null) { + $result.nurseryCode = nurseryCode; + } + if (name != null) { + $result.name = name; + } + if (address != null) { + $result.address = address; + } + if (phoneNumber != null) { + $result.phoneNumber = phoneNumber; + } + if (email != null) { + $result.email = email; + } + if (encryptedPassword != null) { + $result.encryptedPassword = encryptedPassword; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + Nursery._() : super(); + factory Nursery.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Nursery.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Nursery', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'nurseryCode') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..aOS(4, _omitFieldNames ? '' : 'address') + ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') + ..aOS(6, _omitFieldNames ? '' : 'email') + ..aOS(7, _omitFieldNames ? '' : 'encryptedPassword') + ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Nursery clone() => Nursery()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Nursery copyWith(void Function(Nursery) updates) => super.copyWith((message) => updates(message as Nursery)) as Nursery; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Nursery create() => Nursery._(); + Nursery createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Nursery getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Nursery? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get nurseryCode => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryCode($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryCode() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryCode() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $core.String get address => $_getSZ(3); + @$pb.TagNumber(4) + set address($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasAddress() => $_has(3); + @$pb.TagNumber(4) + void clearAddress() => clearField(4); + + @$pb.TagNumber(5) + $core.String get phoneNumber => $_getSZ(4); + @$pb.TagNumber(5) + set phoneNumber($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPhoneNumber() => $_has(4); + @$pb.TagNumber(5) + void clearPhoneNumber() => clearField(5); + + @$pb.TagNumber(6) + $core.String get email => $_getSZ(5); + @$pb.TagNumber(6) + set email($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasEmail() => $_has(5); + @$pb.TagNumber(6) + void clearEmail() => clearField(6); + + @$pb.TagNumber(7) + $core.String get encryptedPassword => $_getSZ(6); + @$pb.TagNumber(7) + set encryptedPassword($core.String v) { $_setString(6, v); } + @$pb.TagNumber(7) + $core.bool hasEncryptedPassword() => $_has(6); + @$pb.TagNumber(7) + void clearEncryptedPassword() => clearField(7); + + @$pb.TagNumber(8) + $1.Timestamp get createdAt => $_getN(7); + @$pb.TagNumber(8) + set createdAt($1.Timestamp v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasCreatedAt() => $_has(7); + @$pb.TagNumber(8) + void clearCreatedAt() => clearField(8); + @$pb.TagNumber(8) + $1.Timestamp ensureCreatedAt() => $_ensure(7); + + @$pb.TagNumber(9) + $1.Timestamp get updatedAt => $_getN(8); + @$pb.TagNumber(9) + set updatedAt($1.Timestamp v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasUpdatedAt() => $_has(8); + @$pb.TagNumber(9) + void clearUpdatedAt() => clearField(9); + @$pb.TagNumber(9) + $1.Timestamp ensureUpdatedAt() => $_ensure(8); +} + +class Guardian extends $pb.GeneratedMessage { + factory Guardian({ + $core.String? id, + $core.String? nurseryId, + $core.String? name, + $core.String? email, + $core.String? phoneNumber, + $core.String? encryptedPassword, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (name != null) { + $result.name = name; + } + if (email != null) { + $result.email = email; + } + if (phoneNumber != null) { + $result.phoneNumber = phoneNumber; + } + if (encryptedPassword != null) { + $result.encryptedPassword = encryptedPassword; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + Guardian._() : super(); + factory Guardian.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Guardian.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Guardian', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'nurseryId') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..aOS(4, _omitFieldNames ? '' : 'email') + ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') + ..aOS(6, _omitFieldNames ? '' : 'encryptedPassword') + ..aOM<$1.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Guardian clone() => Guardian()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Guardian copyWith(void Function(Guardian) updates) => super.copyWith((message) => updates(message as Guardian)) as Guardian; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Guardian create() => Guardian._(); + Guardian createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Guardian getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Guardian? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get nurseryId => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryId() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $core.String get email => $_getSZ(3); + @$pb.TagNumber(4) + set email($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasEmail() => $_has(3); + @$pb.TagNumber(4) + void clearEmail() => clearField(4); + + @$pb.TagNumber(5) + $core.String get phoneNumber => $_getSZ(4); + @$pb.TagNumber(5) + set phoneNumber($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPhoneNumber() => $_has(4); + @$pb.TagNumber(5) + void clearPhoneNumber() => clearField(5); + + @$pb.TagNumber(6) + $core.String get encryptedPassword => $_getSZ(5); + @$pb.TagNumber(6) + set encryptedPassword($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasEncryptedPassword() => $_has(5); + @$pb.TagNumber(6) + void clearEncryptedPassword() => clearField(6); + + @$pb.TagNumber(7) + $1.Timestamp get createdAt => $_getN(6); + @$pb.TagNumber(7) + set createdAt($1.Timestamp v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasCreatedAt() => $_has(6); + @$pb.TagNumber(7) + void clearCreatedAt() => clearField(7); + @$pb.TagNumber(7) + $1.Timestamp ensureCreatedAt() => $_ensure(6); + + @$pb.TagNumber(8) + $1.Timestamp get updatedAt => $_getN(7); + @$pb.TagNumber(8) + set updatedAt($1.Timestamp v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasUpdatedAt() => $_has(7); + @$pb.TagNumber(8) + void clearUpdatedAt() => clearField(8); + @$pb.TagNumber(8) + $1.Timestamp ensureUpdatedAt() => $_ensure(7); +} + +class Bus extends $pb.GeneratedMessage { + factory Bus({ + $core.String? id, + $core.String? nurseryId, + $core.String? name, + $core.String? plateNumber, + Bus_Status? status, + $core.double? latitude, + $core.double? longitude, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (name != null) { + $result.name = name; + } + if (plateNumber != null) { + $result.plateNumber = plateNumber; + } + if (status != null) { + $result.status = status; + } + if (latitude != null) { + $result.latitude = latitude; + } + if (longitude != null) { + $result.longitude = longitude; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + Bus._() : super(); + factory Bus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Bus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Bus', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'nurseryId') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..aOS(4, _omitFieldNames ? '' : 'plateNumber') + ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Bus_Status.STATUS_UNSPECIFIED, valueOf: Bus_Status.valueOf, enumValues: Bus_Status.values) + ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Bus clone() => Bus()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Bus copyWith(void Function(Bus) updates) => super.copyWith((message) => updates(message as Bus)) as Bus; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Bus create() => Bus._(); + Bus createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Bus getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Bus? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get nurseryId => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryId() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $core.String get plateNumber => $_getSZ(3); + @$pb.TagNumber(4) + set plateNumber($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPlateNumber() => $_has(3); + @$pb.TagNumber(4) + void clearPlateNumber() => clearField(4); + + @$pb.TagNumber(5) + Bus_Status get status => $_getN(4); + @$pb.TagNumber(5) + set status(Bus_Status v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasStatus() => $_has(4); + @$pb.TagNumber(5) + void clearStatus() => clearField(5); + + /// 緯度経度 + @$pb.TagNumber(6) + $core.double get latitude => $_getN(5); + @$pb.TagNumber(6) + set latitude($core.double v) { $_setDouble(5, v); } + @$pb.TagNumber(6) + $core.bool hasLatitude() => $_has(5); + @$pb.TagNumber(6) + void clearLatitude() => clearField(6); + + @$pb.TagNumber(7) + $core.double get longitude => $_getN(6); + @$pb.TagNumber(7) + set longitude($core.double v) { $_setDouble(6, v); } + @$pb.TagNumber(7) + $core.bool hasLongitude() => $_has(6); + @$pb.TagNumber(7) + void clearLongitude() => clearField(7); + + @$pb.TagNumber(8) + $1.Timestamp get createdAt => $_getN(7); + @$pb.TagNumber(8) + set createdAt($1.Timestamp v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasCreatedAt() => $_has(7); + @$pb.TagNumber(8) + void clearCreatedAt() => clearField(8); + @$pb.TagNumber(8) + $1.Timestamp ensureCreatedAt() => $_ensure(7); + + @$pb.TagNumber(9) + $1.Timestamp get updatedAt => $_getN(8); + @$pb.TagNumber(9) + set updatedAt($1.Timestamp v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasUpdatedAt() => $_has(8); + @$pb.TagNumber(9) + void clearUpdatedAt() => clearField(9); + @$pb.TagNumber(9) + $1.Timestamp ensureUpdatedAt() => $_ensure(8); +} + +class Child extends $pb.GeneratedMessage { + factory Child({ + $core.String? id, + $core.String? nurseryId, + $core.String? guardianId, + $core.String? name, + $core.int? age, + Child_Sex? sex, + $core.bool? isRideMorningBus, + $core.bool? isRideEveningBus, + $core.bool? checkForMissingItems, + $core.bool? hasBag, + $core.bool? hasLunchBox, + $core.bool? hasWaterBottle, + $core.bool? hasUmbrera, + $core.bool? hasOther, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (guardianId != null) { + $result.guardianId = guardianId; + } + if (name != null) { + $result.name = name; + } + if (age != null) { + $result.age = age; + } + if (sex != null) { + $result.sex = sex; + } + if (isRideMorningBus != null) { + $result.isRideMorningBus = isRideMorningBus; + } + if (isRideEveningBus != null) { + $result.isRideEveningBus = isRideEveningBus; + } + if (checkForMissingItems != null) { + $result.checkForMissingItems = checkForMissingItems; + } + if (hasBag != null) { + $result.hasBag = hasBag; + } + if (hasLunchBox != null) { + $result.hasLunchBox = hasLunchBox; + } + if (hasWaterBottle != null) { + $result.hasWaterBottle = hasWaterBottle; + } + if (hasUmbrera != null) { + $result.hasUmbrera = hasUmbrera; + } + if (hasOther != null) { + $result.hasOther = hasOther; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + Child._() : super(); + factory Child.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Child.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Child', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'nurseryId') + ..aOS(3, _omitFieldNames ? '' : 'guardianId') + ..aOS(4, _omitFieldNames ? '' : 'name') + ..a<$core.int>(5, _omitFieldNames ? '' : 'age', $pb.PbFieldType.O3) + ..e(6, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: Child_Sex.SEX_UNSPECIFIED, valueOf: Child_Sex.valueOf, enumValues: Child_Sex.values) + ..aOB(7, _omitFieldNames ? '' : 'isRideMorningBus') + ..aOB(8, _omitFieldNames ? '' : 'isRideEveningBus') + ..aOB(9, _omitFieldNames ? '' : 'checkForMissingItems') + ..aOB(10, _omitFieldNames ? '' : 'hasBag') + ..aOB(11, _omitFieldNames ? '' : 'hasLunchBox') + ..aOB(12, _omitFieldNames ? '' : 'hasWaterBottle') + ..aOB(13, _omitFieldNames ? '' : 'hasUmbrera') + ..aOB(14, _omitFieldNames ? '' : 'hasOther') + ..aOM<$1.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Child clone() => Child()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Child copyWith(void Function(Child) updates) => super.copyWith((message) => updates(message as Child)) as Child; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Child create() => Child._(); + Child createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Child getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Child? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get nurseryId => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryId() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get guardianId => $_getSZ(2); + @$pb.TagNumber(3) + set guardianId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasGuardianId() => $_has(2); + @$pb.TagNumber(3) + void clearGuardianId() => clearField(3); + + @$pb.TagNumber(4) + $core.String get name => $_getSZ(3); + @$pb.TagNumber(4) + set name($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasName() => $_has(3); + @$pb.TagNumber(4) + void clearName() => clearField(4); + + @$pb.TagNumber(5) + $core.int get age => $_getIZ(4); + @$pb.TagNumber(5) + set age($core.int v) { $_setSignedInt32(4, v); } + @$pb.TagNumber(5) + $core.bool hasAge() => $_has(4); + @$pb.TagNumber(5) + void clearAge() => clearField(5); + + @$pb.TagNumber(6) + Child_Sex get sex => $_getN(5); + @$pb.TagNumber(6) + set sex(Child_Sex v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasSex() => $_has(5); + @$pb.TagNumber(6) + void clearSex() => clearField(6); + + @$pb.TagNumber(7) + $core.bool get isRideMorningBus => $_getBF(6); + @$pb.TagNumber(7) + set isRideMorningBus($core.bool v) { $_setBool(6, v); } + @$pb.TagNumber(7) + $core.bool hasIsRideMorningBus() => $_has(6); + @$pb.TagNumber(7) + void clearIsRideMorningBus() => clearField(7); + + @$pb.TagNumber(8) + $core.bool get isRideEveningBus => $_getBF(7); + @$pb.TagNumber(8) + set isRideEveningBus($core.bool v) { $_setBool(7, v); } + @$pb.TagNumber(8) + $core.bool hasIsRideEveningBus() => $_has(7); + @$pb.TagNumber(8) + void clearIsRideEveningBus() => clearField(8); + + @$pb.TagNumber(9) + $core.bool get checkForMissingItems => $_getBF(8); + @$pb.TagNumber(9) + set checkForMissingItems($core.bool v) { $_setBool(8, v); } + @$pb.TagNumber(9) + $core.bool hasCheckForMissingItems() => $_has(8); + @$pb.TagNumber(9) + void clearCheckForMissingItems() => clearField(9); + + @$pb.TagNumber(10) + $core.bool get hasBag => $_getBF(9); + @$pb.TagNumber(10) + set hasBag($core.bool v) { $_setBool(9, v); } + @$pb.TagNumber(10) + $core.bool hasHasBag() => $_has(9); + @$pb.TagNumber(10) + void clearHasBag() => clearField(10); + + @$pb.TagNumber(11) + $core.bool get hasLunchBox => $_getBF(10); + @$pb.TagNumber(11) + set hasLunchBox($core.bool v) { $_setBool(10, v); } + @$pb.TagNumber(11) + $core.bool hasHasLunchBox() => $_has(10); + @$pb.TagNumber(11) + void clearHasLunchBox() => clearField(11); + + @$pb.TagNumber(12) + $core.bool get hasWaterBottle => $_getBF(11); + @$pb.TagNumber(12) + set hasWaterBottle($core.bool v) { $_setBool(11, v); } + @$pb.TagNumber(12) + $core.bool hasHasWaterBottle() => $_has(11); + @$pb.TagNumber(12) + void clearHasWaterBottle() => clearField(12); + + @$pb.TagNumber(13) + $core.bool get hasUmbrera => $_getBF(12); + @$pb.TagNumber(13) + set hasUmbrera($core.bool v) { $_setBool(12, v); } + @$pb.TagNumber(13) + $core.bool hasHasUmbrera() => $_has(12); + @$pb.TagNumber(13) + void clearHasUmbrera() => clearField(13); + + @$pb.TagNumber(14) + $core.bool get hasOther => $_getBF(13); + @$pb.TagNumber(14) + set hasOther($core.bool v) { $_setBool(13, v); } + @$pb.TagNumber(14) + $core.bool hasHasOther() => $_has(13); + @$pb.TagNumber(14) + void clearHasOther() => clearField(14); + + @$pb.TagNumber(15) + $1.Timestamp get createdAt => $_getN(14); + @$pb.TagNumber(15) + set createdAt($1.Timestamp v) { setField(15, v); } + @$pb.TagNumber(15) + $core.bool hasCreatedAt() => $_has(14); + @$pb.TagNumber(15) + void clearCreatedAt() => clearField(15); + @$pb.TagNumber(15) + $1.Timestamp ensureCreatedAt() => $_ensure(14); + + @$pb.TagNumber(16) + $1.Timestamp get updatedAt => $_getN(15); + @$pb.TagNumber(16) + set updatedAt($1.Timestamp v) { setField(16, v); } + @$pb.TagNumber(16) + $core.bool hasUpdatedAt() => $_has(15); + @$pb.TagNumber(16) + void clearUpdatedAt() => clearField(16); + @$pb.TagNumber(16) + $1.Timestamp ensureUpdatedAt() => $_ensure(15); +} + +class Station extends $pb.GeneratedMessage { + factory Station({ + $core.String? id, + $core.String? guardianId, + $core.double? latitude, + $core.double? longitude, + $core.int? morningOrder, + $core.int? eveningOrder, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (guardianId != null) { + $result.guardianId = guardianId; + } + if (latitude != null) { + $result.latitude = latitude; + } + if (longitude != null) { + $result.longitude = longitude; + } + if (morningOrder != null) { + $result.morningOrder = morningOrder; + } + if (eveningOrder != null) { + $result.eveningOrder = eveningOrder; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + Station._() : super(); + factory Station.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Station.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Station', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'guardianId') + ..a<$core.double>(3, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..a<$core.int>(5, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) + ..a<$core.int>(6, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) + ..aOM<$1.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Station clone() => Station()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Station copyWith(void Function(Station) updates) => super.copyWith((message) => updates(message as Station)) as Station; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Station create() => Station._(); + Station createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Station getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Station? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get guardianId => $_getSZ(1); + @$pb.TagNumber(2) + set guardianId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasGuardianId() => $_has(1); + @$pb.TagNumber(2) + void clearGuardianId() => clearField(2); + + @$pb.TagNumber(3) + $core.double get latitude => $_getN(2); + @$pb.TagNumber(3) + set latitude($core.double v) { $_setDouble(2, v); } + @$pb.TagNumber(3) + $core.bool hasLatitude() => $_has(2); + @$pb.TagNumber(3) + void clearLatitude() => clearField(3); + + @$pb.TagNumber(4) + $core.double get longitude => $_getN(3); + @$pb.TagNumber(4) + set longitude($core.double v) { $_setDouble(3, v); } + @$pb.TagNumber(4) + $core.bool hasLongitude() => $_has(3); + @$pb.TagNumber(4) + void clearLongitude() => clearField(4); + + @$pb.TagNumber(5) + $core.int get morningOrder => $_getIZ(4); + @$pb.TagNumber(5) + set morningOrder($core.int v) { $_setSignedInt32(4, v); } + @$pb.TagNumber(5) + $core.bool hasMorningOrder() => $_has(4); + @$pb.TagNumber(5) + void clearMorningOrder() => clearField(5); + + @$pb.TagNumber(6) + $core.int get eveningOrder => $_getIZ(5); + @$pb.TagNumber(6) + set eveningOrder($core.int v) { $_setSignedInt32(5, v); } + @$pb.TagNumber(6) + $core.bool hasEveningOrder() => $_has(5); + @$pb.TagNumber(6) + void clearEveningOrder() => clearField(6); + + @$pb.TagNumber(7) + $1.Timestamp get createdAt => $_getN(6); + @$pb.TagNumber(7) + set createdAt($1.Timestamp v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasCreatedAt() => $_has(6); + @$pb.TagNumber(7) + void clearCreatedAt() => clearField(7); + @$pb.TagNumber(7) + $1.Timestamp ensureCreatedAt() => $_ensure(6); + + @$pb.TagNumber(8) + $1.Timestamp get updatedAt => $_getN(7); + @$pb.TagNumber(8) + set updatedAt($1.Timestamp v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasUpdatedAt() => $_has(7); + @$pb.TagNumber(8) + void clearUpdatedAt() => clearField(8); + @$pb.TagNumber(8) + $1.Timestamp ensureUpdatedAt() => $_ensure(7); +} + +class ChildBusAssociation extends $pb.GeneratedMessage { + factory ChildBusAssociation({ + $core.String? id, + $core.String? busId, + $core.String? childId, + ChildBusAssociation_BusType? busType, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (busId != null) { + $result.busId = busId; + } + if (childId != null) { + $result.childId = childId; + } + if (busType != null) { + $result.busType = busType; + } + return $result; + } + ChildBusAssociation._() : super(); + factory ChildBusAssociation.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ChildBusAssociation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildBusAssociation', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'busId') + ..aOS(3, _omitFieldNames ? '' : 'childId') + ..e(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: ChildBusAssociation_BusType.BUS_TYPE_UNSPECIFIED, valueOf: ChildBusAssociation_BusType.valueOf, enumValues: ChildBusAssociation_BusType.values) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ChildBusAssociation clone() => ChildBusAssociation()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ChildBusAssociation copyWith(void Function(ChildBusAssociation) updates) => super.copyWith((message) => updates(message as ChildBusAssociation)) as ChildBusAssociation; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ChildBusAssociation create() => ChildBusAssociation._(); + ChildBusAssociation createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ChildBusAssociation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ChildBusAssociation? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get busId => $_getSZ(1); + @$pb.TagNumber(2) + set busId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasBusId() => $_has(1); + @$pb.TagNumber(2) + void clearBusId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get childId => $_getSZ(2); + @$pb.TagNumber(3) + set childId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasChildId() => $_has(2); + @$pb.TagNumber(3) + void clearChildId() => clearField(3); + + @$pb.TagNumber(4) + ChildBusAssociation_BusType get busType => $_getN(3); + @$pb.TagNumber(4) + set busType(ChildBusAssociation_BusType v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasBusType() => $_has(3); + @$pb.TagNumber(4) + void clearBusType() => clearField(4); +} + +class BusStationAssociation extends $pb.GeneratedMessage { + factory BusStationAssociation({ + $core.String? busId, + $core.String? stationId, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + if (stationId != null) { + $result.stationId = stationId; + } + return $result; + } + BusStationAssociation._() : super(); + factory BusStationAssociation.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BusStationAssociation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BusStationAssociation', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..aOS(2, _omitFieldNames ? '' : 'stationId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + BusStationAssociation clone() => BusStationAssociation()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + BusStationAssociation copyWith(void Function(BusStationAssociation) updates) => super.copyWith((message) => updates(message as BusStationAssociation)) as BusStationAssociation; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BusStationAssociation create() => BusStationAssociation._(); + BusStationAssociation createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BusStationAssociation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BusStationAssociation? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get stationId => $_getSZ(1); + @$pb.TagNumber(2) + set stationId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasStationId() => $_has(1); + @$pb.TagNumber(2) + void clearStationId() => clearField(2); +} + +class ChildPhoto extends $pb.GeneratedMessage { + factory ChildPhoto({ + $core.String? id, + $core.String? childId, + $core.String? s3Bucket, + $core.String? s3Key, + $1.Timestamp? createdAt, + $1.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (childId != null) { + $result.childId = childId; + } + if (s3Bucket != null) { + $result.s3Bucket = s3Bucket; + } + if (s3Key != null) { + $result.s3Key = s3Key; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + ChildPhoto._() : super(); + factory ChildPhoto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ChildPhoto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildPhoto', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'childId') + ..aOS(3, _omitFieldNames ? '' : 's3Bucket') + ..aOS(4, _omitFieldNames ? '' : 's3Key') + ..aOM<$1.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) + ..aOM<$1.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ChildPhoto clone() => ChildPhoto()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ChildPhoto copyWith(void Function(ChildPhoto) updates) => super.copyWith((message) => updates(message as ChildPhoto)) as ChildPhoto; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ChildPhoto create() => ChildPhoto._(); + ChildPhoto createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ChildPhoto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ChildPhoto? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get childId => $_getSZ(1); + @$pb.TagNumber(2) + set childId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasChildId() => $_has(1); + @$pb.TagNumber(2) + void clearChildId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get s3Bucket => $_getSZ(2); + @$pb.TagNumber(3) + set s3Bucket($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasS3Bucket() => $_has(2); + @$pb.TagNumber(3) + void clearS3Bucket() => clearField(3); + + @$pb.TagNumber(4) + $core.String get s3Key => $_getSZ(3); + @$pb.TagNumber(4) + set s3Key($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasS3Key() => $_has(3); + @$pb.TagNumber(4) + void clearS3Key() => clearField(4); + + @$pb.TagNumber(5) + $1.Timestamp get createdAt => $_getN(4); + @$pb.TagNumber(5) + set createdAt($1.Timestamp v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasCreatedAt() => $_has(4); + @$pb.TagNumber(5) + void clearCreatedAt() => clearField(5); + @$pb.TagNumber(5) + $1.Timestamp ensureCreatedAt() => $_ensure(4); + + @$pb.TagNumber(6) + $1.Timestamp get updatedAt => $_getN(5); + @$pb.TagNumber(6) + set updatedAt($1.Timestamp v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasUpdatedAt() => $_has(5); + @$pb.TagNumber(6) + void clearUpdatedAt() => clearField(6); + @$pb.TagNumber(6) + $1.Timestamp ensureUpdatedAt() => $_ensure(5); +} + +class BoardingRecord extends $pb.GeneratedMessage { + factory BoardingRecord({ + $core.String? id, + $core.String? childId, + $core.String? busId, + $core.bool? isBoarding, + $1.Timestamp? timestamp, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (childId != null) { + $result.childId = childId; + } + if (busId != null) { + $result.busId = busId; + } + if (isBoarding != null) { + $result.isBoarding = isBoarding; + } + if (timestamp != null) { + $result.timestamp = timestamp; + } + return $result; + } + BoardingRecord._() : super(); + factory BoardingRecord.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BoardingRecord.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BoardingRecord', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'childId') + ..aOS(3, _omitFieldNames ? '' : 'busId') + ..aOB(4, _omitFieldNames ? '' : 'isBoarding') + ..aOM<$1.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $1.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + BoardingRecord clone() => BoardingRecord()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + BoardingRecord copyWith(void Function(BoardingRecord) updates) => super.copyWith((message) => updates(message as BoardingRecord)) as BoardingRecord; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BoardingRecord create() => BoardingRecord._(); + BoardingRecord createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BoardingRecord getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BoardingRecord? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get childId => $_getSZ(1); + @$pb.TagNumber(2) + set childId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasChildId() => $_has(1); + @$pb.TagNumber(2) + void clearChildId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get busId => $_getSZ(2); + @$pb.TagNumber(3) + set busId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasBusId() => $_has(2); + @$pb.TagNumber(3) + void clearBusId() => clearField(3); + + @$pb.TagNumber(4) + $core.bool get isBoarding => $_getBF(3); + @$pb.TagNumber(4) + set isBoarding($core.bool v) { $_setBool(3, v); } + @$pb.TagNumber(4) + $core.bool hasIsBoarding() => $_has(3); + @$pb.TagNumber(4) + void clearIsBoarding() => clearField(4); + + @$pb.TagNumber(5) + $1.Timestamp get timestamp => $_getN(4); + @$pb.TagNumber(5) + set timestamp($1.Timestamp v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasTimestamp() => $_has(4); + @$pb.TagNumber(5) + void clearTimestamp() => clearField(5); + @$pb.TagNumber(5) + $1.Timestamp ensureTimestamp() => $_ensure(4); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbenum.dart new file mode 100644 index 00000000..bbf9be4d --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbenum.dart @@ -0,0 +1,72 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/resources.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class Bus_Status extends $pb.ProtobufEnum { + static const Bus_Status STATUS_UNSPECIFIED = Bus_Status._(0, _omitEnumNames ? '' : 'STATUS_UNSPECIFIED'); + static const Bus_Status STATUS_STOPPED = Bus_Status._(1, _omitEnumNames ? '' : 'STATUS_STOPPED'); + static const Bus_Status STATUS_RUNNING = Bus_Status._(2, _omitEnumNames ? '' : 'STATUS_RUNNING'); + static const Bus_Status STATUS_MAINTEINANCE = Bus_Status._(3, _omitEnumNames ? '' : 'STATUS_MAINTEINANCE'); + + static const $core.List values = [ + STATUS_UNSPECIFIED, + STATUS_STOPPED, + STATUS_RUNNING, + STATUS_MAINTEINANCE, + ]; + + static final $core.Map<$core.int, Bus_Status> _byValue = $pb.ProtobufEnum.initByValue(values); + static Bus_Status? valueOf($core.int value) => _byValue[value]; + + const Bus_Status._($core.int v, $core.String n) : super(v, n); +} + +class Child_Sex extends $pb.ProtobufEnum { + static const Child_Sex SEX_UNSPECIFIED = Child_Sex._(0, _omitEnumNames ? '' : 'SEX_UNSPECIFIED'); + static const Child_Sex SEX_MAN = Child_Sex._(1, _omitEnumNames ? '' : 'SEX_MAN'); + static const Child_Sex SEX_WOMEN = Child_Sex._(2, _omitEnumNames ? '' : 'SEX_WOMEN'); + static const Child_Sex SEX_OTHER = Child_Sex._(3, _omitEnumNames ? '' : 'SEX_OTHER'); + + static const $core.List values = [ + SEX_UNSPECIFIED, + SEX_MAN, + SEX_WOMEN, + SEX_OTHER, + ]; + + static final $core.Map<$core.int, Child_Sex> _byValue = $pb.ProtobufEnum.initByValue(values); + static Child_Sex? valueOf($core.int value) => _byValue[value]; + + const Child_Sex._($core.int v, $core.String n) : super(v, n); +} + +class ChildBusAssociation_BusType extends $pb.ProtobufEnum { + static const ChildBusAssociation_BusType BUS_TYPE_UNSPECIFIED = ChildBusAssociation_BusType._(0, _omitEnumNames ? '' : 'BUS_TYPE_UNSPECIFIED'); + static const ChildBusAssociation_BusType BUS_TYPE_MORNING = ChildBusAssociation_BusType._(1, _omitEnumNames ? '' : 'BUS_TYPE_MORNING'); + static const ChildBusAssociation_BusType BUS_TYPE_EVENING = ChildBusAssociation_BusType._(2, _omitEnumNames ? '' : 'BUS_TYPE_EVENING'); + + static const $core.List values = [ + BUS_TYPE_UNSPECIFIED, + BUS_TYPE_MORNING, + BUS_TYPE_EVENING, + ]; + + static final $core.Map<$core.int, ChildBusAssociation_BusType> _byValue = $pb.ProtobufEnum.initByValue(values); + static ChildBusAssociation_BusType? valueOf($core.int value) => _byValue[value]; + + const ChildBusAssociation_BusType._($core.int v, $core.String n) : super(v, n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbjson.dart new file mode 100644 index 00000000..69b8e623 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -0,0 +1,262 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/resources.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use nurseryDescriptor instead') +const Nursery$json = { + '1': 'Nursery', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'nursery_code', '3': 2, '4': 1, '5': 9, '10': 'nurseryCode'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'address', '3': 4, '4': 1, '5': 9, '10': 'address'}, + {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, + {'1': 'email', '3': 6, '4': 1, '5': 9, '10': 'email'}, + {'1': 'encrypted_password', '3': 7, '4': 1, '5': 9, '10': 'encryptedPassword'}, + {'1': 'created_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], +}; + +/// Descriptor for `Nursery`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List nurseryDescriptor = $convert.base64Decode( + 'CgdOdXJzZXJ5Eg4KAmlkGAEgASgJUgJpZBIhCgxudXJzZXJ5X2NvZGUYAiABKAlSC251cnNlcn' + 'lDb2RlEhIKBG5hbWUYAyABKAlSBG5hbWUSGAoHYWRkcmVzcxgEIAEoCVIHYWRkcmVzcxIhCgxw' + 'aG9uZV9udW1iZXIYBSABKAlSC3Bob25lTnVtYmVyEhQKBWVtYWlsGAYgASgJUgVlbWFpbBItCh' + 'JlbmNyeXB0ZWRfcGFzc3dvcmQYByABKAlSEWVuY3J5cHRlZFBhc3N3b3JkEjkKCmNyZWF0ZWRf' + 'YXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYX' + 'RlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); + +@$core.Deprecated('Use guardianDescriptor instead') +const Guardian$json = { + '1': 'Guardian', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'email', '3': 4, '4': 1, '5': 9, '10': 'email'}, + {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, + {'1': 'encrypted_password', '3': 6, '4': 1, '5': 9, '10': 'encryptedPassword'}, + {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], +}; + +/// Descriptor for `Guardian`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List guardianDescriptor = $convert.base64Decode( + 'CghHdWFyZGlhbhIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbnVyc2VyeU' + 'lkEhIKBG5hbWUYAyABKAlSBG5hbWUSFAoFZW1haWwYBCABKAlSBWVtYWlsEiEKDHBob25lX251' + 'bWJlchgFIAEoCVILcGhvbmVOdW1iZXISLQoSZW5jcnlwdGVkX3Bhc3N3b3JkGAYgASgJUhFlbm' + 'NyeXB0ZWRQYXNzd29yZBI5CgpjcmVhdGVkX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRp' + 'bWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idW' + 'YuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); + +@$core.Deprecated('Use busDescriptor instead') +const Bus$json = { + '1': 'Bus', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'plate_number', '3': 4, '4': 1, '5': 9, '10': 'plateNumber'}, + {'1': 'status', '3': 5, '4': 1, '5': 14, '6': '.where_child_bus.v1.Bus.Status', '10': 'status'}, + {'1': 'latitude', '3': 6, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 7, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'created_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], + '4': [Bus_Status$json], +}; + +@$core.Deprecated('Use busDescriptor instead') +const Bus_Status$json = { + '1': 'Status', + '2': [ + {'1': 'STATUS_UNSPECIFIED', '2': 0}, + {'1': 'STATUS_STOPPED', '2': 1}, + {'1': 'STATUS_RUNNING', '2': 2}, + {'1': 'STATUS_MAINTEINANCE', '2': 3}, + ], +}; + +/// Descriptor for `Bus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List busDescriptor = $convert.base64Decode( + 'CgNCdXMSDgoCaWQYASABKAlSAmlkEh0KCm51cnNlcnlfaWQYAiABKAlSCW51cnNlcnlJZBISCg' + 'RuYW1lGAMgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgEIAEoCVILcGxhdGVOdW1iZXISNgoG' + 'c3RhdHVzGAUgASgOMh4ud2hlcmVfY2hpbGRfYnVzLnYxLkJ1cy5TdGF0dXNSBnN0YXR1cxIaCg' + 'hsYXRpdHVkZRgGIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAcgASgBUglsb25naXR1ZGUS' + 'OQoKY3JlYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZW' + 'RBdBI5Cgp1cGRhdGVkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBk' + 'YXRlZEF0ImEKBlN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABISCg5TVEFUVVNfU1RPUF' + 'BFRBABEhIKDlNUQVRVU19SVU5OSU5HEAISFwoTU1RBVFVTX01BSU5URUlOQU5DRRAD'); + +@$core.Deprecated('Use childDescriptor instead') +const Child$json = { + '1': 'Child', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'guardian_id', '3': 3, '4': 1, '5': 9, '10': 'guardianId'}, + {'1': 'name', '3': 4, '4': 1, '5': 9, '10': 'name'}, + {'1': 'age', '3': 5, '4': 1, '5': 5, '10': 'age'}, + {'1': 'sex', '3': 6, '4': 1, '5': 14, '6': '.where_child_bus.v1.Child.Sex', '10': 'sex'}, + {'1': 'is_ride_morning_bus', '3': 7, '4': 1, '5': 8, '10': 'isRideMorningBus'}, + {'1': 'is_ride_evening_bus', '3': 8, '4': 1, '5': 8, '10': 'isRideEveningBus'}, + {'1': 'check_for_missing_items', '3': 9, '4': 1, '5': 8, '10': 'checkForMissingItems'}, + {'1': 'has_bag', '3': 10, '4': 1, '5': 8, '10': 'hasBag'}, + {'1': 'has_lunch_box', '3': 11, '4': 1, '5': 8, '10': 'hasLunchBox'}, + {'1': 'has_water_bottle', '3': 12, '4': 1, '5': 8, '10': 'hasWaterBottle'}, + {'1': 'has_umbrera', '3': 13, '4': 1, '5': 8, '10': 'hasUmbrera'}, + {'1': 'has_other', '3': 14, '4': 1, '5': 8, '10': 'hasOther'}, + {'1': 'created_at', '3': 15, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 16, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], + '4': [Child_Sex$json], +}; + +@$core.Deprecated('Use childDescriptor instead') +const Child_Sex$json = { + '1': 'Sex', + '2': [ + {'1': 'SEX_UNSPECIFIED', '2': 0}, + {'1': 'SEX_MAN', '2': 1}, + {'1': 'SEX_WOMEN', '2': 2}, + {'1': 'SEX_OTHER', '2': 3}, + ], +}; + +/// Descriptor for `Child`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List childDescriptor = $convert.base64Decode( + 'CgVDaGlsZBIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbnVyc2VyeUlkEh' + '8KC2d1YXJkaWFuX2lkGAMgASgJUgpndWFyZGlhbklkEhIKBG5hbWUYBCABKAlSBG5hbWUSEAoD' + 'YWdlGAUgASgFUgNhZ2USLwoDc2V4GAYgASgOMh0ud2hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkLl' + 'NleFIDc2V4Ei0KE2lzX3JpZGVfbW9ybmluZ19idXMYByABKAhSEGlzUmlkZU1vcm5pbmdCdXMS' + 'LQoTaXNfcmlkZV9ldmVuaW5nX2J1cxgIIAEoCFIQaXNSaWRlRXZlbmluZ0J1cxI1ChdjaGVja1' + '9mb3JfbWlzc2luZ19pdGVtcxgJIAEoCFIUY2hlY2tGb3JNaXNzaW5nSXRlbXMSFwoHaGFzX2Jh' + 'ZxgKIAEoCFIGaGFzQmFnEiIKDWhhc19sdW5jaF9ib3gYCyABKAhSC2hhc0x1bmNoQm94EigKEG' + 'hhc193YXRlcl9ib3R0bGUYDCABKAhSDmhhc1dhdGVyQm90dGxlEh8KC2hhc191bWJyZXJhGA0g' + 'ASgIUgpoYXNVbWJyZXJhEhsKCWhhc19vdGhlchgOIAEoCFIIaGFzT3RoZXISOQoKY3JlYXRlZF' + '9hdBgPIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRh' + 'dGVkX2F0GBAgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0IkUKA1' + 'NleBITCg9TRVhfVU5TUEVDSUZJRUQQABILCgdTRVhfTUFOEAESDQoJU0VYX1dPTUVOEAISDQoJ' + 'U0VYX09USEVSEAM='); + +@$core.Deprecated('Use stationDescriptor instead') +const Station$json = { + '1': 'Station', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'guardian_id', '3': 2, '4': 1, '5': 9, '10': 'guardianId'}, + {'1': 'latitude', '3': 3, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 4, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'morning_order', '3': 5, '4': 1, '5': 5, '10': 'morningOrder'}, + {'1': 'evening_order', '3': 6, '4': 1, '5': 5, '10': 'eveningOrder'}, + {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], +}; + +/// Descriptor for `Station`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List stationDescriptor = $convert.base64Decode( + 'CgdTdGF0aW9uEg4KAmlkGAEgASgJUgJpZBIfCgtndWFyZGlhbl9pZBgCIAEoCVIKZ3VhcmRpYW' + '5JZBIaCghsYXRpdHVkZRgDIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAQgASgBUglsb25n' + 'aXR1ZGUSIwoNbW9ybmluZ19vcmRlchgFIAEoBVIMbW9ybmluZ09yZGVyEiMKDWV2ZW5pbmdfb3' + 'JkZXIYBiABKAVSDGV2ZW5pbmdPcmRlchI5CgpjcmVhdGVkX2F0GAcgASgLMhouZ29vZ2xlLnBy' + 'b3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbG' + 'UucHJvdG9idWYuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); + +@$core.Deprecated('Use childBusAssociationDescriptor instead') +const ChildBusAssociation$json = { + '1': 'ChildBusAssociation', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'bus_id', '3': 2, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'child_id', '3': 3, '4': 1, '5': 9, '10': 'childId'}, + {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.ChildBusAssociation.BusType', '10': 'busType'}, + ], + '4': [ChildBusAssociation_BusType$json], +}; + +@$core.Deprecated('Use childBusAssociationDescriptor instead') +const ChildBusAssociation_BusType$json = { + '1': 'BusType', + '2': [ + {'1': 'BUS_TYPE_UNSPECIFIED', '2': 0}, + {'1': 'BUS_TYPE_MORNING', '2': 1}, + {'1': 'BUS_TYPE_EVENING', '2': 2}, + ], +}; + +/// Descriptor for `ChildBusAssociation`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List childBusAssociationDescriptor = $convert.base64Decode( + 'ChNDaGlsZEJ1c0Fzc29jaWF0aW9uEg4KAmlkGAEgASgJUgJpZBIVCgZidXNfaWQYAiABKAlSBW' + 'J1c0lkEhkKCGNoaWxkX2lkGAMgASgJUgdjaGlsZElkEkoKCGJ1c190eXBlGAQgASgOMi8ud2hl' + 'cmVfY2hpbGRfYnVzLnYxLkNoaWxkQnVzQXNzb2NpYXRpb24uQnVzVHlwZVIHYnVzVHlwZSJPCg' + 'dCdXNUeXBlEhgKFEJVU19UWVBFX1VOU1BFQ0lGSUVEEAASFAoQQlVTX1RZUEVfTU9STklORxAB' + 'EhQKEEJVU19UWVBFX0VWRU5JTkcQAg=='); + +@$core.Deprecated('Use busStationAssociationDescriptor instead') +const BusStationAssociation$json = { + '1': 'BusStationAssociation', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'station_id', '3': 2, '4': 1, '5': 9, '10': 'stationId'}, + ], +}; + +/// Descriptor for `BusStationAssociation`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List busStationAssociationDescriptor = $convert.base64Decode( + 'ChVCdXNTdGF0aW9uQXNzb2NpYXRpb24SFQoGYnVzX2lkGAEgASgJUgVidXNJZBIdCgpzdGF0aW' + '9uX2lkGAIgASgJUglzdGF0aW9uSWQ='); + +@$core.Deprecated('Use childPhotoDescriptor instead') +const ChildPhoto$json = { + '1': 'ChildPhoto', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, + {'1': 's3_bucket', '3': 3, '4': 1, '5': 9, '10': 's3Bucket'}, + {'1': 's3_key', '3': 4, '4': 1, '5': 9, '10': 's3Key'}, + {'1': 'created_at', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], +}; + +/// Descriptor for `ChildPhoto`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List childPhotoDescriptor = $convert.base64Decode( + 'CgpDaGlsZFBob3RvEg4KAmlkGAEgASgJUgJpZBIZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZB' + 'IbCglzM19idWNrZXQYAyABKAlSCHMzQnVja2V0EhUKBnMzX2tleRgEIAEoCVIFczNLZXkSOQoK' + 'Y3JlYXRlZF9hdBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdB' + 'I5Cgp1cGRhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRl' + 'ZEF0'); + +@$core.Deprecated('Use boardingRecordDescriptor instead') +const BoardingRecord$json = { + '1': 'BoardingRecord', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, + {'1': 'bus_id', '3': 3, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'is_boarding', '3': 4, '4': 1, '5': 8, '10': 'isBoarding'}, + {'1': 'timestamp', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timestamp'}, + ], +}; + +/// Descriptor for `BoardingRecord`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List boardingRecordDescriptor = $convert.base64Decode( + 'Cg5Cb2FyZGluZ1JlY29yZBIOCgJpZBgBIAEoCVICaWQSGQoIY2hpbGRfaWQYAiABKAlSB2NoaW' + 'xkSWQSFQoGYnVzX2lkGAMgASgJUgVidXNJZBIfCgtpc19ib2FyZGluZxgEIAEoCFIKaXNCb2Fy' + 'ZGluZxI4Cgl0aW1lc3RhbXAYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl0aW' + '1lc3RhbXA='); + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbserver.dart new file mode 100644 index 00000000..39e55a87 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/resources.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'resources.pb.dart'; + diff --git a/machine_learning/src/proto-gen/where_child_bus/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/resources_pb2.py new file mode 100644 index 00000000..052d95e0 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/resources_pb2.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/resources.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fwhere_child_bus/resources.proto\x12\x0fwhere_child_bus\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x86\x03\n\x03\x62us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x33\n\x06status\x18\x05 \x01(\x0e\x32\x1b.where_child_bus.bus.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"4\n\x06Status\x12\x0b\n\x07STOPPED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x10\n\x0cMAINTEINANCE\x10\x02\"\x85\x05\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12,\n\x03sex\x18\x06 \x01(\x0e\x32\x1a.where_child_bus.Child.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12\x31\n\x15is_ride_afternoon_bus\x18\x08 \x01(\x08R\x12isRideAfternoonBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"$\n\x03Sex\x12\x07\n\x03MAN\x10\x00\x12\t\n\x05WOMEN\x10\x01\x12\t\n\x05OTHER\x10\x02\"\xb8\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12\'\n\x0f\x61\x66ternoon_order\x18\x06 \x01(\x05R\x0e\x61\x66ternoonOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xc7\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12G\n\x08\x62us_type\x18\x04 \x01(\x0e\x32,.where_child_bus.ChildBusAssociation.BusTypeR\x07\x62usType\"%\n\x07\x42usType\x12\x0b\n\x07MORNING\x10\x00\x12\r\n\tAFTERNOON\x10\x01\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestampB\xcc\x01\n\x13\x63om.where_child_busB\x0eResourcesProtoP\x01ZQgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus\xa2\x02\x03WXX\xaa\x02\rWhereChildBus\xca\x02\rWhereChildBus\xe2\x02\x19WhereChildBus\\GPBMetadata\xea\x02\rWhereChildBusb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.resources_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\023com.where_child_busB\016ResourcesProtoP\001ZQgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus\242\002\003WXX\252\002\rWhereChildBus\312\002\rWhereChildBus\342\002\031WhereChildBus\\GPBMetadata\352\002\rWhereChildBus' + _globals['_NURSERY']._serialized_start=86 + _globals['_NURSERY']._serialized_end=414 + _globals['_GUARDIAN']._serialized_start=417 + _globals['_GUARDIAN']._serialized_end=716 + _globals['_BUS']._serialized_start=719 + _globals['_BUS']._serialized_end=1109 + _globals['_BUS_STATUS']._serialized_start=1057 + _globals['_BUS_STATUS']._serialized_end=1109 + _globals['_CHILD']._serialized_start=1112 + _globals['_CHILD']._serialized_end=1757 + _globals['_CHILD_SEX']._serialized_start=1721 + _globals['_CHILD_SEX']._serialized_end=1757 + _globals['_STATION']._serialized_start=1760 + _globals['_STATION']._serialized_end=2072 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2075 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2274 + _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_start=2237 + _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_end=2274 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=2276 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=2353 + _globals['_CHILDPHOTO']._serialized_start=2356 + _globals['_CHILDPHOTO']._serialized_end=2581 + _globals['_BOARDINGRECORD']._serialized_start=2584 + _globals['_BOARDINGRECORD']._serialized_end=2757 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/resources_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/resources_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/resources_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.py new file mode 100644 index 00000000..81c56abf --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/v1/health_check.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%where_child_bus/v1/health_check.proto\x12\x12where_child_bus.v1\"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2_\n\x12HealthcheckService\x12I\n\x04Ping\x12\x1f.where_child_bus.v1.PingRequest\x1a .where_child_bus.v1.PingResponseB\xf3\x01\n\x16\x63om.where_child_bus.v1B\x10HealthCheckProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.health_check_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\020HealthCheckProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_PINGREQUEST']._serialized_start=61 + _globals['_PINGREQUEST']._serialized_end=94 + _globals['_PINGRESPONSE']._serialized_start=96 + _globals['_PINGRESPONSE']._serialized_end=136 + _globals['_HEALTHCHECKSERVICE']._serialized_start=138 + _globals['_HEALTHCHECKSERVICE']._serialized_end=233 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py new file mode 100644 index 00000000..f0f6381c --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from where_child_bus.v1 import health_check_pb2 as where__child__bus_dot_v1_dot_health__check__pb2 + + +class HealthcheckServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Ping = channel.unary_unary( + '/where_child_bus.v1.HealthcheckService/Ping', + request_serializer=where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.FromString, + ) + + +class HealthcheckServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Ping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_HealthcheckServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Ping': grpc.unary_unary_rpc_method_handler( + servicer.Ping, + request_deserializer=where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'where_child_bus.v1.HealthcheckService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class HealthcheckService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Ping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.HealthcheckService/Ping', + where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, + where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py new file mode 100644 index 00000000..f85361c5 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/v1/resources.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb6\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x36\n\x06status\x18\x05 \x01(\x0e\x32\x1e.where_child_bus.v1.Bus.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03\"\xa5\x05\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12/\n\x03sex\x18\x06 \x01(\x0e\x32\x1d.where_child_bus.v1.Child.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMEN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xf4\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12J\n\x08\x62us_type\x18\x04 \x01(\x0e\x32/.where_child_bus.v1.ChildBusAssociation.BusTypeR\x07\x62usType\"O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestampB\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.resources_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_NURSERY']._serialized_start=92 + _globals['_NURSERY']._serialized_end=420 + _globals['_GUARDIAN']._serialized_start=423 + _globals['_GUARDIAN']._serialized_end=722 + _globals['_BUS']._serialized_start=725 + _globals['_BUS']._serialized_end=1163 + _globals['_BUS_STATUS']._serialized_start=1066 + _globals['_BUS_STATUS']._serialized_end=1163 + _globals['_CHILD']._serialized_start=1166 + _globals['_CHILD']._serialized_end=1843 + _globals['_CHILD_SEX']._serialized_start=1774 + _globals['_CHILD_SEX']._serialized_end=1843 + _globals['_STATION']._serialized_start=1846 + _globals['_STATION']._serialized_end=2154 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2157 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2401 + _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_start=2322 + _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_end=2401 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=2403 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=2480 + _globals['_CHILDPHOTO']._serialized_start=2483 + _globals['_CHILDPHOTO']._serialized_end=2708 + _globals['_BOARDINGRECORD']._serialized_start=2711 + _globals['_BOARDINGRECORD']._serialized_end=2884 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + From 6b07da09101e5b572af6e6dbf5251f6e24fb1019 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 15:03:01 +0900 Subject: [PATCH 085/771] =?UTF-8?q?feat(proto):=20=E3=82=B5=E3=83=BC?= =?UTF-8?q?=E3=83=93=E3=82=B9=E3=82=92=E5=AE=9A=E7=BE=A9=20-=20=E5=AD=90?= =?UTF-8?q?=E4=BE=9B=E3=81=AE=E4=B8=80=E8=A6=A7=E5=8F=96=E5=BE=97=20-=20?= =?UTF-8?q?=E3=83=90=E3=82=B9=E3=81=AE=E4=B8=80=E8=A6=A7=E5=8F=96=E5=BE=97?= =?UTF-8?q?=20-=20=E3=83=AD=E3=82=B0=E3=82=A4=E3=83=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 240 +++++++++++ .../go/where_child_bus/v1/bus_grpc.pb.go | 107 +++++ .../go/where_child_bus/v1/child.pb.go | 383 ++++++++++++++++++ .../go/where_child_bus/v1/child_grpc.pb.go | 144 +++++++ .../go/where_child_bus/v1/guardian.pb.go | 268 ++++++++++++ .../go/where_child_bus/v1/guardian_grpc.pb.go | 107 +++++ .../go/where_child_bus/v1/nursery.pb.go | 257 ++++++++++++ .../go/where_child_bus/v1/nursery_grpc.pb.go | 107 +++++ backend/proto/where_child_bus/v1/bus.proto | 17 + backend/proto/where_child_bus/v1/child.proto | 26 ++ .../proto/where_child_bus/v1/guardian.proto | 20 + .../proto/where_child_bus/v1/nursery.proto | 19 + .../proto-gen/where_child_bus/v1/bus.pb.dart | 124 ++++++ .../where_child_bus/v1/bus.pbenum.dart | 11 + .../where_child_bus/v1/bus.pbjson.dart | 65 +++ .../where_child_bus/v1/bus.pbserver.dart | 43 ++ .../where_child_bus/v1/child.pb.dart | 221 ++++++++++ .../where_child_bus/v1/child.pbenum.dart | 11 + .../where_child_bus/v1/child.pbjson.dart | 97 +++++ .../where_child_bus/v1/child.pbserver.dart | 46 +++ .../where_child_bus/v1/guardian.pb.dart | 174 ++++++++ .../where_child_bus/v1/guardian.pbenum.dart | 11 + .../where_child_bus/v1/guardian.pbjson.dart | 68 ++++ .../where_child_bus/v1/guardian.pbserver.dart | 43 ++ .../v1/health_check.pbserver.dart | 8 +- .../where_child_bus/v1/nursery.pb.dart | 160 ++++++++ .../where_child_bus/v1/nursery.pbenum.dart | 11 + .../where_child_bus/v1/nursery.pbjson.dart | 67 +++ .../where_child_bus/v1/nursery.pbserver.dart | 43 ++ .../where_child_bus/v1/resources.pb.dart | 132 +++--- .../proto-gen/where_child_bus/v1/bus_pb2.py | 32 ++ .../where_child_bus/v1/bus_pb2_grpc.py | 66 +++ .../proto-gen/where_child_bus/v1/child_pb2.py | 36 ++ .../where_child_bus/v1/child_pb2_grpc.py | 99 +++++ .../where_child_bus/v1/guardian_pb2.py | 32 ++ .../where_child_bus/v1/guardian_pb2_grpc.py | 66 +++ .../where_child_bus/v1/nursery_pb2.py | 32 ++ .../where_child_bus/v1/nursery_pb2_grpc.py | 66 +++ 38 files changed, 3389 insertions(+), 70 deletions(-) create mode 100644 backend/proto-gen/go/where_child_bus/v1/bus.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/child.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/guardian.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/nursery.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go create mode 100644 backend/proto/where_child_bus/v1/bus.proto create mode 100644 backend/proto/where_child_bus/v1/child.proto create mode 100644 backend/proto/where_child_bus/v1/guardian.proto create mode 100644 backend/proto/where_child_bus/v1/nursery.proto create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pb.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbenum.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbjson.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbserver.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pb.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbenum.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbjson.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbserver.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pb.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbenum.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbjson.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbserver.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pb.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbenum.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbjson.dart create mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbserver.dart create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go new file mode 100644 index 00000000..db573664 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -0,0 +1,240 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/v1/bus.proto + +package where_child_busv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetBusListByNurseryIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` +} + +func (x *GetBusListByNurseryIdRequest) Reset() { + *x = GetBusListByNurseryIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBusListByNurseryIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBusListByNurseryIdRequest) ProtoMessage() {} + +func (x *GetBusListByNurseryIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBusListByNurseryIdRequest.ProtoReflect.Descriptor instead. +func (*GetBusListByNurseryIdRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{0} +} + +func (x *GetBusListByNurseryIdRequest) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +type GetBusListByNurseryIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Buses []*Bus `protobuf:"bytes,1,rep,name=buses,proto3" json:"buses,omitempty"` +} + +func (x *GetBusListByNurseryIdResponse) Reset() { + *x = GetBusListByNurseryIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBusListByNurseryIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBusListByNurseryIdResponse) ProtoMessage() {} + +func (x *GetBusListByNurseryIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBusListByNurseryIdResponse.ProtoReflect.Descriptor instead. +func (*GetBusListByNurseryIdResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{1} +} + +func (x *GetBusListByNurseryIdResponse) GetBuses() []*Bus { + if x != nil { + return x.Buses + } + return nil +} + +var File_where_child_bus_v1_bus_proto protoreflect.FileDescriptor + +var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x65, 0x73, 0x32, 0x8a, 0x01, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, + 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_v1_bus_proto_rawDescOnce sync.Once + file_where_child_bus_v1_bus_proto_rawDescData = file_where_child_bus_v1_bus_proto_rawDesc +) + +func file_where_child_bus_v1_bus_proto_rawDescGZIP() []byte { + file_where_child_bus_v1_bus_proto_rawDescOnce.Do(func() { + file_where_child_bus_v1_bus_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_v1_bus_proto_rawDescData) + }) + return file_where_child_bus_v1_bus_proto_rawDescData +} + +var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ + (*GetBusListByNurseryIdRequest)(nil), // 0: where_child_bus.v1.GetBusListByNurseryIdRequest + (*GetBusListByNurseryIdResponse)(nil), // 1: where_child_bus.v1.GetBusListByNurseryIdResponse + (*Bus)(nil), // 2: where_child_bus.v1.Bus +} +var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ + 2, // 0: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus + 0, // 1: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 1, // 2: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_where_child_bus_v1_bus_proto_init() } +func file_where_child_bus_v1_bus_proto_init() { + if File_where_child_bus_v1_bus_proto != nil { + return + } + file_where_child_bus_v1_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_where_child_bus_v1_bus_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBusListByNurseryIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBusListByNurseryIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_v1_bus_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_where_child_bus_v1_bus_proto_goTypes, + DependencyIndexes: file_where_child_bus_v1_bus_proto_depIdxs, + MessageInfos: file_where_child_bus_v1_bus_proto_msgTypes, + }.Build() + File_where_child_bus_v1_bus_proto = out.File + file_where_child_bus_v1_bus_proto_rawDesc = nil + file_where_child_bus_v1_bus_proto_goTypes = nil + file_where_child_bus_v1_bus_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go new file mode 100644 index 00000000..ba3a04b2 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: where_child_bus/v1/bus.proto + +package where_child_busv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + BusService_GetBusListByNurseryId_FullMethodName = "/where_child_bus.v1.BusService/GetBusListByNurseryId" +) + +// BusServiceClient is the client API for BusService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type BusServiceClient interface { + GetBusListByNurseryId(ctx context.Context, in *GetBusListByNurseryIdRequest, opts ...grpc.CallOption) (*GetBusListByNurseryIdResponse, error) +} + +type busServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBusServiceClient(cc grpc.ClientConnInterface) BusServiceClient { + return &busServiceClient{cc} +} + +func (c *busServiceClient) GetBusListByNurseryId(ctx context.Context, in *GetBusListByNurseryIdRequest, opts ...grpc.CallOption) (*GetBusListByNurseryIdResponse, error) { + out := new(GetBusListByNurseryIdResponse) + err := c.cc.Invoke(ctx, BusService_GetBusListByNurseryId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BusServiceServer is the server API for BusService service. +// All implementations should embed UnimplementedBusServiceServer +// for forward compatibility +type BusServiceServer interface { + GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) +} + +// UnimplementedBusServiceServer should be embedded to have forward compatible implementations. +type UnimplementedBusServiceServer struct { +} + +func (UnimplementedBusServiceServer) GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBusListByNurseryId not implemented") +} + +// UnsafeBusServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BusServiceServer will +// result in compilation errors. +type UnsafeBusServiceServer interface { + mustEmbedUnimplementedBusServiceServer() +} + +func RegisterBusServiceServer(s grpc.ServiceRegistrar, srv BusServiceServer) { + s.RegisterService(&BusService_ServiceDesc, srv) +} + +func _BusService_GetBusListByNurseryId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBusListByNurseryIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BusServiceServer).GetBusListByNurseryId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BusService_GetBusListByNurseryId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BusServiceServer).GetBusListByNurseryId(ctx, req.(*GetBusListByNurseryIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// BusService_ServiceDesc is the grpc.ServiceDesc for BusService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var BusService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "where_child_bus.v1.BusService", + HandlerType: (*BusServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetBusListByNurseryId", + Handler: _BusService_GetBusListByNurseryId_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "where_child_bus/v1/bus.proto", +} diff --git a/backend/proto-gen/go/where_child_bus/v1/child.pb.go b/backend/proto-gen/go/where_child_bus/v1/child.pb.go new file mode 100644 index 00000000..5d5638d6 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/child.pb.go @@ -0,0 +1,383 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/v1/child.proto + +package where_child_busv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetChildListByNurseryIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` +} + +func (x *GetChildListByNurseryIDRequest) Reset() { + *x = GetChildListByNurseryIDRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChildListByNurseryIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChildListByNurseryIDRequest) ProtoMessage() {} + +func (x *GetChildListByNurseryIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChildListByNurseryIDRequest.ProtoReflect.Descriptor instead. +func (*GetChildListByNurseryIDRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{0} +} + +func (x *GetChildListByNurseryIDRequest) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +type GetChildListByNurseryIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *GetChildListByNurseryIDResponse) Reset() { + *x = GetChildListByNurseryIDResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChildListByNurseryIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChildListByNurseryIDResponse) ProtoMessage() {} + +func (x *GetChildListByNurseryIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChildListByNurseryIDResponse.ProtoReflect.Descriptor instead. +func (*GetChildListByNurseryIDResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{1} +} + +func (x *GetChildListByNurseryIDResponse) GetChildren() []*Child { + if x != nil { + return x.Children + } + return nil +} + +type GetChildListByGuardianIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GuardianId string `protobuf:"bytes,1,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` +} + +func (x *GetChildListByGuardianIDRequest) Reset() { + *x = GetChildListByGuardianIDRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChildListByGuardianIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChildListByGuardianIDRequest) ProtoMessage() {} + +func (x *GetChildListByGuardianIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChildListByGuardianIDRequest.ProtoReflect.Descriptor instead. +func (*GetChildListByGuardianIDRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{2} +} + +func (x *GetChildListByGuardianIDRequest) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +type GetChildListByGuardianIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *GetChildListByGuardianIDResponse) Reset() { + *x = GetChildListByGuardianIDResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChildListByGuardianIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChildListByGuardianIDResponse) ProtoMessage() {} + +func (x *GetChildListByGuardianIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChildListByGuardianIDResponse.ProtoReflect.Descriptor instead. +func (*GetChildListByGuardianIDResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{3} +} + +func (x *GetChildListByGuardianIDResponse) GetChildren() []*Child { + if x != nil { + return x.Children + } + return nil +} + +var File_where_child_bus_v1_child_proto protoreflect.FileDescriptor + +var file_where_child_bus_v1_child_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x1f, 0x47, 0x65, 0x74, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x72, 0x65, 0x6e, 0x22, 0x42, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x59, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, + 0x65, 0x6e, 0x32, 0x9b, 0x02, 0x0a, 0x0c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, + 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_v1_child_proto_rawDescOnce sync.Once + file_where_child_bus_v1_child_proto_rawDescData = file_where_child_bus_v1_child_proto_rawDesc +) + +func file_where_child_bus_v1_child_proto_rawDescGZIP() []byte { + file_where_child_bus_v1_child_proto_rawDescOnce.Do(func() { + file_where_child_bus_v1_child_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_v1_child_proto_rawDescData) + }) + return file_where_child_bus_v1_child_proto_rawDescData +} + +var file_where_child_bus_v1_child_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ + (*GetChildListByNurseryIDRequest)(nil), // 0: where_child_bus.v1.GetChildListByNurseryIDRequest + (*GetChildListByNurseryIDResponse)(nil), // 1: where_child_bus.v1.GetChildListByNurseryIDResponse + (*GetChildListByGuardianIDRequest)(nil), // 2: where_child_bus.v1.GetChildListByGuardianIDRequest + (*GetChildListByGuardianIDResponse)(nil), // 3: where_child_bus.v1.GetChildListByGuardianIDResponse + (*Child)(nil), // 4: where_child_bus.v1.Child +} +var file_where_child_bus_v1_child_proto_depIdxs = []int32{ + 4, // 0: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child + 4, // 1: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child + 0, // 2: where_child_bus.v1.ChildService.GetChildListByNurseryID:input_type -> where_child_bus.v1.GetChildListByNurseryIDRequest + 2, // 3: where_child_bus.v1.ChildService.GetChildListByGuardianID:input_type -> where_child_bus.v1.GetChildListByGuardianIDRequest + 1, // 4: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse + 3, // 5: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_where_child_bus_v1_child_proto_init() } +func file_where_child_bus_v1_child_proto_init() { + if File_where_child_bus_v1_child_proto != nil { + return + } + file_where_child_bus_v1_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_where_child_bus_v1_child_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChildListByNurseryIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChildListByNurseryIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChildListByGuardianIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChildListByGuardianIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_v1_child_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_where_child_bus_v1_child_proto_goTypes, + DependencyIndexes: file_where_child_bus_v1_child_proto_depIdxs, + MessageInfos: file_where_child_bus_v1_child_proto_msgTypes, + }.Build() + File_where_child_bus_v1_child_proto = out.File + file_where_child_bus_v1_child_proto_rawDesc = nil + file_where_child_bus_v1_child_proto_goTypes = nil + file_where_child_bus_v1_child_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go new file mode 100644 index 00000000..a9a6a66b --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: where_child_bus/v1/child.proto + +package where_child_busv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ChildService_GetChildListByNurseryID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByNurseryID" + ChildService_GetChildListByGuardianID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByGuardianID" +) + +// ChildServiceClient is the client API for ChildService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ChildServiceClient interface { + GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (*GetChildListByNurseryIDResponse, error) + GetChildListByGuardianID(ctx context.Context, in *GetChildListByGuardianIDRequest, opts ...grpc.CallOption) (*GetChildListByGuardianIDResponse, error) +} + +type childServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewChildServiceClient(cc grpc.ClientConnInterface) ChildServiceClient { + return &childServiceClient{cc} +} + +func (c *childServiceClient) GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (*GetChildListByNurseryIDResponse, error) { + out := new(GetChildListByNurseryIDResponse) + err := c.cc.Invoke(ctx, ChildService_GetChildListByNurseryID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *childServiceClient) GetChildListByGuardianID(ctx context.Context, in *GetChildListByGuardianIDRequest, opts ...grpc.CallOption) (*GetChildListByGuardianIDResponse, error) { + out := new(GetChildListByGuardianIDResponse) + err := c.cc.Invoke(ctx, ChildService_GetChildListByGuardianID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ChildServiceServer is the server API for ChildService service. +// All implementations should embed UnimplementedChildServiceServer +// for forward compatibility +type ChildServiceServer interface { + GetChildListByNurseryID(context.Context, *GetChildListByNurseryIDRequest) (*GetChildListByNurseryIDResponse, error) + GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) +} + +// UnimplementedChildServiceServer should be embedded to have forward compatible implementations. +type UnimplementedChildServiceServer struct { +} + +func (UnimplementedChildServiceServer) GetChildListByNurseryID(context.Context, *GetChildListByNurseryIDRequest) (*GetChildListByNurseryIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChildListByNurseryID not implemented") +} +func (UnimplementedChildServiceServer) GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChildListByGuardianID not implemented") +} + +// UnsafeChildServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ChildServiceServer will +// result in compilation errors. +type UnsafeChildServiceServer interface { + mustEmbedUnimplementedChildServiceServer() +} + +func RegisterChildServiceServer(s grpc.ServiceRegistrar, srv ChildServiceServer) { + s.RegisterService(&ChildService_ServiceDesc, srv) +} + +func _ChildService_GetChildListByNurseryID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetChildListByNurseryIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChildServiceServer).GetChildListByNurseryID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChildService_GetChildListByNurseryID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChildServiceServer).GetChildListByNurseryID(ctx, req.(*GetChildListByNurseryIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ChildService_GetChildListByGuardianID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetChildListByGuardianIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChildServiceServer).GetChildListByGuardianID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChildService_GetChildListByGuardianID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChildServiceServer).GetChildListByGuardianID(ctx, req.(*GetChildListByGuardianIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ChildService_ServiceDesc is the grpc.ServiceDesc for ChildService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ChildService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "where_child_bus.v1.ChildService", + HandlerType: (*ChildServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetChildListByNurseryID", + Handler: _ChildService_GetChildListByNurseryID_Handler, + }, + { + MethodName: "GetChildListByGuardianID", + Handler: _ChildService_GetChildListByGuardianID_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "where_child_bus/v1/child.proto", +} diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go new file mode 100644 index 00000000..37cc838f --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go @@ -0,0 +1,268 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/v1/guardian.proto + +package where_child_busv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GuardianLoginRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + GuardianId string `protobuf:"bytes,3,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` +} + +func (x *GuardianLoginRequest) Reset() { + *x = GuardianLoginRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GuardianLoginRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GuardianLoginRequest) ProtoMessage() {} + +func (x *GuardianLoginRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GuardianLoginRequest.ProtoReflect.Descriptor instead. +func (*GuardianLoginRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{0} +} + +func (x *GuardianLoginRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *GuardianLoginRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *GuardianLoginRequest) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +type GuardianLoginResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Guardian *Guardian `protobuf:"bytes,2,opt,name=guardian,proto3" json:"guardian,omitempty"` +} + +func (x *GuardianLoginResponse) Reset() { + *x = GuardianLoginResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GuardianLoginResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GuardianLoginResponse) ProtoMessage() {} + +func (x *GuardianLoginResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GuardianLoginResponse.ProtoReflect.Descriptor instead. +func (*GuardianLoginResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{1} +} + +func (x *GuardianLoginResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *GuardianLoginResponse) GetGuardian() *Guardian { + if x != nil { + return x.Guardian + } + return nil +} + +var File_where_child_bus_v1_guardian_proto protoreflect.FileDescriptor + +var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x69, 0x0a, 0x14, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x15, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x32, 0x77, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, + 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_v1_guardian_proto_rawDescOnce sync.Once + file_where_child_bus_v1_guardian_proto_rawDescData = file_where_child_bus_v1_guardian_proto_rawDesc +) + +func file_where_child_bus_v1_guardian_proto_rawDescGZIP() []byte { + file_where_child_bus_v1_guardian_proto_rawDescOnce.Do(func() { + file_where_child_bus_v1_guardian_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_v1_guardian_proto_rawDescData) + }) + return file_where_child_bus_v1_guardian_proto_rawDescData +} + +var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_where_child_bus_v1_guardian_proto_goTypes = []interface{}{ + (*GuardianLoginRequest)(nil), // 0: where_child_bus.v1.GuardianLoginRequest + (*GuardianLoginResponse)(nil), // 1: where_child_bus.v1.GuardianLoginResponse + (*Guardian)(nil), // 2: where_child_bus.v1.Guardian +} +var file_where_child_bus_v1_guardian_proto_depIdxs = []int32{ + 2, // 0: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.Guardian + 0, // 1: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest + 1, // 2: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_where_child_bus_v1_guardian_proto_init() } +func file_where_child_bus_v1_guardian_proto_init() { + if File_where_child_bus_v1_guardian_proto != nil { + return + } + file_where_child_bus_v1_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_where_child_bus_v1_guardian_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GuardianLoginRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_guardian_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GuardianLoginResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_v1_guardian_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_where_child_bus_v1_guardian_proto_goTypes, + DependencyIndexes: file_where_child_bus_v1_guardian_proto_depIdxs, + MessageInfos: file_where_child_bus_v1_guardian_proto_msgTypes, + }.Build() + File_where_child_bus_v1_guardian_proto = out.File + file_where_child_bus_v1_guardian_proto_rawDesc = nil + file_where_child_bus_v1_guardian_proto_goTypes = nil + file_where_child_bus_v1_guardian_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go new file mode 100644 index 00000000..022ab8fc --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: where_child_bus/v1/guardian.proto + +package where_child_busv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + GuardianService_GuardianLogin_FullMethodName = "/where_child_bus.v1.GuardianService/GuardianLogin" +) + +// GuardianServiceClient is the client API for GuardianService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GuardianServiceClient interface { + GuardianLogin(ctx context.Context, in *GuardianLoginRequest, opts ...grpc.CallOption) (*GuardianLoginResponse, error) +} + +type guardianServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewGuardianServiceClient(cc grpc.ClientConnInterface) GuardianServiceClient { + return &guardianServiceClient{cc} +} + +func (c *guardianServiceClient) GuardianLogin(ctx context.Context, in *GuardianLoginRequest, opts ...grpc.CallOption) (*GuardianLoginResponse, error) { + out := new(GuardianLoginResponse) + err := c.cc.Invoke(ctx, GuardianService_GuardianLogin_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GuardianServiceServer is the server API for GuardianService service. +// All implementations should embed UnimplementedGuardianServiceServer +// for forward compatibility +type GuardianServiceServer interface { + GuardianLogin(context.Context, *GuardianLoginRequest) (*GuardianLoginResponse, error) +} + +// UnimplementedGuardianServiceServer should be embedded to have forward compatible implementations. +type UnimplementedGuardianServiceServer struct { +} + +func (UnimplementedGuardianServiceServer) GuardianLogin(context.Context, *GuardianLoginRequest) (*GuardianLoginResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GuardianLogin not implemented") +} + +// UnsafeGuardianServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GuardianServiceServer will +// result in compilation errors. +type UnsafeGuardianServiceServer interface { + mustEmbedUnimplementedGuardianServiceServer() +} + +func RegisterGuardianServiceServer(s grpc.ServiceRegistrar, srv GuardianServiceServer) { + s.RegisterService(&GuardianService_ServiceDesc, srv) +} + +func _GuardianService_GuardianLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GuardianLoginRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuardianServiceServer).GuardianLogin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GuardianService_GuardianLogin_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuardianServiceServer).GuardianLogin(ctx, req.(*GuardianLoginRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// GuardianService_ServiceDesc is the grpc.ServiceDesc for GuardianService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var GuardianService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "where_child_bus.v1.GuardianService", + HandlerType: (*GuardianServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GuardianLogin", + Handler: _GuardianService_GuardianLogin_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "where_child_bus/v1/guardian.proto", +} diff --git a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go new file mode 100644 index 00000000..54a13c5a --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go @@ -0,0 +1,257 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/v1/nursery.proto + +package where_child_busv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type NurseryLoginRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` +} + +func (x *NurseryLoginRequest) Reset() { + *x = NurseryLoginRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NurseryLoginRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NurseryLoginRequest) ProtoMessage() {} + +func (x *NurseryLoginRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NurseryLoginRequest.ProtoReflect.Descriptor instead. +func (*NurseryLoginRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{0} +} + +func (x *NurseryLoginRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *NurseryLoginRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type NurseryLoginResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Nursery *Nursery `protobuf:"bytes,2,opt,name=nursery,proto3" json:"nursery,omitempty"` +} + +func (x *NurseryLoginResponse) Reset() { + *x = NurseryLoginResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NurseryLoginResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NurseryLoginResponse) ProtoMessage() {} + +func (x *NurseryLoginResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NurseryLoginResponse.ProtoReflect.Descriptor instead. +func (*NurseryLoginResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{1} +} + +func (x *NurseryLoginResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *NurseryLoginResponse) GetNursery() *Nursery { + if x != nil { + return x.Nursery + } + return nil +} + +var File_where_child_bus_v1_nursery_proto protoreflect.FileDescriptor + +var file_where_child_bus_v1_nursery_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a, 0x13, 0x4e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x22, 0x67, 0x0a, 0x14, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0x73, 0x0a, 0x0e, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, + 0x0a, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x27, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, + 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, + 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_v1_nursery_proto_rawDescOnce sync.Once + file_where_child_bus_v1_nursery_proto_rawDescData = file_where_child_bus_v1_nursery_proto_rawDesc +) + +func file_where_child_bus_v1_nursery_proto_rawDescGZIP() []byte { + file_where_child_bus_v1_nursery_proto_rawDescOnce.Do(func() { + file_where_child_bus_v1_nursery_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_v1_nursery_proto_rawDescData) + }) + return file_where_child_bus_v1_nursery_proto_rawDescData +} + +var file_where_child_bus_v1_nursery_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_where_child_bus_v1_nursery_proto_goTypes = []interface{}{ + (*NurseryLoginRequest)(nil), // 0: where_child_bus.v1.NurseryLoginRequest + (*NurseryLoginResponse)(nil), // 1: where_child_bus.v1.NurseryLoginResponse + (*Nursery)(nil), // 2: where_child_bus.v1.Nursery +} +var file_where_child_bus_v1_nursery_proto_depIdxs = []int32{ + 2, // 0: where_child_bus.v1.NurseryLoginResponse.nursery:type_name -> where_child_bus.v1.Nursery + 0, // 1: where_child_bus.v1.NurseryService.NurseryLogin:input_type -> where_child_bus.v1.NurseryLoginRequest + 1, // 2: where_child_bus.v1.NurseryService.NurseryLogin:output_type -> where_child_bus.v1.NurseryLoginResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_where_child_bus_v1_nursery_proto_init() } +func file_where_child_bus_v1_nursery_proto_init() { + if File_where_child_bus_v1_nursery_proto != nil { + return + } + file_where_child_bus_v1_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_where_child_bus_v1_nursery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NurseryLoginRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_nursery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NurseryLoginResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_v1_nursery_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_where_child_bus_v1_nursery_proto_goTypes, + DependencyIndexes: file_where_child_bus_v1_nursery_proto_depIdxs, + MessageInfos: file_where_child_bus_v1_nursery_proto_msgTypes, + }.Build() + File_where_child_bus_v1_nursery_proto = out.File + file_where_child_bus_v1_nursery_proto_rawDesc = nil + file_where_child_bus_v1_nursery_proto_goTypes = nil + file_where_child_bus_v1_nursery_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go new file mode 100644 index 00000000..f757b0c6 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: where_child_bus/v1/nursery.proto + +package where_child_busv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + NurseryService_NurseryLogin_FullMethodName = "/where_child_bus.v1.NurseryService/NurseryLogin" +) + +// NurseryServiceClient is the client API for NurseryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NurseryServiceClient interface { + NurseryLogin(ctx context.Context, in *NurseryLoginRequest, opts ...grpc.CallOption) (*NurseryLoginResponse, error) +} + +type nurseryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNurseryServiceClient(cc grpc.ClientConnInterface) NurseryServiceClient { + return &nurseryServiceClient{cc} +} + +func (c *nurseryServiceClient) NurseryLogin(ctx context.Context, in *NurseryLoginRequest, opts ...grpc.CallOption) (*NurseryLoginResponse, error) { + out := new(NurseryLoginResponse) + err := c.cc.Invoke(ctx, NurseryService_NurseryLogin_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NurseryServiceServer is the server API for NurseryService service. +// All implementations should embed UnimplementedNurseryServiceServer +// for forward compatibility +type NurseryServiceServer interface { + NurseryLogin(context.Context, *NurseryLoginRequest) (*NurseryLoginResponse, error) +} + +// UnimplementedNurseryServiceServer should be embedded to have forward compatible implementations. +type UnimplementedNurseryServiceServer struct { +} + +func (UnimplementedNurseryServiceServer) NurseryLogin(context.Context, *NurseryLoginRequest) (*NurseryLoginResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NurseryLogin not implemented") +} + +// UnsafeNurseryServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NurseryServiceServer will +// result in compilation errors. +type UnsafeNurseryServiceServer interface { + mustEmbedUnimplementedNurseryServiceServer() +} + +func RegisterNurseryServiceServer(s grpc.ServiceRegistrar, srv NurseryServiceServer) { + s.RegisterService(&NurseryService_ServiceDesc, srv) +} + +func _NurseryService_NurseryLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NurseryLoginRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NurseryServiceServer).NurseryLogin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NurseryService_NurseryLogin_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NurseryServiceServer).NurseryLogin(ctx, req.(*NurseryLoginRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NurseryService_ServiceDesc is the grpc.ServiceDesc for NurseryService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NurseryService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "where_child_bus.v1.NurseryService", + HandlerType: (*NurseryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "NurseryLogin", + Handler: _NurseryService_NurseryLogin_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "where_child_bus/v1/nursery.proto", +} diff --git a/backend/proto/where_child_bus/v1/bus.proto b/backend/proto/where_child_bus/v1/bus.proto new file mode 100644 index 00000000..5161a868 --- /dev/null +++ b/backend/proto/where_child_bus/v1/bus.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package where_child_bus.v1; + +import "where_child_bus/v1/resources.proto"; + +service BusService { + rpc GetBusListByNurseryId(GetBusListByNurseryIdRequest) returns (GetBusListByNurseryIdResponse); +} + +message GetBusListByNurseryIdRequest { + string nursery_id = 1; +} + +message GetBusListByNurseryIdResponse { + repeated Bus buses = 1; +} \ No newline at end of file diff --git a/backend/proto/where_child_bus/v1/child.proto b/backend/proto/where_child_bus/v1/child.proto new file mode 100644 index 00000000..c4422ee8 --- /dev/null +++ b/backend/proto/where_child_bus/v1/child.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package where_child_bus.v1; + +import "where_child_bus/v1/resources.proto"; + +service ChildService { + rpc GetChildListByNurseryID(GetChildListByNurseryIDRequest) returns (GetChildListByNurseryIDResponse); + rpc GetChildListByGuardianID(GetChildListByGuardianIDRequest) returns (GetChildListByGuardianIDResponse); +} + +message GetChildListByNurseryIDRequest { + string nursery_id = 1; +} + +message GetChildListByNurseryIDResponse { + repeated Child children = 1; +} + +message GetChildListByGuardianIDRequest { + string guardian_id = 1; +} + +message GetChildListByGuardianIDResponse { + repeated Child children = 1; +} diff --git a/backend/proto/where_child_bus/v1/guardian.proto b/backend/proto/where_child_bus/v1/guardian.proto new file mode 100644 index 00000000..35b02498 --- /dev/null +++ b/backend/proto/where_child_bus/v1/guardian.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package where_child_bus.v1; + +import "where_child_bus/v1/resources.proto"; + +service GuardianService { + rpc GuardianLogin(GuardianLoginRequest) returns (GuardianLoginResponse); +} + +message GuardianLoginRequest { + string email = 1; + string password = 2; + string guardian_id = 3; +} + +message GuardianLoginResponse { + bool success = 1; + Guardian guardian = 2; +} \ No newline at end of file diff --git a/backend/proto/where_child_bus/v1/nursery.proto b/backend/proto/where_child_bus/v1/nursery.proto new file mode 100644 index 00000000..3e09484d --- /dev/null +++ b/backend/proto/where_child_bus/v1/nursery.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package where_child_bus.v1; + +import "where_child_bus/v1/resources.proto"; + +service NurseryService { + rpc NurseryLogin(NurseryLoginRequest) returns (NurseryLoginResponse); +} + +message NurseryLoginRequest { + string email = 1; + string password = 2; +} + +message NurseryLoginResponse { + bool success = 1; + Nursery nursery = 2; +} \ No newline at end of file diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pb.dart new file mode 100644 index 00000000..fd74729c --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pb.dart @@ -0,0 +1,124 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/bus.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'resources.pb.dart' as $1; + +class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { + factory GetBusListByNurseryIdRequest({ + $core.String? nurseryId, + }) { + final $result = create(); + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + return $result; + } + GetBusListByNurseryIdRequest._() : super(); + factory GetBusListByNurseryIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBusListByNurseryIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusListByNurseryIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'nurseryId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBusListByNurseryIdRequest clone() => GetBusListByNurseryIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBusListByNurseryIdRequest copyWith(void Function(GetBusListByNurseryIdRequest) updates) => super.copyWith((message) => updates(message as GetBusListByNurseryIdRequest)) as GetBusListByNurseryIdRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetBusListByNurseryIdRequest create() => GetBusListByNurseryIdRequest._(); + GetBusListByNurseryIdRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBusListByNurseryIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBusListByNurseryIdRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get nurseryId => $_getSZ(0); + @$pb.TagNumber(1) + set nurseryId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNurseryId() => $_has(0); + @$pb.TagNumber(1) + void clearNurseryId() => clearField(1); +} + +class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { + factory GetBusListByNurseryIdResponse({ + $core.Iterable<$1.Bus>? buses, + }) { + final $result = create(); + if (buses != null) { + $result.buses.addAll(buses); + } + return $result; + } + GetBusListByNurseryIdResponse._() : super(); + factory GetBusListByNurseryIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBusListByNurseryIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusListByNurseryIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc<$1.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $1.Bus.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBusListByNurseryIdResponse clone() => GetBusListByNurseryIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBusListByNurseryIdResponse copyWith(void Function(GetBusListByNurseryIdResponse) updates) => super.copyWith((message) => updates(message as GetBusListByNurseryIdResponse)) as GetBusListByNurseryIdResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetBusListByNurseryIdResponse create() => GetBusListByNurseryIdResponse._(); + GetBusListByNurseryIdResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBusListByNurseryIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBusListByNurseryIdResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$1.Bus> get buses => $_getList(0); +} + +class BusServiceApi { + $pb.RpcClient _client; + BusServiceApi(this._client); + + $async.Future getBusListByNurseryId($pb.ClientContext? ctx, GetBusListByNurseryIdRequest request) => + _client.invoke(ctx, 'BusService', 'GetBusListByNurseryId', request, GetBusListByNurseryIdResponse()) + ; +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbenum.dart new file mode 100644 index 00000000..e8661467 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/bus.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbjson.dart new file mode 100644 index 00000000..e4054514 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -0,0 +1,65 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/bus.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +import '../../google/protobuf/timestamp.pbjson.dart' as $0; +import 'resources.pbjson.dart' as $1; + +@$core.Deprecated('Use getBusListByNurseryIdRequestDescriptor instead') +const GetBusListByNurseryIdRequest$json = { + '1': 'GetBusListByNurseryIdRequest', + '2': [ + {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, + ], +}; + +/// Descriptor for `GetBusListByNurseryIdRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBusListByNurseryIdRequestDescriptor = $convert.base64Decode( + 'ChxHZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXF1ZXN0Eh0KCm51cnNlcnlfaWQYASABKAlSCW51cn' + 'NlcnlJZA=='); + +@$core.Deprecated('Use getBusListByNurseryIdResponseDescriptor instead') +const GetBusListByNurseryIdResponse$json = { + '1': 'GetBusListByNurseryIdResponse', + '2': [ + {'1': 'buses', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Bus', '10': 'buses'}, + ], +}; + +/// Descriptor for `GetBusListByNurseryIdResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBusListByNurseryIdResponseDescriptor = $convert.base64Decode( + 'Ch1HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXNwb25zZRItCgVidXNlcxgBIAMoCzIXLndoZXJlX2' + 'NoaWxkX2J1cy52MS5CdXNSBWJ1c2Vz'); + +const $core.Map<$core.String, $core.dynamic> BusServiceBase$json = { + '1': 'BusService', + '2': [ + {'1': 'GetBusListByNurseryId', '2': '.where_child_bus.v1.GetBusListByNurseryIdRequest', '3': '.where_child_bus.v1.GetBusListByNurseryIdResponse'}, + ], +}; + +@$core.Deprecated('Use busServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> BusServiceBase$messageJson = { + '.where_child_bus.v1.GetBusListByNurseryIdRequest': GetBusListByNurseryIdRequest$json, + '.where_child_bus.v1.GetBusListByNurseryIdResponse': GetBusListByNurseryIdResponse$json, + '.where_child_bus.v1.Bus': $1.Bus$json, + '.google.protobuf.Timestamp': $0.Timestamp$json, +}; + +/// Descriptor for `BusService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List busServiceDescriptor = $convert.base64Decode( + 'CgpCdXNTZXJ2aWNlEnwKFUdldEJ1c0xpc3RCeU51cnNlcnlJZBIwLndoZXJlX2NoaWxkX2J1cy' + '52MS5HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXF1ZXN0GjEud2hlcmVfY2hpbGRfYnVzLnYxLkdl' + 'dEJ1c0xpc3RCeU51cnNlcnlJZFJlc3BvbnNl'); + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbserver.dart new file mode 100644 index 00000000..d2fd727a --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbserver.dart @@ -0,0 +1,43 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/bus.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'bus.pb.dart' as $2; +import 'bus.pbjson.dart'; + +export 'bus.pb.dart'; + +abstract class BusServiceBase extends $pb.GeneratedService { + $async.Future<$2.GetBusListByNurseryIdResponse> getBusListByNurseryId($pb.ServerContext ctx, $2.GetBusListByNurseryIdRequest request); + + $pb.GeneratedMessage createRequest($core.String methodName) { + switch (methodName) { + case 'GetBusListByNurseryId': return $2.GetBusListByNurseryIdRequest(); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { + switch (methodName) { + case 'GetBusListByNurseryId': return this.getBusListByNurseryId(ctx, request as $2.GetBusListByNurseryIdRequest); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => BusServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => BusServiceBase$messageJson; +} + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pb.dart new file mode 100644 index 00000000..59b94e39 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pb.dart @@ -0,0 +1,221 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'resources.pb.dart' as $1; + +class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { + factory GetChildListByNurseryIDRequest({ + $core.String? nurseryId, + }) { + final $result = create(); + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + return $result; + } + GetChildListByNurseryIDRequest._() : super(); + factory GetChildListByNurseryIDRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetChildListByNurseryIDRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByNurseryIDRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'nurseryId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetChildListByNurseryIDRequest clone() => GetChildListByNurseryIDRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetChildListByNurseryIDRequest copyWith(void Function(GetChildListByNurseryIDRequest) updates) => super.copyWith((message) => updates(message as GetChildListByNurseryIDRequest)) as GetChildListByNurseryIDRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetChildListByNurseryIDRequest create() => GetChildListByNurseryIDRequest._(); + GetChildListByNurseryIDRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetChildListByNurseryIDRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetChildListByNurseryIDRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get nurseryId => $_getSZ(0); + @$pb.TagNumber(1) + set nurseryId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNurseryId() => $_has(0); + @$pb.TagNumber(1) + void clearNurseryId() => clearField(1); +} + +class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { + factory GetChildListByNurseryIDResponse({ + $core.Iterable<$1.Child>? children, + }) { + final $result = create(); + if (children != null) { + $result.children.addAll(children); + } + return $result; + } + GetChildListByNurseryIDResponse._() : super(); + factory GetChildListByNurseryIDResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetChildListByNurseryIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByNurseryIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc<$1.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $1.Child.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetChildListByNurseryIDResponse clone() => GetChildListByNurseryIDResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetChildListByNurseryIDResponse copyWith(void Function(GetChildListByNurseryIDResponse) updates) => super.copyWith((message) => updates(message as GetChildListByNurseryIDResponse)) as GetChildListByNurseryIDResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetChildListByNurseryIDResponse create() => GetChildListByNurseryIDResponse._(); + GetChildListByNurseryIDResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetChildListByNurseryIDResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetChildListByNurseryIDResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$1.Child> get children => $_getList(0); +} + +class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { + factory GetChildListByGuardianIDRequest({ + $core.String? guardianId, + }) { + final $result = create(); + if (guardianId != null) { + $result.guardianId = guardianId; + } + return $result; + } + GetChildListByGuardianIDRequest._() : super(); + factory GetChildListByGuardianIDRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetChildListByGuardianIDRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByGuardianIDRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'guardianId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetChildListByGuardianIDRequest clone() => GetChildListByGuardianIDRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetChildListByGuardianIDRequest copyWith(void Function(GetChildListByGuardianIDRequest) updates) => super.copyWith((message) => updates(message as GetChildListByGuardianIDRequest)) as GetChildListByGuardianIDRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetChildListByGuardianIDRequest create() => GetChildListByGuardianIDRequest._(); + GetChildListByGuardianIDRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetChildListByGuardianIDRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetChildListByGuardianIDRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get guardianId => $_getSZ(0); + @$pb.TagNumber(1) + set guardianId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasGuardianId() => $_has(0); + @$pb.TagNumber(1) + void clearGuardianId() => clearField(1); +} + +class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { + factory GetChildListByGuardianIDResponse({ + $core.Iterable<$1.Child>? children, + }) { + final $result = create(); + if (children != null) { + $result.children.addAll(children); + } + return $result; + } + GetChildListByGuardianIDResponse._() : super(); + factory GetChildListByGuardianIDResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetChildListByGuardianIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByGuardianIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc<$1.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $1.Child.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetChildListByGuardianIDResponse clone() => GetChildListByGuardianIDResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetChildListByGuardianIDResponse copyWith(void Function(GetChildListByGuardianIDResponse) updates) => super.copyWith((message) => updates(message as GetChildListByGuardianIDResponse)) as GetChildListByGuardianIDResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetChildListByGuardianIDResponse create() => GetChildListByGuardianIDResponse._(); + GetChildListByGuardianIDResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetChildListByGuardianIDResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetChildListByGuardianIDResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$1.Child> get children => $_getList(0); +} + +class ChildServiceApi { + $pb.RpcClient _client; + ChildServiceApi(this._client); + + $async.Future getChildListByNurseryID($pb.ClientContext? ctx, GetChildListByNurseryIDRequest request) => + _client.invoke(ctx, 'ChildService', 'GetChildListByNurseryID', request, GetChildListByNurseryIDResponse()) + ; + $async.Future getChildListByGuardianID($pb.ClientContext? ctx, GetChildListByGuardianIDRequest request) => + _client.invoke(ctx, 'ChildService', 'GetChildListByGuardianID', request, GetChildListByGuardianIDResponse()) + ; +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbenum.dart new file mode 100644 index 00000000..f0c731f1 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbjson.dart new file mode 100644 index 00000000..e310f4cb --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -0,0 +1,97 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +import '../../google/protobuf/timestamp.pbjson.dart' as $0; +import 'resources.pbjson.dart' as $1; + +@$core.Deprecated('Use getChildListByNurseryIDRequestDescriptor instead') +const GetChildListByNurseryIDRequest$json = { + '1': 'GetChildListByNurseryIDRequest', + '2': [ + {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, + ], +}; + +/// Descriptor for `GetChildListByNurseryIDRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getChildListByNurseryIDRequestDescriptor = $convert.base64Decode( + 'Ch5HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlcXVlc3QSHQoKbnVyc2VyeV9pZBgBIAEoCVIJbn' + 'Vyc2VyeUlk'); + +@$core.Deprecated('Use getChildListByNurseryIDResponseDescriptor instead') +const GetChildListByNurseryIDResponse$json = { + '1': 'GetChildListByNurseryIDResponse', + '2': [ + {'1': 'children', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + ], +}; + +/// Descriptor for `GetChildListByNurseryIDResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getChildListByNurseryIDResponseDescriptor = $convert.base64Decode( + 'Ch9HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEjUKCGNoaWxkcmVuGAEgAygLMhkud2' + 'hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJlbg=='); + +@$core.Deprecated('Use getChildListByGuardianIDRequestDescriptor instead') +const GetChildListByGuardianIDRequest$json = { + '1': 'GetChildListByGuardianIDRequest', + '2': [ + {'1': 'guardian_id', '3': 1, '4': 1, '5': 9, '10': 'guardianId'}, + ], +}; + +/// Descriptor for `GetChildListByGuardianIDRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getChildListByGuardianIDRequestDescriptor = $convert.base64Decode( + 'Ch9HZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZXF1ZXN0Eh8KC2d1YXJkaWFuX2lkGAEgASgJUg' + 'pndWFyZGlhbklk'); + +@$core.Deprecated('Use getChildListByGuardianIDResponseDescriptor instead') +const GetChildListByGuardianIDResponse$json = { + '1': 'GetChildListByGuardianIDResponse', + '2': [ + {'1': 'children', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + ], +}; + +/// Descriptor for `GetChildListByGuardianIDResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getChildListByGuardianIDResponseDescriptor = $convert.base64Decode( + 'CiBHZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZXNwb25zZRI1CghjaGlsZHJlbhgBIAMoCzIZLn' + 'doZXJlX2NoaWxkX2J1cy52MS5DaGlsZFIIY2hpbGRyZW4='); + +const $core.Map<$core.String, $core.dynamic> ChildServiceBase$json = { + '1': 'ChildService', + '2': [ + {'1': 'GetChildListByNurseryID', '2': '.where_child_bus.v1.GetChildListByNurseryIDRequest', '3': '.where_child_bus.v1.GetChildListByNurseryIDResponse'}, + {'1': 'GetChildListByGuardianID', '2': '.where_child_bus.v1.GetChildListByGuardianIDRequest', '3': '.where_child_bus.v1.GetChildListByGuardianIDResponse'}, + ], +}; + +@$core.Deprecated('Use childServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> ChildServiceBase$messageJson = { + '.where_child_bus.v1.GetChildListByNurseryIDRequest': GetChildListByNurseryIDRequest$json, + '.where_child_bus.v1.GetChildListByNurseryIDResponse': GetChildListByNurseryIDResponse$json, + '.where_child_bus.v1.Child': $1.Child$json, + '.google.protobuf.Timestamp': $0.Timestamp$json, + '.where_child_bus.v1.GetChildListByGuardianIDRequest': GetChildListByGuardianIDRequest$json, + '.where_child_bus.v1.GetChildListByGuardianIDResponse': GetChildListByGuardianIDResponse$json, +}; + +/// Descriptor for `ChildService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List childServiceDescriptor = $convert.base64Decode( + 'CgxDaGlsZFNlcnZpY2USggEKF0dldENoaWxkTGlzdEJ5TnVyc2VyeUlEEjIud2hlcmVfY2hpbG' + 'RfYnVzLnYxLkdldENoaWxkTGlzdEJ5TnVyc2VyeUlEUmVxdWVzdBozLndoZXJlX2NoaWxkX2J1' + 'cy52MS5HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEoUBChhHZXRDaGlsZExpc3RCeU' + 'd1YXJkaWFuSUQSMy53aGVyZV9jaGlsZF9idXMudjEuR2V0Q2hpbGRMaXN0QnlHdWFyZGlhbklE' + 'UmVxdWVzdBo0LndoZXJlX2NoaWxkX2J1cy52MS5HZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZX' + 'Nwb25zZQ=='); + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbserver.dart new file mode 100644 index 00000000..e47015a4 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbserver.dart @@ -0,0 +1,46 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'child.pb.dart' as $3; +import 'child.pbjson.dart'; + +export 'child.pb.dart'; + +abstract class ChildServiceBase extends $pb.GeneratedService { + $async.Future<$3.GetChildListByNurseryIDResponse> getChildListByNurseryID($pb.ServerContext ctx, $3.GetChildListByNurseryIDRequest request); + $async.Future<$3.GetChildListByGuardianIDResponse> getChildListByGuardianID($pb.ServerContext ctx, $3.GetChildListByGuardianIDRequest request); + + $pb.GeneratedMessage createRequest($core.String methodName) { + switch (methodName) { + case 'GetChildListByNurseryID': return $3.GetChildListByNurseryIDRequest(); + case 'GetChildListByGuardianID': return $3.GetChildListByGuardianIDRequest(); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { + switch (methodName) { + case 'GetChildListByNurseryID': return this.getChildListByNurseryID(ctx, request as $3.GetChildListByNurseryIDRequest); + case 'GetChildListByGuardianID': return this.getChildListByGuardianID(ctx, request as $3.GetChildListByGuardianIDRequest); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => ChildServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => ChildServiceBase$messageJson; +} + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pb.dart new file mode 100644 index 00000000..45c3dd92 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -0,0 +1,174 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/guardian.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'resources.pb.dart' as $1; + +class GuardianLoginRequest extends $pb.GeneratedMessage { + factory GuardianLoginRequest({ + $core.String? email, + $core.String? password, + $core.String? guardianId, + }) { + final $result = create(); + if (email != null) { + $result.email = email; + } + if (password != null) { + $result.password = password; + } + if (guardianId != null) { + $result.guardianId = guardianId; + } + return $result; + } + GuardianLoginRequest._() : super(); + factory GuardianLoginRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GuardianLoginRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'email') + ..aOS(2, _omitFieldNames ? '' : 'password') + ..aOS(3, _omitFieldNames ? '' : 'guardianId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GuardianLoginRequest clone() => GuardianLoginRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GuardianLoginRequest copyWith(void Function(GuardianLoginRequest) updates) => super.copyWith((message) => updates(message as GuardianLoginRequest)) as GuardianLoginRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GuardianLoginRequest create() => GuardianLoginRequest._(); + GuardianLoginRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GuardianLoginRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GuardianLoginRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get email => $_getSZ(0); + @$pb.TagNumber(1) + set email($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasEmail() => $_has(0); + @$pb.TagNumber(1) + void clearEmail() => clearField(1); + + @$pb.TagNumber(2) + $core.String get password => $_getSZ(1); + @$pb.TagNumber(2) + set password($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPassword() => $_has(1); + @$pb.TagNumber(2) + void clearPassword() => clearField(2); + + @$pb.TagNumber(3) + $core.String get guardianId => $_getSZ(2); + @$pb.TagNumber(3) + set guardianId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasGuardianId() => $_has(2); + @$pb.TagNumber(3) + void clearGuardianId() => clearField(3); +} + +class GuardianLoginResponse extends $pb.GeneratedMessage { + factory GuardianLoginResponse({ + $core.bool? success, + $1.Guardian? guardian, + }) { + final $result = create(); + if (success != null) { + $result.success = success; + } + if (guardian != null) { + $result.guardian = guardian; + } + return $result; + } + GuardianLoginResponse._() : super(); + factory GuardianLoginResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GuardianLoginResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'success') + ..aOM<$1.Guardian>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $1.Guardian.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GuardianLoginResponse clone() => GuardianLoginResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GuardianLoginResponse copyWith(void Function(GuardianLoginResponse) updates) => super.copyWith((message) => updates(message as GuardianLoginResponse)) as GuardianLoginResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GuardianLoginResponse create() => GuardianLoginResponse._(); + GuardianLoginResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GuardianLoginResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GuardianLoginResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get success => $_getBF(0); + @$pb.TagNumber(1) + set success($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasSuccess() => $_has(0); + @$pb.TagNumber(1) + void clearSuccess() => clearField(1); + + @$pb.TagNumber(2) + $1.Guardian get guardian => $_getN(1); + @$pb.TagNumber(2) + set guardian($1.Guardian v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasGuardian() => $_has(1); + @$pb.TagNumber(2) + void clearGuardian() => clearField(2); + @$pb.TagNumber(2) + $1.Guardian ensureGuardian() => $_ensure(1); +} + +class GuardianServiceApi { + $pb.RpcClient _client; + GuardianServiceApi(this._client); + + $async.Future guardianLogin($pb.ClientContext? ctx, GuardianLoginRequest request) => + _client.invoke(ctx, 'GuardianService', 'GuardianLogin', request, GuardianLoginResponse()) + ; +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbenum.dart new file mode 100644 index 00000000..6f3a02a7 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/guardian.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbjson.dart new file mode 100644 index 00000000..1ad2b1cc --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -0,0 +1,68 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/guardian.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +import '../../google/protobuf/timestamp.pbjson.dart' as $0; +import 'resources.pbjson.dart' as $1; + +@$core.Deprecated('Use guardianLoginRequestDescriptor instead') +const GuardianLoginRequest$json = { + '1': 'GuardianLoginRequest', + '2': [ + {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'}, + {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'}, + {'1': 'guardian_id', '3': 3, '4': 1, '5': 9, '10': 'guardianId'}, + ], +}; + +/// Descriptor for `GuardianLoginRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List guardianLoginRequestDescriptor = $convert.base64Decode( + 'ChRHdWFyZGlhbkxvZ2luUmVxdWVzdBIUCgVlbWFpbBgBIAEoCVIFZW1haWwSGgoIcGFzc3dvcm' + 'QYAiABKAlSCHBhc3N3b3JkEh8KC2d1YXJkaWFuX2lkGAMgASgJUgpndWFyZGlhbklk'); + +@$core.Deprecated('Use guardianLoginResponseDescriptor instead') +const GuardianLoginResponse$json = { + '1': 'GuardianLoginResponse', + '2': [ + {'1': 'success', '3': 1, '4': 1, '5': 8, '10': 'success'}, + {'1': 'guardian', '3': 2, '4': 1, '5': 11, '6': '.where_child_bus.v1.Guardian', '10': 'guardian'}, + ], +}; + +/// Descriptor for `GuardianLoginResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List guardianLoginResponseDescriptor = $convert.base64Decode( + 'ChVHdWFyZGlhbkxvZ2luUmVzcG9uc2USGAoHc3VjY2VzcxgBIAEoCFIHc3VjY2VzcxI4CghndW' + 'FyZGlhbhgCIAEoCzIcLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhblIIZ3VhcmRpYW4='); + +const $core.Map<$core.String, $core.dynamic> GuardianServiceBase$json = { + '1': 'GuardianService', + '2': [ + {'1': 'GuardianLogin', '2': '.where_child_bus.v1.GuardianLoginRequest', '3': '.where_child_bus.v1.GuardianLoginResponse'}, + ], +}; + +@$core.Deprecated('Use guardianServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> GuardianServiceBase$messageJson = { + '.where_child_bus.v1.GuardianLoginRequest': GuardianLoginRequest$json, + '.where_child_bus.v1.GuardianLoginResponse': GuardianLoginResponse$json, + '.where_child_bus.v1.Guardian': $1.Guardian$json, + '.google.protobuf.Timestamp': $0.Timestamp$json, +}; + +/// Descriptor for `GuardianService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List guardianServiceDescriptor = $convert.base64Decode( + 'Cg9HdWFyZGlhblNlcnZpY2USZAoNR3VhcmRpYW5Mb2dpbhIoLndoZXJlX2NoaWxkX2J1cy52MS' + '5HdWFyZGlhbkxvZ2luUmVxdWVzdBopLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhbkxvZ2lu' + 'UmVzcG9uc2U='); + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbserver.dart new file mode 100644 index 00000000..2cc104ce --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbserver.dart @@ -0,0 +1,43 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/guardian.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'guardian.pb.dart' as $4; +import 'guardian.pbjson.dart'; + +export 'guardian.pb.dart'; + +abstract class GuardianServiceBase extends $pb.GeneratedService { + $async.Future<$4.GuardianLoginResponse> guardianLogin($pb.ServerContext ctx, $4.GuardianLoginRequest request); + + $pb.GeneratedMessage createRequest($core.String methodName) { + switch (methodName) { + case 'GuardianLogin': return $4.GuardianLoginRequest(); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { + switch (methodName) { + case 'GuardianLogin': return this.guardianLogin(ctx, request as $4.GuardianLoginRequest); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => GuardianServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => GuardianServiceBase$messageJson; +} + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbserver.dart index ce048fad..11d9fef0 100644 --- a/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbserver.dart +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbserver.dart @@ -15,24 +15,24 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'health_check.pb.dart' as $0; +import 'health_check.pb.dart' as $5; import 'health_check.pbjson.dart'; export 'health_check.pb.dart'; abstract class HealthcheckServiceBase extends $pb.GeneratedService { - $async.Future<$0.PingResponse> ping($pb.ServerContext ctx, $0.PingRequest request); + $async.Future<$5.PingResponse> ping($pb.ServerContext ctx, $5.PingRequest request); $pb.GeneratedMessage createRequest($core.String methodName) { switch (methodName) { - case 'Ping': return $0.PingRequest(); + case 'Ping': return $5.PingRequest(); default: throw $core.ArgumentError('Unknown method: $methodName'); } } $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { switch (methodName) { - case 'Ping': return this.ping(ctx, request as $0.PingRequest); + case 'Ping': return this.ping(ctx, request as $5.PingRequest); default: throw $core.ArgumentError('Unknown method: $methodName'); } } diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pb.dart new file mode 100644 index 00000000..11d77727 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -0,0 +1,160 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/nursery.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'resources.pb.dart' as $1; + +class NurseryLoginRequest extends $pb.GeneratedMessage { + factory NurseryLoginRequest({ + $core.String? email, + $core.String? password, + }) { + final $result = create(); + if (email != null) { + $result.email = email; + } + if (password != null) { + $result.password = password; + } + return $result; + } + NurseryLoginRequest._() : super(); + factory NurseryLoginRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory NurseryLoginRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryLoginRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'email') + ..aOS(2, _omitFieldNames ? '' : 'password') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + NurseryLoginRequest clone() => NurseryLoginRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + NurseryLoginRequest copyWith(void Function(NurseryLoginRequest) updates) => super.copyWith((message) => updates(message as NurseryLoginRequest)) as NurseryLoginRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static NurseryLoginRequest create() => NurseryLoginRequest._(); + NurseryLoginRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static NurseryLoginRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static NurseryLoginRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get email => $_getSZ(0); + @$pb.TagNumber(1) + set email($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasEmail() => $_has(0); + @$pb.TagNumber(1) + void clearEmail() => clearField(1); + + @$pb.TagNumber(2) + $core.String get password => $_getSZ(1); + @$pb.TagNumber(2) + set password($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPassword() => $_has(1); + @$pb.TagNumber(2) + void clearPassword() => clearField(2); +} + +class NurseryLoginResponse extends $pb.GeneratedMessage { + factory NurseryLoginResponse({ + $core.bool? success, + $1.Nursery? nursery, + }) { + final $result = create(); + if (success != null) { + $result.success = success; + } + if (nursery != null) { + $result.nursery = nursery; + } + return $result; + } + NurseryLoginResponse._() : super(); + factory NurseryLoginResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory NurseryLoginResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'success') + ..aOM<$1.Nursery>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $1.Nursery.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + NurseryLoginResponse clone() => NurseryLoginResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + NurseryLoginResponse copyWith(void Function(NurseryLoginResponse) updates) => super.copyWith((message) => updates(message as NurseryLoginResponse)) as NurseryLoginResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static NurseryLoginResponse create() => NurseryLoginResponse._(); + NurseryLoginResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static NurseryLoginResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static NurseryLoginResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get success => $_getBF(0); + @$pb.TagNumber(1) + set success($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasSuccess() => $_has(0); + @$pb.TagNumber(1) + void clearSuccess() => clearField(1); + + @$pb.TagNumber(2) + $1.Nursery get nursery => $_getN(1); + @$pb.TagNumber(2) + set nursery($1.Nursery v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasNursery() => $_has(1); + @$pb.TagNumber(2) + void clearNursery() => clearField(2); + @$pb.TagNumber(2) + $1.Nursery ensureNursery() => $_ensure(1); +} + +class NurseryServiceApi { + $pb.RpcClient _client; + NurseryServiceApi(this._client); + + $async.Future nurseryLogin($pb.ClientContext? ctx, NurseryLoginRequest request) => + _client.invoke(ctx, 'NurseryService', 'NurseryLogin', request, NurseryLoginResponse()) + ; +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbenum.dart new file mode 100644 index 00000000..4c9437d1 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/nursery.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbjson.dart new file mode 100644 index 00000000..26f47688 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbjson.dart @@ -0,0 +1,67 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/nursery.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +import '../../google/protobuf/timestamp.pbjson.dart' as $0; +import 'resources.pbjson.dart' as $1; + +@$core.Deprecated('Use nurseryLoginRequestDescriptor instead') +const NurseryLoginRequest$json = { + '1': 'NurseryLoginRequest', + '2': [ + {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'}, + {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'}, + ], +}; + +/// Descriptor for `NurseryLoginRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List nurseryLoginRequestDescriptor = $convert.base64Decode( + 'ChNOdXJzZXJ5TG9naW5SZXF1ZXN0EhQKBWVtYWlsGAEgASgJUgVlbWFpbBIaCghwYXNzd29yZB' + 'gCIAEoCVIIcGFzc3dvcmQ='); + +@$core.Deprecated('Use nurseryLoginResponseDescriptor instead') +const NurseryLoginResponse$json = { + '1': 'NurseryLoginResponse', + '2': [ + {'1': 'success', '3': 1, '4': 1, '5': 8, '10': 'success'}, + {'1': 'nursery', '3': 2, '4': 1, '5': 11, '6': '.where_child_bus.v1.Nursery', '10': 'nursery'}, + ], +}; + +/// Descriptor for `NurseryLoginResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List nurseryLoginResponseDescriptor = $convert.base64Decode( + 'ChROdXJzZXJ5TG9naW5SZXNwb25zZRIYCgdzdWNjZXNzGAEgASgIUgdzdWNjZXNzEjUKB251cn' + 'NlcnkYAiABKAsyGy53aGVyZV9jaGlsZF9idXMudjEuTnVyc2VyeVIHbnVyc2VyeQ=='); + +const $core.Map<$core.String, $core.dynamic> NurseryServiceBase$json = { + '1': 'NurseryService', + '2': [ + {'1': 'NurseryLogin', '2': '.where_child_bus.v1.NurseryLoginRequest', '3': '.where_child_bus.v1.NurseryLoginResponse'}, + ], +}; + +@$core.Deprecated('Use nurseryServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> NurseryServiceBase$messageJson = { + '.where_child_bus.v1.NurseryLoginRequest': NurseryLoginRequest$json, + '.where_child_bus.v1.NurseryLoginResponse': NurseryLoginResponse$json, + '.where_child_bus.v1.Nursery': $1.Nursery$json, + '.google.protobuf.Timestamp': $0.Timestamp$json, +}; + +/// Descriptor for `NurseryService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List nurseryServiceDescriptor = $convert.base64Decode( + 'Cg5OdXJzZXJ5U2VydmljZRJhCgxOdXJzZXJ5TG9naW4SJy53aGVyZV9jaGlsZF9idXMudjEuTn' + 'Vyc2VyeUxvZ2luUmVxdWVzdBooLndoZXJlX2NoaWxkX2J1cy52MS5OdXJzZXJ5TG9naW5SZXNw' + 'b25zZQ=='); + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbserver.dart new file mode 100644 index 00000000..2ff2a741 --- /dev/null +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbserver.dart @@ -0,0 +1,43 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/nursery.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'nursery.pb.dart' as $6; +import 'nursery.pbjson.dart'; + +export 'nursery.pb.dart'; + +abstract class NurseryServiceBase extends $pb.GeneratedService { + $async.Future<$6.NurseryLoginResponse> nurseryLogin($pb.ServerContext ctx, $6.NurseryLoginRequest request); + + $pb.GeneratedMessage createRequest($core.String methodName) { + switch (methodName) { + case 'NurseryLogin': return $6.NurseryLoginRequest(); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { + switch (methodName) { + case 'NurseryLogin': return this.nurseryLogin(ctx, request as $6.NurseryLoginRequest); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => NurseryServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => NurseryServiceBase$messageJson; +} + diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart index c83cac22..f43f0875 100644 --- a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart @@ -13,7 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/timestamp.pb.dart' as $1; +import '../../google/protobuf/timestamp.pb.dart' as $0; import 'resources.pbenum.dart'; export 'resources.pbenum.dart'; @@ -27,8 +27,8 @@ class Nursery extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.String? email, $core.String? encryptedPassword, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -72,8 +72,8 @@ class Nursery extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') ..aOS(7, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -162,26 +162,26 @@ class Nursery extends $pb.GeneratedMessage { void clearEncryptedPassword() => clearField(7); @$pb.TagNumber(8) - $1.Timestamp get createdAt => $_getN(7); + $0.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($1.Timestamp v) { setField(8, v); } + set createdAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $1.Timestamp ensureCreatedAt() => $_ensure(7); + $0.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $1.Timestamp get updatedAt => $_getN(8); + $0.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($1.Timestamp v) { setField(9, v); } + set updatedAt($0.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $1.Timestamp ensureUpdatedAt() => $_ensure(8); + $0.Timestamp ensureUpdatedAt() => $_ensure(8); } class Guardian extends $pb.GeneratedMessage { @@ -192,8 +192,8 @@ class Guardian extends $pb.GeneratedMessage { $core.String? email, $core.String? phoneNumber, $core.String? encryptedPassword, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -233,8 +233,8 @@ class Guardian extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$1.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -314,26 +314,26 @@ class Guardian extends $pb.GeneratedMessage { void clearEncryptedPassword() => clearField(6); @$pb.TagNumber(7) - $1.Timestamp get createdAt => $_getN(6); + $0.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($1.Timestamp v) { setField(7, v); } + set createdAt($0.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $1.Timestamp ensureCreatedAt() => $_ensure(6); + $0.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $1.Timestamp get updatedAt => $_getN(7); + $0.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($1.Timestamp v) { setField(8, v); } + set updatedAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $1.Timestamp ensureUpdatedAt() => $_ensure(7); + $0.Timestamp ensureUpdatedAt() => $_ensure(7); } class Bus extends $pb.GeneratedMessage { @@ -345,8 +345,8 @@ class Bus extends $pb.GeneratedMessage { Bus_Status? status, $core.double? latitude, $core.double? longitude, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -390,8 +390,8 @@ class Bus extends $pb.GeneratedMessage { ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Bus_Status.STATUS_UNSPECIFIED, valueOf: Bus_Status.valueOf, enumValues: Bus_Status.values) ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -481,26 +481,26 @@ class Bus extends $pb.GeneratedMessage { void clearLongitude() => clearField(7); @$pb.TagNumber(8) - $1.Timestamp get createdAt => $_getN(7); + $0.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($1.Timestamp v) { setField(8, v); } + set createdAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $1.Timestamp ensureCreatedAt() => $_ensure(7); + $0.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $1.Timestamp get updatedAt => $_getN(8); + $0.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($1.Timestamp v) { setField(9, v); } + set updatedAt($0.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $1.Timestamp ensureUpdatedAt() => $_ensure(8); + $0.Timestamp ensureUpdatedAt() => $_ensure(8); } class Child extends $pb.GeneratedMessage { @@ -519,8 +519,8 @@ class Child extends $pb.GeneratedMessage { $core.bool? hasWaterBottle, $core.bool? hasUmbrera, $core.bool? hasOther, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -592,8 +592,8 @@ class Child extends $pb.GeneratedMessage { ..aOB(12, _omitFieldNames ? '' : 'hasWaterBottle') ..aOB(13, _omitFieldNames ? '' : 'hasUmbrera') ..aOB(14, _omitFieldNames ? '' : 'hasOther') - ..aOM<$1.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..aOM<$0.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -745,26 +745,26 @@ class Child extends $pb.GeneratedMessage { void clearHasOther() => clearField(14); @$pb.TagNumber(15) - $1.Timestamp get createdAt => $_getN(14); + $0.Timestamp get createdAt => $_getN(14); @$pb.TagNumber(15) - set createdAt($1.Timestamp v) { setField(15, v); } + set createdAt($0.Timestamp v) { setField(15, v); } @$pb.TagNumber(15) $core.bool hasCreatedAt() => $_has(14); @$pb.TagNumber(15) void clearCreatedAt() => clearField(15); @$pb.TagNumber(15) - $1.Timestamp ensureCreatedAt() => $_ensure(14); + $0.Timestamp ensureCreatedAt() => $_ensure(14); @$pb.TagNumber(16) - $1.Timestamp get updatedAt => $_getN(15); + $0.Timestamp get updatedAt => $_getN(15); @$pb.TagNumber(16) - set updatedAt($1.Timestamp v) { setField(16, v); } + set updatedAt($0.Timestamp v) { setField(16, v); } @$pb.TagNumber(16) $core.bool hasUpdatedAt() => $_has(15); @$pb.TagNumber(16) void clearUpdatedAt() => clearField(16); @$pb.TagNumber(16) - $1.Timestamp ensureUpdatedAt() => $_ensure(15); + $0.Timestamp ensureUpdatedAt() => $_ensure(15); } class Station extends $pb.GeneratedMessage { @@ -775,8 +775,8 @@ class Station extends $pb.GeneratedMessage { $core.double? longitude, $core.int? morningOrder, $core.int? eveningOrder, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -816,8 +816,8 @@ class Station extends $pb.GeneratedMessage { ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.int>(5, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) ..a<$core.int>(6, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) - ..aOM<$1.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -897,26 +897,26 @@ class Station extends $pb.GeneratedMessage { void clearEveningOrder() => clearField(6); @$pb.TagNumber(7) - $1.Timestamp get createdAt => $_getN(6); + $0.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($1.Timestamp v) { setField(7, v); } + set createdAt($0.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $1.Timestamp ensureCreatedAt() => $_ensure(6); + $0.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $1.Timestamp get updatedAt => $_getN(7); + $0.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($1.Timestamp v) { setField(8, v); } + set updatedAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $1.Timestamp ensureUpdatedAt() => $_ensure(7); + $0.Timestamp ensureUpdatedAt() => $_ensure(7); } class ChildBusAssociation extends $pb.GeneratedMessage { @@ -1081,8 +1081,8 @@ class ChildPhoto extends $pb.GeneratedMessage { $core.String? childId, $core.String? s3Bucket, $core.String? s3Key, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1114,8 +1114,8 @@ class ChildPhoto extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 's3Bucket') ..aOS(4, _omitFieldNames ? '' : 's3Key') - ..aOM<$1.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) + ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -1177,26 +1177,26 @@ class ChildPhoto extends $pb.GeneratedMessage { void clearS3Key() => clearField(4); @$pb.TagNumber(5) - $1.Timestamp get createdAt => $_getN(4); + $0.Timestamp get createdAt => $_getN(4); @$pb.TagNumber(5) - set createdAt($1.Timestamp v) { setField(5, v); } + set createdAt($0.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasCreatedAt() => $_has(4); @$pb.TagNumber(5) void clearCreatedAt() => clearField(5); @$pb.TagNumber(5) - $1.Timestamp ensureCreatedAt() => $_ensure(4); + $0.Timestamp ensureCreatedAt() => $_ensure(4); @$pb.TagNumber(6) - $1.Timestamp get updatedAt => $_getN(5); + $0.Timestamp get updatedAt => $_getN(5); @$pb.TagNumber(6) - set updatedAt($1.Timestamp v) { setField(6, v); } + set updatedAt($0.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasUpdatedAt() => $_has(5); @$pb.TagNumber(6) void clearUpdatedAt() => clearField(6); @$pb.TagNumber(6) - $1.Timestamp ensureUpdatedAt() => $_ensure(5); + $0.Timestamp ensureUpdatedAt() => $_ensure(5); } class BoardingRecord extends $pb.GeneratedMessage { @@ -1205,7 +1205,7 @@ class BoardingRecord extends $pb.GeneratedMessage { $core.String? childId, $core.String? busId, $core.bool? isBoarding, - $1.Timestamp? timestamp, + $0.Timestamp? timestamp, }) { final $result = create(); if (id != null) { @@ -1234,7 +1234,7 @@ class BoardingRecord extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 'busId') ..aOB(4, _omitFieldNames ? '' : 'isBoarding') - ..aOM<$1.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $1.Timestamp.create) + ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -1296,15 +1296,15 @@ class BoardingRecord extends $pb.GeneratedMessage { void clearIsBoarding() => clearField(4); @$pb.TagNumber(5) - $1.Timestamp get timestamp => $_getN(4); + $0.Timestamp get timestamp => $_getN(4); @$pb.TagNumber(5) - set timestamp($1.Timestamp v) { setField(5, v); } + set timestamp($0.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasTimestamp() => $_has(4); @$pb.TagNumber(5) void clearTimestamp() => clearField(5); @$pb.TagNumber(5) - $1.Timestamp ensureTimestamp() => $_ensure(4); + $0.Timestamp ensureTimestamp() => $_ensure(4); } diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py new file mode 100644 index 00000000..ccd64aaf --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/v1/bus.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses2\x8a\x01\n\nBusService\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponseB\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.bus_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=88 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=149 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=151 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=229 + _globals['_BUSSERVICE']._serialized_start=232 + _globals['_BUSSERVICE']._serialized_end=370 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py new file mode 100644 index 00000000..fc9d2389 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 + + +class BusServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetBusListByNurseryId = channel.unary_unary( + '/where_child_bus.v1.BusService/GetBusListByNurseryId', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, + ) + + +class BusServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetBusListByNurseryId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BusServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetBusListByNurseryId': grpc.unary_unary_rpc_method_handler( + servicer.GetBusListByNurseryId, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'where_child_bus.v1.BusService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class BusService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetBusListByNurseryId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/GetBusListByNurseryId', + where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py new file mode 100644 index 00000000..4d1a20c7 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/v1/child.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"X\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"Y\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\x9b\x02\n\x0c\x43hildService\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.child_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\nChildProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=90 + _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=153 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=155 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=243 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=245 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=311 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=313 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=402 + _globals['_CHILDSERVICE']._serialized_start=405 + _globals['_CHILDSERVICE']._serialized_end=688 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py new file mode 100644 index 00000000..601b983d --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from where_child_bus.v1 import child_pb2 as where__child__bus_dot_v1_dot_child__pb2 + + +class ChildServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetChildListByNurseryID = channel.unary_unary( + '/where_child_bus.v1.ChildService/GetChildListByNurseryID', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, + ) + self.GetChildListByGuardianID = channel.unary_unary( + '/where_child_bus.v1.ChildService/GetChildListByGuardianID', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.FromString, + ) + + +class ChildServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetChildListByNurseryID(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetChildListByGuardianID(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ChildServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetChildListByNurseryID': grpc.unary_unary_rpc_method_handler( + servicer.GetChildListByNurseryID, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.SerializeToString, + ), + 'GetChildListByGuardianID': grpc.unary_unary_rpc_method_handler( + servicer.GetChildListByGuardianID, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'where_child_bus.v1.ChildService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ChildService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetChildListByNurseryID(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByNurseryID', + where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, + where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetChildListByGuardianID(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByGuardianID', + where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.SerializeToString, + where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py new file mode 100644 index 00000000..92bf0ba6 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/v1/guardian.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"i\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\"k\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x38\n\x08guardian\x18\x02 \x01(\x0b\x32\x1c.where_child_bus.v1.GuardianR\x08guardian2w\n\x0fGuardianService\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.guardian_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\rGuardianProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_GUARDIANLOGINREQUEST']._serialized_start=93 + _globals['_GUARDIANLOGINREQUEST']._serialized_end=198 + _globals['_GUARDIANLOGINRESPONSE']._serialized_start=200 + _globals['_GUARDIANLOGINRESPONSE']._serialized_end=307 + _globals['_GUARDIANSERVICE']._serialized_start=309 + _globals['_GUARDIANSERVICE']._serialized_end=428 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py new file mode 100644 index 00000000..5d2c5eb9 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from where_child_bus.v1 import guardian_pb2 as where__child__bus_dot_v1_dot_guardian__pb2 + + +class GuardianServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GuardianLogin = channel.unary_unary( + '/where_child_bus.v1.GuardianService/GuardianLogin', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.FromString, + ) + + +class GuardianServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GuardianLogin(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_GuardianServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GuardianLogin': grpc.unary_unary_rpc_method_handler( + servicer.GuardianLogin, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'where_child_bus.v1.GuardianService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class GuardianService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GuardianLogin(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GuardianLogin', + where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.SerializeToString, + where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py new file mode 100644 index 00000000..3b3210c1 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/v1/nursery.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"g\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x35\n\x07nursery\x18\x02 \x01(\x0b\x32\x1b.where_child_bus.v1.NurseryR\x07nursery2s\n\x0eNurseryService\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.nursery_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014NurseryProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_NURSERYLOGINREQUEST']._serialized_start=92 + _globals['_NURSERYLOGINREQUEST']._serialized_end=163 + _globals['_NURSERYLOGINRESPONSE']._serialized_start=165 + _globals['_NURSERYLOGINRESPONSE']._serialized_end=268 + _globals['_NURSERYSERVICE']._serialized_start=270 + _globals['_NURSERYSERVICE']._serialized_end=385 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py new file mode 100644 index 00000000..149d5cf9 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from where_child_bus.v1 import nursery_pb2 as where__child__bus_dot_v1_dot_nursery__pb2 + + +class NurseryServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.NurseryLogin = channel.unary_unary( + '/where_child_bus.v1.NurseryService/NurseryLogin', + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.FromString, + ) + + +class NurseryServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def NurseryLogin(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_NurseryServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'NurseryLogin': grpc.unary_unary_rpc_method_handler( + servicer.NurseryLogin, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'where_child_bus.v1.NurseryService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class NurseryService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def NurseryLogin(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/NurseryLogin', + where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.SerializeToString, + where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) From e578a0c864fe8741070dfacc8151854160435424 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 15:18:14 +0900 Subject: [PATCH 086/771] =?UTF-8?q?fix(proto):=20=E3=83=AC=E3=82=B9?= =?UTF-8?q?=E3=83=9D=E3=83=B3=E3=82=B9=E3=83=8F=E3=83=83=E3=82=B7=E3=83=A5?= =?UTF-8?q?=E5=8C=96=E3=83=91=E3=82=B9=E3=83=AF=E3=83=BC=E3=83=89=E3=81=8C?= =?UTF-8?q?=E5=90=AB=E3=81=BE=E3=82=8C=E3=81=AA=E3=81=84=E3=82=88=E3=81=86?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/where_child_bus/v1/guardian.pb.go | 108 +-- .../go/where_child_bus/v1/resources.pb.go | 715 ++++++++++++------ .../proto/where_child_bus/v1/guardian.proto | 4 +- .../proto/where_child_bus/v1/resources.proto | 22 + .../where_child_bus/v1/guardian.pb.dart | 40 +- .../where_child_bus/v1/guardian.pbjson.dart | 15 +- .../where_child_bus/v1/resources.pb.dart | 278 +++++++ .../where_child_bus/v1/resources.pbjson.dart | 44 ++ .../where_child_bus/v1/guardian_pb2.py | 12 +- .../where_child_bus/v1/resources_pb2.py | 50 +- 10 files changed, 950 insertions(+), 338 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go index 37cc838f..896115b3 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go @@ -25,9 +25,8 @@ type GuardianLoginRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - GuardianId string `protobuf:"bytes,3,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` } func (x *GuardianLoginRequest) Reset() { @@ -76,20 +75,14 @@ func (x *GuardianLoginRequest) GetPassword() string { return "" } -func (x *GuardianLoginRequest) GetGuardianId() string { - if x != nil { - return x.GuardianId - } - return "" -} - type GuardianLoginResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Guardian *Guardian `protobuf:"bytes,2,opt,name=guardian,proto3" json:"guardian,omitempty"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Guardian *GuardianResponse `protobuf:"bytes,2,opt,name=guardian,proto3" json:"guardian,omitempty"` + Nursery *NurseryReponse `protobuf:"bytes,3,opt,name=nursery,proto3" json:"nursery,omitempty"` } func (x *GuardianLoginResponse) Reset() { @@ -131,13 +124,20 @@ func (x *GuardianLoginResponse) GetSuccess() bool { return false } -func (x *GuardianLoginResponse) GetGuardian() *Guardian { +func (x *GuardianLoginResponse) GetGuardian() *GuardianResponse { if x != nil { return x.Guardian } return nil } +func (x *GuardianLoginResponse) GetNursery() *NurseryReponse { + if x != nil { + return x.Nursery + } + return nil +} + var File_where_child_bus_v1_guardian_proto protoreflect.FileDescriptor var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ @@ -146,44 +146,46 @@ var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x69, 0x0a, 0x14, 0x47, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x14, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x15, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x15, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x68, + 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x08, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x32, 0x77, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0x77, 0x0a, 0x0f, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, + 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, - 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, - 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, + 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -202,17 +204,19 @@ var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageIn var file_where_child_bus_v1_guardian_proto_goTypes = []interface{}{ (*GuardianLoginRequest)(nil), // 0: where_child_bus.v1.GuardianLoginRequest (*GuardianLoginResponse)(nil), // 1: where_child_bus.v1.GuardianLoginResponse - (*Guardian)(nil), // 2: where_child_bus.v1.Guardian + (*GuardianResponse)(nil), // 2: where_child_bus.v1.GuardianResponse + (*NurseryReponse)(nil), // 3: where_child_bus.v1.NurseryReponse } var file_where_child_bus_v1_guardian_proto_depIdxs = []int32{ - 2, // 0: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.Guardian - 0, // 1: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest - 1, // 2: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 0: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 3, // 1: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryReponse + 0, // 2: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest + 1, // 3: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_where_child_bus_v1_guardian_proto_init() } diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 1026e351..93d0bae6 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -70,7 +70,7 @@ func (x Bus_Status) Number() protoreflect.EnumNumber { // Deprecated: Use Bus_Status.Descriptor instead. func (Bus_Status) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{2, 0} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{4, 0} } type Child_Sex int32 @@ -122,7 +122,7 @@ func (x Child_Sex) Number() protoreflect.EnumNumber { // Deprecated: Use Child_Sex.Descriptor instead. func (Child_Sex) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{3, 0} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{5, 0} } type ChildBusAssociation_BusType int32 @@ -171,7 +171,7 @@ func (x ChildBusAssociation_BusType) Number() protoreflect.EnumNumber { // Deprecated: Use ChildBusAssociation_BusType.Descriptor instead. func (ChildBusAssociation_BusType) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{5, 0} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{7, 0} } type Nursery struct { @@ -285,6 +285,102 @@ func (x *Nursery) GetUpdatedAt() *timestamppb.Timestamp { return nil } +type NurseryReponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + // ハッシュ化されたパスワードは除外 + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *NurseryReponse) Reset() { + *x = NurseryReponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NurseryReponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NurseryReponse) ProtoMessage() {} + +func (x *NurseryReponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NurseryReponse.ProtoReflect.Descriptor instead. +func (*NurseryReponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{1} +} + +func (x *NurseryReponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *NurseryReponse) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *NurseryReponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NurseryReponse) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *NurseryReponse) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *NurseryReponse) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *NurseryReponse) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + type Guardian struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -303,7 +399,7 @@ type Guardian struct { func (x *Guardian) Reset() { *x = Guardian{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[1] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -316,7 +412,7 @@ func (x *Guardian) String() string { func (*Guardian) ProtoMessage() {} func (x *Guardian) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[1] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -329,7 +425,7 @@ func (x *Guardian) ProtoReflect() protoreflect.Message { // Deprecated: Use Guardian.ProtoReflect.Descriptor instead. func (*Guardian) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{1} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{2} } func (x *Guardian) GetId() string { @@ -388,6 +484,102 @@ func (x *Guardian) GetUpdatedAt() *timestamppb.Timestamp { return nil } +type GuardianResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + // ハッシュ化されたパスワードは除外 + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *GuardianResponse) Reset() { + *x = GuardianResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GuardianResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GuardianResponse) ProtoMessage() {} + +func (x *GuardianResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GuardianResponse.ProtoReflect.Descriptor instead. +func (*GuardianResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{3} +} + +func (x *GuardianResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GuardianResponse) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *GuardianResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GuardianResponse) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *GuardianResponse) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *GuardianResponse) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *GuardianResponse) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + type Bus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -408,7 +600,7 @@ type Bus struct { func (x *Bus) Reset() { *x = Bus{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[2] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -421,7 +613,7 @@ func (x *Bus) String() string { func (*Bus) ProtoMessage() {} func (x *Bus) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[2] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -434,7 +626,7 @@ func (x *Bus) ProtoReflect() protoreflect.Message { // Deprecated: Use Bus.ProtoReflect.Descriptor instead. func (*Bus) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{2} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{4} } func (x *Bus) GetId() string { @@ -526,7 +718,7 @@ type Child struct { func (x *Child) Reset() { *x = Child{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[3] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -539,7 +731,7 @@ func (x *Child) String() string { func (*Child) ProtoMessage() {} func (x *Child) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[3] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -552,7 +744,7 @@ func (x *Child) ProtoReflect() protoreflect.Message { // Deprecated: Use Child.ProtoReflect.Descriptor instead. func (*Child) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{3} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{5} } func (x *Child) GetId() string { @@ -685,7 +877,7 @@ type Station struct { func (x *Station) Reset() { *x = Station{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[4] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -698,7 +890,7 @@ func (x *Station) String() string { func (*Station) ProtoMessage() {} func (x *Station) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[4] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -711,7 +903,7 @@ func (x *Station) ProtoReflect() protoreflect.Message { // Deprecated: Use Station.ProtoReflect.Descriptor instead. func (*Station) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{4} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{6} } func (x *Station) GetId() string { @@ -784,7 +976,7 @@ type ChildBusAssociation struct { func (x *ChildBusAssociation) Reset() { *x = ChildBusAssociation{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[5] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -797,7 +989,7 @@ func (x *ChildBusAssociation) String() string { func (*ChildBusAssociation) ProtoMessage() {} func (x *ChildBusAssociation) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[5] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -810,7 +1002,7 @@ func (x *ChildBusAssociation) ProtoReflect() protoreflect.Message { // Deprecated: Use ChildBusAssociation.ProtoReflect.Descriptor instead. func (*ChildBusAssociation) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{5} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{7} } func (x *ChildBusAssociation) GetId() string { @@ -853,7 +1045,7 @@ type BusStationAssociation struct { func (x *BusStationAssociation) Reset() { *x = BusStationAssociation{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[6] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -866,7 +1058,7 @@ func (x *BusStationAssociation) String() string { func (*BusStationAssociation) ProtoMessage() {} func (x *BusStationAssociation) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[6] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -879,7 +1071,7 @@ func (x *BusStationAssociation) ProtoReflect() protoreflect.Message { // Deprecated: Use BusStationAssociation.ProtoReflect.Descriptor instead. func (*BusStationAssociation) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{6} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{8} } func (x *BusStationAssociation) GetBusId() string { @@ -912,7 +1104,7 @@ type ChildPhoto struct { func (x *ChildPhoto) Reset() { *x = ChildPhoto{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[7] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -925,7 +1117,7 @@ func (x *ChildPhoto) String() string { func (*ChildPhoto) ProtoMessage() {} func (x *ChildPhoto) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[7] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -938,7 +1130,7 @@ func (x *ChildPhoto) ProtoReflect() protoreflect.Message { // Deprecated: Use ChildPhoto.ProtoReflect.Descriptor instead. func (*ChildPhoto) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{7} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{9} } func (x *ChildPhoto) GetId() string { @@ -998,7 +1190,7 @@ type BoardingRecord struct { func (x *BoardingRecord) Reset() { *x = BoardingRecord{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[8] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1011,7 +1203,7 @@ func (x *BoardingRecord) String() string { func (*BoardingRecord) ProtoMessage() {} func (x *BoardingRecord) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[8] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1024,7 +1216,7 @@ func (x *BoardingRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use BoardingRecord.ProtoReflect.Descriptor instead. func (*BoardingRecord) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{8} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{10} } func (x *BoardingRecord) GetId() string { @@ -1091,176 +1283,209 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x02, 0x0a, 0x08, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x0a, - 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x22, 0xb6, 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, - 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, - 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, - 0x4e, 0x54, 0x45, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x22, 0xa5, 0x05, 0x0a, 0x05, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x73, - 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, - 0x69, 0x73, 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x62, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, - 0x65, 0x4d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x69, - 0x73, 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, - 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, - 0x45, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, - 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, - 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, - 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, - 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, - 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, - 0x75, 0x6d, 0x62, 0x72, 0x65, 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, - 0x61, 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, - 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, - 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x65, 0x64, 0x41, 0x74, 0x22, 0x82, 0x02, 0x0a, 0x0e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, + 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x02, 0x0a, 0x08, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, + 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x45, 0x0a, 0x03, - 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, - 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, - 0x45, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, - 0x52, 0x10, 0x03, 0x22, 0xb4, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, - 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xf4, 0x01, 0x0a, 0x13, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, - 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, - 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, - 0x02, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, - 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0xe1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x33, - 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, - 0x33, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, 0x39, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x10, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, + 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb6, + 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, - 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, - 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, - 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, - 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, - 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x64, 0x41, 0x74, 0x22, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, + 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, + 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x22, 0xa5, 0x05, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, + 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, + 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, 0x6f, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x69, + 0x64, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, + 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, + 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, + 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, + 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, + 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, + 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, + 0x74, 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, + 0x65, 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x55, 0x6d, + 0x62, 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, + 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, + 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, + 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, + 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x45, 0x4e, 0x10, 0x02, + 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x22, + 0xb4, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, + 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, + 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, + 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xf4, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, + 0x12, 0x4a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4f, 0x0a, 0x07, + 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, + 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x4d, 0x0a, + 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, + 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x33, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, + 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, + 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1276,44 +1501,50 @@ func file_where_child_bus_v1_resources_proto_rawDescGZIP() []byte { } var file_where_child_bus_v1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_where_child_bus_v1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_where_child_bus_v1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_where_child_bus_v1_resources_proto_goTypes = []interface{}{ (Bus_Status)(0), // 0: where_child_bus.v1.Bus.Status (Child_Sex)(0), // 1: where_child_bus.v1.Child.Sex (ChildBusAssociation_BusType)(0), // 2: where_child_bus.v1.ChildBusAssociation.BusType (*Nursery)(nil), // 3: where_child_bus.v1.Nursery - (*Guardian)(nil), // 4: where_child_bus.v1.Guardian - (*Bus)(nil), // 5: where_child_bus.v1.Bus - (*Child)(nil), // 6: where_child_bus.v1.Child - (*Station)(nil), // 7: where_child_bus.v1.Station - (*ChildBusAssociation)(nil), // 8: where_child_bus.v1.ChildBusAssociation - (*BusStationAssociation)(nil), // 9: where_child_bus.v1.BusStationAssociation - (*ChildPhoto)(nil), // 10: where_child_bus.v1.ChildPhoto - (*BoardingRecord)(nil), // 11: where_child_bus.v1.BoardingRecord - (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp + (*NurseryReponse)(nil), // 4: where_child_bus.v1.NurseryReponse + (*Guardian)(nil), // 5: where_child_bus.v1.Guardian + (*GuardianResponse)(nil), // 6: where_child_bus.v1.GuardianResponse + (*Bus)(nil), // 7: where_child_bus.v1.Bus + (*Child)(nil), // 8: where_child_bus.v1.Child + (*Station)(nil), // 9: where_child_bus.v1.Station + (*ChildBusAssociation)(nil), // 10: where_child_bus.v1.ChildBusAssociation + (*BusStationAssociation)(nil), // 11: where_child_bus.v1.BusStationAssociation + (*ChildPhoto)(nil), // 12: where_child_bus.v1.ChildPhoto + (*BoardingRecord)(nil), // 13: where_child_bus.v1.BoardingRecord + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp } var file_where_child_bus_v1_resources_proto_depIdxs = []int32{ - 12, // 0: where_child_bus.v1.Nursery.created_at:type_name -> google.protobuf.Timestamp - 12, // 1: where_child_bus.v1.Nursery.updated_at:type_name -> google.protobuf.Timestamp - 12, // 2: where_child_bus.v1.Guardian.created_at:type_name -> google.protobuf.Timestamp - 12, // 3: where_child_bus.v1.Guardian.updated_at:type_name -> google.protobuf.Timestamp - 0, // 4: where_child_bus.v1.Bus.status:type_name -> where_child_bus.v1.Bus.Status - 12, // 5: where_child_bus.v1.Bus.created_at:type_name -> google.protobuf.Timestamp - 12, // 6: where_child_bus.v1.Bus.updated_at:type_name -> google.protobuf.Timestamp - 1, // 7: where_child_bus.v1.Child.sex:type_name -> where_child_bus.v1.Child.Sex - 12, // 8: where_child_bus.v1.Child.created_at:type_name -> google.protobuf.Timestamp - 12, // 9: where_child_bus.v1.Child.updated_at:type_name -> google.protobuf.Timestamp - 12, // 10: where_child_bus.v1.Station.created_at:type_name -> google.protobuf.Timestamp - 12, // 11: where_child_bus.v1.Station.updated_at:type_name -> google.protobuf.Timestamp - 2, // 12: where_child_bus.v1.ChildBusAssociation.bus_type:type_name -> where_child_bus.v1.ChildBusAssociation.BusType - 12, // 13: where_child_bus.v1.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp - 12, // 14: where_child_bus.v1.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp - 12, // 15: where_child_bus.v1.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 14, // 0: where_child_bus.v1.Nursery.created_at:type_name -> google.protobuf.Timestamp + 14, // 1: where_child_bus.v1.Nursery.updated_at:type_name -> google.protobuf.Timestamp + 14, // 2: where_child_bus.v1.NurseryReponse.created_at:type_name -> google.protobuf.Timestamp + 14, // 3: where_child_bus.v1.NurseryReponse.updated_at:type_name -> google.protobuf.Timestamp + 14, // 4: where_child_bus.v1.Guardian.created_at:type_name -> google.protobuf.Timestamp + 14, // 5: where_child_bus.v1.Guardian.updated_at:type_name -> google.protobuf.Timestamp + 14, // 6: where_child_bus.v1.GuardianResponse.created_at:type_name -> google.protobuf.Timestamp + 14, // 7: where_child_bus.v1.GuardianResponse.updated_at:type_name -> google.protobuf.Timestamp + 0, // 8: where_child_bus.v1.Bus.status:type_name -> where_child_bus.v1.Bus.Status + 14, // 9: where_child_bus.v1.Bus.created_at:type_name -> google.protobuf.Timestamp + 14, // 10: where_child_bus.v1.Bus.updated_at:type_name -> google.protobuf.Timestamp + 1, // 11: where_child_bus.v1.Child.sex:type_name -> where_child_bus.v1.Child.Sex + 14, // 12: where_child_bus.v1.Child.created_at:type_name -> google.protobuf.Timestamp + 14, // 13: where_child_bus.v1.Child.updated_at:type_name -> google.protobuf.Timestamp + 14, // 14: where_child_bus.v1.Station.created_at:type_name -> google.protobuf.Timestamp + 14, // 15: where_child_bus.v1.Station.updated_at:type_name -> google.protobuf.Timestamp + 2, // 16: where_child_bus.v1.ChildBusAssociation.bus_type:type_name -> where_child_bus.v1.ChildBusAssociation.BusType + 14, // 17: where_child_bus.v1.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp + 14, // 18: where_child_bus.v1.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp + 14, // 19: where_child_bus.v1.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_where_child_bus_v1_resources_proto_init() } @@ -1335,7 +1566,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Guardian); i { + switch v := v.(*NurseryReponse); i { case 0: return &v.state case 1: @@ -1347,7 +1578,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bus); i { + switch v := v.(*Guardian); i { case 0: return &v.state case 1: @@ -1359,7 +1590,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Child); i { + switch v := v.(*GuardianResponse); i { case 0: return &v.state case 1: @@ -1371,7 +1602,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Station); i { + switch v := v.(*Bus); i { case 0: return &v.state case 1: @@ -1383,7 +1614,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChildBusAssociation); i { + switch v := v.(*Child); i { case 0: return &v.state case 1: @@ -1395,7 +1626,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BusStationAssociation); i { + switch v := v.(*Station); i { case 0: return &v.state case 1: @@ -1407,7 +1638,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChildPhoto); i { + switch v := v.(*ChildBusAssociation); i { case 0: return &v.state case 1: @@ -1419,6 +1650,30 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BusStationAssociation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_resources_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChildPhoto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_resources_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BoardingRecord); i { case 0: return &v.state @@ -1437,7 +1692,7 @@ func file_where_child_bus_v1_resources_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_resources_proto_rawDesc, NumEnums: 3, - NumMessages: 9, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/backend/proto/where_child_bus/v1/guardian.proto b/backend/proto/where_child_bus/v1/guardian.proto index 35b02498..d2de0b21 100644 --- a/backend/proto/where_child_bus/v1/guardian.proto +++ b/backend/proto/where_child_bus/v1/guardian.proto @@ -11,10 +11,10 @@ service GuardianService { message GuardianLoginRequest { string email = 1; string password = 2; - string guardian_id = 3; } message GuardianLoginResponse { bool success = 1; - Guardian guardian = 2; + GuardianResponse guardian = 2; + NurseryReponse nursery = 3; } \ No newline at end of file diff --git a/backend/proto/where_child_bus/v1/resources.proto b/backend/proto/where_child_bus/v1/resources.proto index 85d3c3b6..97054486 100644 --- a/backend/proto/where_child_bus/v1/resources.proto +++ b/backend/proto/where_child_bus/v1/resources.proto @@ -16,6 +16,17 @@ message Nursery { google.protobuf.Timestamp updated_at = 9; } +message NurseryReponse { + string id = 1; + string nursery_id = 2; + string name = 3; + string email = 4; + string phone_number = 5; + // ハッシュ化されたパスワードは除外 + google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp updated_at = 7; +} + message Guardian { string id = 1; string nursery_id = 2; @@ -27,6 +38,17 @@ message Guardian { google.protobuf.Timestamp updated_at =8; } +message GuardianResponse { + string id = 1; + string nursery_id = 2; + string name = 3; + string email = 4; + string phone_number = 5; + // ハッシュ化されたパスワードは除外 + google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp updated_at = 7; +} + message Bus { string id = 1; string nursery_id = 2; diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pb.dart index 45c3dd92..06a4aeff 100644 --- a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -20,7 +20,6 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { factory GuardianLoginRequest({ $core.String? email, $core.String? password, - $core.String? guardianId, }) { final $result = create(); if (email != null) { @@ -29,9 +28,6 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { if (password != null) { $result.password = password; } - if (guardianId != null) { - $result.guardianId = guardianId; - } return $result; } GuardianLoginRequest._() : super(); @@ -41,7 +37,6 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'email') ..aOS(2, _omitFieldNames ? '' : 'password') - ..aOS(3, _omitFieldNames ? '' : 'guardianId') ..hasRequiredFields = false ; @@ -83,21 +78,13 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { $core.bool hasPassword() => $_has(1); @$pb.TagNumber(2) void clearPassword() => clearField(2); - - @$pb.TagNumber(3) - $core.String get guardianId => $_getSZ(2); - @$pb.TagNumber(3) - set guardianId($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasGuardianId() => $_has(2); - @$pb.TagNumber(3) - void clearGuardianId() => clearField(3); } class GuardianLoginResponse extends $pb.GeneratedMessage { factory GuardianLoginResponse({ $core.bool? success, - $1.Guardian? guardian, + $1.GuardianResponse? guardian, + $1.NurseryReponse? nursery, }) { final $result = create(); if (success != null) { @@ -106,6 +93,9 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { if (guardian != null) { $result.guardian = guardian; } + if (nursery != null) { + $result.nursery = nursery; + } return $result; } GuardianLoginResponse._() : super(); @@ -114,7 +104,8 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$1.Guardian>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $1.Guardian.create) + ..aOM<$1.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $1.GuardianResponse.create) + ..aOM<$1.NurseryReponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $1.NurseryReponse.create) ..hasRequiredFields = false ; @@ -149,15 +140,26 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $1.Guardian get guardian => $_getN(1); + $1.GuardianResponse get guardian => $_getN(1); @$pb.TagNumber(2) - set guardian($1.Guardian v) { setField(2, v); } + set guardian($1.GuardianResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasGuardian() => $_has(1); @$pb.TagNumber(2) void clearGuardian() => clearField(2); @$pb.TagNumber(2) - $1.Guardian ensureGuardian() => $_ensure(1); + $1.GuardianResponse ensureGuardian() => $_ensure(1); + + @$pb.TagNumber(3) + $1.NurseryReponse get nursery => $_getN(2); + @$pb.TagNumber(3) + set nursery($1.NurseryReponse v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasNursery() => $_has(2); + @$pb.TagNumber(3) + void clearNursery() => clearField(3); + @$pb.TagNumber(3) + $1.NurseryReponse ensureNursery() => $_ensure(2); } class GuardianServiceApi { diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbjson.dart index 1ad2b1cc..76332fb3 100644 --- a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbjson.dart +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -22,28 +22,30 @@ const GuardianLoginRequest$json = { '2': [ {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'}, {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'}, - {'1': 'guardian_id', '3': 3, '4': 1, '5': 9, '10': 'guardianId'}, ], }; /// Descriptor for `GuardianLoginRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List guardianLoginRequestDescriptor = $convert.base64Decode( 'ChRHdWFyZGlhbkxvZ2luUmVxdWVzdBIUCgVlbWFpbBgBIAEoCVIFZW1haWwSGgoIcGFzc3dvcm' - 'QYAiABKAlSCHBhc3N3b3JkEh8KC2d1YXJkaWFuX2lkGAMgASgJUgpndWFyZGlhbklk'); + 'QYAiABKAlSCHBhc3N3b3Jk'); @$core.Deprecated('Use guardianLoginResponseDescriptor instead') const GuardianLoginResponse$json = { '1': 'GuardianLoginResponse', '2': [ {'1': 'success', '3': 1, '4': 1, '5': 8, '10': 'success'}, - {'1': 'guardian', '3': 2, '4': 1, '5': 11, '6': '.where_child_bus.v1.Guardian', '10': 'guardian'}, + {'1': 'guardian', '3': 2, '4': 1, '5': 11, '6': '.where_child_bus.v1.GuardianResponse', '10': 'guardian'}, + {'1': 'nursery', '3': 3, '4': 1, '5': 11, '6': '.where_child_bus.v1.NurseryReponse', '10': 'nursery'}, ], }; /// Descriptor for `GuardianLoginResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List guardianLoginResponseDescriptor = $convert.base64Decode( - 'ChVHdWFyZGlhbkxvZ2luUmVzcG9uc2USGAoHc3VjY2VzcxgBIAEoCFIHc3VjY2VzcxI4CghndW' - 'FyZGlhbhgCIAEoCzIcLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhblIIZ3VhcmRpYW4='); + 'ChVHdWFyZGlhbkxvZ2luUmVzcG9uc2USGAoHc3VjY2VzcxgBIAEoCFIHc3VjY2VzcxJACghndW' + 'FyZGlhbhgCIAEoCzIkLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhblJlc3BvbnNlUghndWFy' + 'ZGlhbhI8CgdudXJzZXJ5GAMgASgLMiIud2hlcmVfY2hpbGRfYnVzLnYxLk51cnNlcnlSZXBvbn' + 'NlUgdudXJzZXJ5'); const $core.Map<$core.String, $core.dynamic> GuardianServiceBase$json = { '1': 'GuardianService', @@ -56,8 +58,9 @@ const $core.Map<$core.String, $core.dynamic> GuardianServiceBase$json = { const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> GuardianServiceBase$messageJson = { '.where_child_bus.v1.GuardianLoginRequest': GuardianLoginRequest$json, '.where_child_bus.v1.GuardianLoginResponse': GuardianLoginResponse$json, - '.where_child_bus.v1.Guardian': $1.Guardian$json, + '.where_child_bus.v1.GuardianResponse': $1.GuardianResponse$json, '.google.protobuf.Timestamp': $0.Timestamp$json, + '.where_child_bus.v1.NurseryReponse': $1.NurseryReponse$json, }; /// Descriptor for `GuardianService`. Decode as a `google.protobuf.ServiceDescriptorProto`. diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart index f43f0875..8ddbc3d8 100644 --- a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart @@ -184,6 +184,145 @@ class Nursery extends $pb.GeneratedMessage { $0.Timestamp ensureUpdatedAt() => $_ensure(8); } +class NurseryReponse extends $pb.GeneratedMessage { + factory NurseryReponse({ + $core.String? id, + $core.String? nurseryId, + $core.String? name, + $core.String? email, + $core.String? phoneNumber, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (name != null) { + $result.name = name; + } + if (email != null) { + $result.email = email; + } + if (phoneNumber != null) { + $result.phoneNumber = phoneNumber; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + NurseryReponse._() : super(); + factory NurseryReponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory NurseryReponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryReponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'nurseryId') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..aOS(4, _omitFieldNames ? '' : 'email') + ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') + ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + NurseryReponse clone() => NurseryReponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + NurseryReponse copyWith(void Function(NurseryReponse) updates) => super.copyWith((message) => updates(message as NurseryReponse)) as NurseryReponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static NurseryReponse create() => NurseryReponse._(); + NurseryReponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static NurseryReponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static NurseryReponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get nurseryId => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryId() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $core.String get email => $_getSZ(3); + @$pb.TagNumber(4) + set email($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasEmail() => $_has(3); + @$pb.TagNumber(4) + void clearEmail() => clearField(4); + + @$pb.TagNumber(5) + $core.String get phoneNumber => $_getSZ(4); + @$pb.TagNumber(5) + set phoneNumber($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPhoneNumber() => $_has(4); + @$pb.TagNumber(5) + void clearPhoneNumber() => clearField(5); + + /// ハッシュ化されたパスワードは除外 + @$pb.TagNumber(6) + $0.Timestamp get createdAt => $_getN(5); + @$pb.TagNumber(6) + set createdAt($0.Timestamp v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasCreatedAt() => $_has(5); + @$pb.TagNumber(6) + void clearCreatedAt() => clearField(6); + @$pb.TagNumber(6) + $0.Timestamp ensureCreatedAt() => $_ensure(5); + + @$pb.TagNumber(7) + $0.Timestamp get updatedAt => $_getN(6); + @$pb.TagNumber(7) + set updatedAt($0.Timestamp v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasUpdatedAt() => $_has(6); + @$pb.TagNumber(7) + void clearUpdatedAt() => clearField(7); + @$pb.TagNumber(7) + $0.Timestamp ensureUpdatedAt() => $_ensure(6); +} + class Guardian extends $pb.GeneratedMessage { factory Guardian({ $core.String? id, @@ -336,6 +475,145 @@ class Guardian extends $pb.GeneratedMessage { $0.Timestamp ensureUpdatedAt() => $_ensure(7); } +class GuardianResponse extends $pb.GeneratedMessage { + factory GuardianResponse({ + $core.String? id, + $core.String? nurseryId, + $core.String? name, + $core.String? email, + $core.String? phoneNumber, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (name != null) { + $result.name = name; + } + if (email != null) { + $result.email = email; + } + if (phoneNumber != null) { + $result.phoneNumber = phoneNumber; + } + if (createdAt != null) { + $result.createdAt = createdAt; + } + if (updatedAt != null) { + $result.updatedAt = updatedAt; + } + return $result; + } + GuardianResponse._() : super(); + factory GuardianResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GuardianResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'nurseryId') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..aOS(4, _omitFieldNames ? '' : 'email') + ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') + ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GuardianResponse clone() => GuardianResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GuardianResponse copyWith(void Function(GuardianResponse) updates) => super.copyWith((message) => updates(message as GuardianResponse)) as GuardianResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GuardianResponse create() => GuardianResponse._(); + GuardianResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GuardianResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GuardianResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get nurseryId => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryId() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $core.String get email => $_getSZ(3); + @$pb.TagNumber(4) + set email($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasEmail() => $_has(3); + @$pb.TagNumber(4) + void clearEmail() => clearField(4); + + @$pb.TagNumber(5) + $core.String get phoneNumber => $_getSZ(4); + @$pb.TagNumber(5) + set phoneNumber($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPhoneNumber() => $_has(4); + @$pb.TagNumber(5) + void clearPhoneNumber() => clearField(5); + + /// ハッシュ化されたパスワードは除外 + @$pb.TagNumber(6) + $0.Timestamp get createdAt => $_getN(5); + @$pb.TagNumber(6) + set createdAt($0.Timestamp v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasCreatedAt() => $_has(5); + @$pb.TagNumber(6) + void clearCreatedAt() => clearField(6); + @$pb.TagNumber(6) + $0.Timestamp ensureCreatedAt() => $_ensure(5); + + @$pb.TagNumber(7) + $0.Timestamp get updatedAt => $_getN(6); + @$pb.TagNumber(7) + set updatedAt($0.Timestamp v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasUpdatedAt() => $_has(6); + @$pb.TagNumber(7) + void clearUpdatedAt() => clearField(7); + @$pb.TagNumber(7) + $0.Timestamp ensureUpdatedAt() => $_ensure(6); +} + class Bus extends $pb.GeneratedMessage { factory Bus({ $core.String? id, diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbjson.dart index 69b8e623..3049994d 100644 --- a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -38,6 +38,28 @@ final $typed_data.Uint8List nurseryDescriptor = $convert.base64Decode( 'YXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYX' 'RlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); +@$core.Deprecated('Use nurseryReponseDescriptor instead') +const NurseryReponse$json = { + '1': 'NurseryReponse', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'email', '3': 4, '4': 1, '5': 9, '10': 'email'}, + {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, + {'1': 'created_at', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], +}; + +/// Descriptor for `NurseryReponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List nurseryReponseDescriptor = $convert.base64Decode( + 'Cg5OdXJzZXJ5UmVwb25zZRIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbn' + 'Vyc2VyeUlkEhIKBG5hbWUYAyABKAlSBG5hbWUSFAoFZW1haWwYBCABKAlSBWVtYWlsEiEKDHBo' + 'b25lX251bWJlchgFIAEoCVILcGhvbmVOdW1iZXISOQoKY3JlYXRlZF9hdBgGIAEoCzIaLmdvb2' + 'dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRhdGVkX2F0GAcgASgLMhou' + 'Z29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); + @$core.Deprecated('Use guardianDescriptor instead') const Guardian$json = { '1': 'Guardian', @@ -62,6 +84,28 @@ final $typed_data.Uint8List guardianDescriptor = $convert.base64Decode( 'bWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idW' 'YuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); +@$core.Deprecated('Use guardianResponseDescriptor instead') +const GuardianResponse$json = { + '1': 'GuardianResponse', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'email', '3': 4, '4': 1, '5': 9, '10': 'email'}, + {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, + {'1': 'created_at', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + ], +}; + +/// Descriptor for `GuardianResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List guardianResponseDescriptor = $convert.base64Decode( + 'ChBHdWFyZGlhblJlc3BvbnNlEg4KAmlkGAEgASgJUgJpZBIdCgpudXJzZXJ5X2lkGAIgASgJUg' + 'ludXJzZXJ5SWQSEgoEbmFtZRgDIAEoCVIEbmFtZRIUCgVlbWFpbBgEIAEoCVIFZW1haWwSIQoM' + 'cGhvbmVfbnVtYmVyGAUgASgJUgtwaG9uZU51bWJlchI5CgpjcmVhdGVkX2F0GAYgASgLMhouZ2' + '9vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYByABKAsy' + 'Gi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); + @$core.Deprecated('Use busDescriptor instead') const Bus$json = { '1': 'Bus', diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py index 92bf0ba6..17db0b11 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"i\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\"k\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x38\n\x08guardian\x18\x02 \x01(\x0b\x32\x1c.where_child_bus.v1.GuardianR\x08guardian2w\n\x0fGuardianService\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb1\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12<\n\x07nursery\x18\x03 \x01(\x0b\x32\".where_child_bus.v1.NurseryReponseR\x07nursery2w\n\x0fGuardianService\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,9 +24,9 @@ _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\rGuardianProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' _globals['_GUARDIANLOGINREQUEST']._serialized_start=93 - _globals['_GUARDIANLOGINREQUEST']._serialized_end=198 - _globals['_GUARDIANLOGINRESPONSE']._serialized_start=200 - _globals['_GUARDIANLOGINRESPONSE']._serialized_end=307 - _globals['_GUARDIANSERVICE']._serialized_start=309 - _globals['_GUARDIANSERVICE']._serialized_end=428 + _globals['_GUARDIANLOGINREQUEST']._serialized_end=165 + _globals['_GUARDIANLOGINRESPONSE']._serialized_start=168 + _globals['_GUARDIANLOGINRESPONSE']._serialized_end=345 + _globals['_GUARDIANSERVICE']._serialized_start=347 + _globals['_GUARDIANSERVICE']._serialized_end=466 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index f85361c5..4f13d07e 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb6\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x36\n\x06status\x18\x05 \x01(\x0e\x32\x1e.where_child_bus.v1.Bus.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03\"\xa5\x05\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12/\n\x03sex\x18\x06 \x01(\x0e\x32\x1d.where_child_bus.v1.Child.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMEN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xf4\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12J\n\x08\x62us_type\x18\x04 \x01(\x0e\x32/.where_child_bus.v1.ChildBusAssociation.BusTypeR\x07\x62usType\"O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestampB\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x82\x02\n\x0eNurseryReponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb6\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x36\n\x06status\x18\x05 \x01(\x0e\x32\x1e.where_child_bus.v1.Bus.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03\"\xa5\x05\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12/\n\x03sex\x18\x06 \x01(\x0e\x32\x1d.where_child_bus.v1.Child.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMEN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xf4\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12J\n\x08\x62us_type\x18\x04 \x01(\x0e\x32/.where_child_bus.v1.ChildBusAssociation.BusTypeR\x07\x62usType\"O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestampB\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -25,26 +25,30 @@ _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=420 - _globals['_GUARDIAN']._serialized_start=423 - _globals['_GUARDIAN']._serialized_end=722 - _globals['_BUS']._serialized_start=725 - _globals['_BUS']._serialized_end=1163 - _globals['_BUS_STATUS']._serialized_start=1066 - _globals['_BUS_STATUS']._serialized_end=1163 - _globals['_CHILD']._serialized_start=1166 - _globals['_CHILD']._serialized_end=1843 - _globals['_CHILD_SEX']._serialized_start=1774 - _globals['_CHILD_SEX']._serialized_end=1843 - _globals['_STATION']._serialized_start=1846 - _globals['_STATION']._serialized_end=2154 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2157 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2401 - _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_start=2322 - _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_end=2401 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=2403 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=2480 - _globals['_CHILDPHOTO']._serialized_start=2483 - _globals['_CHILDPHOTO']._serialized_end=2708 - _globals['_BOARDINGRECORD']._serialized_start=2711 - _globals['_BOARDINGRECORD']._serialized_end=2884 + _globals['_NURSERYREPONSE']._serialized_start=423 + _globals['_NURSERYREPONSE']._serialized_end=681 + _globals['_GUARDIAN']._serialized_start=684 + _globals['_GUARDIAN']._serialized_end=983 + _globals['_GUARDIANRESPONSE']._serialized_start=986 + _globals['_GUARDIANRESPONSE']._serialized_end=1246 + _globals['_BUS']._serialized_start=1249 + _globals['_BUS']._serialized_end=1687 + _globals['_BUS_STATUS']._serialized_start=1590 + _globals['_BUS_STATUS']._serialized_end=1687 + _globals['_CHILD']._serialized_start=1690 + _globals['_CHILD']._serialized_end=2367 + _globals['_CHILD_SEX']._serialized_start=2298 + _globals['_CHILD_SEX']._serialized_end=2367 + _globals['_STATION']._serialized_start=2370 + _globals['_STATION']._serialized_end=2678 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2681 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2925 + _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_start=2846 + _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_end=2925 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=2927 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=3004 + _globals['_CHILDPHOTO']._serialized_start=3007 + _globals['_CHILDPHOTO']._serialized_end=3232 + _globals['_BOARDINGRECORD']._serialized_start=3235 + _globals['_BOARDINGRECORD']._serialized_end=3408 # @@protoc_insertion_point(module_scope) From dd0e486b6a68014d948d74042f9023fbf3bc8cfa Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 15:22:51 +0900 Subject: [PATCH 087/771] =?UTF-8?q?feat:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E5=86=85=E3=81=AB=E7=94=BB=E5=83=8F=E3=81=A8=E6=B0=8F?= =?UTF-8?q?=E5=90=8D=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_list_page.dart | 81 +++++++++++-------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index def5f59a..4ec4afde 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -8,30 +8,30 @@ class StudentListPage extends StatefulWidget { } class _StudentListPageState extends State { + final List name = [ + "園児1", + "園児2", + "園児3", + "園児4", + "園児5", + ]; + final List group = [ + "1組", + "2組", + "3組", + "4組", + "5組", + ]; + final List image = [ + "1", + "2", + "1", + "1", + "2", + ]; + @override Widget build(BuildContext context) { - final List name = [ - "園児1", - "園児2", - "園児3", - "園児4", - "園児5", - ]; - final List group = [ - "1組", - "2組", - "3組", - "4組", - "5組", - ]; - final List image = [ - "1", - "2", - "1", - "1", - "2", - ]; - var screenSize = MediaQuery.of(context).size; return ListView.separated( @@ -47,36 +47,37 @@ class _StudentListPageState extends State { widthFactor: 0.8, child: InkWell( onTap: () { - showBottomSheet(context); + showBottomSheet(context, index); }, child: Card( color: Colors.white, child: Padding( padding: const EdgeInsets.all(20.0), child: Row(children: [ - childImage(image[index]), + childImage(index), SizedBox( width: screenSize.width * 0.05, ), - nameAndGroup(name[index], group[index], screenSize), + nameAndGroup(index), ]))))); }); } - Widget childImage(String image) { + Widget childImage(int index) { return SizedBox( width: 100, height: 100, - child: Image.asset("assets/images/face_${image}.png")); + child: Image.asset("assets/images/face_${image[index]}.png")); } - Widget nameAndGroup(String name, String group, Size size) { + Widget nameAndGroup(int index) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(name, style: TextStyle(color: Colors.black, fontSize: 24)), + Text(name[index], + style: TextStyle(color: Colors.black, fontSize: 24)), Text( - group, + group[index], style: TextStyle(color: Colors.black), ), place(), @@ -90,13 +91,29 @@ class _StudentListPageState extends State { ]); } - void showBottomSheet(BuildContext context) { + void showBottomSheet(BuildContext context, int index) { showModalBottomSheet( context: context, builder: (BuildContext context) { return Container( + padding: const EdgeInsets.only( + top: 50.0, + right: 30.0, + bottom: 30.0, + left: 30.0, + ), height: 1000, - child: Center(child: Text("園児詳細情報")), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + childImage(index), + SizedBox( + width: 50, + ), + Text(name[index], + style: TextStyle(color: Colors.black, fontSize: 24)), + ]), ); }); } From fd44a7012df34020643189e347745759ee860e93 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 16:03:33 +0900 Subject: [PATCH 088/771] =?UTF-8?q?feat:=E8=A9=B3=E7=B4=B0=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_list_page.dart | 40 ++++++++++++------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 4ec4afde..b3907e6b 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -96,25 +96,35 @@ class _StudentListPageState extends State { context: context, builder: (BuildContext context) { return Container( - padding: const EdgeInsets.only( - top: 50.0, - right: 30.0, - bottom: 30.0, - left: 30.0, - ), - height: 1000, - child: Row( + padding: const EdgeInsets.only( + top: 50.0, + right: 30.0, + bottom: 30.0, + left: 30.0, + ), + height: 1000, + child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - childImage(index), - SizedBox( - width: 50, + Row(children: [ + childImage(index), + SizedBox( + width: 50, + ), + Text(name[index], + style: TextStyle(color: Colors.black, fontSize: 24)), + ]), + Container( + margin: EdgeInsets.only(top: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [Text("利用コース: "), Text("乗降場所: ")], + ), ), - Text(name[index], - style: TextStyle(color: Colors.black, fontSize: 24)), - ]), - ); + ], + )); }); } } From 537670d60ebed85be8be025204e80504076ca38a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 16:11:09 +0900 Subject: [PATCH 089/771] =?UTF-8?q?feat:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E3=81=AB=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E3=81=A8?= =?UTF-8?q?=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 99 ++++++++++++++++++- 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index b339286d..f0557fa2 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; class BottomSheetWidget extends StatelessWidget { + final busStations = ["station1", "station2", "station3","station4","station5","station6",]; + @override Widget build(BuildContext context) { return Container( @@ -12,8 +14,101 @@ class BottomSheetWidget extends StatelessWidget { topRight: Radius.circular(10), ), ), - child: const Center( - child: Text("ルート詳細情報"), + child: Center( + child: Column( + children: [ + titleText(), + header("test", "test"), + boardingConfirmButton(context), + ], + ) + ), + ); + } + + Widget titleText() { + return const Text( + "ルート詳細情報", + style: TextStyle( + fontSize: 30 + ), + ); + } + + Widget header(String busCourseName, String busOperatorName) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + busThumbnail(), + courseAndOperator(busCourseName, busOperatorName), + ], + ), + ); + } + + Widget courseAndOperator(String courseName, String operatorName) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 50), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + courseNameText(courseName), + operatorNameText(operatorName), + ], + ), + ); + } + + Widget courseNameText(String name) { + return Padding( + padding: const EdgeInsets.only(bottom: 10), + child: Text( + name, + style: const TextStyle( + fontSize: 30, + ), + ), + ); + } + + Widget operatorNameText(String name) { + return Text( + "担当:$name", + ); + } + + Widget busThumbnail() { + return const SizedBox( + width: 100, + height: 100, + child: Card( + child: Text( + "ここにサムネイル", + ), + ), + ); + } + + Widget boardingConfirmButton(BuildContext context) { + const double fontSize = 20; + + return SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + height: fontSize * 2, + child: ElevatedButton( + onPressed: () {}, + style: ElevatedButton.styleFrom( + backgroundColor: Colors.black, + ), + child: const Text( + "乗客状況", + style: TextStyle( + color: Colors.white, + fontSize: fontSize, + ), + ), ), ); } From 9d8c3fd3a1e3fd70e7f56ff2d36a0c23669d44d2 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 16:39:20 +0900 Subject: [PATCH 090/771] =?UTF-8?q?feat:=E5=81=9C=E7=95=99=E6=89=80?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 37 +++++++++++++++---- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index f0557fa2..ff5cf0f0 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -17,8 +17,8 @@ class BottomSheetWidget extends StatelessWidget { child: Center( child: Column( children: [ - titleText(), - header("test", "test"), + // titleText(), + header("tesaaaaaaaaaaaaaaaaaaaaaaaaaa", "test"), boardingConfirmButton(context), ], ) @@ -37,7 +37,7 @@ class BottomSheetWidget extends StatelessWidget { Widget header(String busCourseName, String busOperatorName) { return Padding( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.fromLTRB(0, 50, 0, 10), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -48,9 +48,23 @@ class BottomSheetWidget extends StatelessWidget { ); } + + + //将来的にはStationのListを参照 + Widget stationsListBuilder(BuildContext context, busStationsList) { + String viewText = ""; + for (var station in busStationsList) { + viewText += station + "\n"; + } + return Text( + viewText, + + ); + } + Widget courseAndOperator(String courseName, String operatorName) { return Padding( - padding: const EdgeInsets.symmetric(horizontal: 50), + padding: const EdgeInsets.only(left:50), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -64,10 +78,14 @@ class BottomSheetWidget extends StatelessWidget { Widget courseNameText(String name) { return Padding( padding: const EdgeInsets.only(bottom: 10), - child: Text( - name, - style: const TextStyle( - fontSize: 30, + child: Container( + constraints: const BoxConstraints(maxWidth: 150), + child: Text( + name, + overflow: TextOverflow.ellipsis, + style: const TextStyle( + fontSize: 30, + ), ), ), ); @@ -76,6 +94,9 @@ class BottomSheetWidget extends StatelessWidget { Widget operatorNameText(String name) { return Text( "担当:$name", + style: const TextStyle( + color: Colors.grey, + ) ); } From 4fc69db92ff5200d056bef333beaeb1299ecdb24 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 16:48:49 +0900 Subject: [PATCH 091/771] =?UTF-8?q?chore(proto):=20dart=E3=81=AEproto?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=85=88=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/proto/buf.gen.yaml | 2 +- .../proto-gen/where_child_bus/v1/bus.pb.dart | 0 .../where_child_bus/v1/bus.pbenum.dart | 0 .../where_child_bus/v1/bus.pbjson.dart | 0 .../where_child_bus/v1/bus.pbserver.dart | 0 .../where_child_bus/v1/child.pb.dart | 0 .../where_child_bus/v1/child.pbenum.dart | 0 .../where_child_bus/v1/child.pbjson.dart | 0 .../where_child_bus/v1/child.pbserver.dart | 0 .../where_child_bus/v1/guardian.pb.dart | 0 .../where_child_bus/v1/guardian.pbenum.dart | 0 .../where_child_bus/v1/guardian.pbjson.dart | 0 .../where_child_bus/v1/guardian.pbserver.dart | 0 .../where_child_bus/v1/health_check.pb.dart | 0 .../v1/health_check.pbenum.dart | 0 .../v1/health_check.pbjson.dart | 0 .../v1/health_check.pbserver.dart | 0 .../where_child_bus/v1/nursery.pb.dart | 0 .../where_child_bus/v1/nursery.pbenum.dart | 0 .../where_child_bus/v1/nursery.pbjson.dart | 0 .../where_child_bus/v1/nursery.pbserver.dart | 0 .../where_child_bus/v1/resources.pb.dart | 0 .../where_child_bus/v1/resources.pbenum.dart | 0 .../where_child_bus/v1/resources.pbjson.dart | 0 .../v1/resources.pbserver.dart | 0 .../where_child_bus/health_check.pb.dart | 128 -- .../where_child_bus/health_check.pbenum.dart | 11 - .../where_child_bus/health_check.pbjson.dart | 57 - .../health_check.pbserver.dart | 43 - .../where_child_bus/resources.pb.dart | 1312 ----------------- .../where_child_bus/resources.pbenum.dart | 66 - .../where_child_bus/resources.pbjson.dart | 257 ---- .../where_child_bus/resources.pbserver.dart | 14 - 33 files changed, 1 insertion(+), 1889 deletions(-) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/bus.pb.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/bus.pbenum.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/bus.pbjson.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/bus.pbserver.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/child.pb.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/child.pbenum.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/child.pbjson.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/child.pbserver.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/guardian.pb.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/guardian.pbenum.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/guardian.pbjson.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/guardian.pbserver.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/health_check.pb.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/health_check.pbenum.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/health_check.pbjson.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/health_check.pbserver.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/nursery.pb.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/nursery.pbenum.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/nursery.pbjson.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/nursery.pbserver.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/resources.pb.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/resources.pbenum.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/resources.pbjson.dart (100%) rename frontend/where_child_bus/{ => lib}/proto-gen/where_child_bus/v1/resources.pbserver.dart (100%) delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbenum.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbserver.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/resources.pb.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/resources.pbenum.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/resources.pbjson.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/resources.pbserver.dart diff --git a/backend/proto/buf.gen.yaml b/backend/proto/buf.gen.yaml index c535e8c7..f1c9595c 100644 --- a/backend/proto/buf.gen.yaml +++ b/backend/proto/buf.gen.yaml @@ -25,4 +25,4 @@ plugins: # Dart用の設定 (クライアント側) - plugin: buf.build/protocolbuffers/dart:v21.1.2 - out: ../../frontend/where_child_bus/proto-gen/ + out: ../../frontend/where_child_bus/lib/proto-gen/ diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pb.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbenum.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbjson.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbserver.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/bus.pbserver.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbserver.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pb.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbenum.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbenum.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbenum.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbjson.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbserver.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/child.pbserver.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbserver.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pb.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbenum.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbjson.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbserver.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/guardian.pbserver.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbserver.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pb.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbenum.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbjson.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbserver.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/health_check.pbserver.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbserver.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pb.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbenum.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbjson.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbserver.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/nursery.pbserver.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbserver.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pb.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbenum.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbjson.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbserver.dart similarity index 100% rename from frontend/where_child_bus/proto-gen/where_child_bus/v1/resources.pbserver.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbserver.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart deleted file mode 100644 index 207685c8..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart +++ /dev/null @@ -1,128 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -class PingRequest extends $pb.GeneratedMessage { - factory PingRequest({ - $core.String? name, - }) { - final $result = create(); - if (name != null) { - $result.name = name; - } - return $result; - } - PingRequest._() : super(); - factory PingRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PingRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'name') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PingRequest clone() => PingRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PingRequest copyWith(void Function(PingRequest) updates) => super.copyWith((message) => updates(message as PingRequest)) as PingRequest; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static PingRequest create() => PingRequest._(); - PingRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PingRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PingRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get name => $_getSZ(0); - @$pb.TagNumber(1) - set name($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasName() => $_has(0); - @$pb.TagNumber(1) - void clearName() => clearField(1); -} - -class PingResponse extends $pb.GeneratedMessage { - factory PingResponse({ - $core.String? message, - }) { - final $result = create(); - if (message != null) { - $result.message = message; - } - return $result; - } - PingResponse._() : super(); - factory PingResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PingResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'message') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PingResponse clone() => PingResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PingResponse copyWith(void Function(PingResponse) updates) => super.copyWith((message) => updates(message as PingResponse)) as PingResponse; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static PingResponse create() => PingResponse._(); - PingResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PingResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PingResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get message => $_getSZ(0); - @$pb.TagNumber(1) - set message($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasMessage() => $_has(0); - @$pb.TagNumber(1) - void clearMessage() => clearField(1); -} - -class HealthcheckServiceApi { - $pb.RpcClient _client; - HealthcheckServiceApi(this._client); - - $async.Future ping($pb.ClientContext? ctx, PingRequest request) => - _client.invoke(ctx, 'HealthcheckService', 'Ping', request, PingResponse()) - ; -} - - -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbenum.dart deleted file mode 100644 index 2f4e39b3..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbenum.dart +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart deleted file mode 100644 index d7362fa5..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart +++ /dev/null @@ -1,57 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:convert' as $convert; -import 'dart:core' as $core; -import 'dart:typed_data' as $typed_data; - -@$core.Deprecated('Use pingRequestDescriptor instead') -const PingRequest$json = { - '1': 'PingRequest', - '2': [ - {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, - ], -}; - -/// Descriptor for `PingRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List pingRequestDescriptor = $convert.base64Decode( - 'CgtQaW5nUmVxdWVzdBISCgRuYW1lGAEgASgJUgRuYW1l'); - -@$core.Deprecated('Use pingResponseDescriptor instead') -const PingResponse$json = { - '1': 'PingResponse', - '2': [ - {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, - ], -}; - -/// Descriptor for `PingResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( - 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); - -const $core.Map<$core.String, $core.dynamic> HealthcheckServiceBase$json = { - '1': 'HealthcheckService', - '2': [ - {'1': 'Ping', '2': '.where_child_bus.PingRequest', '3': '.where_child_bus.PingResponse'}, - ], -}; - -@$core.Deprecated('Use healthcheckServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> HealthcheckServiceBase$messageJson = { - '.where_child_bus.PingRequest': PingRequest$json, - '.where_child_bus.PingResponse': PingResponse$json, -}; - -/// Descriptor for `HealthcheckService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List healthcheckServiceDescriptor = $convert.base64Decode( - 'ChJIZWFsdGhjaGVja1NlcnZpY2USQwoEUGluZxIcLndoZXJlX2NoaWxkX2J1cy5QaW5nUmVxdW' - 'VzdBodLndoZXJlX2NoaWxkX2J1cy5QaW5nUmVzcG9uc2U='); - diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbserver.dart deleted file mode 100644 index b7bd5c58..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbserver.dart +++ /dev/null @@ -1,43 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'health_check.pb.dart' as $0; -import 'health_check.pbjson.dart'; - -export 'health_check.pb.dart'; - -abstract class HealthcheckServiceBase extends $pb.GeneratedService { - $async.Future<$0.PingResponse> ping($pb.ServerContext ctx, $0.PingRequest request); - - $pb.GeneratedMessage createRequest($core.String methodName) { - switch (methodName) { - case 'Ping': return $0.PingRequest(); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { - switch (methodName) { - case 'Ping': return this.ping(ctx, request as $0.PingRequest); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => HealthcheckServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => HealthcheckServiceBase$messageJson; -} - diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pb.dart deleted file mode 100644 index a828da0b..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pb.dart +++ /dev/null @@ -1,1312 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/resources.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import '../google/protobuf/timestamp.pb.dart' as $1; -import 'resources.pbenum.dart'; - -export 'resources.pbenum.dart'; - -class Nursery extends $pb.GeneratedMessage { - factory Nursery({ - $core.String? id, - $core.String? nurseryCode, - $core.String? name, - $core.String? address, - $core.String? phoneNumber, - $core.String? email, - $core.String? encryptedPassword, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, - }) { - final $result = create(); - if (id != null) { - $result.id = id; - } - if (nurseryCode != null) { - $result.nurseryCode = nurseryCode; - } - if (name != null) { - $result.name = name; - } - if (address != null) { - $result.address = address; - } - if (phoneNumber != null) { - $result.phoneNumber = phoneNumber; - } - if (email != null) { - $result.email = email; - } - if (encryptedPassword != null) { - $result.encryptedPassword = encryptedPassword; - } - if (createdAt != null) { - $result.createdAt = createdAt; - } - if (updatedAt != null) { - $result.updatedAt = updatedAt; - } - return $result; - } - Nursery._() : super(); - factory Nursery.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Nursery.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Nursery', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'nurseryCode') - ..aOS(3, _omitFieldNames ? '' : 'name') - ..aOS(4, _omitFieldNames ? '' : 'address') - ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOS(6, _omitFieldNames ? '' : 'email') - ..aOS(7, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Nursery clone() => Nursery()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Nursery copyWith(void Function(Nursery) updates) => super.copyWith((message) => updates(message as Nursery)) as Nursery; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Nursery create() => Nursery._(); - Nursery createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static Nursery getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Nursery? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get nurseryCode => $_getSZ(1); - @$pb.TagNumber(2) - set nurseryCode($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasNurseryCode() => $_has(1); - @$pb.TagNumber(2) - void clearNurseryCode() => clearField(2); - - @$pb.TagNumber(3) - $core.String get name => $_getSZ(2); - @$pb.TagNumber(3) - set name($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasName() => $_has(2); - @$pb.TagNumber(3) - void clearName() => clearField(3); - - @$pb.TagNumber(4) - $core.String get address => $_getSZ(3); - @$pb.TagNumber(4) - set address($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasAddress() => $_has(3); - @$pb.TagNumber(4) - void clearAddress() => clearField(4); - - @$pb.TagNumber(5) - $core.String get phoneNumber => $_getSZ(4); - @$pb.TagNumber(5) - set phoneNumber($core.String v) { $_setString(4, v); } - @$pb.TagNumber(5) - $core.bool hasPhoneNumber() => $_has(4); - @$pb.TagNumber(5) - void clearPhoneNumber() => clearField(5); - - @$pb.TagNumber(6) - $core.String get email => $_getSZ(5); - @$pb.TagNumber(6) - set email($core.String v) { $_setString(5, v); } - @$pb.TagNumber(6) - $core.bool hasEmail() => $_has(5); - @$pb.TagNumber(6) - void clearEmail() => clearField(6); - - @$pb.TagNumber(7) - $core.String get encryptedPassword => $_getSZ(6); - @$pb.TagNumber(7) - set encryptedPassword($core.String v) { $_setString(6, v); } - @$pb.TagNumber(7) - $core.bool hasEncryptedPassword() => $_has(6); - @$pb.TagNumber(7) - void clearEncryptedPassword() => clearField(7); - - @$pb.TagNumber(8) - $1.Timestamp get createdAt => $_getN(7); - @$pb.TagNumber(8) - set createdAt($1.Timestamp v) { setField(8, v); } - @$pb.TagNumber(8) - $core.bool hasCreatedAt() => $_has(7); - @$pb.TagNumber(8) - void clearCreatedAt() => clearField(8); - @$pb.TagNumber(8) - $1.Timestamp ensureCreatedAt() => $_ensure(7); - - @$pb.TagNumber(9) - $1.Timestamp get updatedAt => $_getN(8); - @$pb.TagNumber(9) - set updatedAt($1.Timestamp v) { setField(9, v); } - @$pb.TagNumber(9) - $core.bool hasUpdatedAt() => $_has(8); - @$pb.TagNumber(9) - void clearUpdatedAt() => clearField(9); - @$pb.TagNumber(9) - $1.Timestamp ensureUpdatedAt() => $_ensure(8); -} - -class Guardian extends $pb.GeneratedMessage { - factory Guardian({ - $core.String? id, - $core.String? nurseryId, - $core.String? name, - $core.String? email, - $core.String? phoneNumber, - $core.String? encryptedPassword, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, - }) { - final $result = create(); - if (id != null) { - $result.id = id; - } - if (nurseryId != null) { - $result.nurseryId = nurseryId; - } - if (name != null) { - $result.name = name; - } - if (email != null) { - $result.email = email; - } - if (phoneNumber != null) { - $result.phoneNumber = phoneNumber; - } - if (encryptedPassword != null) { - $result.encryptedPassword = encryptedPassword; - } - if (createdAt != null) { - $result.createdAt = createdAt; - } - if (updatedAt != null) { - $result.updatedAt = updatedAt; - } - return $result; - } - Guardian._() : super(); - factory Guardian.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Guardian.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Guardian', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'nurseryId') - ..aOS(3, _omitFieldNames ? '' : 'name') - ..aOS(4, _omitFieldNames ? '' : 'email') - ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOS(6, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$1.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Guardian clone() => Guardian()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Guardian copyWith(void Function(Guardian) updates) => super.copyWith((message) => updates(message as Guardian)) as Guardian; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Guardian create() => Guardian._(); - Guardian createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static Guardian getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Guardian? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get nurseryId => $_getSZ(1); - @$pb.TagNumber(2) - set nurseryId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasNurseryId() => $_has(1); - @$pb.TagNumber(2) - void clearNurseryId() => clearField(2); - - @$pb.TagNumber(3) - $core.String get name => $_getSZ(2); - @$pb.TagNumber(3) - set name($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasName() => $_has(2); - @$pb.TagNumber(3) - void clearName() => clearField(3); - - @$pb.TagNumber(4) - $core.String get email => $_getSZ(3); - @$pb.TagNumber(4) - set email($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasEmail() => $_has(3); - @$pb.TagNumber(4) - void clearEmail() => clearField(4); - - @$pb.TagNumber(5) - $core.String get phoneNumber => $_getSZ(4); - @$pb.TagNumber(5) - set phoneNumber($core.String v) { $_setString(4, v); } - @$pb.TagNumber(5) - $core.bool hasPhoneNumber() => $_has(4); - @$pb.TagNumber(5) - void clearPhoneNumber() => clearField(5); - - @$pb.TagNumber(6) - $core.String get encryptedPassword => $_getSZ(5); - @$pb.TagNumber(6) - set encryptedPassword($core.String v) { $_setString(5, v); } - @$pb.TagNumber(6) - $core.bool hasEncryptedPassword() => $_has(5); - @$pb.TagNumber(6) - void clearEncryptedPassword() => clearField(6); - - @$pb.TagNumber(7) - $1.Timestamp get createdAt => $_getN(6); - @$pb.TagNumber(7) - set createdAt($1.Timestamp v) { setField(7, v); } - @$pb.TagNumber(7) - $core.bool hasCreatedAt() => $_has(6); - @$pb.TagNumber(7) - void clearCreatedAt() => clearField(7); - @$pb.TagNumber(7) - $1.Timestamp ensureCreatedAt() => $_ensure(6); - - @$pb.TagNumber(8) - $1.Timestamp get updatedAt => $_getN(7); - @$pb.TagNumber(8) - set updatedAt($1.Timestamp v) { setField(8, v); } - @$pb.TagNumber(8) - $core.bool hasUpdatedAt() => $_has(7); - @$pb.TagNumber(8) - void clearUpdatedAt() => clearField(8); - @$pb.TagNumber(8) - $1.Timestamp ensureUpdatedAt() => $_ensure(7); -} - -class bus extends $pb.GeneratedMessage { - factory bus({ - $core.String? id, - $core.String? nurseryId, - $core.String? name, - $core.String? plateNumber, - bus_Status? status, - $core.double? latitude, - $core.double? longitude, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, - }) { - final $result = create(); - if (id != null) { - $result.id = id; - } - if (nurseryId != null) { - $result.nurseryId = nurseryId; - } - if (name != null) { - $result.name = name; - } - if (plateNumber != null) { - $result.plateNumber = plateNumber; - } - if (status != null) { - $result.status = status; - } - if (latitude != null) { - $result.latitude = latitude; - } - if (longitude != null) { - $result.longitude = longitude; - } - if (createdAt != null) { - $result.createdAt = createdAt; - } - if (updatedAt != null) { - $result.updatedAt = updatedAt; - } - return $result; - } - bus._() : super(); - factory bus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory bus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'bus', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'nurseryId') - ..aOS(3, _omitFieldNames ? '' : 'name') - ..aOS(4, _omitFieldNames ? '' : 'plateNumber') - ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: bus_Status.STOPPED, valueOf: bus_Status.valueOf, enumValues: bus_Status.values) - ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) - ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - bus clone() => bus()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - bus copyWith(void Function(bus) updates) => super.copyWith((message) => updates(message as bus)) as bus; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static bus create() => bus._(); - bus createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static bus getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static bus? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get nurseryId => $_getSZ(1); - @$pb.TagNumber(2) - set nurseryId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasNurseryId() => $_has(1); - @$pb.TagNumber(2) - void clearNurseryId() => clearField(2); - - @$pb.TagNumber(3) - $core.String get name => $_getSZ(2); - @$pb.TagNumber(3) - set name($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasName() => $_has(2); - @$pb.TagNumber(3) - void clearName() => clearField(3); - - @$pb.TagNumber(4) - $core.String get plateNumber => $_getSZ(3); - @$pb.TagNumber(4) - set plateNumber($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasPlateNumber() => $_has(3); - @$pb.TagNumber(4) - void clearPlateNumber() => clearField(4); - - @$pb.TagNumber(5) - bus_Status get status => $_getN(4); - @$pb.TagNumber(5) - set status(bus_Status v) { setField(5, v); } - @$pb.TagNumber(5) - $core.bool hasStatus() => $_has(4); - @$pb.TagNumber(5) - void clearStatus() => clearField(5); - - /// 緯度経度 - @$pb.TagNumber(6) - $core.double get latitude => $_getN(5); - @$pb.TagNumber(6) - set latitude($core.double v) { $_setDouble(5, v); } - @$pb.TagNumber(6) - $core.bool hasLatitude() => $_has(5); - @$pb.TagNumber(6) - void clearLatitude() => clearField(6); - - @$pb.TagNumber(7) - $core.double get longitude => $_getN(6); - @$pb.TagNumber(7) - set longitude($core.double v) { $_setDouble(6, v); } - @$pb.TagNumber(7) - $core.bool hasLongitude() => $_has(6); - @$pb.TagNumber(7) - void clearLongitude() => clearField(7); - - @$pb.TagNumber(8) - $1.Timestamp get createdAt => $_getN(7); - @$pb.TagNumber(8) - set createdAt($1.Timestamp v) { setField(8, v); } - @$pb.TagNumber(8) - $core.bool hasCreatedAt() => $_has(7); - @$pb.TagNumber(8) - void clearCreatedAt() => clearField(8); - @$pb.TagNumber(8) - $1.Timestamp ensureCreatedAt() => $_ensure(7); - - @$pb.TagNumber(9) - $1.Timestamp get updatedAt => $_getN(8); - @$pb.TagNumber(9) - set updatedAt($1.Timestamp v) { setField(9, v); } - @$pb.TagNumber(9) - $core.bool hasUpdatedAt() => $_has(8); - @$pb.TagNumber(9) - void clearUpdatedAt() => clearField(9); - @$pb.TagNumber(9) - $1.Timestamp ensureUpdatedAt() => $_ensure(8); -} - -class Child extends $pb.GeneratedMessage { - factory Child({ - $core.String? id, - $core.String? nurseryId, - $core.String? guardianId, - $core.String? name, - $core.int? age, - Child_Sex? sex, - $core.bool? isRideMorningBus, - $core.bool? isRideAfternoonBus, - $core.bool? checkForMissingItems, - $core.bool? hasBag, - $core.bool? hasLunchBox, - $core.bool? hasWaterBottle, - $core.bool? hasUmbrera, - $core.bool? hasOther, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, - }) { - final $result = create(); - if (id != null) { - $result.id = id; - } - if (nurseryId != null) { - $result.nurseryId = nurseryId; - } - if (guardianId != null) { - $result.guardianId = guardianId; - } - if (name != null) { - $result.name = name; - } - if (age != null) { - $result.age = age; - } - if (sex != null) { - $result.sex = sex; - } - if (isRideMorningBus != null) { - $result.isRideMorningBus = isRideMorningBus; - } - if (isRideAfternoonBus != null) { - $result.isRideAfternoonBus = isRideAfternoonBus; - } - if (checkForMissingItems != null) { - $result.checkForMissingItems = checkForMissingItems; - } - if (hasBag != null) { - $result.hasBag = hasBag; - } - if (hasLunchBox != null) { - $result.hasLunchBox = hasLunchBox; - } - if (hasWaterBottle != null) { - $result.hasWaterBottle = hasWaterBottle; - } - if (hasUmbrera != null) { - $result.hasUmbrera = hasUmbrera; - } - if (hasOther != null) { - $result.hasOther = hasOther; - } - if (createdAt != null) { - $result.createdAt = createdAt; - } - if (updatedAt != null) { - $result.updatedAt = updatedAt; - } - return $result; - } - Child._() : super(); - factory Child.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Child.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Child', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'nurseryId') - ..aOS(3, _omitFieldNames ? '' : 'guardianId') - ..aOS(4, _omitFieldNames ? '' : 'name') - ..a<$core.int>(5, _omitFieldNames ? '' : 'age', $pb.PbFieldType.O3) - ..e(6, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: Child_Sex.MAN, valueOf: Child_Sex.valueOf, enumValues: Child_Sex.values) - ..aOB(7, _omitFieldNames ? '' : 'isRideMorningBus') - ..aOB(8, _omitFieldNames ? '' : 'isRideAfternoonBus') - ..aOB(9, _omitFieldNames ? '' : 'checkForMissingItems') - ..aOB(10, _omitFieldNames ? '' : 'hasBag') - ..aOB(11, _omitFieldNames ? '' : 'hasLunchBox') - ..aOB(12, _omitFieldNames ? '' : 'hasWaterBottle') - ..aOB(13, _omitFieldNames ? '' : 'hasUmbrera') - ..aOB(14, _omitFieldNames ? '' : 'hasOther') - ..aOM<$1.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Child clone() => Child()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Child copyWith(void Function(Child) updates) => super.copyWith((message) => updates(message as Child)) as Child; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Child create() => Child._(); - Child createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static Child getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Child? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get nurseryId => $_getSZ(1); - @$pb.TagNumber(2) - set nurseryId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasNurseryId() => $_has(1); - @$pb.TagNumber(2) - void clearNurseryId() => clearField(2); - - @$pb.TagNumber(3) - $core.String get guardianId => $_getSZ(2); - @$pb.TagNumber(3) - set guardianId($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasGuardianId() => $_has(2); - @$pb.TagNumber(3) - void clearGuardianId() => clearField(3); - - @$pb.TagNumber(4) - $core.String get name => $_getSZ(3); - @$pb.TagNumber(4) - set name($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasName() => $_has(3); - @$pb.TagNumber(4) - void clearName() => clearField(4); - - @$pb.TagNumber(5) - $core.int get age => $_getIZ(4); - @$pb.TagNumber(5) - set age($core.int v) { $_setSignedInt32(4, v); } - @$pb.TagNumber(5) - $core.bool hasAge() => $_has(4); - @$pb.TagNumber(5) - void clearAge() => clearField(5); - - @$pb.TagNumber(6) - Child_Sex get sex => $_getN(5); - @$pb.TagNumber(6) - set sex(Child_Sex v) { setField(6, v); } - @$pb.TagNumber(6) - $core.bool hasSex() => $_has(5); - @$pb.TagNumber(6) - void clearSex() => clearField(6); - - @$pb.TagNumber(7) - $core.bool get isRideMorningBus => $_getBF(6); - @$pb.TagNumber(7) - set isRideMorningBus($core.bool v) { $_setBool(6, v); } - @$pb.TagNumber(7) - $core.bool hasIsRideMorningBus() => $_has(6); - @$pb.TagNumber(7) - void clearIsRideMorningBus() => clearField(7); - - @$pb.TagNumber(8) - $core.bool get isRideAfternoonBus => $_getBF(7); - @$pb.TagNumber(8) - set isRideAfternoonBus($core.bool v) { $_setBool(7, v); } - @$pb.TagNumber(8) - $core.bool hasIsRideAfternoonBus() => $_has(7); - @$pb.TagNumber(8) - void clearIsRideAfternoonBus() => clearField(8); - - @$pb.TagNumber(9) - $core.bool get checkForMissingItems => $_getBF(8); - @$pb.TagNumber(9) - set checkForMissingItems($core.bool v) { $_setBool(8, v); } - @$pb.TagNumber(9) - $core.bool hasCheckForMissingItems() => $_has(8); - @$pb.TagNumber(9) - void clearCheckForMissingItems() => clearField(9); - - @$pb.TagNumber(10) - $core.bool get hasBag => $_getBF(9); - @$pb.TagNumber(10) - set hasBag($core.bool v) { $_setBool(9, v); } - @$pb.TagNumber(10) - $core.bool hasHasBag() => $_has(9); - @$pb.TagNumber(10) - void clearHasBag() => clearField(10); - - @$pb.TagNumber(11) - $core.bool get hasLunchBox => $_getBF(10); - @$pb.TagNumber(11) - set hasLunchBox($core.bool v) { $_setBool(10, v); } - @$pb.TagNumber(11) - $core.bool hasHasLunchBox() => $_has(10); - @$pb.TagNumber(11) - void clearHasLunchBox() => clearField(11); - - @$pb.TagNumber(12) - $core.bool get hasWaterBottle => $_getBF(11); - @$pb.TagNumber(12) - set hasWaterBottle($core.bool v) { $_setBool(11, v); } - @$pb.TagNumber(12) - $core.bool hasHasWaterBottle() => $_has(11); - @$pb.TagNumber(12) - void clearHasWaterBottle() => clearField(12); - - @$pb.TagNumber(13) - $core.bool get hasUmbrera => $_getBF(12); - @$pb.TagNumber(13) - set hasUmbrera($core.bool v) { $_setBool(12, v); } - @$pb.TagNumber(13) - $core.bool hasHasUmbrera() => $_has(12); - @$pb.TagNumber(13) - void clearHasUmbrera() => clearField(13); - - @$pb.TagNumber(14) - $core.bool get hasOther => $_getBF(13); - @$pb.TagNumber(14) - set hasOther($core.bool v) { $_setBool(13, v); } - @$pb.TagNumber(14) - $core.bool hasHasOther() => $_has(13); - @$pb.TagNumber(14) - void clearHasOther() => clearField(14); - - @$pb.TagNumber(15) - $1.Timestamp get createdAt => $_getN(14); - @$pb.TagNumber(15) - set createdAt($1.Timestamp v) { setField(15, v); } - @$pb.TagNumber(15) - $core.bool hasCreatedAt() => $_has(14); - @$pb.TagNumber(15) - void clearCreatedAt() => clearField(15); - @$pb.TagNumber(15) - $1.Timestamp ensureCreatedAt() => $_ensure(14); - - @$pb.TagNumber(16) - $1.Timestamp get updatedAt => $_getN(15); - @$pb.TagNumber(16) - set updatedAt($1.Timestamp v) { setField(16, v); } - @$pb.TagNumber(16) - $core.bool hasUpdatedAt() => $_has(15); - @$pb.TagNumber(16) - void clearUpdatedAt() => clearField(16); - @$pb.TagNumber(16) - $1.Timestamp ensureUpdatedAt() => $_ensure(15); -} - -class Station extends $pb.GeneratedMessage { - factory Station({ - $core.String? id, - $core.String? guardianId, - $core.double? latitude, - $core.double? longitude, - $core.int? morningOrder, - $core.int? afternoonOrder, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, - }) { - final $result = create(); - if (id != null) { - $result.id = id; - } - if (guardianId != null) { - $result.guardianId = guardianId; - } - if (latitude != null) { - $result.latitude = latitude; - } - if (longitude != null) { - $result.longitude = longitude; - } - if (morningOrder != null) { - $result.morningOrder = morningOrder; - } - if (afternoonOrder != null) { - $result.afternoonOrder = afternoonOrder; - } - if (createdAt != null) { - $result.createdAt = createdAt; - } - if (updatedAt != null) { - $result.updatedAt = updatedAt; - } - return $result; - } - Station._() : super(); - factory Station.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Station.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Station', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'guardianId') - ..a<$core.double>(3, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) - ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..a<$core.int>(5, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) - ..a<$core.int>(6, _omitFieldNames ? '' : 'afternoonOrder', $pb.PbFieldType.O3) - ..aOM<$1.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Station clone() => Station()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Station copyWith(void Function(Station) updates) => super.copyWith((message) => updates(message as Station)) as Station; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Station create() => Station._(); - Station createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static Station getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Station? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get guardianId => $_getSZ(1); - @$pb.TagNumber(2) - set guardianId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasGuardianId() => $_has(1); - @$pb.TagNumber(2) - void clearGuardianId() => clearField(2); - - @$pb.TagNumber(3) - $core.double get latitude => $_getN(2); - @$pb.TagNumber(3) - set latitude($core.double v) { $_setDouble(2, v); } - @$pb.TagNumber(3) - $core.bool hasLatitude() => $_has(2); - @$pb.TagNumber(3) - void clearLatitude() => clearField(3); - - @$pb.TagNumber(4) - $core.double get longitude => $_getN(3); - @$pb.TagNumber(4) - set longitude($core.double v) { $_setDouble(3, v); } - @$pb.TagNumber(4) - $core.bool hasLongitude() => $_has(3); - @$pb.TagNumber(4) - void clearLongitude() => clearField(4); - - @$pb.TagNumber(5) - $core.int get morningOrder => $_getIZ(4); - @$pb.TagNumber(5) - set morningOrder($core.int v) { $_setSignedInt32(4, v); } - @$pb.TagNumber(5) - $core.bool hasMorningOrder() => $_has(4); - @$pb.TagNumber(5) - void clearMorningOrder() => clearField(5); - - @$pb.TagNumber(6) - $core.int get afternoonOrder => $_getIZ(5); - @$pb.TagNumber(6) - set afternoonOrder($core.int v) { $_setSignedInt32(5, v); } - @$pb.TagNumber(6) - $core.bool hasAfternoonOrder() => $_has(5); - @$pb.TagNumber(6) - void clearAfternoonOrder() => clearField(6); - - @$pb.TagNumber(7) - $1.Timestamp get createdAt => $_getN(6); - @$pb.TagNumber(7) - set createdAt($1.Timestamp v) { setField(7, v); } - @$pb.TagNumber(7) - $core.bool hasCreatedAt() => $_has(6); - @$pb.TagNumber(7) - void clearCreatedAt() => clearField(7); - @$pb.TagNumber(7) - $1.Timestamp ensureCreatedAt() => $_ensure(6); - - @$pb.TagNumber(8) - $1.Timestamp get updatedAt => $_getN(7); - @$pb.TagNumber(8) - set updatedAt($1.Timestamp v) { setField(8, v); } - @$pb.TagNumber(8) - $core.bool hasUpdatedAt() => $_has(7); - @$pb.TagNumber(8) - void clearUpdatedAt() => clearField(8); - @$pb.TagNumber(8) - $1.Timestamp ensureUpdatedAt() => $_ensure(7); -} - -class ChildBusAssociation extends $pb.GeneratedMessage { - factory ChildBusAssociation({ - $core.String? id, - $core.String? busId, - $core.String? childId, - ChildBusAssociation_BusType? busType, - }) { - final $result = create(); - if (id != null) { - $result.id = id; - } - if (busId != null) { - $result.busId = busId; - } - if (childId != null) { - $result.childId = childId; - } - if (busType != null) { - $result.busType = busType; - } - return $result; - } - ChildBusAssociation._() : super(); - factory ChildBusAssociation.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory ChildBusAssociation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildBusAssociation', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'busId') - ..aOS(3, _omitFieldNames ? '' : 'childId') - ..e(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: ChildBusAssociation_BusType.MORNING, valueOf: ChildBusAssociation_BusType.valueOf, enumValues: ChildBusAssociation_BusType.values) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ChildBusAssociation clone() => ChildBusAssociation()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ChildBusAssociation copyWith(void Function(ChildBusAssociation) updates) => super.copyWith((message) => updates(message as ChildBusAssociation)) as ChildBusAssociation; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ChildBusAssociation create() => ChildBusAssociation._(); - ChildBusAssociation createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static ChildBusAssociation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static ChildBusAssociation? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get busId => $_getSZ(1); - @$pb.TagNumber(2) - set busId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasBusId() => $_has(1); - @$pb.TagNumber(2) - void clearBusId() => clearField(2); - - @$pb.TagNumber(3) - $core.String get childId => $_getSZ(2); - @$pb.TagNumber(3) - set childId($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasChildId() => $_has(2); - @$pb.TagNumber(3) - void clearChildId() => clearField(3); - - @$pb.TagNumber(4) - ChildBusAssociation_BusType get busType => $_getN(3); - @$pb.TagNumber(4) - set busType(ChildBusAssociation_BusType v) { setField(4, v); } - @$pb.TagNumber(4) - $core.bool hasBusType() => $_has(3); - @$pb.TagNumber(4) - void clearBusType() => clearField(4); -} - -class BusStationAssociation extends $pb.GeneratedMessage { - factory BusStationAssociation({ - $core.String? busId, - $core.String? stationId, - }) { - final $result = create(); - if (busId != null) { - $result.busId = busId; - } - if (stationId != null) { - $result.stationId = stationId; - } - return $result; - } - BusStationAssociation._() : super(); - factory BusStationAssociation.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory BusStationAssociation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BusStationAssociation', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'busId') - ..aOS(2, _omitFieldNames ? '' : 'stationId') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - BusStationAssociation clone() => BusStationAssociation()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - BusStationAssociation copyWith(void Function(BusStationAssociation) updates) => super.copyWith((message) => updates(message as BusStationAssociation)) as BusStationAssociation; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static BusStationAssociation create() => BusStationAssociation._(); - BusStationAssociation createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static BusStationAssociation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static BusStationAssociation? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get busId => $_getSZ(0); - @$pb.TagNumber(1) - set busId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasBusId() => $_has(0); - @$pb.TagNumber(1) - void clearBusId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get stationId => $_getSZ(1); - @$pb.TagNumber(2) - set stationId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasStationId() => $_has(1); - @$pb.TagNumber(2) - void clearStationId() => clearField(2); -} - -class ChildPhoto extends $pb.GeneratedMessage { - factory ChildPhoto({ - $core.String? id, - $core.String? childId, - $core.String? s3Bucket, - $core.String? s3Key, - $1.Timestamp? createdAt, - $1.Timestamp? updatedAt, - }) { - final $result = create(); - if (id != null) { - $result.id = id; - } - if (childId != null) { - $result.childId = childId; - } - if (s3Bucket != null) { - $result.s3Bucket = s3Bucket; - } - if (s3Key != null) { - $result.s3Key = s3Key; - } - if (createdAt != null) { - $result.createdAt = createdAt; - } - if (updatedAt != null) { - $result.updatedAt = updatedAt; - } - return $result; - } - ChildPhoto._() : super(); - factory ChildPhoto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory ChildPhoto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildPhoto', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'childId') - ..aOS(3, _omitFieldNames ? '' : 's3Bucket') - ..aOS(4, _omitFieldNames ? '' : 's3Key') - ..aOM<$1.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $1.Timestamp.create) - ..aOM<$1.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $1.Timestamp.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ChildPhoto clone() => ChildPhoto()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ChildPhoto copyWith(void Function(ChildPhoto) updates) => super.copyWith((message) => updates(message as ChildPhoto)) as ChildPhoto; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ChildPhoto create() => ChildPhoto._(); - ChildPhoto createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static ChildPhoto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static ChildPhoto? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get childId => $_getSZ(1); - @$pb.TagNumber(2) - set childId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasChildId() => $_has(1); - @$pb.TagNumber(2) - void clearChildId() => clearField(2); - - @$pb.TagNumber(3) - $core.String get s3Bucket => $_getSZ(2); - @$pb.TagNumber(3) - set s3Bucket($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasS3Bucket() => $_has(2); - @$pb.TagNumber(3) - void clearS3Bucket() => clearField(3); - - @$pb.TagNumber(4) - $core.String get s3Key => $_getSZ(3); - @$pb.TagNumber(4) - set s3Key($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasS3Key() => $_has(3); - @$pb.TagNumber(4) - void clearS3Key() => clearField(4); - - @$pb.TagNumber(5) - $1.Timestamp get createdAt => $_getN(4); - @$pb.TagNumber(5) - set createdAt($1.Timestamp v) { setField(5, v); } - @$pb.TagNumber(5) - $core.bool hasCreatedAt() => $_has(4); - @$pb.TagNumber(5) - void clearCreatedAt() => clearField(5); - @$pb.TagNumber(5) - $1.Timestamp ensureCreatedAt() => $_ensure(4); - - @$pb.TagNumber(6) - $1.Timestamp get updatedAt => $_getN(5); - @$pb.TagNumber(6) - set updatedAt($1.Timestamp v) { setField(6, v); } - @$pb.TagNumber(6) - $core.bool hasUpdatedAt() => $_has(5); - @$pb.TagNumber(6) - void clearUpdatedAt() => clearField(6); - @$pb.TagNumber(6) - $1.Timestamp ensureUpdatedAt() => $_ensure(5); -} - -class BoardingRecord extends $pb.GeneratedMessage { - factory BoardingRecord({ - $core.String? id, - $core.String? childId, - $core.String? busId, - $core.bool? isBoarding, - $1.Timestamp? timestamp, - }) { - final $result = create(); - if (id != null) { - $result.id = id; - } - if (childId != null) { - $result.childId = childId; - } - if (busId != null) { - $result.busId = busId; - } - if (isBoarding != null) { - $result.isBoarding = isBoarding; - } - if (timestamp != null) { - $result.timestamp = timestamp; - } - return $result; - } - BoardingRecord._() : super(); - factory BoardingRecord.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory BoardingRecord.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BoardingRecord', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'childId') - ..aOS(3, _omitFieldNames ? '' : 'busId') - ..aOB(4, _omitFieldNames ? '' : 'isBoarding') - ..aOM<$1.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $1.Timestamp.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - BoardingRecord clone() => BoardingRecord()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - BoardingRecord copyWith(void Function(BoardingRecord) updates) => super.copyWith((message) => updates(message as BoardingRecord)) as BoardingRecord; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static BoardingRecord create() => BoardingRecord._(); - BoardingRecord createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static BoardingRecord getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static BoardingRecord? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get childId => $_getSZ(1); - @$pb.TagNumber(2) - set childId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasChildId() => $_has(1); - @$pb.TagNumber(2) - void clearChildId() => clearField(2); - - @$pb.TagNumber(3) - $core.String get busId => $_getSZ(2); - @$pb.TagNumber(3) - set busId($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasBusId() => $_has(2); - @$pb.TagNumber(3) - void clearBusId() => clearField(3); - - @$pb.TagNumber(4) - $core.bool get isBoarding => $_getBF(3); - @$pb.TagNumber(4) - set isBoarding($core.bool v) { $_setBool(3, v); } - @$pb.TagNumber(4) - $core.bool hasIsBoarding() => $_has(3); - @$pb.TagNumber(4) - void clearIsBoarding() => clearField(4); - - @$pb.TagNumber(5) - $1.Timestamp get timestamp => $_getN(4); - @$pb.TagNumber(5) - set timestamp($1.Timestamp v) { setField(5, v); } - @$pb.TagNumber(5) - $core.bool hasTimestamp() => $_has(4); - @$pb.TagNumber(5) - void clearTimestamp() => clearField(5); - @$pb.TagNumber(5) - $1.Timestamp ensureTimestamp() => $_ensure(4); -} - - -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbenum.dart deleted file mode 100644 index d4093154..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbenum.dart +++ /dev/null @@ -1,66 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/resources.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -class bus_Status extends $pb.ProtobufEnum { - static const bus_Status STOPPED = bus_Status._(0, _omitEnumNames ? '' : 'STOPPED'); - static const bus_Status RUNNING = bus_Status._(1, _omitEnumNames ? '' : 'RUNNING'); - static const bus_Status MAINTEINANCE = bus_Status._(2, _omitEnumNames ? '' : 'MAINTEINANCE'); - - static const $core.List values = [ - STOPPED, - RUNNING, - MAINTEINANCE, - ]; - - static final $core.Map<$core.int, bus_Status> _byValue = $pb.ProtobufEnum.initByValue(values); - static bus_Status? valueOf($core.int value) => _byValue[value]; - - const bus_Status._($core.int v, $core.String n) : super(v, n); -} - -class Child_Sex extends $pb.ProtobufEnum { - static const Child_Sex MAN = Child_Sex._(0, _omitEnumNames ? '' : 'MAN'); - static const Child_Sex WOMEN = Child_Sex._(1, _omitEnumNames ? '' : 'WOMEN'); - static const Child_Sex OTHER = Child_Sex._(2, _omitEnumNames ? '' : 'OTHER'); - - static const $core.List values = [ - MAN, - WOMEN, - OTHER, - ]; - - static final $core.Map<$core.int, Child_Sex> _byValue = $pb.ProtobufEnum.initByValue(values); - static Child_Sex? valueOf($core.int value) => _byValue[value]; - - const Child_Sex._($core.int v, $core.String n) : super(v, n); -} - -class ChildBusAssociation_BusType extends $pb.ProtobufEnum { - static const ChildBusAssociation_BusType MORNING = ChildBusAssociation_BusType._(0, _omitEnumNames ? '' : 'MORNING'); - static const ChildBusAssociation_BusType AFTERNOON = ChildBusAssociation_BusType._(1, _omitEnumNames ? '' : 'AFTERNOON'); - - static const $core.List values = [ - MORNING, - AFTERNOON, - ]; - - static final $core.Map<$core.int, ChildBusAssociation_BusType> _byValue = $pb.ProtobufEnum.initByValue(values); - static ChildBusAssociation_BusType? valueOf($core.int value) => _byValue[value]; - - const ChildBusAssociation_BusType._($core.int v, $core.String n) : super(v, n); -} - - -const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbjson.dart deleted file mode 100644 index 37e513c9..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbjson.dart +++ /dev/null @@ -1,257 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/resources.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:convert' as $convert; -import 'dart:core' as $core; -import 'dart:typed_data' as $typed_data; - -@$core.Deprecated('Use nurseryDescriptor instead') -const Nursery$json = { - '1': 'Nursery', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'nursery_code', '3': 2, '4': 1, '5': 9, '10': 'nurseryCode'}, - {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, - {'1': 'address', '3': 4, '4': 1, '5': 9, '10': 'address'}, - {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, - {'1': 'email', '3': 6, '4': 1, '5': 9, '10': 'email'}, - {'1': 'encrypted_password', '3': 7, '4': 1, '5': 9, '10': 'encryptedPassword'}, - {'1': 'created_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, - ], -}; - -/// Descriptor for `Nursery`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List nurseryDescriptor = $convert.base64Decode( - 'CgdOdXJzZXJ5Eg4KAmlkGAEgASgJUgJpZBIhCgxudXJzZXJ5X2NvZGUYAiABKAlSC251cnNlcn' - 'lDb2RlEhIKBG5hbWUYAyABKAlSBG5hbWUSGAoHYWRkcmVzcxgEIAEoCVIHYWRkcmVzcxIhCgxw' - 'aG9uZV9udW1iZXIYBSABKAlSC3Bob25lTnVtYmVyEhQKBWVtYWlsGAYgASgJUgVlbWFpbBItCh' - 'JlbmNyeXB0ZWRfcGFzc3dvcmQYByABKAlSEWVuY3J5cHRlZFBhc3N3b3JkEjkKCmNyZWF0ZWRf' - 'YXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYX' - 'RlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); - -@$core.Deprecated('Use guardianDescriptor instead') -const Guardian$json = { - '1': 'Guardian', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, - {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, - {'1': 'email', '3': 4, '4': 1, '5': 9, '10': 'email'}, - {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, - {'1': 'encrypted_password', '3': 6, '4': 1, '5': 9, '10': 'encryptedPassword'}, - {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, - ], -}; - -/// Descriptor for `Guardian`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List guardianDescriptor = $convert.base64Decode( - 'CghHdWFyZGlhbhIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbnVyc2VyeU' - 'lkEhIKBG5hbWUYAyABKAlSBG5hbWUSFAoFZW1haWwYBCABKAlSBWVtYWlsEiEKDHBob25lX251' - 'bWJlchgFIAEoCVILcGhvbmVOdW1iZXISLQoSZW5jcnlwdGVkX3Bhc3N3b3JkGAYgASgJUhFlbm' - 'NyeXB0ZWRQYXNzd29yZBI5CgpjcmVhdGVkX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRp' - 'bWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idW' - 'YuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); - -@$core.Deprecated('Use busDescriptor instead') -const bus$json = { - '1': 'bus', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, - {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, - {'1': 'plate_number', '3': 4, '4': 1, '5': 9, '10': 'plateNumber'}, - {'1': 'status', '3': 5, '4': 1, '5': 14, '6': '.where_child_bus.bus.Status', '10': 'status'}, - {'1': 'latitude', '3': 6, '4': 1, '5': 1, '10': 'latitude'}, - {'1': 'longitude', '3': 7, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'created_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, - ], - '4': [bus_Status$json], -}; - -@$core.Deprecated('Use busDescriptor instead') -const bus_Status$json = { - '1': 'Status', - '2': [ - {'1': 'STOPPED', '2': 0}, - {'1': 'RUNNING', '2': 1}, - {'1': 'MAINTEINANCE', '2': 2}, - ], -}; - -/// Descriptor for `bus`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List busDescriptor = $convert.base64Decode( - 'CgNidXMSDgoCaWQYASABKAlSAmlkEh0KCm51cnNlcnlfaWQYAiABKAlSCW51cnNlcnlJZBISCg' - 'RuYW1lGAMgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgEIAEoCVILcGxhdGVOdW1iZXISMwoG' - 'c3RhdHVzGAUgASgOMhsud2hlcmVfY2hpbGRfYnVzLmJ1cy5TdGF0dXNSBnN0YXR1cxIaCghsYX' - 'RpdHVkZRgGIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAcgASgBUglsb25naXR1ZGUSOQoK' - 'Y3JlYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdB' - 'I5Cgp1cGRhdGVkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRl' - 'ZEF0IjQKBlN0YXR1cxILCgdTVE9QUEVEEAASCwoHUlVOTklORxABEhAKDE1BSU5URUlOQU5DRR' - 'AC'); - -@$core.Deprecated('Use childDescriptor instead') -const Child$json = { - '1': 'Child', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, - {'1': 'guardian_id', '3': 3, '4': 1, '5': 9, '10': 'guardianId'}, - {'1': 'name', '3': 4, '4': 1, '5': 9, '10': 'name'}, - {'1': 'age', '3': 5, '4': 1, '5': 5, '10': 'age'}, - {'1': 'sex', '3': 6, '4': 1, '5': 14, '6': '.where_child_bus.Child.Sex', '10': 'sex'}, - {'1': 'is_ride_morning_bus', '3': 7, '4': 1, '5': 8, '10': 'isRideMorningBus'}, - {'1': 'is_ride_afternoon_bus', '3': 8, '4': 1, '5': 8, '10': 'isRideAfternoonBus'}, - {'1': 'check_for_missing_items', '3': 9, '4': 1, '5': 8, '10': 'checkForMissingItems'}, - {'1': 'has_bag', '3': 10, '4': 1, '5': 8, '10': 'hasBag'}, - {'1': 'has_lunch_box', '3': 11, '4': 1, '5': 8, '10': 'hasLunchBox'}, - {'1': 'has_water_bottle', '3': 12, '4': 1, '5': 8, '10': 'hasWaterBottle'}, - {'1': 'has_umbrera', '3': 13, '4': 1, '5': 8, '10': 'hasUmbrera'}, - {'1': 'has_other', '3': 14, '4': 1, '5': 8, '10': 'hasOther'}, - {'1': 'created_at', '3': 15, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 16, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, - ], - '4': [Child_Sex$json], -}; - -@$core.Deprecated('Use childDescriptor instead') -const Child_Sex$json = { - '1': 'Sex', - '2': [ - {'1': 'MAN', '2': 0}, - {'1': 'WOMEN', '2': 1}, - {'1': 'OTHER', '2': 2}, - ], -}; - -/// Descriptor for `Child`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List childDescriptor = $convert.base64Decode( - 'CgVDaGlsZBIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbnVyc2VyeUlkEh' - '8KC2d1YXJkaWFuX2lkGAMgASgJUgpndWFyZGlhbklkEhIKBG5hbWUYBCABKAlSBG5hbWUSEAoD' - 'YWdlGAUgASgFUgNhZ2USLAoDc2V4GAYgASgOMhoud2hlcmVfY2hpbGRfYnVzLkNoaWxkLlNleF' - 'IDc2V4Ei0KE2lzX3JpZGVfbW9ybmluZ19idXMYByABKAhSEGlzUmlkZU1vcm5pbmdCdXMSMQoV' - 'aXNfcmlkZV9hZnRlcm5vb25fYnVzGAggASgIUhJpc1JpZGVBZnRlcm5vb25CdXMSNQoXY2hlY2' - 'tfZm9yX21pc3NpbmdfaXRlbXMYCSABKAhSFGNoZWNrRm9yTWlzc2luZ0l0ZW1zEhcKB2hhc19i' - 'YWcYCiABKAhSBmhhc0JhZxIiCg1oYXNfbHVuY2hfYm94GAsgASgIUgtoYXNMdW5jaEJveBIoCh' - 'BoYXNfd2F0ZXJfYm90dGxlGAwgASgIUg5oYXNXYXRlckJvdHRsZRIfCgtoYXNfdW1icmVyYRgN' - 'IAEoCFIKaGFzVW1icmVyYRIbCgloYXNfb3RoZXIYDiABKAhSCGhhc090aGVyEjkKCmNyZWF0ZW' - 'RfYXQYDyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBk' - 'YXRlZF9hdBgQIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdCIkCg' - 'NTZXgSBwoDTUFOEAASCQoFV09NRU4QARIJCgVPVEhFUhAC'); - -@$core.Deprecated('Use stationDescriptor instead') -const Station$json = { - '1': 'Station', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'guardian_id', '3': 2, '4': 1, '5': 9, '10': 'guardianId'}, - {'1': 'latitude', '3': 3, '4': 1, '5': 1, '10': 'latitude'}, - {'1': 'longitude', '3': 4, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'morning_order', '3': 5, '4': 1, '5': 5, '10': 'morningOrder'}, - {'1': 'afternoon_order', '3': 6, '4': 1, '5': 5, '10': 'afternoonOrder'}, - {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, - ], -}; - -/// Descriptor for `Station`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List stationDescriptor = $convert.base64Decode( - 'CgdTdGF0aW9uEg4KAmlkGAEgASgJUgJpZBIfCgtndWFyZGlhbl9pZBgCIAEoCVIKZ3VhcmRpYW' - '5JZBIaCghsYXRpdHVkZRgDIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAQgASgBUglsb25n' - 'aXR1ZGUSIwoNbW9ybmluZ19vcmRlchgFIAEoBVIMbW9ybmluZ09yZGVyEicKD2FmdGVybm9vbl' - '9vcmRlchgGIAEoBVIOYWZ0ZXJub29uT3JkZXISOQoKY3JlYXRlZF9hdBgHIAEoCzIaLmdvb2ds' - 'ZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRhdGVkX2F0GAggASgLMhouZ2' - '9vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); - -@$core.Deprecated('Use childBusAssociationDescriptor instead') -const ChildBusAssociation$json = { - '1': 'ChildBusAssociation', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'bus_id', '3': 2, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'child_id', '3': 3, '4': 1, '5': 9, '10': 'childId'}, - {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.ChildBusAssociation.BusType', '10': 'busType'}, - ], - '4': [ChildBusAssociation_BusType$json], -}; - -@$core.Deprecated('Use childBusAssociationDescriptor instead') -const ChildBusAssociation_BusType$json = { - '1': 'BusType', - '2': [ - {'1': 'MORNING', '2': 0}, - {'1': 'AFTERNOON', '2': 1}, - ], -}; - -/// Descriptor for `ChildBusAssociation`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List childBusAssociationDescriptor = $convert.base64Decode( - 'ChNDaGlsZEJ1c0Fzc29jaWF0aW9uEg4KAmlkGAEgASgJUgJpZBIVCgZidXNfaWQYAiABKAlSBW' - 'J1c0lkEhkKCGNoaWxkX2lkGAMgASgJUgdjaGlsZElkEkcKCGJ1c190eXBlGAQgASgOMiwud2hl' - 'cmVfY2hpbGRfYnVzLkNoaWxkQnVzQXNzb2NpYXRpb24uQnVzVHlwZVIHYnVzVHlwZSIlCgdCdX' - 'NUeXBlEgsKB01PUk5JTkcQABINCglBRlRFUk5PT04QAQ=='); - -@$core.Deprecated('Use busStationAssociationDescriptor instead') -const BusStationAssociation$json = { - '1': 'BusStationAssociation', - '2': [ - {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'station_id', '3': 2, '4': 1, '5': 9, '10': 'stationId'}, - ], -}; - -/// Descriptor for `BusStationAssociation`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List busStationAssociationDescriptor = $convert.base64Decode( - 'ChVCdXNTdGF0aW9uQXNzb2NpYXRpb24SFQoGYnVzX2lkGAEgASgJUgVidXNJZBIdCgpzdGF0aW' - '9uX2lkGAIgASgJUglzdGF0aW9uSWQ='); - -@$core.Deprecated('Use childPhotoDescriptor instead') -const ChildPhoto$json = { - '1': 'ChildPhoto', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, - {'1': 's3_bucket', '3': 3, '4': 1, '5': 9, '10': 's3Bucket'}, - {'1': 's3_key', '3': 4, '4': 1, '5': 9, '10': 's3Key'}, - {'1': 'created_at', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, - ], -}; - -/// Descriptor for `ChildPhoto`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List childPhotoDescriptor = $convert.base64Decode( - 'CgpDaGlsZFBob3RvEg4KAmlkGAEgASgJUgJpZBIZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZB' - 'IbCglzM19idWNrZXQYAyABKAlSCHMzQnVja2V0EhUKBnMzX2tleRgEIAEoCVIFczNLZXkSOQoK' - 'Y3JlYXRlZF9hdBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdB' - 'I5Cgp1cGRhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRl' - 'ZEF0'); - -@$core.Deprecated('Use boardingRecordDescriptor instead') -const BoardingRecord$json = { - '1': 'BoardingRecord', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, - {'1': 'bus_id', '3': 3, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'is_boarding', '3': 4, '4': 1, '5': 8, '10': 'isBoarding'}, - {'1': 'timestamp', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timestamp'}, - ], -}; - -/// Descriptor for `BoardingRecord`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List boardingRecordDescriptor = $convert.base64Decode( - 'Cg5Cb2FyZGluZ1JlY29yZBIOCgJpZBgBIAEoCVICaWQSGQoIY2hpbGRfaWQYAiABKAlSB2NoaW' - 'xkSWQSFQoGYnVzX2lkGAMgASgJUgVidXNJZBIfCgtpc19ib2FyZGluZxgEIAEoCFIKaXNCb2Fy' - 'ZGluZxI4Cgl0aW1lc3RhbXAYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl0aW' - '1lc3RhbXA='); - diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbserver.dart b/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbserver.dart deleted file mode 100644 index 692ca774..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/resources.pbserver.dart +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/resources.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -export 'resources.pb.dart'; - From bee67db05217aadcef0881ec7962527ca41ea2c4 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 16:50:11 +0900 Subject: [PATCH 092/771] =?UTF-8?q?update:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E3=82=A6=E3=82=A3=E3=83=B3=E3=83=89=E3=82=A6=E3=81=AE?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E8=89=B2=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/student_list_page/student_list_page.dart | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index b3907e6b..8f201e1b 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -103,6 +103,12 @@ class _StudentListPageState extends State { left: 30.0, ), height: 1000, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20.0), + topRight: Radius.circular(20.0)), + ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, @@ -120,7 +126,11 @@ class _StudentListPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, - children: [Text("利用コース: "), Text("乗降場所: ")], + children: [ + Text(group[index]), + Text("利用コース: "), + Text("乗降場所: ") + ], ), ), ], From f1c9626ea8121dff7ecab2948a8dc8e07b20d850 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 16:55:01 +0900 Subject: [PATCH 093/771] =?UTF-8?q?fix:=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E9=85=8D=E7=BD=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => v1}/health_check.pbgrpc.dart | 0 .../lib/util/health_check.dart | 23 +++++++++++++++++++ 2 files changed, 23 insertions(+) rename frontend/where_child_bus/lib/proto-gen/where_child_bus/{ => v1}/health_check.pbgrpc.dart (100%) create mode 100644 frontend/where_child_bus/lib/util/health_check.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/health_check.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/health_check.pbgrpc.dart rename to frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/util/health_check.dart b/frontend/where_child_bus/lib/util/health_check.dart new file mode 100644 index 00000000..d8dc848b --- /dev/null +++ b/frontend/where_child_bus/lib/util/health_check.dart @@ -0,0 +1,23 @@ +import 'dart:async'; +import 'dart:developer' as developer; // エラーログに使用 +import 'package:grpc/grpc.dart'; +import 'package:where_child_bus/generated/where_child_bus/health_check.pbgrpc.dart'; + + +Future createHoge(String dartSideParam1, int dartSideParam2, bool dartSideParam3) async { + final channel = ClientChannel( + 'localhost', + port: 8000, + options: const ChannelOptions(credentials: ChannelCredentials.insecure()), + ); + final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 10))); + + try { + await grpcClient.ping(PingRequest()..name = "HOOOGEEE"); + await channel.shutdown(); + } catch (error) { + developer.log('Caught error: $error'); + await channel.shutdown(); + return Future.error(error); + } +} From a4197d093a6d2f936b28ecd58ab617b534e370bb Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 16:58:26 +0900 Subject: [PATCH 094/771] =?UTF-8?q?chore:dependence=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/pubspec.lock | 112 ++++++++++++++++++++++++++ frontend/where_child_bus/pubspec.yaml | 2 + 2 files changed, 114 insertions(+) diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index e4a8596d..90188c33 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -1,6 +1,22 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" + url: "https://pub.dev" + source: hosted + version: "3.4.10" + args: + dependency: transitive + description: + name: args + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" + source: hosted + version: "2.4.2" async: dependency: transitive description: @@ -41,6 +57,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" cupertino_icons: dependency: "direct main" description: @@ -57,6 +89,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -75,6 +115,54 @@ packages: description: flutter source: sdk version: "0.0.0" + googleapis_auth: + dependency: transitive + description: + name: googleapis_auth + sha256: af7c3a3edf9d0de2e1e0a77e994fae0a581c525fa7012af4fa0d4a52ed9484da + url: "https://pub.dev" + source: hosted + version: "1.4.1" + grpc: + dependency: "direct main" + description: + name: grpc + sha256: e93ee3bce45c134bf44e9728119102358c7cd69de7832d9a874e2e74eb8cab40 + url: "https://pub.dev" + source: hosted + version: "3.2.4" + http: + dependency: transitive + description: + name: http + sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + url: "https://pub.dev" + source: hosted + version: "1.2.0" + http2: + dependency: transitive + description: + name: http2 + sha256: "9ced024a160b77aba8fb8674e38f70875e321d319e6f303ec18e87bd5a4b0c1d" + url: "https://pub.dev" + source: hosted + version: "2.3.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" lints: dependency: transitive description: @@ -115,6 +203,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" + url: "https://pub.dev" + source: hosted + version: "3.7.4" + protobuf: + dependency: "direct main" + description: + name: protobuf + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + url: "https://pub.dev" + source: hosted + version: "3.1.0" sky_engine: dependency: transitive description: flutter @@ -168,6 +272,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" vector_math: dependency: transitive description: diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index cf144972..16a076b0 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -10,6 +10,8 @@ environment: dependencies: flutter: sdk: flutter + grpc: ^3.2.4 + protobuf: ^3.1.0 cupertino_icons: ^1.0.2 From 9bda67527eaab0839445c44b69d95aa9186b2b1d Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 17:01:42 +0900 Subject: [PATCH 095/771] =?UTF-8?q?chore(proto):=20=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E3=81=AA=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/health_check.pbgrpc.dart | 59 ------------------- 1 file changed, 59 deletions(-) delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart deleted file mode 100644 index 7645d6c6..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart +++ /dev/null @@ -1,59 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:grpc/service_api.dart' as $grpc; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'health_check.pb.dart' as $0; - -export 'health_check.pb.dart'; - -@$pb.GrpcServiceName('where_child_bus.HealthcheckService') -class HealthcheckServiceClient extends $grpc.Client { - static final _$ping = $grpc.ClientMethod<$0.PingRequest, $0.PingResponse>( - '/where_child_bus.HealthcheckService/Ping', - ($0.PingRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $0.PingResponse.fromBuffer(value)); - - HealthcheckServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, - interceptors: interceptors); - - $grpc.ResponseFuture<$0.PingResponse> ping($0.PingRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$ping, request, options: options); - } -} - -@$pb.GrpcServiceName('where_child_bus.HealthcheckService') -abstract class HealthcheckServiceBase extends $grpc.Service { - $core.String get $name => 'where_child_bus.HealthcheckService'; - - HealthcheckServiceBase() { - $addMethod($grpc.ServiceMethod<$0.PingRequest, $0.PingResponse>( - 'Ping', - ping_Pre, - false, - false, - ($core.List<$core.int> value) => $0.PingRequest.fromBuffer(value), - ($0.PingResponse value) => value.writeToBuffer())); - } - - $async.Future<$0.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$0.PingRequest> request) async { - return ping(call, await request); - } - - $async.Future<$0.PingResponse> ping($grpc.ServiceCall call, $0.PingRequest request); -} From a2c3a35fe777e70baacfb999456446f332ba9369 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 17:10:29 +0900 Subject: [PATCH 096/771] =?UTF-8?q?chore:=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/health_check.pb.dart | 118 ------------------ .../where_child_bus/health_check.pbenum.dart | 11 -- .../where_child_bus/health_check.pbgrpc.dart | 59 --------- .../where_child_bus/health_check.pbjson.dart | 39 ------ 4 files changed, 227 deletions(-) delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbenum.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbgrpc.dart delete mode 100644 frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart deleted file mode 100644 index f371a7b8..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pb.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -class PingRequest extends $pb.GeneratedMessage { - factory PingRequest({ - $core.String? name, - }) { - final $result = create(); - if (name != null) { - $result.name = name; - } - return $result; - } - PingRequest._() : super(); - factory PingRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PingRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'name') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PingRequest clone() => PingRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PingRequest copyWith(void Function(PingRequest) updates) => super.copyWith((message) => updates(message as PingRequest)) as PingRequest; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static PingRequest create() => PingRequest._(); - PingRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PingRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PingRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get name => $_getSZ(0); - @$pb.TagNumber(1) - set name($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasName() => $_has(0); - @$pb.TagNumber(1) - void clearName() => clearField(1); -} - -class PingResponse extends $pb.GeneratedMessage { - factory PingResponse({ - $core.String? message, - }) { - final $result = create(); - if (message != null) { - $result.message = message; - } - return $result; - } - PingResponse._() : super(); - factory PingResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PingResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'message') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PingResponse clone() => PingResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PingResponse copyWith(void Function(PingResponse) updates) => super.copyWith((message) => updates(message as PingResponse)) as PingResponse; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static PingResponse create() => PingResponse._(); - PingResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PingResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PingResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get message => $_getSZ(0); - @$pb.TagNumber(1) - set message($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasMessage() => $_has(0); - @$pb.TagNumber(1) - void clearMessage() => clearField(1); -} - - -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbenum.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbenum.dart deleted file mode 100644 index 2f4e39b3..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbenum.dart +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbgrpc.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbgrpc.dart deleted file mode 100644 index 7645d6c6..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbgrpc.dart +++ /dev/null @@ -1,59 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:grpc/service_api.dart' as $grpc; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'health_check.pb.dart' as $0; - -export 'health_check.pb.dart'; - -@$pb.GrpcServiceName('where_child_bus.HealthcheckService') -class HealthcheckServiceClient extends $grpc.Client { - static final _$ping = $grpc.ClientMethod<$0.PingRequest, $0.PingResponse>( - '/where_child_bus.HealthcheckService/Ping', - ($0.PingRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $0.PingResponse.fromBuffer(value)); - - HealthcheckServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, - interceptors: interceptors); - - $grpc.ResponseFuture<$0.PingResponse> ping($0.PingRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$ping, request, options: options); - } -} - -@$pb.GrpcServiceName('where_child_bus.HealthcheckService') -abstract class HealthcheckServiceBase extends $grpc.Service { - $core.String get $name => 'where_child_bus.HealthcheckService'; - - HealthcheckServiceBase() { - $addMethod($grpc.ServiceMethod<$0.PingRequest, $0.PingResponse>( - 'Ping', - ping_Pre, - false, - false, - ($core.List<$core.int> value) => $0.PingRequest.fromBuffer(value), - ($0.PingResponse value) => value.writeToBuffer())); - } - - $async.Future<$0.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$0.PingRequest> request) async { - return ping(call, await request); - } - - $async.Future<$0.PingResponse> ping($grpc.ServiceCall call, $0.PingRequest request); -} diff --git a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart b/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart deleted file mode 100644 index a2a8c1aa..00000000 --- a/frontend/where_child_bus/proto-gen/where_child_bus/health_check.pbjson.dart +++ /dev/null @@ -1,39 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:convert' as $convert; -import 'dart:core' as $core; -import 'dart:typed_data' as $typed_data; - -@$core.Deprecated('Use pingRequestDescriptor instead') -const PingRequest$json = { - '1': 'PingRequest', - '2': [ - {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, - ], -}; - -/// Descriptor for `PingRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List pingRequestDescriptor = $convert.base64Decode( - 'CgtQaW5nUmVxdWVzdBISCgRuYW1lGAEgASgJUgRuYW1l'); - -@$core.Deprecated('Use pingResponseDescriptor instead') -const PingResponse$json = { - '1': 'PingResponse', - '2': [ - {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, - ], -}; - -/// Descriptor for `PingResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( - 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); - From d0250b80ee4db1da7d5962128da2ef04d445dfda Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 17:14:45 +0900 Subject: [PATCH 097/771] =?UTF-8?q?chore:=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E7=94=A8=E3=81=AE=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index ff5cf0f0..a001769c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -19,6 +19,7 @@ class BottomSheetWidget extends StatelessWidget { children: [ // titleText(), header("tesaaaaaaaaaaaaaaaaaaaaaaaaaa", "test"), + stationsList(context, busStations), boardingConfirmButton(context), ], ) @@ -26,15 +27,6 @@ class BottomSheetWidget extends StatelessWidget { ); } - Widget titleText() { - return const Text( - "ルート詳細情報", - style: TextStyle( - fontSize: 30 - ), - ); - } - Widget header(String busCourseName, String busOperatorName) { return Padding( padding: const EdgeInsets.fromLTRB(0, 50, 0, 10), @@ -51,7 +43,7 @@ class BottomSheetWidget extends StatelessWidget { //将来的にはStationのListを参照 - Widget stationsListBuilder(BuildContext context, busStationsList) { + Widget stationsList(BuildContext context, busStationsList) { String viewText = ""; for (var station in busStationsList) { viewText += station + "\n"; From 81bb8acf03dc8bbfde056f05ea87b61e1f33fa05 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 17:29:06 +0900 Subject: [PATCH 098/771] =?UTF-8?q?feat:=E5=81=9C=E7=95=99=E6=89=80?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 52 ++++++++++++------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index a001769c..bea1c1c2 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; class BottomSheetWidget extends StatelessWidget { - final busStations = ["station1", "station2", "station3","station4","station5","station6",]; + final busStations = ["station1", "station2", "station3","station4","station5","station6", "station7", "station8", "station7", "station7"]; @override Widget build(BuildContext context) { @@ -16,10 +16,13 @@ class BottomSheetWidget extends StatelessWidget { ), child: Center( child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ // titleText(), header("tesaaaaaaaaaaaaaaaaaaaaaaaaaa", "test"), - stationsList(context, busStations), + Expanded( + child: stationsList(context, busStations) + ), boardingConfirmButton(context), ], ) @@ -40,17 +43,21 @@ class BottomSheetWidget extends StatelessWidget { ); } - - //将来的にはStationのListを参照 Widget stationsList(BuildContext context, busStationsList) { String viewText = ""; for (var station in busStationsList) { viewText += station + "\n"; } - return Text( - viewText, - + return Padding( + padding: const EdgeInsets.fromLTRB(50, 10, 0, 0), + child: SizedBox( + child: Text( + viewText, + textAlign: TextAlign.left, + overflow: TextOverflow.ellipsis, + ), + ), ); } @@ -107,19 +114,24 @@ class BottomSheetWidget extends StatelessWidget { Widget boardingConfirmButton(BuildContext context) { const double fontSize = 20; - return SizedBox( - width: MediaQuery.of(context).size.width * 0.6, - height: fontSize * 2, - child: ElevatedButton( - onPressed: () {}, - style: ElevatedButton.styleFrom( - backgroundColor: Colors.black, - ), - child: const Text( - "乗客状況", - style: TextStyle( - color: Colors.white, - fontSize: fontSize, + return Center( + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10), + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + height: fontSize * 2, + child: ElevatedButton( + onPressed: () {}, + style: ElevatedButton.styleFrom( + backgroundColor: Colors.black, + ), + child: const Text( + "乗客状況", + style: TextStyle( + color: Colors.white, + fontSize: fontSize, + ), + ), ), ), ), From 9356c6cd771a7a49b13339758a792c20e21dee1b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 17:39:00 +0900 Subject: [PATCH 099/771] =?UTF-8?q?feat:=E5=81=9C=E7=95=99=E6=89=80?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=82=92=E3=82=B9=E3=82=AF=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E5=8F=AF=E8=83=BD=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index bea1c1c2..61ab38e7 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -44,26 +44,27 @@ class BottomSheetWidget extends StatelessWidget { } //将来的にはStationのListを参照 - Widget stationsList(BuildContext context, busStationsList) { - String viewText = ""; - for (var station in busStationsList) { - viewText += station + "\n"; - } - return Padding( - padding: const EdgeInsets.fromLTRB(50, 10, 0, 0), - child: SizedBox( - child: Text( - viewText, - textAlign: TextAlign.left, - overflow: TextOverflow.ellipsis, - ), - ), + Widget stationsList(BuildContext context, List busStationsList) { + return ListView.builder( + itemCount: busStationsList.length, + itemBuilder: (context, index) { + return Padding( + padding: const EdgeInsets.fromLTRB(50, 10, 0, 0), + child: Text( + busStationsList[index], + textAlign: TextAlign.left, + style: const TextStyle( + fontSize: 18, + ), + ), + ); + }, ); } Widget courseAndOperator(String courseName, String operatorName) { return Padding( - padding: const EdgeInsets.only(left:50), + padding: const EdgeInsets.only(left:30), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ From 9c5d5dcccff657bd305dfbbc41699f022e0fd08c Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 17:40:37 +0900 Subject: [PATCH 100/771] chore(proto): change proto file --- .../go/where_child_bus/health_check.pb.go | 226 --- .../where_child_bus/health_check_grpc.pb.go | 107 -- .../go/where_child_bus/resources.pb.go | 1434 ----------------- .../proto-gen/where_child_bus/v1/bus.pb.dart | 18 +- .../where_child_bus/v1/bus.pbgrpc.dart | 59 + .../where_child_bus/v1/bus.pbjson.dart | 24 - .../where_child_bus/v1/child.pb.dart | 27 +- .../where_child_bus/v1/child.pbgrpc.dart | 79 + .../where_child_bus/v1/child.pbjson.dart | 30 - .../where_child_bus/v1/guardian.pb.dart | 32 +- .../where_child_bus/v1/guardian.pbgrpc.dart | 59 + .../where_child_bus/v1/guardian.pbjson.dart | 25 - .../where_child_bus/v1/health_check.pb.dart | 10 - .../v1/health_check.pbgrpc.dart | 59 + .../v1/health_check.pbjson.dart | 18 - .../where_child_bus/v1/nursery.pb.dart | 22 +- .../where_child_bus/v1/nursery.pbgrpc.dart | 59 + .../where_child_bus/v1/nursery.pbjson.dart | 24 - .../where_child_bus/v1/resources.pb.dart | 172 +- 19 files changed, 429 insertions(+), 2055 deletions(-) delete mode 100644 backend/proto-gen/go/where_child_bus/health_check.pb.go delete mode 100644 backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go delete mode 100644 backend/proto-gen/go/where_child_bus/resources.pb.go create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart diff --git a/backend/proto-gen/go/where_child_bus/health_check.pb.go b/backend/proto-gen/go/where_child_bus/health_check.pb.go deleted file mode 100644 index 8cf8c326..00000000 --- a/backend/proto-gen/go/where_child_bus/health_check.pb.go +++ /dev/null @@ -1,226 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc (unknown) -// source: where_child_bus/health_check.proto - -package where_child_bus - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *PingRequest) Reset() { - *x = PingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_health_check_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingRequest) ProtoMessage() {} - -func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_health_check_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. -func (*PingRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_health_check_proto_rawDescGZIP(), []int{0} -} - -func (x *PingRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type PingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *PingResponse) Reset() { - *x = PingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_health_check_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingResponse) ProtoMessage() {} - -func (x *PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_health_check_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. -func (*PingResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_health_check_proto_rawDescGZIP(), []int{1} -} - -func (x *PingResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_where_child_bus_health_check_proto protoreflect.FileDescriptor - -var file_where_child_bus_health_check_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x22, 0x21, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x32, 0x59, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, - 0x12, 0x1c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xce, 0x01, - 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0xa2, 0x02, 0x03, 0x57, - 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0xca, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0xe2, 0x02, 0x19, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_where_child_bus_health_check_proto_rawDescOnce sync.Once - file_where_child_bus_health_check_proto_rawDescData = file_where_child_bus_health_check_proto_rawDesc -) - -func file_where_child_bus_health_check_proto_rawDescGZIP() []byte { - file_where_child_bus_health_check_proto_rawDescOnce.Do(func() { - file_where_child_bus_health_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_health_check_proto_rawDescData) - }) - return file_where_child_bus_health_check_proto_rawDescData -} - -var file_where_child_bus_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_where_child_bus_health_check_proto_goTypes = []interface{}{ - (*PingRequest)(nil), // 0: where_child_bus.PingRequest - (*PingResponse)(nil), // 1: where_child_bus.PingResponse -} -var file_where_child_bus_health_check_proto_depIdxs = []int32{ - 0, // 0: where_child_bus.HealthcheckService.Ping:input_type -> where_child_bus.PingRequest - 1, // 1: where_child_bus.HealthcheckService.Ping:output_type -> where_child_bus.PingResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_where_child_bus_health_check_proto_init() } -func file_where_child_bus_health_check_proto_init() { - if File_where_child_bus_health_check_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_where_child_bus_health_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_health_check_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_where_child_bus_health_check_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_where_child_bus_health_check_proto_goTypes, - DependencyIndexes: file_where_child_bus_health_check_proto_depIdxs, - MessageInfos: file_where_child_bus_health_check_proto_msgTypes, - }.Build() - File_where_child_bus_health_check_proto = out.File - file_where_child_bus_health_check_proto_rawDesc = nil - file_where_child_bus_health_check_proto_goTypes = nil - file_where_child_bus_health_check_proto_depIdxs = nil -} diff --git a/backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go b/backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go deleted file mode 100644 index ebdc5f3f..00000000 --- a/backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: where_child_bus/health_check.proto - -package where_child_bus - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - HealthcheckService_Ping_FullMethodName = "/where_child_bus.HealthcheckService/Ping" -) - -// HealthcheckServiceClient is the client API for HealthcheckService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type HealthcheckServiceClient interface { - Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) -} - -type healthcheckServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewHealthcheckServiceClient(cc grpc.ClientConnInterface) HealthcheckServiceClient { - return &healthcheckServiceClient{cc} -} - -func (c *healthcheckServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { - out := new(PingResponse) - err := c.cc.Invoke(ctx, HealthcheckService_Ping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HealthcheckServiceServer is the server API for HealthcheckService service. -// All implementations should embed UnimplementedHealthcheckServiceServer -// for forward compatibility -type HealthcheckServiceServer interface { - Ping(context.Context, *PingRequest) (*PingResponse, error) -} - -// UnimplementedHealthcheckServiceServer should be embedded to have forward compatible implementations. -type UnimplementedHealthcheckServiceServer struct { -} - -func (UnimplementedHealthcheckServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") -} - -// UnsafeHealthcheckServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to HealthcheckServiceServer will -// result in compilation errors. -type UnsafeHealthcheckServiceServer interface { - mustEmbedUnimplementedHealthcheckServiceServer() -} - -func RegisterHealthcheckServiceServer(s grpc.ServiceRegistrar, srv HealthcheckServiceServer) { - s.RegisterService(&HealthcheckService_ServiceDesc, srv) -} - -func _HealthcheckService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HealthcheckServiceServer).Ping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: HealthcheckService_Ping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HealthcheckServiceServer).Ping(ctx, req.(*PingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// HealthcheckService_ServiceDesc is the grpc.ServiceDesc for HealthcheckService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var HealthcheckService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "where_child_bus.HealthcheckService", - HandlerType: (*HealthcheckServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Ping", - Handler: _HealthcheckService_Ping_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "where_child_bus/health_check.proto", -} diff --git a/backend/proto-gen/go/where_child_bus/resources.pb.go b/backend/proto-gen/go/where_child_bus/resources.pb.go deleted file mode 100644 index 817b8667..00000000 --- a/backend/proto-gen/go/where_child_bus/resources.pb.go +++ /dev/null @@ -1,1434 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc (unknown) -// source: where_child_bus/resources.proto - -package where_child_bus - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Bus_Status int32 - -const ( - Bus_STOPPED Bus_Status = 0 - Bus_RUNNING Bus_Status = 1 - Bus_MAINTEINANCE Bus_Status = 2 -) - -// Enum value maps for Bus_Status. -var ( - Bus_Status_name = map[int32]string{ - 0: "STOPPED", - 1: "RUNNING", - 2: "MAINTEINANCE", - } - Bus_Status_value = map[string]int32{ - "STOPPED": 0, - "RUNNING": 1, - "MAINTEINANCE": 2, - } -) - -func (x Bus_Status) Enum() *Bus_Status { - p := new(Bus_Status) - *p = x - return p -} - -func (x Bus_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Bus_Status) Descriptor() protoreflect.EnumDescriptor { - return file_where_child_bus_resources_proto_enumTypes[0].Descriptor() -} - -func (Bus_Status) Type() protoreflect.EnumType { - return &file_where_child_bus_resources_proto_enumTypes[0] -} - -func (x Bus_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Bus_Status.Descriptor instead. -func (Bus_Status) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{2, 0} -} - -type Child_Sex int32 - -const ( - Child_MAN Child_Sex = 0 - Child_WOMEN Child_Sex = 1 - Child_OTHER Child_Sex = 2 -) - -// Enum value maps for Child_Sex. -var ( - Child_Sex_name = map[int32]string{ - 0: "MAN", - 1: "WOMEN", - 2: "OTHER", - } - Child_Sex_value = map[string]int32{ - "MAN": 0, - "WOMEN": 1, - "OTHER": 2, - } -) - -func (x Child_Sex) Enum() *Child_Sex { - p := new(Child_Sex) - *p = x - return p -} - -func (x Child_Sex) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Child_Sex) Descriptor() protoreflect.EnumDescriptor { - return file_where_child_bus_resources_proto_enumTypes[1].Descriptor() -} - -func (Child_Sex) Type() protoreflect.EnumType { - return &file_where_child_bus_resources_proto_enumTypes[1] -} - -func (x Child_Sex) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Child_Sex.Descriptor instead. -func (Child_Sex) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{3, 0} -} - -type ChildBusAssociation_BusType int32 - -const ( - ChildBusAssociation_MORNING ChildBusAssociation_BusType = 0 - ChildBusAssociation_AFTERNOON ChildBusAssociation_BusType = 1 -) - -// Enum value maps for ChildBusAssociation_BusType. -var ( - ChildBusAssociation_BusType_name = map[int32]string{ - 0: "MORNING", - 1: "AFTERNOON", - } - ChildBusAssociation_BusType_value = map[string]int32{ - "MORNING": 0, - "AFTERNOON": 1, - } -) - -func (x ChildBusAssociation_BusType) Enum() *ChildBusAssociation_BusType { - p := new(ChildBusAssociation_BusType) - *p = x - return p -} - -func (x ChildBusAssociation_BusType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ChildBusAssociation_BusType) Descriptor() protoreflect.EnumDescriptor { - return file_where_child_bus_resources_proto_enumTypes[2].Descriptor() -} - -func (ChildBusAssociation_BusType) Type() protoreflect.EnumType { - return &file_where_child_bus_resources_proto_enumTypes[2] -} - -func (x ChildBusAssociation_BusType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ChildBusAssociation_BusType.Descriptor instead. -func (ChildBusAssociation_BusType) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{5, 0} -} - -type Nursery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryCode string `protobuf:"bytes,2,opt,name=nursery_code,json=nurseryCode,proto3" json:"nursery_code,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` - PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` - EncryptedPassword string `protobuf:"bytes,7,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Nursery) Reset() { - *x = Nursery{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Nursery) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Nursery) ProtoMessage() {} - -func (x *Nursery) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Nursery.ProtoReflect.Descriptor instead. -func (*Nursery) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{0} -} - -func (x *Nursery) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Nursery) GetNurseryCode() string { - if x != nil { - return x.NurseryCode - } - return "" -} - -func (x *Nursery) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Nursery) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Nursery) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *Nursery) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *Nursery) GetEncryptedPassword() string { - if x != nil { - return x.EncryptedPassword - } - return "" -} - -func (x *Nursery) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Nursery) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type Guardian struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` - PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - EncryptedPassword string `protobuf:"bytes,6,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Guardian) Reset() { - *x = Guardian{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Guardian) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Guardian) ProtoMessage() {} - -func (x *Guardian) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Guardian.ProtoReflect.Descriptor instead. -func (*Guardian) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{1} -} - -func (x *Guardian) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Guardian) GetNurseryId() string { - if x != nil { - return x.NurseryId - } - return "" -} - -func (x *Guardian) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Guardian) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *Guardian) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *Guardian) GetEncryptedPassword() string { - if x != nil { - return x.EncryptedPassword - } - return "" -} - -func (x *Guardian) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Guardian) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type Bus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - PlateNumber string `protobuf:"bytes,4,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` - Status Bus_Status `protobuf:"varint,5,opt,name=status,proto3,enum=where_child_bus.Bus_Status" json:"status,omitempty"` - // 緯度経度 - Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Bus) Reset() { - *x = Bus{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bus) ProtoMessage() {} - -func (x *Bus) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Bus.ProtoReflect.Descriptor instead. -func (*Bus) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{2} -} - -func (x *Bus) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Bus) GetNurseryId() string { - if x != nil { - return x.NurseryId - } - return "" -} - -func (x *Bus) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Bus) GetPlateNumber() string { - if x != nil { - return x.PlateNumber - } - return "" -} - -func (x *Bus) GetStatus() Bus_Status { - if x != nil { - return x.Status - } - return Bus_STOPPED -} - -func (x *Bus) GetLatitude() float64 { - if x != nil { - return x.Latitude - } - return 0 -} - -func (x *Bus) GetLongitude() float64 { - if x != nil { - return x.Longitude - } - return 0 -} - -func (x *Bus) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Bus) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type Child struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - GuardianId string `protobuf:"bytes,3,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Age int32 `protobuf:"varint,5,opt,name=age,proto3" json:"age,omitempty"` - Sex Child_Sex `protobuf:"varint,6,opt,name=sex,proto3,enum=where_child_bus.Child_Sex" json:"sex,omitempty"` - IsRideMorningBus bool `protobuf:"varint,7,opt,name=is_ride_morning_bus,json=isRideMorningBus,proto3" json:"is_ride_morning_bus,omitempty"` - IsRideAfternoonBus bool `protobuf:"varint,8,opt,name=is_ride_afternoon_bus,json=isRideAfternoonBus,proto3" json:"is_ride_afternoon_bus,omitempty"` - CheckForMissingItems bool `protobuf:"varint,9,opt,name=check_for_missing_items,json=checkForMissingItems,proto3" json:"check_for_missing_items,omitempty"` - HasBag bool `protobuf:"varint,10,opt,name=has_bag,json=hasBag,proto3" json:"has_bag,omitempty"` - HasLunchBox bool `protobuf:"varint,11,opt,name=has_lunch_box,json=hasLunchBox,proto3" json:"has_lunch_box,omitempty"` - HasWaterBottle bool `protobuf:"varint,12,opt,name=has_water_bottle,json=hasWaterBottle,proto3" json:"has_water_bottle,omitempty"` - HasUmbrera bool `protobuf:"varint,13,opt,name=has_umbrera,json=hasUmbrera,proto3" json:"has_umbrera,omitempty"` - HasOther bool `protobuf:"varint,14,opt,name=has_other,json=hasOther,proto3" json:"has_other,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Child) Reset() { - *x = Child{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Child) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Child) ProtoMessage() {} - -func (x *Child) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Child.ProtoReflect.Descriptor instead. -func (*Child) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{3} -} - -func (x *Child) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Child) GetNurseryId() string { - if x != nil { - return x.NurseryId - } - return "" -} - -func (x *Child) GetGuardianId() string { - if x != nil { - return x.GuardianId - } - return "" -} - -func (x *Child) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Child) GetAge() int32 { - if x != nil { - return x.Age - } - return 0 -} - -func (x *Child) GetSex() Child_Sex { - if x != nil { - return x.Sex - } - return Child_MAN -} - -func (x *Child) GetIsRideMorningBus() bool { - if x != nil { - return x.IsRideMorningBus - } - return false -} - -func (x *Child) GetIsRideAfternoonBus() bool { - if x != nil { - return x.IsRideAfternoonBus - } - return false -} - -func (x *Child) GetCheckForMissingItems() bool { - if x != nil { - return x.CheckForMissingItems - } - return false -} - -func (x *Child) GetHasBag() bool { - if x != nil { - return x.HasBag - } - return false -} - -func (x *Child) GetHasLunchBox() bool { - if x != nil { - return x.HasLunchBox - } - return false -} - -func (x *Child) GetHasWaterBottle() bool { - if x != nil { - return x.HasWaterBottle - } - return false -} - -func (x *Child) GetHasUmbrera() bool { - if x != nil { - return x.HasUmbrera - } - return false -} - -func (x *Child) GetHasOther() bool { - if x != nil { - return x.HasOther - } - return false -} - -func (x *Child) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Child) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type Station struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - GuardianId string `protobuf:"bytes,2,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` - Latitude float64 `protobuf:"fixed64,3,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,4,opt,name=longitude,proto3" json:"longitude,omitempty"` - MorningOrder int32 `protobuf:"varint,5,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` - AfternoonOrder int32 `protobuf:"varint,6,opt,name=afternoon_order,json=afternoonOrder,proto3" json:"afternoon_order,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Station) Reset() { - *x = Station{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Station) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Station) ProtoMessage() {} - -func (x *Station) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Station.ProtoReflect.Descriptor instead. -func (*Station) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{4} -} - -func (x *Station) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Station) GetGuardianId() string { - if x != nil { - return x.GuardianId - } - return "" -} - -func (x *Station) GetLatitude() float64 { - if x != nil { - return x.Latitude - } - return 0 -} - -func (x *Station) GetLongitude() float64 { - if x != nil { - return x.Longitude - } - return 0 -} - -func (x *Station) GetMorningOrder() int32 { - if x != nil { - return x.MorningOrder - } - return 0 -} - -func (x *Station) GetAfternoonOrder() int32 { - if x != nil { - return x.AfternoonOrder - } - return 0 -} - -func (x *Station) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Station) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type ChildBusAssociation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - ChildId string `protobuf:"bytes,3,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - BusType ChildBusAssociation_BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.ChildBusAssociation_BusType" json:"bus_type,omitempty"` -} - -func (x *ChildBusAssociation) Reset() { - *x = ChildBusAssociation{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChildBusAssociation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChildBusAssociation) ProtoMessage() {} - -func (x *ChildBusAssociation) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChildBusAssociation.ProtoReflect.Descriptor instead. -func (*ChildBusAssociation) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{5} -} - -func (x *ChildBusAssociation) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ChildBusAssociation) GetBusId() string { - if x != nil { - return x.BusId - } - return "" -} - -func (x *ChildBusAssociation) GetChildId() string { - if x != nil { - return x.ChildId - } - return "" -} - -func (x *ChildBusAssociation) GetBusType() ChildBusAssociation_BusType { - if x != nil { - return x.BusType - } - return ChildBusAssociation_MORNING -} - -type BusStationAssociation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - StationId string `protobuf:"bytes,2,opt,name=station_id,json=stationId,proto3" json:"station_id,omitempty"` -} - -func (x *BusStationAssociation) Reset() { - *x = BusStationAssociation{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BusStationAssociation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BusStationAssociation) ProtoMessage() {} - -func (x *BusStationAssociation) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BusStationAssociation.ProtoReflect.Descriptor instead. -func (*BusStationAssociation) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{6} -} - -func (x *BusStationAssociation) GetBusId() string { - if x != nil { - return x.BusId - } - return "" -} - -func (x *BusStationAssociation) GetStationId() string { - if x != nil { - return x.StationId - } - return "" -} - -type ChildPhoto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - S3Bucket string `protobuf:"bytes,3,opt,name=s3_bucket,json=s3Bucket,proto3" json:"s3_bucket,omitempty"` - S3Key string `protobuf:"bytes,4,opt,name=s3_key,json=s3Key,proto3" json:"s3_key,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *ChildPhoto) Reset() { - *x = ChildPhoto{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChildPhoto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChildPhoto) ProtoMessage() {} - -func (x *ChildPhoto) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChildPhoto.ProtoReflect.Descriptor instead. -func (*ChildPhoto) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{7} -} - -func (x *ChildPhoto) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ChildPhoto) GetChildId() string { - if x != nil { - return x.ChildId - } - return "" -} - -func (x *ChildPhoto) GetS3Bucket() string { - if x != nil { - return x.S3Bucket - } - return "" -} - -func (x *ChildPhoto) GetS3Key() string { - if x != nil { - return x.S3Key - } - return "" -} - -func (x *ChildPhoto) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *ChildPhoto) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type BoardingRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - BusId string `protobuf:"bytes,3,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - IsBoarding bool `protobuf:"varint,4,opt,name=is_boarding,json=isBoarding,proto3" json:"is_boarding,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (x *BoardingRecord) Reset() { - *x = BoardingRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BoardingRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BoardingRecord) ProtoMessage() {} - -func (x *BoardingRecord) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BoardingRecord.ProtoReflect.Descriptor instead. -func (*BoardingRecord) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{8} -} - -func (x *BoardingRecord) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *BoardingRecord) GetChildId() string { - if x != nil { - return x.ChildId - } - return "" -} - -func (x *BoardingRecord) GetBusId() string { - if x != nil { - return x.BusId - } - return "" -} - -func (x *BoardingRecord) GetIsBoarding() bool { - if x != nil { - return x.IsBoarding - } - return false -} - -func (x *BoardingRecord) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -var File_where_child_bus_resources_proto protoreflect.FileDescriptor - -var file_where_child_bus_resources_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x02, 0x0a, 0x07, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x43, 0x6f, - 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, - 0x02, 0x0a, 0x08, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x86, 0x03, 0x0a, - 0x03, 0x62, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x62, 0x75, 0x73, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, - 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, - 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, - 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, - 0x50, 0x50, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, - 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, 0x4e, 0x41, - 0x4e, 0x43, 0x45, 0x10, 0x02, 0x22, 0x85, 0x05, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, - 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6d, - 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, - 0x75, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x69, 0x73, 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x61, 0x66, - 0x74, 0x65, 0x72, 0x6e, 0x6f, 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x12, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x6e, 0x6f, - 0x6f, 0x6e, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, - 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, - 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, - 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, - 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, - 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, - 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, - 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, - 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, - 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, - 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, - 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x24, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x07, - 0x0a, 0x03, 0x4d, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x4f, 0x4d, 0x45, 0x4e, - 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x22, 0xb8, 0x02, - 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, - 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x66, 0x74, - 0x65, 0x72, 0x6e, 0x6f, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0e, 0x61, 0x66, 0x74, 0x65, 0x72, 0x6e, 0x6f, 0x6f, 0x6e, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xc7, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x49, 0x64, 0x12, 0x47, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, - 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x25, 0x0a, 0x07, 0x42, - 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, - 0x47, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x46, 0x54, 0x45, 0x52, 0x4e, 0x4f, 0x4f, 0x4e, - 0x10, 0x01, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, - 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, - 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, - 0x33, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x73, 0x33, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, - 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, - 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0xcc, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x42, 0x0e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, - 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0xca, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0xe2, 0x02, 0x19, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_where_child_bus_resources_proto_rawDescOnce sync.Once - file_where_child_bus_resources_proto_rawDescData = file_where_child_bus_resources_proto_rawDesc -) - -func file_where_child_bus_resources_proto_rawDescGZIP() []byte { - file_where_child_bus_resources_proto_rawDescOnce.Do(func() { - file_where_child_bus_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_resources_proto_rawDescData) - }) - return file_where_child_bus_resources_proto_rawDescData -} - -var file_where_child_bus_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_where_child_bus_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_where_child_bus_resources_proto_goTypes = []interface{}{ - (Bus_Status)(0), // 0: where_child_bus.bus.Status - (Child_Sex)(0), // 1: where_child_bus.Child.Sex - (ChildBusAssociation_BusType)(0), // 2: where_child_bus.ChildBusAssociation.BusType - (*Nursery)(nil), // 3: where_child_bus.Nursery - (*Guardian)(nil), // 4: where_child_bus.Guardian - (*Bus)(nil), // 5: where_child_bus.bus - (*Child)(nil), // 6: where_child_bus.Child - (*Station)(nil), // 7: where_child_bus.Station - (*ChildBusAssociation)(nil), // 8: where_child_bus.ChildBusAssociation - (*BusStationAssociation)(nil), // 9: where_child_bus.BusStationAssociation - (*ChildPhoto)(nil), // 10: where_child_bus.ChildPhoto - (*BoardingRecord)(nil), // 11: where_child_bus.BoardingRecord - (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp -} -var file_where_child_bus_resources_proto_depIdxs = []int32{ - 12, // 0: where_child_bus.Nursery.created_at:type_name -> google.protobuf.Timestamp - 12, // 1: where_child_bus.Nursery.updated_at:type_name -> google.protobuf.Timestamp - 12, // 2: where_child_bus.Guardian.created_at:type_name -> google.protobuf.Timestamp - 12, // 3: where_child_bus.Guardian.updated_at:type_name -> google.protobuf.Timestamp - 0, // 4: where_child_bus.bus.status:type_name -> where_child_bus.bus.Status - 12, // 5: where_child_bus.bus.created_at:type_name -> google.protobuf.Timestamp - 12, // 6: where_child_bus.bus.updated_at:type_name -> google.protobuf.Timestamp - 1, // 7: where_child_bus.Child.sex:type_name -> where_child_bus.Child.Sex - 12, // 8: where_child_bus.Child.created_at:type_name -> google.protobuf.Timestamp - 12, // 9: where_child_bus.Child.updated_at:type_name -> google.protobuf.Timestamp - 12, // 10: where_child_bus.Station.created_at:type_name -> google.protobuf.Timestamp - 12, // 11: where_child_bus.Station.updated_at:type_name -> google.protobuf.Timestamp - 2, // 12: where_child_bus.ChildBusAssociation.bus_type:type_name -> where_child_bus.ChildBusAssociation.BusType - 12, // 13: where_child_bus.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp - 12, // 14: where_child_bus.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp - 12, // 15: where_child_bus.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name -} - -func init() { file_where_child_bus_resources_proto_init() } -func file_where_child_bus_resources_proto_init() { - if File_where_child_bus_resources_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_where_child_bus_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Nursery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Guardian); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Child); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Station); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChildBusAssociation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BusStationAssociation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChildPhoto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BoardingRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_where_child_bus_resources_proto_rawDesc, - NumEnums: 3, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_where_child_bus_resources_proto_goTypes, - DependencyIndexes: file_where_child_bus_resources_proto_depIdxs, - EnumInfos: file_where_child_bus_resources_proto_enumTypes, - MessageInfos: file_where_child_bus_resources_proto_msgTypes, - }.Build() - File_where_child_bus_resources_proto = out.File - file_where_child_bus_resources_proto_rawDesc = nil - file_where_child_bus_resources_proto_goTypes = nil - file_where_child_bus_resources_proto_depIdxs = nil -} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart index fd74729c..e0a16b03 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -9,12 +9,11 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $1; +import 'resources.pb.dart' as $6; class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { factory GetBusListByNurseryIdRequest({ @@ -68,7 +67,7 @@ class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetBusListByNurseryIdResponse({ - $core.Iterable<$1.Bus>? buses, + $core.Iterable<$6.Bus>? buses, }) { final $result = create(); if (buses != null) { @@ -81,7 +80,7 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetBusListByNurseryIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusListByNurseryIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$1.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $1.Bus.create) + ..pc<$6.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $6.Bus.create) ..hasRequiredFields = false ; @@ -107,16 +106,7 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { static GetBusListByNurseryIdResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$1.Bus> get buses => $_getList(0); -} - -class BusServiceApi { - $pb.RpcClient _client; - BusServiceApi(this._client); - - $async.Future getBusListByNurseryId($pb.ClientContext? ctx, GetBusListByNurseryIdRequest request) => - _client.invoke(ctx, 'BusService', 'GetBusListByNurseryId', request, GetBusListByNurseryIdResponse()) - ; + $core.List<$6.Bus> get buses => $_getList(0); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart new file mode 100644 index 00000000..393315ee --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/bus.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'bus.pb.dart' as $0; + +export 'bus.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.BusService') +class BusServiceClient extends $grpc.Client { + static final _$getBusListByNurseryId = $grpc.ClientMethod<$0.GetBusListByNurseryIdRequest, $0.GetBusListByNurseryIdResponse>( + '/where_child_bus.v1.BusService/GetBusListByNurseryId', + ($0.GetBusListByNurseryIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.GetBusListByNurseryIdResponse.fromBuffer(value)); + + BusServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($0.GetBusListByNurseryIdRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getBusListByNurseryId, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.BusService') +abstract class BusServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.BusService'; + + BusServiceBase() { + $addMethod($grpc.ServiceMethod<$0.GetBusListByNurseryIdRequest, $0.GetBusListByNurseryIdResponse>( + 'GetBusListByNurseryId', + getBusListByNurseryId_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetBusListByNurseryIdRequest.fromBuffer(value), + ($0.GetBusListByNurseryIdResponse value) => value.writeToBuffer())); + } + + $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId_Pre($grpc.ServiceCall call, $async.Future<$0.GetBusListByNurseryIdRequest> request) async { + return getBusListByNurseryId(call, await request); + } + + $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($grpc.ServiceCall call, $0.GetBusListByNurseryIdRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index e4054514..11fc1604 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -13,9 +13,6 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -import '../../google/protobuf/timestamp.pbjson.dart' as $0; -import 'resources.pbjson.dart' as $1; - @$core.Deprecated('Use getBusListByNurseryIdRequestDescriptor instead') const GetBusListByNurseryIdRequest$json = { '1': 'GetBusListByNurseryIdRequest', @@ -42,24 +39,3 @@ final $typed_data.Uint8List getBusListByNurseryIdResponseDescriptor = $convert.b 'Ch1HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXNwb25zZRItCgVidXNlcxgBIAMoCzIXLndoZXJlX2' 'NoaWxkX2J1cy52MS5CdXNSBWJ1c2Vz'); -const $core.Map<$core.String, $core.dynamic> BusServiceBase$json = { - '1': 'BusService', - '2': [ - {'1': 'GetBusListByNurseryId', '2': '.where_child_bus.v1.GetBusListByNurseryIdRequest', '3': '.where_child_bus.v1.GetBusListByNurseryIdResponse'}, - ], -}; - -@$core.Deprecated('Use busServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> BusServiceBase$messageJson = { - '.where_child_bus.v1.GetBusListByNurseryIdRequest': GetBusListByNurseryIdRequest$json, - '.where_child_bus.v1.GetBusListByNurseryIdResponse': GetBusListByNurseryIdResponse$json, - '.where_child_bus.v1.Bus': $1.Bus$json, - '.google.protobuf.Timestamp': $0.Timestamp$json, -}; - -/// Descriptor for `BusService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List busServiceDescriptor = $convert.base64Decode( - 'CgpCdXNTZXJ2aWNlEnwKFUdldEJ1c0xpc3RCeU51cnNlcnlJZBIwLndoZXJlX2NoaWxkX2J1cy' - '52MS5HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXF1ZXN0GjEud2hlcmVfY2hpbGRfYnVzLnYxLkdl' - 'dEJ1c0xpc3RCeU51cnNlcnlJZFJlc3BvbnNl'); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart index 59b94e39..acfc7397 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -9,12 +9,11 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $1; +import 'resources.pb.dart' as $6; class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { factory GetChildListByNurseryIDRequest({ @@ -68,7 +67,7 @@ class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse({ - $core.Iterable<$1.Child>? children, + $core.Iterable<$6.Child>? children, }) { final $result = create(); if (children != null) { @@ -81,7 +80,7 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByNurseryIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$1.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $1.Child.create) + ..pc<$6.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $6.Child.create) ..hasRequiredFields = false ; @@ -107,7 +106,7 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { static GetChildListByNurseryIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$1.Child> get children => $_getList(0); + $core.List<$6.Child> get children => $_getList(0); } class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { @@ -162,7 +161,7 @@ class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse({ - $core.Iterable<$1.Child>? children, + $core.Iterable<$6.Child>? children, }) { final $result = create(); if (children != null) { @@ -175,7 +174,7 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByGuardianIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$1.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $1.Child.create) + ..pc<$6.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $6.Child.create) ..hasRequiredFields = false ; @@ -201,19 +200,7 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { static GetChildListByGuardianIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$1.Child> get children => $_getList(0); -} - -class ChildServiceApi { - $pb.RpcClient _client; - ChildServiceApi(this._client); - - $async.Future getChildListByNurseryID($pb.ClientContext? ctx, GetChildListByNurseryIDRequest request) => - _client.invoke(ctx, 'ChildService', 'GetChildListByNurseryID', request, GetChildListByNurseryIDResponse()) - ; - $async.Future getChildListByGuardianID($pb.ClientContext? ctx, GetChildListByGuardianIDRequest request) => - _client.invoke(ctx, 'ChildService', 'GetChildListByGuardianID', request, GetChildListByGuardianIDResponse()) - ; + $core.List<$6.Child> get children => $_getList(0); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart new file mode 100644 index 00000000..35ad0c72 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart @@ -0,0 +1,79 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'child.pb.dart' as $1; + +export 'child.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.ChildService') +class ChildServiceClient extends $grpc.Client { + static final _$getChildListByNurseryID = $grpc.ClientMethod<$1.GetChildListByNurseryIDRequest, $1.GetChildListByNurseryIDResponse>( + '/where_child_bus.v1.ChildService/GetChildListByNurseryID', + ($1.GetChildListByNurseryIDRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.GetChildListByNurseryIDResponse.fromBuffer(value)); + static final _$getChildListByGuardianID = $grpc.ClientMethod<$1.GetChildListByGuardianIDRequest, $1.GetChildListByGuardianIDResponse>( + '/where_child_bus.v1.ChildService/GetChildListByGuardianID', + ($1.GetChildListByGuardianIDRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.GetChildListByGuardianIDResponse.fromBuffer(value)); + + ChildServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($1.GetChildListByNurseryIDRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getChildListByNurseryID, request, options: options); + } + + $grpc.ResponseFuture<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($1.GetChildListByGuardianIDRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getChildListByGuardianID, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.ChildService') +abstract class ChildServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.ChildService'; + + ChildServiceBase() { + $addMethod($grpc.ServiceMethod<$1.GetChildListByNurseryIDRequest, $1.GetChildListByNurseryIDResponse>( + 'GetChildListByNurseryID', + getChildListByNurseryID_Pre, + false, + false, + ($core.List<$core.int> value) => $1.GetChildListByNurseryIDRequest.fromBuffer(value), + ($1.GetChildListByNurseryIDResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.GetChildListByGuardianIDRequest, $1.GetChildListByGuardianIDResponse>( + 'GetChildListByGuardianID', + getChildListByGuardianID_Pre, + false, + false, + ($core.List<$core.int> value) => $1.GetChildListByGuardianIDRequest.fromBuffer(value), + ($1.GetChildListByGuardianIDResponse value) => value.writeToBuffer())); + } + + $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByNurseryIDRequest> request) async { + return getChildListByNurseryID(call, await request); + } + + $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByGuardianIDRequest> request) async { + return getChildListByGuardianID(call, await request); + } + + $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); + $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($grpc.ServiceCall call, $1.GetChildListByGuardianIDRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart index e310f4cb..ceef43cf 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -13,9 +13,6 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -import '../../google/protobuf/timestamp.pbjson.dart' as $0; -import 'resources.pbjson.dart' as $1; - @$core.Deprecated('Use getChildListByNurseryIDRequestDescriptor instead') const GetChildListByNurseryIDRequest$json = { '1': 'GetChildListByNurseryIDRequest', @@ -68,30 +65,3 @@ final $typed_data.Uint8List getChildListByGuardianIDResponseDescriptor = $conver 'CiBHZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZXNwb25zZRI1CghjaGlsZHJlbhgBIAMoCzIZLn' 'doZXJlX2NoaWxkX2J1cy52MS5DaGlsZFIIY2hpbGRyZW4='); -const $core.Map<$core.String, $core.dynamic> ChildServiceBase$json = { - '1': 'ChildService', - '2': [ - {'1': 'GetChildListByNurseryID', '2': '.where_child_bus.v1.GetChildListByNurseryIDRequest', '3': '.where_child_bus.v1.GetChildListByNurseryIDResponse'}, - {'1': 'GetChildListByGuardianID', '2': '.where_child_bus.v1.GetChildListByGuardianIDRequest', '3': '.where_child_bus.v1.GetChildListByGuardianIDResponse'}, - ], -}; - -@$core.Deprecated('Use childServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> ChildServiceBase$messageJson = { - '.where_child_bus.v1.GetChildListByNurseryIDRequest': GetChildListByNurseryIDRequest$json, - '.where_child_bus.v1.GetChildListByNurseryIDResponse': GetChildListByNurseryIDResponse$json, - '.where_child_bus.v1.Child': $1.Child$json, - '.google.protobuf.Timestamp': $0.Timestamp$json, - '.where_child_bus.v1.GetChildListByGuardianIDRequest': GetChildListByGuardianIDRequest$json, - '.where_child_bus.v1.GetChildListByGuardianIDResponse': GetChildListByGuardianIDResponse$json, -}; - -/// Descriptor for `ChildService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List childServiceDescriptor = $convert.base64Decode( - 'CgxDaGlsZFNlcnZpY2USggEKF0dldENoaWxkTGlzdEJ5TnVyc2VyeUlEEjIud2hlcmVfY2hpbG' - 'RfYnVzLnYxLkdldENoaWxkTGlzdEJ5TnVyc2VyeUlEUmVxdWVzdBozLndoZXJlX2NoaWxkX2J1' - 'cy52MS5HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEoUBChhHZXRDaGlsZExpc3RCeU' - 'd1YXJkaWFuSUQSMy53aGVyZV9jaGlsZF9idXMudjEuR2V0Q2hpbGRMaXN0QnlHdWFyZGlhbklE' - 'UmVxdWVzdBo0LndoZXJlX2NoaWxkX2J1cy52MS5HZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZX' - 'Nwb25zZQ=='); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 06a4aeff..18ab923a 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -9,12 +9,11 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $1; +import 'resources.pb.dart' as $6; class GuardianLoginRequest extends $pb.GeneratedMessage { factory GuardianLoginRequest({ @@ -83,8 +82,8 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { class GuardianLoginResponse extends $pb.GeneratedMessage { factory GuardianLoginResponse({ $core.bool? success, - $1.GuardianResponse? guardian, - $1.NurseryReponse? nursery, + $6.GuardianResponse? guardian, + $6.NurseryReponse? nursery, }) { final $result = create(); if (success != null) { @@ -104,8 +103,8 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$1.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $1.GuardianResponse.create) - ..aOM<$1.NurseryReponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $1.NurseryReponse.create) + ..aOM<$6.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $6.GuardianResponse.create) + ..aOM<$6.NurseryReponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $6.NurseryReponse.create) ..hasRequiredFields = false ; @@ -140,35 +139,26 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $1.GuardianResponse get guardian => $_getN(1); + $6.GuardianResponse get guardian => $_getN(1); @$pb.TagNumber(2) - set guardian($1.GuardianResponse v) { setField(2, v); } + set guardian($6.GuardianResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasGuardian() => $_has(1); @$pb.TagNumber(2) void clearGuardian() => clearField(2); @$pb.TagNumber(2) - $1.GuardianResponse ensureGuardian() => $_ensure(1); + $6.GuardianResponse ensureGuardian() => $_ensure(1); @$pb.TagNumber(3) - $1.NurseryReponse get nursery => $_getN(2); + $6.NurseryReponse get nursery => $_getN(2); @$pb.TagNumber(3) - set nursery($1.NurseryReponse v) { setField(3, v); } + set nursery($6.NurseryReponse v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasNursery() => $_has(2); @$pb.TagNumber(3) void clearNursery() => clearField(3); @$pb.TagNumber(3) - $1.NurseryReponse ensureNursery() => $_ensure(2); -} - -class GuardianServiceApi { - $pb.RpcClient _client; - GuardianServiceApi(this._client); - - $async.Future guardianLogin($pb.ClientContext? ctx, GuardianLoginRequest request) => - _client.invoke(ctx, 'GuardianService', 'GuardianLogin', request, GuardianLoginResponse()) - ; + $6.NurseryReponse ensureNursery() => $_ensure(2); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart new file mode 100644 index 00000000..a0ac6e24 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/guardian.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'guardian.pb.dart' as $2; + +export 'guardian.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.GuardianService') +class GuardianServiceClient extends $grpc.Client { + static final _$guardianLogin = $grpc.ClientMethod<$2.GuardianLoginRequest, $2.GuardianLoginResponse>( + '/where_child_bus.v1.GuardianService/GuardianLogin', + ($2.GuardianLoginRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.GuardianLoginResponse.fromBuffer(value)); + + GuardianServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$2.GuardianLoginResponse> guardianLogin($2.GuardianLoginRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$guardianLogin, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.GuardianService') +abstract class GuardianServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.GuardianService'; + + GuardianServiceBase() { + $addMethod($grpc.ServiceMethod<$2.GuardianLoginRequest, $2.GuardianLoginResponse>( + 'GuardianLogin', + guardianLogin_Pre, + false, + false, + ($core.List<$core.int> value) => $2.GuardianLoginRequest.fromBuffer(value), + ($2.GuardianLoginResponse value) => value.writeToBuffer())); + } + + $async.Future<$2.GuardianLoginResponse> guardianLogin_Pre($grpc.ServiceCall call, $async.Future<$2.GuardianLoginRequest> request) async { + return guardianLogin(call, await request); + } + + $async.Future<$2.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $2.GuardianLoginRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart index 76332fb3..53d8a6b8 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -13,9 +13,6 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -import '../../google/protobuf/timestamp.pbjson.dart' as $0; -import 'resources.pbjson.dart' as $1; - @$core.Deprecated('Use guardianLoginRequestDescriptor instead') const GuardianLoginRequest$json = { '1': 'GuardianLoginRequest', @@ -47,25 +44,3 @@ final $typed_data.Uint8List guardianLoginResponseDescriptor = $convert.base64Dec 'ZGlhbhI8CgdudXJzZXJ5GAMgASgLMiIud2hlcmVfY2hpbGRfYnVzLnYxLk51cnNlcnlSZXBvbn' 'NlUgdudXJzZXJ5'); -const $core.Map<$core.String, $core.dynamic> GuardianServiceBase$json = { - '1': 'GuardianService', - '2': [ - {'1': 'GuardianLogin', '2': '.where_child_bus.v1.GuardianLoginRequest', '3': '.where_child_bus.v1.GuardianLoginResponse'}, - ], -}; - -@$core.Deprecated('Use guardianServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> GuardianServiceBase$messageJson = { - '.where_child_bus.v1.GuardianLoginRequest': GuardianLoginRequest$json, - '.where_child_bus.v1.GuardianLoginResponse': GuardianLoginResponse$json, - '.where_child_bus.v1.GuardianResponse': $1.GuardianResponse$json, - '.google.protobuf.Timestamp': $0.Timestamp$json, - '.where_child_bus.v1.NurseryReponse': $1.NurseryReponse$json, -}; - -/// Descriptor for `GuardianService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List guardianServiceDescriptor = $convert.base64Decode( - 'Cg9HdWFyZGlhblNlcnZpY2USZAoNR3VhcmRpYW5Mb2dpbhIoLndoZXJlX2NoaWxkX2J1cy52MS' - '5HdWFyZGlhbkxvZ2luUmVxdWVzdBopLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhbkxvZ2lu' - 'UmVzcG9uc2U='); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart index a01651da..dcbde2f5 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart @@ -9,7 +9,6 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; @@ -114,15 +113,6 @@ class PingResponse extends $pb.GeneratedMessage { void clearMessage() => clearField(1); } -class HealthcheckServiceApi { - $pb.RpcClient _client; - HealthcheckServiceApi(this._client); - - $async.Future ping($pb.ClientContext? ctx, PingRequest request) => - _client.invoke(ctx, 'HealthcheckService', 'Ping', request, PingResponse()) - ; -} - const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart new file mode 100644 index 00000000..3915bbb5 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'health_check.pb.dart' as $3; + +export 'health_check.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.HealthcheckService') +class HealthcheckServiceClient extends $grpc.Client { + static final _$ping = $grpc.ClientMethod<$3.PingRequest, $3.PingResponse>( + '/where_child_bus.v1.HealthcheckService/Ping', + ($3.PingRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.PingResponse.fromBuffer(value)); + + HealthcheckServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$3.PingResponse> ping($3.PingRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$ping, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.HealthcheckService') +abstract class HealthcheckServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.HealthcheckService'; + + HealthcheckServiceBase() { + $addMethod($grpc.ServiceMethod<$3.PingRequest, $3.PingResponse>( + 'Ping', + ping_Pre, + false, + false, + ($core.List<$core.int> value) => $3.PingRequest.fromBuffer(value), + ($3.PingResponse value) => value.writeToBuffer())); + } + + $async.Future<$3.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$3.PingRequest> request) async { + return ping(call, await request); + } + + $async.Future<$3.PingResponse> ping($grpc.ServiceCall call, $3.PingRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart index 8255d4ea..201d4755 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart @@ -37,21 +37,3 @@ const PingResponse$json = { final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); -const $core.Map<$core.String, $core.dynamic> HealthcheckServiceBase$json = { - '1': 'HealthcheckService', - '2': [ - {'1': 'Ping', '2': '.where_child_bus.v1.PingRequest', '3': '.where_child_bus.v1.PingResponse'}, - ], -}; - -@$core.Deprecated('Use healthcheckServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> HealthcheckServiceBase$messageJson = { - '.where_child_bus.v1.PingRequest': PingRequest$json, - '.where_child_bus.v1.PingResponse': PingResponse$json, -}; - -/// Descriptor for `HealthcheckService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List healthcheckServiceDescriptor = $convert.base64Decode( - 'ChJIZWFsdGhjaGVja1NlcnZpY2USSQoEUGluZxIfLndoZXJlX2NoaWxkX2J1cy52MS5QaW5nUm' - 'VxdWVzdBogLndoZXJlX2NoaWxkX2J1cy52MS5QaW5nUmVzcG9uc2U='); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart index 11d77727..1a965a9e 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -9,12 +9,11 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $1; +import 'resources.pb.dart' as $6; class NurseryLoginRequest extends $pb.GeneratedMessage { factory NurseryLoginRequest({ @@ -83,7 +82,7 @@ class NurseryLoginRequest extends $pb.GeneratedMessage { class NurseryLoginResponse extends $pb.GeneratedMessage { factory NurseryLoginResponse({ $core.bool? success, - $1.Nursery? nursery, + $6.Nursery? nursery, }) { final $result = create(); if (success != null) { @@ -100,7 +99,7 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$1.Nursery>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $1.Nursery.create) + ..aOM<$6.Nursery>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $6.Nursery.create) ..hasRequiredFields = false ; @@ -135,24 +134,15 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $1.Nursery get nursery => $_getN(1); + $6.Nursery get nursery => $_getN(1); @$pb.TagNumber(2) - set nursery($1.Nursery v) { setField(2, v); } + set nursery($6.Nursery v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasNursery() => $_has(1); @$pb.TagNumber(2) void clearNursery() => clearField(2); @$pb.TagNumber(2) - $1.Nursery ensureNursery() => $_ensure(1); -} - -class NurseryServiceApi { - $pb.RpcClient _client; - NurseryServiceApi(this._client); - - $async.Future nurseryLogin($pb.ClientContext? ctx, NurseryLoginRequest request) => - _client.invoke(ctx, 'NurseryService', 'NurseryLogin', request, NurseryLoginResponse()) - ; + $6.Nursery ensureNursery() => $_ensure(1); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart new file mode 100644 index 00000000..b18831d3 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/nursery.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'nursery.pb.dart' as $4; + +export 'nursery.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.NurseryService') +class NurseryServiceClient extends $grpc.Client { + static final _$nurseryLogin = $grpc.ClientMethod<$4.NurseryLoginRequest, $4.NurseryLoginResponse>( + '/where_child_bus.v1.NurseryService/NurseryLogin', + ($4.NurseryLoginRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $4.NurseryLoginResponse.fromBuffer(value)); + + NurseryServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$4.NurseryLoginResponse> nurseryLogin($4.NurseryLoginRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$nurseryLogin, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.NurseryService') +abstract class NurseryServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.NurseryService'; + + NurseryServiceBase() { + $addMethod($grpc.ServiceMethod<$4.NurseryLoginRequest, $4.NurseryLoginResponse>( + 'NurseryLogin', + nurseryLogin_Pre, + false, + false, + ($core.List<$core.int> value) => $4.NurseryLoginRequest.fromBuffer(value), + ($4.NurseryLoginResponse value) => value.writeToBuffer())); + } + + $async.Future<$4.NurseryLoginResponse> nurseryLogin_Pre($grpc.ServiceCall call, $async.Future<$4.NurseryLoginRequest> request) async { + return nurseryLogin(call, await request); + } + + $async.Future<$4.NurseryLoginResponse> nurseryLogin($grpc.ServiceCall call, $4.NurseryLoginRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart index 26f47688..dc75189a 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart @@ -13,9 +13,6 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -import '../../google/protobuf/timestamp.pbjson.dart' as $0; -import 'resources.pbjson.dart' as $1; - @$core.Deprecated('Use nurseryLoginRequestDescriptor instead') const NurseryLoginRequest$json = { '1': 'NurseryLoginRequest', @@ -44,24 +41,3 @@ final $typed_data.Uint8List nurseryLoginResponseDescriptor = $convert.base64Deco 'ChROdXJzZXJ5TG9naW5SZXNwb25zZRIYCgdzdWNjZXNzGAEgASgIUgdzdWNjZXNzEjUKB251cn' 'NlcnkYAiABKAsyGy53aGVyZV9jaGlsZF9idXMudjEuTnVyc2VyeVIHbnVyc2VyeQ=='); -const $core.Map<$core.String, $core.dynamic> NurseryServiceBase$json = { - '1': 'NurseryService', - '2': [ - {'1': 'NurseryLogin', '2': '.where_child_bus.v1.NurseryLoginRequest', '3': '.where_child_bus.v1.NurseryLoginResponse'}, - ], -}; - -@$core.Deprecated('Use nurseryServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> NurseryServiceBase$messageJson = { - '.where_child_bus.v1.NurseryLoginRequest': NurseryLoginRequest$json, - '.where_child_bus.v1.NurseryLoginResponse': NurseryLoginResponse$json, - '.where_child_bus.v1.Nursery': $1.Nursery$json, - '.google.protobuf.Timestamp': $0.Timestamp$json, -}; - -/// Descriptor for `NurseryService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List nurseryServiceDescriptor = $convert.base64Decode( - 'Cg5OdXJzZXJ5U2VydmljZRJhCgxOdXJzZXJ5TG9naW4SJy53aGVyZV9jaGlsZF9idXMudjEuTn' - 'Vyc2VyeUxvZ2luUmVxdWVzdBooLndoZXJlX2NoaWxkX2J1cy52MS5OdXJzZXJ5TG9naW5SZXNw' - 'b25zZQ=='); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 8ddbc3d8..d53c5494 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -13,7 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/timestamp.pb.dart' as $0; +import '../../google/protobuf/timestamp.pb.dart' as $5; import 'resources.pbenum.dart'; export 'resources.pbenum.dart'; @@ -27,8 +27,8 @@ class Nursery extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.String? email, $core.String? encryptedPassword, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -72,8 +72,8 @@ class Nursery extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') ..aOS(7, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -162,26 +162,26 @@ class Nursery extends $pb.GeneratedMessage { void clearEncryptedPassword() => clearField(7); @$pb.TagNumber(8) - $0.Timestamp get createdAt => $_getN(7); + $5.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($0.Timestamp v) { setField(8, v); } + set createdAt($5.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureCreatedAt() => $_ensure(7); + $5.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $0.Timestamp get updatedAt => $_getN(8); + $5.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($0.Timestamp v) { setField(9, v); } + set updatedAt($5.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $0.Timestamp ensureUpdatedAt() => $_ensure(8); + $5.Timestamp ensureUpdatedAt() => $_ensure(8); } class NurseryReponse extends $pb.GeneratedMessage { @@ -191,8 +191,8 @@ class NurseryReponse extends $pb.GeneratedMessage { $core.String? name, $core.String? email, $core.String? phoneNumber, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -228,8 +228,8 @@ class NurseryReponse extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -301,26 +301,26 @@ class NurseryReponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(6) - $0.Timestamp get createdAt => $_getN(5); + $5.Timestamp get createdAt => $_getN(5); @$pb.TagNumber(6) - set createdAt($0.Timestamp v) { setField(6, v); } + set createdAt($5.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasCreatedAt() => $_has(5); @$pb.TagNumber(6) void clearCreatedAt() => clearField(6); @$pb.TagNumber(6) - $0.Timestamp ensureCreatedAt() => $_ensure(5); + $5.Timestamp ensureCreatedAt() => $_ensure(5); @$pb.TagNumber(7) - $0.Timestamp get updatedAt => $_getN(6); + $5.Timestamp get updatedAt => $_getN(6); @$pb.TagNumber(7) - set updatedAt($0.Timestamp v) { setField(7, v); } + set updatedAt($5.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasUpdatedAt() => $_has(6); @$pb.TagNumber(7) void clearUpdatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureUpdatedAt() => $_ensure(6); + $5.Timestamp ensureUpdatedAt() => $_ensure(6); } class Guardian extends $pb.GeneratedMessage { @@ -331,8 +331,8 @@ class Guardian extends $pb.GeneratedMessage { $core.String? email, $core.String? phoneNumber, $core.String? encryptedPassword, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -372,8 +372,8 @@ class Guardian extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -453,26 +453,26 @@ class Guardian extends $pb.GeneratedMessage { void clearEncryptedPassword() => clearField(6); @$pb.TagNumber(7) - $0.Timestamp get createdAt => $_getN(6); + $5.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($0.Timestamp v) { setField(7, v); } + set createdAt($5.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureCreatedAt() => $_ensure(6); + $5.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $0.Timestamp get updatedAt => $_getN(7); + $5.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($0.Timestamp v) { setField(8, v); } + set updatedAt($5.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureUpdatedAt() => $_ensure(7); + $5.Timestamp ensureUpdatedAt() => $_ensure(7); } class GuardianResponse extends $pb.GeneratedMessage { @@ -482,8 +482,8 @@ class GuardianResponse extends $pb.GeneratedMessage { $core.String? name, $core.String? email, $core.String? phoneNumber, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -519,8 +519,8 @@ class GuardianResponse extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -592,26 +592,26 @@ class GuardianResponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(6) - $0.Timestamp get createdAt => $_getN(5); + $5.Timestamp get createdAt => $_getN(5); @$pb.TagNumber(6) - set createdAt($0.Timestamp v) { setField(6, v); } + set createdAt($5.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasCreatedAt() => $_has(5); @$pb.TagNumber(6) void clearCreatedAt() => clearField(6); @$pb.TagNumber(6) - $0.Timestamp ensureCreatedAt() => $_ensure(5); + $5.Timestamp ensureCreatedAt() => $_ensure(5); @$pb.TagNumber(7) - $0.Timestamp get updatedAt => $_getN(6); + $5.Timestamp get updatedAt => $_getN(6); @$pb.TagNumber(7) - set updatedAt($0.Timestamp v) { setField(7, v); } + set updatedAt($5.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasUpdatedAt() => $_has(6); @$pb.TagNumber(7) void clearUpdatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureUpdatedAt() => $_ensure(6); + $5.Timestamp ensureUpdatedAt() => $_ensure(6); } class Bus extends $pb.GeneratedMessage { @@ -623,8 +623,8 @@ class Bus extends $pb.GeneratedMessage { Bus_Status? status, $core.double? latitude, $core.double? longitude, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -668,8 +668,8 @@ class Bus extends $pb.GeneratedMessage { ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Bus_Status.STATUS_UNSPECIFIED, valueOf: Bus_Status.valueOf, enumValues: Bus_Status.values) ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -759,26 +759,26 @@ class Bus extends $pb.GeneratedMessage { void clearLongitude() => clearField(7); @$pb.TagNumber(8) - $0.Timestamp get createdAt => $_getN(7); + $5.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($0.Timestamp v) { setField(8, v); } + set createdAt($5.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureCreatedAt() => $_ensure(7); + $5.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $0.Timestamp get updatedAt => $_getN(8); + $5.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($0.Timestamp v) { setField(9, v); } + set updatedAt($5.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $0.Timestamp ensureUpdatedAt() => $_ensure(8); + $5.Timestamp ensureUpdatedAt() => $_ensure(8); } class Child extends $pb.GeneratedMessage { @@ -797,8 +797,8 @@ class Child extends $pb.GeneratedMessage { $core.bool? hasWaterBottle, $core.bool? hasUmbrera, $core.bool? hasOther, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -870,8 +870,8 @@ class Child extends $pb.GeneratedMessage { ..aOB(12, _omitFieldNames ? '' : 'hasWaterBottle') ..aOB(13, _omitFieldNames ? '' : 'hasUmbrera') ..aOB(14, _omitFieldNames ? '' : 'hasOther') - ..aOM<$0.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -1023,26 +1023,26 @@ class Child extends $pb.GeneratedMessage { void clearHasOther() => clearField(14); @$pb.TagNumber(15) - $0.Timestamp get createdAt => $_getN(14); + $5.Timestamp get createdAt => $_getN(14); @$pb.TagNumber(15) - set createdAt($0.Timestamp v) { setField(15, v); } + set createdAt($5.Timestamp v) { setField(15, v); } @$pb.TagNumber(15) $core.bool hasCreatedAt() => $_has(14); @$pb.TagNumber(15) void clearCreatedAt() => clearField(15); @$pb.TagNumber(15) - $0.Timestamp ensureCreatedAt() => $_ensure(14); + $5.Timestamp ensureCreatedAt() => $_ensure(14); @$pb.TagNumber(16) - $0.Timestamp get updatedAt => $_getN(15); + $5.Timestamp get updatedAt => $_getN(15); @$pb.TagNumber(16) - set updatedAt($0.Timestamp v) { setField(16, v); } + set updatedAt($5.Timestamp v) { setField(16, v); } @$pb.TagNumber(16) $core.bool hasUpdatedAt() => $_has(15); @$pb.TagNumber(16) void clearUpdatedAt() => clearField(16); @$pb.TagNumber(16) - $0.Timestamp ensureUpdatedAt() => $_ensure(15); + $5.Timestamp ensureUpdatedAt() => $_ensure(15); } class Station extends $pb.GeneratedMessage { @@ -1053,8 +1053,8 @@ class Station extends $pb.GeneratedMessage { $core.double? longitude, $core.int? morningOrder, $core.int? eveningOrder, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1094,8 +1094,8 @@ class Station extends $pb.GeneratedMessage { ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.int>(5, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) ..a<$core.int>(6, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -1175,26 +1175,26 @@ class Station extends $pb.GeneratedMessage { void clearEveningOrder() => clearField(6); @$pb.TagNumber(7) - $0.Timestamp get createdAt => $_getN(6); + $5.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($0.Timestamp v) { setField(7, v); } + set createdAt($5.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureCreatedAt() => $_ensure(6); + $5.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $0.Timestamp get updatedAt => $_getN(7); + $5.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($0.Timestamp v) { setField(8, v); } + set updatedAt($5.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureUpdatedAt() => $_ensure(7); + $5.Timestamp ensureUpdatedAt() => $_ensure(7); } class ChildBusAssociation extends $pb.GeneratedMessage { @@ -1359,8 +1359,8 @@ class ChildPhoto extends $pb.GeneratedMessage { $core.String? childId, $core.String? s3Bucket, $core.String? s3Key, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1392,8 +1392,8 @@ class ChildPhoto extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 's3Bucket') ..aOS(4, _omitFieldNames ? '' : 's3Key') - ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -1455,26 +1455,26 @@ class ChildPhoto extends $pb.GeneratedMessage { void clearS3Key() => clearField(4); @$pb.TagNumber(5) - $0.Timestamp get createdAt => $_getN(4); + $5.Timestamp get createdAt => $_getN(4); @$pb.TagNumber(5) - set createdAt($0.Timestamp v) { setField(5, v); } + set createdAt($5.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasCreatedAt() => $_has(4); @$pb.TagNumber(5) void clearCreatedAt() => clearField(5); @$pb.TagNumber(5) - $0.Timestamp ensureCreatedAt() => $_ensure(4); + $5.Timestamp ensureCreatedAt() => $_ensure(4); @$pb.TagNumber(6) - $0.Timestamp get updatedAt => $_getN(5); + $5.Timestamp get updatedAt => $_getN(5); @$pb.TagNumber(6) - set updatedAt($0.Timestamp v) { setField(6, v); } + set updatedAt($5.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasUpdatedAt() => $_has(5); @$pb.TagNumber(6) void clearUpdatedAt() => clearField(6); @$pb.TagNumber(6) - $0.Timestamp ensureUpdatedAt() => $_ensure(5); + $5.Timestamp ensureUpdatedAt() => $_ensure(5); } class BoardingRecord extends $pb.GeneratedMessage { @@ -1483,7 +1483,7 @@ class BoardingRecord extends $pb.GeneratedMessage { $core.String? childId, $core.String? busId, $core.bool? isBoarding, - $0.Timestamp? timestamp, + $5.Timestamp? timestamp, }) { final $result = create(); if (id != null) { @@ -1512,7 +1512,7 @@ class BoardingRecord extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 'busId') ..aOB(4, _omitFieldNames ? '' : 'isBoarding') - ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -1574,15 +1574,15 @@ class BoardingRecord extends $pb.GeneratedMessage { void clearIsBoarding() => clearField(4); @$pb.TagNumber(5) - $0.Timestamp get timestamp => $_getN(4); + $5.Timestamp get timestamp => $_getN(4); @$pb.TagNumber(5) - set timestamp($0.Timestamp v) { setField(5, v); } + set timestamp($5.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasTimestamp() => $_has(4); @$pb.TagNumber(5) void clearTimestamp() => clearField(5); @$pb.TagNumber(5) - $0.Timestamp ensureTimestamp() => $_ensure(4); + $5.Timestamp ensureTimestamp() => $_ensure(4); } From db0d07e4f6cce10152d5c0c7ec73ac54cee050a5 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 17:44:27 +0900 Subject: [PATCH 101/771] =?UTF-8?q?refactor:List=E3=81=AEElement=E3=82=92?= =?UTF-8?q?=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 61ab38e7..46887ce8 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -50,18 +50,23 @@ class BottomSheetWidget extends StatelessWidget { itemBuilder: (context, index) { return Padding( padding: const EdgeInsets.fromLTRB(50, 10, 0, 0), - child: Text( - busStationsList[index], - textAlign: TextAlign.left, - style: const TextStyle( - fontSize: 18, - ), - ), + child: stationsListElement(busStationsList[index]), ); }, ); } + + Widget stationsListElement(String stationName) { + return Text( + stationName, + textAlign: TextAlign.left, + style: const TextStyle( + fontSize: 18, + ), + ); + } + Widget courseAndOperator(String courseName, String operatorName) { return Padding( padding: const EdgeInsets.only(left:30), From 81644db264c34aaec4cacd63119e592e2ad20121 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 17:56:26 +0900 Subject: [PATCH 102/771] =?UTF-8?q?chore(proto):=20timestamp=E5=91=A8?= =?UTF-8?q?=E3=82=8A=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../google/protobuf/timestamp.pb.dart | 188 ++++++++++++++++++ .../google/protobuf/timestamp.pbenum.dart | 11 + .../google/protobuf/timestamp.pbjson.dart | 29 +++ .../google/protobuf/timestamp.pbserver.dart | 14 ++ .../proto-gen/where_child_bus/v1/bus.pb.dart | 18 +- .../where_child_bus/v1/bus.pbgrpc.dart | 59 ------ .../where_child_bus/v1/bus.pbjson.dart | 24 +++ .../where_child_bus/v1/child.pb.dart | 27 ++- .../where_child_bus/v1/child.pbgrpc.dart | 79 -------- .../where_child_bus/v1/child.pbjson.dart | 30 +++ .../where_child_bus/v1/guardian.pb.dart | 32 ++- .../where_child_bus/v1/guardian.pbgrpc.dart | 59 ------ .../where_child_bus/v1/guardian.pbjson.dart | 25 +++ .../where_child_bus/v1/health_check.pb.dart | 10 + .../v1/health_check.pbgrpc.dart | 59 ------ .../v1/health_check.pbjson.dart | 18 ++ .../where_child_bus/v1/nursery.pb.dart | 22 +- .../where_child_bus/v1/nursery.pbgrpc.dart | 59 ------ .../where_child_bus/v1/nursery.pbjson.dart | 24 +++ .../where_child_bus/v1/resources.pb.dart | 172 ++++++++-------- 20 files changed, 530 insertions(+), 429 deletions(-) create mode 100644 frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pb.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbenum.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbjson.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbserver.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pb.dart b/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pb.dart new file mode 100644 index 00000000..ea44b44e --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pb.dart @@ -0,0 +1,188 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; +import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; + +/// A Timestamp represents a point in time independent of any time zone or local +/// calendar, encoded as a count of seconds and fractions of seconds at +/// nanosecond resolution. The count is relative to an epoch at UTC midnight on +/// January 1, 1970, in the proleptic Gregorian calendar which extends the +/// Gregorian calendar backwards to year one. +/// +/// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +/// second table is needed for interpretation, using a [24-hour linear +/// smear](https://developers.google.com/time/smear). +/// +/// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +/// restricting to that range, we ensure that we can convert to and from [RFC +/// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. +/// +/// # Examples +/// +/// Example 1: Compute Timestamp from POSIX `time()`. +/// +/// Timestamp timestamp; +/// timestamp.set_seconds(time(NULL)); +/// timestamp.set_nanos(0); +/// +/// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +/// +/// struct timeval tv; +/// gettimeofday(&tv, NULL); +/// +/// Timestamp timestamp; +/// timestamp.set_seconds(tv.tv_sec); +/// timestamp.set_nanos(tv.tv_usec * 1000); +/// +/// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +/// +/// FILETIME ft; +/// GetSystemTimeAsFileTime(&ft); +/// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +/// +/// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +/// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +/// Timestamp timestamp; +/// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +/// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +/// +/// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +/// +/// long millis = System.currentTimeMillis(); +/// +/// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +/// .setNanos((int) ((millis % 1000) * 1000000)).build(); +/// +/// Example 5: Compute Timestamp from Java `Instant.now()`. +/// +/// Instant now = Instant.now(); +/// +/// Timestamp timestamp = +/// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) +/// .setNanos(now.getNano()).build(); +/// +/// Example 6: Compute Timestamp from current time in Python. +/// +/// timestamp = Timestamp() +/// timestamp.GetCurrentTime() +/// +/// # JSON Mapping +/// +/// In JSON format, the Timestamp type is encoded as a string in the +/// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +/// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +/// where {year} is always expressed using four digits while {month}, {day}, +/// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +/// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +/// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +/// is required. A proto3 JSON serializer should always use UTC (as indicated by +/// "Z") when printing the Timestamp type and a proto3 JSON parser should be +/// able to accept both UTC and other timezones (as indicated by an offset). +/// +/// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +/// 01:30 UTC on January 15, 2017. +/// +/// In JavaScript, one can convert a Date object to this format using the +/// standard +/// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) +/// method. In Python, a standard `datetime.datetime` object can be converted +/// to this format using +/// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +/// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +/// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +/// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() +/// ) to obtain a formatter capable of generating timestamps in this format. +class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin { + factory Timestamp({ + $fixnum.Int64? seconds, + $core.int? nanos, + }) { + final $result = create(); + if (seconds != null) { + $result.seconds = seconds; + } + if (nanos != null) { + $result.nanos = nanos; + } + return $result; + } + Timestamp._() : super(); + factory Timestamp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Timestamp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Timestamp', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.TimestampMixin.toProto3JsonHelper, fromProto3Json: $mixin.TimestampMixin.fromProto3JsonHelper) + ..aInt64(1, _omitFieldNames ? '' : 'seconds') + ..a<$core.int>(2, _omitFieldNames ? '' : 'nanos', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Timestamp clone() => Timestamp()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Timestamp copyWith(void Function(Timestamp) updates) => super.copyWith((message) => updates(message as Timestamp)) as Timestamp; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Timestamp create() => Timestamp._(); + Timestamp createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Timestamp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Timestamp? _defaultInstance; + + /// Represents seconds of UTC time since Unix epoch + /// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + /// 9999-12-31T23:59:59Z inclusive. + @$pb.TagNumber(1) + $fixnum.Int64 get seconds => $_getI64(0); + @$pb.TagNumber(1) + set seconds($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasSeconds() => $_has(0); + @$pb.TagNumber(1) + void clearSeconds() => clearField(1); + + /// Non-negative fractions of a second at nanosecond resolution. Negative + /// second values with fractions must still have non-negative nanos values + /// that count forward in time. Must be from 0 to 999,999,999 + /// inclusive. + @$pb.TagNumber(2) + $core.int get nanos => $_getIZ(1); + @$pb.TagNumber(2) + set nanos($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasNanos() => $_has(1); + @$pb.TagNumber(2) + void clearNanos() => clearField(2); + /// Creates a new instance from [dateTime]. + /// + /// Time zone information will not be preserved. + static Timestamp fromDateTime($core.DateTime dateTime) { + final result = create(); + $mixin.TimestampMixin.setFromDateTime(result, dateTime); + return result; + } +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbenum.dart new file mode 100644 index 00000000..30275f6a --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbjson.dart new file mode 100644 index 00000000..3dfd63b5 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbjson.dart @@ -0,0 +1,29 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use timestampDescriptor instead') +const Timestamp$json = { + '1': 'Timestamp', + '2': [ + {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, + {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, + ], +}; + +/// Descriptor for `Timestamp`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List timestampDescriptor = $convert.base64Decode( + 'CglUaW1lc3RhbXASGAoHc2Vjb25kcxgBIAEoA1IHc2Vjb25kcxIUCgVuYW5vcxgCIAEoBVIFbm' + 'Fub3M='); + diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbserver.dart new file mode 100644 index 00000000..6580f167 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'timestamp.pb.dart'; + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart index e0a16b03..fd74729c 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -9,11 +9,12 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import +import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $6; +import 'resources.pb.dart' as $1; class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { factory GetBusListByNurseryIdRequest({ @@ -67,7 +68,7 @@ class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetBusListByNurseryIdResponse({ - $core.Iterable<$6.Bus>? buses, + $core.Iterable<$1.Bus>? buses, }) { final $result = create(); if (buses != null) { @@ -80,7 +81,7 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetBusListByNurseryIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusListByNurseryIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$6.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $6.Bus.create) + ..pc<$1.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $1.Bus.create) ..hasRequiredFields = false ; @@ -106,7 +107,16 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { static GetBusListByNurseryIdResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$6.Bus> get buses => $_getList(0); + $core.List<$1.Bus> get buses => $_getList(0); +} + +class BusServiceApi { + $pb.RpcClient _client; + BusServiceApi(this._client); + + $async.Future getBusListByNurseryId($pb.ClientContext? ctx, GetBusListByNurseryIdRequest request) => + _client.invoke(ctx, 'BusService', 'GetBusListByNurseryId', request, GetBusListByNurseryIdResponse()) + ; } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart deleted file mode 100644 index 393315ee..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart +++ /dev/null @@ -1,59 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/bus.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:grpc/service_api.dart' as $grpc; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'bus.pb.dart' as $0; - -export 'bus.pb.dart'; - -@$pb.GrpcServiceName('where_child_bus.v1.BusService') -class BusServiceClient extends $grpc.Client { - static final _$getBusListByNurseryId = $grpc.ClientMethod<$0.GetBusListByNurseryIdRequest, $0.GetBusListByNurseryIdResponse>( - '/where_child_bus.v1.BusService/GetBusListByNurseryId', - ($0.GetBusListByNurseryIdRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $0.GetBusListByNurseryIdResponse.fromBuffer(value)); - - BusServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, - interceptors: interceptors); - - $grpc.ResponseFuture<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($0.GetBusListByNurseryIdRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$getBusListByNurseryId, request, options: options); - } -} - -@$pb.GrpcServiceName('where_child_bus.v1.BusService') -abstract class BusServiceBase extends $grpc.Service { - $core.String get $name => 'where_child_bus.v1.BusService'; - - BusServiceBase() { - $addMethod($grpc.ServiceMethod<$0.GetBusListByNurseryIdRequest, $0.GetBusListByNurseryIdResponse>( - 'GetBusListByNurseryId', - getBusListByNurseryId_Pre, - false, - false, - ($core.List<$core.int> value) => $0.GetBusListByNurseryIdRequest.fromBuffer(value), - ($0.GetBusListByNurseryIdResponse value) => value.writeToBuffer())); - } - - $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId_Pre($grpc.ServiceCall call, $async.Future<$0.GetBusListByNurseryIdRequest> request) async { - return getBusListByNurseryId(call, await request); - } - - $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($grpc.ServiceCall call, $0.GetBusListByNurseryIdRequest request); -} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 11fc1604..e4054514 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -13,6 +13,9 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +import '../../google/protobuf/timestamp.pbjson.dart' as $0; +import 'resources.pbjson.dart' as $1; + @$core.Deprecated('Use getBusListByNurseryIdRequestDescriptor instead') const GetBusListByNurseryIdRequest$json = { '1': 'GetBusListByNurseryIdRequest', @@ -39,3 +42,24 @@ final $typed_data.Uint8List getBusListByNurseryIdResponseDescriptor = $convert.b 'Ch1HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXNwb25zZRItCgVidXNlcxgBIAMoCzIXLndoZXJlX2' 'NoaWxkX2J1cy52MS5CdXNSBWJ1c2Vz'); +const $core.Map<$core.String, $core.dynamic> BusServiceBase$json = { + '1': 'BusService', + '2': [ + {'1': 'GetBusListByNurseryId', '2': '.where_child_bus.v1.GetBusListByNurseryIdRequest', '3': '.where_child_bus.v1.GetBusListByNurseryIdResponse'}, + ], +}; + +@$core.Deprecated('Use busServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> BusServiceBase$messageJson = { + '.where_child_bus.v1.GetBusListByNurseryIdRequest': GetBusListByNurseryIdRequest$json, + '.where_child_bus.v1.GetBusListByNurseryIdResponse': GetBusListByNurseryIdResponse$json, + '.where_child_bus.v1.Bus': $1.Bus$json, + '.google.protobuf.Timestamp': $0.Timestamp$json, +}; + +/// Descriptor for `BusService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List busServiceDescriptor = $convert.base64Decode( + 'CgpCdXNTZXJ2aWNlEnwKFUdldEJ1c0xpc3RCeU51cnNlcnlJZBIwLndoZXJlX2NoaWxkX2J1cy' + '52MS5HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXF1ZXN0GjEud2hlcmVfY2hpbGRfYnVzLnYxLkdl' + 'dEJ1c0xpc3RCeU51cnNlcnlJZFJlc3BvbnNl'); + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart index acfc7397..59b94e39 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -9,11 +9,12 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import +import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $6; +import 'resources.pb.dart' as $1; class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { factory GetChildListByNurseryIDRequest({ @@ -67,7 +68,7 @@ class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse({ - $core.Iterable<$6.Child>? children, + $core.Iterable<$1.Child>? children, }) { final $result = create(); if (children != null) { @@ -80,7 +81,7 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByNurseryIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$6.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $6.Child.create) + ..pc<$1.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $1.Child.create) ..hasRequiredFields = false ; @@ -106,7 +107,7 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { static GetChildListByNurseryIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$6.Child> get children => $_getList(0); + $core.List<$1.Child> get children => $_getList(0); } class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { @@ -161,7 +162,7 @@ class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse({ - $core.Iterable<$6.Child>? children, + $core.Iterable<$1.Child>? children, }) { final $result = create(); if (children != null) { @@ -174,7 +175,7 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByGuardianIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$6.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $6.Child.create) + ..pc<$1.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $1.Child.create) ..hasRequiredFields = false ; @@ -200,7 +201,19 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { static GetChildListByGuardianIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$6.Child> get children => $_getList(0); + $core.List<$1.Child> get children => $_getList(0); +} + +class ChildServiceApi { + $pb.RpcClient _client; + ChildServiceApi(this._client); + + $async.Future getChildListByNurseryID($pb.ClientContext? ctx, GetChildListByNurseryIDRequest request) => + _client.invoke(ctx, 'ChildService', 'GetChildListByNurseryID', request, GetChildListByNurseryIDResponse()) + ; + $async.Future getChildListByGuardianID($pb.ClientContext? ctx, GetChildListByGuardianIDRequest request) => + _client.invoke(ctx, 'ChildService', 'GetChildListByGuardianID', request, GetChildListByGuardianIDResponse()) + ; } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart deleted file mode 100644 index 35ad0c72..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart +++ /dev/null @@ -1,79 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/child.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:grpc/service_api.dart' as $grpc; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'child.pb.dart' as $1; - -export 'child.pb.dart'; - -@$pb.GrpcServiceName('where_child_bus.v1.ChildService') -class ChildServiceClient extends $grpc.Client { - static final _$getChildListByNurseryID = $grpc.ClientMethod<$1.GetChildListByNurseryIDRequest, $1.GetChildListByNurseryIDResponse>( - '/where_child_bus.v1.ChildService/GetChildListByNurseryID', - ($1.GetChildListByNurseryIDRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.GetChildListByNurseryIDResponse.fromBuffer(value)); - static final _$getChildListByGuardianID = $grpc.ClientMethod<$1.GetChildListByGuardianIDRequest, $1.GetChildListByGuardianIDResponse>( - '/where_child_bus.v1.ChildService/GetChildListByGuardianID', - ($1.GetChildListByGuardianIDRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.GetChildListByGuardianIDResponse.fromBuffer(value)); - - ChildServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, - interceptors: interceptors); - - $grpc.ResponseFuture<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($1.GetChildListByNurseryIDRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$getChildListByNurseryID, request, options: options); - } - - $grpc.ResponseFuture<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($1.GetChildListByGuardianIDRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$getChildListByGuardianID, request, options: options); - } -} - -@$pb.GrpcServiceName('where_child_bus.v1.ChildService') -abstract class ChildServiceBase extends $grpc.Service { - $core.String get $name => 'where_child_bus.v1.ChildService'; - - ChildServiceBase() { - $addMethod($grpc.ServiceMethod<$1.GetChildListByNurseryIDRequest, $1.GetChildListByNurseryIDResponse>( - 'GetChildListByNurseryID', - getChildListByNurseryID_Pre, - false, - false, - ($core.List<$core.int> value) => $1.GetChildListByNurseryIDRequest.fromBuffer(value), - ($1.GetChildListByNurseryIDResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.GetChildListByGuardianIDRequest, $1.GetChildListByGuardianIDResponse>( - 'GetChildListByGuardianID', - getChildListByGuardianID_Pre, - false, - false, - ($core.List<$core.int> value) => $1.GetChildListByGuardianIDRequest.fromBuffer(value), - ($1.GetChildListByGuardianIDResponse value) => value.writeToBuffer())); - } - - $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByNurseryIDRequest> request) async { - return getChildListByNurseryID(call, await request); - } - - $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByGuardianIDRequest> request) async { - return getChildListByGuardianID(call, await request); - } - - $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); - $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($grpc.ServiceCall call, $1.GetChildListByGuardianIDRequest request); -} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart index ceef43cf..e310f4cb 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -13,6 +13,9 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +import '../../google/protobuf/timestamp.pbjson.dart' as $0; +import 'resources.pbjson.dart' as $1; + @$core.Deprecated('Use getChildListByNurseryIDRequestDescriptor instead') const GetChildListByNurseryIDRequest$json = { '1': 'GetChildListByNurseryIDRequest', @@ -65,3 +68,30 @@ final $typed_data.Uint8List getChildListByGuardianIDResponseDescriptor = $conver 'CiBHZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZXNwb25zZRI1CghjaGlsZHJlbhgBIAMoCzIZLn' 'doZXJlX2NoaWxkX2J1cy52MS5DaGlsZFIIY2hpbGRyZW4='); +const $core.Map<$core.String, $core.dynamic> ChildServiceBase$json = { + '1': 'ChildService', + '2': [ + {'1': 'GetChildListByNurseryID', '2': '.where_child_bus.v1.GetChildListByNurseryIDRequest', '3': '.where_child_bus.v1.GetChildListByNurseryIDResponse'}, + {'1': 'GetChildListByGuardianID', '2': '.where_child_bus.v1.GetChildListByGuardianIDRequest', '3': '.where_child_bus.v1.GetChildListByGuardianIDResponse'}, + ], +}; + +@$core.Deprecated('Use childServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> ChildServiceBase$messageJson = { + '.where_child_bus.v1.GetChildListByNurseryIDRequest': GetChildListByNurseryIDRequest$json, + '.where_child_bus.v1.GetChildListByNurseryIDResponse': GetChildListByNurseryIDResponse$json, + '.where_child_bus.v1.Child': $1.Child$json, + '.google.protobuf.Timestamp': $0.Timestamp$json, + '.where_child_bus.v1.GetChildListByGuardianIDRequest': GetChildListByGuardianIDRequest$json, + '.where_child_bus.v1.GetChildListByGuardianIDResponse': GetChildListByGuardianIDResponse$json, +}; + +/// Descriptor for `ChildService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List childServiceDescriptor = $convert.base64Decode( + 'CgxDaGlsZFNlcnZpY2USggEKF0dldENoaWxkTGlzdEJ5TnVyc2VyeUlEEjIud2hlcmVfY2hpbG' + 'RfYnVzLnYxLkdldENoaWxkTGlzdEJ5TnVyc2VyeUlEUmVxdWVzdBozLndoZXJlX2NoaWxkX2J1' + 'cy52MS5HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEoUBChhHZXRDaGlsZExpc3RCeU' + 'd1YXJkaWFuSUQSMy53aGVyZV9jaGlsZF9idXMudjEuR2V0Q2hpbGRMaXN0QnlHdWFyZGlhbklE' + 'UmVxdWVzdBo0LndoZXJlX2NoaWxkX2J1cy52MS5HZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZX' + 'Nwb25zZQ=='); + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 18ab923a..06a4aeff 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -9,11 +9,12 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import +import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $6; +import 'resources.pb.dart' as $1; class GuardianLoginRequest extends $pb.GeneratedMessage { factory GuardianLoginRequest({ @@ -82,8 +83,8 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { class GuardianLoginResponse extends $pb.GeneratedMessage { factory GuardianLoginResponse({ $core.bool? success, - $6.GuardianResponse? guardian, - $6.NurseryReponse? nursery, + $1.GuardianResponse? guardian, + $1.NurseryReponse? nursery, }) { final $result = create(); if (success != null) { @@ -103,8 +104,8 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$6.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $6.GuardianResponse.create) - ..aOM<$6.NurseryReponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $6.NurseryReponse.create) + ..aOM<$1.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $1.GuardianResponse.create) + ..aOM<$1.NurseryReponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $1.NurseryReponse.create) ..hasRequiredFields = false ; @@ -139,26 +140,35 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $6.GuardianResponse get guardian => $_getN(1); + $1.GuardianResponse get guardian => $_getN(1); @$pb.TagNumber(2) - set guardian($6.GuardianResponse v) { setField(2, v); } + set guardian($1.GuardianResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasGuardian() => $_has(1); @$pb.TagNumber(2) void clearGuardian() => clearField(2); @$pb.TagNumber(2) - $6.GuardianResponse ensureGuardian() => $_ensure(1); + $1.GuardianResponse ensureGuardian() => $_ensure(1); @$pb.TagNumber(3) - $6.NurseryReponse get nursery => $_getN(2); + $1.NurseryReponse get nursery => $_getN(2); @$pb.TagNumber(3) - set nursery($6.NurseryReponse v) { setField(3, v); } + set nursery($1.NurseryReponse v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasNursery() => $_has(2); @$pb.TagNumber(3) void clearNursery() => clearField(3); @$pb.TagNumber(3) - $6.NurseryReponse ensureNursery() => $_ensure(2); + $1.NurseryReponse ensureNursery() => $_ensure(2); +} + +class GuardianServiceApi { + $pb.RpcClient _client; + GuardianServiceApi(this._client); + + $async.Future guardianLogin($pb.ClientContext? ctx, GuardianLoginRequest request) => + _client.invoke(ctx, 'GuardianService', 'GuardianLogin', request, GuardianLoginResponse()) + ; } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart deleted file mode 100644 index a0ac6e24..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart +++ /dev/null @@ -1,59 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/guardian.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:grpc/service_api.dart' as $grpc; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'guardian.pb.dart' as $2; - -export 'guardian.pb.dart'; - -@$pb.GrpcServiceName('where_child_bus.v1.GuardianService') -class GuardianServiceClient extends $grpc.Client { - static final _$guardianLogin = $grpc.ClientMethod<$2.GuardianLoginRequest, $2.GuardianLoginResponse>( - '/where_child_bus.v1.GuardianService/GuardianLogin', - ($2.GuardianLoginRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $2.GuardianLoginResponse.fromBuffer(value)); - - GuardianServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, - interceptors: interceptors); - - $grpc.ResponseFuture<$2.GuardianLoginResponse> guardianLogin($2.GuardianLoginRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$guardianLogin, request, options: options); - } -} - -@$pb.GrpcServiceName('where_child_bus.v1.GuardianService') -abstract class GuardianServiceBase extends $grpc.Service { - $core.String get $name => 'where_child_bus.v1.GuardianService'; - - GuardianServiceBase() { - $addMethod($grpc.ServiceMethod<$2.GuardianLoginRequest, $2.GuardianLoginResponse>( - 'GuardianLogin', - guardianLogin_Pre, - false, - false, - ($core.List<$core.int> value) => $2.GuardianLoginRequest.fromBuffer(value), - ($2.GuardianLoginResponse value) => value.writeToBuffer())); - } - - $async.Future<$2.GuardianLoginResponse> guardianLogin_Pre($grpc.ServiceCall call, $async.Future<$2.GuardianLoginRequest> request) async { - return guardianLogin(call, await request); - } - - $async.Future<$2.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $2.GuardianLoginRequest request); -} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart index 53d8a6b8..76332fb3 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -13,6 +13,9 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +import '../../google/protobuf/timestamp.pbjson.dart' as $0; +import 'resources.pbjson.dart' as $1; + @$core.Deprecated('Use guardianLoginRequestDescriptor instead') const GuardianLoginRequest$json = { '1': 'GuardianLoginRequest', @@ -44,3 +47,25 @@ final $typed_data.Uint8List guardianLoginResponseDescriptor = $convert.base64Dec 'ZGlhbhI8CgdudXJzZXJ5GAMgASgLMiIud2hlcmVfY2hpbGRfYnVzLnYxLk51cnNlcnlSZXBvbn' 'NlUgdudXJzZXJ5'); +const $core.Map<$core.String, $core.dynamic> GuardianServiceBase$json = { + '1': 'GuardianService', + '2': [ + {'1': 'GuardianLogin', '2': '.where_child_bus.v1.GuardianLoginRequest', '3': '.where_child_bus.v1.GuardianLoginResponse'}, + ], +}; + +@$core.Deprecated('Use guardianServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> GuardianServiceBase$messageJson = { + '.where_child_bus.v1.GuardianLoginRequest': GuardianLoginRequest$json, + '.where_child_bus.v1.GuardianLoginResponse': GuardianLoginResponse$json, + '.where_child_bus.v1.GuardianResponse': $1.GuardianResponse$json, + '.google.protobuf.Timestamp': $0.Timestamp$json, + '.where_child_bus.v1.NurseryReponse': $1.NurseryReponse$json, +}; + +/// Descriptor for `GuardianService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List guardianServiceDescriptor = $convert.base64Decode( + 'Cg9HdWFyZGlhblNlcnZpY2USZAoNR3VhcmRpYW5Mb2dpbhIoLndoZXJlX2NoaWxkX2J1cy52MS' + '5HdWFyZGlhbkxvZ2luUmVxdWVzdBopLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhbkxvZ2lu' + 'UmVzcG9uc2U='); + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart index dcbde2f5..a01651da 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart @@ -9,6 +9,7 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import +import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; @@ -113,6 +114,15 @@ class PingResponse extends $pb.GeneratedMessage { void clearMessage() => clearField(1); } +class HealthcheckServiceApi { + $pb.RpcClient _client; + HealthcheckServiceApi(this._client); + + $async.Future ping($pb.ClientContext? ctx, PingRequest request) => + _client.invoke(ctx, 'HealthcheckService', 'Ping', request, PingResponse()) + ; +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart deleted file mode 100644 index 3915bbb5..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart +++ /dev/null @@ -1,59 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:grpc/service_api.dart' as $grpc; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'health_check.pb.dart' as $3; - -export 'health_check.pb.dart'; - -@$pb.GrpcServiceName('where_child_bus.v1.HealthcheckService') -class HealthcheckServiceClient extends $grpc.Client { - static final _$ping = $grpc.ClientMethod<$3.PingRequest, $3.PingResponse>( - '/where_child_bus.v1.HealthcheckService/Ping', - ($3.PingRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $3.PingResponse.fromBuffer(value)); - - HealthcheckServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, - interceptors: interceptors); - - $grpc.ResponseFuture<$3.PingResponse> ping($3.PingRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$ping, request, options: options); - } -} - -@$pb.GrpcServiceName('where_child_bus.v1.HealthcheckService') -abstract class HealthcheckServiceBase extends $grpc.Service { - $core.String get $name => 'where_child_bus.v1.HealthcheckService'; - - HealthcheckServiceBase() { - $addMethod($grpc.ServiceMethod<$3.PingRequest, $3.PingResponse>( - 'Ping', - ping_Pre, - false, - false, - ($core.List<$core.int> value) => $3.PingRequest.fromBuffer(value), - ($3.PingResponse value) => value.writeToBuffer())); - } - - $async.Future<$3.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$3.PingRequest> request) async { - return ping(call, await request); - } - - $async.Future<$3.PingResponse> ping($grpc.ServiceCall call, $3.PingRequest request); -} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart index 201d4755..8255d4ea 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart @@ -37,3 +37,21 @@ const PingResponse$json = { final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); +const $core.Map<$core.String, $core.dynamic> HealthcheckServiceBase$json = { + '1': 'HealthcheckService', + '2': [ + {'1': 'Ping', '2': '.where_child_bus.v1.PingRequest', '3': '.where_child_bus.v1.PingResponse'}, + ], +}; + +@$core.Deprecated('Use healthcheckServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> HealthcheckServiceBase$messageJson = { + '.where_child_bus.v1.PingRequest': PingRequest$json, + '.where_child_bus.v1.PingResponse': PingResponse$json, +}; + +/// Descriptor for `HealthcheckService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List healthcheckServiceDescriptor = $convert.base64Decode( + 'ChJIZWFsdGhjaGVja1NlcnZpY2USSQoEUGluZxIfLndoZXJlX2NoaWxkX2J1cy52MS5QaW5nUm' + 'VxdWVzdBogLndoZXJlX2NoaWxkX2J1cy52MS5QaW5nUmVzcG9uc2U='); + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart index 1a965a9e..11d77727 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -9,11 +9,12 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import +import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $6; +import 'resources.pb.dart' as $1; class NurseryLoginRequest extends $pb.GeneratedMessage { factory NurseryLoginRequest({ @@ -82,7 +83,7 @@ class NurseryLoginRequest extends $pb.GeneratedMessage { class NurseryLoginResponse extends $pb.GeneratedMessage { factory NurseryLoginResponse({ $core.bool? success, - $6.Nursery? nursery, + $1.Nursery? nursery, }) { final $result = create(); if (success != null) { @@ -99,7 +100,7 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$6.Nursery>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $6.Nursery.create) + ..aOM<$1.Nursery>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $1.Nursery.create) ..hasRequiredFields = false ; @@ -134,15 +135,24 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $6.Nursery get nursery => $_getN(1); + $1.Nursery get nursery => $_getN(1); @$pb.TagNumber(2) - set nursery($6.Nursery v) { setField(2, v); } + set nursery($1.Nursery v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasNursery() => $_has(1); @$pb.TagNumber(2) void clearNursery() => clearField(2); @$pb.TagNumber(2) - $6.Nursery ensureNursery() => $_ensure(1); + $1.Nursery ensureNursery() => $_ensure(1); +} + +class NurseryServiceApi { + $pb.RpcClient _client; + NurseryServiceApi(this._client); + + $async.Future nurseryLogin($pb.ClientContext? ctx, NurseryLoginRequest request) => + _client.invoke(ctx, 'NurseryService', 'NurseryLogin', request, NurseryLoginResponse()) + ; } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart deleted file mode 100644 index b18831d3..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart +++ /dev/null @@ -1,59 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/nursery.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:grpc/service_api.dart' as $grpc; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'nursery.pb.dart' as $4; - -export 'nursery.pb.dart'; - -@$pb.GrpcServiceName('where_child_bus.v1.NurseryService') -class NurseryServiceClient extends $grpc.Client { - static final _$nurseryLogin = $grpc.ClientMethod<$4.NurseryLoginRequest, $4.NurseryLoginResponse>( - '/where_child_bus.v1.NurseryService/NurseryLogin', - ($4.NurseryLoginRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $4.NurseryLoginResponse.fromBuffer(value)); - - NurseryServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, - interceptors: interceptors); - - $grpc.ResponseFuture<$4.NurseryLoginResponse> nurseryLogin($4.NurseryLoginRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$nurseryLogin, request, options: options); - } -} - -@$pb.GrpcServiceName('where_child_bus.v1.NurseryService') -abstract class NurseryServiceBase extends $grpc.Service { - $core.String get $name => 'where_child_bus.v1.NurseryService'; - - NurseryServiceBase() { - $addMethod($grpc.ServiceMethod<$4.NurseryLoginRequest, $4.NurseryLoginResponse>( - 'NurseryLogin', - nurseryLogin_Pre, - false, - false, - ($core.List<$core.int> value) => $4.NurseryLoginRequest.fromBuffer(value), - ($4.NurseryLoginResponse value) => value.writeToBuffer())); - } - - $async.Future<$4.NurseryLoginResponse> nurseryLogin_Pre($grpc.ServiceCall call, $async.Future<$4.NurseryLoginRequest> request) async { - return nurseryLogin(call, await request); - } - - $async.Future<$4.NurseryLoginResponse> nurseryLogin($grpc.ServiceCall call, $4.NurseryLoginRequest request); -} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart index dc75189a..26f47688 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart @@ -13,6 +13,9 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +import '../../google/protobuf/timestamp.pbjson.dart' as $0; +import 'resources.pbjson.dart' as $1; + @$core.Deprecated('Use nurseryLoginRequestDescriptor instead') const NurseryLoginRequest$json = { '1': 'NurseryLoginRequest', @@ -41,3 +44,24 @@ final $typed_data.Uint8List nurseryLoginResponseDescriptor = $convert.base64Deco 'ChROdXJzZXJ5TG9naW5SZXNwb25zZRIYCgdzdWNjZXNzGAEgASgIUgdzdWNjZXNzEjUKB251cn' 'NlcnkYAiABKAsyGy53aGVyZV9jaGlsZF9idXMudjEuTnVyc2VyeVIHbnVyc2VyeQ=='); +const $core.Map<$core.String, $core.dynamic> NurseryServiceBase$json = { + '1': 'NurseryService', + '2': [ + {'1': 'NurseryLogin', '2': '.where_child_bus.v1.NurseryLoginRequest', '3': '.where_child_bus.v1.NurseryLoginResponse'}, + ], +}; + +@$core.Deprecated('Use nurseryServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> NurseryServiceBase$messageJson = { + '.where_child_bus.v1.NurseryLoginRequest': NurseryLoginRequest$json, + '.where_child_bus.v1.NurseryLoginResponse': NurseryLoginResponse$json, + '.where_child_bus.v1.Nursery': $1.Nursery$json, + '.google.protobuf.Timestamp': $0.Timestamp$json, +}; + +/// Descriptor for `NurseryService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List nurseryServiceDescriptor = $convert.base64Decode( + 'Cg5OdXJzZXJ5U2VydmljZRJhCgxOdXJzZXJ5TG9naW4SJy53aGVyZV9jaGlsZF9idXMudjEuTn' + 'Vyc2VyeUxvZ2luUmVxdWVzdBooLndoZXJlX2NoaWxkX2J1cy52MS5OdXJzZXJ5TG9naW5SZXNw' + 'b25zZQ=='); + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart index d53c5494..8ddbc3d8 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -13,7 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/timestamp.pb.dart' as $5; +import '../../google/protobuf/timestamp.pb.dart' as $0; import 'resources.pbenum.dart'; export 'resources.pbenum.dart'; @@ -27,8 +27,8 @@ class Nursery extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.String? email, $core.String? encryptedPassword, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -72,8 +72,8 @@ class Nursery extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') ..aOS(7, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -162,26 +162,26 @@ class Nursery extends $pb.GeneratedMessage { void clearEncryptedPassword() => clearField(7); @$pb.TagNumber(8) - $5.Timestamp get createdAt => $_getN(7); + $0.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($5.Timestamp v) { setField(8, v); } + set createdAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $5.Timestamp ensureCreatedAt() => $_ensure(7); + $0.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $5.Timestamp get updatedAt => $_getN(8); + $0.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($5.Timestamp v) { setField(9, v); } + set updatedAt($0.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $5.Timestamp ensureUpdatedAt() => $_ensure(8); + $0.Timestamp ensureUpdatedAt() => $_ensure(8); } class NurseryReponse extends $pb.GeneratedMessage { @@ -191,8 +191,8 @@ class NurseryReponse extends $pb.GeneratedMessage { $core.String? name, $core.String? email, $core.String? phoneNumber, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -228,8 +228,8 @@ class NurseryReponse extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -301,26 +301,26 @@ class NurseryReponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(6) - $5.Timestamp get createdAt => $_getN(5); + $0.Timestamp get createdAt => $_getN(5); @$pb.TagNumber(6) - set createdAt($5.Timestamp v) { setField(6, v); } + set createdAt($0.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasCreatedAt() => $_has(5); @$pb.TagNumber(6) void clearCreatedAt() => clearField(6); @$pb.TagNumber(6) - $5.Timestamp ensureCreatedAt() => $_ensure(5); + $0.Timestamp ensureCreatedAt() => $_ensure(5); @$pb.TagNumber(7) - $5.Timestamp get updatedAt => $_getN(6); + $0.Timestamp get updatedAt => $_getN(6); @$pb.TagNumber(7) - set updatedAt($5.Timestamp v) { setField(7, v); } + set updatedAt($0.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasUpdatedAt() => $_has(6); @$pb.TagNumber(7) void clearUpdatedAt() => clearField(7); @$pb.TagNumber(7) - $5.Timestamp ensureUpdatedAt() => $_ensure(6); + $0.Timestamp ensureUpdatedAt() => $_ensure(6); } class Guardian extends $pb.GeneratedMessage { @@ -331,8 +331,8 @@ class Guardian extends $pb.GeneratedMessage { $core.String? email, $core.String? phoneNumber, $core.String? encryptedPassword, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -372,8 +372,8 @@ class Guardian extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -453,26 +453,26 @@ class Guardian extends $pb.GeneratedMessage { void clearEncryptedPassword() => clearField(6); @$pb.TagNumber(7) - $5.Timestamp get createdAt => $_getN(6); + $0.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($5.Timestamp v) { setField(7, v); } + set createdAt($0.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $5.Timestamp ensureCreatedAt() => $_ensure(6); + $0.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $5.Timestamp get updatedAt => $_getN(7); + $0.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($5.Timestamp v) { setField(8, v); } + set updatedAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $5.Timestamp ensureUpdatedAt() => $_ensure(7); + $0.Timestamp ensureUpdatedAt() => $_ensure(7); } class GuardianResponse extends $pb.GeneratedMessage { @@ -482,8 +482,8 @@ class GuardianResponse extends $pb.GeneratedMessage { $core.String? name, $core.String? email, $core.String? phoneNumber, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -519,8 +519,8 @@ class GuardianResponse extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -592,26 +592,26 @@ class GuardianResponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(6) - $5.Timestamp get createdAt => $_getN(5); + $0.Timestamp get createdAt => $_getN(5); @$pb.TagNumber(6) - set createdAt($5.Timestamp v) { setField(6, v); } + set createdAt($0.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasCreatedAt() => $_has(5); @$pb.TagNumber(6) void clearCreatedAt() => clearField(6); @$pb.TagNumber(6) - $5.Timestamp ensureCreatedAt() => $_ensure(5); + $0.Timestamp ensureCreatedAt() => $_ensure(5); @$pb.TagNumber(7) - $5.Timestamp get updatedAt => $_getN(6); + $0.Timestamp get updatedAt => $_getN(6); @$pb.TagNumber(7) - set updatedAt($5.Timestamp v) { setField(7, v); } + set updatedAt($0.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasUpdatedAt() => $_has(6); @$pb.TagNumber(7) void clearUpdatedAt() => clearField(7); @$pb.TagNumber(7) - $5.Timestamp ensureUpdatedAt() => $_ensure(6); + $0.Timestamp ensureUpdatedAt() => $_ensure(6); } class Bus extends $pb.GeneratedMessage { @@ -623,8 +623,8 @@ class Bus extends $pb.GeneratedMessage { Bus_Status? status, $core.double? latitude, $core.double? longitude, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -668,8 +668,8 @@ class Bus extends $pb.GeneratedMessage { ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Bus_Status.STATUS_UNSPECIFIED, valueOf: Bus_Status.valueOf, enumValues: Bus_Status.values) ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -759,26 +759,26 @@ class Bus extends $pb.GeneratedMessage { void clearLongitude() => clearField(7); @$pb.TagNumber(8) - $5.Timestamp get createdAt => $_getN(7); + $0.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($5.Timestamp v) { setField(8, v); } + set createdAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $5.Timestamp ensureCreatedAt() => $_ensure(7); + $0.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $5.Timestamp get updatedAt => $_getN(8); + $0.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($5.Timestamp v) { setField(9, v); } + set updatedAt($0.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $5.Timestamp ensureUpdatedAt() => $_ensure(8); + $0.Timestamp ensureUpdatedAt() => $_ensure(8); } class Child extends $pb.GeneratedMessage { @@ -797,8 +797,8 @@ class Child extends $pb.GeneratedMessage { $core.bool? hasWaterBottle, $core.bool? hasUmbrera, $core.bool? hasOther, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -870,8 +870,8 @@ class Child extends $pb.GeneratedMessage { ..aOB(12, _omitFieldNames ? '' : 'hasWaterBottle') ..aOB(13, _omitFieldNames ? '' : 'hasUmbrera') ..aOB(14, _omitFieldNames ? '' : 'hasOther') - ..aOM<$5.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$0.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -1023,26 +1023,26 @@ class Child extends $pb.GeneratedMessage { void clearHasOther() => clearField(14); @$pb.TagNumber(15) - $5.Timestamp get createdAt => $_getN(14); + $0.Timestamp get createdAt => $_getN(14); @$pb.TagNumber(15) - set createdAt($5.Timestamp v) { setField(15, v); } + set createdAt($0.Timestamp v) { setField(15, v); } @$pb.TagNumber(15) $core.bool hasCreatedAt() => $_has(14); @$pb.TagNumber(15) void clearCreatedAt() => clearField(15); @$pb.TagNumber(15) - $5.Timestamp ensureCreatedAt() => $_ensure(14); + $0.Timestamp ensureCreatedAt() => $_ensure(14); @$pb.TagNumber(16) - $5.Timestamp get updatedAt => $_getN(15); + $0.Timestamp get updatedAt => $_getN(15); @$pb.TagNumber(16) - set updatedAt($5.Timestamp v) { setField(16, v); } + set updatedAt($0.Timestamp v) { setField(16, v); } @$pb.TagNumber(16) $core.bool hasUpdatedAt() => $_has(15); @$pb.TagNumber(16) void clearUpdatedAt() => clearField(16); @$pb.TagNumber(16) - $5.Timestamp ensureUpdatedAt() => $_ensure(15); + $0.Timestamp ensureUpdatedAt() => $_ensure(15); } class Station extends $pb.GeneratedMessage { @@ -1053,8 +1053,8 @@ class Station extends $pb.GeneratedMessage { $core.double? longitude, $core.int? morningOrder, $core.int? eveningOrder, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1094,8 +1094,8 @@ class Station extends $pb.GeneratedMessage { ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.int>(5, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) ..a<$core.int>(6, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) - ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -1175,26 +1175,26 @@ class Station extends $pb.GeneratedMessage { void clearEveningOrder() => clearField(6); @$pb.TagNumber(7) - $5.Timestamp get createdAt => $_getN(6); + $0.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($5.Timestamp v) { setField(7, v); } + set createdAt($0.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $5.Timestamp ensureCreatedAt() => $_ensure(6); + $0.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $5.Timestamp get updatedAt => $_getN(7); + $0.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($5.Timestamp v) { setField(8, v); } + set updatedAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $5.Timestamp ensureUpdatedAt() => $_ensure(7); + $0.Timestamp ensureUpdatedAt() => $_ensure(7); } class ChildBusAssociation extends $pb.GeneratedMessage { @@ -1359,8 +1359,8 @@ class ChildPhoto extends $pb.GeneratedMessage { $core.String? childId, $core.String? s3Bucket, $core.String? s3Key, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1392,8 +1392,8 @@ class ChildPhoto extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 's3Bucket') ..aOS(4, _omitFieldNames ? '' : 's3Key') - ..aOM<$5.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -1455,26 +1455,26 @@ class ChildPhoto extends $pb.GeneratedMessage { void clearS3Key() => clearField(4); @$pb.TagNumber(5) - $5.Timestamp get createdAt => $_getN(4); + $0.Timestamp get createdAt => $_getN(4); @$pb.TagNumber(5) - set createdAt($5.Timestamp v) { setField(5, v); } + set createdAt($0.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasCreatedAt() => $_has(4); @$pb.TagNumber(5) void clearCreatedAt() => clearField(5); @$pb.TagNumber(5) - $5.Timestamp ensureCreatedAt() => $_ensure(4); + $0.Timestamp ensureCreatedAt() => $_ensure(4); @$pb.TagNumber(6) - $5.Timestamp get updatedAt => $_getN(5); + $0.Timestamp get updatedAt => $_getN(5); @$pb.TagNumber(6) - set updatedAt($5.Timestamp v) { setField(6, v); } + set updatedAt($0.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasUpdatedAt() => $_has(5); @$pb.TagNumber(6) void clearUpdatedAt() => clearField(6); @$pb.TagNumber(6) - $5.Timestamp ensureUpdatedAt() => $_ensure(5); + $0.Timestamp ensureUpdatedAt() => $_ensure(5); } class BoardingRecord extends $pb.GeneratedMessage { @@ -1483,7 +1483,7 @@ class BoardingRecord extends $pb.GeneratedMessage { $core.String? childId, $core.String? busId, $core.bool? isBoarding, - $5.Timestamp? timestamp, + $0.Timestamp? timestamp, }) { final $result = create(); if (id != null) { @@ -1512,7 +1512,7 @@ class BoardingRecord extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 'busId') ..aOB(4, _omitFieldNames ? '' : 'isBoarding') - ..aOM<$5.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $5.Timestamp.create) + ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -1574,15 +1574,15 @@ class BoardingRecord extends $pb.GeneratedMessage { void clearIsBoarding() => clearField(4); @$pb.TagNumber(5) - $5.Timestamp get timestamp => $_getN(4); + $0.Timestamp get timestamp => $_getN(4); @$pb.TagNumber(5) - set timestamp($5.Timestamp v) { setField(5, v); } + set timestamp($0.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasTimestamp() => $_has(4); @$pb.TagNumber(5) void clearTimestamp() => clearField(5); @$pb.TagNumber(5) - $5.Timestamp ensureTimestamp() => $_ensure(4); + $0.Timestamp ensureTimestamp() => $_ensure(4); } From bfe545eb542f7f64a7a5edc67b64fc96103dcf21 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 18:02:55 +0900 Subject: [PATCH 103/771] =?UTF-8?q?fix(proto):=20buf=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/proto/buf.gen.yaml | 4 +- .../proto-gen/where_child_bus/v1/bus.pb.dart | 18 +- .../where_child_bus/v1/bus.pbgrpc.dart | 59 ++++++ .../where_child_bus/v1/bus.pbjson.dart | 24 --- .../where_child_bus/v1/bus.pbserver.dart | 43 ----- .../where_child_bus/v1/child.pb.dart | 27 +-- .../where_child_bus/v1/child.pbgrpc.dart | 79 ++++++++ .../where_child_bus/v1/child.pbjson.dart | 30 --- .../where_child_bus/v1/child.pbserver.dart | 46 ----- .../where_child_bus/v1/guardian.pb.dart | 32 ++-- .../where_child_bus/v1/guardian.pbgrpc.dart | 59 ++++++ .../where_child_bus/v1/guardian.pbjson.dart | 25 --- .../where_child_bus/v1/guardian.pbserver.dart | 43 ----- .../where_child_bus/v1/health_check.pb.dart | 10 - .../v1/health_check.pbgrpc.dart | 59 ++++++ .../v1/health_check.pbjson.dart | 18 -- .../v1/health_check.pbserver.dart | 43 ----- .../where_child_bus/v1/nursery.pb.dart | 22 +-- .../where_child_bus/v1/nursery.pbgrpc.dart | 59 ++++++ .../where_child_bus/v1/nursery.pbjson.dart | 24 --- .../where_child_bus/v1/nursery.pbserver.dart | 43 ----- .../where_child_bus/v1/resources.pb.dart | 172 +++++++++--------- .../v1/resources.pbserver.dart | 14 -- 23 files changed, 432 insertions(+), 521 deletions(-) create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbserver.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbserver.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbserver.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbserver.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbserver.dart delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbserver.dart diff --git a/backend/proto/buf.gen.yaml b/backend/proto/buf.gen.yaml index f1c9595c..f6b34481 100644 --- a/backend/proto/buf.gen.yaml +++ b/backend/proto/buf.gen.yaml @@ -24,5 +24,7 @@ plugins: out: ../../machine_learning/src/proto-gen/ # Dart用の設定 (クライアント側) - - plugin: buf.build/protocolbuffers/dart:v21.1.2 + - name: dart out: ../../frontend/where_child_bus/lib/proto-gen/ + opt: + - grpc diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart index fd74729c..e0a16b03 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -9,12 +9,11 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $1; +import 'resources.pb.dart' as $6; class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { factory GetBusListByNurseryIdRequest({ @@ -68,7 +67,7 @@ class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetBusListByNurseryIdResponse({ - $core.Iterable<$1.Bus>? buses, + $core.Iterable<$6.Bus>? buses, }) { final $result = create(); if (buses != null) { @@ -81,7 +80,7 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetBusListByNurseryIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusListByNurseryIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$1.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $1.Bus.create) + ..pc<$6.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $6.Bus.create) ..hasRequiredFields = false ; @@ -107,16 +106,7 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { static GetBusListByNurseryIdResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$1.Bus> get buses => $_getList(0); -} - -class BusServiceApi { - $pb.RpcClient _client; - BusServiceApi(this._client); - - $async.Future getBusListByNurseryId($pb.ClientContext? ctx, GetBusListByNurseryIdRequest request) => - _client.invoke(ctx, 'BusService', 'GetBusListByNurseryId', request, GetBusListByNurseryIdResponse()) - ; + $core.List<$6.Bus> get buses => $_getList(0); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart new file mode 100644 index 00000000..393315ee --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/bus.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'bus.pb.dart' as $0; + +export 'bus.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.BusService') +class BusServiceClient extends $grpc.Client { + static final _$getBusListByNurseryId = $grpc.ClientMethod<$0.GetBusListByNurseryIdRequest, $0.GetBusListByNurseryIdResponse>( + '/where_child_bus.v1.BusService/GetBusListByNurseryId', + ($0.GetBusListByNurseryIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.GetBusListByNurseryIdResponse.fromBuffer(value)); + + BusServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($0.GetBusListByNurseryIdRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getBusListByNurseryId, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.BusService') +abstract class BusServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.BusService'; + + BusServiceBase() { + $addMethod($grpc.ServiceMethod<$0.GetBusListByNurseryIdRequest, $0.GetBusListByNurseryIdResponse>( + 'GetBusListByNurseryId', + getBusListByNurseryId_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetBusListByNurseryIdRequest.fromBuffer(value), + ($0.GetBusListByNurseryIdResponse value) => value.writeToBuffer())); + } + + $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId_Pre($grpc.ServiceCall call, $async.Future<$0.GetBusListByNurseryIdRequest> request) async { + return getBusListByNurseryId(call, await request); + } + + $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($grpc.ServiceCall call, $0.GetBusListByNurseryIdRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index e4054514..11fc1604 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -13,9 +13,6 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -import '../../google/protobuf/timestamp.pbjson.dart' as $0; -import 'resources.pbjson.dart' as $1; - @$core.Deprecated('Use getBusListByNurseryIdRequestDescriptor instead') const GetBusListByNurseryIdRequest$json = { '1': 'GetBusListByNurseryIdRequest', @@ -42,24 +39,3 @@ final $typed_data.Uint8List getBusListByNurseryIdResponseDescriptor = $convert.b 'Ch1HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXNwb25zZRItCgVidXNlcxgBIAMoCzIXLndoZXJlX2' 'NoaWxkX2J1cy52MS5CdXNSBWJ1c2Vz'); -const $core.Map<$core.String, $core.dynamic> BusServiceBase$json = { - '1': 'BusService', - '2': [ - {'1': 'GetBusListByNurseryId', '2': '.where_child_bus.v1.GetBusListByNurseryIdRequest', '3': '.where_child_bus.v1.GetBusListByNurseryIdResponse'}, - ], -}; - -@$core.Deprecated('Use busServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> BusServiceBase$messageJson = { - '.where_child_bus.v1.GetBusListByNurseryIdRequest': GetBusListByNurseryIdRequest$json, - '.where_child_bus.v1.GetBusListByNurseryIdResponse': GetBusListByNurseryIdResponse$json, - '.where_child_bus.v1.Bus': $1.Bus$json, - '.google.protobuf.Timestamp': $0.Timestamp$json, -}; - -/// Descriptor for `BusService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List busServiceDescriptor = $convert.base64Decode( - 'CgpCdXNTZXJ2aWNlEnwKFUdldEJ1c0xpc3RCeU51cnNlcnlJZBIwLndoZXJlX2NoaWxkX2J1cy' - '52MS5HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXF1ZXN0GjEud2hlcmVfY2hpbGRfYnVzLnYxLkdl' - 'dEJ1c0xpc3RCeU51cnNlcnlJZFJlc3BvbnNl'); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbserver.dart deleted file mode 100644 index d2fd727a..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbserver.dart +++ /dev/null @@ -1,43 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/bus.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'bus.pb.dart' as $2; -import 'bus.pbjson.dart'; - -export 'bus.pb.dart'; - -abstract class BusServiceBase extends $pb.GeneratedService { - $async.Future<$2.GetBusListByNurseryIdResponse> getBusListByNurseryId($pb.ServerContext ctx, $2.GetBusListByNurseryIdRequest request); - - $pb.GeneratedMessage createRequest($core.String methodName) { - switch (methodName) { - case 'GetBusListByNurseryId': return $2.GetBusListByNurseryIdRequest(); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { - switch (methodName) { - case 'GetBusListByNurseryId': return this.getBusListByNurseryId(ctx, request as $2.GetBusListByNurseryIdRequest); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => BusServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => BusServiceBase$messageJson; -} - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart index 59b94e39..acfc7397 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -9,12 +9,11 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $1; +import 'resources.pb.dart' as $6; class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { factory GetChildListByNurseryIDRequest({ @@ -68,7 +67,7 @@ class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse({ - $core.Iterable<$1.Child>? children, + $core.Iterable<$6.Child>? children, }) { final $result = create(); if (children != null) { @@ -81,7 +80,7 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByNurseryIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$1.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $1.Child.create) + ..pc<$6.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $6.Child.create) ..hasRequiredFields = false ; @@ -107,7 +106,7 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { static GetChildListByNurseryIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$1.Child> get children => $_getList(0); + $core.List<$6.Child> get children => $_getList(0); } class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { @@ -162,7 +161,7 @@ class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse({ - $core.Iterable<$1.Child>? children, + $core.Iterable<$6.Child>? children, }) { final $result = create(); if (children != null) { @@ -175,7 +174,7 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByGuardianIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$1.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $1.Child.create) + ..pc<$6.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $6.Child.create) ..hasRequiredFields = false ; @@ -201,19 +200,7 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { static GetChildListByGuardianIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$1.Child> get children => $_getList(0); -} - -class ChildServiceApi { - $pb.RpcClient _client; - ChildServiceApi(this._client); - - $async.Future getChildListByNurseryID($pb.ClientContext? ctx, GetChildListByNurseryIDRequest request) => - _client.invoke(ctx, 'ChildService', 'GetChildListByNurseryID', request, GetChildListByNurseryIDResponse()) - ; - $async.Future getChildListByGuardianID($pb.ClientContext? ctx, GetChildListByGuardianIDRequest request) => - _client.invoke(ctx, 'ChildService', 'GetChildListByGuardianID', request, GetChildListByGuardianIDResponse()) - ; + $core.List<$6.Child> get children => $_getList(0); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart new file mode 100644 index 00000000..35ad0c72 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart @@ -0,0 +1,79 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'child.pb.dart' as $1; + +export 'child.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.ChildService') +class ChildServiceClient extends $grpc.Client { + static final _$getChildListByNurseryID = $grpc.ClientMethod<$1.GetChildListByNurseryIDRequest, $1.GetChildListByNurseryIDResponse>( + '/where_child_bus.v1.ChildService/GetChildListByNurseryID', + ($1.GetChildListByNurseryIDRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.GetChildListByNurseryIDResponse.fromBuffer(value)); + static final _$getChildListByGuardianID = $grpc.ClientMethod<$1.GetChildListByGuardianIDRequest, $1.GetChildListByGuardianIDResponse>( + '/where_child_bus.v1.ChildService/GetChildListByGuardianID', + ($1.GetChildListByGuardianIDRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.GetChildListByGuardianIDResponse.fromBuffer(value)); + + ChildServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($1.GetChildListByNurseryIDRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getChildListByNurseryID, request, options: options); + } + + $grpc.ResponseFuture<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($1.GetChildListByGuardianIDRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getChildListByGuardianID, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.ChildService') +abstract class ChildServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.ChildService'; + + ChildServiceBase() { + $addMethod($grpc.ServiceMethod<$1.GetChildListByNurseryIDRequest, $1.GetChildListByNurseryIDResponse>( + 'GetChildListByNurseryID', + getChildListByNurseryID_Pre, + false, + false, + ($core.List<$core.int> value) => $1.GetChildListByNurseryIDRequest.fromBuffer(value), + ($1.GetChildListByNurseryIDResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.GetChildListByGuardianIDRequest, $1.GetChildListByGuardianIDResponse>( + 'GetChildListByGuardianID', + getChildListByGuardianID_Pre, + false, + false, + ($core.List<$core.int> value) => $1.GetChildListByGuardianIDRequest.fromBuffer(value), + ($1.GetChildListByGuardianIDResponse value) => value.writeToBuffer())); + } + + $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByNurseryIDRequest> request) async { + return getChildListByNurseryID(call, await request); + } + + $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByGuardianIDRequest> request) async { + return getChildListByGuardianID(call, await request); + } + + $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); + $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($grpc.ServiceCall call, $1.GetChildListByGuardianIDRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart index e310f4cb..ceef43cf 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -13,9 +13,6 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -import '../../google/protobuf/timestamp.pbjson.dart' as $0; -import 'resources.pbjson.dart' as $1; - @$core.Deprecated('Use getChildListByNurseryIDRequestDescriptor instead') const GetChildListByNurseryIDRequest$json = { '1': 'GetChildListByNurseryIDRequest', @@ -68,30 +65,3 @@ final $typed_data.Uint8List getChildListByGuardianIDResponseDescriptor = $conver 'CiBHZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZXNwb25zZRI1CghjaGlsZHJlbhgBIAMoCzIZLn' 'doZXJlX2NoaWxkX2J1cy52MS5DaGlsZFIIY2hpbGRyZW4='); -const $core.Map<$core.String, $core.dynamic> ChildServiceBase$json = { - '1': 'ChildService', - '2': [ - {'1': 'GetChildListByNurseryID', '2': '.where_child_bus.v1.GetChildListByNurseryIDRequest', '3': '.where_child_bus.v1.GetChildListByNurseryIDResponse'}, - {'1': 'GetChildListByGuardianID', '2': '.where_child_bus.v1.GetChildListByGuardianIDRequest', '3': '.where_child_bus.v1.GetChildListByGuardianIDResponse'}, - ], -}; - -@$core.Deprecated('Use childServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> ChildServiceBase$messageJson = { - '.where_child_bus.v1.GetChildListByNurseryIDRequest': GetChildListByNurseryIDRequest$json, - '.where_child_bus.v1.GetChildListByNurseryIDResponse': GetChildListByNurseryIDResponse$json, - '.where_child_bus.v1.Child': $1.Child$json, - '.google.protobuf.Timestamp': $0.Timestamp$json, - '.where_child_bus.v1.GetChildListByGuardianIDRequest': GetChildListByGuardianIDRequest$json, - '.where_child_bus.v1.GetChildListByGuardianIDResponse': GetChildListByGuardianIDResponse$json, -}; - -/// Descriptor for `ChildService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List childServiceDescriptor = $convert.base64Decode( - 'CgxDaGlsZFNlcnZpY2USggEKF0dldENoaWxkTGlzdEJ5TnVyc2VyeUlEEjIud2hlcmVfY2hpbG' - 'RfYnVzLnYxLkdldENoaWxkTGlzdEJ5TnVyc2VyeUlEUmVxdWVzdBozLndoZXJlX2NoaWxkX2J1' - 'cy52MS5HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEoUBChhHZXRDaGlsZExpc3RCeU' - 'd1YXJkaWFuSUQSMy53aGVyZV9jaGlsZF9idXMudjEuR2V0Q2hpbGRMaXN0QnlHdWFyZGlhbklE' - 'UmVxdWVzdBo0LndoZXJlX2NoaWxkX2J1cy52MS5HZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZX' - 'Nwb25zZQ=='); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbserver.dart deleted file mode 100644 index e47015a4..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbserver.dart +++ /dev/null @@ -1,46 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/child.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'child.pb.dart' as $3; -import 'child.pbjson.dart'; - -export 'child.pb.dart'; - -abstract class ChildServiceBase extends $pb.GeneratedService { - $async.Future<$3.GetChildListByNurseryIDResponse> getChildListByNurseryID($pb.ServerContext ctx, $3.GetChildListByNurseryIDRequest request); - $async.Future<$3.GetChildListByGuardianIDResponse> getChildListByGuardianID($pb.ServerContext ctx, $3.GetChildListByGuardianIDRequest request); - - $pb.GeneratedMessage createRequest($core.String methodName) { - switch (methodName) { - case 'GetChildListByNurseryID': return $3.GetChildListByNurseryIDRequest(); - case 'GetChildListByGuardianID': return $3.GetChildListByGuardianIDRequest(); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { - switch (methodName) { - case 'GetChildListByNurseryID': return this.getChildListByNurseryID(ctx, request as $3.GetChildListByNurseryIDRequest); - case 'GetChildListByGuardianID': return this.getChildListByGuardianID(ctx, request as $3.GetChildListByGuardianIDRequest); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => ChildServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => ChildServiceBase$messageJson; -} - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 06a4aeff..18ab923a 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -9,12 +9,11 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $1; +import 'resources.pb.dart' as $6; class GuardianLoginRequest extends $pb.GeneratedMessage { factory GuardianLoginRequest({ @@ -83,8 +82,8 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { class GuardianLoginResponse extends $pb.GeneratedMessage { factory GuardianLoginResponse({ $core.bool? success, - $1.GuardianResponse? guardian, - $1.NurseryReponse? nursery, + $6.GuardianResponse? guardian, + $6.NurseryReponse? nursery, }) { final $result = create(); if (success != null) { @@ -104,8 +103,8 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$1.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $1.GuardianResponse.create) - ..aOM<$1.NurseryReponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $1.NurseryReponse.create) + ..aOM<$6.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $6.GuardianResponse.create) + ..aOM<$6.NurseryReponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $6.NurseryReponse.create) ..hasRequiredFields = false ; @@ -140,35 +139,26 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $1.GuardianResponse get guardian => $_getN(1); + $6.GuardianResponse get guardian => $_getN(1); @$pb.TagNumber(2) - set guardian($1.GuardianResponse v) { setField(2, v); } + set guardian($6.GuardianResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasGuardian() => $_has(1); @$pb.TagNumber(2) void clearGuardian() => clearField(2); @$pb.TagNumber(2) - $1.GuardianResponse ensureGuardian() => $_ensure(1); + $6.GuardianResponse ensureGuardian() => $_ensure(1); @$pb.TagNumber(3) - $1.NurseryReponse get nursery => $_getN(2); + $6.NurseryReponse get nursery => $_getN(2); @$pb.TagNumber(3) - set nursery($1.NurseryReponse v) { setField(3, v); } + set nursery($6.NurseryReponse v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasNursery() => $_has(2); @$pb.TagNumber(3) void clearNursery() => clearField(3); @$pb.TagNumber(3) - $1.NurseryReponse ensureNursery() => $_ensure(2); -} - -class GuardianServiceApi { - $pb.RpcClient _client; - GuardianServiceApi(this._client); - - $async.Future guardianLogin($pb.ClientContext? ctx, GuardianLoginRequest request) => - _client.invoke(ctx, 'GuardianService', 'GuardianLogin', request, GuardianLoginResponse()) - ; + $6.NurseryReponse ensureNursery() => $_ensure(2); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart new file mode 100644 index 00000000..a0ac6e24 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/guardian.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'guardian.pb.dart' as $2; + +export 'guardian.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.GuardianService') +class GuardianServiceClient extends $grpc.Client { + static final _$guardianLogin = $grpc.ClientMethod<$2.GuardianLoginRequest, $2.GuardianLoginResponse>( + '/where_child_bus.v1.GuardianService/GuardianLogin', + ($2.GuardianLoginRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.GuardianLoginResponse.fromBuffer(value)); + + GuardianServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$2.GuardianLoginResponse> guardianLogin($2.GuardianLoginRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$guardianLogin, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.GuardianService') +abstract class GuardianServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.GuardianService'; + + GuardianServiceBase() { + $addMethod($grpc.ServiceMethod<$2.GuardianLoginRequest, $2.GuardianLoginResponse>( + 'GuardianLogin', + guardianLogin_Pre, + false, + false, + ($core.List<$core.int> value) => $2.GuardianLoginRequest.fromBuffer(value), + ($2.GuardianLoginResponse value) => value.writeToBuffer())); + } + + $async.Future<$2.GuardianLoginResponse> guardianLogin_Pre($grpc.ServiceCall call, $async.Future<$2.GuardianLoginRequest> request) async { + return guardianLogin(call, await request); + } + + $async.Future<$2.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $2.GuardianLoginRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart index 76332fb3..53d8a6b8 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -13,9 +13,6 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -import '../../google/protobuf/timestamp.pbjson.dart' as $0; -import 'resources.pbjson.dart' as $1; - @$core.Deprecated('Use guardianLoginRequestDescriptor instead') const GuardianLoginRequest$json = { '1': 'GuardianLoginRequest', @@ -47,25 +44,3 @@ final $typed_data.Uint8List guardianLoginResponseDescriptor = $convert.base64Dec 'ZGlhbhI8CgdudXJzZXJ5GAMgASgLMiIud2hlcmVfY2hpbGRfYnVzLnYxLk51cnNlcnlSZXBvbn' 'NlUgdudXJzZXJ5'); -const $core.Map<$core.String, $core.dynamic> GuardianServiceBase$json = { - '1': 'GuardianService', - '2': [ - {'1': 'GuardianLogin', '2': '.where_child_bus.v1.GuardianLoginRequest', '3': '.where_child_bus.v1.GuardianLoginResponse'}, - ], -}; - -@$core.Deprecated('Use guardianServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> GuardianServiceBase$messageJson = { - '.where_child_bus.v1.GuardianLoginRequest': GuardianLoginRequest$json, - '.where_child_bus.v1.GuardianLoginResponse': GuardianLoginResponse$json, - '.where_child_bus.v1.GuardianResponse': $1.GuardianResponse$json, - '.google.protobuf.Timestamp': $0.Timestamp$json, - '.where_child_bus.v1.NurseryReponse': $1.NurseryReponse$json, -}; - -/// Descriptor for `GuardianService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List guardianServiceDescriptor = $convert.base64Decode( - 'Cg9HdWFyZGlhblNlcnZpY2USZAoNR3VhcmRpYW5Mb2dpbhIoLndoZXJlX2NoaWxkX2J1cy52MS' - '5HdWFyZGlhbkxvZ2luUmVxdWVzdBopLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhbkxvZ2lu' - 'UmVzcG9uc2U='); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbserver.dart deleted file mode 100644 index 2cc104ce..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbserver.dart +++ /dev/null @@ -1,43 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/guardian.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'guardian.pb.dart' as $4; -import 'guardian.pbjson.dart'; - -export 'guardian.pb.dart'; - -abstract class GuardianServiceBase extends $pb.GeneratedService { - $async.Future<$4.GuardianLoginResponse> guardianLogin($pb.ServerContext ctx, $4.GuardianLoginRequest request); - - $pb.GeneratedMessage createRequest($core.String methodName) { - switch (methodName) { - case 'GuardianLogin': return $4.GuardianLoginRequest(); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { - switch (methodName) { - case 'GuardianLogin': return this.guardianLogin(ctx, request as $4.GuardianLoginRequest); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => GuardianServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => GuardianServiceBase$messageJson; -} - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart index a01651da..dcbde2f5 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart @@ -9,7 +9,6 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; @@ -114,15 +113,6 @@ class PingResponse extends $pb.GeneratedMessage { void clearMessage() => clearField(1); } -class HealthcheckServiceApi { - $pb.RpcClient _client; - HealthcheckServiceApi(this._client); - - $async.Future ping($pb.ClientContext? ctx, PingRequest request) => - _client.invoke(ctx, 'HealthcheckService', 'Ping', request, PingResponse()) - ; -} - const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart new file mode 100644 index 00000000..3915bbb5 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'health_check.pb.dart' as $3; + +export 'health_check.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.HealthcheckService') +class HealthcheckServiceClient extends $grpc.Client { + static final _$ping = $grpc.ClientMethod<$3.PingRequest, $3.PingResponse>( + '/where_child_bus.v1.HealthcheckService/Ping', + ($3.PingRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.PingResponse.fromBuffer(value)); + + HealthcheckServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$3.PingResponse> ping($3.PingRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$ping, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.HealthcheckService') +abstract class HealthcheckServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.HealthcheckService'; + + HealthcheckServiceBase() { + $addMethod($grpc.ServiceMethod<$3.PingRequest, $3.PingResponse>( + 'Ping', + ping_Pre, + false, + false, + ($core.List<$core.int> value) => $3.PingRequest.fromBuffer(value), + ($3.PingResponse value) => value.writeToBuffer())); + } + + $async.Future<$3.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$3.PingRequest> request) async { + return ping(call, await request); + } + + $async.Future<$3.PingResponse> ping($grpc.ServiceCall call, $3.PingRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart index 8255d4ea..201d4755 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart @@ -37,21 +37,3 @@ const PingResponse$json = { final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); -const $core.Map<$core.String, $core.dynamic> HealthcheckServiceBase$json = { - '1': 'HealthcheckService', - '2': [ - {'1': 'Ping', '2': '.where_child_bus.v1.PingRequest', '3': '.where_child_bus.v1.PingResponse'}, - ], -}; - -@$core.Deprecated('Use healthcheckServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> HealthcheckServiceBase$messageJson = { - '.where_child_bus.v1.PingRequest': PingRequest$json, - '.where_child_bus.v1.PingResponse': PingResponse$json, -}; - -/// Descriptor for `HealthcheckService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List healthcheckServiceDescriptor = $convert.base64Decode( - 'ChJIZWFsdGhjaGVja1NlcnZpY2USSQoEUGluZxIfLndoZXJlX2NoaWxkX2J1cy52MS5QaW5nUm' - 'VxdWVzdBogLndoZXJlX2NoaWxkX2J1cy52MS5QaW5nUmVzcG9uc2U='); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbserver.dart deleted file mode 100644 index 11d9fef0..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbserver.dart +++ /dev/null @@ -1,43 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/health_check.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'health_check.pb.dart' as $5; -import 'health_check.pbjson.dart'; - -export 'health_check.pb.dart'; - -abstract class HealthcheckServiceBase extends $pb.GeneratedService { - $async.Future<$5.PingResponse> ping($pb.ServerContext ctx, $5.PingRequest request); - - $pb.GeneratedMessage createRequest($core.String methodName) { - switch (methodName) { - case 'Ping': return $5.PingRequest(); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { - switch (methodName) { - case 'Ping': return this.ping(ctx, request as $5.PingRequest); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => HealthcheckServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => HealthcheckServiceBase$messageJson; -} - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart index 11d77727..1a965a9e 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -9,12 +9,11 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $1; +import 'resources.pb.dart' as $6; class NurseryLoginRequest extends $pb.GeneratedMessage { factory NurseryLoginRequest({ @@ -83,7 +82,7 @@ class NurseryLoginRequest extends $pb.GeneratedMessage { class NurseryLoginResponse extends $pb.GeneratedMessage { factory NurseryLoginResponse({ $core.bool? success, - $1.Nursery? nursery, + $6.Nursery? nursery, }) { final $result = create(); if (success != null) { @@ -100,7 +99,7 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$1.Nursery>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $1.Nursery.create) + ..aOM<$6.Nursery>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $6.Nursery.create) ..hasRequiredFields = false ; @@ -135,24 +134,15 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $1.Nursery get nursery => $_getN(1); + $6.Nursery get nursery => $_getN(1); @$pb.TagNumber(2) - set nursery($1.Nursery v) { setField(2, v); } + set nursery($6.Nursery v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasNursery() => $_has(1); @$pb.TagNumber(2) void clearNursery() => clearField(2); @$pb.TagNumber(2) - $1.Nursery ensureNursery() => $_ensure(1); -} - -class NurseryServiceApi { - $pb.RpcClient _client; - NurseryServiceApi(this._client); - - $async.Future nurseryLogin($pb.ClientContext? ctx, NurseryLoginRequest request) => - _client.invoke(ctx, 'NurseryService', 'NurseryLogin', request, NurseryLoginResponse()) - ; + $6.Nursery ensureNursery() => $_ensure(1); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart new file mode 100644 index 00000000..b18831d3 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/nursery.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'nursery.pb.dart' as $4; + +export 'nursery.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.NurseryService') +class NurseryServiceClient extends $grpc.Client { + static final _$nurseryLogin = $grpc.ClientMethod<$4.NurseryLoginRequest, $4.NurseryLoginResponse>( + '/where_child_bus.v1.NurseryService/NurseryLogin', + ($4.NurseryLoginRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $4.NurseryLoginResponse.fromBuffer(value)); + + NurseryServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$4.NurseryLoginResponse> nurseryLogin($4.NurseryLoginRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$nurseryLogin, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.NurseryService') +abstract class NurseryServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.NurseryService'; + + NurseryServiceBase() { + $addMethod($grpc.ServiceMethod<$4.NurseryLoginRequest, $4.NurseryLoginResponse>( + 'NurseryLogin', + nurseryLogin_Pre, + false, + false, + ($core.List<$core.int> value) => $4.NurseryLoginRequest.fromBuffer(value), + ($4.NurseryLoginResponse value) => value.writeToBuffer())); + } + + $async.Future<$4.NurseryLoginResponse> nurseryLogin_Pre($grpc.ServiceCall call, $async.Future<$4.NurseryLoginRequest> request) async { + return nurseryLogin(call, await request); + } + + $async.Future<$4.NurseryLoginResponse> nurseryLogin($grpc.ServiceCall call, $4.NurseryLoginRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart index 26f47688..dc75189a 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart @@ -13,9 +13,6 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -import '../../google/protobuf/timestamp.pbjson.dart' as $0; -import 'resources.pbjson.dart' as $1; - @$core.Deprecated('Use nurseryLoginRequestDescriptor instead') const NurseryLoginRequest$json = { '1': 'NurseryLoginRequest', @@ -44,24 +41,3 @@ final $typed_data.Uint8List nurseryLoginResponseDescriptor = $convert.base64Deco 'ChROdXJzZXJ5TG9naW5SZXNwb25zZRIYCgdzdWNjZXNzGAEgASgIUgdzdWNjZXNzEjUKB251cn' 'NlcnkYAiABKAsyGy53aGVyZV9jaGlsZF9idXMudjEuTnVyc2VyeVIHbnVyc2VyeQ=='); -const $core.Map<$core.String, $core.dynamic> NurseryServiceBase$json = { - '1': 'NurseryService', - '2': [ - {'1': 'NurseryLogin', '2': '.where_child_bus.v1.NurseryLoginRequest', '3': '.where_child_bus.v1.NurseryLoginResponse'}, - ], -}; - -@$core.Deprecated('Use nurseryServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> NurseryServiceBase$messageJson = { - '.where_child_bus.v1.NurseryLoginRequest': NurseryLoginRequest$json, - '.where_child_bus.v1.NurseryLoginResponse': NurseryLoginResponse$json, - '.where_child_bus.v1.Nursery': $1.Nursery$json, - '.google.protobuf.Timestamp': $0.Timestamp$json, -}; - -/// Descriptor for `NurseryService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List nurseryServiceDescriptor = $convert.base64Decode( - 'Cg5OdXJzZXJ5U2VydmljZRJhCgxOdXJzZXJ5TG9naW4SJy53aGVyZV9jaGlsZF9idXMudjEuTn' - 'Vyc2VyeUxvZ2luUmVxdWVzdBooLndoZXJlX2NoaWxkX2J1cy52MS5OdXJzZXJ5TG9naW5SZXNw' - 'b25zZQ=='); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbserver.dart deleted file mode 100644 index 2ff2a741..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbserver.dart +++ /dev/null @@ -1,43 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/nursery.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'nursery.pb.dart' as $6; -import 'nursery.pbjson.dart'; - -export 'nursery.pb.dart'; - -abstract class NurseryServiceBase extends $pb.GeneratedService { - $async.Future<$6.NurseryLoginResponse> nurseryLogin($pb.ServerContext ctx, $6.NurseryLoginRequest request); - - $pb.GeneratedMessage createRequest($core.String methodName) { - switch (methodName) { - case 'NurseryLogin': return $6.NurseryLoginRequest(); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { - switch (methodName) { - case 'NurseryLogin': return this.nurseryLogin(ctx, request as $6.NurseryLoginRequest); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => NurseryServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => NurseryServiceBase$messageJson; -} - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 8ddbc3d8..d53c5494 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -13,7 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/timestamp.pb.dart' as $0; +import '../../google/protobuf/timestamp.pb.dart' as $5; import 'resources.pbenum.dart'; export 'resources.pbenum.dart'; @@ -27,8 +27,8 @@ class Nursery extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.String? email, $core.String? encryptedPassword, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -72,8 +72,8 @@ class Nursery extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') ..aOS(7, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -162,26 +162,26 @@ class Nursery extends $pb.GeneratedMessage { void clearEncryptedPassword() => clearField(7); @$pb.TagNumber(8) - $0.Timestamp get createdAt => $_getN(7); + $5.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($0.Timestamp v) { setField(8, v); } + set createdAt($5.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureCreatedAt() => $_ensure(7); + $5.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $0.Timestamp get updatedAt => $_getN(8); + $5.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($0.Timestamp v) { setField(9, v); } + set updatedAt($5.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $0.Timestamp ensureUpdatedAt() => $_ensure(8); + $5.Timestamp ensureUpdatedAt() => $_ensure(8); } class NurseryReponse extends $pb.GeneratedMessage { @@ -191,8 +191,8 @@ class NurseryReponse extends $pb.GeneratedMessage { $core.String? name, $core.String? email, $core.String? phoneNumber, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -228,8 +228,8 @@ class NurseryReponse extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -301,26 +301,26 @@ class NurseryReponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(6) - $0.Timestamp get createdAt => $_getN(5); + $5.Timestamp get createdAt => $_getN(5); @$pb.TagNumber(6) - set createdAt($0.Timestamp v) { setField(6, v); } + set createdAt($5.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasCreatedAt() => $_has(5); @$pb.TagNumber(6) void clearCreatedAt() => clearField(6); @$pb.TagNumber(6) - $0.Timestamp ensureCreatedAt() => $_ensure(5); + $5.Timestamp ensureCreatedAt() => $_ensure(5); @$pb.TagNumber(7) - $0.Timestamp get updatedAt => $_getN(6); + $5.Timestamp get updatedAt => $_getN(6); @$pb.TagNumber(7) - set updatedAt($0.Timestamp v) { setField(7, v); } + set updatedAt($5.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasUpdatedAt() => $_has(6); @$pb.TagNumber(7) void clearUpdatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureUpdatedAt() => $_ensure(6); + $5.Timestamp ensureUpdatedAt() => $_ensure(6); } class Guardian extends $pb.GeneratedMessage { @@ -331,8 +331,8 @@ class Guardian extends $pb.GeneratedMessage { $core.String? email, $core.String? phoneNumber, $core.String? encryptedPassword, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -372,8 +372,8 @@ class Guardian extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -453,26 +453,26 @@ class Guardian extends $pb.GeneratedMessage { void clearEncryptedPassword() => clearField(6); @$pb.TagNumber(7) - $0.Timestamp get createdAt => $_getN(6); + $5.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($0.Timestamp v) { setField(7, v); } + set createdAt($5.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureCreatedAt() => $_ensure(6); + $5.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $0.Timestamp get updatedAt => $_getN(7); + $5.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($0.Timestamp v) { setField(8, v); } + set updatedAt($5.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureUpdatedAt() => $_ensure(7); + $5.Timestamp ensureUpdatedAt() => $_ensure(7); } class GuardianResponse extends $pb.GeneratedMessage { @@ -482,8 +482,8 @@ class GuardianResponse extends $pb.GeneratedMessage { $core.String? name, $core.String? email, $core.String? phoneNumber, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -519,8 +519,8 @@ class GuardianResponse extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -592,26 +592,26 @@ class GuardianResponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(6) - $0.Timestamp get createdAt => $_getN(5); + $5.Timestamp get createdAt => $_getN(5); @$pb.TagNumber(6) - set createdAt($0.Timestamp v) { setField(6, v); } + set createdAt($5.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasCreatedAt() => $_has(5); @$pb.TagNumber(6) void clearCreatedAt() => clearField(6); @$pb.TagNumber(6) - $0.Timestamp ensureCreatedAt() => $_ensure(5); + $5.Timestamp ensureCreatedAt() => $_ensure(5); @$pb.TagNumber(7) - $0.Timestamp get updatedAt => $_getN(6); + $5.Timestamp get updatedAt => $_getN(6); @$pb.TagNumber(7) - set updatedAt($0.Timestamp v) { setField(7, v); } + set updatedAt($5.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasUpdatedAt() => $_has(6); @$pb.TagNumber(7) void clearUpdatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureUpdatedAt() => $_ensure(6); + $5.Timestamp ensureUpdatedAt() => $_ensure(6); } class Bus extends $pb.GeneratedMessage { @@ -623,8 +623,8 @@ class Bus extends $pb.GeneratedMessage { Bus_Status? status, $core.double? latitude, $core.double? longitude, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -668,8 +668,8 @@ class Bus extends $pb.GeneratedMessage { ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Bus_Status.STATUS_UNSPECIFIED, valueOf: Bus_Status.valueOf, enumValues: Bus_Status.values) ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -759,26 +759,26 @@ class Bus extends $pb.GeneratedMessage { void clearLongitude() => clearField(7); @$pb.TagNumber(8) - $0.Timestamp get createdAt => $_getN(7); + $5.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($0.Timestamp v) { setField(8, v); } + set createdAt($5.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureCreatedAt() => $_ensure(7); + $5.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $0.Timestamp get updatedAt => $_getN(8); + $5.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($0.Timestamp v) { setField(9, v); } + set updatedAt($5.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $0.Timestamp ensureUpdatedAt() => $_ensure(8); + $5.Timestamp ensureUpdatedAt() => $_ensure(8); } class Child extends $pb.GeneratedMessage { @@ -797,8 +797,8 @@ class Child extends $pb.GeneratedMessage { $core.bool? hasWaterBottle, $core.bool? hasUmbrera, $core.bool? hasOther, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -870,8 +870,8 @@ class Child extends $pb.GeneratedMessage { ..aOB(12, _omitFieldNames ? '' : 'hasWaterBottle') ..aOB(13, _omitFieldNames ? '' : 'hasUmbrera') ..aOB(14, _omitFieldNames ? '' : 'hasOther') - ..aOM<$0.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -1023,26 +1023,26 @@ class Child extends $pb.GeneratedMessage { void clearHasOther() => clearField(14); @$pb.TagNumber(15) - $0.Timestamp get createdAt => $_getN(14); + $5.Timestamp get createdAt => $_getN(14); @$pb.TagNumber(15) - set createdAt($0.Timestamp v) { setField(15, v); } + set createdAt($5.Timestamp v) { setField(15, v); } @$pb.TagNumber(15) $core.bool hasCreatedAt() => $_has(14); @$pb.TagNumber(15) void clearCreatedAt() => clearField(15); @$pb.TagNumber(15) - $0.Timestamp ensureCreatedAt() => $_ensure(14); + $5.Timestamp ensureCreatedAt() => $_ensure(14); @$pb.TagNumber(16) - $0.Timestamp get updatedAt => $_getN(15); + $5.Timestamp get updatedAt => $_getN(15); @$pb.TagNumber(16) - set updatedAt($0.Timestamp v) { setField(16, v); } + set updatedAt($5.Timestamp v) { setField(16, v); } @$pb.TagNumber(16) $core.bool hasUpdatedAt() => $_has(15); @$pb.TagNumber(16) void clearUpdatedAt() => clearField(16); @$pb.TagNumber(16) - $0.Timestamp ensureUpdatedAt() => $_ensure(15); + $5.Timestamp ensureUpdatedAt() => $_ensure(15); } class Station extends $pb.GeneratedMessage { @@ -1053,8 +1053,8 @@ class Station extends $pb.GeneratedMessage { $core.double? longitude, $core.int? morningOrder, $core.int? eveningOrder, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1094,8 +1094,8 @@ class Station extends $pb.GeneratedMessage { ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.int>(5, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) ..a<$core.int>(6, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -1175,26 +1175,26 @@ class Station extends $pb.GeneratedMessage { void clearEveningOrder() => clearField(6); @$pb.TagNumber(7) - $0.Timestamp get createdAt => $_getN(6); + $5.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($0.Timestamp v) { setField(7, v); } + set createdAt($5.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureCreatedAt() => $_ensure(6); + $5.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $0.Timestamp get updatedAt => $_getN(7); + $5.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($0.Timestamp v) { setField(8, v); } + set updatedAt($5.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureUpdatedAt() => $_ensure(7); + $5.Timestamp ensureUpdatedAt() => $_ensure(7); } class ChildBusAssociation extends $pb.GeneratedMessage { @@ -1359,8 +1359,8 @@ class ChildPhoto extends $pb.GeneratedMessage { $core.String? childId, $core.String? s3Bucket, $core.String? s3Key, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1392,8 +1392,8 @@ class ChildPhoto extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 's3Bucket') ..aOS(4, _omitFieldNames ? '' : 's3Key') - ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -1455,26 +1455,26 @@ class ChildPhoto extends $pb.GeneratedMessage { void clearS3Key() => clearField(4); @$pb.TagNumber(5) - $0.Timestamp get createdAt => $_getN(4); + $5.Timestamp get createdAt => $_getN(4); @$pb.TagNumber(5) - set createdAt($0.Timestamp v) { setField(5, v); } + set createdAt($5.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasCreatedAt() => $_has(4); @$pb.TagNumber(5) void clearCreatedAt() => clearField(5); @$pb.TagNumber(5) - $0.Timestamp ensureCreatedAt() => $_ensure(4); + $5.Timestamp ensureCreatedAt() => $_ensure(4); @$pb.TagNumber(6) - $0.Timestamp get updatedAt => $_getN(5); + $5.Timestamp get updatedAt => $_getN(5); @$pb.TagNumber(6) - set updatedAt($0.Timestamp v) { setField(6, v); } + set updatedAt($5.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasUpdatedAt() => $_has(5); @$pb.TagNumber(6) void clearUpdatedAt() => clearField(6); @$pb.TagNumber(6) - $0.Timestamp ensureUpdatedAt() => $_ensure(5); + $5.Timestamp ensureUpdatedAt() => $_ensure(5); } class BoardingRecord extends $pb.GeneratedMessage { @@ -1483,7 +1483,7 @@ class BoardingRecord extends $pb.GeneratedMessage { $core.String? childId, $core.String? busId, $core.bool? isBoarding, - $0.Timestamp? timestamp, + $5.Timestamp? timestamp, }) { final $result = create(); if (id != null) { @@ -1512,7 +1512,7 @@ class BoardingRecord extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 'busId') ..aOB(4, _omitFieldNames ? '' : 'isBoarding') - ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -1574,15 +1574,15 @@ class BoardingRecord extends $pb.GeneratedMessage { void clearIsBoarding() => clearField(4); @$pb.TagNumber(5) - $0.Timestamp get timestamp => $_getN(4); + $5.Timestamp get timestamp => $_getN(4); @$pb.TagNumber(5) - set timestamp($0.Timestamp v) { setField(5, v); } + set timestamp($5.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasTimestamp() => $_has(4); @$pb.TagNumber(5) void clearTimestamp() => clearField(5); @$pb.TagNumber(5) - $0.Timestamp ensureTimestamp() => $_ensure(4); + $5.Timestamp ensureTimestamp() => $_ensure(4); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbserver.dart deleted file mode 100644 index 39e55a87..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbserver.dart +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/resources.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -export 'resources.pb.dart'; - From 4717b9dc155a0bc2212e24dbfffd0d9ec0c2d539 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 18:27:59 +0900 Subject: [PATCH 104/771] =?UTF-8?q?feat:=E8=A9=B3=E7=B4=B0=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/student_list_page/student_list_page.dart | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 8f201e1b..55c0ad38 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -91,6 +91,10 @@ class _StudentListPageState extends State { ]); } + Widget detail(String element) { + return Text(element, style: TextStyle(color: Colors.black, fontSize: 18)); + } + void showBottomSheet(BuildContext context, int index) { showModalBottomSheet( context: context, @@ -127,9 +131,12 @@ class _StudentListPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - Text(group[index]), - Text("利用コース: "), - Text("乗降場所: ") + detail("年齢: "), + detail("クラス: ${group[index]}"), + detail("保護者氏名: "), + detail("保護者連絡先: "), + detail("利用コース: "), + detail("乗降場所: "), ], ), ), From 4862701f557fc8f9b9e8dbf0239c9ce643e0aedf Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 18:36:09 +0900 Subject: [PATCH 105/771] =?UTF-8?q?feat:Ping=E9=80=9A=E4=BF=A1=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/main.dart | 3 +++ frontend/where_child_bus/lib/util/health_check.dart | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index b06324d6..86e6ad12 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -1,7 +1,10 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; +import 'package:where_child_bus/util/health_check.dart'; + void main() { + // createHoge(); runApp(const MyApp()); } diff --git a/frontend/where_child_bus/lib/util/health_check.dart b/frontend/where_child_bus/lib/util/health_check.dart index d8dc848b..25a222e6 100644 --- a/frontend/where_child_bus/lib/util/health_check.dart +++ b/frontend/where_child_bus/lib/util/health_check.dart @@ -1,23 +1,24 @@ import 'dart:async'; import 'dart:developer' as developer; // エラーログに使用 import 'package:grpc/grpc.dart'; -import 'package:where_child_bus/generated/where_child_bus/health_check.pbgrpc.dart'; +import 'package:where_child_bus/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart'; -Future createHoge(String dartSideParam1, int dartSideParam2, bool dartSideParam3) async { +Future createHoge() async { final channel = ClientChannel( - 'localhost', - port: 8000, + 'where-child-bus-grpc-k3dkun2lpq-uw.a.run.app', + port: 443, options: const ChannelOptions(credentials: ChannelCredentials.insecure()), ); final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 10))); try { - await grpcClient.ping(PingRequest()..name = "HOOOGEEE"); + PingResponse res = await grpcClient.ping(PingRequest()..name = "PING"); await channel.shutdown(); + return Future.value(res); } catch (error) { developer.log('Caught error: $error'); await channel.shutdown(); return Future.error(error); } -} +} \ No newline at end of file From 86df211eee78b43fc1d3619a78b47011a15e43ea Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 19:21:41 +0900 Subject: [PATCH 106/771] =?UTF-8?q?chore:=20grpcClient=E4=B8=80=E9=83=A8?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=81=AE=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/util/health_check.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/where_child_bus/lib/util/health_check.dart b/frontend/where_child_bus/lib/util/health_check.dart index 25a222e6..dfc7f463 100644 --- a/frontend/where_child_bus/lib/util/health_check.dart +++ b/frontend/where_child_bus/lib/util/health_check.dart @@ -3,17 +3,18 @@ import 'dart:developer' as developer; // エラーログに使用 import 'package:grpc/grpc.dart'; import 'package:where_child_bus/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart'; - Future createHoge() async { final channel = ClientChannel( 'where-child-bus-grpc-k3dkun2lpq-uw.a.run.app', port: 443, - options: const ChannelOptions(credentials: ChannelCredentials.insecure()), ); - final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 10))); + final grpcClient = HealthcheckServiceClient(channel, + options: CallOptions(timeout: const Duration(seconds: 60))); try { - PingResponse res = await grpcClient.ping(PingRequest()..name = "PING"); + var rqst = PingRequest(); + rqst.name = "ping"; + PingResponse res = await grpcClient.ping(rqst); await channel.shutdown(); return Future.value(res); } catch (error) { @@ -21,4 +22,4 @@ Future createHoge() async { await channel.shutdown(); return Future.error(error); } -} \ No newline at end of file +} From 425a089d29f5e6f4bb813e55a6ac74da38737b1e Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 19:29:38 +0900 Subject: [PATCH 107/771] =?UTF-8?q?feat:=E7=B7=A8=E9=9B=86=E7=94=A8?= =?UTF-8?q?=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_list_page.dart | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 55c0ad38..55c4079c 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -100,12 +100,7 @@ class _StudentListPageState extends State { context: context, builder: (BuildContext context) { return Container( - padding: const EdgeInsets.only( - top: 50.0, - right: 30.0, - bottom: 30.0, - left: 30.0, - ), + padding: const EdgeInsets.all(30.0), height: 1000, decoration: BoxDecoration( color: Colors.white, @@ -117,13 +112,23 @@ class _StudentListPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - Row(children: [ - childImage(index), - SizedBox( - width: 50, + Stack(children: [ + Align( + alignment: Alignment.topRight, + child: ElevatedButton( + style: ElevatedButton.styleFrom(shape: CircleBorder()), + onPressed: () {}, + child: Icon(Icons.edit), + ), ), - Text(name[index], - style: TextStyle(color: Colors.black, fontSize: 24)), + Row(children: [ + childImage(index), + SizedBox( + width: 50, + ), + Text(name[index], + style: TextStyle(color: Colors.black, fontSize: 24)), + ]), ]), Container( margin: EdgeInsets.only(top: 20), From 3960f05c2e50a262d984143e37c349cc0f25e4f1 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 19:42:28 +0900 Subject: [PATCH 108/771] =?UTF-8?q?chore:grpc=E9=80=9A=E4=BF=A1=E3=81=AB?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E3=81=99=E3=82=8B=E3=83=A1=E3=82=BD=E3=83=83?= =?UTF-8?q?=E3=83=89=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/main.dart | 4 ++-- frontend/where_child_bus/lib/util/health_check.dart | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 86e6ad12..4ac3e292 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -4,8 +4,8 @@ import 'package:where_child_bus/app.dart'; import 'package:where_child_bus/util/health_check.dart'; void main() { - // createHoge(); - runApp(const MyApp()); + createHoge(); + // runApp(const MyApp()); } class MyApp extends StatefulWidget { diff --git a/frontend/where_child_bus/lib/util/health_check.dart b/frontend/where_child_bus/lib/util/health_check.dart index dfc7f463..c8af57c4 100644 --- a/frontend/where_child_bus/lib/util/health_check.dart +++ b/frontend/where_child_bus/lib/util/health_check.dart @@ -1,13 +1,16 @@ import 'dart:async'; import 'dart:developer' as developer; // エラーログに使用 -import 'package:grpc/grpc.dart'; +import 'package:grpc/grpc_web.dart'; import 'package:where_child_bus/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart'; Future createHoge() async { - final channel = ClientChannel( - 'where-child-bus-grpc-k3dkun2lpq-uw.a.run.app', - port: 443, - ); + // final channel = ClientChannel( + // 'where-child-bus-grpc-k3dkun2lpq-uw.a.run.app', + // port: 443, + // ); + + final channel = GrpcWebClientChannel.xhr(Uri.parse('http://where-child-bus-grpc-k3dkun2lpq-uw.a.run.app:443')); + final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 60))); From 85c155e8c61cc9e597b718c1e67521d0d71f1db4 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 19:51:20 +0900 Subject: [PATCH 109/771] =?UTF-8?q?update:=E8=A9=B3=E7=B4=B0=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=81=AE=E9=85=8D=E7=BD=AE=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_list_page.dart | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 55c4079c..17c3c420 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -91,8 +91,23 @@ class _StudentListPageState extends State { ]); } - Widget detail(String element) { - return Text(element, style: TextStyle(color: Colors.black, fontSize: 18)); + Widget detail(String title, String element) { + return Row( + children: [ + SizedBox( + width: 18 * 6 + 6, + child: Text( + title, + style: TextStyle(color: Colors.black, fontSize: 18), + textAlign: TextAlign.center, + ), + ), + SizedBox( + width: 50, + ), + Text(element, style: TextStyle(color: Colors.black, fontSize: 18)) + ], + ); } void showBottomSheet(BuildContext context, int index) { @@ -136,12 +151,12 @@ class _StudentListPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - detail("年齢: "), - detail("クラス: ${group[index]}"), - detail("保護者氏名: "), - detail("保護者連絡先: "), - detail("利用コース: "), - detail("乗降場所: "), + detail("年齢", "3歳"), + detail("クラス", group[index]), + detail("保護者氏名", "保護者1"), + detail("保護者連絡先", "xxx-xxxx-xxxx"), + detail("利用コース", "○○コース"), + detail("乗降場所", "○○駐車場前"), ], ), ), From c67b65224e54ce5e28f88939e52a82ffd5075977 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 20:08:03 +0900 Subject: [PATCH 110/771] chore: delete unuse file --- backend/cmd/client/main.go | 2 +- backend/gprc_server/grpc_server.go | 2 +- backend/interfaces/healthcheck.go | 2 +- .../go/where_child_bus/health_check.pb.go | 226 --- .../where_child_bus/health_check_grpc.pb.go | 107 -- .../go/where_child_bus/resources.pb.go | 1434 ----------------- backend/usecases/healthcheck/healthcheck.go | 2 +- 7 files changed, 4 insertions(+), 1771 deletions(-) delete mode 100644 backend/proto-gen/go/where_child_bus/health_check.pb.go delete mode 100644 backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go delete mode 100644 backend/proto-gen/go/where_child_bus/resources.pb.go diff --git a/backend/cmd/client/main.go b/backend/cmd/client/main.go index f9abac39..f998db70 100644 --- a/backend/cmd/client/main.go +++ b/backend/cmd/client/main.go @@ -6,7 +6,7 @@ import ( "flag" "log" - pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "google.golang.org/grpc" "google.golang.org/grpc/credentials" diff --git a/backend/gprc_server/grpc_server.go b/backend/gprc_server/grpc_server.go index e42a9442..8bc74350 100644 --- a/backend/gprc_server/grpc_server.go +++ b/backend/gprc_server/grpc_server.go @@ -4,7 +4,7 @@ import ( "context" grpc_interfaces "github.com/GreenTeaProgrammers/WhereChildBus/backend/interfaces" - pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "golang.org/x/exp/slog" "google.golang.org/grpc" diff --git a/backend/interfaces/healthcheck.go b/backend/interfaces/healthcheck.go index 5569fc1e..7f2018f6 100644 --- a/backend/interfaces/healthcheck.go +++ b/backend/interfaces/healthcheck.go @@ -3,7 +3,7 @@ package interfaces import ( "context" - pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/healthcheck" ) diff --git a/backend/proto-gen/go/where_child_bus/health_check.pb.go b/backend/proto-gen/go/where_child_bus/health_check.pb.go deleted file mode 100644 index 8cf8c326..00000000 --- a/backend/proto-gen/go/where_child_bus/health_check.pb.go +++ /dev/null @@ -1,226 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc (unknown) -// source: where_child_bus/health_check.proto - -package where_child_bus - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *PingRequest) Reset() { - *x = PingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_health_check_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingRequest) ProtoMessage() {} - -func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_health_check_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. -func (*PingRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_health_check_proto_rawDescGZIP(), []int{0} -} - -func (x *PingRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type PingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *PingResponse) Reset() { - *x = PingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_health_check_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingResponse) ProtoMessage() {} - -func (x *PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_health_check_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. -func (*PingResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_health_check_proto_rawDescGZIP(), []int{1} -} - -func (x *PingResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_where_child_bus_health_check_proto protoreflect.FileDescriptor - -var file_where_child_bus_health_check_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x22, 0x21, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x32, 0x59, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, - 0x12, 0x1c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xce, 0x01, - 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0xa2, 0x02, 0x03, 0x57, - 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0xca, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0xe2, 0x02, 0x19, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_where_child_bus_health_check_proto_rawDescOnce sync.Once - file_where_child_bus_health_check_proto_rawDescData = file_where_child_bus_health_check_proto_rawDesc -) - -func file_where_child_bus_health_check_proto_rawDescGZIP() []byte { - file_where_child_bus_health_check_proto_rawDescOnce.Do(func() { - file_where_child_bus_health_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_health_check_proto_rawDescData) - }) - return file_where_child_bus_health_check_proto_rawDescData -} - -var file_where_child_bus_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_where_child_bus_health_check_proto_goTypes = []interface{}{ - (*PingRequest)(nil), // 0: where_child_bus.PingRequest - (*PingResponse)(nil), // 1: where_child_bus.PingResponse -} -var file_where_child_bus_health_check_proto_depIdxs = []int32{ - 0, // 0: where_child_bus.HealthcheckService.Ping:input_type -> where_child_bus.PingRequest - 1, // 1: where_child_bus.HealthcheckService.Ping:output_type -> where_child_bus.PingResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_where_child_bus_health_check_proto_init() } -func file_where_child_bus_health_check_proto_init() { - if File_where_child_bus_health_check_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_where_child_bus_health_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_health_check_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_where_child_bus_health_check_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_where_child_bus_health_check_proto_goTypes, - DependencyIndexes: file_where_child_bus_health_check_proto_depIdxs, - MessageInfos: file_where_child_bus_health_check_proto_msgTypes, - }.Build() - File_where_child_bus_health_check_proto = out.File - file_where_child_bus_health_check_proto_rawDesc = nil - file_where_child_bus_health_check_proto_goTypes = nil - file_where_child_bus_health_check_proto_depIdxs = nil -} diff --git a/backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go b/backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go deleted file mode 100644 index ebdc5f3f..00000000 --- a/backend/proto-gen/go/where_child_bus/health_check_grpc.pb.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: where_child_bus/health_check.proto - -package where_child_bus - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - HealthcheckService_Ping_FullMethodName = "/where_child_bus.HealthcheckService/Ping" -) - -// HealthcheckServiceClient is the client API for HealthcheckService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type HealthcheckServiceClient interface { - Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) -} - -type healthcheckServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewHealthcheckServiceClient(cc grpc.ClientConnInterface) HealthcheckServiceClient { - return &healthcheckServiceClient{cc} -} - -func (c *healthcheckServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { - out := new(PingResponse) - err := c.cc.Invoke(ctx, HealthcheckService_Ping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HealthcheckServiceServer is the server API for HealthcheckService service. -// All implementations should embed UnimplementedHealthcheckServiceServer -// for forward compatibility -type HealthcheckServiceServer interface { - Ping(context.Context, *PingRequest) (*PingResponse, error) -} - -// UnimplementedHealthcheckServiceServer should be embedded to have forward compatible implementations. -type UnimplementedHealthcheckServiceServer struct { -} - -func (UnimplementedHealthcheckServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") -} - -// UnsafeHealthcheckServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to HealthcheckServiceServer will -// result in compilation errors. -type UnsafeHealthcheckServiceServer interface { - mustEmbedUnimplementedHealthcheckServiceServer() -} - -func RegisterHealthcheckServiceServer(s grpc.ServiceRegistrar, srv HealthcheckServiceServer) { - s.RegisterService(&HealthcheckService_ServiceDesc, srv) -} - -func _HealthcheckService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HealthcheckServiceServer).Ping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: HealthcheckService_Ping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HealthcheckServiceServer).Ping(ctx, req.(*PingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// HealthcheckService_ServiceDesc is the grpc.ServiceDesc for HealthcheckService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var HealthcheckService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "where_child_bus.HealthcheckService", - HandlerType: (*HealthcheckServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Ping", - Handler: _HealthcheckService_Ping_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "where_child_bus/health_check.proto", -} diff --git a/backend/proto-gen/go/where_child_bus/resources.pb.go b/backend/proto-gen/go/where_child_bus/resources.pb.go deleted file mode 100644 index 817b8667..00000000 --- a/backend/proto-gen/go/where_child_bus/resources.pb.go +++ /dev/null @@ -1,1434 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc (unknown) -// source: where_child_bus/resources.proto - -package where_child_bus - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Bus_Status int32 - -const ( - Bus_STOPPED Bus_Status = 0 - Bus_RUNNING Bus_Status = 1 - Bus_MAINTEINANCE Bus_Status = 2 -) - -// Enum value maps for Bus_Status. -var ( - Bus_Status_name = map[int32]string{ - 0: "STOPPED", - 1: "RUNNING", - 2: "MAINTEINANCE", - } - Bus_Status_value = map[string]int32{ - "STOPPED": 0, - "RUNNING": 1, - "MAINTEINANCE": 2, - } -) - -func (x Bus_Status) Enum() *Bus_Status { - p := new(Bus_Status) - *p = x - return p -} - -func (x Bus_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Bus_Status) Descriptor() protoreflect.EnumDescriptor { - return file_where_child_bus_resources_proto_enumTypes[0].Descriptor() -} - -func (Bus_Status) Type() protoreflect.EnumType { - return &file_where_child_bus_resources_proto_enumTypes[0] -} - -func (x Bus_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Bus_Status.Descriptor instead. -func (Bus_Status) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{2, 0} -} - -type Child_Sex int32 - -const ( - Child_MAN Child_Sex = 0 - Child_WOMEN Child_Sex = 1 - Child_OTHER Child_Sex = 2 -) - -// Enum value maps for Child_Sex. -var ( - Child_Sex_name = map[int32]string{ - 0: "MAN", - 1: "WOMEN", - 2: "OTHER", - } - Child_Sex_value = map[string]int32{ - "MAN": 0, - "WOMEN": 1, - "OTHER": 2, - } -) - -func (x Child_Sex) Enum() *Child_Sex { - p := new(Child_Sex) - *p = x - return p -} - -func (x Child_Sex) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Child_Sex) Descriptor() protoreflect.EnumDescriptor { - return file_where_child_bus_resources_proto_enumTypes[1].Descriptor() -} - -func (Child_Sex) Type() protoreflect.EnumType { - return &file_where_child_bus_resources_proto_enumTypes[1] -} - -func (x Child_Sex) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Child_Sex.Descriptor instead. -func (Child_Sex) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{3, 0} -} - -type ChildBusAssociation_BusType int32 - -const ( - ChildBusAssociation_MORNING ChildBusAssociation_BusType = 0 - ChildBusAssociation_AFTERNOON ChildBusAssociation_BusType = 1 -) - -// Enum value maps for ChildBusAssociation_BusType. -var ( - ChildBusAssociation_BusType_name = map[int32]string{ - 0: "MORNING", - 1: "AFTERNOON", - } - ChildBusAssociation_BusType_value = map[string]int32{ - "MORNING": 0, - "AFTERNOON": 1, - } -) - -func (x ChildBusAssociation_BusType) Enum() *ChildBusAssociation_BusType { - p := new(ChildBusAssociation_BusType) - *p = x - return p -} - -func (x ChildBusAssociation_BusType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ChildBusAssociation_BusType) Descriptor() protoreflect.EnumDescriptor { - return file_where_child_bus_resources_proto_enumTypes[2].Descriptor() -} - -func (ChildBusAssociation_BusType) Type() protoreflect.EnumType { - return &file_where_child_bus_resources_proto_enumTypes[2] -} - -func (x ChildBusAssociation_BusType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ChildBusAssociation_BusType.Descriptor instead. -func (ChildBusAssociation_BusType) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{5, 0} -} - -type Nursery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryCode string `protobuf:"bytes,2,opt,name=nursery_code,json=nurseryCode,proto3" json:"nursery_code,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` - PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` - EncryptedPassword string `protobuf:"bytes,7,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Nursery) Reset() { - *x = Nursery{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Nursery) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Nursery) ProtoMessage() {} - -func (x *Nursery) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Nursery.ProtoReflect.Descriptor instead. -func (*Nursery) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{0} -} - -func (x *Nursery) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Nursery) GetNurseryCode() string { - if x != nil { - return x.NurseryCode - } - return "" -} - -func (x *Nursery) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Nursery) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Nursery) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *Nursery) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *Nursery) GetEncryptedPassword() string { - if x != nil { - return x.EncryptedPassword - } - return "" -} - -func (x *Nursery) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Nursery) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type Guardian struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` - PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - EncryptedPassword string `protobuf:"bytes,6,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Guardian) Reset() { - *x = Guardian{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Guardian) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Guardian) ProtoMessage() {} - -func (x *Guardian) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Guardian.ProtoReflect.Descriptor instead. -func (*Guardian) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{1} -} - -func (x *Guardian) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Guardian) GetNurseryId() string { - if x != nil { - return x.NurseryId - } - return "" -} - -func (x *Guardian) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Guardian) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *Guardian) GetPhoneNumber() string { - if x != nil { - return x.PhoneNumber - } - return "" -} - -func (x *Guardian) GetEncryptedPassword() string { - if x != nil { - return x.EncryptedPassword - } - return "" -} - -func (x *Guardian) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Guardian) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type Bus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - PlateNumber string `protobuf:"bytes,4,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` - Status Bus_Status `protobuf:"varint,5,opt,name=status,proto3,enum=where_child_bus.Bus_Status" json:"status,omitempty"` - // 緯度経度 - Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Bus) Reset() { - *x = Bus{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bus) ProtoMessage() {} - -func (x *Bus) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Bus.ProtoReflect.Descriptor instead. -func (*Bus) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{2} -} - -func (x *Bus) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Bus) GetNurseryId() string { - if x != nil { - return x.NurseryId - } - return "" -} - -func (x *Bus) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Bus) GetPlateNumber() string { - if x != nil { - return x.PlateNumber - } - return "" -} - -func (x *Bus) GetStatus() Bus_Status { - if x != nil { - return x.Status - } - return Bus_STOPPED -} - -func (x *Bus) GetLatitude() float64 { - if x != nil { - return x.Latitude - } - return 0 -} - -func (x *Bus) GetLongitude() float64 { - if x != nil { - return x.Longitude - } - return 0 -} - -func (x *Bus) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Bus) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type Child struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - GuardianId string `protobuf:"bytes,3,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Age int32 `protobuf:"varint,5,opt,name=age,proto3" json:"age,omitempty"` - Sex Child_Sex `protobuf:"varint,6,opt,name=sex,proto3,enum=where_child_bus.Child_Sex" json:"sex,omitempty"` - IsRideMorningBus bool `protobuf:"varint,7,opt,name=is_ride_morning_bus,json=isRideMorningBus,proto3" json:"is_ride_morning_bus,omitempty"` - IsRideAfternoonBus bool `protobuf:"varint,8,opt,name=is_ride_afternoon_bus,json=isRideAfternoonBus,proto3" json:"is_ride_afternoon_bus,omitempty"` - CheckForMissingItems bool `protobuf:"varint,9,opt,name=check_for_missing_items,json=checkForMissingItems,proto3" json:"check_for_missing_items,omitempty"` - HasBag bool `protobuf:"varint,10,opt,name=has_bag,json=hasBag,proto3" json:"has_bag,omitempty"` - HasLunchBox bool `protobuf:"varint,11,opt,name=has_lunch_box,json=hasLunchBox,proto3" json:"has_lunch_box,omitempty"` - HasWaterBottle bool `protobuf:"varint,12,opt,name=has_water_bottle,json=hasWaterBottle,proto3" json:"has_water_bottle,omitempty"` - HasUmbrera bool `protobuf:"varint,13,opt,name=has_umbrera,json=hasUmbrera,proto3" json:"has_umbrera,omitempty"` - HasOther bool `protobuf:"varint,14,opt,name=has_other,json=hasOther,proto3" json:"has_other,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Child) Reset() { - *x = Child{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Child) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Child) ProtoMessage() {} - -func (x *Child) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Child.ProtoReflect.Descriptor instead. -func (*Child) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{3} -} - -func (x *Child) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Child) GetNurseryId() string { - if x != nil { - return x.NurseryId - } - return "" -} - -func (x *Child) GetGuardianId() string { - if x != nil { - return x.GuardianId - } - return "" -} - -func (x *Child) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Child) GetAge() int32 { - if x != nil { - return x.Age - } - return 0 -} - -func (x *Child) GetSex() Child_Sex { - if x != nil { - return x.Sex - } - return Child_MAN -} - -func (x *Child) GetIsRideMorningBus() bool { - if x != nil { - return x.IsRideMorningBus - } - return false -} - -func (x *Child) GetIsRideAfternoonBus() bool { - if x != nil { - return x.IsRideAfternoonBus - } - return false -} - -func (x *Child) GetCheckForMissingItems() bool { - if x != nil { - return x.CheckForMissingItems - } - return false -} - -func (x *Child) GetHasBag() bool { - if x != nil { - return x.HasBag - } - return false -} - -func (x *Child) GetHasLunchBox() bool { - if x != nil { - return x.HasLunchBox - } - return false -} - -func (x *Child) GetHasWaterBottle() bool { - if x != nil { - return x.HasWaterBottle - } - return false -} - -func (x *Child) GetHasUmbrera() bool { - if x != nil { - return x.HasUmbrera - } - return false -} - -func (x *Child) GetHasOther() bool { - if x != nil { - return x.HasOther - } - return false -} - -func (x *Child) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Child) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type Station struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - GuardianId string `protobuf:"bytes,2,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` - Latitude float64 `protobuf:"fixed64,3,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,4,opt,name=longitude,proto3" json:"longitude,omitempty"` - MorningOrder int32 `protobuf:"varint,5,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` - AfternoonOrder int32 `protobuf:"varint,6,opt,name=afternoon_order,json=afternoonOrder,proto3" json:"afternoon_order,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Station) Reset() { - *x = Station{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Station) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Station) ProtoMessage() {} - -func (x *Station) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Station.ProtoReflect.Descriptor instead. -func (*Station) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{4} -} - -func (x *Station) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Station) GetGuardianId() string { - if x != nil { - return x.GuardianId - } - return "" -} - -func (x *Station) GetLatitude() float64 { - if x != nil { - return x.Latitude - } - return 0 -} - -func (x *Station) GetLongitude() float64 { - if x != nil { - return x.Longitude - } - return 0 -} - -func (x *Station) GetMorningOrder() int32 { - if x != nil { - return x.MorningOrder - } - return 0 -} - -func (x *Station) GetAfternoonOrder() int32 { - if x != nil { - return x.AfternoonOrder - } - return 0 -} - -func (x *Station) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Station) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type ChildBusAssociation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - ChildId string `protobuf:"bytes,3,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - BusType ChildBusAssociation_BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.ChildBusAssociation_BusType" json:"bus_type,omitempty"` -} - -func (x *ChildBusAssociation) Reset() { - *x = ChildBusAssociation{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChildBusAssociation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChildBusAssociation) ProtoMessage() {} - -func (x *ChildBusAssociation) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChildBusAssociation.ProtoReflect.Descriptor instead. -func (*ChildBusAssociation) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{5} -} - -func (x *ChildBusAssociation) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ChildBusAssociation) GetBusId() string { - if x != nil { - return x.BusId - } - return "" -} - -func (x *ChildBusAssociation) GetChildId() string { - if x != nil { - return x.ChildId - } - return "" -} - -func (x *ChildBusAssociation) GetBusType() ChildBusAssociation_BusType { - if x != nil { - return x.BusType - } - return ChildBusAssociation_MORNING -} - -type BusStationAssociation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - StationId string `protobuf:"bytes,2,opt,name=station_id,json=stationId,proto3" json:"station_id,omitempty"` -} - -func (x *BusStationAssociation) Reset() { - *x = BusStationAssociation{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BusStationAssociation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BusStationAssociation) ProtoMessage() {} - -func (x *BusStationAssociation) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BusStationAssociation.ProtoReflect.Descriptor instead. -func (*BusStationAssociation) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{6} -} - -func (x *BusStationAssociation) GetBusId() string { - if x != nil { - return x.BusId - } - return "" -} - -func (x *BusStationAssociation) GetStationId() string { - if x != nil { - return x.StationId - } - return "" -} - -type ChildPhoto struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - S3Bucket string `protobuf:"bytes,3,opt,name=s3_bucket,json=s3Bucket,proto3" json:"s3_bucket,omitempty"` - S3Key string `protobuf:"bytes,4,opt,name=s3_key,json=s3Key,proto3" json:"s3_key,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *ChildPhoto) Reset() { - *x = ChildPhoto{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChildPhoto) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChildPhoto) ProtoMessage() {} - -func (x *ChildPhoto) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChildPhoto.ProtoReflect.Descriptor instead. -func (*ChildPhoto) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{7} -} - -func (x *ChildPhoto) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ChildPhoto) GetChildId() string { - if x != nil { - return x.ChildId - } - return "" -} - -func (x *ChildPhoto) GetS3Bucket() string { - if x != nil { - return x.S3Bucket - } - return "" -} - -func (x *ChildPhoto) GetS3Key() string { - if x != nil { - return x.S3Key - } - return "" -} - -func (x *ChildPhoto) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *ChildPhoto) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type BoardingRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - BusId string `protobuf:"bytes,3,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - IsBoarding bool `protobuf:"varint,4,opt,name=is_boarding,json=isBoarding,proto3" json:"is_boarding,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (x *BoardingRecord) Reset() { - *x = BoardingRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BoardingRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BoardingRecord) ProtoMessage() {} - -func (x *BoardingRecord) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BoardingRecord.ProtoReflect.Descriptor instead. -func (*BoardingRecord) Descriptor() ([]byte, []int) { - return file_where_child_bus_resources_proto_rawDescGZIP(), []int{8} -} - -func (x *BoardingRecord) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *BoardingRecord) GetChildId() string { - if x != nil { - return x.ChildId - } - return "" -} - -func (x *BoardingRecord) GetBusId() string { - if x != nil { - return x.BusId - } - return "" -} - -func (x *BoardingRecord) GetIsBoarding() bool { - if x != nil { - return x.IsBoarding - } - return false -} - -func (x *BoardingRecord) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -var File_where_child_bus_resources_proto protoreflect.FileDescriptor - -var file_where_child_bus_resources_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x02, 0x0a, 0x07, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x43, 0x6f, - 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, - 0x02, 0x0a, 0x08, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x86, 0x03, 0x0a, - 0x03, 0x62, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x62, 0x75, 0x73, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, - 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, - 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, - 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, - 0x50, 0x50, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, - 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, 0x4e, 0x41, - 0x4e, 0x43, 0x45, 0x10, 0x02, 0x22, 0x85, 0x05, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, - 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6d, - 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, - 0x75, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x69, 0x73, 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x61, 0x66, - 0x74, 0x65, 0x72, 0x6e, 0x6f, 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x12, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x6e, 0x6f, - 0x6f, 0x6e, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, - 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, - 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, - 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, - 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, - 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, - 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, - 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, - 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, - 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, - 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, - 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x24, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x07, - 0x0a, 0x03, 0x4d, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x4f, 0x4d, 0x45, 0x4e, - 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x22, 0xb8, 0x02, - 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, - 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x66, 0x74, - 0x65, 0x72, 0x6e, 0x6f, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0e, 0x61, 0x66, 0x74, 0x65, 0x72, 0x6e, 0x6f, 0x6f, 0x6e, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xc7, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x49, 0x64, 0x12, 0x47, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, - 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x25, 0x0a, 0x07, 0x42, - 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, - 0x47, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x46, 0x54, 0x45, 0x52, 0x4e, 0x4f, 0x4f, 0x4e, - 0x10, 0x01, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, - 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, - 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, - 0x33, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x73, 0x33, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, - 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, - 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0xcc, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x42, 0x0e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, - 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0xca, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0xe2, 0x02, 0x19, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_where_child_bus_resources_proto_rawDescOnce sync.Once - file_where_child_bus_resources_proto_rawDescData = file_where_child_bus_resources_proto_rawDesc -) - -func file_where_child_bus_resources_proto_rawDescGZIP() []byte { - file_where_child_bus_resources_proto_rawDescOnce.Do(func() { - file_where_child_bus_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_resources_proto_rawDescData) - }) - return file_where_child_bus_resources_proto_rawDescData -} - -var file_where_child_bus_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_where_child_bus_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_where_child_bus_resources_proto_goTypes = []interface{}{ - (Bus_Status)(0), // 0: where_child_bus.bus.Status - (Child_Sex)(0), // 1: where_child_bus.Child.Sex - (ChildBusAssociation_BusType)(0), // 2: where_child_bus.ChildBusAssociation.BusType - (*Nursery)(nil), // 3: where_child_bus.Nursery - (*Guardian)(nil), // 4: where_child_bus.Guardian - (*Bus)(nil), // 5: where_child_bus.bus - (*Child)(nil), // 6: where_child_bus.Child - (*Station)(nil), // 7: where_child_bus.Station - (*ChildBusAssociation)(nil), // 8: where_child_bus.ChildBusAssociation - (*BusStationAssociation)(nil), // 9: where_child_bus.BusStationAssociation - (*ChildPhoto)(nil), // 10: where_child_bus.ChildPhoto - (*BoardingRecord)(nil), // 11: where_child_bus.BoardingRecord - (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp -} -var file_where_child_bus_resources_proto_depIdxs = []int32{ - 12, // 0: where_child_bus.Nursery.created_at:type_name -> google.protobuf.Timestamp - 12, // 1: where_child_bus.Nursery.updated_at:type_name -> google.protobuf.Timestamp - 12, // 2: where_child_bus.Guardian.created_at:type_name -> google.protobuf.Timestamp - 12, // 3: where_child_bus.Guardian.updated_at:type_name -> google.protobuf.Timestamp - 0, // 4: where_child_bus.bus.status:type_name -> where_child_bus.bus.Status - 12, // 5: where_child_bus.bus.created_at:type_name -> google.protobuf.Timestamp - 12, // 6: where_child_bus.bus.updated_at:type_name -> google.protobuf.Timestamp - 1, // 7: where_child_bus.Child.sex:type_name -> where_child_bus.Child.Sex - 12, // 8: where_child_bus.Child.created_at:type_name -> google.protobuf.Timestamp - 12, // 9: where_child_bus.Child.updated_at:type_name -> google.protobuf.Timestamp - 12, // 10: where_child_bus.Station.created_at:type_name -> google.protobuf.Timestamp - 12, // 11: where_child_bus.Station.updated_at:type_name -> google.protobuf.Timestamp - 2, // 12: where_child_bus.ChildBusAssociation.bus_type:type_name -> where_child_bus.ChildBusAssociation.BusType - 12, // 13: where_child_bus.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp - 12, // 14: where_child_bus.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp - 12, // 15: where_child_bus.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name -} - -func init() { file_where_child_bus_resources_proto_init() } -func file_where_child_bus_resources_proto_init() { - if File_where_child_bus_resources_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_where_child_bus_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Nursery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Guardian); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Child); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Station); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChildBusAssociation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BusStationAssociation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChildPhoto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_where_child_bus_resources_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BoardingRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_where_child_bus_resources_proto_rawDesc, - NumEnums: 3, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_where_child_bus_resources_proto_goTypes, - DependencyIndexes: file_where_child_bus_resources_proto_depIdxs, - EnumInfos: file_where_child_bus_resources_proto_enumTypes, - MessageInfos: file_where_child_bus_resources_proto_msgTypes, - }.Build() - File_where_child_bus_resources_proto = out.File - file_where_child_bus_resources_proto_rawDesc = nil - file_where_child_bus_resources_proto_goTypes = nil - file_where_child_bus_resources_proto_depIdxs = nil -} diff --git a/backend/usecases/healthcheck/healthcheck.go b/backend/usecases/healthcheck/healthcheck.go index c8155a94..962d9f28 100644 --- a/backend/usecases/healthcheck/healthcheck.go +++ b/backend/usecases/healthcheck/healthcheck.go @@ -1,7 +1,7 @@ package healthcheck import ( - pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" ) type Interactor struct{} From 431a26b7b9ec0782d03548b29d0f650773c191be Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sun, 11 Feb 2024 20:44:10 +0900 Subject: [PATCH 111/771] feat: add augmatation by torchvision --- .../data/faceDetectDataset.py | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index c6ee3eaf..8829f79d 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -1,33 +1,35 @@ import torch +from torchvision import transforms import torchvision.transforms.functional as TF from torch.utils.data import Dataset import os import cv2 - class FaceDetectDataset(Dataset): VALID_EXTENSIONS = {".png"} # 適宜調整 - def __init__(self, config): + def __init__(self, config, transform=None): self.data_dir = config["dataset"]["root_path"] + self.transform = transform self.face_data = [] self.label_name_dict = {} name_label_dict = {} self.label_num = 0 for file_name in os.listdir(self.data_dir): - # macOS環境におけるDS_Storeなどのファイルをスキップ if not self._is_valid_file(file_name): continue file_path = os.path.join(self.data_dir, file_name) people_name = file_name.split("-")[0] - # TODO: データ拡張によってはBGR -> RGB変換処理を検討 image = cv2.imread(file_path) if image is None: continue - image_tensor = TF.to_tensor(image) + # BGRからRGBに変換 + image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) + # 画像をPIL Imageに変換(transformにPIL Imageを要求する場合) + # image = Image.fromarray(image) # 人物名とラベルの対応を辞書に保存 if name_label_dict.get(people_name) is None: @@ -35,11 +37,11 @@ def __init__(self, config): name_label_dict[people_name] = self.label_num self.label_num += 1 - label_img_data = ( + # label_img_dataの代わりに、(label, image)のタプルを直接face_dataに追加 + self.face_data.append(( torch.tensor(name_label_dict[people_name], dtype=torch.int64), - image_tensor, - ) - self.face_data.append(label_img_data) + image, # この時点ではまだNumPy配列 + )) def _is_valid_file(self, file_name): return os.path.splitext(file_name)[1].lower() in self.VALID_EXTENSIONS @@ -48,7 +50,13 @@ def __len__(self): return len(self.face_data) def __getitem__(self, idx): - return self.face_data[idx] + label, image = self.face_data[idx] + + # transformが定義されている場合はここで適用 + if self.transform: + image = self.transform(image) + + return label, image def get_label_name_dict(self): return self.label_name_dict @@ -57,4 +65,11 @@ def get_label_num(self): return self.label_num def get_image_shape(self): - return self.face_data[0][1].shape + # 最初の画像の形状を取得するために変換後のTensorを使用 + if len(self.face_data) > 0: + _, sample_image = self.face_data[0] + if self.transform: + sample_image = self.transform(sample_image) + return sample_image.shape + else: + return None \ No newline at end of file From e1b691fc685e2985f3bb20efe4d2cd7c0ca85707 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 20:46:00 +0900 Subject: [PATCH 112/771] =?UTF-8?q?feat:Config.dart=E3=82=92=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/config/config.dart | 21 +++++++++++++++++++ frontend/where_child_bus/pubspec.lock | 8 +++++++ frontend/where_child_bus/pubspec.yaml | 1 + 3 files changed, 30 insertions(+) create mode 100644 frontend/where_child_bus/lib/config/config.dart diff --git a/frontend/where_child_bus/lib/config/config.dart b/frontend/where_child_bus/lib/config/config.dart new file mode 100644 index 00000000..6e9d12e3 --- /dev/null +++ b/frontend/where_child_bus/lib/config/config.dart @@ -0,0 +1,21 @@ +import 'package:flutter_dotenv/flutter_dotenv.dart' as dotenv; + +class AppConfig { + static final AppConfig _instance = AppConfig._internal(); + + factory AppConfig() { + return _instance; + } + + AppConfig._internal(); + + late String grpcEndpoint; + String get grpcEndpointUrl => grpcEndpoint; + Future loadConfig() async { + await dotenv.dotenv.load(); + + grpcEndpoint = dotenv.dotenv.env['GRPC_ENDPOINT'] ?? 'http://localhost:443'; + } +} + +final appConfig = AppConfig(); \ No newline at end of file diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index 90188c33..d0f3b00d 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -102,6 +102,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_dotenv: + dependency: "direct main" + description: + name: flutter_dotenv + sha256: "9357883bdd153ab78cbf9ffa07656e336b8bbb2b5a3ca596b0b27e119f7c7d77" + url: "https://pub.dev" + source: hosted + version: "5.1.0" flutter_lints: dependency: "direct dev" description: diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 16a076b0..08f9d86b 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -12,6 +12,7 @@ dependencies: sdk: flutter grpc: ^3.2.4 protobuf: ^3.1.0 + flutter_dotenv: ^5.1.0 cupertino_icons: ^1.0.2 From 0774318c0e595e57bb007fda0e11597b4264504c Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sun, 11 Feb 2024 20:48:57 +0900 Subject: [PATCH 113/771] feat: add augmatation by torchvision --- .../data/faceDetectDataset.py | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index 8829f79d..6821b9e8 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -10,7 +10,7 @@ class FaceDetectDataset(Dataset): def __init__(self, config, transform=None): self.data_dir = config["dataset"]["root_path"] - self.transform = transform + self.transform = transform if transform is not None else self.default_transforms() self.face_data = [] self.label_name_dict = {} name_label_dict = {} @@ -26,23 +26,28 @@ def __init__(self, config, transform=None): image = cv2.imread(file_path) if image is None: continue - # BGRからRGBに変換 - image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) - # 画像をPIL Imageに変換(transformにPIL Imageを要求する場合) - # image = Image.fromarray(image) + image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # BGRからRGBに変換 - # 人物名とラベルの対応を辞書に保存 if name_label_dict.get(people_name) is None: self.label_name_dict[self.label_num] = people_name name_label_dict[people_name] = self.label_num self.label_num += 1 - # label_img_dataの代わりに、(label, image)のタプルを直接face_dataに追加 self.face_data.append(( torch.tensor(name_label_dict[people_name], dtype=torch.int64), image, # この時点ではまだNumPy配列 )) + @staticmethod + def default_transforms(): + return transforms.Compose([ + transforms.ToPILImage(), # NumPy配列をPIL Imageに変換 + transforms.Resize((224, 224)), + transforms.RandomHorizontalFlip(), + transforms.ToTensor(), + transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), + ]) + def _is_valid_file(self, file_name): return os.path.splitext(file_name)[1].lower() in self.VALID_EXTENSIONS @@ -52,7 +57,7 @@ def __len__(self): def __getitem__(self, idx): label, image = self.face_data[idx] - # transformが定義されている場合はここで適用 + # NumPy配列をPIL Imageに変換し、transformが定義されている場合は適用 if self.transform: image = self.transform(image) @@ -65,7 +70,6 @@ def get_label_num(self): return self.label_num def get_image_shape(self): - # 最初の画像の形状を取得するために変換後のTensorを使用 if len(self.face_data) > 0: _, sample_image = self.face_data[0] if self.transform: From 7f9b5077e51118753b5cb3905b0a18636e619e29 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 20:54:17 +0900 Subject: [PATCH 114/771] =?UTF-8?q?feat(server):=20gRPC=E3=82=B5=E3=83=BC?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=81=ABChildServiceServer=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/gprc_server/grpc_server.go | 8 +- backend/interfaces/child.go | 26 ++++++ backend/interfaces/healthcheck.go | 2 +- backend/usecases/child/child.go | 93 +++++++++++++++++++++ backend/usecases/healthcheck/healthcheck.go | 2 +- backend/usecases/utils/utils.go | 44 ++++++++++ 6 files changed, 172 insertions(+), 3 deletions(-) create mode 100644 backend/interfaces/child.go create mode 100644 backend/usecases/child/child.go create mode 100644 backend/usecases/utils/utils.go diff --git a/backend/gprc_server/grpc_server.go b/backend/gprc_server/grpc_server.go index e42a9442..4050a1d7 100644 --- a/backend/gprc_server/grpc_server.go +++ b/backend/gprc_server/grpc_server.go @@ -4,7 +4,8 @@ import ( "context" grpc_interfaces "github.com/GreenTeaProgrammers/WhereChildBus/backend/interfaces" - pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/child" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "golang.org/x/exp/slog" "google.golang.org/grpc" @@ -28,6 +29,11 @@ func New(opts ...optionFunc) *grpc.Server { if opt.useReflection { reflection.Register(srv) } + + childInteractor := child.NewInteractor(opt.entClient, opt.logger) + childSrv := grpc_interfaces.NewChildServiceServer(childInteractor) + pb.RegisterChildServiceServer(srv, childSrv) + healthcheckSrv := grpc_interfaces.NewHealthcheckServiceServer() pb.RegisterHealthcheckServiceServer(srv, healthcheckSrv) diff --git a/backend/interfaces/child.go b/backend/interfaces/child.go new file mode 100644 index 00000000..5fc129e6 --- /dev/null +++ b/backend/interfaces/child.go @@ -0,0 +1,26 @@ +package interfaces + +import ( + "context" + + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/child" +) + +type childServiceServer struct { + interactor *child.Interactor +} + +func NewChildServiceServer(interactor *child.Interactor) pb.ChildServiceServer { + return &childServiceServer{interactor} +} + +// GetChildListByGuardianID implements where_child_busv1.ChildServiceServer. +func (s *childServiceServer) GetChildListByGuardianID(ctx context.Context, req *pb.GetChildListByGuardianIDRequest) (*pb.GetChildListByGuardianIDResponse, error) { + return s.interactor.GetChildListByGuardianID(ctx, req) +} + +// GetChildListByNurseryID implements where_child_busv1.ChildServiceServer. +func (s *childServiceServer) GetChildListByNurseryID(ctx context.Context, req *pb.GetChildListByNurseryIDRequest) (*pb.GetChildListByNurseryIDResponse, error) { + return s.interactor.GetChildListByNurseryID(ctx, req) +} diff --git a/backend/interfaces/healthcheck.go b/backend/interfaces/healthcheck.go index 5569fc1e..7f2018f6 100644 --- a/backend/interfaces/healthcheck.go +++ b/backend/interfaces/healthcheck.go @@ -3,7 +3,7 @@ package interfaces import ( "context" - pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/healthcheck" ) diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go new file mode 100644 index 00000000..becac3e7 --- /dev/null +++ b/backend/usecases/child/child.go @@ -0,0 +1,93 @@ +package child + +import ( + "fmt" + + "github.com/google/uuid" + "golang.org/x/exp/slog" + + "context" + + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" +) + + +type Interactor struct { + entClient *ent.Client + logger *slog.Logger +} + +func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { + return &Interactor{entClient, logger} +} + +func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetChildListByGuardianIDRequest) (*pb.GetChildListByGuardianIDResponse, error) { + guardianID, err := uuid.Parse(req.GuardianId) + if err != nil { + return nil, fmt.Errorf("failed to parse guardian ID '%s': %w", req.GuardianId, err) + } + + children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { + return tx.Child.Query().Where(childRepo.HasGuardianWith(guardianRepo.IDEQ(guardianID))), nil + }) + + if err != nil { + return nil, err + } + + return &pb.GetChildListByGuardianIDResponse{Children: children}, nil +} + +func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChildListByNurseryIDRequest) (*pb.GetChildListByNurseryIDResponse, error) { + nurseryID, err := uuid.Parse(req.NurseryId) + if err != nil { + return nil, fmt.Errorf("failed to parse nursery ID '%s': %w", req.NurseryId, err) + } + + children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { + return tx.Child.Query().Where(childRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID))), nil + }) + + if err != nil { + return nil, err + } + + return &pb.GetChildListByNurseryIDResponse{Children: children}, nil +} + +// getChildList abstracts the common logic for fetching child lists. +func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.ChildQuery, error)) ([]*pb.Child, error) { + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + defer tx.Rollback() // Rollback is safe to call even if the tx is already committed. + + query, err := queryFunc(tx) + if err != nil { + return nil, err + } + + entChildren, err := query.All(ctx) + if err != nil { + return nil, fmt.Errorf("query failed: %w", err) + } + + pbChildren := make([]*pb.Child, len(entChildren)) + for i, c := range entChildren { + pbChildren[i] = utils.ToPbChild(c) + } + + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + + return pbChildren, nil +} + diff --git a/backend/usecases/healthcheck/healthcheck.go b/backend/usecases/healthcheck/healthcheck.go index c8155a94..962d9f28 100644 --- a/backend/usecases/healthcheck/healthcheck.go +++ b/backend/usecases/healthcheck/healthcheck.go @@ -1,7 +1,7 @@ package healthcheck import ( - pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" ) type Interactor struct{} diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go new file mode 100644 index 00000000..eafb4b21 --- /dev/null +++ b/backend/usecases/utils/utils.go @@ -0,0 +1,44 @@ +package utils + +import ( + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" +) + +func ToPbChild(t *ent.Child) *pb.Child { + sex := convertSexToPbSex(t.Sex) + return &pb.Child{ + Id: t.ID.String(), + NurseryId: t.Edges.Nursery.ID.String(), + GuardianId: t.Edges.Guardian.ID.String(), + Name: t.Name, + Age: int32(t.Age), + Sex: sex, + IsRideMorningBus: t.IsRideMorningBus, + IsRideEveningBus: t.IsRideEveningBus, + CheckForMissingItems: t.CheckForMissingItems, + HasBag: t.HasBag, + HasLunchBox: t.HasLunchBox, + HasWaterBottle: t.HasWaterBottle, + HasUmbrera: t.HasUmbrella, + HasOther: t.HasOther, + CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, + UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + } +} + +func convertSexToPbSex(sex child.Sex) pb.Child_Sex { + switch sex { + case child.SexMan: + return pb.Child_SEX_MAN + case child.SexWomen: + return pb.Child_SEX_WOMEN + case child.SexOther: + return pb.Child_SEX_OTHER + default: + return pb.Child_SEX_UNSPECIFIED + } +} From ef99d4bafb60a466fdda7ffaea0c32b6dec679de Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 21:05:56 +0900 Subject: [PATCH 115/771] =?UTF-8?q?feat:port=E3=81=AE=E8=AA=AD=E3=81=BF?= =?UTF-8?q?=E8=BE=BC=E3=81=BF=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/config/config.dart | 11 ++++++----- frontend/where_child_bus/pubspec.yaml | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus/lib/config/config.dart b/frontend/where_child_bus/lib/config/config.dart index 6e9d12e3..e9cd4ef6 100644 --- a/frontend/where_child_bus/lib/config/config.dart +++ b/frontend/where_child_bus/lib/config/config.dart @@ -1,4 +1,4 @@ -import 'package:flutter_dotenv/flutter_dotenv.dart' as dotenv; +import 'package:flutter_dotenv/flutter_dotenv.dart'; class AppConfig { static final AppConfig _instance = AppConfig._internal(); @@ -10,11 +10,12 @@ class AppConfig { AppConfig._internal(); late String grpcEndpoint; - String get grpcEndpointUrl => grpcEndpoint; - Future loadConfig() async { - await dotenv.dotenv.load(); + late int grpcPort; - grpcEndpoint = dotenv.dotenv.env['GRPC_ENDPOINT'] ?? 'http://localhost:443'; + Future loadConfig() async { + await dotenv.load(); + grpcEndpoint = dotenv.get("GRPC_ENDPOINT"); + grpcPort = int.tryParse(dotenv.get("GRPC_PORT")) ?? 0; } } diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 08f9d86b..3a54c423 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -25,4 +25,5 @@ dev_dependencies: flutter: uses-material-design: true assets: - - assets/images/ \ No newline at end of file + - assets/images/ + - .env \ No newline at end of file From f5b55cb6bbebb34d03f3558474c83485271c213b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 21:06:20 +0900 Subject: [PATCH 116/771] =?UTF-8?q?chore:.gitignore=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/where_child_bus/.gitignore b/frontend/where_child_bus/.gitignore index 40b28a92..8919a098 100644 --- a/frontend/where_child_bus/.gitignore +++ b/frontend/where_child_bus/.gitignore @@ -14,6 +14,7 @@ build/ coverage/ lib/generated_plugin_registrant.dart +.env # For library packages, don’t commit the pubspec.lock file. # Regenerating the pubspec.lock file lets you test your package against the latest compatible versions of its dependencies. # See https://dart.dev/guides/libraries/private-files#pubspeclock From 265a6f375291646131fc4ac4c7caf90adaa23783 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 21:09:55 +0900 Subject: [PATCH 117/771] =?UTF-8?q?refactor:=E3=83=AA=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E3=82=B3=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=81=AE=E5=88=86=E5=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_list_page.dart | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 17c3c420..671fe581 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -46,23 +46,28 @@ class _StudentListPageState extends State { return FractionallySizedBox( widthFactor: 0.8, child: InkWell( - onTap: () { - showBottomSheet(context, index); - }, - child: Card( - color: Colors.white, - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Row(children: [ - childImage(index), - SizedBox( - width: screenSize.width * 0.05, - ), - nameAndGroup(index), - ]))))); + onTap: () { + showBottomSheet(context, index); + }, + child: childCard(index, screenSize), + )); }); } + Widget childCard(int index, Size screenSize) { + return Card( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row(children: [ + childImage(index), + SizedBox( + width: screenSize.width * 0.05, + ), + nameAndGroup(index), + ]))); + } + Widget childImage(int index) { return SizedBox( width: 100, From a17f30e6639f8692ea2b1b9cb4e8380730326d94 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 21:09:56 +0900 Subject: [PATCH 118/771] =?UTF-8?q?feat:=E3=82=A2=E3=83=97=E3=83=AA?= =?UTF-8?q?=E8=B5=B7=E5=8B=95=E6=99=82=E3=81=AB=E3=83=98=E3=83=AB=E3=82=B9?= =?UTF-8?q?=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/main.dart | 9 +++++---- .../where_child_bus/lib/util/health_check.dart | 17 ++++++++++------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 4ac3e292..192d42c9 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -1,11 +1,12 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; - import 'package:where_child_bus/util/health_check.dart'; +import 'package:where_child_bus/config/config.dart'; -void main() { - createHoge(); - // runApp(const MyApp()); +void main() async { + await appConfig.loadConfig(); + await serviceHealthCheck(); + runApp(const MyApp()); } class MyApp extends StatefulWidget { diff --git a/frontend/where_child_bus/lib/util/health_check.dart b/frontend/where_child_bus/lib/util/health_check.dart index c8af57c4..8b188b96 100644 --- a/frontend/where_child_bus/lib/util/health_check.dart +++ b/frontend/where_child_bus/lib/util/health_check.dart @@ -1,15 +1,17 @@ import 'dart:async'; import 'dart:developer' as developer; // エラーログに使用 -import 'package:grpc/grpc_web.dart'; +import 'package:grpc/grpc.dart'; import 'package:where_child_bus/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart'; +import 'package:where_child_bus/config/config.dart'; -Future createHoge() async { - // final channel = ClientChannel( - // 'where-child-bus-grpc-k3dkun2lpq-uw.a.run.app', - // port: 443, - // ); - final channel = GrpcWebClientChannel.xhr(Uri.parse('http://where-child-bus-grpc-k3dkun2lpq-uw.a.run.app:443')); +Future serviceHealthCheck() async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + + // final channel = GrpcWebClientChannel.xhr(Uri.parse('http://where-child-bus-grpc-k3dkun2lpq-uw.a.run.app:443')); final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 60))); @@ -18,6 +20,7 @@ Future createHoge() async { var rqst = PingRequest(); rqst.name = "ping"; PingResponse res = await grpcClient.ping(rqst); + print(res.message); await channel.shutdown(); return Future.value(res); } catch (error) { From ad8ed3ee3cf888309fb8e21f25b700ea9276e6c2 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 21:14:57 +0900 Subject: [PATCH 119/771] =?UTF-8?q?chore:=20dockercompose=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/docker-compose.yml | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 backend/docker-compose.yml diff --git a/backend/docker-compose.yml b/backend/docker-compose.yml deleted file mode 100644 index 7929c215..00000000 --- a/backend/docker-compose.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: "3.8" -services: - grpc-calculator: - image: gcr.io/wherechildbus/grpc-calculator:latest - ports: - - "50051:50051" - volumes: - - "/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt" # ←重要 - From 1fd1bd3f291c111019c2d60cde60d3765635941f Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 21:21:58 +0900 Subject: [PATCH 120/771] =?UTF-8?q?refactor:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E7=94=BB=E5=83=8F=E3=81=A8=E5=90=8D=E5=89=8D?= =?UTF-8?q?=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E3=82=B3=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=82=92=E5=88=86=E5=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_list_page.dart | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 671fe581..14e0ba9e 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -96,6 +96,16 @@ class _StudentListPageState extends State { ]); } + Widget imageAndName(int index) { + return Row(children: [ + childImage(index), + SizedBox( + width: 50, + ), + Text(name[index], style: TextStyle(color: Colors.black, fontSize: 24)), + ]); + } + Widget detail(String title, String element) { return Row( children: [ @@ -141,14 +151,7 @@ class _StudentListPageState extends State { child: Icon(Icons.edit), ), ), - Row(children: [ - childImage(index), - SizedBox( - width: 50, - ), - Text(name[index], - style: TextStyle(color: Colors.black, fontSize: 24)), - ]), + imageAndName(index), ]), Container( margin: EdgeInsets.only(top: 20), From 6103a7c765aa8d2d9e321c426973e67b8aeb3803 Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sun, 11 Feb 2024 21:29:17 +0900 Subject: [PATCH 121/771] refactor: changed --- .../src/face_detect_model/data/faceDetectDataset.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index 6821b9e8..d090bd70 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -1,12 +1,10 @@ import torch from torchvision import transforms -import torchvision.transforms.functional as TF -from torch.utils.data import Dataset import os import cv2 -class FaceDetectDataset(Dataset): - VALID_EXTENSIONS = {".png"} # 適宜調整 +class FaceDetectDataset(torch.utils.data.Dataset): + VALID_EXTENSIONS = {".png"} # 変更しない def __init__(self, config, transform=None): self.data_dir = config["dataset"]["root_path"] @@ -35,7 +33,7 @@ def __init__(self, config, transform=None): self.face_data.append(( torch.tensor(name_label_dict[people_name], dtype=torch.int64), - image, # この時点ではまだNumPy配列 + image, # ここではNumPy配列として格納 )) @staticmethod From bd0020a4d4a60ad090a61fdf5477e966a7c64bbc Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 21:48:24 +0900 Subject: [PATCH 122/771] =?UTF-8?q?chore:TODO=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 46887ce8..a6b437b7 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -19,7 +19,7 @@ class BottomSheetWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ // titleText(), - header("tesaaaaaaaaaaaaaaaaaaaaaaaaaa", "test"), + modalHeader("tesaaaaaaaaaaaaaaaaaaaaaaaaaa", "test"), Expanded( child: stationsList(context, busStations) ), @@ -30,7 +30,7 @@ class BottomSheetWidget extends StatelessWidget { ); } - Widget header(String busCourseName, String busOperatorName) { + Widget modalHeader(String busCourseName, String busOperatorName) { return Padding( padding: const EdgeInsets.fromLTRB(0, 50, 0, 10), child: Row( @@ -57,15 +57,15 @@ class BottomSheetWidget extends StatelessWidget { } - Widget stationsListElement(String stationName) { - return Text( - stationName, - textAlign: TextAlign.left, - style: const TextStyle( - fontSize: 18, - ), - ); - } + Widget stationsListElement(String stationName) { + return Text( + stationName, + textAlign: TextAlign.left, + style: const TextStyle( + fontSize: 18, + ), + ); + } Widget courseAndOperator(String courseName, String operatorName) { return Padding( @@ -105,6 +105,7 @@ class BottomSheetWidget extends StatelessWidget { ); } + //TODO:本来は画像を受蹴取って表示する Widget busThumbnail() { return const SizedBox( width: 100, @@ -117,6 +118,7 @@ class BottomSheetWidget extends StatelessWidget { ); } + //TODO 将来的に乗客詳細ページへの遷移を実装する Widget boardingConfirmButton(BuildContext context) { const double fontSize = 20; From 04d304cd3e0052788772b295d3f3d5d6e0cc9c4a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 22:03:39 +0900 Subject: [PATCH 123/771] =?UTF-8?q?feat(api):=20=E3=83=90=E3=82=B9?= =?UTF-8?q?=E3=81=AEAPI=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9=E3=82=92?= =?UTF-8?q?=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/gprc_server/grpc_server.go | 5 +++ backend/interfaces/bus.go | 21 +++++++++ backend/usecases/bus/bus.go | 72 ++++++++++++++++++++++++++++++ backend/usecases/child/child.go | 6 +-- backend/usecases/utils/utils.go | 27 +++++++++++ 5 files changed, 127 insertions(+), 4 deletions(-) create mode 100644 backend/interfaces/bus.go create mode 100644 backend/usecases/bus/bus.go diff --git a/backend/gprc_server/grpc_server.go b/backend/gprc_server/grpc_server.go index 4050a1d7..5f895234 100644 --- a/backend/gprc_server/grpc_server.go +++ b/backend/gprc_server/grpc_server.go @@ -5,6 +5,7 @@ import ( grpc_interfaces "github.com/GreenTeaProgrammers/WhereChildBus/backend/interfaces" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/bus" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/child" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "golang.org/x/exp/slog" @@ -30,6 +31,10 @@ func New(opts ...optionFunc) *grpc.Server { reflection.Register(srv) } + busInteractor := bus.NewInteractor(opt.entClient, opt.logger) + busSrv := grpc_interfaces.NewBusServiceServer(busInteractor) + pb.RegisterBusServiceServer(srv, busSrv) + childInteractor := child.NewInteractor(opt.entClient, opt.logger) childSrv := grpc_interfaces.NewChildServiceServer(childInteractor) pb.RegisterChildServiceServer(srv, childSrv) diff --git a/backend/interfaces/bus.go b/backend/interfaces/bus.go new file mode 100644 index 00000000..6f1f88ab --- /dev/null +++ b/backend/interfaces/bus.go @@ -0,0 +1,21 @@ +package interfaces + +import ( + "context" + + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/bus" +) + +type busServiceServer struct { + interactor *bus.Interactor +} + +func NewBusServiceServer(interactor *bus.Interactor) pb.BusServiceServer { + return &busServiceServer{interactor} +} + +// GetBusListByNurseryId implements where_child_busv1.BusServiceServer. +func (s *busServiceServer) GetBusListByNurseryId(ctx context.Context, req *pb.GetBusListByNurseryIdRequest) (*pb.GetBusListByNurseryIdResponse, error) { + return s.interactor.GetBusListByNurseryID(ctx, req) +} diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go new file mode 100644 index 00000000..774eee85 --- /dev/null +++ b/backend/usecases/bus/bus.go @@ -0,0 +1,72 @@ +package bus + +import ( + "fmt" + + "github.com/google/uuid" + "golang.org/x/exp/slog" + + "context" + + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" +) + +type Interactor struct { + entClient *ent.Client + logger *slog.Logger +} + +func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { + return &Interactor{entClient, logger} +} + +func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusListByNurseryIdRequest) (*pb.GetBusListByNurseryIdResponse, error) { + nurseryID, err := uuid.Parse(req.NurseryId) + if err != nil { + return nil, fmt.Errorf("failed to parse nursery ID '%s': %w", req.NurseryId, err) + } + + buses, err := i.getBusList(ctx, func(tx *ent.Tx) (*ent.BusQuery, error) { + return tx.Bus.Query().Where(busRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID))), nil + }) + + if err != nil { + return nil, err + } + + return &pb.GetBusListByNurseryIdResponse{Buses: buses}, nil +} + +func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.BusQuery, error)) ([]*pb.Bus, error) { + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + defer tx.Rollback() + + query, err := queryFunc(tx) + if err != nil { + return nil, fmt.Errorf("failed to create query: %w", err) + } + + entBuses, err := query.All(ctx) + if err != nil { + return nil, fmt.Errorf("failed to execute query: %w", err) + } + + pbBuses := make([]*pb.Bus, len(entBuses)) + for i, b := range entBuses { + pbBuses[i] = utils.ToPbBus(b) + } + + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + + return pbBuses, nil +} diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index becac3e7..4af10338 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -13,11 +13,10 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" - guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" - nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" ) - type Interactor struct { entClient *ent.Client logger *slog.Logger @@ -90,4 +89,3 @@ func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) ( return pbChildren, nil } - diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index eafb4b21..4bed7a53 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -5,6 +5,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" ) @@ -42,3 +43,29 @@ func convertSexToPbSex(sex child.Sex) pb.Child_Sex { return pb.Child_SEX_UNSPECIFIED } } + +func ToPbBus(t *ent.Bus) *pb.Bus { + status := convertStatusToPbStatus(t.Status) + return &pb.Bus{ + Id: t.ID.String(), + NurseryId: t.Edges.Nursery.ID.String(), + Name: t.Name, + PlateNumber: t.PlateNumber, + Latitude: t.Latitude, + Longitude: t.Longitude, + Status: status, + CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, + UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + } +} + +func convertStatusToPbStatus(status bus.Status) pb.Bus_Status { + switch status { + case bus.StatusRunning: + return pb.Bus_STATUS_RUNNING + case bus.StatusStopped: + return pb.Bus_STATUS_STOPPED + default: + return pb.Bus_STATUS_UNSPECIFIED + } +} From 5a76c597c497aa33904ddc4b8d68f112ee40071a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 22:04:07 +0900 Subject: [PATCH 124/771] =?UTF-8?q?feat:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E3=81=AB=E3=82=B3=E3=83=B3=E3=82=B9=E3=83=88=E3=83=A9?= =?UTF-8?q?=E3=82=AF=E3=82=BF=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 11 +++++++---- .../lib/pages/bus_list_page/bus_list_page.dart | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index a6b437b7..a8314a96 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -2,6 +2,10 @@ import 'package:flutter/material.dart'; class BottomSheetWidget extends StatelessWidget { final busStations = ["station1", "station2", "station3","station4","station5","station6", "station7", "station8", "station7", "station7"]; + final String busName; + + //将来的にはコンストラクタでバス型を受け取る + BottomSheetWidget({required this.busName}); @override Widget build(BuildContext context) { @@ -19,7 +23,7 @@ class BottomSheetWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ // titleText(), - modalHeader("tesaaaaaaaaaaaaaaaaaaaaaaaaaa", "test"), + modalHeader(busName, "test"), Expanded( child: stationsList(context, busStations) ), @@ -32,9 +36,9 @@ class BottomSheetWidget extends StatelessWidget { Widget modalHeader(String busCourseName, String busOperatorName) { return Padding( - padding: const EdgeInsets.fromLTRB(0, 50, 0, 10), + padding: const EdgeInsets.fromLTRB(40, 50, 0, 10), child: Row( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, children: [ busThumbnail(), courseAndOperator(busCourseName, busOperatorName), @@ -56,7 +60,6 @@ class BottomSheetWidget extends StatelessWidget { ); } - Widget stationsListElement(String stationName) { return Text( stationName, diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 3cefced5..d6f73d56 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -39,7 +39,7 @@ class _BusListPageState extends State { ); } - //TODO: 将来的にBus型を受け取る + //TODO: 将来的にBus型を受け取る, 将来的にモーダルにバスを渡す Widget busListCard(String name, bool isBusOperating) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), @@ -59,7 +59,7 @@ class _BusListPageState extends State { isDismissible: true, barrierColor: Colors.black.withOpacity(0.5), builder: (context) { - return BottomSheetWidget(); + return BottomSheetWidget(busName: name,); }); }, child: Row( From 864e84abc088ac52a4a15b2046b122804535e866 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 22:30:20 +0900 Subject: [PATCH 125/771] =?UTF-8?q?refactor:widget=E5=90=8D=E3=81=AE?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=81=A8=E3=82=B3=E3=83=BC=E3=83=89=E3=81=AE?= =?UTF-8?q?=E5=88=86=E5=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_list_page.dart | 105 ++++++++++-------- 1 file changed, 61 insertions(+), 44 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 14e0ba9e..5a6b0ba4 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -34,90 +34,96 @@ class _StudentListPageState extends State { Widget build(BuildContext context) { var screenSize = MediaQuery.of(context).size; + return childCardListBuilder(screenSize); + } + + Widget childCardListBuilder(Size screenSize) { return ListView.separated( itemCount: name.length, separatorBuilder: (BuildContext context, int index) { - return Divider( + return const Divider( height: 20, color: Colors.transparent, ); }, itemBuilder: (BuildContext context, int index) { - return FractionallySizedBox( - widthFactor: 0.8, - child: InkWell( - onTap: () { - showBottomSheet(context, index); - }, - child: childCard(index, screenSize), - )); + return childCardListInner(index, screenSize); }); } + Widget childCardListInner(int index, Size screenSize) { + return FractionallySizedBox( + widthFactor: 0.8, + child: InkWell( + onTap: () { + showBottomSheet(context, index); + }, + child: childCard(index, screenSize), + )); + } + Widget childCard(int index, Size screenSize) { return Card( color: Colors.white, child: Padding( padding: const EdgeInsets.all(20.0), - child: Row(children: [ - childImage(index), - SizedBox( - width: screenSize.width * 0.05, - ), - nameAndGroup(index), - ]))); + child: childFaceImageNameAndGroupName(index, screenSize))); } - Widget childImage(int index) { + Widget childFaceImageNameAndGroupName(int index, Size screenSize) { + return Row(children: [ + childFaceImage(index), + SizedBox( + width: screenSize.width * 0.05, + ), + childNameAndGroupName(index), + ]); + } + + Widget childFaceImage(int index) { return SizedBox( width: 100, height: 100, child: Image.asset("assets/images/face_${image[index]}.png")); } - Widget nameAndGroup(int index) { + Widget childNameAndGroupName(int index) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(name[index], - style: TextStyle(color: Colors.black, fontSize: 24)), + style: const TextStyle(color: Colors.black, fontSize: 24)), Text( group[index], - style: TextStyle(color: Colors.black), + style: const TextStyle(color: Colors.black), ), - place(), + busStopName(), ]); } - Widget place() { - return Row(children: [ + Widget busStopName() { + return const Row(children: [ Icon(Icons.location_on), Text("停留所名"), ]); } - Widget imageAndName(int index) { + Widget childImageAndChildName(int index) { return Row(children: [ - childImage(index), - SizedBox( + childFaceImage(index), + const SizedBox( width: 50, ), - Text(name[index], style: TextStyle(color: Colors.black, fontSize: 24)), + Text(name[index], + style: const TextStyle(color: Colors.black, fontSize: 24)), ]); } - Widget detail(String title, String element) { + Widget childDetailInfo(String title, String element) { return Row( children: [ - SizedBox( - width: 18 * 6 + 6, - child: Text( - title, - style: TextStyle(color: Colors.black, fontSize: 18), - textAlign: TextAlign.center, - ), - ), - SizedBox( + detailTitle(title), + const SizedBox( width: 50, ), Text(element, style: TextStyle(color: Colors.black, fontSize: 18)) @@ -125,6 +131,17 @@ class _StudentListPageState extends State { ); } + Widget detailTitle(String title) { + return SizedBox( + width: 18 * 6 + 6, + child: Text( + title, + style: const TextStyle(color: Colors.black, fontSize: 18), + textAlign: TextAlign.center, + ), + ); + } + void showBottomSheet(BuildContext context, int index) { showModalBottomSheet( context: context, @@ -151,7 +168,7 @@ class _StudentListPageState extends State { child: Icon(Icons.edit), ), ), - imageAndName(index), + childImageAndChildName(index), ]), Container( margin: EdgeInsets.only(top: 20), @@ -159,12 +176,12 @@ class _StudentListPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - detail("年齢", "3歳"), - detail("クラス", group[index]), - detail("保護者氏名", "保護者1"), - detail("保護者連絡先", "xxx-xxxx-xxxx"), - detail("利用コース", "○○コース"), - detail("乗降場所", "○○駐車場前"), + childDetailInfo("年齢", "3歳"), + childDetailInfo("クラス", group[index]), + childDetailInfo("保護者氏名", "保護者1"), + childDetailInfo("保護者連絡先", "xxx-xxxx-xxxx"), + childDetailInfo("利用コース", "○○コース"), + childDetailInfo("乗降場所", "○○駐車場前"), ], ), ), From f616e09832ebd3d720a49c5761d59a12b251c2a3 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 22:30:26 +0900 Subject: [PATCH 126/771] =?UTF-8?q?feat:edit=E3=83=9C=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 56 +++++++++++++++---- 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index a8314a96..0ceda48c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -18,18 +18,50 @@ class BottomSheetWidget extends StatelessWidget { topRight: Radius.circular(10), ), ), - child: Center( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // titleText(), - modalHeader(busName, "test"), - Expanded( - child: stationsList(context, busStations) - ), - boardingConfirmButton(context), - ], - ) + child: Stack( + children: [ + modalBody(context), + editButton(), + ] + ), + ); + } + + Widget modalBody(BuildContext context) { + return Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // titleText(), + modalHeader(busName, "test"), + Expanded( + child: stationsList(context, busStations) + ), + boardingConfirmButton(context), + ], + ) + ); + } + + Widget editButton() { + return Align( + alignment: const Alignment(1, -1), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 5), + child: ElevatedButton( + onPressed: () {}, + style: ElevatedButton.styleFrom( + backgroundColor: Colors.grey.shade300, + elevation: 0, + ), + child: const Text( + "Edit", + style: TextStyle( + color: Colors.black, + fontSize: 15, + ) + ), + ), ), ); } From 96b56a13d45c9101f31fb01a89110e92f3ffaf24 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 11 Feb 2024 22:55:35 +0900 Subject: [PATCH 127/771] =?UTF-8?q?chore(ml):=20clip=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E7=94=BB=E5=83=8F=E3=81=AE=E5=87=BA=E5=8A=9B=E5=85=88?= =?UTF-8?q?=E3=82=92gitigonore=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/machine_learning/.gitignore b/machine_learning/.gitignore index f5699a26..c6c7625a 100644 --- a/machine_learning/.gitignore +++ b/machine_learning/.gitignore @@ -37,6 +37,7 @@ Temporary Items ### Python ### src/face_detect_model/pickle/* src/face_detect_model/data/img +src/face_detect_model/data/detect_img # Byte-compiled / optimized / DLL files __pycache__/ From 1ba150772f923fe6a90e64489f09eda16d965fdb Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 11 Feb 2024 22:56:42 +0900 Subject: [PATCH 128/771] =?UTF-8?q?refactor(ml):=20=E6=A9=9F=E6=A2=B0?= =?UTF-8?q?=E5=AD=A6=E7=BF=92=E5=89=8D=E5=87=A6=E7=90=86=E7=94=A8=E3=82=B9?= =?UTF-8?q?=E3=82=AF=E3=83=AA=E3=83=97=E3=83=88=E3=81=A8=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=83=AA=E3=83=8D=E3=83=BC=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/detectFaceAndClip.py | 92 +++++++++++++++++++ .../src/face_detect_model/data/util.py | 37 -------- 2 files changed, 92 insertions(+), 37 deletions(-) create mode 100644 machine_learning/src/face_detect_model/data/detectFaceAndClip.py delete mode 100644 machine_learning/src/face_detect_model/data/util.py diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py new file mode 100644 index 00000000..7059fcd7 --- /dev/null +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -0,0 +1,92 @@ +import cv2 +import os +import yaml + + +def load_cascade(cascade_path): + """Haar Cascadeを読み込む""" + return cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) + + +def detect_face( + image, face_cascade, scaleFactor=1.1, minNeighbors=15, minSize=(50, 50) +): + """画像から顔を検出する""" + gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) + faces = face_cascade.detectMultiScale( + gray, scaleFactor=scaleFactor, minNeighbors=minNeighbors, minSize=minSize + ) + return faces + + +def clip_and_resize_face(face, image, image_size): + """検出された顔をクリップし、指定サイズにリサイズする""" + (x, y, w, h) = face + face_roi = image[y : y + h, x : x + w] + resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) + return resized_face + + +def save_face(face, save_dir, save_file_name): + """クリップされた顔画像を保存する""" + if not os.path.exists(os.path.dirname(save_dir)): + os.makedirs(os.path.dirname(save_dir)) + save_path = os.path.join(save_dir, save_file_name) + try: + cv2.imwrite(save_path, face) + except Exception as e: + raise e + + +def main(): + # パスの指定 + with open("src/face_detect_model/config.yaml", "r") as f: + config = yaml.safe_load(f) + + face_cascade_path = config["face_detect"]["cascade_path"] + image_dir_path = "src/face_detect_model/data/img" + save_dir = "src/face_detect_model/data/detect_img" + image_size = ( + config["face_detect"]["clip_size"]["height"], + config["face_detect"]["clip_size"]["width"], + ) + + if not os.path.exists(save_dir): + os.makedirs(save_dir) + + for file in os.listdir(save_dir): + file_path = os.path.join(save_dir, file) + if os.path.isfile(file_path): + os.remove(file_path) + + # 画像の読み込み + for image_name in os.listdir(image_dir_path): + image = cv2.imread(image_path := os.path.join(image_dir_path, image_name)) + if image is None: + print(f"画像ファイルが見つからないか読み込めません: {image_path}") + return + # Haar Cascadeの読み込み + face_cascade = load_cascade(face_cascade_path) + + # 画像から顔を検出 + faces = detect_face( + image, + face_cascade, + scaleFactor=config["face_detect"]["scale_factor"], + minNeighbors=config["face_detect"]["min_neighbors"], + minSize=( + config["face_detect"]["min_size"]["height"], + config["face_detect"]["min_size"]["width"], + ), + ) + + # 検出された各顔に対して処理 + for i, face in enumerate(faces): + clipped_face = clip_and_resize_face(face, image, image_size) + image_name_without_ext = os.path.splitext(image_name)[0] + save_file_name = f"{image_name_without_ext}-{i}.png" + save_face(clipped_face, save_dir, save_file_name) + + +if __name__ == "__main__": + main() diff --git a/machine_learning/src/face_detect_model/data/util.py b/machine_learning/src/face_detect_model/data/util.py deleted file mode 100644 index 7cb03fca..00000000 --- a/machine_learning/src/face_detect_model/data/util.py +++ /dev/null @@ -1,37 +0,0 @@ -import cv2 -import os - - -def load_cascade(cascade_path): - """Haar Cascadeを読み込む""" - return cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) - - -def detect_face( - image, face_cascade, scaleFactor=1.1, minNeighbors=15, minSize=(50, 50) -): - """画像から顔を検出する""" - gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) - faces = face_cascade.detectMultiScale( - gray, scaleFactor=scaleFactor, minNeighbors=minNeighbors, minSize=minSize - ) - return faces - - -def clip_and_resize_face(face, image, image_size): - """検出された顔をクリップし、指定サイズにリサイズする""" - (x, y, w, h) = face - face_roi = image[y : y + h, x : x + w] - resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) - return resized_face - - -def save_face(face, save_dir, save_file_name): - """クリップされた顔画像を保存する""" - if not os.path.exists(os.path.dirname(save_dir)): - os.makedirs(os.path.dirname(save_dir)) - save_path = os.path.join(save_dir, save_file_name) - try: - cv2.imwrite(save_path, face) - except Exception as e: - raise e From 85cbdd662a7553304bd1dd9ddfb3e3c95aab39de Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 11 Feb 2024 22:57:00 +0900 Subject: [PATCH 129/771] =?UTF-8?q?refactor(ml):=20=E3=83=A2=E3=83=87?= =?UTF-8?q?=E3=83=AB=E5=90=8D=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../face_detect_model/model/{model.py => faceDetectModel.py} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename machine_learning/src/face_detect_model/model/{model.py => faceDetectModel.py} (94%) diff --git a/machine_learning/src/face_detect_model/model/model.py b/machine_learning/src/face_detect_model/model/faceDetectModel.py similarity index 94% rename from machine_learning/src/face_detect_model/model/model.py rename to machine_learning/src/face_detect_model/model/faceDetectModel.py index bc21d0c8..f488d6de 100644 --- a/machine_learning/src/face_detect_model/model/model.py +++ b/machine_learning/src/face_detect_model/model/faceDetectModel.py @@ -1,9 +1,9 @@ import torch.nn as nn -class Net(nn.Module): +class FaceDetectModel(nn.Module): def __init__(self, config: dict, num_classes: int): - super(Net, self).__init__() + super(FaceDetectModel, self).__init__() self.config = config # 汎用性のために入力チャンネル数をconfigから取得(一応) in_channels = config["model"]["in_channels"] From 470f3214f2a4ee32292403e433865b529b9c5aa7 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 23:10:50 +0900 Subject: [PATCH 130/771] =?UTF-8?q?refactor:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E3=82=92=E5=88=A5=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=81=B8=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_detail_sheet.dart | 95 +++++++++++++++++++ .../student_list_page/student_list_page.dart | 91 ++---------------- 2 files changed, 102 insertions(+), 84 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart new file mode 100644 index 00000000..3241073c --- /dev/null +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart @@ -0,0 +1,95 @@ +import 'package:flutter/material.dart'; + +class StudentDetailSheet extends StatelessWidget { + final String childName; + + StudentDetailSheet({required this.childName}); + + @override + Widget build(BuildContext context) { + return Container( + padding: const EdgeInsets.all(30.0), + height: 1000, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20.0), topRight: Radius.circular(20.0)), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Stack(children: [ + Align( + alignment: Alignment.topRight, + child: ElevatedButton( + style: ElevatedButton.styleFrom(shape: CircleBorder()), + onPressed: () {}, + child: Icon(Icons.edit), + ), + ), + childImageAndChildName(), + ]), + Container( + margin: EdgeInsets.only(top: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + childDetailInfo("年齢", "3歳"), + childDetailInfo("クラス", "1組"), + childDetailInfo("保護者氏名", "保護者1"), + childDetailInfo("保護者連絡先", "xxx-xxxx-xxxx"), + childDetailInfo("利用コース", "○○コース"), + childDetailInfo("乗降場所", "○○駐車場前"), + ], + ), + ), + ], + )); + } + + Widget childImageAndChildName() { + return Row(children: [ + childFaceImage(), + const SizedBox( + width: 50, + ), + Text(childName, + style: const TextStyle(color: Colors.black, fontSize: 24)), + ]); + } + + Widget childFaceImage() { + return const SizedBox( + width: 100, + height: 100, + child: Card( + color: Colors.grey, + ), + ); + } + + Widget childDetailInfo(String title, String element) { + return Row( + children: [ + detailTitle(title), + const SizedBox( + width: 50, + ), + Text(element, style: TextStyle(color: Colors.black, fontSize: 18)) + ], + ); + } + + Widget detailTitle(String title) { + return SizedBox( + width: 18 * 6 + 6, + child: Text( + title, + style: const TextStyle(color: Colors.black, fontSize: 18), + textAlign: TextAlign.center, + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 5a6b0ba4..fa4c9fcf 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/student_list_page/student_detail_sheet.dart'; class StudentListPage extends StatefulWidget { const StudentListPage({super.key}); @@ -55,8 +56,12 @@ class _StudentListPageState extends State { return FractionallySizedBox( widthFactor: 0.8, child: InkWell( - onTap: () { - showBottomSheet(context, index); + onTap: () async { + await showBottomSheet( + context: context, + builder: (BuildContext context) { + return StudentDetailSheet(childName: name[index]); + }); }, child: childCard(index, screenSize), )); @@ -107,86 +112,4 @@ class _StudentListPageState extends State { Text("停留所名"), ]); } - - Widget childImageAndChildName(int index) { - return Row(children: [ - childFaceImage(index), - const SizedBox( - width: 50, - ), - Text(name[index], - style: const TextStyle(color: Colors.black, fontSize: 24)), - ]); - } - - Widget childDetailInfo(String title, String element) { - return Row( - children: [ - detailTitle(title), - const SizedBox( - width: 50, - ), - Text(element, style: TextStyle(color: Colors.black, fontSize: 18)) - ], - ); - } - - Widget detailTitle(String title) { - return SizedBox( - width: 18 * 6 + 6, - child: Text( - title, - style: const TextStyle(color: Colors.black, fontSize: 18), - textAlign: TextAlign.center, - ), - ); - } - - void showBottomSheet(BuildContext context, int index) { - showModalBottomSheet( - context: context, - builder: (BuildContext context) { - return Container( - padding: const EdgeInsets.all(30.0), - height: 1000, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(20.0), - topRight: Radius.circular(20.0)), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Stack(children: [ - Align( - alignment: Alignment.topRight, - child: ElevatedButton( - style: ElevatedButton.styleFrom(shape: CircleBorder()), - onPressed: () {}, - child: Icon(Icons.edit), - ), - ), - childImageAndChildName(index), - ]), - Container( - margin: EdgeInsets.only(top: 20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - childDetailInfo("年齢", "3歳"), - childDetailInfo("クラス", group[index]), - childDetailInfo("保護者氏名", "保護者1"), - childDetailInfo("保護者連絡先", "xxx-xxxx-xxxx"), - childDetailInfo("利用コース", "○○コース"), - childDetailInfo("乗降場所", "○○駐車場前"), - ], - ), - ), - ], - )); - }); - } } From 4081f8c2d958f11e67d59a80c2b63441cf779532 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 11 Feb 2024 23:12:38 +0900 Subject: [PATCH 131/771] =?UTF-8?q?chore:android=E3=83=9E=E3=83=8B?= =?UTF-8?q?=E3=83=95=E3=82=A7=E3=82=B9=E3=83=88=E3=82=92=E8=A8=82=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/android/app/src/main/AndroidManifest.xml | 1 + frontend/where_child_bus/lib/util/health_check.dart | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml b/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml index b5c1bef5..6cdac4fd 100644 --- a/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml +++ b/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ + serviceHealthCheck() async { port: appConfig.grpcPort, ); - // final channel = GrpcWebClientChannel.xhr(Uri.parse('http://where-child-bus-grpc-k3dkun2lpq-uw.a.run.app:443')); - final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 60))); From dc58041fbf3522dc028f969453695ab20b593626 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 11 Feb 2024 23:17:21 +0900 Subject: [PATCH 132/771] =?UTF-8?q?feat(api):=20guardian=E3=81=AE=E3=83=AD?= =?UTF-8?q?=E3=82=B0=E3=82=A4=E3=83=B3=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/go.mod | 3 +- backend/go.sum | 4 ++ backend/gprc_server/grpc_server.go | 5 +++ backend/interfaces/guardian.go | 21 +++++++++ backend/usecases/guardian/guardian.go | 62 +++++++++++++++++++++++++++ backend/usecases/utils/utils.go | 12 ++++++ 6 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 backend/interfaces/guardian.go create mode 100644 backend/usecases/guardian/guardian.go diff --git a/backend/go.mod b/backend/go.mod index edf9e243..c16076a4 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -12,7 +12,7 @@ require google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31 require ( github.com/golang/protobuf v1.5.3 // indirect golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.17.0 // indirect google.golang.org/grpc v1.61.0 google.golang.org/protobuf v1.31.0 ) @@ -30,6 +30,7 @@ require ( github.com/kelseyhightower/envconfig v1.4.0 github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect github.com/zclconf/go-cty v1.8.0 // indirect + golang.org/x/crypto v0.19.0 golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 golang.org/x/mod v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/backend/go.sum b/backend/go.sum index ac9f77c3..20bf2808 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -58,6 +58,8 @@ github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgq github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= @@ -69,6 +71,8 @@ golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= diff --git a/backend/gprc_server/grpc_server.go b/backend/gprc_server/grpc_server.go index 5f895234..976d41de 100644 --- a/backend/gprc_server/grpc_server.go +++ b/backend/gprc_server/grpc_server.go @@ -7,6 +7,7 @@ import ( pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/bus" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/guardian" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "golang.org/x/exp/slog" "google.golang.org/grpc" @@ -39,6 +40,10 @@ func New(opts ...optionFunc) *grpc.Server { childSrv := grpc_interfaces.NewChildServiceServer(childInteractor) pb.RegisterChildServiceServer(srv, childSrv) + guardianInteractor := guardian.NewInteractor(opt.entClient, opt.logger) + guardianSrv := grpc_interfaces.NewGuardianServiceServer(guardianInteractor) + pb.RegisterGuardianServiceServer(srv, guardianSrv) + healthcheckSrv := grpc_interfaces.NewHealthcheckServiceServer() pb.RegisterHealthcheckServiceServer(srv, healthcheckSrv) diff --git a/backend/interfaces/guardian.go b/backend/interfaces/guardian.go new file mode 100644 index 00000000..4b83b9c7 --- /dev/null +++ b/backend/interfaces/guardian.go @@ -0,0 +1,21 @@ +package interfaces + +import ( + "context" + + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/guardian" +) + +type guardianServiceServer struct { + interactor *guardian.Interactor +} + +func NewGuardianServiceServer(interactor *guardian.Interactor) pb.GuardianServiceServer { + return &guardianServiceServer{interactor} +} + +// GuardianLogin implements where_child_busv1.GuardianServiceServer. +func (s *guardianServiceServer) GuardianLogin(ctx context.Context, req *pb.GuardianLoginRequest) (*pb.GuardianLoginResponse, error) { + return s.interactor.GuardianLogin(ctx, req) +} diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go new file mode 100644 index 00000000..2f27bfa5 --- /dev/null +++ b/backend/usecases/guardian/guardian.go @@ -0,0 +1,62 @@ +package guardian + +import ( + "fmt" + + "golang.org/x/crypto/bcrypt" + "golang.org/x/exp/slog" + + "context" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" +) + +type Interactor struct { + entClient *ent.Client + logger *slog.Logger +} + +func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { + return &Interactor{entClient, logger} +} + +func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginRequest) (*pb.GuardianLoginResponse, error) { + // パスワードをハッシュ化 + hashedPassword, err := bcrypt.GenerateFromPassword([]byte(req.Password), bcrypt.DefaultCost) + if err != nil { + // エラーハンドリング + return nil, fmt.Errorf("failed to hash password: %w", err) + } + + // トランザクションを開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + defer tx.Rollback() + + // Guardianを取得 + guardian, err := tx.Guardian.Query(). + Where(guardianRepo.Email(req.Email)). + Where(guardianRepo.EncryptedPassword(string(hashedPassword))). + Only(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to get guardian: %w", err) + } + + // トランザクションをコミット + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + + // レスポンスを返す + return &pb.GuardianLoginResponse{ + Success: true, + Guardian: utils.ToPbGuardianResponse(guardian), + }, nil + +} diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 4bed7a53..7315598f 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -69,3 +69,15 @@ func convertStatusToPbStatus(status bus.Status) pb.Bus_Status { return pb.Bus_STATUS_UNSPECIFIED } } + +func ToPbGuardianResponse(t *ent.Guardian) *pb.GuardianResponse { + return &pb.GuardianResponse{ + Id: t.ID.String(), + NurseryId: t.Edges.Nursery.ID.String(), + Email: t.Email, + PhoneNumber: t.PhoneNumber, + Name: t.Name, + CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, + UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + } +} From 581c99872a0135599ef6f43103ab0da11307122c Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sun, 11 Feb 2024 23:19:51 +0900 Subject: [PATCH 133/771] feat(proto): add some servecies - CreateNursery - CreateStation - GetChildListByBusId - GetStationListByBusID --- backend/proto/where_child_bus/v1/child.proto | 9 ++++++ .../proto/where_child_bus/v1/guardian.proto | 13 ++++++++ .../proto/where_child_bus/v1/nursery.proto | 13 ++++++++ .../proto/where_child_bus/v1/station.proto | 30 +++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 backend/proto/where_child_bus/v1/station.proto diff --git a/backend/proto/where_child_bus/v1/child.proto b/backend/proto/where_child_bus/v1/child.proto index 818c7963..bbee84c9 100644 --- a/backend/proto/where_child_bus/v1/child.proto +++ b/backend/proto/where_child_bus/v1/child.proto @@ -8,6 +8,7 @@ service ChildService { rpc CreateChild(CreateChildRequest) returns (CreateChildResponse); rpc GetChildListByNurseryID(GetChildListByNurseryIDRequest) returns (GetChildListByNurseryIDResponse); rpc GetChildListByGuardianID(GetChildListByGuardianIDRequest) returns (GetChildListByGuardianIDResponse); + rpc GetChildListByBusID(GetChildListByBusIDRequest) returns (GetChildListByBusIDResponse); } message CreateChildRequest { @@ -37,3 +38,11 @@ message GetChildListByGuardianIDRequest { message GetChildListByGuardianIDResponse { repeated Child children = 1; } + +message GetChildListByBusIDRequest { + string bus_id = 1; +} + +message GetChildListByBusIDResponse { + repeated Child children = 1; +} \ No newline at end of file diff --git a/backend/proto/where_child_bus/v1/guardian.proto b/backend/proto/where_child_bus/v1/guardian.proto index ae511353..a21d4c7a 100644 --- a/backend/proto/where_child_bus/v1/guardian.proto +++ b/backend/proto/where_child_bus/v1/guardian.proto @@ -5,9 +5,22 @@ package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; service GuardianService { + rpc CreateGuardian(CreateGuardianRequest) returns (CreateGuardianResponces); rpc GuardianLogin(GuardianLoginRequest) returns (GuardianLoginResponse); } +message CreateGuardianRequest{ + string nursery_code = 1; + string email = 2; + string password = 3; + string name = 4; + string phone_number = 5; +} + +message CreateGuardianResponces{ + GuardianResponse guardian = 1; +} + message GuardianLoginRequest { string email = 1; string password = 2; diff --git a/backend/proto/where_child_bus/v1/nursery.proto b/backend/proto/where_child_bus/v1/nursery.proto index 2b0bcd0b..f1b18156 100644 --- a/backend/proto/where_child_bus/v1/nursery.proto +++ b/backend/proto/where_child_bus/v1/nursery.proto @@ -5,9 +5,22 @@ package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; service NurseryService { + rpc CreateNursery(CreateChildRequest) returns (CreateNurseryResponse); rpc NurseryLogin(NurseryLoginRequest) returns (NurseryLoginResponse); } +message CreateNurseryRequest { + string email = 1; + string password = 2; + string name = 3; + string phone_number = 4; + string address = 5; +} + +message CreateNurseryResponse { + NurseryResponse nursery = 1: +} + message NurseryLoginRequest { string email = 1; string password = 2; diff --git a/backend/proto/where_child_bus/v1/station.proto b/backend/proto/where_child_bus/v1/station.proto new file mode 100644 index 00000000..438fd4b0 --- /dev/null +++ b/backend/proto/where_child_bus/v1/station.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; + +package where_child_bus.v1; + +import "where_child_bus/v1/resources.proto"; + +service StationService { + rpc CreateStation(CreateStationRequest) returns (CreateStationResponse); + rpc GetStationListByBusId(GetStationListByBusIdRequest) returns (GetStationListByBusIdResponse); +} + +message CreateStationRequest { + string guardian_id = 1: + double longtitude = 2; + double latitude = 3; +} + +message CreateStationResponse { + Station station = 1; +} + +message GetStationListByBusIdRequest { + string bus_id = 1; +} + +message GetStationListByBusIdResponse { + repeated Station stations = 1; + repeated GuardianResponse guardians = 2; + repeated Child children = 3; +} \ No newline at end of file From 788faccf8948b29c7a4dfd1667449de4970c03e5 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 11 Feb 2024 23:38:43 +0900 Subject: [PATCH 134/771] =?UTF-8?q?refactor:Widget=E5=90=8D=E3=81=AE?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=81=A8=E3=82=B3=E3=83=BC=E3=83=89=E3=81=AE?= =?UTF-8?q?=E5=88=86=E5=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_detail_sheet.dart | 97 +++++++++++-------- .../student_list_page/student_list_page.dart | 20 ++-- 2 files changed, 62 insertions(+), 55 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart index 3241073c..8ccb3f87 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart @@ -3,50 +3,46 @@ import 'package:flutter/material.dart'; class StudentDetailSheet extends StatelessWidget { final String childName; - StudentDetailSheet({required this.childName}); + const StudentDetailSheet({super.key, required this.childName}); @override Widget build(BuildContext context) { return Container( - padding: const EdgeInsets.all(30.0), - height: 1000, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(20.0), topRight: Radius.circular(20.0)), + padding: const EdgeInsets.all(30.0), + height: double.infinity, + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20.0), topRight: Radius.circular(20.0)), + ), + child: modalBody(), + ); + } + + Widget modalBody() { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + modalHeader(), + Container( + margin: const EdgeInsets.only(top: 20), child: childDetailList()) + ], + ); + } + + Widget modalHeader() { + return Stack(children: [ + Align( + alignment: Alignment.topRight, + child: ElevatedButton( + style: ElevatedButton.styleFrom(shape: const CircleBorder()), + onPressed: () {}, + child: const Icon(Icons.edit), ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Stack(children: [ - Align( - alignment: Alignment.topRight, - child: ElevatedButton( - style: ElevatedButton.styleFrom(shape: CircleBorder()), - onPressed: () {}, - child: Icon(Icons.edit), - ), - ), - childImageAndChildName(), - ]), - Container( - margin: EdgeInsets.only(top: 20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - childDetailInfo("年齢", "3歳"), - childDetailInfo("クラス", "1組"), - childDetailInfo("保護者氏名", "保護者1"), - childDetailInfo("保護者連絡先", "xxx-xxxx-xxxx"), - childDetailInfo("利用コース", "○○コース"), - childDetailInfo("乗降場所", "○○駐車場前"), - ], - ), - ), - ], - )); + ), + childImageAndChildName(), + ]); } Widget childImageAndChildName() { @@ -70,19 +66,34 @@ class StudentDetailSheet extends StatelessWidget { ); } - Widget childDetailInfo(String title, String element) { + Widget childDetailList() { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + childDetailItem("年齢", "3歳"), + childDetailItem("クラス", "1組"), + childDetailItem("保護者氏名", "保護者1"), + childDetailItem("保護者連絡先", "xxx-xxxx-xxxx"), + childDetailItem("利用コース", "○○コース"), + childDetailItem("乗降場所", "○○駐車場前"), + ], + ); + } + + Widget childDetailItem(String title, String element) { return Row( children: [ - detailTitle(title), + detailItemTitle(title), const SizedBox( width: 50, ), - Text(element, style: TextStyle(color: Colors.black, fontSize: 18)) + Text(element, style: const TextStyle(color: Colors.black, fontSize: 18)) ], ); } - Widget detailTitle(String title) { + Widget detailItemTitle(String title) { return SizedBox( width: 18 * 6 + 6, child: Text( diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index fa4c9fcf..30a799fd 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -57,7 +57,7 @@ class _StudentListPageState extends State { widthFactor: 0.8, child: InkWell( onTap: () async { - await showBottomSheet( + await showModalBottomSheet( context: context, builder: (BuildContext context) { return StudentDetailSheet(childName: name[index]); @@ -72,17 +72,13 @@ class _StudentListPageState extends State { color: Colors.white, child: Padding( padding: const EdgeInsets.all(20.0), - child: childFaceImageNameAndGroupName(index, screenSize))); - } - - Widget childFaceImageNameAndGroupName(int index, Size screenSize) { - return Row(children: [ - childFaceImage(index), - SizedBox( - width: screenSize.width * 0.05, - ), - childNameAndGroupName(index), - ]); + child: Row(children: [ + childFaceImage(index), + SizedBox( + width: screenSize.width * 0.05, + ), + childNameAndGroupName(index), + ]))); } Widget childFaceImage(int index) { From e629ced993ac636b39e85c96d6b39270fb0bd804 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 11 Feb 2024 23:59:17 +0900 Subject: [PATCH 135/771] =?UTF-8?q?feat(ml):=20=E5=85=83=E3=83=87=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E3=81=8C=E4=BA=BA=E7=89=A9=E3=81=94=E3=81=A8=E3=81=AE?= =?UTF-8?q?=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=81=AB?= =?UTF-8?q?=E5=88=86=E3=81=91=E3=82=89=E3=82=8C=E3=82=8B=E6=83=B3=E5=AE=9A?= =?UTF-8?q?=E3=81=AB=E3=82=B9=E3=82=AF=E3=83=AA=E3=83=97=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=EF=BC=8C=E4=BF=9D=E5=AD=98=E3=83=87=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E3=81=8C=E4=BA=BA=E7=89=A9=E3=81=A8=E9=80=9A=E3=81=97?= =?UTF-8?q?=E7=95=AA=E5=8F=B7=E3=81=AB=E3=81=AA=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/detectFaceAndClip.py | 71 +++++++++++-------- 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py index 7059fcd7..0faa8ec1 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -51,41 +51,50 @@ def main(): config["face_detect"]["clip_size"]["width"], ) + # 保存先ディレクトリの作成,存在した場合は中身を削除 if not os.path.exists(save_dir): os.makedirs(save_dir) - - for file in os.listdir(save_dir): - file_path = os.path.join(save_dir, file) - if os.path.isfile(file_path): - os.remove(file_path) + else: + for file in os.listdir(save_dir): + file_path = os.path.join(save_dir, file) + if os.path.isfile(file_path): + os.remove(file_path) # 画像の読み込み - for image_name in os.listdir(image_dir_path): - image = cv2.imread(image_path := os.path.join(image_dir_path, image_name)) - if image is None: - print(f"画像ファイルが見つからないか読み込めません: {image_path}") - return - # Haar Cascadeの読み込み - face_cascade = load_cascade(face_cascade_path) - - # 画像から顔を検出 - faces = detect_face( - image, - face_cascade, - scaleFactor=config["face_detect"]["scale_factor"], - minNeighbors=config["face_detect"]["min_neighbors"], - minSize=( - config["face_detect"]["min_size"]["height"], - config["face_detect"]["min_size"]["width"], - ), - ) - - # 検出された各顔に対して処理 - for i, face in enumerate(faces): - clipped_face = clip_and_resize_face(face, image, image_size) - image_name_without_ext = os.path.splitext(image_name)[0] - save_file_name = f"{image_name_without_ext}-{i}.png" - save_face(clipped_face, save_dir, save_file_name) + # TODO: 良い感じのlog + for target_people_name in os.listdir(image_dir_path): + detect_face_num = 0 + for image_name in os.listdir(os.path.join(image_dir_path, target_people_name)): + image = cv2.imread( + image_path := os.path.join( + image_dir_path, target_people_name, image_name + ) + ) + if image is None: + raise ValueError( + f"画像ファイルが見つからないか読み込めません: {image_path}" + ) + # Haar Cascadeの読み込み + face_cascade = load_cascade(face_cascade_path) + + # 画像から顔を検出 + faces = detect_face( + image, + face_cascade, + scaleFactor=config["face_detect"]["scale_factor"], + minNeighbors=config["face_detect"]["min_neighbors"], + minSize=( + config["face_detect"]["min_size"]["height"], + config["face_detect"]["min_size"]["width"], + ), + ) + + # 検出された各顔に対して処理 + for face in faces: + clipped_face = clip_and_resize_face(face, image, image_size) + save_file_name = f"{target_people_name}-{detect_face_num}.png" + save_face(clipped_face, save_dir, save_file_name) + detect_face_num += 1 if __name__ == "__main__": From c792555cf5bf1d70fdda0fcb9dace09f6d2e0ae7 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 11 Feb 2024 23:59:57 +0900 Subject: [PATCH 136/771] =?UTF-8?q?feat(ml):=20=E3=83=87=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E3=82=BB=E3=83=83=E3=83=88=E3=81=A8=E9=A1=94=E6=A4=9C=E5=87=BA?= =?UTF-8?q?=E3=81=AB=E5=88=A9=E7=94=A8=E3=81=99=E3=82=8Bconfig=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/config.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index 295158f8..5760baec 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -6,6 +6,18 @@ model: pooling: kernel_size: 2 stride: 2 +face_detect: + cascade_path: "haarcascade_frontalface_default.xml" + scale_factor: 1.2 + min_neighbors: 5 + min_size: { width: 50, height: 50 } + clip_size: { width: 100, height: 100 } +dataset: + root_path: "src/face_detect_model/data/detect_img" + ratio: + train: 0.8 + valid: 0.1 + test: 0.1 train: epoch: 3 train_batch_size: 128 From 5b459fc8e93c4b9951a1acaeaa9465f96115b958 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 00:00:40 +0900 Subject: [PATCH 137/771] =?UTF-8?q?feat(ml):=20=E3=83=87=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E3=82=BB=E3=83=83=E3=83=88=E3=81=AE=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/data/dataset.py | 1 - .../data/faceDetectDataset.py | 37 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) delete mode 100644 machine_learning/src/face_detect_model/data/dataset.py create mode 100644 machine_learning/src/face_detect_model/data/faceDetectDataset.py diff --git a/machine_learning/src/face_detect_model/data/dataset.py b/machine_learning/src/face_detect_model/data/dataset.py deleted file mode 100644 index 8b137891..00000000 --- a/machine_learning/src/face_detect_model/data/dataset.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py new file mode 100644 index 00000000..289b0241 --- /dev/null +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -0,0 +1,37 @@ +import torch +from torch.utils.data import Dataset +import os +import cv2 + + +class FaceDetectDataset(Dataset): + def __init__(self, config): + self.data_dir = config["dataset"]["root_path"] + self.data = [] + self.label_name_dict = {} + name_label_dict = {} + self.label_num = 0 + + for file in os.listdir(self.data_dir): + file_path = os.path.join(self.data_dir, file) + name = file.split("-")[0] + image = cv2.imread(file_path) + one_data = [torch.Tensor(self.label_num), image] + self.data.append(one_data) + + if name_label_dict.get(name) is None: + self.label_name_dict[self.label_num] = name + name_label_dict[name] = self.label_num + self.label_num += 1 + + def __len__(self): + return len(self.data) + + def __getitem__(self, idx): + return self.data[idx] + + def get_label_name_dict(self): + return self.label_name_dict + + def get_label_num(self): + return self.label_num From ceec18ae41b8c4916c8c9d2c74f7a0981355ea74 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 00:16:04 +0900 Subject: [PATCH 138/771] =?UTF-8?q?ci:=20cloudbuild.yml=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Dockerfile | 4 +--- backend/cloudbuild.yml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 backend/cloudbuild.yml diff --git a/backend/Dockerfile b/backend/Dockerfile index 5fdecc22..bbc0f1b5 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -3,8 +3,7 @@ FROM golang:1.21.5 AS builder WORKDIR /srv/grpc COPY . . -# .env ファイルをイメージ内にコピー -COPY .env / + RUN go mod download ARG VERS="3.11.4" @@ -24,7 +23,6 @@ RUN apk --no-cache add ca-certificates # ビルドステージからバイナリと.envファイルをコピー COPY --from=builder /go/bin/server /server -COPY --from=builder /srv/grpc/.env / # アプリケーションの起動 ENTRYPOINT ["/server"] diff --git a/backend/cloudbuild.yml b/backend/cloudbuild.yml new file mode 100644 index 00000000..b9672442 --- /dev/null +++ b/backend/cloudbuild.yml @@ -0,0 +1,23 @@ +steps: + - name: "gcr.io/cloud-builders/docker" + args: + [ + "build", + "-t", + "gcr.io/wherechildbus/gcr.io/wherechildbus/where_child_bus-grpc", + ".", + ] + - name: "gcr.io/cloud-builders/docker" + args: + ["push", "gcr.io/wherechildbus/gcr.io/wherechildbus/where_child_bus-grpc"] + - name: "gcr.io/google.com/cloudsdktool/cloud-sdk" + args: + [ + "run", + "deploy", + "where-child-bus-grpc", + "--image=gcr.io/wherechildbus/gcr.io/wherechildbus/where_child_bus-grpc", + "--region=your-region", + "--set-env-vars=DSN=$$DSN,DB_USER_NAME=$$DB_USER_NAME,DB_PASSWORD=$$DB_PASSWORD,DB_ADDR=$$DB_ADDR,DB_NAME=$$DB_NAME,PORT=$$PORT,ModeDev=$$ModeDev", + ] +timeout: "1600s" From 126ac61918346b11c13fc90ecc75b86c60cf9bc4 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 00:20:39 +0900 Subject: [PATCH 139/771] =?UTF-8?q?fix:=20yml=20=E2=86=92=20yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/{cloudbuild.yml => cloudbuild.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename backend/{cloudbuild.yml => cloudbuild.yaml} (100%) diff --git a/backend/cloudbuild.yml b/backend/cloudbuild.yaml similarity index 100% rename from backend/cloudbuild.yml rename to backend/cloudbuild.yaml From 6850d83260d5332bfc4f2c55d8736dabeaf3b553 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 00:25:36 +0900 Subject: [PATCH 140/771] =?UTF-8?q?ci:=20=E3=82=AA=E3=83=97=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=80=81?= =?UTF-8?q?CLOUD=5FLOGGING=5FONLY=E3=81=AB=E8=A8=AD=E5=AE=9A=E3=81=97?= =?UTF-8?q?=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cloudbuild.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/cloudbuild.yaml b/backend/cloudbuild.yaml index b9672442..acaeab62 100644 --- a/backend/cloudbuild.yaml +++ b/backend/cloudbuild.yaml @@ -1,3 +1,5 @@ +options: + logging: CLOUD_LOGGING_ONLY steps: - name: "gcr.io/cloud-builders/docker" args: From 0344c44d4c7286dcec551dfacb9ba38827f57208 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 00:31:46 +0900 Subject: [PATCH 141/771] =?UTF-8?q?ci:=20=E3=82=B3=E3=83=B3=E3=83=86?= =?UTF-8?q?=E3=82=AD=E3=82=B9=E3=83=88=E3=83=91=E3=82=B9=E3=81=A8=E3=83=AA?= =?UTF-8?q?=E3=83=9D=E3=82=B8=E3=83=88=E3=83=AA=E3=83=91=E3=82=B9=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cloudbuild.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/backend/cloudbuild.yaml b/backend/cloudbuild.yaml index acaeab62..d57333a2 100644 --- a/backend/cloudbuild.yaml +++ b/backend/cloudbuild.yaml @@ -2,24 +2,21 @@ options: logging: CLOUD_LOGGING_ONLY steps: - name: "gcr.io/cloud-builders/docker" - args: - [ + args: [ "build", "-t", - "gcr.io/wherechildbus/gcr.io/wherechildbus/where_child_bus-grpc", - ".", + "gcr.io/wherechildbus/where_child_bus-grpc", # 重複したリポジトリパスを修正 + "backend", # コンテキストパスをbackendディレクトリに変更 ] - name: "gcr.io/cloud-builders/docker" - args: - ["push", "gcr.io/wherechildbus/gcr.io/wherechildbus/where_child_bus-grpc"] + args: ["push", "gcr.io/wherechildbus/where_child_bus-grpc"] # 重複したリポジトリパスを修正 - name: "gcr.io/google.com/cloudsdktool/cloud-sdk" - args: - [ + args: [ "run", "deploy", "where-child-bus-grpc", - "--image=gcr.io/wherechildbus/gcr.io/wherechildbus/where_child_bus-grpc", + "--image=gcr.io/wherechildbus/where_child_bus-grpc", # 重複したリポジトリパスを修正 "--region=your-region", - "--set-env-vars=DSN=$$DSN,DB_USER_NAME=$$DB_USER_NAME,DB_PASSWORD=$$DB_PASSWORD,DB_ADDR=$$DB_ADDR,DB_NAME=$$DB_NAME,PORT=$$PORT,ModeDev=$$ModeDev", + "--set-env-vars=DSN=$$_DSN,DB_USER_NAME=$$_DB_USER_NAME,DB_PASSWORD=$$_DB_PASSWORD,DB_ADDR=$$_DB_ADDR,DB_NAME=$$_DB_NAME,PORT=$$_PORT,ModeDev=$$_ModeDev", ] timeout: "1600s" From 79026863b51b5f2dab1fcc9815c656ddfa6ad34f Mon Sep 17 00:00:00 2001 From: koto623 Date: Mon, 12 Feb 2024 00:35:52 +0900 Subject: [PATCH 142/771] =?UTF-8?q?chore:TODO=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/student_list_page/student_detail_sheet.dart | 4 ++++ .../lib/pages/student_list_page/student_list_page.dart | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart index 8ccb3f87..2d78aab3 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; class StudentDetailSheet extends StatelessWidget { final String childName; + //将来的にはChild型を受け取る。 const StudentDetailSheet({super.key, required this.childName}); @override @@ -37,6 +38,7 @@ class StudentDetailSheet extends StatelessWidget { alignment: Alignment.topRight, child: ElevatedButton( style: ElevatedButton.styleFrom(shape: const CircleBorder()), + //将来的に編集画面へ遷移する。 onPressed: () {}, child: const Icon(Icons.edit), ), @@ -56,6 +58,7 @@ class StudentDetailSheet extends StatelessWidget { ]); } + //TODO: 将来的に画像を受け取る。 Widget childFaceImage() { return const SizedBox( width: 100, @@ -66,6 +69,7 @@ class StudentDetailSheet extends StatelessWidget { ); } + //TODO: 将来的にはデータを受け取る。 Widget childDetailList() { return Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 30a799fd..874ccc44 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -9,6 +9,7 @@ class StudentListPage extends StatefulWidget { } class _StudentListPageState extends State { + //TODO: 将来的には動的にデータを受け取る。 final List name = [ "園児1", "園児2", @@ -38,6 +39,7 @@ class _StudentListPageState extends State { return childCardListBuilder(screenSize); } + //TODO: 将来的にはAPIからデータを取得する。 Widget childCardListBuilder(Size screenSize) { return ListView.separated( itemCount: name.length, @@ -67,6 +69,7 @@ class _StudentListPageState extends State { )); } + //TODO: Child型を受け取る Widget childCard(int index, Size screenSize) { return Card( color: Colors.white, @@ -102,6 +105,7 @@ class _StudentListPageState extends State { ]); } + //TODO: 引数に停留所名を加える。 Widget busStopName() { return const Row(children: [ Icon(Icons.location_on), From 8236cc462e704049b0a55febca4e3615f065579f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 00:42:11 +0900 Subject: [PATCH 143/771] fix: region in cloudbuild.yaml --- backend/cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/cloudbuild.yaml b/backend/cloudbuild.yaml index d57333a2..26445e1a 100644 --- a/backend/cloudbuild.yaml +++ b/backend/cloudbuild.yaml @@ -16,7 +16,7 @@ steps: "deploy", "where-child-bus-grpc", "--image=gcr.io/wherechildbus/where_child_bus-grpc", # 重複したリポジトリパスを修正 - "--region=your-region", + "--region=us-west1", "--set-env-vars=DSN=$$_DSN,DB_USER_NAME=$$_DB_USER_NAME,DB_PASSWORD=$$_DB_PASSWORD,DB_ADDR=$$_DB_ADDR,DB_NAME=$$_DB_NAME,PORT=$$_PORT,ModeDev=$$_ModeDev", ] timeout: "1600s" From 15575ea2467d54790c606deb5d458ffdb1adc92b Mon Sep 17 00:00:00 2001 From: koto623 Date: Mon, 12 Feb 2024 00:55:46 +0900 Subject: [PATCH 144/771] =?UTF-8?q?chore:asset=E3=81=AE=E3=83=91=E3=82=B9?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/pubspec.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 62f10dcf..556d6604 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -22,5 +22,4 @@ dev_dependencies: flutter: uses-material-design: true assets: - - assets/images/face_1.png - - assets/images/face_2.png + - assets/images/ From 4f97a008307813fa97dc4068e95cb530cea7f23d Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 01:17:09 +0900 Subject: [PATCH 145/771] =?UTF-8?q?style:=20WhereChildBus=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WhereChildBus | 1 - 1 file changed, 1 deletion(-) delete mode 160000 WhereChildBus diff --git a/WhereChildBus b/WhereChildBus deleted file mode 160000 index df5b0f47..00000000 --- a/WhereChildBus +++ /dev/null @@ -1 +0,0 @@ -Subproject commit df5b0f474e3b9f44a63df4e2a5f21b287ba2dbab From 01a38864ceb2e970b089412ef03e551c2410e9ab Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 01:18:21 +0900 Subject: [PATCH 146/771] =?UTF-8?q?perf(ml):=20=E7=95=B3=E3=81=BF=E8=BE=BC?= =?UTF-8?q?=E3=81=BF=E5=B1=A4=E3=81=AB=E5=AF=BE=E3=81=99=E3=82=8B=E5=85=A5?= =?UTF-8?q?=E5=8A=9B=E3=82=B5=E3=82=A4=E3=82=BA=E3=81=8C=E8=87=AA=E5=8B=95?= =?UTF-8?q?=E8=A8=88=E7=AE=97=E3=81=95=E3=82=8C=E3=82=8B=E5=AE=9F=E8=A3=85?= =?UTF-8?q?=E3=81=B8=E3=81=AE=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/faceDetectModel.py | 47 ++++++++++++------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/machine_learning/src/face_detect_model/model/faceDetectModel.py b/machine_learning/src/face_detect_model/model/faceDetectModel.py index f488d6de..604f1882 100644 --- a/machine_learning/src/face_detect_model/model/faceDetectModel.py +++ b/machine_learning/src/face_detect_model/model/faceDetectModel.py @@ -1,31 +1,46 @@ import torch.nn as nn +def compute_conv_output_size(L_in, kernel_size, stride=1, padding=0, dilation=1): + """畳み込み層を通過した後の出力サイズを計算する関数""" + L_out = int((L_in + 2 * padding - dilation * (kernel_size - 1) - 1) / stride + 1) + return L_out + + class FaceDetectModel(nn.Module): - def __init__(self, config: dict, num_classes: int): + def __init__(self, config: dict, num_classes: int, input_dim: tuple): super(FaceDetectModel, self).__init__() self.config = config - # 汎用性のために入力チャンネル数をconfigから取得(一応) + in_channels = config["model"]["in_channels"] + kernel_size = config["model"]["Conv2d"]["kernel_size"] + pooling_kernel_size = config["model"]["pooling"]["kernel_size"] + pooling_stride = config["model"]["pooling"]["stride"] + self.relu = nn.ReLU() - self.pool = nn.MaxPool2d( - kernel_size=config["model"]["kernel_size"], stride=config["model"]["stride"] - ) + self.pool = nn.MaxPool2d(kernel_size=pooling_kernel_size, stride=pooling_stride) self.conv1 = nn.Conv2d( - in_channels=in_channels, - out_channels=16, - kernel_size=config["model"]["Conv2d"]["kernel_size"], - ) - self.conv2 = nn.Conv2d( - in_channels=16, - out_channels=32, - kernel_size=config["model"]["Conv2d"]["kernel_size"], + in_channels=in_channels, out_channels=16, kernel_size=kernel_size ) - # Flatten操作を明示的に + self.conv2 = nn.Conv2d(in_channels=16, out_channels=32, kernel_size=kernel_size) + self.flatten = nn.Flatten() - # TODO: 入力サイズを動的に取得する - self.linear = nn.Linear(32 * 5 * 5, config["model"]["hidden_size"]) + + # 入力特徴マップのサイズを畳み込み層とプーリング層を通過した後のサイズで更新 + size = compute_conv_output_size(input_dim[1], kernel_size) + size = compute_conv_output_size( + size, pooling_kernel_size, stride=pooling_stride + ) + size = compute_conv_output_size(size, kernel_size) + size = compute_conv_output_size( + size, pooling_kernel_size, stride=pooling_stride + ) + + # 最終的な特徴マップのサイズに基づいてLinear層の入力サイズを設定 + linear_input_size = 32 * size * size + + self.linear = nn.Linear(linear_input_size, config["model"]["hidden_size"]) self.classifier = nn.Linear(config["model"]["hidden_size"], num_classes) def forward(self, x): From d2a80e44d2268920961f9fc309cee31355d579df Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 01:22:06 +0900 Subject: [PATCH 147/771] fix(proto): Fix NurseryResponse typo in protobuf files --- .../go/where_child_bus/v1/guardian.pb.go | 64 +-- .../go/where_child_bus/v1/nursery.pb.go | 65 +-- .../go/where_child_bus/v1/resources.pb.go | 408 +++++++++--------- .../proto/where_child_bus/v1/guardian.proto | 2 +- .../proto/where_child_bus/v1/nursery.proto | 2 +- .../proto/where_child_bus/v1/resources.proto | 2 +- .../where_child_bus/v1/guardian.pb.dart | 10 +- .../where_child_bus/v1/guardian.pbjson.dart | 8 +- .../where_child_bus/v1/nursery.pb.dart | 10 +- .../where_child_bus/v1/nursery.pbjson.dart | 8 +- .../where_child_bus/v1/resources.pb.dart | 26 +- .../where_child_bus/v1/resources.pbjson.dart | 20 +- .../where_child_bus/v1/guardian_pb2.py | 8 +- .../where_child_bus/v1/nursery_pb2.py | 8 +- .../where_child_bus/v1/resources_pb2.py | 54 +-- 15 files changed, 348 insertions(+), 347 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go index 896115b3..6f0094e4 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go @@ -82,7 +82,7 @@ type GuardianLoginResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Guardian *GuardianResponse `protobuf:"bytes,2,opt,name=guardian,proto3" json:"guardian,omitempty"` - Nursery *NurseryReponse `protobuf:"bytes,3,opt,name=nursery,proto3" json:"nursery,omitempty"` + Nursery *NurseryResponse `protobuf:"bytes,3,opt,name=nursery,proto3" json:"nursery,omitempty"` } func (x *GuardianLoginResponse) Reset() { @@ -131,7 +131,7 @@ func (x *GuardianLoginResponse) GetGuardian() *GuardianResponse { return nil } -func (x *GuardianLoginResponse) GetNursery() *NurseryReponse { +func (x *GuardianLoginResponse) GetNursery() *NurseryResponse { if x != nil { return x.Nursery } @@ -151,41 +151,41 @@ var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x15, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xb2, 0x01, 0x0a, 0x15, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x77, + 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x3d, 0x0a, 0x07, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0x77, 0x0a, 0x0f, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, - 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, - 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, - 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0x77, 0x0a, 0x0f, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, + 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, + 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, + 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -205,11 +205,11 @@ var file_where_child_bus_v1_guardian_proto_goTypes = []interface{}{ (*GuardianLoginRequest)(nil), // 0: where_child_bus.v1.GuardianLoginRequest (*GuardianLoginResponse)(nil), // 1: where_child_bus.v1.GuardianLoginResponse (*GuardianResponse)(nil), // 2: where_child_bus.v1.GuardianResponse - (*NurseryReponse)(nil), // 3: where_child_bus.v1.NurseryReponse + (*NurseryResponse)(nil), // 3: where_child_bus.v1.NurseryResponse } var file_where_child_bus_v1_guardian_proto_depIdxs = []int32{ 2, // 0: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 3, // 1: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryReponse + 3, // 1: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse 0, // 2: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest 1, // 3: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse 3, // [3:4] is the sub-list for method output_type diff --git a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go index 54a13c5a..e385fa72 100644 --- a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go @@ -80,8 +80,8 @@ type NurseryLoginResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Nursery *Nursery `protobuf:"bytes,2,opt,name=nursery,proto3" json:"nursery,omitempty"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Nursery *NurseryResponse `protobuf:"bytes,2,opt,name=nursery,proto3" json:"nursery,omitempty"` } func (x *NurseryLoginResponse) Reset() { @@ -123,7 +123,7 @@ func (x *NurseryLoginResponse) GetSuccess() bool { return false } -func (x *NurseryLoginResponse) GetNursery() *Nursery { +func (x *NurseryLoginResponse) GetNursery() *NurseryResponse { if x != nil { return x.Nursery } @@ -143,36 +143,37 @@ var file_where_child_bus_v1_nursery_proto_rawDesc = []byte{ 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x22, 0x67, 0x0a, 0x14, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, + 0x6f, 0x72, 0x64, 0x22, 0x6f, 0x0a, 0x14, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0x73, 0x0a, 0x0e, - 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, - 0x0a, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x27, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, - 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, - 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x32, 0x73, 0x0a, 0x0e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, + 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, + 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -191,10 +192,10 @@ var file_where_child_bus_v1_nursery_proto_msgTypes = make([]protoimpl.MessageInf var file_where_child_bus_v1_nursery_proto_goTypes = []interface{}{ (*NurseryLoginRequest)(nil), // 0: where_child_bus.v1.NurseryLoginRequest (*NurseryLoginResponse)(nil), // 1: where_child_bus.v1.NurseryLoginResponse - (*Nursery)(nil), // 2: where_child_bus.v1.Nursery + (*NurseryResponse)(nil), // 2: where_child_bus.v1.NurseryResponse } var file_where_child_bus_v1_nursery_proto_depIdxs = []int32{ - 2, // 0: where_child_bus.v1.NurseryLoginResponse.nursery:type_name -> where_child_bus.v1.Nursery + 2, // 0: where_child_bus.v1.NurseryLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse 0, // 1: where_child_bus.v1.NurseryService.NurseryLogin:input_type -> where_child_bus.v1.NurseryLoginRequest 1, // 2: where_child_bus.v1.NurseryService.NurseryLogin:output_type -> where_child_bus.v1.NurseryLoginResponse 2, // [2:3] is the sub-list for method output_type diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 93d0bae6..a43176df 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -285,7 +285,7 @@ func (x *Nursery) GetUpdatedAt() *timestamppb.Timestamp { return nil } -type NurseryReponse struct { +type NurseryResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -300,8 +300,8 @@ type NurseryReponse struct { UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } -func (x *NurseryReponse) Reset() { - *x = NurseryReponse{} +func (x *NurseryResponse) Reset() { + *x = NurseryResponse{} if protoimpl.UnsafeEnabled { mi := &file_where_child_bus_v1_resources_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -309,13 +309,13 @@ func (x *NurseryReponse) Reset() { } } -func (x *NurseryReponse) String() string { +func (x *NurseryResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*NurseryReponse) ProtoMessage() {} +func (*NurseryResponse) ProtoMessage() {} -func (x *NurseryReponse) ProtoReflect() protoreflect.Message { +func (x *NurseryResponse) ProtoReflect() protoreflect.Message { mi := &file_where_child_bus_v1_resources_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -327,54 +327,54 @@ func (x *NurseryReponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use NurseryReponse.ProtoReflect.Descriptor instead. -func (*NurseryReponse) Descriptor() ([]byte, []int) { +// Deprecated: Use NurseryResponse.ProtoReflect.Descriptor instead. +func (*NurseryResponse) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{1} } -func (x *NurseryReponse) GetId() string { +func (x *NurseryResponse) GetId() string { if x != nil { return x.Id } return "" } -func (x *NurseryReponse) GetNurseryId() string { +func (x *NurseryResponse) GetNurseryId() string { if x != nil { return x.NurseryId } return "" } -func (x *NurseryReponse) GetName() string { +func (x *NurseryResponse) GetName() string { if x != nil { return x.Name } return "" } -func (x *NurseryReponse) GetEmail() string { +func (x *NurseryResponse) GetEmail() string { if x != nil { return x.Email } return "" } -func (x *NurseryReponse) GetPhoneNumber() string { +func (x *NurseryResponse) GetPhoneNumber() string { if x != nil { return x.PhoneNumber } return "" } -func (x *NurseryReponse) GetCreatedAt() *timestamppb.Timestamp { +func (x *NurseryResponse) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt } return nil } -func (x *NurseryReponse) GetUpdatedAt() *timestamppb.Timestamp { +func (x *NurseryResponse) GetUpdatedAt() *timestamppb.Timestamp { if x != nil { return x.UpdatedAt } @@ -1283,8 +1283,24 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0x82, 0x02, 0x0a, 0x0e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x65, 0x64, 0x41, 0x74, 0x22, 0x83, 0x02, 0x0a, 0x0f, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x02, 0x0a, 0x08, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, @@ -1292,200 +1308,184 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x62, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x10, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, + 0xb6, 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x36, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, + 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, + 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, + 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x22, 0xa5, 0x05, 0x0a, 0x05, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, + 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, 0x6f, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, + 0x69, 0x64, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, + 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, + 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, + 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, + 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, + 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, + 0x72, 0x65, 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x55, + 0x6d, 0x62, 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, + 0x68, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, + 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, - 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x02, 0x0a, 0x08, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, - 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, + 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x45, 0x4e, 0x10, + 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, + 0x22, 0xb4, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, + 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, + 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, + 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x10, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb6, - 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x42, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, - 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, - 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, - 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x22, 0xa5, 0x05, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, - 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, - 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, 0x6f, 0x72, - 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x69, - 0x64, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, - 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, - 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, - 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, - 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, - 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, - 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, - 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, - 0x74, 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, - 0x65, 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x55, 0x6d, - 0x62, 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, - 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, - 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, - 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, - 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x45, 0x4e, 0x10, 0x02, - 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x22, - 0xb4, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, - 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, - 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, - 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, - 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xf4, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, + 0x64, 0x12, 0x4a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4f, 0x0a, + 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, + 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x4d, + 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe1, 0x01, + 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x33, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xf4, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, - 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, - 0x12, 0x4a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4f, 0x0a, 0x07, - 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, - 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x4d, 0x0a, - 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, 0x6f, 0x63, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, - 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x33, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, - 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, - 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, - 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, - 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, + 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, + 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1507,7 +1507,7 @@ var file_where_child_bus_v1_resources_proto_goTypes = []interface{}{ (Child_Sex)(0), // 1: where_child_bus.v1.Child.Sex (ChildBusAssociation_BusType)(0), // 2: where_child_bus.v1.ChildBusAssociation.BusType (*Nursery)(nil), // 3: where_child_bus.v1.Nursery - (*NurseryReponse)(nil), // 4: where_child_bus.v1.NurseryReponse + (*NurseryResponse)(nil), // 4: where_child_bus.v1.NurseryResponse (*Guardian)(nil), // 5: where_child_bus.v1.Guardian (*GuardianResponse)(nil), // 6: where_child_bus.v1.GuardianResponse (*Bus)(nil), // 7: where_child_bus.v1.Bus @@ -1522,8 +1522,8 @@ var file_where_child_bus_v1_resources_proto_goTypes = []interface{}{ var file_where_child_bus_v1_resources_proto_depIdxs = []int32{ 14, // 0: where_child_bus.v1.Nursery.created_at:type_name -> google.protobuf.Timestamp 14, // 1: where_child_bus.v1.Nursery.updated_at:type_name -> google.protobuf.Timestamp - 14, // 2: where_child_bus.v1.NurseryReponse.created_at:type_name -> google.protobuf.Timestamp - 14, // 3: where_child_bus.v1.NurseryReponse.updated_at:type_name -> google.protobuf.Timestamp + 14, // 2: where_child_bus.v1.NurseryResponse.created_at:type_name -> google.protobuf.Timestamp + 14, // 3: where_child_bus.v1.NurseryResponse.updated_at:type_name -> google.protobuf.Timestamp 14, // 4: where_child_bus.v1.Guardian.created_at:type_name -> google.protobuf.Timestamp 14, // 5: where_child_bus.v1.Guardian.updated_at:type_name -> google.protobuf.Timestamp 14, // 6: where_child_bus.v1.GuardianResponse.created_at:type_name -> google.protobuf.Timestamp @@ -1566,7 +1566,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NurseryReponse); i { + switch v := v.(*NurseryResponse); i { case 0: return &v.state case 1: diff --git a/backend/proto/where_child_bus/v1/guardian.proto b/backend/proto/where_child_bus/v1/guardian.proto index d2de0b21..ae511353 100644 --- a/backend/proto/where_child_bus/v1/guardian.proto +++ b/backend/proto/where_child_bus/v1/guardian.proto @@ -16,5 +16,5 @@ message GuardianLoginRequest { message GuardianLoginResponse { bool success = 1; GuardianResponse guardian = 2; - NurseryReponse nursery = 3; + NurseryResponse nursery = 3; } \ No newline at end of file diff --git a/backend/proto/where_child_bus/v1/nursery.proto b/backend/proto/where_child_bus/v1/nursery.proto index 3e09484d..2b0bcd0b 100644 --- a/backend/proto/where_child_bus/v1/nursery.proto +++ b/backend/proto/where_child_bus/v1/nursery.proto @@ -15,5 +15,5 @@ message NurseryLoginRequest { message NurseryLoginResponse { bool success = 1; - Nursery nursery = 2; + NurseryResponse nursery = 2; } \ No newline at end of file diff --git a/backend/proto/where_child_bus/v1/resources.proto b/backend/proto/where_child_bus/v1/resources.proto index 97054486..4af4eebe 100644 --- a/backend/proto/where_child_bus/v1/resources.proto +++ b/backend/proto/where_child_bus/v1/resources.proto @@ -16,7 +16,7 @@ message Nursery { google.protobuf.Timestamp updated_at = 9; } -message NurseryReponse { +message NurseryResponse { string id = 1; string nursery_id = 2; string name = 3; diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 06a4aeff..0ca0577d 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -84,7 +84,7 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { factory GuardianLoginResponse({ $core.bool? success, $1.GuardianResponse? guardian, - $1.NurseryReponse? nursery, + $1.NurseryResponse? nursery, }) { final $result = create(); if (success != null) { @@ -105,7 +105,7 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') ..aOM<$1.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $1.GuardianResponse.create) - ..aOM<$1.NurseryReponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $1.NurseryReponse.create) + ..aOM<$1.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $1.NurseryResponse.create) ..hasRequiredFields = false ; @@ -151,15 +151,15 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { $1.GuardianResponse ensureGuardian() => $_ensure(1); @$pb.TagNumber(3) - $1.NurseryReponse get nursery => $_getN(2); + $1.NurseryResponse get nursery => $_getN(2); @$pb.TagNumber(3) - set nursery($1.NurseryReponse v) { setField(3, v); } + set nursery($1.NurseryResponse v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasNursery() => $_has(2); @$pb.TagNumber(3) void clearNursery() => clearField(3); @$pb.TagNumber(3) - $1.NurseryReponse ensureNursery() => $_ensure(2); + $1.NurseryResponse ensureNursery() => $_ensure(2); } class GuardianServiceApi { diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart index 76332fb3..2e74dca0 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -36,7 +36,7 @@ const GuardianLoginResponse$json = { '2': [ {'1': 'success', '3': 1, '4': 1, '5': 8, '10': 'success'}, {'1': 'guardian', '3': 2, '4': 1, '5': 11, '6': '.where_child_bus.v1.GuardianResponse', '10': 'guardian'}, - {'1': 'nursery', '3': 3, '4': 1, '5': 11, '6': '.where_child_bus.v1.NurseryReponse', '10': 'nursery'}, + {'1': 'nursery', '3': 3, '4': 1, '5': 11, '6': '.where_child_bus.v1.NurseryResponse', '10': 'nursery'}, ], }; @@ -44,8 +44,8 @@ const GuardianLoginResponse$json = { final $typed_data.Uint8List guardianLoginResponseDescriptor = $convert.base64Decode( 'ChVHdWFyZGlhbkxvZ2luUmVzcG9uc2USGAoHc3VjY2VzcxgBIAEoCFIHc3VjY2VzcxJACghndW' 'FyZGlhbhgCIAEoCzIkLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhblJlc3BvbnNlUghndWFy' - 'ZGlhbhI8CgdudXJzZXJ5GAMgASgLMiIud2hlcmVfY2hpbGRfYnVzLnYxLk51cnNlcnlSZXBvbn' - 'NlUgdudXJzZXJ5'); + 'ZGlhbhI9CgdudXJzZXJ5GAMgASgLMiMud2hlcmVfY2hpbGRfYnVzLnYxLk51cnNlcnlSZXNwb2' + '5zZVIHbnVyc2VyeQ=='); const $core.Map<$core.String, $core.dynamic> GuardianServiceBase$json = { '1': 'GuardianService', @@ -60,7 +60,7 @@ const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> GuardianSe '.where_child_bus.v1.GuardianLoginResponse': GuardianLoginResponse$json, '.where_child_bus.v1.GuardianResponse': $1.GuardianResponse$json, '.google.protobuf.Timestamp': $0.Timestamp$json, - '.where_child_bus.v1.NurseryReponse': $1.NurseryReponse$json, + '.where_child_bus.v1.NurseryResponse': $1.NurseryResponse$json, }; /// Descriptor for `GuardianService`. Decode as a `google.protobuf.ServiceDescriptorProto`. diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart index 11d77727..7cee069a 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -83,7 +83,7 @@ class NurseryLoginRequest extends $pb.GeneratedMessage { class NurseryLoginResponse extends $pb.GeneratedMessage { factory NurseryLoginResponse({ $core.bool? success, - $1.Nursery? nursery, + $1.NurseryResponse? nursery, }) { final $result = create(); if (success != null) { @@ -100,7 +100,7 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$1.Nursery>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $1.Nursery.create) + ..aOM<$1.NurseryResponse>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $1.NurseryResponse.create) ..hasRequiredFields = false ; @@ -135,15 +135,15 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $1.Nursery get nursery => $_getN(1); + $1.NurseryResponse get nursery => $_getN(1); @$pb.TagNumber(2) - set nursery($1.Nursery v) { setField(2, v); } + set nursery($1.NurseryResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasNursery() => $_has(1); @$pb.TagNumber(2) void clearNursery() => clearField(2); @$pb.TagNumber(2) - $1.Nursery ensureNursery() => $_ensure(1); + $1.NurseryResponse ensureNursery() => $_ensure(1); } class NurseryServiceApi { diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart index 26f47688..4ea74897 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart @@ -35,14 +35,14 @@ const NurseryLoginResponse$json = { '1': 'NurseryLoginResponse', '2': [ {'1': 'success', '3': 1, '4': 1, '5': 8, '10': 'success'}, - {'1': 'nursery', '3': 2, '4': 1, '5': 11, '6': '.where_child_bus.v1.Nursery', '10': 'nursery'}, + {'1': 'nursery', '3': 2, '4': 1, '5': 11, '6': '.where_child_bus.v1.NurseryResponse', '10': 'nursery'}, ], }; /// Descriptor for `NurseryLoginResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List nurseryLoginResponseDescriptor = $convert.base64Decode( - 'ChROdXJzZXJ5TG9naW5SZXNwb25zZRIYCgdzdWNjZXNzGAEgASgIUgdzdWNjZXNzEjUKB251cn' - 'NlcnkYAiABKAsyGy53aGVyZV9jaGlsZF9idXMudjEuTnVyc2VyeVIHbnVyc2VyeQ=='); + 'ChROdXJzZXJ5TG9naW5SZXNwb25zZRIYCgdzdWNjZXNzGAEgASgIUgdzdWNjZXNzEj0KB251cn' + 'NlcnkYAiABKAsyIy53aGVyZV9jaGlsZF9idXMudjEuTnVyc2VyeVJlc3BvbnNlUgdudXJzZXJ5'); const $core.Map<$core.String, $core.dynamic> NurseryServiceBase$json = { '1': 'NurseryService', @@ -55,7 +55,7 @@ const $core.Map<$core.String, $core.dynamic> NurseryServiceBase$json = { const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> NurseryServiceBase$messageJson = { '.where_child_bus.v1.NurseryLoginRequest': NurseryLoginRequest$json, '.where_child_bus.v1.NurseryLoginResponse': NurseryLoginResponse$json, - '.where_child_bus.v1.Nursery': $1.Nursery$json, + '.where_child_bus.v1.NurseryResponse': $1.NurseryResponse$json, '.google.protobuf.Timestamp': $0.Timestamp$json, }; diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 8ddbc3d8..80388dc6 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -184,8 +184,8 @@ class Nursery extends $pb.GeneratedMessage { $0.Timestamp ensureUpdatedAt() => $_ensure(8); } -class NurseryReponse extends $pb.GeneratedMessage { - factory NurseryReponse({ +class NurseryResponse extends $pb.GeneratedMessage { + factory NurseryResponse({ $core.String? id, $core.String? nurseryId, $core.String? name, @@ -218,11 +218,11 @@ class NurseryReponse extends $pb.GeneratedMessage { } return $result; } - NurseryReponse._() : super(); - factory NurseryReponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory NurseryReponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + NurseryResponse._() : super(); + factory NurseryResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory NurseryResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryReponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'nurseryId') ..aOS(3, _omitFieldNames ? '' : 'name') @@ -237,22 +237,22 @@ class NurseryReponse extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - NurseryReponse clone() => NurseryReponse()..mergeFromMessage(this); + NurseryResponse clone() => NurseryResponse()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - NurseryReponse copyWith(void Function(NurseryReponse) updates) => super.copyWith((message) => updates(message as NurseryReponse)) as NurseryReponse; + NurseryResponse copyWith(void Function(NurseryResponse) updates) => super.copyWith((message) => updates(message as NurseryResponse)) as NurseryResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static NurseryReponse create() => NurseryReponse._(); - NurseryReponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static NurseryResponse create() => NurseryResponse._(); + NurseryResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static NurseryReponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static NurseryReponse? _defaultInstance; + static NurseryResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static NurseryResponse? _defaultInstance; @$pb.TagNumber(1) $core.String get id => $_getSZ(0); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 3049994d..ea81abdf 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -38,9 +38,9 @@ final $typed_data.Uint8List nurseryDescriptor = $convert.base64Decode( 'YXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYX' 'RlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); -@$core.Deprecated('Use nurseryReponseDescriptor instead') -const NurseryReponse$json = { - '1': 'NurseryReponse', +@$core.Deprecated('Use nurseryResponseDescriptor instead') +const NurseryResponse$json = { + '1': 'NurseryResponse', '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, @@ -52,13 +52,13 @@ const NurseryReponse$json = { ], }; -/// Descriptor for `NurseryReponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List nurseryReponseDescriptor = $convert.base64Decode( - 'Cg5OdXJzZXJ5UmVwb25zZRIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbn' - 'Vyc2VyeUlkEhIKBG5hbWUYAyABKAlSBG5hbWUSFAoFZW1haWwYBCABKAlSBWVtYWlsEiEKDHBo' - 'b25lX251bWJlchgFIAEoCVILcGhvbmVOdW1iZXISOQoKY3JlYXRlZF9hdBgGIAEoCzIaLmdvb2' - 'dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRhdGVkX2F0GAcgASgLMhou' - 'Z29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); +/// Descriptor for `NurseryResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List nurseryResponseDescriptor = $convert.base64Decode( + 'Cg9OdXJzZXJ5UmVzcG9uc2USDgoCaWQYASABKAlSAmlkEh0KCm51cnNlcnlfaWQYAiABKAlSCW' + '51cnNlcnlJZBISCgRuYW1lGAMgASgJUgRuYW1lEhQKBWVtYWlsGAQgASgJUgVlbWFpbBIhCgxw' + 'aG9uZV9udW1iZXIYBSABKAlSC3Bob25lTnVtYmVyEjkKCmNyZWF0ZWRfYXQYBiABKAsyGi5nb2' + '9nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYXRlZF9hdBgHIAEoCzIa' + 'Lmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); @$core.Deprecated('Use guardianDescriptor instead') const Guardian$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py index 17db0b11..c369d022 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb1\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12<\n\x07nursery\x18\x03 \x01(\x0b\x32\".where_child_bus.v1.NurseryReponseR\x07nursery2w\n\x0fGuardianService\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2w\n\x0fGuardianService\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,7 +26,7 @@ _globals['_GUARDIANLOGINREQUEST']._serialized_start=93 _globals['_GUARDIANLOGINREQUEST']._serialized_end=165 _globals['_GUARDIANLOGINRESPONSE']._serialized_start=168 - _globals['_GUARDIANLOGINRESPONSE']._serialized_end=345 - _globals['_GUARDIANSERVICE']._serialized_start=347 - _globals['_GUARDIANSERVICE']._serialized_end=466 + _globals['_GUARDIANLOGINRESPONSE']._serialized_end=346 + _globals['_GUARDIANSERVICE']._serialized_start=348 + _globals['_GUARDIANSERVICE']._serialized_end=467 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py index 3b3210c1..2fd0abba 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"g\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12\x35\n\x07nursery\x18\x02 \x01(\x0b\x32\x1b.where_child_bus.v1.NurseryR\x07nursery2s\n\x0eNurseryService\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2s\n\x0eNurseryService\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,7 +26,7 @@ _globals['_NURSERYLOGINREQUEST']._serialized_start=92 _globals['_NURSERYLOGINREQUEST']._serialized_end=163 _globals['_NURSERYLOGINRESPONSE']._serialized_start=165 - _globals['_NURSERYLOGINRESPONSE']._serialized_end=268 - _globals['_NURSERYSERVICE']._serialized_start=270 - _globals['_NURSERYSERVICE']._serialized_end=385 + _globals['_NURSERYLOGINRESPONSE']._serialized_end=276 + _globals['_NURSERYSERVICE']._serialized_start=278 + _globals['_NURSERYSERVICE']._serialized_end=393 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index 4f13d07e..bc218c66 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x82\x02\n\x0eNurseryReponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb6\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x36\n\x06status\x18\x05 \x01(\x0e\x32\x1e.where_child_bus.v1.Bus.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03\"\xa5\x05\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12/\n\x03sex\x18\x06 \x01(\x0e\x32\x1d.where_child_bus.v1.Child.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMEN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xf4\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12J\n\x08\x62us_type\x18\x04 \x01(\x0e\x32/.where_child_bus.v1.ChildBusAssociation.BusTypeR\x07\x62usType\"O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestampB\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x83\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb6\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x36\n\x06status\x18\x05 \x01(\x0e\x32\x1e.where_child_bus.v1.Bus.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03\"\xa5\x05\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12/\n\x03sex\x18\x06 \x01(\x0e\x32\x1d.where_child_bus.v1.Child.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMEN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xf4\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12J\n\x08\x62us_type\x18\x04 \x01(\x0e\x32/.where_child_bus.v1.ChildBusAssociation.BusTypeR\x07\x62usType\"O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestampB\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -25,30 +25,30 @@ _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=420 - _globals['_NURSERYREPONSE']._serialized_start=423 - _globals['_NURSERYREPONSE']._serialized_end=681 - _globals['_GUARDIAN']._serialized_start=684 - _globals['_GUARDIAN']._serialized_end=983 - _globals['_GUARDIANRESPONSE']._serialized_start=986 - _globals['_GUARDIANRESPONSE']._serialized_end=1246 - _globals['_BUS']._serialized_start=1249 - _globals['_BUS']._serialized_end=1687 - _globals['_BUS_STATUS']._serialized_start=1590 - _globals['_BUS_STATUS']._serialized_end=1687 - _globals['_CHILD']._serialized_start=1690 - _globals['_CHILD']._serialized_end=2367 - _globals['_CHILD_SEX']._serialized_start=2298 - _globals['_CHILD_SEX']._serialized_end=2367 - _globals['_STATION']._serialized_start=2370 - _globals['_STATION']._serialized_end=2678 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2681 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2925 - _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_start=2846 - _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_end=2925 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=2927 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=3004 - _globals['_CHILDPHOTO']._serialized_start=3007 - _globals['_CHILDPHOTO']._serialized_end=3232 - _globals['_BOARDINGRECORD']._serialized_start=3235 - _globals['_BOARDINGRECORD']._serialized_end=3408 + _globals['_NURSERYRESPONSE']._serialized_start=423 + _globals['_NURSERYRESPONSE']._serialized_end=682 + _globals['_GUARDIAN']._serialized_start=685 + _globals['_GUARDIAN']._serialized_end=984 + _globals['_GUARDIANRESPONSE']._serialized_start=987 + _globals['_GUARDIANRESPONSE']._serialized_end=1247 + _globals['_BUS']._serialized_start=1250 + _globals['_BUS']._serialized_end=1688 + _globals['_BUS_STATUS']._serialized_start=1591 + _globals['_BUS_STATUS']._serialized_end=1688 + _globals['_CHILD']._serialized_start=1691 + _globals['_CHILD']._serialized_end=2368 + _globals['_CHILD_SEX']._serialized_start=2299 + _globals['_CHILD_SEX']._serialized_end=2368 + _globals['_STATION']._serialized_start=2371 + _globals['_STATION']._serialized_end=2679 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2682 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2926 + _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_start=2847 + _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_end=2926 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=2928 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=3005 + _globals['_CHILDPHOTO']._serialized_start=3008 + _globals['_CHILDPHOTO']._serialized_end=3233 + _globals['_BOARDINGRECORD']._serialized_start=3236 + _globals['_BOARDINGRECORD']._serialized_end=3409 # @@protoc_insertion_point(module_scope) From e7c2d9b5fc1514488d162ca922ba4e1e7fad1b22 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 01:33:12 +0900 Subject: [PATCH 148/771] fix(proto): Update NurseryResponse fields in resources.proto and resources.pbjson.dart --- .../go/where_child_bus/v1/resources.pb.go | 408 +++++++++--------- .../proto/where_child_bus/v1/resources.proto | 9 +- .../where_child_bus/v1/resources.pb.dart | 74 ++-- .../where_child_bus/v1/resources.pbjson.dart | 20 +- .../where_child_bus/v1/resources_pb2.py | 52 +-- 5 files changed, 295 insertions(+), 268 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index a43176df..d90ccd0e 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -291,13 +291,14 @@ type NurseryResponse struct { unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + NurseryCode string `protobuf:"bytes,2,opt,name=nursery_code,json=nurseryCode,proto3" json:"nursery_code,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` + Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` // ハッシュ化されたパスワードは除外 - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *NurseryResponse) Reset() { @@ -339,9 +340,9 @@ func (x *NurseryResponse) GetId() string { return "" } -func (x *NurseryResponse) GetNurseryId() string { +func (x *NurseryResponse) GetNurseryCode() string { if x != nil { - return x.NurseryId + return x.NurseryCode } return "" } @@ -353,9 +354,9 @@ func (x *NurseryResponse) GetName() string { return "" } -func (x *NurseryResponse) GetEmail() string { +func (x *NurseryResponse) GetAddress() string { if x != nil { - return x.Email + return x.Address } return "" } @@ -367,6 +368,13 @@ func (x *NurseryResponse) GetPhoneNumber() string { return "" } +func (x *NurseryResponse) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + func (x *NurseryResponse) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -1283,209 +1291,211 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0x83, 0x02, 0x0a, 0x0f, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x65, 0x64, 0x41, 0x74, 0x22, 0xa1, 0x02, 0x0a, 0x0f, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x02, 0x0a, 0x08, 0x47, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, - 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, + 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x10, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, - 0xb6, 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x36, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, - 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, - 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, - 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x22, 0xa5, 0x05, 0x0a, 0x05, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, - 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, 0x6f, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, - 0x69, 0x64, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x45, 0x76, 0x65, - 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, - 0x6d, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, - 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, - 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, - 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, - 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, - 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, - 0x72, 0x65, 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x55, - 0x6d, 0x62, 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, - 0x68, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, - 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, - 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, - 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x45, 0x4e, 0x10, - 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, - 0x22, 0xb4, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, - 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, - 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, - 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, - 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x02, 0x0a, 0x08, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x10, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb6, 0x03, + 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x22, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, + 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, 0x0a, + 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, 0x4e, + 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x22, 0xa5, 0x05, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x53, + 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x69, + 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, 0x6f, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x69, 0x64, + 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x69, + 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, + 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, + 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, + 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, + 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, + 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, + 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, + 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, + 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, + 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, + 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, + 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xf4, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, - 0x64, 0x12, 0x4a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x73, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4f, 0x0a, - 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, - 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x4d, - 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, 0x6f, - 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe1, 0x01, - 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x33, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, - 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, - 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, - 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, - 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, + 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, + 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x45, 0x4e, 0x10, 0x02, 0x12, + 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x22, 0xb4, + 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, + 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, + 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, + 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, + 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xf4, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, + 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, + 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, + 0x4a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4f, 0x0a, 0x07, 0x42, + 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, + 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x4d, 0x0a, 0x15, + 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0a, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x33, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, + 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, + 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, + 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, + 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, + 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, + 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/proto/where_child_bus/v1/resources.proto b/backend/proto/where_child_bus/v1/resources.proto index 4af4eebe..2c21c07e 100644 --- a/backend/proto/where_child_bus/v1/resources.proto +++ b/backend/proto/where_child_bus/v1/resources.proto @@ -18,13 +18,14 @@ message Nursery { message NurseryResponse { string id = 1; - string nursery_id = 2; + string nursery_code = 2; string name = 3; - string email = 4; + string address = 4; string phone_number = 5; + string email = 6; // ハッシュ化されたパスワードは除外 - google.protobuf.Timestamp created_at = 6; - google.protobuf.Timestamp updated_at = 7; + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at = 8; } message Guardian { diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 80388dc6..106e4ce5 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -187,10 +187,11 @@ class Nursery extends $pb.GeneratedMessage { class NurseryResponse extends $pb.GeneratedMessage { factory NurseryResponse({ $core.String? id, - $core.String? nurseryId, + $core.String? nurseryCode, $core.String? name, - $core.String? email, + $core.String? address, $core.String? phoneNumber, + $core.String? email, $0.Timestamp? createdAt, $0.Timestamp? updatedAt, }) { @@ -198,18 +199,21 @@ class NurseryResponse extends $pb.GeneratedMessage { if (id != null) { $result.id = id; } - if (nurseryId != null) { - $result.nurseryId = nurseryId; + if (nurseryCode != null) { + $result.nurseryCode = nurseryCode; } if (name != null) { $result.name = name; } - if (email != null) { - $result.email = email; + if (address != null) { + $result.address = address; } if (phoneNumber != null) { $result.phoneNumber = phoneNumber; } + if (email != null) { + $result.email = email; + } if (createdAt != null) { $result.createdAt = createdAt; } @@ -224,12 +228,13 @@ class NurseryResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'nurseryId') + ..aOS(2, _omitFieldNames ? '' : 'nurseryCode') ..aOS(3, _omitFieldNames ? '' : 'name') - ..aOS(4, _omitFieldNames ? '' : 'email') + ..aOS(4, _omitFieldNames ? '' : 'address') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOS(6, _omitFieldNames ? '' : 'email') + ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -264,13 +269,13 @@ class NurseryResponse extends $pb.GeneratedMessage { void clearId() => clearField(1); @$pb.TagNumber(2) - $core.String get nurseryId => $_getSZ(1); + $core.String get nurseryCode => $_getSZ(1); @$pb.TagNumber(2) - set nurseryId($core.String v) { $_setString(1, v); } + set nurseryCode($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) - $core.bool hasNurseryId() => $_has(1); + $core.bool hasNurseryCode() => $_has(1); @$pb.TagNumber(2) - void clearNurseryId() => clearField(2); + void clearNurseryCode() => clearField(2); @$pb.TagNumber(3) $core.String get name => $_getSZ(2); @@ -282,13 +287,13 @@ class NurseryResponse extends $pb.GeneratedMessage { void clearName() => clearField(3); @$pb.TagNumber(4) - $core.String get email => $_getSZ(3); + $core.String get address => $_getSZ(3); @$pb.TagNumber(4) - set email($core.String v) { $_setString(3, v); } + set address($core.String v) { $_setString(3, v); } @$pb.TagNumber(4) - $core.bool hasEmail() => $_has(3); + $core.bool hasAddress() => $_has(3); @$pb.TagNumber(4) - void clearEmail() => clearField(4); + void clearAddress() => clearField(4); @$pb.TagNumber(5) $core.String get phoneNumber => $_getSZ(4); @@ -299,28 +304,37 @@ class NurseryResponse extends $pb.GeneratedMessage { @$pb.TagNumber(5) void clearPhoneNumber() => clearField(5); - /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(6) - $0.Timestamp get createdAt => $_getN(5); - @$pb.TagNumber(6) - set createdAt($0.Timestamp v) { setField(6, v); } + $core.String get email => $_getSZ(5); @$pb.TagNumber(6) - $core.bool hasCreatedAt() => $_has(5); + set email($core.String v) { $_setString(5, v); } @$pb.TagNumber(6) - void clearCreatedAt() => clearField(6); + $core.bool hasEmail() => $_has(5); @$pb.TagNumber(6) - $0.Timestamp ensureCreatedAt() => $_ensure(5); + void clearEmail() => clearField(6); + /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(7) - $0.Timestamp get updatedAt => $_getN(6); + $0.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set updatedAt($0.Timestamp v) { setField(7, v); } + set createdAt($0.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) - $core.bool hasUpdatedAt() => $_has(6); + $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) - void clearUpdatedAt() => clearField(7); + void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureUpdatedAt() => $_ensure(6); + $0.Timestamp ensureCreatedAt() => $_ensure(6); + + @$pb.TagNumber(8) + $0.Timestamp get updatedAt => $_getN(7); + @$pb.TagNumber(8) + set updatedAt($0.Timestamp v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasUpdatedAt() => $_has(7); + @$pb.TagNumber(8) + void clearUpdatedAt() => clearField(8); + @$pb.TagNumber(8) + $0.Timestamp ensureUpdatedAt() => $_ensure(7); } class Guardian extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index ea81abdf..98b5a846 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -43,22 +43,24 @@ const NurseryResponse$json = { '1': 'NurseryResponse', '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'nursery_code', '3': 2, '4': 1, '5': 9, '10': 'nurseryCode'}, {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, - {'1': 'email', '3': 4, '4': 1, '5': 9, '10': 'email'}, + {'1': 'address', '3': 4, '4': 1, '5': 9, '10': 'address'}, {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, - {'1': 'created_at', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'email', '3': 6, '4': 1, '5': 9, '10': 'email'}, + {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; /// Descriptor for `NurseryResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List nurseryResponseDescriptor = $convert.base64Decode( - 'Cg9OdXJzZXJ5UmVzcG9uc2USDgoCaWQYASABKAlSAmlkEh0KCm51cnNlcnlfaWQYAiABKAlSCW' - '51cnNlcnlJZBISCgRuYW1lGAMgASgJUgRuYW1lEhQKBWVtYWlsGAQgASgJUgVlbWFpbBIhCgxw' - 'aG9uZV9udW1iZXIYBSABKAlSC3Bob25lTnVtYmVyEjkKCmNyZWF0ZWRfYXQYBiABKAsyGi5nb2' - '9nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYXRlZF9hdBgHIAEoCzIa' - 'Lmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); + 'Cg9OdXJzZXJ5UmVzcG9uc2USDgoCaWQYASABKAlSAmlkEiEKDG51cnNlcnlfY29kZRgCIAEoCV' + 'ILbnVyc2VyeUNvZGUSEgoEbmFtZRgDIAEoCVIEbmFtZRIYCgdhZGRyZXNzGAQgASgJUgdhZGRy' + 'ZXNzEiEKDHBob25lX251bWJlchgFIAEoCVILcGhvbmVOdW1iZXISFAoFZW1haWwYBiABKAlSBW' + 'VtYWlsEjkKCmNyZWF0ZWRfYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUglj' + 'cmVhdGVkQXQSOQoKdXBkYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbX' + 'BSCXVwZGF0ZWRBdA=='); @$core.Deprecated('Use guardianDescriptor instead') const Guardian$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index bc218c66..219f3205 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x83\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb6\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x36\n\x06status\x18\x05 \x01(\x0e\x32\x1e.where_child_bus.v1.Bus.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03\"\xa5\x05\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12/\n\x03sex\x18\x06 \x01(\x0e\x32\x1d.where_child_bus.v1.Child.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMEN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xf4\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12J\n\x08\x62us_type\x18\x04 \x01(\x0e\x32/.where_child_bus.v1.ChildBusAssociation.BusTypeR\x07\x62usType\"O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestampB\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb6\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x36\n\x06status\x18\x05 \x01(\x0e\x32\x1e.where_child_bus.v1.Bus.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03\"\xa5\x05\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12/\n\x03sex\x18\x06 \x01(\x0e\x32\x1d.where_child_bus.v1.Child.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMEN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xf4\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12J\n\x08\x62us_type\x18\x04 \x01(\x0e\x32/.where_child_bus.v1.ChildBusAssociation.BusTypeR\x07\x62usType\"O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestampB\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,29 +26,29 @@ _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=420 _globals['_NURSERYRESPONSE']._serialized_start=423 - _globals['_NURSERYRESPONSE']._serialized_end=682 - _globals['_GUARDIAN']._serialized_start=685 - _globals['_GUARDIAN']._serialized_end=984 - _globals['_GUARDIANRESPONSE']._serialized_start=987 - _globals['_GUARDIANRESPONSE']._serialized_end=1247 - _globals['_BUS']._serialized_start=1250 - _globals['_BUS']._serialized_end=1688 - _globals['_BUS_STATUS']._serialized_start=1591 - _globals['_BUS_STATUS']._serialized_end=1688 - _globals['_CHILD']._serialized_start=1691 - _globals['_CHILD']._serialized_end=2368 - _globals['_CHILD_SEX']._serialized_start=2299 - _globals['_CHILD_SEX']._serialized_end=2368 - _globals['_STATION']._serialized_start=2371 - _globals['_STATION']._serialized_end=2679 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2682 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2926 - _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_start=2847 - _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_end=2926 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=2928 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=3005 - _globals['_CHILDPHOTO']._serialized_start=3008 - _globals['_CHILDPHOTO']._serialized_end=3233 - _globals['_BOARDINGRECORD']._serialized_start=3236 - _globals['_BOARDINGRECORD']._serialized_end=3409 + _globals['_NURSERYRESPONSE']._serialized_end=712 + _globals['_GUARDIAN']._serialized_start=715 + _globals['_GUARDIAN']._serialized_end=1014 + _globals['_GUARDIANRESPONSE']._serialized_start=1017 + _globals['_GUARDIANRESPONSE']._serialized_end=1277 + _globals['_BUS']._serialized_start=1280 + _globals['_BUS']._serialized_end=1718 + _globals['_BUS_STATUS']._serialized_start=1621 + _globals['_BUS_STATUS']._serialized_end=1718 + _globals['_CHILD']._serialized_start=1721 + _globals['_CHILD']._serialized_end=2398 + _globals['_CHILD_SEX']._serialized_start=2329 + _globals['_CHILD_SEX']._serialized_end=2398 + _globals['_STATION']._serialized_start=2401 + _globals['_STATION']._serialized_end=2709 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2712 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2956 + _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_start=2877 + _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_end=2956 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=2958 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=3035 + _globals['_CHILDPHOTO']._serialized_start=3038 + _globals['_CHILDPHOTO']._serialized_end=3263 + _globals['_BOARDINGRECORD']._serialized_start=3266 + _globals['_BOARDINGRECORD']._serialized_end=3439 # @@protoc_insertion_point(module_scope) From 660f69c561f0c6676fe6452292532ff0cd332b85 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 01:52:20 +0900 Subject: [PATCH 149/771] =?UTF-8?q?chore(ml):=20validate=5Finterval?= =?UTF-8?q?=E3=81=A8save=5Fmodel=5Fpath=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/config.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index 5760baec..964b0210 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -1,6 +1,6 @@ model: hidden_size: 120 - in_channels: 1 + in_channels: 3 Conv2d: kernel_size: 3 pooling: @@ -15,11 +15,14 @@ face_detect: dataset: root_path: "src/face_detect_model/data/detect_img" ratio: - train: 0.8 + train: 0.7 valid: 0.1 - test: 0.1 + test: 0.2 train: - epoch: 3 - train_batch_size: 128 - valid_batch_size: 64 + epoch: 100 + learning_rate: 0.001 + train_batch_size: 1 + valid_batch_size: 1 test_batch_size: 1 + validate_interval: 10 + save_model_path: "src/face_detect_model/pickle/mock_model/" From 8e888ac14231e355ac9c56b87e7ab57420dfc8c0 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 01:54:26 +0900 Subject: [PATCH 150/771] =?UTF-8?q?fix(ml):=20=E6=AD=A3=E3=81=97=E3=81=8Fl?= =?UTF-8?q?abel=E3=81=8C=E3=83=87=E3=83=BC=E3=82=BF=E3=82=BB=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=AB=E5=90=AB=E3=81=BE=E3=82=8C=E3=81=AA=E3=81=84?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E8=A7=A3=E6=B6=88=EF=BC=8ECNN?= =?UTF-8?q?=E3=83=A2=E3=83=87=E3=83=AB=E3=81=AB=E5=AF=BE=E3=81=97=E3=81=A6?= =?UTF-8?q?=E6=AD=A3=E3=81=97=E3=81=8F=E5=85=A5=E5=8A=9B=E3=81=8C=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E5=BD=A2=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/faceDetectDataset.py | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index 289b0241..77ad9ade 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -1,4 +1,5 @@ import torch +import torchvision.transforms.functional as TF from torch.utils.data import Dataset import os import cv2 @@ -7,31 +8,45 @@ class FaceDetectDataset(Dataset): def __init__(self, config): self.data_dir = config["dataset"]["root_path"] - self.data = [] + self.face_data = [] self.label_name_dict = {} name_label_dict = {} self.label_num = 0 - for file in os.listdir(self.data_dir): - file_path = os.path.join(self.data_dir, file) - name = file.split("-")[0] + for file_name in os.listdir(self.data_dir): + # macOS環境におけるDS_Storeなどのファイルをスキップ + if os.path.splitext(file_name)[1][1:] != "png": + continue + + file_path = os.path.join(self.data_dir, file_name) + people_name = file_name.split("-")[0] + image = cv2.imread(file_path) - one_data = [torch.Tensor(self.label_num), image] - self.data.append(one_data) + image_tensor = TF.to_tensor(image) - if name_label_dict.get(name) is None: - self.label_name_dict[self.label_num] = name - name_label_dict[name] = self.label_num + # 人物名とラベルの対応を辞書に保存 + if name_label_dict.get(people_name) is None: + self.label_name_dict[self.label_num] = people_name + name_label_dict[people_name] = self.label_num self.label_num += 1 + label_img_data = ( + torch.tensor(name_label_dict[people_name], dtype=torch.int64), + image_tensor, + ) + self.face_data.append(label_img_data) + def __len__(self): - return len(self.data) + return len(self.face_data) def __getitem__(self, idx): - return self.data[idx] + return self.face_data[idx] def get_label_name_dict(self): return self.label_name_dict def get_label_num(self): return self.label_num + + def get_image_shape(self): + return self.face_data[0][1].shape From 3f8790d68a1ff5950918a5d8ca84512af00bdf03 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 01:56:40 +0900 Subject: [PATCH 151/771] =?UTF-8?q?feat(ml):=20Trainer=E3=81=AE=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9=EF=BC=8C=E5=AD=A6=E7=BF=92=E5=8F=8A=E3=81=B3=E3=83=A2?= =?UTF-8?q?=E3=83=87=E3=83=AB=E3=81=AB=E5=AF=BE=E3=81=99=E3=82=8B=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E7=94=A8=E3=81=AE=E3=82=B3=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/main.py | 64 ++++++++ .../src/face_detect_model/trainer.py | 140 ++++++++++++++++++ 2 files changed, 204 insertions(+) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index 8b137891..410c06d2 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -1 +1,65 @@ +import yaml +import argparse +import torch +from data.faceDetectDataset import FaceDetectDataset +from model.faceDetectModel import FaceDetectModel +from trainer import Trainer + + +def main(args: argparse.Namespace, config: dict): + args.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") + + # datasetの読み込み + dataset = FaceDetectDataset(config) + + train_data_size = int(len(dataset) * config["dataset"]["ratio"]["train"]) + valid_data_size = int(len(dataset) * config["dataset"]["ratio"]["valid"]) + test_data_size = int(len(dataset) * config["dataset"]["ratio"]["test"]) + train_data_size = len(dataset) - valid_data_size - test_data_size + + train_dataset, valid_dataset, test_dataset = torch.utils.data.random_split( + dataset, + [ + train_data_size, + valid_data_size, + test_data_size, + ], + ) + + # modelの読み込み + num_classes = dataset.get_label_num() + image_shape = dataset.get_image_shape() + face_detect_model = FaceDetectModel(config, num_classes, image_shape) + face_detect_model.to(args.device) + + # trainerの読み込み + # 学習 + if args.mode == "train": + face_detect_model = face_detect_model.train() + trainer = Trainer( + args, config, face_detect_model, train_dataset, valid_dataset, test_dataset + ) + trainer.train() + else: + trainer = Trainer( + args, config, face_detect_model, train_dataset, valid_dataset, test_dataset + ) + trainer.test() + + # テスト + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "--config", type=str, default="src/face_detect_model/config.yaml" + ) + parser.add_argument("--mode", type=str, required=True, choices=["train", "test"]) + parser.add_argument("--debug", action="store_true") + args = parser.parse_args() + + with open(args.config, "r") as f: + config = yaml.safe_load(f) + + main(args, config) diff --git a/machine_learning/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py index 8b137891..db410a58 100644 --- a/machine_learning/src/face_detect_model/trainer.py +++ b/machine_learning/src/face_detect_model/trainer.py @@ -1 +1,141 @@ +import os +import torch +import torch.nn as nn +import argparse +from data.faceDetectDataset import FaceDetectDataset +from model.faceDetectModel import FaceDetectModel + + +class Trainer: + def __init__( + self, + args: argparse.Namespace, + config: dict, + model: FaceDetectModel, + train_dataset: FaceDetectDataset, + valid_dataset: FaceDetectDataset, + test_dataset: FaceDetectDataset, + ): + self.args = args + self.config = config + self.model = model + + self.criterion = torch.nn.CrossEntropyLoss() + self.optimizer = torch.optim.Adam( + self.model.parameters(), lr=config["train"]["learning_rate"] + ) + self.softmax = nn.Softmax(dim=1) + + self.epoch = 1 + self.step_num = 1 + + self.best_loss = float("inf") + + self.train_dataset = train_dataset + self.valid_dataset = valid_dataset + self.test_dataset = test_dataset + + self.train_dataloader = torch.utils.data.DataLoader( + self.train_dataset, + batch_size=config["train"]["train_batch_size"], + shuffle=True, + ) + self.valid_dataloader = torch.utils.data.DataLoader( + self.valid_dataset, + batch_size=config["train"]["valid_batch_size"], + shuffle=False, + ) + self.test_dataloader = torch.utils.data.DataLoader( + self.test_dataset, + batch_size=config["train"]["test_batch_size"], + shuffle=False, + ) + + if not os.path.exists(config["train"]["save_model_path"]): + os.makedirs(config["train"]["save_model_path"]) + + def train(self): + for _ in range(self.config["train"]["epoch"]): + for label, image in self.train_dataloader: + self.step(label, image) + self.end_epoch() + if self.epoch % self.config["train"]["validate_interval"] == 0: + self.validate() + self.test() + + def step(self, label: torch.Tensor, image: torch.Tensor): + self.optimizer.zero_grad() + + output = self.model(image.to(self.args.device)) + + loss = self.criterion(output, label) + loss.backward() + self.optimizer.step() + + self.last_loss = loss.item() + self.step_num += 1 + + def end_epoch(self): + print(f"Epoch {self.epoch} Loss: {self.last_loss}") + + if self.last_loss < self.best_loss: + self.best_loss = self.last_loss + self.save_model( + os.path.join( + self.config["train"]["save_model_path"], + "best_model.pth", + ) + ) + + self.epoch += 1 + self.step_num = 1 + + def validate(self): + collect_list = [] + pred_list = [] + for label, image in self.valid_dataloader: + output = self.model(image.to(self.args.device)) + output = self.softmax(output) + + pred = torch.argmax(output, 1) + + pred_list.append(pred) + collect_list.append(label) + + if self.args.debug: + print(f"Collect: {collect_list}") + print(f"Predict: {pred_list}") + accuracy = self.calc_accuracy(pred_list, collect_list) + print(f"########## Epoch {self.epoch} ##########") + print(f"Validation Accuracy: {accuracy}") + + def test(self): + self.model.eval() + collect_list = [] + pred_list = [] + for label, image in self.test_dataloader: + with torch.no_grad(): + output = self.model(image.to(self.args.device)) + output = self.softmax(output) + + pred = torch.argmax(output, 1) + + pred_list.append(pred) + collect_list.append(label) + + if self.args.debug: + print(f"Collect: {collect_list}") + print(f"Predict: {pred_list}") + accuracy = self.calc_accuracy(pred_list, collect_list) + print("########## Test ##########") + print(f"Test Accuracy: {accuracy}") + + def calc_accuracy(self, pred_list, collect_list): + pred = torch.cat(pred_list) + collect = torch.cat(collect_list) + accuracy = (pred == collect).sum().item() / len(collect) + return accuracy + + def save_model(self, save_path: str): + torch.save(self.model.state_dict(), save_path) From ef0dc2b7989dbf02905bedc808157123c7ccf313 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 02:04:49 +0900 Subject: [PATCH 152/771] =?UTF-8?q?feat(server):=20nursery=E3=83=AD?= =?UTF-8?q?=E3=82=B0=E3=82=A4=E3=83=B3=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/gprc_server/grpc_server.go | 5 +++ backend/interfaces/nursery.go | 20 ++++++++++ backend/usecases/nursery/nursery.go | 60 +++++++++++++++++++++++++++++ backend/usecases/utils/utils.go | 13 +++++++ 4 files changed, 98 insertions(+) create mode 100644 backend/interfaces/nursery.go create mode 100644 backend/usecases/nursery/nursery.go diff --git a/backend/gprc_server/grpc_server.go b/backend/gprc_server/grpc_server.go index 976d41de..3462ac1d 100644 --- a/backend/gprc_server/grpc_server.go +++ b/backend/gprc_server/grpc_server.go @@ -8,6 +8,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/bus" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/nursery" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "golang.org/x/exp/slog" "google.golang.org/grpc" @@ -47,6 +48,10 @@ func New(opts ...optionFunc) *grpc.Server { healthcheckSrv := grpc_interfaces.NewHealthcheckServiceServer() pb.RegisterHealthcheckServiceServer(srv, healthcheckSrv) + nurseryInteractor := nursery.NewInteractor(opt.entClient, opt.logger) + nurserySrv := grpc_interfaces.NewNurseryServiceServer(nurseryInteractor) + pb.RegisterNurseryServiceServer(srv, nurserySrv) + return srv } diff --git a/backend/interfaces/nursery.go b/backend/interfaces/nursery.go new file mode 100644 index 00000000..f298e79e --- /dev/null +++ b/backend/interfaces/nursery.go @@ -0,0 +1,20 @@ +package interfaces + +import ( + "context" + + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/nursery" +) + +type nurseryServiceServer struct { + interactor *nursery.Interactor +} + +func NewNurseryServiceServer(interactor *nursery.Interactor) pb.NurseryServiceServer { + return &nurseryServiceServer{interactor} +} + +func (s *nurseryServiceServer) NurseryLogin(ctx context.Context, req *pb.NurseryLoginRequest) (*pb.NurseryLoginResponse, error) { + return s.interactor.NurseryLogin(ctx, req) +} diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go new file mode 100644 index 00000000..88c5a80d --- /dev/null +++ b/backend/usecases/nursery/nursery.go @@ -0,0 +1,60 @@ +package nursery + +import ( + "fmt" + + "golang.org/x/crypto/bcrypt" + "golang.org/x/exp/slog" + + "context" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" +) + +type Interactor struct { + entClient *ent.Client + logger *slog.Logger +} + +func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { + return &Interactor{entClient, logger} +} + +func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginRequest) (*pb.NurseryLoginResponse, error) { + //パスワードをハッシュ化 + hashedPassword, err := bcrypt.GenerateFromPassword([]byte(req.Password), bcrypt.DefaultCost) + if err != nil { + //エラーハンドリング + return nil, fmt.Errorf("failed to hash password: %w", err) + } + + //トランザクションを開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + defer tx.Rollback() + + //Nurseryを取得 + nursery, err := tx.Nursery.Query(). + Where(nurseryRepo.Email(req.Email)). + Where(nurseryRepo.EncryptedPassword(string(hashedPassword))). + Only(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to get nursery: %w", err) + } + + //トランザクションをコミット + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + + return &pb.NurseryLoginResponse{ + Success: true, + Nursery: utils.ToPbNurseryResponse(nursery), + }, nil +} diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 7315598f..1e0a6e85 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -81,3 +81,16 @@ func ToPbGuardianResponse(t *ent.Guardian) *pb.GuardianResponse { UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, } } + +func ToPbNurseryResponse(t *ent.Nursery) *pb.NurseryResponse { + return &pb.NurseryResponse{ + Id: t.ID.String(), + NurseryCode: t.NurseryCode, + Name: t.Name, + Email: t.Email, + Address: t.Address, + PhoneNumber: t.PhoneNumber, + CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, + UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + } +} From 5f113845a2e058eb12a2fd27d2f015dbacef33fb Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 02:10:56 +0900 Subject: [PATCH 153/771] =?UTF-8?q?chore:=20.env.example=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.env.example | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 backend/.env.example diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 00000000..14655553 --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,7 @@ +DSN= +DB_USER_NAME= +DB_PASSWORD= +DB_ADDR= +DB_NAME= +PORT= +MODE_DEV= \ No newline at end of file From c40c05632d767b13b90d2538d1c5692091f129b8 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 02:14:47 +0900 Subject: [PATCH 154/771] =?UTF-8?q?chore(ml):=20model=E3=81=AE=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E3=82=BF=E3=82=A4=E3=83=9F=E3=83=B3=E3=82=B0=E3=81=AE?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/trainer.py | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/machine_learning/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py index db410a58..2fe5b135 100644 --- a/machine_learning/src/face_detect_model/trainer.py +++ b/machine_learning/src/face_detect_model/trainer.py @@ -52,16 +52,22 @@ def __init__( shuffle=False, ) - if not os.path.exists(config["train"]["save_model_path"]): - os.makedirs(config["train"]["save_model_path"]) + self.save_model_dir = config["train"]["save_model_dir"] + if not os.path.exists(self.save_model_dir): + os.makedirs(self.save_model_dir) def train(self): for _ in range(self.config["train"]["epoch"]): for label, image in self.train_dataloader: self.step(label, image) self.end_epoch() + if self.epoch % self.config["train"]["validate_interval"] == 0: + self.save_model( + self.save_model_dir + f"model_epoch_{self.epoch}.pth", + ) self.validate() + self.test() def step(self, label: torch.Tensor, image: torch.Tensor): @@ -81,12 +87,7 @@ def end_epoch(self): if self.last_loss < self.best_loss: self.best_loss = self.last_loss - self.save_model( - os.path.join( - self.config["train"]["save_model_path"], - "best_model.pth", - ) - ) + self.save_model(self.save_model_dir + "best_model.pth") self.epoch += 1 self.step_num = 1 @@ -103,13 +104,14 @@ def validate(self): pred_list.append(pred) collect_list.append(label) - if self.args.debug: - print(f"Collect: {collect_list}") - print(f"Predict: {pred_list}") accuracy = self.calc_accuracy(pred_list, collect_list) print(f"########## Epoch {self.epoch} ##########") print(f"Validation Accuracy: {accuracy}") + if self.args.debug: + print(f"Collect: {collect_list}") + print(f"Predict: {pred_list}") + def test(self): self.model.eval() collect_list = [] @@ -124,12 +126,12 @@ def test(self): pred_list.append(pred) collect_list.append(label) - if self.args.debug: - print(f"Collect: {collect_list}") - print(f"Predict: {pred_list}") accuracy = self.calc_accuracy(pred_list, collect_list) print("########## Test ##########") print(f"Test Accuracy: {accuracy}") + if self.args.debug: + print(f"Collect: {collect_list}") + print(f"Predict: {pred_list}") def calc_accuracy(self, pred_list, collect_list): pred = torch.cat(pred_list) From 3827590153be568835e2f537d8ab66d7ccca28a3 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 02:15:54 +0900 Subject: [PATCH 155/771] =?UTF-8?q?feat(ml):=20=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=81=8A=E3=81=91=E3=82=8B=E5=AD=A6=E7=BF=92?= =?UTF-8?q?=E6=B8=88=E3=81=BF=E3=83=A2=E3=83=87=E3=83=AB=E3=81=AE=E8=AA=AD?= =?UTF-8?q?=E3=81=BF=E8=BE=BC=E3=81=BF=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index 410c06d2..e6d75314 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -34,21 +34,23 @@ def main(args: argparse.Namespace, config: dict): face_detect_model.to(args.device) # trainerの読み込み - # 学習 if args.mode == "train": + # 学習 face_detect_model = face_detect_model.train() trainer = Trainer( args, config, face_detect_model, train_dataset, valid_dataset, test_dataset ) trainer.train() else: + # テスト + face_detect_model.load_state_dict( + torch.load(config["train"]["test_model_path"]) + ) trainer = Trainer( args, config, face_detect_model, train_dataset, valid_dataset, test_dataset ) trainer.test() - # テスト - if __name__ == "__main__": parser = argparse.ArgumentParser() From be1fdecec5918095b4028260a86d2dcc1fb05cac Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 02:16:43 +0900 Subject: [PATCH 156/771] =?UTF-8?q?feat(ml):=20model=E3=81=AE=E8=AA=AD?= =?UTF-8?q?=E3=81=BF=E8=BE=BC=E3=81=BF=E5=85=83=E3=82=92config.yaml?= =?UTF-8?q?=E3=81=8B=E3=82=89=E6=8C=87=E5=AE=9A=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index 964b0210..f272e013 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -25,4 +25,5 @@ train: valid_batch_size: 1 test_batch_size: 1 validate_interval: 10 - save_model_path: "src/face_detect_model/pickle/mock_model/" + save_model_dir: "src/face_detect_model/pickle/mock_model/" + test_model_path: "src/face_detect_model/pickle/mock_model/best_model.pth" From bc4f381990d7893bc763efcb8981322a88ef17fb Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 02:17:55 +0900 Subject: [PATCH 157/771] =?UTF-8?q?feat(ml):=20seed=E5=80=A4=E3=82=92?= =?UTF-8?q?=E3=82=B9=E3=82=AF=E3=83=AA=E3=83=97=E3=83=88=E3=81=AE=E5=BC=95?= =?UTF-8?q?=E6=95=B0=E3=81=8B=E3=82=89=E6=8C=87=E5=AE=9A=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/main.py | 1 + machine_learning/src/face_detect_model/util.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index e6d75314..8780e5f0 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -59,6 +59,7 @@ def main(args: argparse.Namespace, config: dict): ) parser.add_argument("--mode", type=str, required=True, choices=["train", "test"]) parser.add_argument("--debug", action="store_true") + parser.add_argument("--seed", type=int, default=42) args = parser.parse_args() with open(args.config, "r") as f: diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index e69de29b..c81a479d 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -0,0 +1,9 @@ +import random +import torch + + +def set_seed(seed): + random.seed(seed) + torch.manual_seed(seed) + torch.cuda.manual_seed(seed) + torch.cuda.manual_seed_all(seed) From f13b919b17fdd4bb3fce198371c44cdf7504946e Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 03:10:30 +0900 Subject: [PATCH 158/771] =?UTF-8?q?chroe(ml):=20TODO=E3=82=B3=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index 8780e5f0..3bc11d6f 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -7,6 +7,7 @@ from trainer import Trainer +# TODO: loggerを用いたログ出力を実装する def main(args: argparse.Namespace, config: dict): args.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") From 735e8f8dbeda1135b0e9016f3d33eb1fb47ff935 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 13:08:28 +0900 Subject: [PATCH 159/771] =?UTF-8?q?ci:=20=E3=83=87=E3=83=97=E3=83=AD?= =?UTF-8?q?=E3=82=A4workflow=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-to-gcloud.yml | 43 ++++++++++++++++++++++++++ backend/Dockerfile | 20 ++++++++++++ backend/cloudbuild.yaml | 22 ------------- 3 files changed, 63 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/deploy-to-gcloud.yml delete mode 100644 backend/cloudbuild.yaml diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml new file mode 100644 index 00000000..357083b5 --- /dev/null +++ b/.github/workflows/deploy-to-gcloud.yml @@ -0,0 +1,43 @@ +name: Deploy to Google Cloud Run + +on: + push: + branches: + - develop + +jobs: + setup-build-deploy: + name: Setup, Build, and Deploy + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v0 + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + service_account_key: ${{ secrets.GCP_SA_KEY }} + export_default_credentials: true + + - name: Build Docker Image + run: | + docker build --tag=gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest \ + --file=./backend/Dockerfile \ + --platform linux/amd64 ./backend \ + --build-arg DSN=${{ secrets.DSN }} \ + --build-arg DB_USER_NAME=${{ secrets.DB_USER_NAME }} \ + --build-arg DB_PASSWORD=${{ secrets.DB_PASSWORD }} \ + --build-arg DB_ADDR=${{ secrets.DB_ADDR }} \ + --build-arg DB_NAME=${{ secrets.DB_NAME }} \ + --build-arg PORT=${{ secrets.PORT }} \ + --build-arg MODE_DEV=${{ secrets.MODE_DEV }} + + - name: Push Docker Image to Google Container Registry + run: | + docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest + + - name: Deploy to Cloud Run + run: | + gcloud run deploy where-child-bus-grpc --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest --platform=managed --allow-unauthenticated --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.GCP_REGION }} diff --git a/backend/Dockerfile b/backend/Dockerfile index bbc0f1b5..63a1694e 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -4,6 +4,26 @@ FROM golang:1.21.5 AS builder WORKDIR /srv/grpc COPY . . +# ARGでビルド時の引数を定義 +ARG DSN +ARG DB_USER_NAME +ARG DB_PASSWORD +ARG DB_ADDR +ARG DB_NAME +ARG PORT +ARG MODE_DEV + +# .env ファイルを生成 +RUN echo "DSN=$DSN" > .env \ + && echo "DB_USER_NAME=$DB_USER_NAME" >> .env \ + && echo "DB_PASSWORD=$DB_PASSWORD" >> .env \ + && echo "DB_ADDR=$DB_ADDR" >> .env \ + && echo "DB_NAME=$DB_NAME" >> .env \ + && echo "PORT=$PORT" >> .env \ + && echo "MODE_DEV=$MODE_DEV" >> .env + +RUN go mod download + RUN go mod download ARG VERS="3.11.4" diff --git a/backend/cloudbuild.yaml b/backend/cloudbuild.yaml deleted file mode 100644 index 26445e1a..00000000 --- a/backend/cloudbuild.yaml +++ /dev/null @@ -1,22 +0,0 @@ -options: - logging: CLOUD_LOGGING_ONLY -steps: - - name: "gcr.io/cloud-builders/docker" - args: [ - "build", - "-t", - "gcr.io/wherechildbus/where_child_bus-grpc", # 重複したリポジトリパスを修正 - "backend", # コンテキストパスをbackendディレクトリに変更 - ] - - name: "gcr.io/cloud-builders/docker" - args: ["push", "gcr.io/wherechildbus/where_child_bus-grpc"] # 重複したリポジトリパスを修正 - - name: "gcr.io/google.com/cloudsdktool/cloud-sdk" - args: [ - "run", - "deploy", - "where-child-bus-grpc", - "--image=gcr.io/wherechildbus/where_child_bus-grpc", # 重複したリポジトリパスを修正 - "--region=us-west1", - "--set-env-vars=DSN=$$_DSN,DB_USER_NAME=$$_DB_USER_NAME,DB_PASSWORD=$$_DB_PASSWORD,DB_ADDR=$$_DB_ADDR,DB_NAME=$$_DB_NAME,PORT=$$_PORT,ModeDev=$$_ModeDev", - ] -timeout: "1600s" From be29bfb251669116d5c9b855ef6c2c405160a65c Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 13:17:02 +0900 Subject: [PATCH 160/771] chore: delete unuse file --- .../where_child_bus/health_check_pb2.py | 31 --------- .../where_child_bus/health_check_pb2_grpc.py | 66 ------------------- .../where_child_bus/resources_pb2.py | 50 -------------- .../where_child_bus/resources_pb2_grpc.py | 4 -- 4 files changed, 151 deletions(-) delete mode 100644 machine_learning/src/proto-gen/where_child_bus/health_check_pb2.py delete mode 100644 machine_learning/src/proto-gen/where_child_bus/health_check_pb2_grpc.py delete mode 100644 machine_learning/src/proto-gen/where_child_bus/resources_pb2.py delete mode 100644 machine_learning/src/proto-gen/where_child_bus/resources_pb2_grpc.py diff --git a/machine_learning/src/proto-gen/where_child_bus/health_check_pb2.py b/machine_learning/src/proto-gen/where_child_bus/health_check_pb2.py deleted file mode 100644 index 32547cd6..00000000 --- a/machine_learning/src/proto-gen/where_child_bus/health_check_pb2.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: where_child_bus/health_check.proto -# Protobuf Python Version: 4.25.2 -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/health_check.proto\x12\x0fwhere_child_bus\"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2Y\n\x12HealthcheckService\x12\x43\n\x04Ping\x12\x1c.where_child_bus.PingRequest\x1a\x1d.where_child_bus.PingResponseB\xce\x01\n\x13\x63om.where_child_busB\x10HealthCheckProtoP\x01ZQgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus\xa2\x02\x03WXX\xaa\x02\rWhereChildBus\xca\x02\rWhereChildBus\xe2\x02\x19WhereChildBus\\GPBMetadata\xea\x02\rWhereChildBusb\x06proto3') - -_globals = globals() -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.health_check_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\023com.where_child_busB\020HealthCheckProtoP\001ZQgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus\242\002\003WXX\252\002\rWhereChildBus\312\002\rWhereChildBus\342\002\031WhereChildBus\\GPBMetadata\352\002\rWhereChildBus' - _globals['_PINGREQUEST']._serialized_start=55 - _globals['_PINGREQUEST']._serialized_end=88 - _globals['_PINGRESPONSE']._serialized_start=90 - _globals['_PINGRESPONSE']._serialized_end=130 - _globals['_HEALTHCHECKSERVICE']._serialized_start=132 - _globals['_HEALTHCHECKSERVICE']._serialized_end=221 -# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/health_check_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/health_check_pb2_grpc.py deleted file mode 100644 index 2554614a..00000000 --- a/machine_learning/src/proto-gen/where_child_bus/health_check_pb2_grpc.py +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - -from where_child_bus import health_check_pb2 as where__child__bus_dot_health__check__pb2 - - -class HealthcheckServiceStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.Ping = channel.unary_unary( - '/where_child_bus.HealthcheckService/Ping', - request_serializer=where__child__bus_dot_health__check__pb2.PingRequest.SerializeToString, - response_deserializer=where__child__bus_dot_health__check__pb2.PingResponse.FromString, - ) - - -class HealthcheckServiceServicer(object): - """Missing associated documentation comment in .proto file.""" - - def Ping(self, request, context): - """Missing associated documentation comment in .proto file.""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_HealthcheckServiceServicer_to_server(servicer, server): - rpc_method_handlers = { - 'Ping': grpc.unary_unary_rpc_method_handler( - servicer.Ping, - request_deserializer=where__child__bus_dot_health__check__pb2.PingRequest.FromString, - response_serializer=where__child__bus_dot_health__check__pb2.PingResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'where_child_bus.HealthcheckService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class HealthcheckService(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def Ping(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.HealthcheckService/Ping', - where__child__bus_dot_health__check__pb2.PingRequest.SerializeToString, - where__child__bus_dot_health__check__pb2.PingResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/where_child_bus/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/resources_pb2.py deleted file mode 100644 index 052d95e0..00000000 --- a/machine_learning/src/proto-gen/where_child_bus/resources_pb2.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: where_child_bus/resources.proto -# Protobuf Python Version: 4.25.2 -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fwhere_child_bus/resources.proto\x12\x0fwhere_child_bus\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x86\x03\n\x03\x62us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x33\n\x06status\x18\x05 \x01(\x0e\x32\x1b.where_child_bus.bus.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"4\n\x06Status\x12\x0b\n\x07STOPPED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x10\n\x0cMAINTEINANCE\x10\x02\"\x85\x05\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12,\n\x03sex\x18\x06 \x01(\x0e\x32\x1a.where_child_bus.Child.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12\x31\n\x15is_ride_afternoon_bus\x18\x08 \x01(\x08R\x12isRideAfternoonBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"$\n\x03Sex\x12\x07\n\x03MAN\x10\x00\x12\t\n\x05WOMEN\x10\x01\x12\t\n\x05OTHER\x10\x02\"\xb8\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12\'\n\x0f\x61\x66ternoon_order\x18\x06 \x01(\x05R\x0e\x61\x66ternoonOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xc7\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12G\n\x08\x62us_type\x18\x04 \x01(\x0e\x32,.where_child_bus.ChildBusAssociation.BusTypeR\x07\x62usType\"%\n\x07\x42usType\x12\x0b\n\x07MORNING\x10\x00\x12\r\n\tAFTERNOON\x10\x01\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestampB\xcc\x01\n\x13\x63om.where_child_busB\x0eResourcesProtoP\x01ZQgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus\xa2\x02\x03WXX\xaa\x02\rWhereChildBus\xca\x02\rWhereChildBus\xe2\x02\x19WhereChildBus\\GPBMetadata\xea\x02\rWhereChildBusb\x06proto3') - -_globals = globals() -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.resources_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\023com.where_child_busB\016ResourcesProtoP\001ZQgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus\242\002\003WXX\252\002\rWhereChildBus\312\002\rWhereChildBus\342\002\031WhereChildBus\\GPBMetadata\352\002\rWhereChildBus' - _globals['_NURSERY']._serialized_start=86 - _globals['_NURSERY']._serialized_end=414 - _globals['_GUARDIAN']._serialized_start=417 - _globals['_GUARDIAN']._serialized_end=716 - _globals['_BUS']._serialized_start=719 - _globals['_BUS']._serialized_end=1109 - _globals['_BUS_STATUS']._serialized_start=1057 - _globals['_BUS_STATUS']._serialized_end=1109 - _globals['_CHILD']._serialized_start=1112 - _globals['_CHILD']._serialized_end=1757 - _globals['_CHILD_SEX']._serialized_start=1721 - _globals['_CHILD_SEX']._serialized_end=1757 - _globals['_STATION']._serialized_start=1760 - _globals['_STATION']._serialized_end=2072 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2075 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2274 - _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_start=2237 - _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_end=2274 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=2276 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=2353 - _globals['_CHILDPHOTO']._serialized_start=2356 - _globals['_CHILDPHOTO']._serialized_end=2581 - _globals['_BOARDINGRECORD']._serialized_start=2584 - _globals['_BOARDINGRECORD']._serialized_end=2757 -# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/resources_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/resources_pb2_grpc.py deleted file mode 100644 index 2daafffe..00000000 --- a/machine_learning/src/proto-gen/where_child_bus/resources_pb2_grpc.py +++ /dev/null @@ -1,4 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - From ab67b4980fefbdf08ef3cb8c7fd28a79d9cf04f9 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 14:08:04 +0900 Subject: [PATCH 161/771] fix: add escape to deploy-to-gcloud.yml --- .github/workflows/deploy-to-gcloud.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 357083b5..e9f1eb5b 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -15,10 +15,10 @@ jobs: uses: actions/checkout@v2 - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} + service_account_key: ${{ secrets.GCP_SA_KEY }} # GitHub Secretsからサービスアカウントキーを参照 export_default_credentials: true - name: Build Docker Image @@ -26,13 +26,14 @@ jobs: docker build --tag=gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest \ --file=./backend/Dockerfile \ --platform linux/amd64 ./backend \ - --build-arg DSN=${{ secrets.DSN }} \ - --build-arg DB_USER_NAME=${{ secrets.DB_USER_NAME }} \ - --build-arg DB_PASSWORD=${{ secrets.DB_PASSWORD }} \ - --build-arg DB_ADDR=${{ secrets.DB_ADDR }} \ - --build-arg DB_NAME=${{ secrets.DB_NAME }} \ - --build-arg PORT=${{ secrets.PORT }} \ - --build-arg MODE_DEV=${{ secrets.MODE_DEV }} + --build-arg DSN="${{ secrets.DSN }}" \ + --build-arg DB_USER_NAME="${{ secrets.DB_USER_NAME }}" \ + --build-arg DB_PASSWORD="${{ secrets.DB_PASSWORD }}" \ + --build-arg DB_ADDR="${{ secrets.DB_ADDR }}" \ + --build-arg DB_NAME="${{ secrets.DB_NAME }}" \ + --build-arg PORT="${{ secrets.PORT }}" \ + --build-arg MODE_DEV="${{ secrets.MODE_DEV }}" + - name: Push Docker Image to Google Container Registry run: | @@ -40,4 +41,4 @@ jobs: - name: Deploy to Cloud Run run: | - gcloud run deploy where-child-bus-grpc --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest --platform=managed --allow-unauthenticated --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.GCP_REGION }} + gcloud run deploy where-child-bus-grpc --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest --platform=managed --allow-unauthenticated --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.GCP_REGION }} \ No newline at end of file From 781fa21dcc0e355bcc214d501d7589bdc948811f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 14:15:46 +0900 Subject: [PATCH 162/771] =?UTF-8?q?refactor:=20schema=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=20-=20encrypted=5Fpassword=E3=82=92hashed=5Fpassword?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4=20-=20=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=81=8C=E3=83=A6=E3=83=8B=E3=83=BC?= =?UTF-8?q?=E3=82=AF=E3=81=98=E3=82=83=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=81=8C=E3=81=82=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E8=A7=A3?= =?UTF-8?q?=E6=B1=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/guardian.go | 16 +- .../repository/ent/guardian/guardian.go | 12 +- .../domain/repository/ent/guardian/where.go | 84 ++++---- .../domain/repository/ent/guardian_create.go | 16 +- .../domain/repository/ent/guardian_update.go | 32 +-- .../domain/repository/ent/migrate/schema.go | 4 +- backend/domain/repository/ent/mutation.go | 188 +++++++++--------- backend/domain/repository/ent/nursery.go | 16 +- .../domain/repository/ent/nursery/nursery.go | 14 +- .../domain/repository/ent/nursery/where.go | 84 ++++---- .../domain/repository/ent/nursery_create.go | 28 +-- .../domain/repository/ent/nursery_update.go | 32 +-- backend/domain/repository/ent/runtime.go | 4 - .../domain/repository/ent/schema/guardian.go | 2 +- .../domain/repository/ent/schema/nursery.go | 7 +- 15 files changed, 259 insertions(+), 280 deletions(-) diff --git a/backend/domain/repository/ent/guardian.go b/backend/domain/repository/ent/guardian.go index 5eec6301..660017b8 100644 --- a/backend/domain/repository/ent/guardian.go +++ b/backend/domain/repository/ent/guardian.go @@ -22,8 +22,8 @@ type Guardian struct { ID uuid.UUID `json:"id,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` - // EncryptedPassword holds the value of the "encrypted_password" field. - EncryptedPassword string `json:"encrypted_password,omitempty"` + // HashedPassword holds the value of the "hashed_password" field. + HashedPassword string `json:"hashed_password,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // PhoneNumber holds the value of the "phone_number" field. @@ -92,7 +92,7 @@ func (*Guardian) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { - case guardian.FieldEmail, guardian.FieldEncryptedPassword, guardian.FieldName, guardian.FieldPhoneNumber: + case guardian.FieldEmail, guardian.FieldHashedPassword, guardian.FieldName, guardian.FieldPhoneNumber: values[i] = new(sql.NullString) case guardian.FieldCreatedAt, guardian.FieldUpdatedAt: values[i] = new(sql.NullTime) @@ -127,11 +127,11 @@ func (gu *Guardian) assignValues(columns []string, values []any) error { } else if value.Valid { gu.Email = value.String } - case guardian.FieldEncryptedPassword: + case guardian.FieldHashedPassword: if value, ok := values[i].(*sql.NullString); !ok { - return fmt.Errorf("unexpected type %T for field encrypted_password", values[i]) + return fmt.Errorf("unexpected type %T for field hashed_password", values[i]) } else if value.Valid { - gu.EncryptedPassword = value.String + gu.HashedPassword = value.String } case guardian.FieldName: if value, ok := values[i].(*sql.NullString); !ok { @@ -218,8 +218,8 @@ func (gu *Guardian) String() string { builder.WriteString("email=") builder.WriteString(gu.Email) builder.WriteString(", ") - builder.WriteString("encrypted_password=") - builder.WriteString(gu.EncryptedPassword) + builder.WriteString("hashed_password=") + builder.WriteString(gu.HashedPassword) builder.WriteString(", ") builder.WriteString("name=") builder.WriteString(gu.Name) diff --git a/backend/domain/repository/ent/guardian/guardian.go b/backend/domain/repository/ent/guardian/guardian.go index c3cc750c..1277416c 100644 --- a/backend/domain/repository/ent/guardian/guardian.go +++ b/backend/domain/repository/ent/guardian/guardian.go @@ -17,8 +17,8 @@ const ( FieldID = "id" // FieldEmail holds the string denoting the email field in the database. FieldEmail = "email" - // FieldEncryptedPassword holds the string denoting the encrypted_password field in the database. - FieldEncryptedPassword = "encrypted_password" + // FieldHashedPassword holds the string denoting the hashed_password field in the database. + FieldHashedPassword = "hashed_password" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldPhoneNumber holds the string denoting the phone_number field in the database. @@ -62,7 +62,7 @@ const ( var Columns = []string{ FieldID, FieldEmail, - FieldEncryptedPassword, + FieldHashedPassword, FieldName, FieldPhoneNumber, FieldCreatedAt, @@ -114,9 +114,9 @@ func ByEmail(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldEmail, opts...).ToFunc() } -// ByEncryptedPassword orders the results by the encrypted_password field. -func ByEncryptedPassword(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldEncryptedPassword, opts...).ToFunc() +// ByHashedPassword orders the results by the hashed_password field. +func ByHashedPassword(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldHashedPassword, opts...).ToFunc() } // ByName orders the results by the name field. diff --git a/backend/domain/repository/ent/guardian/where.go b/backend/domain/repository/ent/guardian/where.go index 822596d0..f98cb444 100644 --- a/backend/domain/repository/ent/guardian/where.go +++ b/backend/domain/repository/ent/guardian/where.go @@ -61,9 +61,9 @@ func Email(v string) predicate.Guardian { return predicate.Guardian(sql.FieldEQ(FieldEmail, v)) } -// EncryptedPassword applies equality check predicate on the "encrypted_password" field. It's identical to EncryptedPasswordEQ. -func EncryptedPassword(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldEQ(FieldEncryptedPassword, v)) +// HashedPassword applies equality check predicate on the "hashed_password" field. It's identical to HashedPasswordEQ. +func HashedPassword(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldHashedPassword, v)) } // Name applies equality check predicate on the "name" field. It's identical to NameEQ. @@ -151,69 +151,69 @@ func EmailContainsFold(v string) predicate.Guardian { return predicate.Guardian(sql.FieldContainsFold(FieldEmail, v)) } -// EncryptedPasswordEQ applies the EQ predicate on the "encrypted_password" field. -func EncryptedPasswordEQ(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldEQ(FieldEncryptedPassword, v)) +// HashedPasswordEQ applies the EQ predicate on the "hashed_password" field. +func HashedPasswordEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldHashedPassword, v)) } -// EncryptedPasswordNEQ applies the NEQ predicate on the "encrypted_password" field. -func EncryptedPasswordNEQ(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldNEQ(FieldEncryptedPassword, v)) +// HashedPasswordNEQ applies the NEQ predicate on the "hashed_password" field. +func HashedPasswordNEQ(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldHashedPassword, v)) } -// EncryptedPasswordIn applies the In predicate on the "encrypted_password" field. -func EncryptedPasswordIn(vs ...string) predicate.Guardian { - return predicate.Guardian(sql.FieldIn(FieldEncryptedPassword, vs...)) +// HashedPasswordIn applies the In predicate on the "hashed_password" field. +func HashedPasswordIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldIn(FieldHashedPassword, vs...)) } -// EncryptedPasswordNotIn applies the NotIn predicate on the "encrypted_password" field. -func EncryptedPasswordNotIn(vs ...string) predicate.Guardian { - return predicate.Guardian(sql.FieldNotIn(FieldEncryptedPassword, vs...)) +// HashedPasswordNotIn applies the NotIn predicate on the "hashed_password" field. +func HashedPasswordNotIn(vs ...string) predicate.Guardian { + return predicate.Guardian(sql.FieldNotIn(FieldHashedPassword, vs...)) } -// EncryptedPasswordGT applies the GT predicate on the "encrypted_password" field. -func EncryptedPasswordGT(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldGT(FieldEncryptedPassword, v)) +// HashedPasswordGT applies the GT predicate on the "hashed_password" field. +func HashedPasswordGT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGT(FieldHashedPassword, v)) } -// EncryptedPasswordGTE applies the GTE predicate on the "encrypted_password" field. -func EncryptedPasswordGTE(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldGTE(FieldEncryptedPassword, v)) +// HashedPasswordGTE applies the GTE predicate on the "hashed_password" field. +func HashedPasswordGTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldGTE(FieldHashedPassword, v)) } -// EncryptedPasswordLT applies the LT predicate on the "encrypted_password" field. -func EncryptedPasswordLT(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldLT(FieldEncryptedPassword, v)) +// HashedPasswordLT applies the LT predicate on the "hashed_password" field. +func HashedPasswordLT(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLT(FieldHashedPassword, v)) } -// EncryptedPasswordLTE applies the LTE predicate on the "encrypted_password" field. -func EncryptedPasswordLTE(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldLTE(FieldEncryptedPassword, v)) +// HashedPasswordLTE applies the LTE predicate on the "hashed_password" field. +func HashedPasswordLTE(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldLTE(FieldHashedPassword, v)) } -// EncryptedPasswordContains applies the Contains predicate on the "encrypted_password" field. -func EncryptedPasswordContains(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldContains(FieldEncryptedPassword, v)) +// HashedPasswordContains applies the Contains predicate on the "hashed_password" field. +func HashedPasswordContains(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContains(FieldHashedPassword, v)) } -// EncryptedPasswordHasPrefix applies the HasPrefix predicate on the "encrypted_password" field. -func EncryptedPasswordHasPrefix(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldHasPrefix(FieldEncryptedPassword, v)) +// HashedPasswordHasPrefix applies the HasPrefix predicate on the "hashed_password" field. +func HashedPasswordHasPrefix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasPrefix(FieldHashedPassword, v)) } -// EncryptedPasswordHasSuffix applies the HasSuffix predicate on the "encrypted_password" field. -func EncryptedPasswordHasSuffix(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldHasSuffix(FieldEncryptedPassword, v)) +// HashedPasswordHasSuffix applies the HasSuffix predicate on the "hashed_password" field. +func HashedPasswordHasSuffix(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldHasSuffix(FieldHashedPassword, v)) } -// EncryptedPasswordEqualFold applies the EqualFold predicate on the "encrypted_password" field. -func EncryptedPasswordEqualFold(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldEqualFold(FieldEncryptedPassword, v)) +// HashedPasswordEqualFold applies the EqualFold predicate on the "hashed_password" field. +func HashedPasswordEqualFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldEqualFold(FieldHashedPassword, v)) } -// EncryptedPasswordContainsFold applies the ContainsFold predicate on the "encrypted_password" field. -func EncryptedPasswordContainsFold(v string) predicate.Guardian { - return predicate.Guardian(sql.FieldContainsFold(FieldEncryptedPassword, v)) +// HashedPasswordContainsFold applies the ContainsFold predicate on the "hashed_password" field. +func HashedPasswordContainsFold(v string) predicate.Guardian { + return predicate.Guardian(sql.FieldContainsFold(FieldHashedPassword, v)) } // NameEQ applies the EQ predicate on the "name" field. diff --git a/backend/domain/repository/ent/guardian_create.go b/backend/domain/repository/ent/guardian_create.go index 2586b82a..6bc5f927 100644 --- a/backend/domain/repository/ent/guardian_create.go +++ b/backend/domain/repository/ent/guardian_create.go @@ -30,9 +30,9 @@ func (gc *GuardianCreate) SetEmail(s string) *GuardianCreate { return gc } -// SetEncryptedPassword sets the "encrypted_password" field. -func (gc *GuardianCreate) SetEncryptedPassword(s string) *GuardianCreate { - gc.mutation.SetEncryptedPassword(s) +// SetHashedPassword sets the "hashed_password" field. +func (gc *GuardianCreate) SetHashedPassword(s string) *GuardianCreate { + gc.mutation.SetHashedPassword(s) return gc } @@ -205,8 +205,8 @@ func (gc *GuardianCreate) check() error { if _, ok := gc.mutation.Email(); !ok { return &ValidationError{Name: "email", err: errors.New(`ent: missing required field "Guardian.email"`)} } - if _, ok := gc.mutation.EncryptedPassword(); !ok { - return &ValidationError{Name: "encrypted_password", err: errors.New(`ent: missing required field "Guardian.encrypted_password"`)} + if _, ok := gc.mutation.HashedPassword(); !ok { + return &ValidationError{Name: "hashed_password", err: errors.New(`ent: missing required field "Guardian.hashed_password"`)} } if _, ok := gc.mutation.Name(); !ok { return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Guardian.name"`)} @@ -256,9 +256,9 @@ func (gc *GuardianCreate) createSpec() (*Guardian, *sqlgraph.CreateSpec) { _spec.SetField(guardian.FieldEmail, field.TypeString, value) _node.Email = value } - if value, ok := gc.mutation.EncryptedPassword(); ok { - _spec.SetField(guardian.FieldEncryptedPassword, field.TypeString, value) - _node.EncryptedPassword = value + if value, ok := gc.mutation.HashedPassword(); ok { + _spec.SetField(guardian.FieldHashedPassword, field.TypeString, value) + _node.HashedPassword = value } if value, ok := gc.mutation.Name(); ok { _spec.SetField(guardian.FieldName, field.TypeString, value) diff --git a/backend/domain/repository/ent/guardian_update.go b/backend/domain/repository/ent/guardian_update.go index ed420fa2..fb4c5b21 100644 --- a/backend/domain/repository/ent/guardian_update.go +++ b/backend/domain/repository/ent/guardian_update.go @@ -46,16 +46,16 @@ func (gu *GuardianUpdate) SetNillableEmail(s *string) *GuardianUpdate { return gu } -// SetEncryptedPassword sets the "encrypted_password" field. -func (gu *GuardianUpdate) SetEncryptedPassword(s string) *GuardianUpdate { - gu.mutation.SetEncryptedPassword(s) +// SetHashedPassword sets the "hashed_password" field. +func (gu *GuardianUpdate) SetHashedPassword(s string) *GuardianUpdate { + gu.mutation.SetHashedPassword(s) return gu } -// SetNillableEncryptedPassword sets the "encrypted_password" field if the given value is not nil. -func (gu *GuardianUpdate) SetNillableEncryptedPassword(s *string) *GuardianUpdate { +// SetNillableHashedPassword sets the "hashed_password" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillableHashedPassword(s *string) *GuardianUpdate { if s != nil { - gu.SetEncryptedPassword(*s) + gu.SetHashedPassword(*s) } return gu } @@ -253,8 +253,8 @@ func (gu *GuardianUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := gu.mutation.Email(); ok { _spec.SetField(guardian.FieldEmail, field.TypeString, value) } - if value, ok := gu.mutation.EncryptedPassword(); ok { - _spec.SetField(guardian.FieldEncryptedPassword, field.TypeString, value) + if value, ok := gu.mutation.HashedPassword(); ok { + _spec.SetField(guardian.FieldHashedPassword, field.TypeString, value) } if value, ok := gu.mutation.Name(); ok { _spec.SetField(guardian.FieldName, field.TypeString, value) @@ -408,16 +408,16 @@ func (guo *GuardianUpdateOne) SetNillableEmail(s *string) *GuardianUpdateOne { return guo } -// SetEncryptedPassword sets the "encrypted_password" field. -func (guo *GuardianUpdateOne) SetEncryptedPassword(s string) *GuardianUpdateOne { - guo.mutation.SetEncryptedPassword(s) +// SetHashedPassword sets the "hashed_password" field. +func (guo *GuardianUpdateOne) SetHashedPassword(s string) *GuardianUpdateOne { + guo.mutation.SetHashedPassword(s) return guo } -// SetNillableEncryptedPassword sets the "encrypted_password" field if the given value is not nil. -func (guo *GuardianUpdateOne) SetNillableEncryptedPassword(s *string) *GuardianUpdateOne { +// SetNillableHashedPassword sets the "hashed_password" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableHashedPassword(s *string) *GuardianUpdateOne { if s != nil { - guo.SetEncryptedPassword(*s) + guo.SetHashedPassword(*s) } return guo } @@ -645,8 +645,8 @@ func (guo *GuardianUpdateOne) sqlSave(ctx context.Context) (_node *Guardian, err if value, ok := guo.mutation.Email(); ok { _spec.SetField(guardian.FieldEmail, field.TypeString, value) } - if value, ok := guo.mutation.EncryptedPassword(); ok { - _spec.SetField(guardian.FieldEncryptedPassword, field.TypeString, value) + if value, ok := guo.mutation.HashedPassword(); ok { + _spec.SetField(guardian.FieldHashedPassword, field.TypeString, value) } if value, ok := guo.mutation.Name(); ok { _spec.SetField(guardian.FieldName, field.TypeString, value) diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 7b75df34..166d32e4 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -155,7 +155,7 @@ var ( GuardiansColumns = []*schema.Column{ {Name: "id", Type: field.TypeUUID, Unique: true}, {Name: "email", Type: field.TypeString}, - {Name: "encrypted_password", Type: field.TypeString}, + {Name: "hashed_password", Type: field.TypeString}, {Name: "name", Type: field.TypeString}, {Name: "phone_number", Type: field.TypeString, Nullable: true}, {Name: "created_at", Type: field.TypeTime}, @@ -181,7 +181,7 @@ var ( {Name: "id", Type: field.TypeUUID, Unique: true}, {Name: "nursery_code", Type: field.TypeString, Unique: true}, {Name: "email", Type: field.TypeString}, - {Name: "encrypted_password", Type: field.TypeString}, + {Name: "hashed_password", Type: field.TypeString}, {Name: "name", Type: field.TypeString}, {Name: "address", Type: field.TypeString, Nullable: true}, {Name: "phone_number", Type: field.TypeString, Nullable: true}, diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index 68c634ad..b0a5c13f 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -4150,26 +4150,26 @@ func (m *ChildPhotoMutation) ResetEdge(name string) error { // GuardianMutation represents an operation that mutates the Guardian nodes in the graph. type GuardianMutation struct { config - op Op - typ string - id *uuid.UUID - email *string - encrypted_password *string - name *string - phone_number *string - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - children map[uuid.UUID]struct{} - removedchildren map[uuid.UUID]struct{} - clearedchildren bool - nursery *uuid.UUID - clearednursery bool - station *uuid.UUID - clearedstation bool - done bool - oldValue func(context.Context) (*Guardian, error) - predicates []predicate.Guardian + op Op + typ string + id *uuid.UUID + email *string + hashed_password *string + name *string + phone_number *string + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + children map[uuid.UUID]struct{} + removedchildren map[uuid.UUID]struct{} + clearedchildren bool + nursery *uuid.UUID + clearednursery bool + station *uuid.UUID + clearedstation bool + done bool + oldValue func(context.Context) (*Guardian, error) + predicates []predicate.Guardian } var _ ent.Mutation = (*GuardianMutation)(nil) @@ -4312,40 +4312,40 @@ func (m *GuardianMutation) ResetEmail() { m.email = nil } -// SetEncryptedPassword sets the "encrypted_password" field. -func (m *GuardianMutation) SetEncryptedPassword(s string) { - m.encrypted_password = &s +// SetHashedPassword sets the "hashed_password" field. +func (m *GuardianMutation) SetHashedPassword(s string) { + m.hashed_password = &s } -// EncryptedPassword returns the value of the "encrypted_password" field in the mutation. -func (m *GuardianMutation) EncryptedPassword() (r string, exists bool) { - v := m.encrypted_password +// HashedPassword returns the value of the "hashed_password" field in the mutation. +func (m *GuardianMutation) HashedPassword() (r string, exists bool) { + v := m.hashed_password if v == nil { return } return *v, true } -// OldEncryptedPassword returns the old "encrypted_password" field's value of the Guardian entity. +// OldHashedPassword returns the old "hashed_password" field's value of the Guardian entity. // If the Guardian object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *GuardianMutation) OldEncryptedPassword(ctx context.Context) (v string, err error) { +func (m *GuardianMutation) OldHashedPassword(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldEncryptedPassword is only allowed on UpdateOne operations") + return v, errors.New("OldHashedPassword is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, errors.New("OldEncryptedPassword requires an ID field in the mutation") + return v, errors.New("OldHashedPassword requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { - return v, fmt.Errorf("querying old value for OldEncryptedPassword: %w", err) + return v, fmt.Errorf("querying old value for OldHashedPassword: %w", err) } - return oldValue.EncryptedPassword, nil + return oldValue.HashedPassword, nil } -// ResetEncryptedPassword resets all changes to the "encrypted_password" field. -func (m *GuardianMutation) ResetEncryptedPassword() { - m.encrypted_password = nil +// ResetHashedPassword resets all changes to the "hashed_password" field. +func (m *GuardianMutation) ResetHashedPassword() { + m.hashed_password = nil } // SetName sets the "name" field. @@ -4675,8 +4675,8 @@ func (m *GuardianMutation) Fields() []string { if m.email != nil { fields = append(fields, guardian.FieldEmail) } - if m.encrypted_password != nil { - fields = append(fields, guardian.FieldEncryptedPassword) + if m.hashed_password != nil { + fields = append(fields, guardian.FieldHashedPassword) } if m.name != nil { fields = append(fields, guardian.FieldName) @@ -4700,8 +4700,8 @@ func (m *GuardianMutation) Field(name string) (ent.Value, bool) { switch name { case guardian.FieldEmail: return m.Email() - case guardian.FieldEncryptedPassword: - return m.EncryptedPassword() + case guardian.FieldHashedPassword: + return m.HashedPassword() case guardian.FieldName: return m.Name() case guardian.FieldPhoneNumber: @@ -4721,8 +4721,8 @@ func (m *GuardianMutation) OldField(ctx context.Context, name string) (ent.Value switch name { case guardian.FieldEmail: return m.OldEmail(ctx) - case guardian.FieldEncryptedPassword: - return m.OldEncryptedPassword(ctx) + case guardian.FieldHashedPassword: + return m.OldHashedPassword(ctx) case guardian.FieldName: return m.OldName(ctx) case guardian.FieldPhoneNumber: @@ -4747,12 +4747,12 @@ func (m *GuardianMutation) SetField(name string, value ent.Value) error { } m.SetEmail(v) return nil - case guardian.FieldEncryptedPassword: + case guardian.FieldHashedPassword: v, ok := value.(string) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetEncryptedPassword(v) + m.SetHashedPassword(v) return nil case guardian.FieldName: v, ok := value.(string) @@ -4843,8 +4843,8 @@ func (m *GuardianMutation) ResetField(name string) error { case guardian.FieldEmail: m.ResetEmail() return nil - case guardian.FieldEncryptedPassword: - m.ResetEncryptedPassword() + case guardian.FieldHashedPassword: + m.ResetHashedPassword() return nil case guardian.FieldName: m.ResetName() @@ -4985,30 +4985,30 @@ func (m *GuardianMutation) ResetEdge(name string) error { // NurseryMutation represents an operation that mutates the Nursery nodes in the graph. type NurseryMutation struct { config - op Op - typ string - id *uuid.UUID - nursery_code *string - email *string - encrypted_password *string - name *string - address *string - phone_number *string - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - children map[uuid.UUID]struct{} - removedchildren map[uuid.UUID]struct{} - clearedchildren bool - guardians map[uuid.UUID]struct{} - removedguardians map[uuid.UUID]struct{} - clearedguardians bool - buses map[uuid.UUID]struct{} - removedbuses map[uuid.UUID]struct{} - clearedbuses bool - done bool - oldValue func(context.Context) (*Nursery, error) - predicates []predicate.Nursery + op Op + typ string + id *uuid.UUID + nursery_code *string + email *string + hashed_password *string + name *string + address *string + phone_number *string + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + children map[uuid.UUID]struct{} + removedchildren map[uuid.UUID]struct{} + clearedchildren bool + guardians map[uuid.UUID]struct{} + removedguardians map[uuid.UUID]struct{} + clearedguardians bool + buses map[uuid.UUID]struct{} + removedbuses map[uuid.UUID]struct{} + clearedbuses bool + done bool + oldValue func(context.Context) (*Nursery, error) + predicates []predicate.Nursery } var _ ent.Mutation = (*NurseryMutation)(nil) @@ -5187,40 +5187,40 @@ func (m *NurseryMutation) ResetEmail() { m.email = nil } -// SetEncryptedPassword sets the "encrypted_password" field. -func (m *NurseryMutation) SetEncryptedPassword(s string) { - m.encrypted_password = &s +// SetHashedPassword sets the "hashed_password" field. +func (m *NurseryMutation) SetHashedPassword(s string) { + m.hashed_password = &s } -// EncryptedPassword returns the value of the "encrypted_password" field in the mutation. -func (m *NurseryMutation) EncryptedPassword() (r string, exists bool) { - v := m.encrypted_password +// HashedPassword returns the value of the "hashed_password" field in the mutation. +func (m *NurseryMutation) HashedPassword() (r string, exists bool) { + v := m.hashed_password if v == nil { return } return *v, true } -// OldEncryptedPassword returns the old "encrypted_password" field's value of the Nursery entity. +// OldHashedPassword returns the old "hashed_password" field's value of the Nursery entity. // If the Nursery object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *NurseryMutation) OldEncryptedPassword(ctx context.Context) (v string, err error) { +func (m *NurseryMutation) OldHashedPassword(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldEncryptedPassword is only allowed on UpdateOne operations") + return v, errors.New("OldHashedPassword is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, errors.New("OldEncryptedPassword requires an ID field in the mutation") + return v, errors.New("OldHashedPassword requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { - return v, fmt.Errorf("querying old value for OldEncryptedPassword: %w", err) + return v, fmt.Errorf("querying old value for OldHashedPassword: %w", err) } - return oldValue.EncryptedPassword, nil + return oldValue.HashedPassword, nil } -// ResetEncryptedPassword resets all changes to the "encrypted_password" field. -func (m *NurseryMutation) ResetEncryptedPassword() { - m.encrypted_password = nil +// ResetHashedPassword resets all changes to the "hashed_password" field. +func (m *NurseryMutation) ResetHashedPassword() { + m.hashed_password = nil } // SetName sets the "name" field. @@ -5632,8 +5632,8 @@ func (m *NurseryMutation) Fields() []string { if m.email != nil { fields = append(fields, nursery.FieldEmail) } - if m.encrypted_password != nil { - fields = append(fields, nursery.FieldEncryptedPassword) + if m.hashed_password != nil { + fields = append(fields, nursery.FieldHashedPassword) } if m.name != nil { fields = append(fields, nursery.FieldName) @@ -5662,8 +5662,8 @@ func (m *NurseryMutation) Field(name string) (ent.Value, bool) { return m.NurseryCode() case nursery.FieldEmail: return m.Email() - case nursery.FieldEncryptedPassword: - return m.EncryptedPassword() + case nursery.FieldHashedPassword: + return m.HashedPassword() case nursery.FieldName: return m.Name() case nursery.FieldAddress: @@ -5687,8 +5687,8 @@ func (m *NurseryMutation) OldField(ctx context.Context, name string) (ent.Value, return m.OldNurseryCode(ctx) case nursery.FieldEmail: return m.OldEmail(ctx) - case nursery.FieldEncryptedPassword: - return m.OldEncryptedPassword(ctx) + case nursery.FieldHashedPassword: + return m.OldHashedPassword(ctx) case nursery.FieldName: return m.OldName(ctx) case nursery.FieldAddress: @@ -5722,12 +5722,12 @@ func (m *NurseryMutation) SetField(name string, value ent.Value) error { } m.SetEmail(v) return nil - case nursery.FieldEncryptedPassword: + case nursery.FieldHashedPassword: v, ok := value.(string) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetEncryptedPassword(v) + m.SetHashedPassword(v) return nil case nursery.FieldName: v, ok := value.(string) @@ -5834,8 +5834,8 @@ func (m *NurseryMutation) ResetField(name string) error { case nursery.FieldEmail: m.ResetEmail() return nil - case nursery.FieldEncryptedPassword: - m.ResetEncryptedPassword() + case nursery.FieldHashedPassword: + m.ResetHashedPassword() return nil case nursery.FieldName: m.ResetName() diff --git a/backend/domain/repository/ent/nursery.go b/backend/domain/repository/ent/nursery.go index f3435131..3c1ca5ae 100644 --- a/backend/domain/repository/ent/nursery.go +++ b/backend/domain/repository/ent/nursery.go @@ -22,8 +22,8 @@ type Nursery struct { NurseryCode string `json:"nursery_code,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` - // EncryptedPassword holds the value of the "encrypted_password" field. - EncryptedPassword string `json:"encrypted_password,omitempty"` + // HashedPassword holds the value of the "hashed_password" field. + HashedPassword string `json:"hashed_password,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Address holds the value of the "address" field. @@ -85,7 +85,7 @@ func (*Nursery) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { - case nursery.FieldNurseryCode, nursery.FieldEmail, nursery.FieldEncryptedPassword, nursery.FieldName, nursery.FieldAddress, nursery.FieldPhoneNumber: + case nursery.FieldNurseryCode, nursery.FieldEmail, nursery.FieldHashedPassword, nursery.FieldName, nursery.FieldAddress, nursery.FieldPhoneNumber: values[i] = new(sql.NullString) case nursery.FieldCreatedAt, nursery.FieldUpdatedAt: values[i] = new(sql.NullTime) @@ -124,11 +124,11 @@ func (n *Nursery) assignValues(columns []string, values []any) error { } else if value.Valid { n.Email = value.String } - case nursery.FieldEncryptedPassword: + case nursery.FieldHashedPassword: if value, ok := values[i].(*sql.NullString); !ok { - return fmt.Errorf("unexpected type %T for field encrypted_password", values[i]) + return fmt.Errorf("unexpected type %T for field hashed_password", values[i]) } else if value.Valid { - n.EncryptedPassword = value.String + n.HashedPassword = value.String } case nursery.FieldName: if value, ok := values[i].(*sql.NullString); !ok { @@ -217,8 +217,8 @@ func (n *Nursery) String() string { builder.WriteString("email=") builder.WriteString(n.Email) builder.WriteString(", ") - builder.WriteString("encrypted_password=") - builder.WriteString(n.EncryptedPassword) + builder.WriteString("hashed_password=") + builder.WriteString(n.HashedPassword) builder.WriteString(", ") builder.WriteString("name=") builder.WriteString(n.Name) diff --git a/backend/domain/repository/ent/nursery/nursery.go b/backend/domain/repository/ent/nursery/nursery.go index f00a402a..fc40cef2 100644 --- a/backend/domain/repository/ent/nursery/nursery.go +++ b/backend/domain/repository/ent/nursery/nursery.go @@ -19,8 +19,8 @@ const ( FieldNurseryCode = "nursery_code" // FieldEmail holds the string denoting the email field in the database. FieldEmail = "email" - // FieldEncryptedPassword holds the string denoting the encrypted_password field in the database. - FieldEncryptedPassword = "encrypted_password" + // FieldHashedPassword holds the string denoting the hashed_password field in the database. + FieldHashedPassword = "hashed_password" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldAddress holds the string denoting the address field in the database. @@ -67,7 +67,7 @@ var Columns = []string{ FieldID, FieldNurseryCode, FieldEmail, - FieldEncryptedPassword, + FieldHashedPassword, FieldName, FieldAddress, FieldPhoneNumber, @@ -86,8 +86,6 @@ func ValidColumn(column string) bool { } var ( - // DefaultNurseryCode holds the default value on creation for the "nursery_code" field. - DefaultNurseryCode func() string // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. @@ -116,9 +114,9 @@ func ByEmail(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldEmail, opts...).ToFunc() } -// ByEncryptedPassword orders the results by the encrypted_password field. -func ByEncryptedPassword(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldEncryptedPassword, opts...).ToFunc() +// ByHashedPassword orders the results by the hashed_password field. +func ByHashedPassword(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldHashedPassword, opts...).ToFunc() } // ByName orders the results by the name field. diff --git a/backend/domain/repository/ent/nursery/where.go b/backend/domain/repository/ent/nursery/where.go index 2760acf4..6f5b404f 100644 --- a/backend/domain/repository/ent/nursery/where.go +++ b/backend/domain/repository/ent/nursery/where.go @@ -66,9 +66,9 @@ func Email(v string) predicate.Nursery { return predicate.Nursery(sql.FieldEQ(FieldEmail, v)) } -// EncryptedPassword applies equality check predicate on the "encrypted_password" field. It's identical to EncryptedPasswordEQ. -func EncryptedPassword(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldEQ(FieldEncryptedPassword, v)) +// HashedPassword applies equality check predicate on the "hashed_password" field. It's identical to HashedPasswordEQ. +func HashedPassword(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldHashedPassword, v)) } // Name applies equality check predicate on the "name" field. It's identical to NameEQ. @@ -226,69 +226,69 @@ func EmailContainsFold(v string) predicate.Nursery { return predicate.Nursery(sql.FieldContainsFold(FieldEmail, v)) } -// EncryptedPasswordEQ applies the EQ predicate on the "encrypted_password" field. -func EncryptedPasswordEQ(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldEQ(FieldEncryptedPassword, v)) +// HashedPasswordEQ applies the EQ predicate on the "hashed_password" field. +func HashedPasswordEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEQ(FieldHashedPassword, v)) } -// EncryptedPasswordNEQ applies the NEQ predicate on the "encrypted_password" field. -func EncryptedPasswordNEQ(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldNEQ(FieldEncryptedPassword, v)) +// HashedPasswordNEQ applies the NEQ predicate on the "hashed_password" field. +func HashedPasswordNEQ(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldNEQ(FieldHashedPassword, v)) } -// EncryptedPasswordIn applies the In predicate on the "encrypted_password" field. -func EncryptedPasswordIn(vs ...string) predicate.Nursery { - return predicate.Nursery(sql.FieldIn(FieldEncryptedPassword, vs...)) +// HashedPasswordIn applies the In predicate on the "hashed_password" field. +func HashedPasswordIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldIn(FieldHashedPassword, vs...)) } -// EncryptedPasswordNotIn applies the NotIn predicate on the "encrypted_password" field. -func EncryptedPasswordNotIn(vs ...string) predicate.Nursery { - return predicate.Nursery(sql.FieldNotIn(FieldEncryptedPassword, vs...)) +// HashedPasswordNotIn applies the NotIn predicate on the "hashed_password" field. +func HashedPasswordNotIn(vs ...string) predicate.Nursery { + return predicate.Nursery(sql.FieldNotIn(FieldHashedPassword, vs...)) } -// EncryptedPasswordGT applies the GT predicate on the "encrypted_password" field. -func EncryptedPasswordGT(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldGT(FieldEncryptedPassword, v)) +// HashedPasswordGT applies the GT predicate on the "hashed_password" field. +func HashedPasswordGT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGT(FieldHashedPassword, v)) } -// EncryptedPasswordGTE applies the GTE predicate on the "encrypted_password" field. -func EncryptedPasswordGTE(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldGTE(FieldEncryptedPassword, v)) +// HashedPasswordGTE applies the GTE predicate on the "hashed_password" field. +func HashedPasswordGTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldGTE(FieldHashedPassword, v)) } -// EncryptedPasswordLT applies the LT predicate on the "encrypted_password" field. -func EncryptedPasswordLT(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldLT(FieldEncryptedPassword, v)) +// HashedPasswordLT applies the LT predicate on the "hashed_password" field. +func HashedPasswordLT(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLT(FieldHashedPassword, v)) } -// EncryptedPasswordLTE applies the LTE predicate on the "encrypted_password" field. -func EncryptedPasswordLTE(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldLTE(FieldEncryptedPassword, v)) +// HashedPasswordLTE applies the LTE predicate on the "hashed_password" field. +func HashedPasswordLTE(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldLTE(FieldHashedPassword, v)) } -// EncryptedPasswordContains applies the Contains predicate on the "encrypted_password" field. -func EncryptedPasswordContains(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldContains(FieldEncryptedPassword, v)) +// HashedPasswordContains applies the Contains predicate on the "hashed_password" field. +func HashedPasswordContains(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContains(FieldHashedPassword, v)) } -// EncryptedPasswordHasPrefix applies the HasPrefix predicate on the "encrypted_password" field. -func EncryptedPasswordHasPrefix(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldHasPrefix(FieldEncryptedPassword, v)) +// HashedPasswordHasPrefix applies the HasPrefix predicate on the "hashed_password" field. +func HashedPasswordHasPrefix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasPrefix(FieldHashedPassword, v)) } -// EncryptedPasswordHasSuffix applies the HasSuffix predicate on the "encrypted_password" field. -func EncryptedPasswordHasSuffix(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldHasSuffix(FieldEncryptedPassword, v)) +// HashedPasswordHasSuffix applies the HasSuffix predicate on the "hashed_password" field. +func HashedPasswordHasSuffix(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldHasSuffix(FieldHashedPassword, v)) } -// EncryptedPasswordEqualFold applies the EqualFold predicate on the "encrypted_password" field. -func EncryptedPasswordEqualFold(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldEqualFold(FieldEncryptedPassword, v)) +// HashedPasswordEqualFold applies the EqualFold predicate on the "hashed_password" field. +func HashedPasswordEqualFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldEqualFold(FieldHashedPassword, v)) } -// EncryptedPasswordContainsFold applies the ContainsFold predicate on the "encrypted_password" field. -func EncryptedPasswordContainsFold(v string) predicate.Nursery { - return predicate.Nursery(sql.FieldContainsFold(FieldEncryptedPassword, v)) +// HashedPasswordContainsFold applies the ContainsFold predicate on the "hashed_password" field. +func HashedPasswordContainsFold(v string) predicate.Nursery { + return predicate.Nursery(sql.FieldContainsFold(FieldHashedPassword, v)) } // NameEQ applies the EQ predicate on the "name" field. diff --git a/backend/domain/repository/ent/nursery_create.go b/backend/domain/repository/ent/nursery_create.go index 70e57e1c..04be10a9 100644 --- a/backend/domain/repository/ent/nursery_create.go +++ b/backend/domain/repository/ent/nursery_create.go @@ -30,23 +30,15 @@ func (nc *NurseryCreate) SetNurseryCode(s string) *NurseryCreate { return nc } -// SetNillableNurseryCode sets the "nursery_code" field if the given value is not nil. -func (nc *NurseryCreate) SetNillableNurseryCode(s *string) *NurseryCreate { - if s != nil { - nc.SetNurseryCode(*s) - } - return nc -} - // SetEmail sets the "email" field. func (nc *NurseryCreate) SetEmail(s string) *NurseryCreate { nc.mutation.SetEmail(s) return nc } -// SetEncryptedPassword sets the "encrypted_password" field. -func (nc *NurseryCreate) SetEncryptedPassword(s string) *NurseryCreate { - nc.mutation.SetEncryptedPassword(s) +// SetHashedPassword sets the "hashed_password" field. +func (nc *NurseryCreate) SetHashedPassword(s string) *NurseryCreate { + nc.mutation.SetHashedPassword(s) return nc } @@ -206,10 +198,6 @@ func (nc *NurseryCreate) ExecX(ctx context.Context) { // defaults sets the default values of the builder before save. func (nc *NurseryCreate) defaults() { - if _, ok := nc.mutation.NurseryCode(); !ok { - v := nursery.DefaultNurseryCode() - nc.mutation.SetNurseryCode(v) - } if _, ok := nc.mutation.CreatedAt(); !ok { v := nursery.DefaultCreatedAt() nc.mutation.SetCreatedAt(v) @@ -232,8 +220,8 @@ func (nc *NurseryCreate) check() error { if _, ok := nc.mutation.Email(); !ok { return &ValidationError{Name: "email", err: errors.New(`ent: missing required field "Nursery.email"`)} } - if _, ok := nc.mutation.EncryptedPassword(); !ok { - return &ValidationError{Name: "encrypted_password", err: errors.New(`ent: missing required field "Nursery.encrypted_password"`)} + if _, ok := nc.mutation.HashedPassword(); !ok { + return &ValidationError{Name: "hashed_password", err: errors.New(`ent: missing required field "Nursery.hashed_password"`)} } if _, ok := nc.mutation.Name(); !ok { return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Nursery.name"`)} @@ -287,9 +275,9 @@ func (nc *NurseryCreate) createSpec() (*Nursery, *sqlgraph.CreateSpec) { _spec.SetField(nursery.FieldEmail, field.TypeString, value) _node.Email = value } - if value, ok := nc.mutation.EncryptedPassword(); ok { - _spec.SetField(nursery.FieldEncryptedPassword, field.TypeString, value) - _node.EncryptedPassword = value + if value, ok := nc.mutation.HashedPassword(); ok { + _spec.SetField(nursery.FieldHashedPassword, field.TypeString, value) + _node.HashedPassword = value } if value, ok := nc.mutation.Name(); ok { _spec.SetField(nursery.FieldName, field.TypeString, value) diff --git a/backend/domain/repository/ent/nursery_update.go b/backend/domain/repository/ent/nursery_update.go index 1a794203..c1186087 100644 --- a/backend/domain/repository/ent/nursery_update.go +++ b/backend/domain/repository/ent/nursery_update.go @@ -60,16 +60,16 @@ func (nu *NurseryUpdate) SetNillableEmail(s *string) *NurseryUpdate { return nu } -// SetEncryptedPassword sets the "encrypted_password" field. -func (nu *NurseryUpdate) SetEncryptedPassword(s string) *NurseryUpdate { - nu.mutation.SetEncryptedPassword(s) +// SetHashedPassword sets the "hashed_password" field. +func (nu *NurseryUpdate) SetHashedPassword(s string) *NurseryUpdate { + nu.mutation.SetHashedPassword(s) return nu } -// SetNillableEncryptedPassword sets the "encrypted_password" field if the given value is not nil. -func (nu *NurseryUpdate) SetNillableEncryptedPassword(s *string) *NurseryUpdate { +// SetNillableHashedPassword sets the "hashed_password" field if the given value is not nil. +func (nu *NurseryUpdate) SetNillableHashedPassword(s *string) *NurseryUpdate { if s != nil { - nu.SetEncryptedPassword(*s) + nu.SetHashedPassword(*s) } return nu } @@ -312,8 +312,8 @@ func (nu *NurseryUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := nu.mutation.Email(); ok { _spec.SetField(nursery.FieldEmail, field.TypeString, value) } - if value, ok := nu.mutation.EncryptedPassword(); ok { - _spec.SetField(nursery.FieldEncryptedPassword, field.TypeString, value) + if value, ok := nu.mutation.HashedPassword(); ok { + _spec.SetField(nursery.FieldHashedPassword, field.TypeString, value) } if value, ok := nu.mutation.Name(); ok { _spec.SetField(nursery.FieldName, field.TypeString, value) @@ -519,16 +519,16 @@ func (nuo *NurseryUpdateOne) SetNillableEmail(s *string) *NurseryUpdateOne { return nuo } -// SetEncryptedPassword sets the "encrypted_password" field. -func (nuo *NurseryUpdateOne) SetEncryptedPassword(s string) *NurseryUpdateOne { - nuo.mutation.SetEncryptedPassword(s) +// SetHashedPassword sets the "hashed_password" field. +func (nuo *NurseryUpdateOne) SetHashedPassword(s string) *NurseryUpdateOne { + nuo.mutation.SetHashedPassword(s) return nuo } -// SetNillableEncryptedPassword sets the "encrypted_password" field if the given value is not nil. -func (nuo *NurseryUpdateOne) SetNillableEncryptedPassword(s *string) *NurseryUpdateOne { +// SetNillableHashedPassword sets the "hashed_password" field if the given value is not nil. +func (nuo *NurseryUpdateOne) SetNillableHashedPassword(s *string) *NurseryUpdateOne { if s != nil { - nuo.SetEncryptedPassword(*s) + nuo.SetHashedPassword(*s) } return nuo } @@ -801,8 +801,8 @@ func (nuo *NurseryUpdateOne) sqlSave(ctx context.Context) (_node *Nursery, err e if value, ok := nuo.mutation.Email(); ok { _spec.SetField(nursery.FieldEmail, field.TypeString, value) } - if value, ok := nuo.mutation.EncryptedPassword(); ok { - _spec.SetField(nursery.FieldEncryptedPassword, field.TypeString, value) + if value, ok := nuo.mutation.HashedPassword(); ok { + _spec.SetField(nursery.FieldHashedPassword, field.TypeString, value) } if value, ok := nuo.mutation.Name(); ok { _spec.SetField(nursery.FieldName, field.TypeString, value) diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index a4a4a3e2..45c84e97 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -128,10 +128,6 @@ func init() { guardian.DefaultID = guardianDescID.Default.(func() uuid.UUID) nurseryFields := schema.Nursery{}.Fields() _ = nurseryFields - // nurseryDescNurseryCode is the schema descriptor for nursery_code field. - nurseryDescNurseryCode := nurseryFields[1].Descriptor() - // nursery.DefaultNurseryCode holds the default value on creation for the nursery_code field. - nursery.DefaultNurseryCode = nurseryDescNurseryCode.Default.(func() string) // nurseryDescCreatedAt is the schema descriptor for created_at field. nurseryDescCreatedAt := nurseryFields[7].Descriptor() // nursery.DefaultCreatedAt holds the default value on creation for the created_at field. diff --git a/backend/domain/repository/ent/schema/guardian.go b/backend/domain/repository/ent/schema/guardian.go index 6d8339f7..ce67934d 100644 --- a/backend/domain/repository/ent/schema/guardian.go +++ b/backend/domain/repository/ent/schema/guardian.go @@ -19,7 +19,7 @@ func (Guardian) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), field.String("email"), - field.String("encrypted_password"), + field.String("hashed_password"), field.String("name"), field.String("phone_number").Optional(), field.Time("created_at").Default(time.Now), diff --git a/backend/domain/repository/ent/schema/nursery.go b/backend/domain/repository/ent/schema/nursery.go index 0b8ecdd7..c01eb375 100644 --- a/backend/domain/repository/ent/schema/nursery.go +++ b/backend/domain/repository/ent/schema/nursery.go @@ -2,7 +2,6 @@ package schema import ( "math/rand" - "strconv" "time" "entgo.io/ent" @@ -25,11 +24,9 @@ func init() { func (Nursery) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), - field.String("nursery_code").DefaultFunc(func() string { - return strconv.Itoa(rand.Intn(90000) + 10000) - }).Unique().Comment("ユニークな数字(文字列)のコード"), //!: ユニークじゃないコードが生成される可能性がある + field.String("nursery_code").Unique().Comment("ユニークな数字(文字列)のコード"), field.String("email"), - field.String("encrypted_password"), + field.String("hashed_password"), field.String("name"), field.String("address").Optional(), field.String("phone_number").Optional(), From ee0371881e97a7d12d8ea41036cf89482c02947a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 14:22:00 +0900 Subject: [PATCH 163/771] =?UTF-8?q?chore:EncryptedPassword=E3=82=92HashedP?= =?UTF-8?q?assword=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/guardian/guardian.go | 2 +- backend/usecases/nursery/nursery.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 2f27bfa5..7a60bae3 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -41,7 +41,7 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq // Guardianを取得 guardian, err := tx.Guardian.Query(). Where(guardianRepo.Email(req.Email)). - Where(guardianRepo.EncryptedPassword(string(hashedPassword))). + Where(guardianRepo.HashedPassword(string(hashedPassword))). Only(ctx) if err != nil { diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index 88c5a80d..0ef68fb2 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -41,7 +41,7 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque //Nurseryを取得 nursery, err := tx.Nursery.Query(). Where(nurseryRepo.Email(req.Email)). - Where(nurseryRepo.EncryptedPassword(string(hashedPassword))). + Where(nurseryRepo.HashedPassword(string(hashedPassword))). Only(ctx) if err != nil { From 9263e1951ce92ed62908bd9d511f33c7c5072daf Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 14:45:42 +0900 Subject: [PATCH 164/771] =?UTF-8?q?chore:util/api=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/util/{ => api}/health_check.dart | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/where_child_bus/lib/util/{ => api}/health_check.dart (100%) diff --git a/frontend/where_child_bus/lib/util/health_check.dart b/frontend/where_child_bus/lib/util/api/health_check.dart similarity index 100% rename from frontend/where_child_bus/lib/util/health_check.dart rename to frontend/where_child_bus/lib/util/api/health_check.dart From cbf51c613a057f15012cb9bb3afbfd42c9631733 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 14:47:36 +0900 Subject: [PATCH 165/771] =?UTF-8?q?chore:AndoroidManifest=E3=81=AB?= =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/android/app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml b/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml index 6cdac4fd..c9179e65 100644 --- a/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml +++ b/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ + Date: Mon, 12 Feb 2024 14:51:26 +0900 Subject: [PATCH 166/771] =?UTF-8?q?feat(proto):=20=E5=AD=90=E4=BE=9B?= =?UTF-8?q?=E3=83=BB=E3=83=90=E3=82=B9=E3=81=AE=E6=96=B0=E8=A6=8F=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9=E3=82=92=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 285 ++++++++--- .../go/where_child_bus/v1/bus_grpc.pb.go | 37 ++ .../go/where_child_bus/v1/child.pb.go | 348 ++++++++++---- .../go/where_child_bus/v1/child_grpc.pb.go | 37 ++ .../go/where_child_bus/v1/child_photo.pb.go | 242 ++++++++++ .../where_child_bus/v1/child_photo_grpc.pb.go | 107 +++++ .../go/where_child_bus/v1/resources.pb.go | 444 +++++++++--------- backend/proto/where_child_bus/v1/bus.proto | 13 + backend/proto/where_child_bus/v1/child.proto | 13 + .../where_child_bus/v1/child_photo.proto | 16 + .../proto/where_child_bus/v1/resources.proto | 37 +- .../proto-gen/where_child_bus/v1/bus.pb.dart | 149 ++++++ .../where_child_bus/v1/bus.pbjson.dart | 48 +- .../where_child_bus/v1/bus.pbserver.dart | 3 + .../where_child_bus/v1/child.pb.dart | 156 ++++++ .../where_child_bus/v1/child.pbjson.dart | 52 +- .../where_child_bus/v1/child.pbserver.dart | 3 + .../where_child_bus/v1/child_photo.pb.dart | 124 +++++ .../v1/child_photo.pbenum.dart | 11 + .../v1/child_photo.pbjson.dart | 60 +++ .../v1/child_photo.pbserver.dart | 43 ++ .../where_child_bus/v1/guardian.pbserver.dart | 8 +- .../v1/health_check.pbserver.dart | 8 +- .../where_child_bus/v1/nursery.pbserver.dart | 8 +- .../where_child_bus/v1/resources.pb.dart | 24 +- .../where_child_bus/v1/resources.pbenum.dart | 52 +- .../where_child_bus/v1/resources.pbjson.dart | 127 ++--- .../proto-gen/where_child_bus/v1/bus_pb2.py | 18 +- .../where_child_bus/v1/bus_pb2_grpc.py | 33 ++ .../proto-gen/where_child_bus/v1/child_pb2.py | 26 +- .../where_child_bus/v1/child_pb2_grpc.py | 33 ++ .../where_child_bus/v1/child_photo_pb2.py | 31 ++ .../v1/child_photo_pb2_grpc.py | 66 +++ .../where_child_bus/v1/resources_pb2.py | 40 +- 34 files changed, 2163 insertions(+), 539 deletions(-) create mode 100644 backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go create mode 100644 backend/proto/where_child_bus/v1/child_photo.proto create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index db573664..9fb0a92a 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -20,6 +20,132 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type CreateBusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + PlateNumber string `protobuf:"bytes,3,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` + ChildIds []string `protobuf:"bytes,4,rep,name=child_ids,json=childIds,proto3" json:"child_ids,omitempty"` +} + +func (x *CreateBusRequest) Reset() { + *x = CreateBusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateBusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBusRequest) ProtoMessage() {} + +func (x *CreateBusRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBusRequest.ProtoReflect.Descriptor instead. +func (*CreateBusRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateBusRequest) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *CreateBusRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateBusRequest) GetPlateNumber() string { + if x != nil { + return x.PlateNumber + } + return "" +} + +func (x *CreateBusRequest) GetChildIds() []string { + if x != nil { + return x.ChildIds + } + return nil +} + +type CreateBusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bus *Bus `protobuf:"bytes,1,opt,name=bus,proto3" json:"bus,omitempty"` + Children []*Child `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *CreateBusResponse) Reset() { + *x = CreateBusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateBusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBusResponse) ProtoMessage() {} + +func (x *CreateBusResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBusResponse.ProtoReflect.Descriptor instead. +func (*CreateBusResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateBusResponse) GetBus() *Bus { + if x != nil { + return x.Bus + } + return nil +} + +func (x *CreateBusResponse) GetChildren() []*Child { + if x != nil { + return x.Children + } + return nil +} + type GetBusListByNurseryIdRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -31,7 +157,7 @@ type GetBusListByNurseryIdRequest struct { func (x *GetBusListByNurseryIdRequest) Reset() { *x = GetBusListByNurseryIdRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[0] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +170,7 @@ func (x *GetBusListByNurseryIdRequest) String() string { func (*GetBusListByNurseryIdRequest) ProtoMessage() {} func (x *GetBusListByNurseryIdRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[0] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +183,7 @@ func (x *GetBusListByNurseryIdRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBusListByNurseryIdRequest.ProtoReflect.Descriptor instead. func (*GetBusListByNurseryIdRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{0} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{2} } func (x *GetBusListByNurseryIdRequest) GetNurseryId() string { @@ -78,7 +204,7 @@ type GetBusListByNurseryIdResponse struct { func (x *GetBusListByNurseryIdResponse) Reset() { *x = GetBusListByNurseryIdResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[1] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -91,7 +217,7 @@ func (x *GetBusListByNurseryIdResponse) String() string { func (*GetBusListByNurseryIdResponse) ProtoMessage() {} func (x *GetBusListByNurseryIdResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[1] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104,7 +230,7 @@ func (x *GetBusListByNurseryIdResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBusListByNurseryIdResponse.ProtoReflect.Descriptor instead. func (*GetBusListByNurseryIdResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{1} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{3} } func (x *GetBusListByNurseryIdResponse) GetBuses() []*Bus { @@ -122,40 +248,62 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0x75, + 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x12, 0x35, + 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x65, 0x73, 0x32, 0x8a, 0x01, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, - 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, + 0x75, 0x73, 0x65, 0x73, 0x32, 0xe4, 0x01, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, + 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xeb, 0x01, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, + 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, + 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, + 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -170,21 +318,28 @@ func file_where_child_bus_v1_bus_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_bus_proto_rawDescData } -var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ - (*GetBusListByNurseryIdRequest)(nil), // 0: where_child_bus.v1.GetBusListByNurseryIdRequest - (*GetBusListByNurseryIdResponse)(nil), // 1: where_child_bus.v1.GetBusListByNurseryIdResponse - (*Bus)(nil), // 2: where_child_bus.v1.Bus + (*CreateBusRequest)(nil), // 0: where_child_bus.v1.CreateBusRequest + (*CreateBusResponse)(nil), // 1: where_child_bus.v1.CreateBusResponse + (*GetBusListByNurseryIdRequest)(nil), // 2: where_child_bus.v1.GetBusListByNurseryIdRequest + (*GetBusListByNurseryIdResponse)(nil), // 3: where_child_bus.v1.GetBusListByNurseryIdResponse + (*Bus)(nil), // 4: where_child_bus.v1.Bus + (*Child)(nil), // 5: where_child_bus.v1.Child } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ - 2, // 0: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus - 0, // 1: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 1, // 2: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 4, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus + 5, // 1: where_child_bus.v1.CreateBusResponse.children:type_name -> where_child_bus.v1.Child + 4, // 2: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus + 0, // 3: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 4: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 1, // 5: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 6: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 5, // [5:7] is the sub-list for method output_type + 3, // [3:5] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } @@ -195,7 +350,7 @@ func file_where_child_bus_v1_bus_proto_init() { file_where_child_bus_v1_resources_proto_init() if !protoimpl.UnsafeEnabled { file_where_child_bus_v1_bus_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBusListByNurseryIdRequest); i { + switch v := v.(*CreateBusRequest); i { case 0: return &v.state case 1: @@ -207,6 +362,30 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateBusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBusListByNurseryIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBusListByNurseryIdResponse); i { case 0: return &v.state @@ -225,7 +404,7 @@ func file_where_child_bus_v1_bus_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_bus_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go index ba3a04b2..07e4ddf9 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go @@ -19,6 +19,7 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( + BusService_CreateBus_FullMethodName = "/where_child_bus.v1.BusService/CreateBus" BusService_GetBusListByNurseryId_FullMethodName = "/where_child_bus.v1.BusService/GetBusListByNurseryId" ) @@ -26,6 +27,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type BusServiceClient interface { + CreateBus(ctx context.Context, in *CreateBusRequest, opts ...grpc.CallOption) (*CreateBusResponse, error) GetBusListByNurseryId(ctx context.Context, in *GetBusListByNurseryIdRequest, opts ...grpc.CallOption) (*GetBusListByNurseryIdResponse, error) } @@ -37,6 +39,15 @@ func NewBusServiceClient(cc grpc.ClientConnInterface) BusServiceClient { return &busServiceClient{cc} } +func (c *busServiceClient) CreateBus(ctx context.Context, in *CreateBusRequest, opts ...grpc.CallOption) (*CreateBusResponse, error) { + out := new(CreateBusResponse) + err := c.cc.Invoke(ctx, BusService_CreateBus_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *busServiceClient) GetBusListByNurseryId(ctx context.Context, in *GetBusListByNurseryIdRequest, opts ...grpc.CallOption) (*GetBusListByNurseryIdResponse, error) { out := new(GetBusListByNurseryIdResponse) err := c.cc.Invoke(ctx, BusService_GetBusListByNurseryId_FullMethodName, in, out, opts...) @@ -50,6 +61,7 @@ func (c *busServiceClient) GetBusListByNurseryId(ctx context.Context, in *GetBus // All implementations should embed UnimplementedBusServiceServer // for forward compatibility type BusServiceServer interface { + CreateBus(context.Context, *CreateBusRequest) (*CreateBusResponse, error) GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) } @@ -57,6 +69,9 @@ type BusServiceServer interface { type UnimplementedBusServiceServer struct { } +func (UnimplementedBusServiceServer) CreateBus(context.Context, *CreateBusRequest) (*CreateBusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBus not implemented") +} func (UnimplementedBusServiceServer) GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBusListByNurseryId not implemented") } @@ -72,6 +87,24 @@ func RegisterBusServiceServer(s grpc.ServiceRegistrar, srv BusServiceServer) { s.RegisterService(&BusService_ServiceDesc, srv) } +func _BusService_CreateBus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BusServiceServer).CreateBus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BusService_CreateBus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BusServiceServer).CreateBus(ctx, req.(*CreateBusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _BusService_GetBusListByNurseryId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetBusListByNurseryIdRequest) if err := dec(in); err != nil { @@ -97,6 +130,10 @@ var BusService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "where_child_bus.v1.BusService", HandlerType: (*BusServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "CreateBus", + Handler: _BusService_CreateBus_Handler, + }, { MethodName: "GetBusListByNurseryId", Handler: _BusService_GetBusListByNurseryId_Handler, diff --git a/backend/proto-gen/go/where_child_bus/v1/child.pb.go b/backend/proto-gen/go/where_child_bus/v1/child.pb.go index 5d5638d6..7199f16c 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child.pb.go @@ -20,6 +20,132 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type CreateChildRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + GuardianId string `protobuf:"bytes,2,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Sex Sex `protobuf:"varint,4,opt,name=sex,proto3,enum=where_child_bus.v1.Sex" json:"sex,omitempty"` + Photos [][]byte `protobuf:"bytes,5,rep,name=photos,proto3" json:"photos,omitempty"` +} + +func (x *CreateChildRequest) Reset() { + *x = CreateChildRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateChildRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateChildRequest) ProtoMessage() {} + +func (x *CreateChildRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateChildRequest.ProtoReflect.Descriptor instead. +func (*CreateChildRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateChildRequest) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *CreateChildRequest) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +func (x *CreateChildRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateChildRequest) GetSex() Sex { + if x != nil { + return x.Sex + } + return Sex_SEX_UNSPECIFIED +} + +func (x *CreateChildRequest) GetPhotos() [][]byte { + if x != nil { + return x.Photos + } + return nil +} + +type CreateChildResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Child *Child `protobuf:"bytes,1,opt,name=child,proto3" json:"child,omitempty"` +} + +func (x *CreateChildResponse) Reset() { + *x = CreateChildResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateChildResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateChildResponse) ProtoMessage() {} + +func (x *CreateChildResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateChildResponse.ProtoReflect.Descriptor instead. +func (*CreateChildResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateChildResponse) GetChild() *Child { + if x != nil { + return x.Child + } + return nil +} + type GetChildListByNurseryIDRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -31,7 +157,7 @@ type GetChildListByNurseryIDRequest struct { func (x *GetChildListByNurseryIDRequest) Reset() { *x = GetChildListByNurseryIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_child_proto_msgTypes[0] + mi := &file_where_child_bus_v1_child_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +170,7 @@ func (x *GetChildListByNurseryIDRequest) String() string { func (*GetChildListByNurseryIDRequest) ProtoMessage() {} func (x *GetChildListByNurseryIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_child_proto_msgTypes[0] + mi := &file_where_child_bus_v1_child_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +183,7 @@ func (x *GetChildListByNurseryIDRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetChildListByNurseryIDRequest.ProtoReflect.Descriptor instead. func (*GetChildListByNurseryIDRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{0} + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{2} } func (x *GetChildListByNurseryIDRequest) GetNurseryId() string { @@ -78,7 +204,7 @@ type GetChildListByNurseryIDResponse struct { func (x *GetChildListByNurseryIDResponse) Reset() { *x = GetChildListByNurseryIDResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_child_proto_msgTypes[1] + mi := &file_where_child_bus_v1_child_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -91,7 +217,7 @@ func (x *GetChildListByNurseryIDResponse) String() string { func (*GetChildListByNurseryIDResponse) ProtoMessage() {} func (x *GetChildListByNurseryIDResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_child_proto_msgTypes[1] + mi := &file_where_child_bus_v1_child_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104,7 +230,7 @@ func (x *GetChildListByNurseryIDResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetChildListByNurseryIDResponse.ProtoReflect.Descriptor instead. func (*GetChildListByNurseryIDResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{1} + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{3} } func (x *GetChildListByNurseryIDResponse) GetChildren() []*Child { @@ -125,7 +251,7 @@ type GetChildListByGuardianIDRequest struct { func (x *GetChildListByGuardianIDRequest) Reset() { *x = GetChildListByGuardianIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_child_proto_msgTypes[2] + mi := &file_where_child_bus_v1_child_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -138,7 +264,7 @@ func (x *GetChildListByGuardianIDRequest) String() string { func (*GetChildListByGuardianIDRequest) ProtoMessage() {} func (x *GetChildListByGuardianIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_child_proto_msgTypes[2] + mi := &file_where_child_bus_v1_child_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -151,7 +277,7 @@ func (x *GetChildListByGuardianIDRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetChildListByGuardianIDRequest.ProtoReflect.Descriptor instead. func (*GetChildListByGuardianIDRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{2} + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{4} } func (x *GetChildListByGuardianIDRequest) GetGuardianId() string { @@ -172,7 +298,7 @@ type GetChildListByGuardianIDResponse struct { func (x *GetChildListByGuardianIDResponse) Reset() { *x = GetChildListByGuardianIDResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_child_proto_msgTypes[3] + mi := &file_where_child_bus_v1_child_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -185,7 +311,7 @@ func (x *GetChildListByGuardianIDResponse) String() string { func (*GetChildListByGuardianIDResponse) ProtoMessage() {} func (x *GetChildListByGuardianIDResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_child_proto_msgTypes[3] + mi := &file_where_child_bus_v1_child_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -198,7 +324,7 @@ func (x *GetChildListByGuardianIDResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetChildListByGuardianIDResponse.ProtoReflect.Descriptor instead. func (*GetChildListByGuardianIDResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{3} + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{5} } func (x *GetChildListByGuardianIDResponse) GetChildren() []*Child { @@ -216,60 +342,81 @@ var file_where_child_bus_v1_child_proto_rawDesc = []byte{ 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x1f, 0x47, 0x65, 0x74, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x72, 0x65, 0x6e, 0x22, 0x42, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x59, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, - 0x65, 0x6e, 0x32, 0x9b, 0x02, 0x0a, 0x0c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, - 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, + 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x46, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, + 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, 0x3f, + 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, + 0x58, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x42, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x59, 0x0a, + 0x20, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x32, 0xfb, 0x02, 0x0a, 0x0c, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, + 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, + 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -284,26 +431,33 @@ func file_where_child_bus_v1_child_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_child_proto_rawDescData } -var file_where_child_bus_v1_child_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_where_child_bus_v1_child_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ - (*GetChildListByNurseryIDRequest)(nil), // 0: where_child_bus.v1.GetChildListByNurseryIDRequest - (*GetChildListByNurseryIDResponse)(nil), // 1: where_child_bus.v1.GetChildListByNurseryIDResponse - (*GetChildListByGuardianIDRequest)(nil), // 2: where_child_bus.v1.GetChildListByGuardianIDRequest - (*GetChildListByGuardianIDResponse)(nil), // 3: where_child_bus.v1.GetChildListByGuardianIDResponse - (*Child)(nil), // 4: where_child_bus.v1.Child + (*CreateChildRequest)(nil), // 0: where_child_bus.v1.CreateChildRequest + (*CreateChildResponse)(nil), // 1: where_child_bus.v1.CreateChildResponse + (*GetChildListByNurseryIDRequest)(nil), // 2: where_child_bus.v1.GetChildListByNurseryIDRequest + (*GetChildListByNurseryIDResponse)(nil), // 3: where_child_bus.v1.GetChildListByNurseryIDResponse + (*GetChildListByGuardianIDRequest)(nil), // 4: where_child_bus.v1.GetChildListByGuardianIDRequest + (*GetChildListByGuardianIDResponse)(nil), // 5: where_child_bus.v1.GetChildListByGuardianIDResponse + (Sex)(0), // 6: where_child_bus.v1.Sex + (*Child)(nil), // 7: where_child_bus.v1.Child } var file_where_child_bus_v1_child_proto_depIdxs = []int32{ - 4, // 0: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child - 4, // 1: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child - 0, // 2: where_child_bus.v1.ChildService.GetChildListByNurseryID:input_type -> where_child_bus.v1.GetChildListByNurseryIDRequest - 2, // 3: where_child_bus.v1.ChildService.GetChildListByGuardianID:input_type -> where_child_bus.v1.GetChildListByGuardianIDRequest - 1, // 4: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse - 3, // 5: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 6, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex + 7, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child + 7, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child + 7, // 3: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child + 0, // 4: where_child_bus.v1.ChildService.CreateChild:input_type -> where_child_bus.v1.CreateChildRequest + 2, // 5: where_child_bus.v1.ChildService.GetChildListByNurseryID:input_type -> where_child_bus.v1.GetChildListByNurseryIDRequest + 4, // 6: where_child_bus.v1.ChildService.GetChildListByGuardianID:input_type -> where_child_bus.v1.GetChildListByGuardianIDRequest + 1, // 7: where_child_bus.v1.ChildService.CreateChild:output_type -> where_child_bus.v1.CreateChildResponse + 3, // 8: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse + 5, // 9: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_where_child_bus_v1_child_proto_init() } @@ -314,7 +468,7 @@ func file_where_child_bus_v1_child_proto_init() { file_where_child_bus_v1_resources_proto_init() if !protoimpl.UnsafeEnabled { file_where_child_bus_v1_child_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChildListByNurseryIDRequest); i { + switch v := v.(*CreateChildRequest); i { case 0: return &v.state case 1: @@ -326,7 +480,7 @@ func file_where_child_bus_v1_child_proto_init() { } } file_where_child_bus_v1_child_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChildListByNurseryIDResponse); i { + switch v := v.(*CreateChildResponse); i { case 0: return &v.state case 1: @@ -338,7 +492,7 @@ func file_where_child_bus_v1_child_proto_init() { } } file_where_child_bus_v1_child_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetChildListByGuardianIDRequest); i { + switch v := v.(*GetChildListByNurseryIDRequest); i { case 0: return &v.state case 1: @@ -350,6 +504,30 @@ func file_where_child_bus_v1_child_proto_init() { } } file_where_child_bus_v1_child_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChildListByNurseryIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChildListByGuardianIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetChildListByGuardianIDResponse); i { case 0: return &v.state @@ -368,7 +546,7 @@ func file_where_child_bus_v1_child_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_child_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go index a9a6a66b..d16ff79b 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go @@ -19,6 +19,7 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( + ChildService_CreateChild_FullMethodName = "/where_child_bus.v1.ChildService/CreateChild" ChildService_GetChildListByNurseryID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByNurseryID" ChildService_GetChildListByGuardianID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByGuardianID" ) @@ -27,6 +28,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ChildServiceClient interface { + CreateChild(ctx context.Context, in *CreateChildRequest, opts ...grpc.CallOption) (*CreateChildResponse, error) GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (*GetChildListByNurseryIDResponse, error) GetChildListByGuardianID(ctx context.Context, in *GetChildListByGuardianIDRequest, opts ...grpc.CallOption) (*GetChildListByGuardianIDResponse, error) } @@ -39,6 +41,15 @@ func NewChildServiceClient(cc grpc.ClientConnInterface) ChildServiceClient { return &childServiceClient{cc} } +func (c *childServiceClient) CreateChild(ctx context.Context, in *CreateChildRequest, opts ...grpc.CallOption) (*CreateChildResponse, error) { + out := new(CreateChildResponse) + err := c.cc.Invoke(ctx, ChildService_CreateChild_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *childServiceClient) GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (*GetChildListByNurseryIDResponse, error) { out := new(GetChildListByNurseryIDResponse) err := c.cc.Invoke(ctx, ChildService_GetChildListByNurseryID_FullMethodName, in, out, opts...) @@ -61,6 +72,7 @@ func (c *childServiceClient) GetChildListByGuardianID(ctx context.Context, in *G // All implementations should embed UnimplementedChildServiceServer // for forward compatibility type ChildServiceServer interface { + CreateChild(context.Context, *CreateChildRequest) (*CreateChildResponse, error) GetChildListByNurseryID(context.Context, *GetChildListByNurseryIDRequest) (*GetChildListByNurseryIDResponse, error) GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) } @@ -69,6 +81,9 @@ type ChildServiceServer interface { type UnimplementedChildServiceServer struct { } +func (UnimplementedChildServiceServer) CreateChild(context.Context, *CreateChildRequest) (*CreateChildResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateChild not implemented") +} func (UnimplementedChildServiceServer) GetChildListByNurseryID(context.Context, *GetChildListByNurseryIDRequest) (*GetChildListByNurseryIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChildListByNurseryID not implemented") } @@ -87,6 +102,24 @@ func RegisterChildServiceServer(s grpc.ServiceRegistrar, srv ChildServiceServer) s.RegisterService(&ChildService_ServiceDesc, srv) } +func _ChildService_CreateChild_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateChildRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChildServiceServer).CreateChild(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChildService_CreateChild_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChildServiceServer).CreateChild(ctx, req.(*CreateChildRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ChildService_GetChildListByNurseryID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetChildListByNurseryIDRequest) if err := dec(in); err != nil { @@ -130,6 +163,10 @@ var ChildService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "where_child_bus.v1.ChildService", HandlerType: (*ChildServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "CreateChild", + Handler: _ChildService_CreateChild_Handler, + }, { MethodName: "GetChildListByNurseryID", Handler: _ChildService_GetChildListByNurseryID_Handler, diff --git a/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go new file mode 100644 index 00000000..73053a7f --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go @@ -0,0 +1,242 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/v1/child_photo.proto + +package where_child_busv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DeleteChildPhotoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` +} + +func (x *DeleteChildPhotoRequest) Reset() { + *x = DeleteChildPhotoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteChildPhotoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteChildPhotoRequest) ProtoMessage() {} + +func (x *DeleteChildPhotoRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteChildPhotoRequest.ProtoReflect.Descriptor instead. +func (*DeleteChildPhotoRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{0} +} + +func (x *DeleteChildPhotoRequest) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +type DeleteChildPhotoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsSuccessList []bool `protobuf:"varint,1,rep,packed,name=is_success_list,json=isSuccessList,proto3" json:"is_success_list,omitempty"` + Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` +} + +func (x *DeleteChildPhotoResponse) Reset() { + *x = DeleteChildPhotoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteChildPhotoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteChildPhotoResponse) ProtoMessage() {} + +func (x *DeleteChildPhotoResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteChildPhotoResponse.ProtoReflect.Descriptor instead. +func (*DeleteChildPhotoResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{1} +} + +func (x *DeleteChildPhotoResponse) GetIsSuccessList() []bool { + if x != nil { + return x.IsSuccessList + } + return nil +} + +func (x *DeleteChildPhotoResponse) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +var File_where_child_bus_v1_child_photo_proto protoreflect.FileDescriptor + +var file_where_child_bus_v1_child_photo_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x68, 0x6f, 0x74, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x2b, 0x0a, 0x17, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, + 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x32, 0x82, 0x01, + 0x0a, 0x11, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0xf2, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, + 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, + 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, + 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_v1_child_photo_proto_rawDescOnce sync.Once + file_where_child_bus_v1_child_photo_proto_rawDescData = file_where_child_bus_v1_child_photo_proto_rawDesc +) + +func file_where_child_bus_v1_child_photo_proto_rawDescGZIP() []byte { + file_where_child_bus_v1_child_photo_proto_rawDescOnce.Do(func() { + file_where_child_bus_v1_child_photo_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_v1_child_photo_proto_rawDescData) + }) + return file_where_child_bus_v1_child_photo_proto_rawDescData +} + +var file_where_child_bus_v1_child_photo_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_where_child_bus_v1_child_photo_proto_goTypes = []interface{}{ + (*DeleteChildPhotoRequest)(nil), // 0: where_child_bus.v1.DeleteChildPhotoRequest + (*DeleteChildPhotoResponse)(nil), // 1: where_child_bus.v1.DeleteChildPhotoResponse +} +var file_where_child_bus_v1_child_photo_proto_depIdxs = []int32{ + 0, // 0: where_child_bus.v1.ChildPhotoService.DeleteChildPhoto:input_type -> where_child_bus.v1.DeleteChildPhotoRequest + 1, // 1: where_child_bus.v1.ChildPhotoService.DeleteChildPhoto:output_type -> where_child_bus.v1.DeleteChildPhotoResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_where_child_bus_v1_child_photo_proto_init() } +func file_where_child_bus_v1_child_photo_proto_init() { + if File_where_child_bus_v1_child_photo_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_where_child_bus_v1_child_photo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteChildPhotoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_photo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteChildPhotoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_v1_child_photo_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_where_child_bus_v1_child_photo_proto_goTypes, + DependencyIndexes: file_where_child_bus_v1_child_photo_proto_depIdxs, + MessageInfos: file_where_child_bus_v1_child_photo_proto_msgTypes, + }.Build() + File_where_child_bus_v1_child_photo_proto = out.File + file_where_child_bus_v1_child_photo_proto_rawDesc = nil + file_where_child_bus_v1_child_photo_proto_goTypes = nil + file_where_child_bus_v1_child_photo_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go new file mode 100644 index 00000000..3a119427 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: where_child_bus/v1/child_photo.proto + +package where_child_busv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ChildPhotoService_DeleteChildPhoto_FullMethodName = "/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto" +) + +// ChildPhotoServiceClient is the client API for ChildPhotoService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ChildPhotoServiceClient interface { + DeleteChildPhoto(ctx context.Context, in *DeleteChildPhotoRequest, opts ...grpc.CallOption) (*DeleteChildPhotoResponse, error) +} + +type childPhotoServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewChildPhotoServiceClient(cc grpc.ClientConnInterface) ChildPhotoServiceClient { + return &childPhotoServiceClient{cc} +} + +func (c *childPhotoServiceClient) DeleteChildPhoto(ctx context.Context, in *DeleteChildPhotoRequest, opts ...grpc.CallOption) (*DeleteChildPhotoResponse, error) { + out := new(DeleteChildPhotoResponse) + err := c.cc.Invoke(ctx, ChildPhotoService_DeleteChildPhoto_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ChildPhotoServiceServer is the server API for ChildPhotoService service. +// All implementations should embed UnimplementedChildPhotoServiceServer +// for forward compatibility +type ChildPhotoServiceServer interface { + DeleteChildPhoto(context.Context, *DeleteChildPhotoRequest) (*DeleteChildPhotoResponse, error) +} + +// UnimplementedChildPhotoServiceServer should be embedded to have forward compatible implementations. +type UnimplementedChildPhotoServiceServer struct { +} + +func (UnimplementedChildPhotoServiceServer) DeleteChildPhoto(context.Context, *DeleteChildPhotoRequest) (*DeleteChildPhotoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteChildPhoto not implemented") +} + +// UnsafeChildPhotoServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ChildPhotoServiceServer will +// result in compilation errors. +type UnsafeChildPhotoServiceServer interface { + mustEmbedUnimplementedChildPhotoServiceServer() +} + +func RegisterChildPhotoServiceServer(s grpc.ServiceRegistrar, srv ChildPhotoServiceServer) { + s.RegisterService(&ChildPhotoService_ServiceDesc, srv) +} + +func _ChildPhotoService_DeleteChildPhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteChildPhotoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChildPhotoServiceServer).DeleteChildPhoto(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChildPhotoService_DeleteChildPhoto_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChildPhotoServiceServer).DeleteChildPhoto(ctx, req.(*DeleteChildPhotoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ChildPhotoService_ServiceDesc is the grpc.ServiceDesc for ChildPhotoService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ChildPhotoService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "where_child_bus.v1.ChildPhotoService", + HandlerType: (*ChildPhotoServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeleteChildPhoto", + Handler: _ChildPhotoService_DeleteChildPhoto_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "where_child_bus/v1/child_photo.proto", +} diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index d90ccd0e..5ca47e9a 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -21,24 +21,24 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type Bus_Status int32 +type Status int32 const ( - Bus_STATUS_UNSPECIFIED Bus_Status = 0 - Bus_STATUS_STOPPED Bus_Status = 1 - Bus_STATUS_RUNNING Bus_Status = 2 - Bus_STATUS_MAINTEINANCE Bus_Status = 3 + Status_STATUS_UNSPECIFIED Status = 0 + Status_STATUS_STOPPED Status = 1 + Status_STATUS_RUNNING Status = 2 + Status_STATUS_MAINTEINANCE Status = 3 ) -// Enum value maps for Bus_Status. +// Enum value maps for Status. var ( - Bus_Status_name = map[int32]string{ + Status_name = map[int32]string{ 0: "STATUS_UNSPECIFIED", 1: "STATUS_STOPPED", 2: "STATUS_RUNNING", 3: "STATUS_MAINTEINANCE", } - Bus_Status_value = map[string]int32{ + Status_value = map[string]int32{ "STATUS_UNSPECIFIED": 0, "STATUS_STOPPED": 1, "STATUS_RUNNING": 2, @@ -46,51 +46,51 @@ var ( } ) -func (x Bus_Status) Enum() *Bus_Status { - p := new(Bus_Status) +func (x Status) Enum() *Status { + p := new(Status) *p = x return p } -func (x Bus_Status) String() string { +func (x Status) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (Bus_Status) Descriptor() protoreflect.EnumDescriptor { +func (Status) Descriptor() protoreflect.EnumDescriptor { return file_where_child_bus_v1_resources_proto_enumTypes[0].Descriptor() } -func (Bus_Status) Type() protoreflect.EnumType { +func (Status) Type() protoreflect.EnumType { return &file_where_child_bus_v1_resources_proto_enumTypes[0] } -func (x Bus_Status) Number() protoreflect.EnumNumber { +func (x Status) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use Bus_Status.Descriptor instead. -func (Bus_Status) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{4, 0} +// Deprecated: Use Status.Descriptor instead. +func (Status) EnumDescriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{0} } -type Child_Sex int32 +type Sex int32 const ( - Child_SEX_UNSPECIFIED Child_Sex = 0 - Child_SEX_MAN Child_Sex = 1 - Child_SEX_WOMEN Child_Sex = 2 - Child_SEX_OTHER Child_Sex = 3 + Sex_SEX_UNSPECIFIED Sex = 0 + Sex_SEX_MAN Sex = 1 + Sex_SEX_WOMEN Sex = 2 + Sex_SEX_OTHER Sex = 3 ) -// Enum value maps for Child_Sex. +// Enum value maps for Sex. var ( - Child_Sex_name = map[int32]string{ + Sex_name = map[int32]string{ 0: "SEX_UNSPECIFIED", 1: "SEX_MAN", 2: "SEX_WOMEN", 3: "SEX_OTHER", } - Child_Sex_value = map[string]int32{ + Sex_value = map[string]int32{ "SEX_UNSPECIFIED": 0, "SEX_MAN": 1, "SEX_WOMEN": 2, @@ -98,80 +98,80 @@ var ( } ) -func (x Child_Sex) Enum() *Child_Sex { - p := new(Child_Sex) +func (x Sex) Enum() *Sex { + p := new(Sex) *p = x return p } -func (x Child_Sex) String() string { +func (x Sex) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (Child_Sex) Descriptor() protoreflect.EnumDescriptor { +func (Sex) Descriptor() protoreflect.EnumDescriptor { return file_where_child_bus_v1_resources_proto_enumTypes[1].Descriptor() } -func (Child_Sex) Type() protoreflect.EnumType { +func (Sex) Type() protoreflect.EnumType { return &file_where_child_bus_v1_resources_proto_enumTypes[1] } -func (x Child_Sex) Number() protoreflect.EnumNumber { +func (x Sex) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use Child_Sex.Descriptor instead. -func (Child_Sex) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{5, 0} +// Deprecated: Use Sex.Descriptor instead. +func (Sex) EnumDescriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{1} } -type ChildBusAssociation_BusType int32 +type BusType int32 const ( - ChildBusAssociation_BUS_TYPE_UNSPECIFIED ChildBusAssociation_BusType = 0 - ChildBusAssociation_BUS_TYPE_MORNING ChildBusAssociation_BusType = 1 - ChildBusAssociation_BUS_TYPE_EVENING ChildBusAssociation_BusType = 2 + BusType_BUS_TYPE_UNSPECIFIED BusType = 0 + BusType_BUS_TYPE_MORNING BusType = 1 + BusType_BUS_TYPE_EVENING BusType = 2 ) -// Enum value maps for ChildBusAssociation_BusType. +// Enum value maps for BusType. var ( - ChildBusAssociation_BusType_name = map[int32]string{ + BusType_name = map[int32]string{ 0: "BUS_TYPE_UNSPECIFIED", 1: "BUS_TYPE_MORNING", 2: "BUS_TYPE_EVENING", } - ChildBusAssociation_BusType_value = map[string]int32{ + BusType_value = map[string]int32{ "BUS_TYPE_UNSPECIFIED": 0, "BUS_TYPE_MORNING": 1, "BUS_TYPE_EVENING": 2, } ) -func (x ChildBusAssociation_BusType) Enum() *ChildBusAssociation_BusType { - p := new(ChildBusAssociation_BusType) +func (x BusType) Enum() *BusType { + p := new(BusType) *p = x return p } -func (x ChildBusAssociation_BusType) String() string { +func (x BusType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (ChildBusAssociation_BusType) Descriptor() protoreflect.EnumDescriptor { +func (BusType) Descriptor() protoreflect.EnumDescriptor { return file_where_child_bus_v1_resources_proto_enumTypes[2].Descriptor() } -func (ChildBusAssociation_BusType) Type() protoreflect.EnumType { +func (BusType) Type() protoreflect.EnumType { return &file_where_child_bus_v1_resources_proto_enumTypes[2] } -func (x ChildBusAssociation_BusType) Number() protoreflect.EnumNumber { +func (x BusType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use ChildBusAssociation_BusType.Descriptor instead. -func (ChildBusAssociation_BusType) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{7, 0} +// Deprecated: Use BusType.Descriptor instead. +func (BusType) EnumDescriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{2} } type Nursery struct { @@ -593,11 +593,11 @@ type Bus struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - PlateNumber string `protobuf:"bytes,4,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` - Status Bus_Status `protobuf:"varint,5,opt,name=status,proto3,enum=where_child_bus.v1.Bus_Status" json:"status,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + PlateNumber string `protobuf:"bytes,4,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` + Status Status `protobuf:"varint,5,opt,name=status,proto3,enum=where_child_bus.v1.Status" json:"status,omitempty"` // 緯度経度 Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` @@ -665,11 +665,11 @@ func (x *Bus) GetPlateNumber() string { return "" } -func (x *Bus) GetStatus() Bus_Status { +func (x *Bus) GetStatus() Status { if x != nil { return x.Status } - return Bus_STATUS_UNSPECIFIED + return Status_STATUS_UNSPECIFIED } func (x *Bus) GetLatitude() float64 { @@ -710,7 +710,7 @@ type Child struct { GuardianId string `protobuf:"bytes,3,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` Age int32 `protobuf:"varint,5,opt,name=age,proto3" json:"age,omitempty"` - Sex Child_Sex `protobuf:"varint,6,opt,name=sex,proto3,enum=where_child_bus.v1.Child_Sex" json:"sex,omitempty"` + Sex Sex `protobuf:"varint,6,opt,name=sex,proto3,enum=where_child_bus.v1.Sex" json:"sex,omitempty"` IsRideMorningBus bool `protobuf:"varint,7,opt,name=is_ride_morning_bus,json=isRideMorningBus,proto3" json:"is_ride_morning_bus,omitempty"` IsRideEveningBus bool `protobuf:"varint,8,opt,name=is_ride_evening_bus,json=isRideEveningBus,proto3" json:"is_ride_evening_bus,omitempty"` CheckForMissingItems bool `protobuf:"varint,9,opt,name=check_for_missing_items,json=checkForMissingItems,proto3" json:"check_for_missing_items,omitempty"` @@ -790,11 +790,11 @@ func (x *Child) GetAge() int32 { return 0 } -func (x *Child) GetSex() Child_Sex { +func (x *Child) GetSex() Sex { if x != nil { return x.Sex } - return Child_SEX_UNSPECIFIED + return Sex_SEX_UNSPECIFIED } func (x *Child) GetIsRideMorningBus() bool { @@ -975,10 +975,10 @@ type ChildBusAssociation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - ChildId string `protobuf:"bytes,3,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - BusType ChildBusAssociation_BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.ChildBusAssociation_BusType" json:"bus_type,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + ChildId string `protobuf:"bytes,3,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` + BusType BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` } func (x *ChildBusAssociation) Reset() { @@ -1034,11 +1034,11 @@ func (x *ChildBusAssociation) GetChildId() string { return "" } -func (x *ChildBusAssociation) GetBusType() ChildBusAssociation_BusType { +func (x *ChildBusAssociation) GetBusType() BusType { if x != nil { return x.BusType } - return ChildBusAssociation_BUS_TYPE_UNSPECIFIED + return BusType_BUS_TYPE_UNSPECIFIED } type BusStationAssociation struct { @@ -1344,158 +1344,156 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb6, 0x03, + 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xcf, 0x02, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x77, 0x68, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x22, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, - 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, 0x0a, - 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, 0x4e, - 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x22, 0xa5, 0x05, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x53, - 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x69, - 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, 0x6f, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x69, 0x64, - 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x69, - 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, - 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, - 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, - 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, - 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, - 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, - 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, - 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, - 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, - 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, - 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, - 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, - 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x45, 0x4e, 0x10, 0x02, 0x12, - 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x22, 0xb4, - 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, - 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, - 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, - 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, - 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xf4, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, - 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, - 0x4a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, - 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4f, 0x0a, 0x07, 0x42, - 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, - 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x4d, 0x0a, 0x15, - 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0a, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x33, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, + 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, + 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, - 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, - 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, - 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0xd8, 0x04, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, + 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, + 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, + 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, + 0x72, 0x69, 0x64, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, + 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, + 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, + 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, + 0x62, 0x72, 0x65, 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, + 0x55, 0x6d, 0x62, 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, + 0x74, 0x68, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, + 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, - 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, - 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb4, 0x02, 0x0a, 0x07, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, + 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, + 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, + 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, + 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, + 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x73, 0x33, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x73, 0x33, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, + 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, + 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, + 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, + 0x45, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, + 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x45, 0x4e, 0x10, + 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, + 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, + 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, + 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, + 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, + 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1513,21 +1511,21 @@ func file_where_child_bus_v1_resources_proto_rawDescGZIP() []byte { var file_where_child_bus_v1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_where_child_bus_v1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_where_child_bus_v1_resources_proto_goTypes = []interface{}{ - (Bus_Status)(0), // 0: where_child_bus.v1.Bus.Status - (Child_Sex)(0), // 1: where_child_bus.v1.Child.Sex - (ChildBusAssociation_BusType)(0), // 2: where_child_bus.v1.ChildBusAssociation.BusType - (*Nursery)(nil), // 3: where_child_bus.v1.Nursery - (*NurseryResponse)(nil), // 4: where_child_bus.v1.NurseryResponse - (*Guardian)(nil), // 5: where_child_bus.v1.Guardian - (*GuardianResponse)(nil), // 6: where_child_bus.v1.GuardianResponse - (*Bus)(nil), // 7: where_child_bus.v1.Bus - (*Child)(nil), // 8: where_child_bus.v1.Child - (*Station)(nil), // 9: where_child_bus.v1.Station - (*ChildBusAssociation)(nil), // 10: where_child_bus.v1.ChildBusAssociation - (*BusStationAssociation)(nil), // 11: where_child_bus.v1.BusStationAssociation - (*ChildPhoto)(nil), // 12: where_child_bus.v1.ChildPhoto - (*BoardingRecord)(nil), // 13: where_child_bus.v1.BoardingRecord - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + (Status)(0), // 0: where_child_bus.v1.Status + (Sex)(0), // 1: where_child_bus.v1.Sex + (BusType)(0), // 2: where_child_bus.v1.BusType + (*Nursery)(nil), // 3: where_child_bus.v1.Nursery + (*NurseryResponse)(nil), // 4: where_child_bus.v1.NurseryResponse + (*Guardian)(nil), // 5: where_child_bus.v1.Guardian + (*GuardianResponse)(nil), // 6: where_child_bus.v1.GuardianResponse + (*Bus)(nil), // 7: where_child_bus.v1.Bus + (*Child)(nil), // 8: where_child_bus.v1.Child + (*Station)(nil), // 9: where_child_bus.v1.Station + (*ChildBusAssociation)(nil), // 10: where_child_bus.v1.ChildBusAssociation + (*BusStationAssociation)(nil), // 11: where_child_bus.v1.BusStationAssociation + (*ChildPhoto)(nil), // 12: where_child_bus.v1.ChildPhoto + (*BoardingRecord)(nil), // 13: where_child_bus.v1.BoardingRecord + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp } var file_where_child_bus_v1_resources_proto_depIdxs = []int32{ 14, // 0: where_child_bus.v1.Nursery.created_at:type_name -> google.protobuf.Timestamp @@ -1538,15 +1536,15 @@ var file_where_child_bus_v1_resources_proto_depIdxs = []int32{ 14, // 5: where_child_bus.v1.Guardian.updated_at:type_name -> google.protobuf.Timestamp 14, // 6: where_child_bus.v1.GuardianResponse.created_at:type_name -> google.protobuf.Timestamp 14, // 7: where_child_bus.v1.GuardianResponse.updated_at:type_name -> google.protobuf.Timestamp - 0, // 8: where_child_bus.v1.Bus.status:type_name -> where_child_bus.v1.Bus.Status + 0, // 8: where_child_bus.v1.Bus.status:type_name -> where_child_bus.v1.Status 14, // 9: where_child_bus.v1.Bus.created_at:type_name -> google.protobuf.Timestamp 14, // 10: where_child_bus.v1.Bus.updated_at:type_name -> google.protobuf.Timestamp - 1, // 11: where_child_bus.v1.Child.sex:type_name -> where_child_bus.v1.Child.Sex + 1, // 11: where_child_bus.v1.Child.sex:type_name -> where_child_bus.v1.Sex 14, // 12: where_child_bus.v1.Child.created_at:type_name -> google.protobuf.Timestamp 14, // 13: where_child_bus.v1.Child.updated_at:type_name -> google.protobuf.Timestamp 14, // 14: where_child_bus.v1.Station.created_at:type_name -> google.protobuf.Timestamp 14, // 15: where_child_bus.v1.Station.updated_at:type_name -> google.protobuf.Timestamp - 2, // 16: where_child_bus.v1.ChildBusAssociation.bus_type:type_name -> where_child_bus.v1.ChildBusAssociation.BusType + 2, // 16: where_child_bus.v1.ChildBusAssociation.bus_type:type_name -> where_child_bus.v1.BusType 14, // 17: where_child_bus.v1.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp 14, // 18: where_child_bus.v1.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp 14, // 19: where_child_bus.v1.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp diff --git a/backend/proto/where_child_bus/v1/bus.proto b/backend/proto/where_child_bus/v1/bus.proto index 5161a868..e53031be 100644 --- a/backend/proto/where_child_bus/v1/bus.proto +++ b/backend/proto/where_child_bus/v1/bus.proto @@ -5,9 +5,22 @@ package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; service BusService { + rpc CreateBus(CreateBusRequest) returns (CreateBusResponse); rpc GetBusListByNurseryId(GetBusListByNurseryIdRequest) returns (GetBusListByNurseryIdResponse); } +message CreateBusRequest { + string nursery_id = 1; + string name = 2; + string plate_number = 3; + repeated string child_ids = 4; +} + +message CreateBusResponse { + Bus bus = 1; + repeated Child children = 2; +} + message GetBusListByNurseryIdRequest { string nursery_id = 1; } diff --git a/backend/proto/where_child_bus/v1/child.proto b/backend/proto/where_child_bus/v1/child.proto index c4422ee8..818c7963 100644 --- a/backend/proto/where_child_bus/v1/child.proto +++ b/backend/proto/where_child_bus/v1/child.proto @@ -5,10 +5,23 @@ package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; service ChildService { + rpc CreateChild(CreateChildRequest) returns (CreateChildResponse); rpc GetChildListByNurseryID(GetChildListByNurseryIDRequest) returns (GetChildListByNurseryIDResponse); rpc GetChildListByGuardianID(GetChildListByGuardianIDRequest) returns (GetChildListByGuardianIDResponse); } +message CreateChildRequest { + string nursery_id = 1; + string guardian_id = 2; + string name = 3; + Sex sex = 4; + repeated bytes photos = 5; +} + +message CreateChildResponse { + Child child = 1; +} + message GetChildListByNurseryIDRequest { string nursery_id = 1; } diff --git a/backend/proto/where_child_bus/v1/child_photo.proto b/backend/proto/where_child_bus/v1/child_photo.proto new file mode 100644 index 00000000..db240302 --- /dev/null +++ b/backend/proto/where_child_bus/v1/child_photo.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package where_child_bus.v1; + +service ChildPhotoService { + rpc DeleteChildPhoto(DeleteChildPhotoRequest) returns (DeleteChildPhotoResponse); +} + +message DeleteChildPhotoRequest { + repeated string ids = 1; +} + +message DeleteChildPhotoResponse { + repeated bool is_success_list = 1; + repeated string ids = 2; +} \ No newline at end of file diff --git a/backend/proto/where_child_bus/v1/resources.proto b/backend/proto/where_child_bus/v1/resources.proto index 2c21c07e..89bd5622 100644 --- a/backend/proto/where_child_bus/v1/resources.proto +++ b/backend/proto/where_child_bus/v1/resources.proto @@ -50,17 +50,18 @@ message GuardianResponse { google.protobuf.Timestamp updated_at = 7; } +enum Status { + STATUS_UNSPECIFIED = 0; + STATUS_STOPPED = 1; + STATUS_RUNNING = 2; + STATUS_MAINTEINANCE = 3; +} + message Bus { string id = 1; string nursery_id = 2; string name = 3; string plate_number = 4; - enum Status { - STATUS_UNSPECIFIED = 0; - STATUS_STOPPED = 1; - STATUS_RUNNING = 2; - STATUS_MAINTEINANCE = 3; - } Status status = 5; //緯度経度 double latitude = 6; @@ -69,18 +70,19 @@ message Bus { google.protobuf.Timestamp updated_at = 9; } +enum Sex { + SEX_UNSPECIFIED = 0; + SEX_MAN = 1; + SEX_WOMEN = 2; + SEX_OTHER = 3; +} + message Child { string id = 1; string nursery_id = 2; string guardian_id = 3; string name = 4; int32 age = 5; - enum Sex { - SEX_UNSPECIFIED = 0; - SEX_MAN = 1; - SEX_WOMEN = 2; - SEX_OTHER = 3; - } Sex sex = 6; bool is_ride_morning_bus = 7; bool is_ride_evening_bus = 8; @@ -105,15 +107,16 @@ message Station { google.protobuf.Timestamp updated_at = 8; } +enum BusType { + BUS_TYPE_UNSPECIFIED = 0; + BUS_TYPE_MORNING = 1; + BUS_TYPE_EVENING = 2; +} + message ChildBusAssociation { string id = 1; string bus_id = 2; string child_id = 3; - enum BusType { - BUS_TYPE_UNSPECIFIED = 0; - BUS_TYPE_MORNING = 1; - BUS_TYPE_EVENING = 2; - } BusType bus_type = 4; } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart index fd74729c..ee9eb625 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -16,6 +16,152 @@ import 'package:protobuf/protobuf.dart' as $pb; import 'resources.pb.dart' as $1; +class CreateBusRequest extends $pb.GeneratedMessage { + factory CreateBusRequest({ + $core.String? nurseryId, + $core.String? name, + $core.String? plateNumber, + $core.Iterable<$core.String>? childIds, + }) { + final $result = create(); + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (name != null) { + $result.name = name; + } + if (plateNumber != null) { + $result.plateNumber = plateNumber; + } + if (childIds != null) { + $result.childIds.addAll(childIds); + } + return $result; + } + CreateBusRequest._() : super(); + factory CreateBusRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateBusRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateBusRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'nurseryId') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..aOS(3, _omitFieldNames ? '' : 'plateNumber') + ..pPS(4, _omitFieldNames ? '' : 'childIds') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateBusRequest clone() => CreateBusRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateBusRequest copyWith(void Function(CreateBusRequest) updates) => super.copyWith((message) => updates(message as CreateBusRequest)) as CreateBusRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateBusRequest create() => CreateBusRequest._(); + CreateBusRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateBusRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateBusRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get nurseryId => $_getSZ(0); + @$pb.TagNumber(1) + set nurseryId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNurseryId() => $_has(0); + @$pb.TagNumber(1) + void clearNurseryId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get plateNumber => $_getSZ(2); + @$pb.TagNumber(3) + set plateNumber($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPlateNumber() => $_has(2); + @$pb.TagNumber(3) + void clearPlateNumber() => clearField(3); + + @$pb.TagNumber(4) + $core.List<$core.String> get childIds => $_getList(3); +} + +class CreateBusResponse extends $pb.GeneratedMessage { + factory CreateBusResponse({ + $1.Bus? bus, + $core.Iterable<$1.Child>? children, + }) { + final $result = create(); + if (bus != null) { + $result.bus = bus; + } + if (children != null) { + $result.children.addAll(children); + } + return $result; + } + CreateBusResponse._() : super(); + factory CreateBusResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateBusResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateBusResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$1.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $1.Bus.create) + ..pc<$1.Child>(2, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $1.Child.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateBusResponse clone() => CreateBusResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateBusResponse copyWith(void Function(CreateBusResponse) updates) => super.copyWith((message) => updates(message as CreateBusResponse)) as CreateBusResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateBusResponse create() => CreateBusResponse._(); + CreateBusResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateBusResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateBusResponse? _defaultInstance; + + @$pb.TagNumber(1) + $1.Bus get bus => $_getN(0); + @$pb.TagNumber(1) + set bus($1.Bus v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasBus() => $_has(0); + @$pb.TagNumber(1) + void clearBus() => clearField(1); + @$pb.TagNumber(1) + $1.Bus ensureBus() => $_ensure(0); + + @$pb.TagNumber(2) + $core.List<$1.Child> get children => $_getList(1); +} + class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { factory GetBusListByNurseryIdRequest({ $core.String? nurseryId, @@ -114,6 +260,9 @@ class BusServiceApi { $pb.RpcClient _client; BusServiceApi(this._client); + $async.Future createBus($pb.ClientContext? ctx, CreateBusRequest request) => + _client.invoke(ctx, 'BusService', 'CreateBus', request, CreateBusResponse()) + ; $async.Future getBusListByNurseryId($pb.ClientContext? ctx, GetBusListByNurseryIdRequest request) => _client.invoke(ctx, 'BusService', 'GetBusListByNurseryId', request, GetBusListByNurseryIdResponse()) ; diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index e4054514..eec50cbb 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -16,6 +16,38 @@ import 'dart:typed_data' as $typed_data; import '../../google/protobuf/timestamp.pbjson.dart' as $0; import 'resources.pbjson.dart' as $1; +@$core.Deprecated('Use createBusRequestDescriptor instead') +const CreateBusRequest$json = { + '1': 'CreateBusRequest', + '2': [ + {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'plate_number', '3': 3, '4': 1, '5': 9, '10': 'plateNumber'}, + {'1': 'child_ids', '3': 4, '4': 3, '5': 9, '10': 'childIds'}, + ], +}; + +/// Descriptor for `CreateBusRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createBusRequestDescriptor = $convert.base64Decode( + 'ChBDcmVhdGVCdXNSZXF1ZXN0Eh0KCm51cnNlcnlfaWQYASABKAlSCW51cnNlcnlJZBISCgRuYW' + '1lGAIgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgDIAEoCVILcGxhdGVOdW1iZXISGwoJY2hp' + 'bGRfaWRzGAQgAygJUghjaGlsZElkcw=='); + +@$core.Deprecated('Use createBusResponseDescriptor instead') +const CreateBusResponse$json = { + '1': 'CreateBusResponse', + '2': [ + {'1': 'bus', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Bus', '10': 'bus'}, + {'1': 'children', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + ], +}; + +/// Descriptor for `CreateBusResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createBusResponseDescriptor = $convert.base64Decode( + 'ChFDcmVhdGVCdXNSZXNwb25zZRIpCgNidXMYASABKAsyFy53aGVyZV9jaGlsZF9idXMudjEuQn' + 'VzUgNidXMSNQoIY2hpbGRyZW4YAiADKAsyGS53aGVyZV9jaGlsZF9idXMudjEuQ2hpbGRSCGNo' + 'aWxkcmVu'); + @$core.Deprecated('Use getBusListByNurseryIdRequestDescriptor instead') const GetBusListByNurseryIdRequest$json = { '1': 'GetBusListByNurseryIdRequest', @@ -45,21 +77,27 @@ final $typed_data.Uint8List getBusListByNurseryIdResponseDescriptor = $convert.b const $core.Map<$core.String, $core.dynamic> BusServiceBase$json = { '1': 'BusService', '2': [ + {'1': 'CreateBus', '2': '.where_child_bus.v1.CreateBusRequest', '3': '.where_child_bus.v1.CreateBusResponse'}, {'1': 'GetBusListByNurseryId', '2': '.where_child_bus.v1.GetBusListByNurseryIdRequest', '3': '.where_child_bus.v1.GetBusListByNurseryIdResponse'}, ], }; @$core.Deprecated('Use busServiceDescriptor instead') const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> BusServiceBase$messageJson = { - '.where_child_bus.v1.GetBusListByNurseryIdRequest': GetBusListByNurseryIdRequest$json, - '.where_child_bus.v1.GetBusListByNurseryIdResponse': GetBusListByNurseryIdResponse$json, + '.where_child_bus.v1.CreateBusRequest': CreateBusRequest$json, + '.where_child_bus.v1.CreateBusResponse': CreateBusResponse$json, '.where_child_bus.v1.Bus': $1.Bus$json, '.google.protobuf.Timestamp': $0.Timestamp$json, + '.where_child_bus.v1.Child': $1.Child$json, + '.where_child_bus.v1.GetBusListByNurseryIdRequest': GetBusListByNurseryIdRequest$json, + '.where_child_bus.v1.GetBusListByNurseryIdResponse': GetBusListByNurseryIdResponse$json, }; /// Descriptor for `BusService`. Decode as a `google.protobuf.ServiceDescriptorProto`. final $typed_data.Uint8List busServiceDescriptor = $convert.base64Decode( - 'CgpCdXNTZXJ2aWNlEnwKFUdldEJ1c0xpc3RCeU51cnNlcnlJZBIwLndoZXJlX2NoaWxkX2J1cy' - '52MS5HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXF1ZXN0GjEud2hlcmVfY2hpbGRfYnVzLnYxLkdl' - 'dEJ1c0xpc3RCeU51cnNlcnlJZFJlc3BvbnNl'); + 'CgpCdXNTZXJ2aWNlElgKCUNyZWF0ZUJ1cxIkLndoZXJlX2NoaWxkX2J1cy52MS5DcmVhdGVCdX' + 'NSZXF1ZXN0GiUud2hlcmVfY2hpbGRfYnVzLnYxLkNyZWF0ZUJ1c1Jlc3BvbnNlEnwKFUdldEJ1' + 'c0xpc3RCeU51cnNlcnlJZBIwLndoZXJlX2NoaWxkX2J1cy52MS5HZXRCdXNMaXN0QnlOdXJzZX' + 'J5SWRSZXF1ZXN0GjEud2hlcmVfY2hpbGRfYnVzLnYxLkdldEJ1c0xpc3RCeU51cnNlcnlJZFJl' + 'c3BvbnNl'); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbserver.dart index d2fd727a..079a1f3c 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbserver.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbserver.dart @@ -21,10 +21,12 @@ import 'bus.pbjson.dart'; export 'bus.pb.dart'; abstract class BusServiceBase extends $pb.GeneratedService { + $async.Future<$2.CreateBusResponse> createBus($pb.ServerContext ctx, $2.CreateBusRequest request); $async.Future<$2.GetBusListByNurseryIdResponse> getBusListByNurseryId($pb.ServerContext ctx, $2.GetBusListByNurseryIdRequest request); $pb.GeneratedMessage createRequest($core.String methodName) { switch (methodName) { + case 'CreateBus': return $2.CreateBusRequest(); case 'GetBusListByNurseryId': return $2.GetBusListByNurseryIdRequest(); default: throw $core.ArgumentError('Unknown method: $methodName'); } @@ -32,6 +34,7 @@ abstract class BusServiceBase extends $pb.GeneratedService { $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { switch (methodName) { + case 'CreateBus': return this.createBus(ctx, request as $2.CreateBusRequest); case 'GetBusListByNurseryId': return this.getBusListByNurseryId(ctx, request as $2.GetBusListByNurseryIdRequest); default: throw $core.ArgumentError('Unknown method: $methodName'); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart index 59b94e39..84b6e974 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -15,6 +15,159 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; import 'resources.pb.dart' as $1; +import 'resources.pbenum.dart' as $1; + +class CreateChildRequest extends $pb.GeneratedMessage { + factory CreateChildRequest({ + $core.String? nurseryId, + $core.String? guardianId, + $core.String? name, + $1.Sex? sex, + $core.Iterable<$core.List<$core.int>>? photos, + }) { + final $result = create(); + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (guardianId != null) { + $result.guardianId = guardianId; + } + if (name != null) { + $result.name = name; + } + if (sex != null) { + $result.sex = sex; + } + if (photos != null) { + $result.photos.addAll(photos); + } + return $result; + } + CreateChildRequest._() : super(); + factory CreateChildRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateChildRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateChildRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'nurseryId') + ..aOS(2, _omitFieldNames ? '' : 'guardianId') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..e<$1.Sex>(4, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: $1.Sex.SEX_UNSPECIFIED, valueOf: $1.Sex.valueOf, enumValues: $1.Sex.values) + ..p<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateChildRequest clone() => CreateChildRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateChildRequest copyWith(void Function(CreateChildRequest) updates) => super.copyWith((message) => updates(message as CreateChildRequest)) as CreateChildRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateChildRequest create() => CreateChildRequest._(); + CreateChildRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateChildRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateChildRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get nurseryId => $_getSZ(0); + @$pb.TagNumber(1) + set nurseryId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNurseryId() => $_has(0); + @$pb.TagNumber(1) + void clearNurseryId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get guardianId => $_getSZ(1); + @$pb.TagNumber(2) + set guardianId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasGuardianId() => $_has(1); + @$pb.TagNumber(2) + void clearGuardianId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $1.Sex get sex => $_getN(3); + @$pb.TagNumber(4) + set sex($1.Sex v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasSex() => $_has(3); + @$pb.TagNumber(4) + void clearSex() => clearField(4); + + @$pb.TagNumber(5) + $core.List<$core.List<$core.int>> get photos => $_getList(4); +} + +class CreateChildResponse extends $pb.GeneratedMessage { + factory CreateChildResponse({ + $1.Child? child, + }) { + final $result = create(); + if (child != null) { + $result.child = child; + } + return $result; + } + CreateChildResponse._() : super(); + factory CreateChildResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateChildResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateChildResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$1.Child>(1, _omitFieldNames ? '' : 'child', subBuilder: $1.Child.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateChildResponse clone() => CreateChildResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateChildResponse copyWith(void Function(CreateChildResponse) updates) => super.copyWith((message) => updates(message as CreateChildResponse)) as CreateChildResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateChildResponse create() => CreateChildResponse._(); + CreateChildResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateChildResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateChildResponse? _defaultInstance; + + @$pb.TagNumber(1) + $1.Child get child => $_getN(0); + @$pb.TagNumber(1) + set child($1.Child v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasChild() => $_has(0); + @$pb.TagNumber(1) + void clearChild() => clearField(1); + @$pb.TagNumber(1) + $1.Child ensureChild() => $_ensure(0); +} class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { factory GetChildListByNurseryIDRequest({ @@ -208,6 +361,9 @@ class ChildServiceApi { $pb.RpcClient _client; ChildServiceApi(this._client); + $async.Future createChild($pb.ClientContext? ctx, CreateChildRequest request) => + _client.invoke(ctx, 'ChildService', 'CreateChild', request, CreateChildResponse()) + ; $async.Future getChildListByNurseryID($pb.ClientContext? ctx, GetChildListByNurseryIDRequest request) => _client.invoke(ctx, 'ChildService', 'GetChildListByNurseryID', request, GetChildListByNurseryIDResponse()) ; diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart index e310f4cb..d0940ffb 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -16,6 +16,38 @@ import 'dart:typed_data' as $typed_data; import '../../google/protobuf/timestamp.pbjson.dart' as $0; import 'resources.pbjson.dart' as $1; +@$core.Deprecated('Use createChildRequestDescriptor instead') +const CreateChildRequest$json = { + '1': 'CreateChildRequest', + '2': [ + {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'guardian_id', '3': 2, '4': 1, '5': 9, '10': 'guardianId'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'sex', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.Sex', '10': 'sex'}, + {'1': 'photos', '3': 5, '4': 3, '5': 12, '10': 'photos'}, + ], +}; + +/// Descriptor for `CreateChildRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createChildRequestDescriptor = $convert.base64Decode( + 'ChJDcmVhdGVDaGlsZFJlcXVlc3QSHQoKbnVyc2VyeV9pZBgBIAEoCVIJbnVyc2VyeUlkEh8KC2' + 'd1YXJkaWFuX2lkGAIgASgJUgpndWFyZGlhbklkEhIKBG5hbWUYAyABKAlSBG5hbWUSKQoDc2V4' + 'GAQgASgOMhcud2hlcmVfY2hpbGRfYnVzLnYxLlNleFIDc2V4EhYKBnBob3RvcxgFIAMoDFIGcG' + 'hvdG9z'); + +@$core.Deprecated('Use createChildResponseDescriptor instead') +const CreateChildResponse$json = { + '1': 'CreateChildResponse', + '2': [ + {'1': 'child', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'child'}, + ], +}; + +/// Descriptor for `CreateChildResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createChildResponseDescriptor = $convert.base64Decode( + 'ChNDcmVhdGVDaGlsZFJlc3BvbnNlEi8KBWNoaWxkGAEgASgLMhkud2hlcmVfY2hpbGRfYnVzLn' + 'YxLkNoaWxkUgVjaGlsZA=='); + @$core.Deprecated('Use getChildListByNurseryIDRequestDescriptor instead') const GetChildListByNurseryIDRequest$json = { '1': 'GetChildListByNurseryIDRequest', @@ -71,6 +103,7 @@ final $typed_data.Uint8List getChildListByGuardianIDResponseDescriptor = $conver const $core.Map<$core.String, $core.dynamic> ChildServiceBase$json = { '1': 'ChildService', '2': [ + {'1': 'CreateChild', '2': '.where_child_bus.v1.CreateChildRequest', '3': '.where_child_bus.v1.CreateChildResponse'}, {'1': 'GetChildListByNurseryID', '2': '.where_child_bus.v1.GetChildListByNurseryIDRequest', '3': '.where_child_bus.v1.GetChildListByNurseryIDResponse'}, {'1': 'GetChildListByGuardianID', '2': '.where_child_bus.v1.GetChildListByGuardianIDRequest', '3': '.where_child_bus.v1.GetChildListByGuardianIDResponse'}, ], @@ -78,20 +111,23 @@ const $core.Map<$core.String, $core.dynamic> ChildServiceBase$json = { @$core.Deprecated('Use childServiceDescriptor instead') const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> ChildServiceBase$messageJson = { - '.where_child_bus.v1.GetChildListByNurseryIDRequest': GetChildListByNurseryIDRequest$json, - '.where_child_bus.v1.GetChildListByNurseryIDResponse': GetChildListByNurseryIDResponse$json, + '.where_child_bus.v1.CreateChildRequest': CreateChildRequest$json, + '.where_child_bus.v1.CreateChildResponse': CreateChildResponse$json, '.where_child_bus.v1.Child': $1.Child$json, '.google.protobuf.Timestamp': $0.Timestamp$json, + '.where_child_bus.v1.GetChildListByNurseryIDRequest': GetChildListByNurseryIDRequest$json, + '.where_child_bus.v1.GetChildListByNurseryIDResponse': GetChildListByNurseryIDResponse$json, '.where_child_bus.v1.GetChildListByGuardianIDRequest': GetChildListByGuardianIDRequest$json, '.where_child_bus.v1.GetChildListByGuardianIDResponse': GetChildListByGuardianIDResponse$json, }; /// Descriptor for `ChildService`. Decode as a `google.protobuf.ServiceDescriptorProto`. final $typed_data.Uint8List childServiceDescriptor = $convert.base64Decode( - 'CgxDaGlsZFNlcnZpY2USggEKF0dldENoaWxkTGlzdEJ5TnVyc2VyeUlEEjIud2hlcmVfY2hpbG' - 'RfYnVzLnYxLkdldENoaWxkTGlzdEJ5TnVyc2VyeUlEUmVxdWVzdBozLndoZXJlX2NoaWxkX2J1' - 'cy52MS5HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEoUBChhHZXRDaGlsZExpc3RCeU' - 'd1YXJkaWFuSUQSMy53aGVyZV9jaGlsZF9idXMudjEuR2V0Q2hpbGRMaXN0QnlHdWFyZGlhbklE' - 'UmVxdWVzdBo0LndoZXJlX2NoaWxkX2J1cy52MS5HZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZX' - 'Nwb25zZQ=='); + 'CgxDaGlsZFNlcnZpY2USXgoLQ3JlYXRlQ2hpbGQSJi53aGVyZV9jaGlsZF9idXMudjEuQ3JlYX' + 'RlQ2hpbGRSZXF1ZXN0Gicud2hlcmVfY2hpbGRfYnVzLnYxLkNyZWF0ZUNoaWxkUmVzcG9uc2US' + 'ggEKF0dldENoaWxkTGlzdEJ5TnVyc2VyeUlEEjIud2hlcmVfY2hpbGRfYnVzLnYxLkdldENoaW' + 'xkTGlzdEJ5TnVyc2VyeUlEUmVxdWVzdBozLndoZXJlX2NoaWxkX2J1cy52MS5HZXRDaGlsZExp' + 'c3RCeU51cnNlcnlJRFJlc3BvbnNlEoUBChhHZXRDaGlsZExpc3RCeUd1YXJkaWFuSUQSMy53aG' + 'VyZV9jaGlsZF9idXMudjEuR2V0Q2hpbGRMaXN0QnlHdWFyZGlhbklEUmVxdWVzdBo0LndoZXJl' + 'X2NoaWxkX2J1cy52MS5HZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZXNwb25zZQ=='); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbserver.dart index e47015a4..bfa614ec 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbserver.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbserver.dart @@ -21,11 +21,13 @@ import 'child.pbjson.dart'; export 'child.pb.dart'; abstract class ChildServiceBase extends $pb.GeneratedService { + $async.Future<$3.CreateChildResponse> createChild($pb.ServerContext ctx, $3.CreateChildRequest request); $async.Future<$3.GetChildListByNurseryIDResponse> getChildListByNurseryID($pb.ServerContext ctx, $3.GetChildListByNurseryIDRequest request); $async.Future<$3.GetChildListByGuardianIDResponse> getChildListByGuardianID($pb.ServerContext ctx, $3.GetChildListByGuardianIDRequest request); $pb.GeneratedMessage createRequest($core.String methodName) { switch (methodName) { + case 'CreateChild': return $3.CreateChildRequest(); case 'GetChildListByNurseryID': return $3.GetChildListByNurseryIDRequest(); case 'GetChildListByGuardianID': return $3.GetChildListByGuardianIDRequest(); default: throw $core.ArgumentError('Unknown method: $methodName'); @@ -34,6 +36,7 @@ abstract class ChildServiceBase extends $pb.GeneratedService { $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { switch (methodName) { + case 'CreateChild': return this.createChild(ctx, request as $3.CreateChildRequest); case 'GetChildListByNurseryID': return this.getChildListByNurseryID(ctx, request as $3.GetChildListByNurseryIDRequest); case 'GetChildListByGuardianID': return this.getChildListByGuardianID(ctx, request as $3.GetChildListByGuardianIDRequest); default: throw $core.ArgumentError('Unknown method: $methodName'); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart new file mode 100644 index 00000000..702e930d --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart @@ -0,0 +1,124 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child_photo.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class DeleteChildPhotoRequest extends $pb.GeneratedMessage { + factory DeleteChildPhotoRequest({ + $core.Iterable<$core.String>? ids, + }) { + final $result = create(); + if (ids != null) { + $result.ids.addAll(ids); + } + return $result; + } + DeleteChildPhotoRequest._() : super(); + factory DeleteChildPhotoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DeleteChildPhotoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DeleteChildPhotoRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'ids') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DeleteChildPhotoRequest clone() => DeleteChildPhotoRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DeleteChildPhotoRequest copyWith(void Function(DeleteChildPhotoRequest) updates) => super.copyWith((message) => updates(message as DeleteChildPhotoRequest)) as DeleteChildPhotoRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DeleteChildPhotoRequest create() => DeleteChildPhotoRequest._(); + DeleteChildPhotoRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DeleteChildPhotoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DeleteChildPhotoRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.String> get ids => $_getList(0); +} + +class DeleteChildPhotoResponse extends $pb.GeneratedMessage { + factory DeleteChildPhotoResponse({ + $core.Iterable<$core.bool>? isSuccessList, + $core.Iterable<$core.String>? ids, + }) { + final $result = create(); + if (isSuccessList != null) { + $result.isSuccessList.addAll(isSuccessList); + } + if (ids != null) { + $result.ids.addAll(ids); + } + return $result; + } + DeleteChildPhotoResponse._() : super(); + factory DeleteChildPhotoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DeleteChildPhotoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DeleteChildPhotoResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..p<$core.bool>(1, _omitFieldNames ? '' : 'isSuccessList', $pb.PbFieldType.KB) + ..pPS(2, _omitFieldNames ? '' : 'ids') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DeleteChildPhotoResponse clone() => DeleteChildPhotoResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DeleteChildPhotoResponse copyWith(void Function(DeleteChildPhotoResponse) updates) => super.copyWith((message) => updates(message as DeleteChildPhotoResponse)) as DeleteChildPhotoResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DeleteChildPhotoResponse create() => DeleteChildPhotoResponse._(); + DeleteChildPhotoResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DeleteChildPhotoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DeleteChildPhotoResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.bool> get isSuccessList => $_getList(0); + + @$pb.TagNumber(2) + $core.List<$core.String> get ids => $_getList(1); +} + +class ChildPhotoServiceApi { + $pb.RpcClient _client; + ChildPhotoServiceApi(this._client); + + $async.Future deleteChildPhoto($pb.ClientContext? ctx, DeleteChildPhotoRequest request) => + _client.invoke(ctx, 'ChildPhotoService', 'DeleteChildPhoto', request, DeleteChildPhotoResponse()) + ; +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart new file mode 100644 index 00000000..0adb482e --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child_photo.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart new file mode 100644 index 00000000..30dfe525 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart @@ -0,0 +1,60 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child_photo.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use deleteChildPhotoRequestDescriptor instead') +const DeleteChildPhotoRequest$json = { + '1': 'DeleteChildPhotoRequest', + '2': [ + {'1': 'ids', '3': 1, '4': 3, '5': 9, '10': 'ids'}, + ], +}; + +/// Descriptor for `DeleteChildPhotoRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List deleteChildPhotoRequestDescriptor = $convert.base64Decode( + 'ChdEZWxldGVDaGlsZFBob3RvUmVxdWVzdBIQCgNpZHMYASADKAlSA2lkcw=='); + +@$core.Deprecated('Use deleteChildPhotoResponseDescriptor instead') +const DeleteChildPhotoResponse$json = { + '1': 'DeleteChildPhotoResponse', + '2': [ + {'1': 'is_success_list', '3': 1, '4': 3, '5': 8, '10': 'isSuccessList'}, + {'1': 'ids', '3': 2, '4': 3, '5': 9, '10': 'ids'}, + ], +}; + +/// Descriptor for `DeleteChildPhotoResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List deleteChildPhotoResponseDescriptor = $convert.base64Decode( + 'ChhEZWxldGVDaGlsZFBob3RvUmVzcG9uc2USJgoPaXNfc3VjY2Vzc19saXN0GAEgAygIUg1pc1' + 'N1Y2Nlc3NMaXN0EhAKA2lkcxgCIAMoCVIDaWRz'); + +const $core.Map<$core.String, $core.dynamic> ChildPhotoServiceBase$json = { + '1': 'ChildPhotoService', + '2': [ + {'1': 'DeleteChildPhoto', '2': '.where_child_bus.v1.DeleteChildPhotoRequest', '3': '.where_child_bus.v1.DeleteChildPhotoResponse'}, + ], +}; + +@$core.Deprecated('Use childPhotoServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> ChildPhotoServiceBase$messageJson = { + '.where_child_bus.v1.DeleteChildPhotoRequest': DeleteChildPhotoRequest$json, + '.where_child_bus.v1.DeleteChildPhotoResponse': DeleteChildPhotoResponse$json, +}; + +/// Descriptor for `ChildPhotoService`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List childPhotoServiceDescriptor = $convert.base64Decode( + 'ChFDaGlsZFBob3RvU2VydmljZRJtChBEZWxldGVDaGlsZFBob3RvEisud2hlcmVfY2hpbGRfYn' + 'VzLnYxLkRlbGV0ZUNoaWxkUGhvdG9SZXF1ZXN0Giwud2hlcmVfY2hpbGRfYnVzLnYxLkRlbGV0' + 'ZUNoaWxkUGhvdG9SZXNwb25zZQ=='); + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart new file mode 100644 index 00000000..9ebc0cdf --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart @@ -0,0 +1,43 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child_photo.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'child_photo.pb.dart' as $4; +import 'child_photo.pbjson.dart'; + +export 'child_photo.pb.dart'; + +abstract class ChildPhotoServiceBase extends $pb.GeneratedService { + $async.Future<$4.DeleteChildPhotoResponse> deleteChildPhoto($pb.ServerContext ctx, $4.DeleteChildPhotoRequest request); + + $pb.GeneratedMessage createRequest($core.String methodName) { + switch (methodName) { + case 'DeleteChildPhoto': return $4.DeleteChildPhotoRequest(); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { + switch (methodName) { + case 'DeleteChildPhoto': return this.deleteChildPhoto(ctx, request as $4.DeleteChildPhotoRequest); + default: throw $core.ArgumentError('Unknown method: $methodName'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => ChildPhotoServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => ChildPhotoServiceBase$messageJson; +} + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbserver.dart index 2cc104ce..376ffe3d 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbserver.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbserver.dart @@ -15,24 +15,24 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'guardian.pb.dart' as $4; +import 'guardian.pb.dart' as $5; import 'guardian.pbjson.dart'; export 'guardian.pb.dart'; abstract class GuardianServiceBase extends $pb.GeneratedService { - $async.Future<$4.GuardianLoginResponse> guardianLogin($pb.ServerContext ctx, $4.GuardianLoginRequest request); + $async.Future<$5.GuardianLoginResponse> guardianLogin($pb.ServerContext ctx, $5.GuardianLoginRequest request); $pb.GeneratedMessage createRequest($core.String methodName) { switch (methodName) { - case 'GuardianLogin': return $4.GuardianLoginRequest(); + case 'GuardianLogin': return $5.GuardianLoginRequest(); default: throw $core.ArgumentError('Unknown method: $methodName'); } } $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { switch (methodName) { - case 'GuardianLogin': return this.guardianLogin(ctx, request as $4.GuardianLoginRequest); + case 'GuardianLogin': return this.guardianLogin(ctx, request as $5.GuardianLoginRequest); default: throw $core.ArgumentError('Unknown method: $methodName'); } } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbserver.dart index 11d9fef0..87428f29 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbserver.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbserver.dart @@ -15,24 +15,24 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'health_check.pb.dart' as $5; +import 'health_check.pb.dart' as $6; import 'health_check.pbjson.dart'; export 'health_check.pb.dart'; abstract class HealthcheckServiceBase extends $pb.GeneratedService { - $async.Future<$5.PingResponse> ping($pb.ServerContext ctx, $5.PingRequest request); + $async.Future<$6.PingResponse> ping($pb.ServerContext ctx, $6.PingRequest request); $pb.GeneratedMessage createRequest($core.String methodName) { switch (methodName) { - case 'Ping': return $5.PingRequest(); + case 'Ping': return $6.PingRequest(); default: throw $core.ArgumentError('Unknown method: $methodName'); } } $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { switch (methodName) { - case 'Ping': return this.ping(ctx, request as $5.PingRequest); + case 'Ping': return this.ping(ctx, request as $6.PingRequest); default: throw $core.ArgumentError('Unknown method: $methodName'); } } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbserver.dart index 2ff2a741..edd1fd6c 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbserver.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbserver.dart @@ -15,24 +15,24 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'nursery.pb.dart' as $6; +import 'nursery.pb.dart' as $7; import 'nursery.pbjson.dart'; export 'nursery.pb.dart'; abstract class NurseryServiceBase extends $pb.GeneratedService { - $async.Future<$6.NurseryLoginResponse> nurseryLogin($pb.ServerContext ctx, $6.NurseryLoginRequest request); + $async.Future<$7.NurseryLoginResponse> nurseryLogin($pb.ServerContext ctx, $7.NurseryLoginRequest request); $pb.GeneratedMessage createRequest($core.String methodName) { switch (methodName) { - case 'NurseryLogin': return $6.NurseryLoginRequest(); + case 'NurseryLogin': return $7.NurseryLoginRequest(); default: throw $core.ArgumentError('Unknown method: $methodName'); } } $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { switch (methodName) { - case 'NurseryLogin': return this.nurseryLogin(ctx, request as $6.NurseryLoginRequest); + case 'NurseryLogin': return this.nurseryLogin(ctx, request as $7.NurseryLoginRequest); default: throw $core.ArgumentError('Unknown method: $methodName'); } } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 106e4ce5..50c9ac2c 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -634,7 +634,7 @@ class Bus extends $pb.GeneratedMessage { $core.String? nurseryId, $core.String? name, $core.String? plateNumber, - Bus_Status? status, + Status? status, $core.double? latitude, $core.double? longitude, $0.Timestamp? createdAt, @@ -679,7 +679,7 @@ class Bus extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'nurseryId') ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'plateNumber') - ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Bus_Status.STATUS_UNSPECIFIED, valueOf: Bus_Status.valueOf, enumValues: Bus_Status.values) + ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Status.STATUS_UNSPECIFIED, valueOf: Status.valueOf, enumValues: Status.values) ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) @@ -745,9 +745,9 @@ class Bus extends $pb.GeneratedMessage { void clearPlateNumber() => clearField(4); @$pb.TagNumber(5) - Bus_Status get status => $_getN(4); + Status get status => $_getN(4); @$pb.TagNumber(5) - set status(Bus_Status v) { setField(5, v); } + set status(Status v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasStatus() => $_has(4); @$pb.TagNumber(5) @@ -802,7 +802,7 @@ class Child extends $pb.GeneratedMessage { $core.String? guardianId, $core.String? name, $core.int? age, - Child_Sex? sex, + Sex? sex, $core.bool? isRideMorningBus, $core.bool? isRideEveningBus, $core.bool? checkForMissingItems, @@ -875,7 +875,7 @@ class Child extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'guardianId') ..aOS(4, _omitFieldNames ? '' : 'name') ..a<$core.int>(5, _omitFieldNames ? '' : 'age', $pb.PbFieldType.O3) - ..e(6, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: Child_Sex.SEX_UNSPECIFIED, valueOf: Child_Sex.valueOf, enumValues: Child_Sex.values) + ..e(6, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: Sex.SEX_UNSPECIFIED, valueOf: Sex.valueOf, enumValues: Sex.values) ..aOB(7, _omitFieldNames ? '' : 'isRideMorningBus') ..aOB(8, _omitFieldNames ? '' : 'isRideEveningBus') ..aOB(9, _omitFieldNames ? '' : 'checkForMissingItems') @@ -956,9 +956,9 @@ class Child extends $pb.GeneratedMessage { void clearAge() => clearField(5); @$pb.TagNumber(6) - Child_Sex get sex => $_getN(5); + Sex get sex => $_getN(5); @$pb.TagNumber(6) - set sex(Child_Sex v) { setField(6, v); } + set sex(Sex v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasSex() => $_has(5); @$pb.TagNumber(6) @@ -1216,7 +1216,7 @@ class ChildBusAssociation extends $pb.GeneratedMessage { $core.String? id, $core.String? busId, $core.String? childId, - ChildBusAssociation_BusType? busType, + BusType? busType, }) { final $result = create(); if (id != null) { @@ -1241,7 +1241,7 @@ class ChildBusAssociation extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'busId') ..aOS(3, _omitFieldNames ? '' : 'childId') - ..e(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: ChildBusAssociation_BusType.BUS_TYPE_UNSPECIFIED, valueOf: ChildBusAssociation_BusType.valueOf, enumValues: ChildBusAssociation_BusType.values) + ..e(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: BusType.BUS_TYPE_UNSPECIFIED, valueOf: BusType.valueOf, enumValues: BusType.values) ..hasRequiredFields = false ; @@ -1294,9 +1294,9 @@ class ChildBusAssociation extends $pb.GeneratedMessage { void clearChildId() => clearField(3); @$pb.TagNumber(4) - ChildBusAssociation_BusType get busType => $_getN(3); + BusType get busType => $_getN(3); @$pb.TagNumber(4) - set busType(ChildBusAssociation_BusType v) { setField(4, v); } + set busType(BusType v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasBusType() => $_has(3); @$pb.TagNumber(4) diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart index bbf9be4d..9812a756 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart @@ -13,59 +13,59 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -class Bus_Status extends $pb.ProtobufEnum { - static const Bus_Status STATUS_UNSPECIFIED = Bus_Status._(0, _omitEnumNames ? '' : 'STATUS_UNSPECIFIED'); - static const Bus_Status STATUS_STOPPED = Bus_Status._(1, _omitEnumNames ? '' : 'STATUS_STOPPED'); - static const Bus_Status STATUS_RUNNING = Bus_Status._(2, _omitEnumNames ? '' : 'STATUS_RUNNING'); - static const Bus_Status STATUS_MAINTEINANCE = Bus_Status._(3, _omitEnumNames ? '' : 'STATUS_MAINTEINANCE'); +class Status extends $pb.ProtobufEnum { + static const Status STATUS_UNSPECIFIED = Status._(0, _omitEnumNames ? '' : 'STATUS_UNSPECIFIED'); + static const Status STATUS_STOPPED = Status._(1, _omitEnumNames ? '' : 'STATUS_STOPPED'); + static const Status STATUS_RUNNING = Status._(2, _omitEnumNames ? '' : 'STATUS_RUNNING'); + static const Status STATUS_MAINTEINANCE = Status._(3, _omitEnumNames ? '' : 'STATUS_MAINTEINANCE'); - static const $core.List values = [ + static const $core.List values = [ STATUS_UNSPECIFIED, STATUS_STOPPED, STATUS_RUNNING, STATUS_MAINTEINANCE, ]; - static final $core.Map<$core.int, Bus_Status> _byValue = $pb.ProtobufEnum.initByValue(values); - static Bus_Status? valueOf($core.int value) => _byValue[value]; + static final $core.Map<$core.int, Status> _byValue = $pb.ProtobufEnum.initByValue(values); + static Status? valueOf($core.int value) => _byValue[value]; - const Bus_Status._($core.int v, $core.String n) : super(v, n); + const Status._($core.int v, $core.String n) : super(v, n); } -class Child_Sex extends $pb.ProtobufEnum { - static const Child_Sex SEX_UNSPECIFIED = Child_Sex._(0, _omitEnumNames ? '' : 'SEX_UNSPECIFIED'); - static const Child_Sex SEX_MAN = Child_Sex._(1, _omitEnumNames ? '' : 'SEX_MAN'); - static const Child_Sex SEX_WOMEN = Child_Sex._(2, _omitEnumNames ? '' : 'SEX_WOMEN'); - static const Child_Sex SEX_OTHER = Child_Sex._(3, _omitEnumNames ? '' : 'SEX_OTHER'); +class Sex extends $pb.ProtobufEnum { + static const Sex SEX_UNSPECIFIED = Sex._(0, _omitEnumNames ? '' : 'SEX_UNSPECIFIED'); + static const Sex SEX_MAN = Sex._(1, _omitEnumNames ? '' : 'SEX_MAN'); + static const Sex SEX_WOMEN = Sex._(2, _omitEnumNames ? '' : 'SEX_WOMEN'); + static const Sex SEX_OTHER = Sex._(3, _omitEnumNames ? '' : 'SEX_OTHER'); - static const $core.List values = [ + static const $core.List values = [ SEX_UNSPECIFIED, SEX_MAN, SEX_WOMEN, SEX_OTHER, ]; - static final $core.Map<$core.int, Child_Sex> _byValue = $pb.ProtobufEnum.initByValue(values); - static Child_Sex? valueOf($core.int value) => _byValue[value]; + static final $core.Map<$core.int, Sex> _byValue = $pb.ProtobufEnum.initByValue(values); + static Sex? valueOf($core.int value) => _byValue[value]; - const Child_Sex._($core.int v, $core.String n) : super(v, n); + const Sex._($core.int v, $core.String n) : super(v, n); } -class ChildBusAssociation_BusType extends $pb.ProtobufEnum { - static const ChildBusAssociation_BusType BUS_TYPE_UNSPECIFIED = ChildBusAssociation_BusType._(0, _omitEnumNames ? '' : 'BUS_TYPE_UNSPECIFIED'); - static const ChildBusAssociation_BusType BUS_TYPE_MORNING = ChildBusAssociation_BusType._(1, _omitEnumNames ? '' : 'BUS_TYPE_MORNING'); - static const ChildBusAssociation_BusType BUS_TYPE_EVENING = ChildBusAssociation_BusType._(2, _omitEnumNames ? '' : 'BUS_TYPE_EVENING'); +class BusType extends $pb.ProtobufEnum { + static const BusType BUS_TYPE_UNSPECIFIED = BusType._(0, _omitEnumNames ? '' : 'BUS_TYPE_UNSPECIFIED'); + static const BusType BUS_TYPE_MORNING = BusType._(1, _omitEnumNames ? '' : 'BUS_TYPE_MORNING'); + static const BusType BUS_TYPE_EVENING = BusType._(2, _omitEnumNames ? '' : 'BUS_TYPE_EVENING'); - static const $core.List values = [ + static const $core.List values = [ BUS_TYPE_UNSPECIFIED, BUS_TYPE_MORNING, BUS_TYPE_EVENING, ]; - static final $core.Map<$core.int, ChildBusAssociation_BusType> _byValue = $pb.ProtobufEnum.initByValue(values); - static ChildBusAssociation_BusType? valueOf($core.int value) => _byValue[value]; + static final $core.Map<$core.int, BusType> _byValue = $pb.ProtobufEnum.initByValue(values); + static BusType? valueOf($core.int value) => _byValue[value]; - const ChildBusAssociation_BusType._($core.int v, $core.String n) : super(v, n); + const BusType._($core.int v, $core.String n) : super(v, n); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 98b5a846..33cf4ff7 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -13,6 +13,53 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use statusDescriptor instead') +const Status$json = { + '1': 'Status', + '2': [ + {'1': 'STATUS_UNSPECIFIED', '2': 0}, + {'1': 'STATUS_STOPPED', '2': 1}, + {'1': 'STATUS_RUNNING', '2': 2}, + {'1': 'STATUS_MAINTEINANCE', '2': 3}, + ], +}; + +/// Descriptor for `Status`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List statusDescriptor = $convert.base64Decode( + 'CgZTdGF0dXMSFgoSU1RBVFVTX1VOU1BFQ0lGSUVEEAASEgoOU1RBVFVTX1NUT1BQRUQQARISCg' + '5TVEFUVVNfUlVOTklORxACEhcKE1NUQVRVU19NQUlOVEVJTkFOQ0UQAw=='); + +@$core.Deprecated('Use sexDescriptor instead') +const Sex$json = { + '1': 'Sex', + '2': [ + {'1': 'SEX_UNSPECIFIED', '2': 0}, + {'1': 'SEX_MAN', '2': 1}, + {'1': 'SEX_WOMEN', '2': 2}, + {'1': 'SEX_OTHER', '2': 3}, + ], +}; + +/// Descriptor for `Sex`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List sexDescriptor = $convert.base64Decode( + 'CgNTZXgSEwoPU0VYX1VOU1BFQ0lGSUVEEAASCwoHU0VYX01BThABEg0KCVNFWF9XT01FThACEg' + '0KCVNFWF9PVEhFUhAD'); + +@$core.Deprecated('Use busTypeDescriptor instead') +const BusType$json = { + '1': 'BusType', + '2': [ + {'1': 'BUS_TYPE_UNSPECIFIED', '2': 0}, + {'1': 'BUS_TYPE_MORNING', '2': 1}, + {'1': 'BUS_TYPE_EVENING', '2': 2}, + ], +}; + +/// Descriptor for `BusType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List busTypeDescriptor = $convert.base64Decode( + 'CgdCdXNUeXBlEhgKFEJVU19UWVBFX1VOU1BFQ0lGSUVEEAASFAoQQlVTX1RZUEVfTU9STklORx' + 'ABEhQKEEJVU19UWVBFX0VWRU5JTkcQAg=='); + @$core.Deprecated('Use nurseryDescriptor instead') const Nursery$json = { '1': 'Nursery', @@ -116,36 +163,23 @@ const Bus$json = { {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, {'1': 'plate_number', '3': 4, '4': 1, '5': 9, '10': 'plateNumber'}, - {'1': 'status', '3': 5, '4': 1, '5': 14, '6': '.where_child_bus.v1.Bus.Status', '10': 'status'}, + {'1': 'status', '3': 5, '4': 1, '5': 14, '6': '.where_child_bus.v1.Status', '10': 'status'}, {'1': 'latitude', '3': 6, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 7, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'created_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, {'1': 'updated_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], - '4': [Bus_Status$json], -}; - -@$core.Deprecated('Use busDescriptor instead') -const Bus_Status$json = { - '1': 'Status', - '2': [ - {'1': 'STATUS_UNSPECIFIED', '2': 0}, - {'1': 'STATUS_STOPPED', '2': 1}, - {'1': 'STATUS_RUNNING', '2': 2}, - {'1': 'STATUS_MAINTEINANCE', '2': 3}, - ], }; /// Descriptor for `Bus`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List busDescriptor = $convert.base64Decode( 'CgNCdXMSDgoCaWQYASABKAlSAmlkEh0KCm51cnNlcnlfaWQYAiABKAlSCW51cnNlcnlJZBISCg' - 'RuYW1lGAMgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgEIAEoCVILcGxhdGVOdW1iZXISNgoG' - 'c3RhdHVzGAUgASgOMh4ud2hlcmVfY2hpbGRfYnVzLnYxLkJ1cy5TdGF0dXNSBnN0YXR1cxIaCg' - 'hsYXRpdHVkZRgGIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAcgASgBUglsb25naXR1ZGUS' - 'OQoKY3JlYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZW' - 'RBdBI5Cgp1cGRhdGVkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBk' - 'YXRlZEF0ImEKBlN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABISCg5TVEFUVVNfU1RPUF' - 'BFRBABEhIKDlNUQVRVU19SVU5OSU5HEAISFwoTU1RBVFVTX01BSU5URUlOQU5DRRAD'); + 'RuYW1lGAMgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgEIAEoCVILcGxhdGVOdW1iZXISMgoG' + 'c3RhdHVzGAUgASgOMhoud2hlcmVfY2hpbGRfYnVzLnYxLlN0YXR1c1IGc3RhdHVzEhoKCGxhdG' + 'l0dWRlGAYgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYByABKAFSCWxvbmdpdHVkZRI5Cgpj' + 'cmVhdGVkX2F0GAggASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRlZEF0Ej' + 'kKCnVwZGF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cGRhdGVk' + 'QXQ='); @$core.Deprecated('Use childDescriptor instead') const Child$json = { @@ -156,7 +190,7 @@ const Child$json = { {'1': 'guardian_id', '3': 3, '4': 1, '5': 9, '10': 'guardianId'}, {'1': 'name', '3': 4, '4': 1, '5': 9, '10': 'name'}, {'1': 'age', '3': 5, '4': 1, '5': 5, '10': 'age'}, - {'1': 'sex', '3': 6, '4': 1, '5': 14, '6': '.where_child_bus.v1.Child.Sex', '10': 'sex'}, + {'1': 'sex', '3': 6, '4': 1, '5': 14, '6': '.where_child_bus.v1.Sex', '10': 'sex'}, {'1': 'is_ride_morning_bus', '3': 7, '4': 1, '5': 8, '10': 'isRideMorningBus'}, {'1': 'is_ride_evening_bus', '3': 8, '4': 1, '5': 8, '10': 'isRideEveningBus'}, {'1': 'check_for_missing_items', '3': 9, '4': 1, '5': 8, '10': 'checkForMissingItems'}, @@ -168,35 +202,21 @@ const Child$json = { {'1': 'created_at', '3': 15, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, {'1': 'updated_at', '3': 16, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], - '4': [Child_Sex$json], -}; - -@$core.Deprecated('Use childDescriptor instead') -const Child_Sex$json = { - '1': 'Sex', - '2': [ - {'1': 'SEX_UNSPECIFIED', '2': 0}, - {'1': 'SEX_MAN', '2': 1}, - {'1': 'SEX_WOMEN', '2': 2}, - {'1': 'SEX_OTHER', '2': 3}, - ], }; /// Descriptor for `Child`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List childDescriptor = $convert.base64Decode( 'CgVDaGlsZBIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbnVyc2VyeUlkEh' '8KC2d1YXJkaWFuX2lkGAMgASgJUgpndWFyZGlhbklkEhIKBG5hbWUYBCABKAlSBG5hbWUSEAoD' - 'YWdlGAUgASgFUgNhZ2USLwoDc2V4GAYgASgOMh0ud2hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkLl' - 'NleFIDc2V4Ei0KE2lzX3JpZGVfbW9ybmluZ19idXMYByABKAhSEGlzUmlkZU1vcm5pbmdCdXMS' - 'LQoTaXNfcmlkZV9ldmVuaW5nX2J1cxgIIAEoCFIQaXNSaWRlRXZlbmluZ0J1cxI1ChdjaGVja1' - '9mb3JfbWlzc2luZ19pdGVtcxgJIAEoCFIUY2hlY2tGb3JNaXNzaW5nSXRlbXMSFwoHaGFzX2Jh' - 'ZxgKIAEoCFIGaGFzQmFnEiIKDWhhc19sdW5jaF9ib3gYCyABKAhSC2hhc0x1bmNoQm94EigKEG' - 'hhc193YXRlcl9ib3R0bGUYDCABKAhSDmhhc1dhdGVyQm90dGxlEh8KC2hhc191bWJyZXJhGA0g' - 'ASgIUgpoYXNVbWJyZXJhEhsKCWhhc19vdGhlchgOIAEoCFIIaGFzT3RoZXISOQoKY3JlYXRlZF' - '9hdBgPIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRh' - 'dGVkX2F0GBAgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0IkUKA1' - 'NleBITCg9TRVhfVU5TUEVDSUZJRUQQABILCgdTRVhfTUFOEAESDQoJU0VYX1dPTUVOEAISDQoJ' - 'U0VYX09USEVSEAM='); + 'YWdlGAUgASgFUgNhZ2USKQoDc2V4GAYgASgOMhcud2hlcmVfY2hpbGRfYnVzLnYxLlNleFIDc2' + 'V4Ei0KE2lzX3JpZGVfbW9ybmluZ19idXMYByABKAhSEGlzUmlkZU1vcm5pbmdCdXMSLQoTaXNf' + 'cmlkZV9ldmVuaW5nX2J1cxgIIAEoCFIQaXNSaWRlRXZlbmluZ0J1cxI1ChdjaGVja19mb3JfbW' + 'lzc2luZ19pdGVtcxgJIAEoCFIUY2hlY2tGb3JNaXNzaW5nSXRlbXMSFwoHaGFzX2JhZxgKIAEo' + 'CFIGaGFzQmFnEiIKDWhhc19sdW5jaF9ib3gYCyABKAhSC2hhc0x1bmNoQm94EigKEGhhc193YX' + 'Rlcl9ib3R0bGUYDCABKAhSDmhhc1dhdGVyQm90dGxlEh8KC2hhc191bWJyZXJhGA0gASgIUgpo' + 'YXNVbWJyZXJhEhsKCWhhc19vdGhlchgOIAEoCFIIaGFzT3RoZXISOQoKY3JlYXRlZF9hdBgPIA' + 'EoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRhdGVkX2F0' + 'GBAgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); @$core.Deprecated('Use stationDescriptor instead') const Station$json = { @@ -229,28 +249,15 @@ const ChildBusAssociation$json = { {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'bus_id', '3': 2, '4': 1, '5': 9, '10': 'busId'}, {'1': 'child_id', '3': 3, '4': 1, '5': 9, '10': 'childId'}, - {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.ChildBusAssociation.BusType', '10': 'busType'}, - ], - '4': [ChildBusAssociation_BusType$json], -}; - -@$core.Deprecated('Use childBusAssociationDescriptor instead') -const ChildBusAssociation_BusType$json = { - '1': 'BusType', - '2': [ - {'1': 'BUS_TYPE_UNSPECIFIED', '2': 0}, - {'1': 'BUS_TYPE_MORNING', '2': 1}, - {'1': 'BUS_TYPE_EVENING', '2': 2}, + {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, ], }; /// Descriptor for `ChildBusAssociation`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List childBusAssociationDescriptor = $convert.base64Decode( 'ChNDaGlsZEJ1c0Fzc29jaWF0aW9uEg4KAmlkGAEgASgJUgJpZBIVCgZidXNfaWQYAiABKAlSBW' - 'J1c0lkEhkKCGNoaWxkX2lkGAMgASgJUgdjaGlsZElkEkoKCGJ1c190eXBlGAQgASgOMi8ud2hl' - 'cmVfY2hpbGRfYnVzLnYxLkNoaWxkQnVzQXNzb2NpYXRpb24uQnVzVHlwZVIHYnVzVHlwZSJPCg' - 'dCdXNUeXBlEhgKFEJVU19UWVBFX1VOU1BFQ0lGSUVEEAASFAoQQlVTX1RZUEVfTU9STklORxAB' - 'EhQKEEJVU19UWVBFX0VWRU5JTkcQAg=='); + 'J1c0lkEhkKCGNoaWxkX2lkGAMgASgJUgdjaGlsZElkEjYKCGJ1c190eXBlGAQgASgOMhsud2hl' + 'cmVfY2hpbGRfYnVzLnYxLkJ1c1R5cGVSB2J1c1R5cGU='); @$core.Deprecated('Use busStationAssociationDescriptor instead') const BusStationAssociation$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py index ccd64aaf..4d785b58 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses2\x8a\x01\n\nBusService\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponseB\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\x85\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1b\n\tchild_ids\x18\x04 \x03(\tR\x08\x63hildIds\"u\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses2\xe4\x01\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponseB\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,10 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=88 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=149 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=151 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=229 - _globals['_BUSSERVICE']._serialized_start=232 - _globals['_BUSSERVICE']._serialized_end=370 + _globals['_CREATEBUSREQUEST']._serialized_start=89 + _globals['_CREATEBUSREQUEST']._serialized_end=222 + _globals['_CREATEBUSRESPONSE']._serialized_start=224 + _globals['_CREATEBUSRESPONSE']._serialized_end=341 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=343 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=404 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=406 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=484 + _globals['_BUSSERVICE']._serialized_start=487 + _globals['_BUSSERVICE']._serialized_end=715 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py index fc9d2389..626025e9 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py @@ -14,6 +14,11 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.CreateBus = channel.unary_unary( + '/where_child_bus.v1.BusService/CreateBus', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.FromString, + ) self.GetBusListByNurseryId = channel.unary_unary( '/where_child_bus.v1.BusService/GetBusListByNurseryId', request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, @@ -24,6 +29,12 @@ def __init__(self, channel): class BusServiceServicer(object): """Missing associated documentation comment in .proto file.""" + def CreateBus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetBusListByNurseryId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -33,6 +44,11 @@ def GetBusListByNurseryId(self, request, context): def add_BusServiceServicer_to_server(servicer, server): rpc_method_handlers = { + 'CreateBus': grpc.unary_unary_rpc_method_handler( + servicer.CreateBus, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.SerializeToString, + ), 'GetBusListByNurseryId': grpc.unary_unary_rpc_method_handler( servicer.GetBusListByNurseryId, request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.FromString, @@ -48,6 +64,23 @@ def add_BusServiceServicer_to_server(servicer, server): class BusService(object): """Missing associated documentation comment in .proto file.""" + @staticmethod + def CreateBus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/CreateBus', + where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def GetBusListByNurseryId(request, target, diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py index 4d1a20c7..724aaf74 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"X\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"Y\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\x9b\x02\n\x0c\x43hildService\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xab\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12)\n\x03sex\x18\x04 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x05 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"X\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"Y\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xfb\x02\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +23,18 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\nChildProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=90 - _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=153 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=155 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=243 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=245 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=311 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=313 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=402 - _globals['_CHILDSERVICE']._serialized_start=405 - _globals['_CHILDSERVICE']._serialized_end=688 + _globals['_CREATECHILDREQUEST']._serialized_start=91 + _globals['_CREATECHILDREQUEST']._serialized_end=262 + _globals['_CREATECHILDRESPONSE']._serialized_start=264 + _globals['_CREATECHILDRESPONSE']._serialized_end=334 + _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=336 + _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=399 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=401 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=489 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=491 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=557 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=559 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=648 + _globals['_CHILDSERVICE']._serialized_start=651 + _globals['_CHILDSERVICE']._serialized_end=1030 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py index 601b983d..26458531 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py @@ -14,6 +14,11 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.CreateChild = channel.unary_unary( + '/where_child_bus.v1.ChildService/CreateChild', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.FromString, + ) self.GetChildListByNurseryID = channel.unary_unary( '/where_child_bus.v1.ChildService/GetChildListByNurseryID', request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, @@ -29,6 +34,12 @@ def __init__(self, channel): class ChildServiceServicer(object): """Missing associated documentation comment in .proto file.""" + def CreateChild(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetChildListByNurseryID(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -44,6 +55,11 @@ def GetChildListByGuardianID(self, request, context): def add_ChildServiceServicer_to_server(servicer, server): rpc_method_handlers = { + 'CreateChild': grpc.unary_unary_rpc_method_handler( + servicer.CreateChild, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.SerializeToString, + ), 'GetChildListByNurseryID': grpc.unary_unary_rpc_method_handler( servicer.GetChildListByNurseryID, request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.FromString, @@ -64,6 +80,23 @@ def add_ChildServiceServicer_to_server(servicer, server): class ChildService(object): """Missing associated documentation comment in .proto file.""" + @staticmethod + def CreateChild(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/CreateChild', + where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.SerializeToString, + where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def GetChildListByNurseryID(request, target, diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py new file mode 100644 index 00000000..3b0c7e8b --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/v1/child_photo.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$where_child_bus/v1/child_photo.proto\x12\x12where_child_bus.v1\"+\n\x17\x44\x65leteChildPhotoRequest\x12\x10\n\x03ids\x18\x01 \x03(\tR\x03ids\"T\n\x18\x44\x65leteChildPhotoResponse\x12&\n\x0fis_success_list\x18\x01 \x03(\x08R\risSuccessList\x12\x10\n\x03ids\x18\x02 \x03(\tR\x03ids2\x82\x01\n\x11\x43hildPhotoService\x12m\n\x10\x44\x65leteChildPhoto\x12+.where_child_bus.v1.DeleteChildPhotoRequest\x1a,.where_child_bus.v1.DeleteChildPhotoResponseB\xf2\x01\n\x16\x63om.where_child_bus.v1B\x0f\x43hildPhotoProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.child_photo_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\017ChildPhotoProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_DELETECHILDPHOTOREQUEST']._serialized_start=60 + _globals['_DELETECHILDPHOTOREQUEST']._serialized_end=103 + _globals['_DELETECHILDPHOTORESPONSE']._serialized_start=105 + _globals['_DELETECHILDPHOTORESPONSE']._serialized_end=189 + _globals['_CHILDPHOTOSERVICE']._serialized_start=192 + _globals['_CHILDPHOTOSERVICE']._serialized_end=322 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py new file mode 100644 index 00000000..82077476 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from where_child_bus.v1 import child_photo_pb2 as where__child__bus_dot_v1_dot_child__photo__pb2 + + +class ChildPhotoServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.DeleteChildPhoto = channel.unary_unary( + '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', + request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.FromString, + ) + + +class ChildPhotoServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def DeleteChildPhoto(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ChildPhotoServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'DeleteChildPhoto': grpc.unary_unary_rpc_method_handler( + servicer.DeleteChildPhoto, + request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'where_child_bus.v1.ChildPhotoService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ChildPhotoService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def DeleteChildPhoto(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', + where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.SerializeToString, + where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index 219f3205..30dade74 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb6\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x36\n\x06status\x18\x05 \x01(\x0e\x32\x1e.where_child_bus.v1.Bus.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03\"\xa5\x05\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12/\n\x03sex\x18\x06 \x01(\x0e\x32\x1d.where_child_bus.v1.Child.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMEN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xf4\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12J\n\x08\x62us_type\x18\x04 \x01(\x0e\x32/.where_child_bus.v1.ChildBusAssociation.BusTypeR\x07\x62usType\"O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestampB\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xcf\x02\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xd8\x04\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMEN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,6 +23,12 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_STATUS']._serialized_start=3160 + _globals['_STATUS']._serialized_end=3257 + _globals['_SEX']._serialized_start=3259 + _globals['_SEX']._serialized_end=3328 + _globals['_BUSTYPE']._serialized_start=3330 + _globals['_BUSTYPE']._serialized_end=3409 _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=420 _globals['_NURSERYRESPONSE']._serialized_start=423 @@ -32,23 +38,17 @@ _globals['_GUARDIANRESPONSE']._serialized_start=1017 _globals['_GUARDIANRESPONSE']._serialized_end=1277 _globals['_BUS']._serialized_start=1280 - _globals['_BUS']._serialized_end=1718 - _globals['_BUS_STATUS']._serialized_start=1621 - _globals['_BUS_STATUS']._serialized_end=1718 - _globals['_CHILD']._serialized_start=1721 - _globals['_CHILD']._serialized_end=2398 - _globals['_CHILD_SEX']._serialized_start=2329 - _globals['_CHILD_SEX']._serialized_end=2398 - _globals['_STATION']._serialized_start=2401 - _globals['_STATION']._serialized_end=2709 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2712 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2956 - _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_start=2877 - _globals['_CHILDBUSASSOCIATION_BUSTYPE']._serialized_end=2956 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=2958 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=3035 - _globals['_CHILDPHOTO']._serialized_start=3038 - _globals['_CHILDPHOTO']._serialized_end=3263 - _globals['_BOARDINGRECORD']._serialized_start=3266 - _globals['_BOARDINGRECORD']._serialized_end=3439 + _globals['_BUS']._serialized_end=1615 + _globals['_CHILD']._serialized_start=1618 + _globals['_CHILD']._serialized_end=2218 + _globals['_STATION']._serialized_start=2221 + _globals['_STATION']._serialized_end=2529 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2532 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2675 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=2677 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=2754 + _globals['_CHILDPHOTO']._serialized_start=2757 + _globals['_CHILDPHOTO']._serialized_end=2982 + _globals['_BOARDINGRECORD']._serialized_start=2985 + _globals['_BOARDINGRECORD']._serialized_end=3158 # @@protoc_insertion_point(module_scope) From e6f976596202a55f76ea9624bb743fb765f823a0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 14:53:06 +0900 Subject: [PATCH 167/771] =?UTF-8?q?chore:config.dart=E3=81=AB=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=83=8F=E3=83=B3=E3=83=89=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=B0=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../android/app/src/main/AndroidManifest.xml | 2 +- frontend/where_child_bus/lib/config/config.dart | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml b/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml index c9179e65..f6a5941f 100644 --- a/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml +++ b/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ - + loadConfig() async { await dotenv.load(); - grpcEndpoint = dotenv.get("GRPC_ENDPOINT"); - grpcPort = int.tryParse(dotenv.get("GRPC_PORT")) ?? 0; + + try { + + grpcEndpoint = dotenv.get("GRPC_ENDPOINT"); + grpcPort = int.tryParse(dotenv.get("GRPC_PORT")) ?? 0; + } catch(e) { + print("設定の読み込みにエラーが発生しました"); + } } } From 294cbbd4d9e071406f01cd88b7e4b90f5b2c9de4 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 14:55:43 +0900 Subject: [PATCH 168/771] =?UTF-8?q?chore:main.dart=E3=81=AB=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=83=8F=E3=83=B3=E3=83=89=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=B0=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/main.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 192d42c9..33e1e26b 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -1,11 +1,17 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; -import 'package:where_child_bus/util/health_check.dart'; +import 'package:where_child_bus/util/api/health_check.dart'; import 'package:where_child_bus/config/config.dart'; void main() async { - await appConfig.loadConfig(); - await serviceHealthCheck(); + WidgetsFlutterBinding.ensureInitialized(); + + try { + await appConfig.loadConfig(); + await serviceHealthCheck(); + } catch (e) { + print("Failed to initialize the app"); + } runApp(const MyApp()); } From b0444dde98df7b0e165b1531ec5bc50e381e31b4 Mon Sep 17 00:00:00 2001 From: koto623 Date: Mon, 12 Feb 2024 14:57:06 +0900 Subject: [PATCH 169/771] =?UTF-8?q?feat:edit=E3=83=9A=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=81=AE=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_edit_page.dart | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart new file mode 100644 index 00000000..d85eb988 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -0,0 +1,18 @@ +import 'package:flutter/material.dart'; + +class StudentEditPage extends StatefulWidget { + const StudentEditPage({super.key}); + + @override + State createState() => _StudentEditPage(); +} + +class _StudentEditPage extends State { + @override + Widget build(BuildContext context) { + return const Center( + child: Column(children: [ + Text("編集画面"), + ])); + } +} From 6899babd30215b026dfaf1ad0aaa5819fe9b2e2e Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 15:01:23 +0900 Subject: [PATCH 170/771] =?UTF-8?q?chore:HealthCheck=E3=81=AE=E8=BF=94?= =?UTF-8?q?=E3=82=8A=E5=80=A4=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/util/api/health_check.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/util/api/health_check.dart b/frontend/where_child_bus/lib/util/api/health_check.dart index 38cbc631..14873104 100644 --- a/frontend/where_child_bus/lib/util/api/health_check.dart +++ b/frontend/where_child_bus/lib/util/api/health_check.dart @@ -20,7 +20,7 @@ Future serviceHealthCheck() async { PingResponse res = await grpcClient.ping(rqst); print(res.message); await channel.shutdown(); - return Future.value(res); + return res; } catch (error) { developer.log('Caught error: $error'); await channel.shutdown(); From fbbac843219e3516e9f31fa36e5a2b9767b01acb Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 15:13:55 +0900 Subject: [PATCH 171/771] fix: change workflows --- .github/workflows/deploy-to-gcloud.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index e9f1eb5b..d2e3253e 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -3,7 +3,7 @@ name: Deploy to Google Cloud Run on: push: branches: - - develop + - ci/backend # デプロイをトリガーするブランチを指定 jobs: setup-build-deploy: @@ -15,10 +15,10 @@ jobs: uses: actions/checkout@v2 - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@v2 + uses: google-github-actions/setup-gcloud@master with: project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} # GitHub Secretsからサービスアカウントキーを参照 + service_account_key: ${{ secrets.GCP_SA_KEY }} export_default_credentials: true - name: Build Docker Image @@ -34,11 +34,10 @@ jobs: --build-arg PORT="${{ secrets.PORT }}" \ --build-arg MODE_DEV="${{ secrets.MODE_DEV }}" - - name: Push Docker Image to Google Container Registry run: | docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest - name: Deploy to Cloud Run run: | - gcloud run deploy where-child-bus-grpc --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest --platform=managed --allow-unauthenticated --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.GCP_REGION }} \ No newline at end of file + gcloud run deploy where-child-bus-grpc --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest --platform=managed --allow-unauthenticated --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.GCP_REGION }} From adacdf3bcdfda0ebc4566ab66760c4c7c63cb02a Mon Sep 17 00:00:00 2001 From: koto623 Date: Mon, 12 Feb 2024 15:33:05 +0900 Subject: [PATCH 172/771] =?UTF-8?q?feat:edit=E3=83=9A=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=81=B8=E3=81=AE=E9=81=B7=E7=A7=BB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_detail_sheet.dart | 17 +++++++++++----- .../student_list_page/student_edit_page.dart | 20 ++++++++++--------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart index 2d78aab3..281f877f 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; class StudentDetailSheet extends StatelessWidget { final String childName; @@ -16,30 +17,36 @@ class StudentDetailSheet extends StatelessWidget { borderRadius: BorderRadius.only( topLeft: Radius.circular(20.0), topRight: Radius.circular(20.0)), ), - child: modalBody(), + child: modalBody(context), ); } - Widget modalBody() { + Widget modalBody(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - modalHeader(), + modalHeader(context), Container( margin: const EdgeInsets.only(top: 20), child: childDetailList()) ], ); } - Widget modalHeader() { + Widget modalHeader(BuildContext context) { return Stack(children: [ Align( alignment: Alignment.topRight, child: ElevatedButton( style: ElevatedButton.styleFrom(shape: const CircleBorder()), //将来的に編集画面へ遷移する。 - onPressed: () {}, + onPressed: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (BuildContext context) => StudentEditPage( + childName: childName, + ), + )); + }, child: const Icon(Icons.edit), ), ), diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index d85eb988..c59742cc 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -1,18 +1,20 @@ import 'package:flutter/material.dart'; -class StudentEditPage extends StatefulWidget { - const StudentEditPage({super.key}); +class StudentEditPage extends StatelessWidget { + final String childName; - @override - State createState() => _StudentEditPage(); -} + const StudentEditPage({super.key, required this.childName}); -class _StudentEditPage extends State { @override Widget build(BuildContext context) { return const Center( - child: Column(children: [ - Text("編集画面"), - ])); + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "編集画面", + style: TextStyle(color: Colors.black, fontSize: 15), + ), + ])); } } From 6b4f74c88c52ce83bb14eb07940bfbe77acc5e0f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 15:38:11 +0900 Subject: [PATCH 173/771] fix(proto): Fix imports and update proto message types --- .../where_child_bus/v1/guardian.pb.dart | 25 ++++++------------- .../where_child_bus/v1/nursery.pb.dart | 19 ++++---------- .../where_child_bus/v1/resources.pb.dart | 20 +++++++-------- 3 files changed, 22 insertions(+), 42 deletions(-) diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 689a9109..0be6e2b9 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -82,9 +82,8 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { class GuardianLoginResponse extends $pb.GeneratedMessage { factory GuardianLoginResponse({ $core.bool? success, - - $1.GuardianResponse? guardian, - $1.NurseryResponse? nursery, + $6.GuardianResponse? guardian, + $6.NurseryResponse? nursery, }) { final $result = create(); if (success != null) { @@ -104,8 +103,8 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$1.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $1.GuardianResponse.create) - ..aOM<$1.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $1.NurseryResponse.create) + ..aOM<$6.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $6.GuardianResponse.create) + ..aOM<$6.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $6.NurseryResponse.create) ..hasRequiredFields = false ; @@ -151,25 +150,15 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { $6.GuardianResponse ensureGuardian() => $_ensure(1); @$pb.TagNumber(3) - - $1.NurseryResponse get nursery => $_getN(2); + $6.NurseryResponse get nursery => $_getN(2); @$pb.TagNumber(3) - set nursery($1.NurseryResponse v) { setField(3, v); } + set nursery($6.NurseryResponse v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasNursery() => $_has(2); @$pb.TagNumber(3) void clearNursery() => clearField(3); @$pb.TagNumber(3) - $1.NurseryResponse ensureNursery() => $_ensure(2); -} - -class GuardianServiceApi { - $pb.RpcClient _client; - GuardianServiceApi(this._client); - - $async.Future guardianLogin($pb.ClientContext? ctx, GuardianLoginRequest request) => - _client.invoke(ctx, 'GuardianService', 'GuardianLogin', request, GuardianLoginResponse()) - ; + $6.NurseryResponse ensureNursery() => $_ensure(2); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart index 4908461e..452631d3 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -82,7 +82,7 @@ class NurseryLoginRequest extends $pb.GeneratedMessage { class NurseryLoginResponse extends $pb.GeneratedMessage { factory NurseryLoginResponse({ $core.bool? success, - $1.NurseryResponse? nursery, + $6.NurseryResponse? nursery, }) { final $result = create(); if (success != null) { @@ -99,7 +99,7 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$1.NurseryResponse>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $1.NurseryResponse.create) + ..aOM<$6.NurseryResponse>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $6.NurseryResponse.create) ..hasRequiredFields = false ; @@ -134,24 +134,15 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $1.NurseryResponse get nursery => $_getN(1); + $6.NurseryResponse get nursery => $_getN(1); @$pb.TagNumber(2) - set nursery($1.NurseryResponse v) { setField(2, v); } + set nursery($6.NurseryResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasNursery() => $_has(1); @$pb.TagNumber(2) void clearNursery() => clearField(2); @$pb.TagNumber(2) - $1.NurseryResponse ensureNursery() => $_ensure(1); -} - -class NurseryServiceApi { - $pb.RpcClient _client; - NurseryServiceApi(this._client); - - $async.Future nurseryLogin($pb.ClientContext? ctx, NurseryLoginRequest request) => - _client.invoke(ctx, 'NurseryService', 'NurseryLogin', request, NurseryLoginResponse()) - ; + $6.NurseryResponse ensureNursery() => $_ensure(1); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 981b3dc3..414c91ef 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -192,8 +192,8 @@ class NurseryResponse extends $pb.GeneratedMessage { $core.String? address, $core.String? phoneNumber, $core.String? email, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $5.Timestamp? createdAt, + $5.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -233,8 +233,8 @@ class NurseryResponse extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'address') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) + ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) ..hasRequiredFields = false ; @@ -315,26 +315,26 @@ class NurseryResponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(7) - $0.Timestamp get createdAt => $_getN(6); + $5.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($0.Timestamp v) { setField(7, v); } + set createdAt($5.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureCreatedAt() => $_ensure(6); + $5.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $0.Timestamp get updatedAt => $_getN(7); + $5.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($0.Timestamp v) { setField(8, v); } + set updatedAt($5.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureUpdatedAt() => $_ensure(7); + $5.Timestamp ensureUpdatedAt() => $_ensure(7); } class Guardian extends $pb.GeneratedMessage { From 5b6fabc0362bf8446b47d4deab11057c2e912d0f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 15:59:20 +0900 Subject: [PATCH 174/771] =?UTF-8?q?feat(proto):=20GitHub=20Actions?= =?UTF-8?q?=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92?= =?UTF-8?q?v2=E3=81=8B=E3=82=89v3=E3=81=AB=E6=9B=B4=E6=96=B0=E3=81=97?= =?UTF-8?q?=E3=80=81Google=20Cloud=E3=81=B8=E3=81=AE=E8=AA=8D=E8=A8=BC?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-to-gcloud.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index d2e3253e..1e491776 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -12,14 +12,22 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@master + - id: "auth" + name: "Authenticate to Google Cloud" + uses: "google-github-actions/auth@v0" with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true + token_format: "access_token" + workload_identity_provider: github-actions-service-account + service_account: projects/484440918227/locations/global/workloadIdentityPools/github-action-pool/providers/github-action-provider + # https://github.com/dockeogle-container-registry-gcr + - name: Login to GCR + uses: docker/login-action@v2 + with: + registry: asia.gcr.io + username: oauth2accesstoken + password: ${{ steps.auth.outputs.access_token }} - name: Build Docker Image run: | From 83d81763c65ad56d0573ffc42870267f6b2f3a89 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 16:00:30 +0900 Subject: [PATCH 175/771] =?UTF-8?q?feat(proto):=20Google=20Cloud=E3=81=AE?= =?UTF-8?q?=E8=AA=8D=E8=A8=BC=E3=82=A2=E3=82=AF=E3=82=B7=E3=83=A7=E3=83=B3?= =?UTF-8?q?=E3=82=92v0=E3=81=8B=E3=82=89v2=E3=81=AB=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-to-gcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 1e491776..fb6a2e4c 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -16,7 +16,7 @@ jobs: - id: "auth" name: "Authenticate to Google Cloud" - uses: "google-github-actions/auth@v0" + uses: "google-github-actions/auth@v2" with: token_format: "access_token" workload_identity_provider: github-actions-service-account From b9d71514a341a0383a85570c8ca6bb2b71a8d4a4 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 16:52:21 +0900 Subject: [PATCH 176/771] =?UTF-8?q?ci:=20DockerfileLocal=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=97=E3=80=81=E3=83=93=E3=83=AB=E3=83=89=E3=81=A8?= =?UTF-8?q?=E5=AE=9F=E8=A1=8C=E3=81=AE=E7=92=B0=E5=A2=83=E3=82=92=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/DockerfileLocal | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 backend/DockerfileLocal diff --git a/backend/DockerfileLocal b/backend/DockerfileLocal new file mode 100644 index 00000000..2b94a12f --- /dev/null +++ b/backend/DockerfileLocal @@ -0,0 +1,30 @@ +# First stage: build environment +FROM golang:1.21.5 AS builder + +WORKDIR /srv/grpc +COPY . . +# .env ファイルをイメージ内にコピー +COPY .env / +RUN go mod download + +ARG VERS="3.11.4" +ARG ARCH="linux-x86_64" + +RUN CGO_ENABLED=0 GOOS=linux \ + go build -a -installsuffix cgo \ + -o /go/bin/server \ + github.com/GreenTeaProgrammers/WhereChildBus/backend/cmd/server + +# Final stage: runtime environment +# CA証明書が必要なので、alpineをベースにする +FROM alpine:latest + +# 必要なパッケージをインストール +RUN apk --no-cache add ca-certificates + +# ビルドステージからバイナリと.envファイルをコピー +COPY --from=builder /go/bin/server /server +COPY --from=builder /srv/grpc/.env / + +# アプリケーションの起動 +ENTRYPOINT ["/server"] \ No newline at end of file From 3c1d78f088df21cdd416d6458dffb2cd1d833ca3 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 17:36:13 +0900 Subject: [PATCH 177/771] =?UTF-8?q?fix(ml):=20validation=E6=99=82=E3=81=AE?= =?UTF-8?q?model.eval()=E5=AE=9F=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/main.py | 11 ++++------- machine_learning/src/face_detect_model/trainer.py | 2 ++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index 3bc11d6f..5aea3ef9 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -34,22 +34,19 @@ def main(args: argparse.Namespace, config: dict): face_detect_model = FaceDetectModel(config, num_classes, image_shape) face_detect_model.to(args.device) + trainer = Trainer( + args, config, face_detect_model, train_dataset, valid_dataset, test_dataset + ) # trainerの読み込み if args.mode == "train": # 学習 - face_detect_model = face_detect_model.train() - trainer = Trainer( - args, config, face_detect_model, train_dataset, valid_dataset, test_dataset - ) + trainer.train() else: # テスト face_detect_model.load_state_dict( torch.load(config["train"]["test_model_path"]) ) - trainer = Trainer( - args, config, face_detect_model, train_dataset, valid_dataset, test_dataset - ) trainer.test() diff --git a/machine_learning/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py index 2fe5b135..fe8b29b6 100644 --- a/machine_learning/src/face_detect_model/trainer.py +++ b/machine_learning/src/face_detect_model/trainer.py @@ -58,6 +58,7 @@ def __init__( def train(self): for _ in range(self.config["train"]["epoch"]): + self.model.train() for label, image in self.train_dataloader: self.step(label, image) self.end_epoch() @@ -93,6 +94,7 @@ def end_epoch(self): self.step_num = 1 def validate(self): + self.model.eval() collect_list = [] pred_list = [] for label, image in self.valid_dataloader: From c2e40261fcdc5f7094929b7cba2f94954977ac42 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 17:39:57 +0900 Subject: [PATCH 178/771] =?UTF-8?q?chore:=20TODO=E3=81=AE=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=EF=BC=8Crefactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index 5aea3ef9..ece7eeaf 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -16,8 +16,7 @@ def main(args: argparse.Namespace, config: dict): train_data_size = int(len(dataset) * config["dataset"]["ratio"]["train"]) valid_data_size = int(len(dataset) * config["dataset"]["ratio"]["valid"]) - test_data_size = int(len(dataset) * config["dataset"]["ratio"]["test"]) - train_data_size = len(dataset) - valid_data_size - test_data_size + test_data_size = len(dataset) - train_data_size - valid_data_size train_dataset, valid_dataset, test_dataset = torch.utils.data.random_split( dataset, @@ -34,20 +33,21 @@ def main(args: argparse.Namespace, config: dict): face_detect_model = FaceDetectModel(config, num_classes, image_shape) face_detect_model.to(args.device) + # trainerの読み込み trainer = Trainer( args, config, face_detect_model, train_dataset, valid_dataset, test_dataset ) - # trainerの読み込み if args.mode == "train": # 学習 - trainer.train() - else: + elif args.mode == "test": # テスト face_detect_model.load_state_dict( torch.load(config["train"]["test_model_path"]) ) trainer.test() + else: # TODO: 他のモードを実装する + raise ValueError("invalid mode") if __name__ == "__main__": From 0c1132f8f92d04f4212bb080e1074dcf698dadd2 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 17:43:50 +0900 Subject: [PATCH 179/771] refactor(ml) --- .../data/detectFaceAndClip.py | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py index 0faa8ec1..b0aa06fc 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -29,13 +29,10 @@ def clip_and_resize_face(face, image, image_size): def save_face(face, save_dir, save_file_name): """クリップされた顔画像を保存する""" - if not os.path.exists(os.path.dirname(save_dir)): - os.makedirs(os.path.dirname(save_dir)) + os.makedirs(save_dir, exist_ok=True) + save_path = os.path.join(save_dir, save_file_name) - try: - cv2.imwrite(save_path, face) - except Exception as e: - raise e + cv2.imwrite(save_path, face) def main(): @@ -52,13 +49,14 @@ def main(): ) # 保存先ディレクトリの作成,存在した場合は中身を削除 - if not os.path.exists(save_dir): - os.makedirs(save_dir) - else: - for file in os.listdir(save_dir): - file_path = os.path.join(save_dir, file) - if os.path.isfile(file_path): - os.remove(file_path) + os.makedirs(save_dir, exist_ok=True) + + for file in os.listdir(save_dir): + file_path = os.path.join(save_dir, file) + if os.path.isfile(file_path): + os.remove(file_path) + # Haar Cascadeの読み込み + face_cascade = load_cascade(face_cascade_path) # 画像の読み込み # TODO: 良い感じのlog @@ -74,8 +72,6 @@ def main(): raise ValueError( f"画像ファイルが見つからないか読み込めません: {image_path}" ) - # Haar Cascadeの読み込み - face_cascade = load_cascade(face_cascade_path) # 画像から顔を検出 faces = detect_face( From cbddc0636d3bfaeb652236050bba16da974ea0ed Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 17:49:54 +0900 Subject: [PATCH 180/771] =?UTF-8?q?chore(ml):=20comment=E3=81=AE=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=EF=BC=8CConv2d=E3=81=AEoutput=20channnel=E3=82=92conf?= =?UTF-8?q?ig.yaml=E3=81=8B=E3=82=89=E6=8C=87=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/config.yaml | 2 ++ .../model/faceDetectModel.py | 20 ++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index f272e013..548e842f 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -3,6 +3,8 @@ model: in_channels: 3 Conv2d: kernel_size: 3 + out_channels_1: 16 + out_channels_2: 32 pooling: kernel_size: 2 stride: 2 diff --git a/machine_learning/src/face_detect_model/model/faceDetectModel.py b/machine_learning/src/face_detect_model/model/faceDetectModel.py index 604f1882..5bb38969 100644 --- a/machine_learning/src/face_detect_model/model/faceDetectModel.py +++ b/machine_learning/src/face_detect_model/model/faceDetectModel.py @@ -9,11 +9,19 @@ def compute_conv_output_size(L_in, kernel_size, stride=1, padding=0, dilation=1) class FaceDetectModel(nn.Module): def __init__(self, config: dict, num_classes: int, input_dim: tuple): + """顔検出モデルの初期化 + Args: + config (dict): モデル設定 + num_classes (int): 出力クラス数 + input_dim (tuple): 入力画像の次元 (チャンネル, 高さ, 幅) + """ super(FaceDetectModel, self).__init__() self.config = config in_channels = config["model"]["in_channels"] kernel_size = config["model"]["Conv2d"]["kernel_size"] + out_channels_1 = config["model"]["Conv2d"]["out_channels_1"] + out_channels_2 = config["model"]["Conv2d"]["out_channels_2"] pooling_kernel_size = config["model"]["pooling"]["kernel_size"] pooling_stride = config["model"]["pooling"]["stride"] @@ -21,9 +29,15 @@ def __init__(self, config: dict, num_classes: int, input_dim: tuple): self.pool = nn.MaxPool2d(kernel_size=pooling_kernel_size, stride=pooling_stride) self.conv1 = nn.Conv2d( - in_channels=in_channels, out_channels=16, kernel_size=kernel_size + in_channels=in_channels, + out_channels=out_channels_1, + kernel_size=kernel_size, + ) + self.conv2 = nn.Conv2d( + in_channels=out_channels_1, + out_channels=out_channels_2, + kernel_size=kernel_size, ) - self.conv2 = nn.Conv2d(in_channels=16, out_channels=32, kernel_size=kernel_size) self.flatten = nn.Flatten() @@ -38,7 +52,7 @@ def __init__(self, config: dict, num_classes: int, input_dim: tuple): ) # 最終的な特徴マップのサイズに基づいてLinear層の入力サイズを設定 - linear_input_size = 32 * size * size + linear_input_size = out_channels_2 * size * size self.linear = nn.Linear(linear_input_size, config["model"]["hidden_size"]) self.classifier = nn.Linear(config["model"]["hidden_size"], num_classes) From 0ce6440bd37574dafe52a6a0c79acc80886b62f0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 17:58:18 +0900 Subject: [PATCH 181/771] =?UTF-8?q?feat:=E7=94=BB=E9=9D=A2=E9=81=B7?= =?UTF-8?q?=E7=A7=BB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 28 ++++++----- .../bus_edit_page/bus_edit_page.dart | 48 +++++++++++++++++++ .../bus_edit_page/styles/styles.dart | 32 +++++++++++++ 3 files changed, 96 insertions(+), 12 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 0ceda48c..37a8394d 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -1,4 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart'; class BottomSheetWidget extends StatelessWidget { final busStations = ["station1", "station2", "station3","station4","station5","station6", "station7", "station8", "station7", "station7"]; @@ -21,7 +23,7 @@ class BottomSheetWidget extends StatelessWidget { child: Stack( children: [ modalBody(context), - editButton(), + editButton(context), ] ), ); @@ -43,17 +45,18 @@ class BottomSheetWidget extends StatelessWidget { ); } - Widget editButton() { + Widget editButton(BuildContext context) { return Align( - alignment: const Alignment(1, -1), + alignment: const Alignment(1, -0.98), child: Padding( padding: const EdgeInsets.symmetric(horizontal: 5), child: ElevatedButton( - onPressed: () {}, - style: ElevatedButton.styleFrom( - backgroundColor: Colors.grey.shade300, - elevation: 0, - ), + onPressed: () { + Navigator.push( + context,MaterialPageRoute(builder: (context) => BusEditPage()) + ); + }, + style: editButtonStyle(), child: const Text( "Edit", style: TextStyle( @@ -152,8 +155,7 @@ class BottomSheetWidget extends StatelessWidget { ), ); } - - //TODO 将来的に乗客詳細ページへの遷移を実装する +//TODO 将来的に乗客詳細ページへの遷移を実装する Widget boardingConfirmButton(BuildContext context) { const double fontSize = 20; @@ -164,7 +166,8 @@ class BottomSheetWidget extends StatelessWidget { width: MediaQuery.of(context).size.width * 0.6, height: fontSize * 2, child: ElevatedButton( - onPressed: () {}, + onPressed: () { + }, style: ElevatedButton.styleFrom( backgroundColor: Colors.black, ), @@ -180,4 +183,5 @@ class BottomSheetWidget extends StatelessWidget { ), ); } -} \ No newline at end of file + +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart new file mode 100644 index 00000000..5a69a8fb --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -0,0 +1,48 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart'; + +class BusEditPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () => primaryFocus?.unfocus(), + child: Scaffold( + appBar: AppBar(), + body: pageBody() + ), + ); + } + + Widget pageBody() { + return Center( + child: courseNameBody(), + ); + } + + Widget courseNameBody() { + return Column( + children: [ + courseNameTitle(), + courseNameInputField(), + ], + ); + } + + + + Widget courseNameTitle() { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "コース名", + style: normalText(), + ), + ); + } + + Widget courseNameInputField() { + return TextField( + decoration: editPageInputDecoration("コース名", "コース名を入力して下さい") + ); + } +} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart new file mode 100644 index 00000000..a3ac4d20 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart @@ -0,0 +1,32 @@ +import "package:flutter/material.dart"; + +ButtonStyle editButtonStyle () { + return ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.grey.shade300), + minimumSize: MaterialStateProperty.all(Size(60, 60)), + shape: MaterialStateProperty.all( + const CircleBorder( + side: BorderSide( + color: Colors.white, + width: 1, + style: BorderStyle.solid, + ), + ) + ) + ); +} + +InputDecoration editPageInputDecoration(String labelText, String hintText) { + return InputDecoration( + labelText: labelText, + hintText: hintText, + border: const OutlineInputBorder(), + ); +} + +TextStyle normalText() { + return const TextStyle( + color: Colors.black, + fontSize: 16, + ); +} \ No newline at end of file From d360e8693d79c8db16c74f8f42f4839d25050dac Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 18:27:48 +0900 Subject: [PATCH 182/771] =?UTF-8?q?chore(ml):=20=E8=AA=AD=E3=81=BF?= =?UTF-8?q?=E8=BE=BC=E3=81=BF=E5=AF=BE=E8=B1=A1=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E5=88=A4=E5=AE=9A=E3=82=92=E3=83=A1=E3=82=BD=E3=83=83?= =?UTF-8?q?=E3=83=89=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/data/faceDetectDataset.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index 77ad9ade..f2b38cce 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -6,6 +6,8 @@ class FaceDetectDataset(Dataset): + VALID_EXTENSIONS = {".png"} # 適宜調整 + def __init__(self, config): self.data_dir = config["dataset"]["root_path"] self.face_data = [] @@ -15,13 +17,15 @@ def __init__(self, config): for file_name in os.listdir(self.data_dir): # macOS環境におけるDS_Storeなどのファイルをスキップ - if os.path.splitext(file_name)[1][1:] != "png": + if not self._is_valid_file(file_name): continue file_path = os.path.join(self.data_dir, file_name) people_name = file_name.split("-")[0] image = cv2.imread(file_path) + if image is None: + continue image_tensor = TF.to_tensor(image) # 人物名とラベルの対応を辞書に保存 @@ -36,6 +40,9 @@ def __init__(self, config): ) self.face_data.append(label_img_data) + def _is_valid_file(self, file_name): + return os.path.splitext(file_name)[1].lower() in self.VALID_EXTENSIONS + def __len__(self): return len(self.face_data) From d837d370a337ab40e51b6d4e939acdc9d7ad97b2 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 18:28:26 +0900 Subject: [PATCH 183/771] =?UTF-8?q?feat(ml):=20logger=E3=81=AE=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9=E3=81=A8logger=E3=82=92=E7=94=A8=E3=81=84=E3=81=9Flog?= =?UTF-8?q?ging=E3=81=AE=E6=95=B4=E5=82=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/main.py | 5 ++++- machine_learning/src/face_detect_model/trainer.py | 13 ++++++++----- machine_learning/src/face_detect_model/util.py | 9 +++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index ece7eeaf..e892fa7e 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -5,13 +5,15 @@ from data.faceDetectDataset import FaceDetectDataset from model.faceDetectModel import FaceDetectModel from trainer import Trainer +from util import logger -# TODO: loggerを用いたログ出力を実装する def main(args: argparse.Namespace, config: dict): args.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") + logger.info("Your env is : {args.device}") # datasetの読み込み + logger.info("dataset Initializing") dataset = FaceDetectDataset(config) train_data_size = int(len(dataset) * config["dataset"]["ratio"]["train"]) @@ -28,6 +30,7 @@ def main(args: argparse.Namespace, config: dict): ) # modelの読み込み + logger.info("model Initializing") num_classes = dataset.get_label_num() image_shape = dataset.get_image_shape() face_detect_model = FaceDetectModel(config, num_classes, image_shape) diff --git a/machine_learning/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py index fe8b29b6..d025461d 100644 --- a/machine_learning/src/face_detect_model/trainer.py +++ b/machine_learning/src/face_detect_model/trainer.py @@ -5,6 +5,7 @@ from data.faceDetectDataset import FaceDetectDataset from model.faceDetectModel import FaceDetectModel +from util import logger class Trainer: @@ -17,6 +18,7 @@ def __init__( valid_dataset: FaceDetectDataset, test_dataset: FaceDetectDataset, ): + logger.info("Initializing Trainer...") self.args = args self.config = config self.model = model @@ -57,6 +59,7 @@ def __init__( os.makedirs(self.save_model_dir) def train(self): + logger.info("Start Training") for _ in range(self.config["train"]["epoch"]): self.model.train() for label, image in self.train_dataloader: @@ -84,7 +87,7 @@ def step(self, label: torch.Tensor, image: torch.Tensor): self.step_num += 1 def end_epoch(self): - print(f"Epoch {self.epoch} Loss: {self.last_loss}") + logger.info(f"Epoch {self.epoch} Loss: {self.last_loss}") if self.last_loss < self.best_loss: self.best_loss = self.last_loss @@ -107,8 +110,8 @@ def validate(self): collect_list.append(label) accuracy = self.calc_accuracy(pred_list, collect_list) - print(f"########## Epoch {self.epoch} ##########") - print(f"Validation Accuracy: {accuracy}") + logger.info(f"########## Epoch {self.epoch} ##########") + logger.info(f"Validation Accuracy: {accuracy}") if self.args.debug: print(f"Collect: {collect_list}") @@ -129,8 +132,8 @@ def test(self): collect_list.append(label) accuracy = self.calc_accuracy(pred_list, collect_list) - print("########## Test ##########") - print(f"Test Accuracy: {accuracy}") + logger.info("########## Test ##########") + logger.info(f"Test Accuracy: {accuracy}") if self.args.debug: print(f"Collect: {collect_list}") print(f"Predict: {pred_list}") diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index c81a479d..6e73254f 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -1,6 +1,15 @@ +import logging + import random import torch +logging.basicConfig( + format="%(asctime)s - %(levelname)s - %(name)s - PID: %(process)d - %(message)s", + datefmt="%m/%d/%Y %H:%M:%S", + level=logging.INFO, +) +logger = logging.getLogger(__name__) + def set_seed(seed): random.seed(seed) From b57e505164665bbfa08fc43b339297ffa6dc2cf5 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 12 Feb 2024 20:25:25 +0900 Subject: [PATCH 184/771] =?UTF-8?q?chore(ml):=20TODO=E3=81=AE=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/data/faceDetectDataset.py | 1 + 1 file changed, 1 insertion(+) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index f2b38cce..c6ee3eaf 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -23,6 +23,7 @@ def __init__(self, config): file_path = os.path.join(self.data_dir, file_name) people_name = file_name.split("-")[0] + # TODO: データ拡張によってはBGR -> RGB変換処理を検討 image = cv2.imread(file_path) if image is None: continue From a0091a6d3dbb3acfd5c6c0ae7068771e503169e8 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 20:46:26 +0900 Subject: [PATCH 185/771] =?UTF-8?q?feat:=E5=85=A5=E5=8A=9B=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=A0=E3=81=A8=E3=82=B5=E3=83=A0=E3=83=8D?= =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=81=AE=E9=85=8D=E7=BD=AE=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_edit_page/bus_edit_page.dart | 50 +++++++++---------- .../components/input_element.dart | 25 ++++++++++ .../bus_edit_page/components/input_field.dart | 20 ++++++++ .../components/input_field_title.dart | 19 +++++++ .../bus_edit_page/styles/styles.dart | 1 + 5 files changed, 89 insertions(+), 26 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_element.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field_title.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 5a69a8fb..de19a048 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; class BusEditPage extends StatelessWidget { @override @@ -8,41 +8,39 @@ class BusEditPage extends StatelessWidget { onTap: () => primaryFocus?.unfocus(), child: Scaffold( appBar: AppBar(), - body: pageBody() + body: pageBody(context) ), ); } - Widget pageBody() { + Widget pageBody(BuildContext context) { return Center( - child: courseNameBody(), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const InputElement(inputFieldTitle: "コース名", labelText: "コース名", hintText: "コース名を入力してください"), + busThumbnail(context), + ], + ), ); } - Widget courseNameBody() { + + Widget busThumbnail(BuildContext context) { return Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - courseNameTitle(), - courseNameInputField(), - ], - ); - } - - - - Widget courseNameTitle() { - return Padding( - padding: const EdgeInsets.all(8.0), - child: Text( - "コース名", - style: normalText(), - ), - ); - } - - Widget courseNameInputField() { - return TextField( - decoration: editPageInputDecoration("コース名", "コース名を入力して下さい") + const Padding( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Text("サムネイル"), + ), + SizedBox( + width: MediaQuery.of(context).size.width * 0.3, + height: MediaQuery.of(context).size.width * 0.3, + child: Card(), + ), + ] ); } } \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_element.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_element.dart new file mode 100644 index 00000000..8bb954cd --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_element.dart @@ -0,0 +1,25 @@ +import "package:flutter/material.dart"; +import "package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_field.dart"; +import "package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_field_title.dart"; + +class InputElement extends StatelessWidget { + final String inputFieldTitle; + final String labelText; + final String hintText; + + const InputElement({super.key, required this.inputFieldTitle, required this.labelText, required this.hintText}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InputFieldTitle(title: inputFieldTitle), + InputField(labelText: labelText, hintText: hintText), + ], + ), + ); + } +} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart new file mode 100644 index 00000000..e92fa563 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart @@ -0,0 +1,20 @@ + +import "package:flutter/material.dart"; +import "package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart"; + +class InputField extends StatelessWidget { + final String labelText; + final String hintText; + + const InputField({super.key, required this.labelText, required this.hintText}); + + @override + Widget build(BuildContext context) { + return Container( + width: MediaQuery.of(context).size.width * 0.5, + child: TextField( + decoration: editPageInputDecoration(labelText, hintText) + ), + ); + } +} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field_title.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field_title.dart new file mode 100644 index 00000000..2eb606c0 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field_title.dart @@ -0,0 +1,19 @@ +import "package:flutter/material.dart"; +import "package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart"; + +class InputFieldTitle extends StatelessWidget { + final String title; + + const InputFieldTitle({required this.title}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 5), + child: Text( + title, + style: normalText() + ), + ); + } +} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart index a3ac4d20..431edca5 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart @@ -21,6 +21,7 @@ InputDecoration editPageInputDecoration(String labelText, String hintText) { labelText: labelText, hintText: hintText, border: const OutlineInputBorder(), + contentPadding: EdgeInsets.symmetric(vertical: 5) ); } From e3a5c3b7a8e9a8fa0c4aec983784d6440bc82c97 Mon Sep 17 00:00:00 2001 From: koto623 Date: Mon, 12 Feb 2024 20:54:13 +0900 Subject: [PATCH 186/771] =?UTF-8?q?feat:=E5=85=A5=E5=8A=9B=E6=AC=84?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_detail_sheet.dart | 5 +- .../student_list_page/student_edit_page.dart | 84 ++++++++++++++++--- 2 files changed, 73 insertions(+), 16 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart index 281f877f..116f4c91 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart @@ -42,10 +42,7 @@ class StudentDetailSheet extends StatelessWidget { //将来的に編集画面へ遷移する。 onPressed: () { Navigator.of(context).push(MaterialPageRoute( - builder: (BuildContext context) => StudentEditPage( - childName: childName, - ), - )); + builder: (BuildContext context) => StudentEditPage())); }, child: const Icon(Icons.edit), ), diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index c59742cc..4330e924 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -1,20 +1,80 @@ import 'package:flutter/material.dart'; -class StudentEditPage extends StatelessWidget { - final String childName; +class StudentEditPage extends StatefulWidget { + StudentEditPage({super.key}); - const StudentEditPage({super.key, required this.childName}); + @override + State createState() => _StudentEditPageState(); +} + +class _StudentEditPageState extends State { + final List busCourse = ["コース1", "コース2", "コース3"]; + final List busStop = ["停留所1", "停留所2", "停留所3"]; @override Widget build(BuildContext context) { - return const Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - "編集画面", - style: TextStyle(color: Colors.black, fontSize: 15), - ), - ])); + return GestureDetector( + onTap: () => primaryFocus?.unfocus(), + child: Scaffold( + appBar: AppBar(), + body: pageBody(context), + ), + ); + } + + Widget pageBody(BuildContext context) { + return Center( + child: childNameBody(context), + ); + } + + Widget childNameBody(BuildContext context) { + return Column( + children: [ + textInputField(context, "園児氏名", "園児氏名を入力してください", TextInputType.name), + textInputField(context, "年齢", "年齢を入力してください", TextInputType.number), + textInputField(context, "保護者氏名", "保護者氏名を入力してください", TextInputType.name), + textInputField( + context, "保護者連絡先", "保護者連絡先を入力してください", TextInputType.phone), + selectValueBox(context, busCourse), + selectValueBox(context, busStop), + ], + ); + } + + Widget selectValueBox(BuildContext context, List lists) { + String isSelectedValue = lists.first; + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + child: DropdownButton( + value: isSelectedValue, + items: lists + .map((String list) => + DropdownMenuItem(value: list, child: Text(list))) + .toList(), + onChanged: (String? value) { + setState(() { + isSelectedValue = value!; + }); + }), + ); + } + + Widget textInputField(BuildContext context, String labelText, String hintText, + TextInputType type) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + child: TextField( + decoration: formInputDecoration(labelText, hintText), + keyboardType: type, + )); + } + + InputDecoration formInputDecoration(String labelText, String hintText) { + return InputDecoration( + labelText: labelText, + hintText: hintText, + border: const OutlineInputBorder(), + ); } } From 39499bffec5974fa0121e08b831698bc3c1861bc Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 20:55:01 +0900 Subject: [PATCH 187/771] =?UTF-8?q?refactor:StationsList=E3=82=92=E6=8A=BD?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 5 ++- .../components/stations_list.dart | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 37a8394d..04f7b5e2 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart'; class BottomSheetWidget extends StatelessWidget { @@ -36,9 +37,7 @@ class BottomSheetWidget extends StatelessWidget { children: [ // titleText(), modalHeader(busName, "test"), - Expanded( - child: stationsList(context, busStations) - ), + StationsList(busStationsList: busStations), boardingConfirmButton(context), ], ) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart new file mode 100644 index 00000000..178a04c6 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart @@ -0,0 +1,35 @@ +import "package:flutter/material.dart"; + +class StationsList extends StatelessWidget { + final List busStationsList; + + StationsList({required this.busStationsList}); + + @override + Widget build(BuildContext context) { + return Expanded(child: stationsList(context, busStationsList)); + } + + //将来的にはStationのListを参照 + Widget stationsList(BuildContext context, List busStationsList) { + return ListView.builder( + itemCount: busStationsList.length, + itemBuilder: (context, index) { + return Padding( + padding: const EdgeInsets.fromLTRB(50, 10, 0, 0), + child: stationsListElement(busStationsList[index]), + ); + }, + ); + } + + Widget stationsListElement(String stationName) { + return Text( + stationName, + textAlign: TextAlign.left, + style: const TextStyle( + fontSize: 18, + ), + ); + } +} \ No newline at end of file From 79244d1874651202918a0efcaf204def28de845a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 21:02:05 +0900 Subject: [PATCH 188/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E5=81=9C?= =?UTF-8?q?=E3=81=AE=E3=83=AA=E3=82=B9=E3=83=88=E8=A1=A8=E7=A4=BA=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 2 +- .../bus_edit_page/bus_edit_page.dart | 20 ++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 04f7b5e2..84a5842a 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -52,7 +52,7 @@ class BottomSheetWidget extends StatelessWidget { child: ElevatedButton( onPressed: () { Navigator.push( - context,MaterialPageRoute(builder: (context) => BusEditPage()) + context,MaterialPageRoute(builder: (context) => BusEditPage(busStations: busStations)) ); }, style: editButtonStyle(), diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index de19a048..236476f6 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -1,7 +1,12 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; class BusEditPage extends StatelessWidget { + final List busStations; + + BusEditPage({required List this.busStations}); + @override Widget build(BuildContext context) { return GestureDetector( @@ -15,15 +20,24 @@ class BusEditPage extends StatelessWidget { Widget pageBody(BuildContext context) { return Center( - child: Row( + child: Column( + children: [ + inputFieldsAndThumbnail(context), + StationsList(busStationsList: busStations) + ], + ), + ); + } + + Widget inputFieldsAndThumbnail(BuildContext context) { + return Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ const InputElement(inputFieldTitle: "コース名", labelText: "コース名", hintText: "コース名を入力してください"), busThumbnail(context), ], - ), - ); + ); } From b67764486d98f4a50fe8e44be698e7347d93587e Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 21:12:41 +0900 Subject: [PATCH 189/771] =?UTF-8?q?refactor:confirmButton=E3=82=92?= =?UTF-8?q?=E6=8A=BD=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 3 +- .../components/confirm_button.dart | 43 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 84a5842a..f9c1e0ab 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart'; @@ -38,7 +39,7 @@ class BottomSheetWidget extends StatelessWidget { // titleText(), modalHeader(busName, "test"), StationsList(busStationsList: busStations), - boardingConfirmButton(context), + ConfirmButton(buttonText: "乗客情報"), ], ) ); diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart new file mode 100644 index 00000000..1c892ec0 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart @@ -0,0 +1,43 @@ +import "package:flutter/material.dart"; + +class ConfirmButton extends StatelessWidget { + final String buttonText; + final double fontSize = 20; + + ConfirmButton({required String this.buttonText}); + + @override + Widget build(BuildContext context) { + return confirmButton(context); + } + + Widget confirmButton(BuildContext context) { + return Center( + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10), + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + height: fontSize * 2, + child: ElevatedButton( + onPressed: () { + }, + style: ElevatedButton.styleFrom( + backgroundColor: Colors.black, + ), + child: Text( + buttonText, + style: buttonTextStyle(), + ), + ), + ), + ), + ); + } + + TextStyle buttonTextStyle() { + return TextStyle( + color: Colors.white, + fontSize: fontSize, + ); + } +} From 1c8d0bc832de8841c16dc853059893cac8dcc735 Mon Sep 17 00:00:00 2001 From: koto623 Date: Mon, 12 Feb 2024 21:27:02 +0900 Subject: [PATCH 190/771] =?UTF-8?q?feat:=E5=85=A5=E5=8A=9B=E9=A0=85?= =?UTF-8?q?=E7=9B=AE=E3=81=AE=E3=83=A9=E3=83=99=E3=83=AB=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_edit_page.dart | 88 +++++++++++++------ 1 file changed, 62 insertions(+), 26 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index 4330e924..3b3b45c5 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -24,28 +24,82 @@ class _StudentEditPageState extends State { Widget pageBody(BuildContext context) { return Center( - child: childNameBody(context), + child: editFormBody(context), ); } - Widget childNameBody(BuildContext context) { + Widget editFormBody(BuildContext context) { return Column( children: [ - textInputField(context, "園児氏名", "園児氏名を入力してください", TextInputType.name), - textInputField(context, "年齢", "年齢を入力してください", TextInputType.number), - textInputField(context, "保護者氏名", "保護者氏名を入力してください", TextInputType.name), - textInputField( + inputLabelAndTextField( + context, "園児氏名", "園児氏名を入力してください", TextInputType.name), + inputLabelAndTextField( + context, "年齢", "年齢を入力してください", TextInputType.number), + inputLabelAndTextField( + context, "保護者氏名", "保護者氏名を入力してください", TextInputType.name), + inputLabelAndTextField( context, "保護者連絡先", "保護者連絡先を入力してください", TextInputType.phone), - selectValueBox(context, busCourse), - selectValueBox(context, busStop), + inputLabelAndSelectBox(context, "利用バスコース", busCourse), + inputLabelAndSelectBox(context, "乗降場所", busStop) ], ); } + Widget inputLabelAndTextField( + BuildContext context, String label, String hintText, TextInputType type) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + inputValueLabel(label), + textInputField(context, hintText, type) + ], + ); + } + + Widget inputLabelAndSelectBox( + BuildContext context, String label, List lists) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + inputValueLabel(label), + selectValueBox(context, lists), + ], + ); + } + + Widget inputValueLabel(String label) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + label, + style: TextStyle(color: Colors.black, fontSize: 16), + )); + } + + Widget textInputField( + BuildContext context, String hintText, TextInputType type) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 40, + child: TextField( + decoration: formInputDecoration(hintText), + keyboardType: type, + )); + } + + InputDecoration formInputDecoration(String hintText) { + return InputDecoration( + hintText: hintText, + hintStyle: const TextStyle(fontSize: 13), + border: const OutlineInputBorder(), + ); + } + Widget selectValueBox(BuildContext context, List lists) { String isSelectedValue = lists.first; return SizedBox( width: MediaQuery.of(context).size.width * 0.8, + height: 50, child: DropdownButton( value: isSelectedValue, items: lists @@ -59,22 +113,4 @@ class _StudentEditPageState extends State { }), ); } - - Widget textInputField(BuildContext context, String labelText, String hintText, - TextInputType type) { - return SizedBox( - width: MediaQuery.of(context).size.width * 0.8, - child: TextField( - decoration: formInputDecoration(labelText, hintText), - keyboardType: type, - )); - } - - InputDecoration formInputDecoration(String labelText, String hintText) { - return InputDecoration( - labelText: labelText, - hintText: hintText, - border: const OutlineInputBorder(), - ); - } } From 6d274b4ba1fefd923976da48c7b660531d55fd16 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 21:29:54 +0900 Subject: [PATCH 191/771] =?UTF-8?q?feat:=E4=BF=9D=E5=AD=98=E3=83=9C?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_edit_page/bus_edit_page.dart | 7 ++++--- .../bus_edit_page/components/confirm_button.dart | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 236476f6..4b29b715 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -1,11 +1,12 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; class BusEditPage extends StatelessWidget { final List busStations; - BusEditPage({required List this.busStations}); + const BusEditPage({super.key, required this.busStations}); @override Widget build(BuildContext context) { @@ -23,7 +24,8 @@ class BusEditPage extends StatelessWidget { child: Column( children: [ inputFieldsAndThumbnail(context), - StationsList(busStationsList: busStations) + StationsList(busStationsList: busStations), + ConfirmButton(buttonText: "保存"), ], ), ); @@ -40,7 +42,6 @@ class BusEditPage extends StatelessWidget { ); } - Widget busThumbnail(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart index 1c892ec0..fd0447f1 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart @@ -2,9 +2,10 @@ import "package:flutter/material.dart"; class ConfirmButton extends StatelessWidget { final String buttonText; + final VoidCallback? onTap; final double fontSize = 20; - ConfirmButton({required String this.buttonText}); + ConfirmButton({required this.buttonText, this.onTap}); @override Widget build(BuildContext context) { @@ -19,8 +20,7 @@ class ConfirmButton extends StatelessWidget { width: MediaQuery.of(context).size.width * 0.6, height: fontSize * 2, child: ElevatedButton( - onPressed: () { - }, + onPressed: onTap ?? () {}, style: ElevatedButton.styleFrom( backgroundColor: Colors.black, ), From 6600acbe02879ae671c3524f613dd3f89dc05bb4 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 21:48:23 +0900 Subject: [PATCH 192/771] =?UTF-8?q?chore:image=5Fpicker=E3=82=92pubspec?= =?UTF-8?q?=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/pubspec.lock | 134 ++++++++++++++++++++++++++ frontend/where_child_bus/pubspec.yaml | 1 + 2 files changed, 135 insertions(+) diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index d0f3b00d..9a4ade02 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -65,6 +65,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + url: "https://pub.dev" + source: hosted + version: "0.3.3+8" crypto: dependency: transitive description: @@ -89,6 +97,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + url: "https://pub.dev" + source: hosted + version: "0.9.2+1" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6 + url: "https://pub.dev" + source: hosted + version: "0.9.3+3" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 + url: "https://pub.dev" + source: hosted + version: "0.9.3+1" fixnum: dependency: transitive description: @@ -118,11 +158,24 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da + url: "https://pub.dev" + source: hosted + version: "2.0.17" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" googleapis_auth: dependency: transitive description: @@ -163,6 +216,70 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: "direct main" + description: + name: image_picker + sha256: "26222b01a0c9a2c8fe02fc90b8208bd3325da5ed1f4a2acabf75939031ac0bdd" + url: "https://pub.dev" + source: hosted + version: "1.0.7" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "39f2bfe497e495450c81abcd44b62f56c2a36a37a175da7d137b4454977b51b1" + url: "https://pub.dev" + source: hosted + version: "0.8.9+3" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + url: "https://pub.dev" + source: hosted + version: "3.0.2" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + url: "https://pub.dev" + source: hosted + version: "0.8.9+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + url: "https://pub.dev" + source: hosted + version: "2.9.3" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" js: dependency: transitive description: @@ -203,6 +320,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + mime: + dependency: transitive + description: + name: mime + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + url: "https://pub.dev" + source: hosted + version: "1.0.5" path: dependency: transitive description: @@ -211,6 +336,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" pointycastle: dependency: transitive description: @@ -306,3 +439,4 @@ packages: version: "0.3.0" sdks: dart: ">=3.2.6 <4.0.0" + flutter: ">=3.10.0" diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 9bb9edf1..250b6c59 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -13,6 +13,7 @@ dependencies: grpc: ^3.2.4 protobuf: ^3.1.0 flutter_dotenv: ^5.1.0 + image_picker: ^1.0.7 cupertino_icons: ^1.0.2 From 1f06890fb3dbe46d1713efe77b302f5eb8d0d59b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 12 Feb 2024 22:13:34 +0900 Subject: [PATCH 193/771] =?UTF-8?q?feat(server):=20CloudStorage=E3=82=92?= =?UTF-8?q?=E5=88=A9=E7=94=A8=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=E3=82=92=E6=8B=A1=E5=BC=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.env.example | 4 +- backend/cmd/server/main.go | 30 +++++- backend/config/config.go | 16 +-- backend/go.mod | 35 ++++++- backend/go.sum | 179 ++++++++++++++++++++++++++++++++-- backend/gprc_server/option.go | 15 +++ 6 files changed, 252 insertions(+), 27 deletions(-) diff --git a/backend/.env.example b/backend/.env.example index 14655553..78869f5b 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -4,4 +4,6 @@ DB_PASSWORD= DB_ADDR= DB_NAME= PORT= -MODE_DEV= \ No newline at end of file +MODE_DEV= +GOOGLE_APPLICATION_CREDENTIALS= +STORAGE_BUCKET_NAME= \ No newline at end of file diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index 3fca68d5..f91e8006 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -9,6 +9,7 @@ import ( "os/signal" "syscall" + "cloud.google.com/go/storage" "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql" "golang.org/x/exp/slog" @@ -19,9 +20,10 @@ import ( ) func main() { + // コンフィグを読み込む config, _ := config.New() - // Open a connection to the database + // MySQLへの接続をテスト db, err := sql.Open("mysql", config.DSN) if err != nil { log.Fatal("failed to open db connection", err) @@ -31,7 +33,9 @@ func main() { if err := db.Ping(); err != nil { log.Fatalf("Failed to ping PlanetScale: %v", err) } - log.Println("Successfully connected to PlanetScale!") + + // PlanetScaleへの接続を開始 + log.Println("Connecting to PlanetScale...") mysqlConfig := &mysql.Config{ User: config.DBUser, @@ -45,15 +49,15 @@ func main() { InterpolateParams: true, } - log.Println("Connecting to PlanetScale...") - entClient, err := ent.Open("mysql", mysqlConfig.FormatDSN()) if err != nil { log.Fatal(err) } - log.Println("Running migration...") + log.Println("Successfully connected to PlanetScale!") + // マイグレーションを実行 + log.Println("Running migration...") defer entClient.Close() if err := entClient.Schema.Create(context.Background()); err != nil { log.Println("Migration failed!") @@ -62,12 +66,28 @@ func main() { log.Println("Migration done!") + // Cloud Storageへの接続を開始 + log.Println("Connecting to Cloud Storage...") + ctx := context.Background() + storageClient, err := storage.NewClient(ctx) + if err != nil { + log.Fatalf("Failed to create Cloud Storage client: %v", err) + } + defer storageClient.Close() + + log.Println("Connected to Cloud Storage!") + + // loggerを作成 logger := slog.Default() + + // gRPCサーバーを起動 srv := grpc_server.New( grpc_server.WithLogger(logger), grpc_server.WithEntClient(entClient), grpc_server.WithReflection(config.ModeDev), + grpc_server.WithStorageClient(storageClient), + grpc_server.WithBucketName(config.StorageBucketName), ) lsnr, err := net.Listen("tcp", ":"+config.GrpcPort) if err != nil { diff --git a/backend/config/config.go b/backend/config/config.go index e93c955e..d8d36350 100644 --- a/backend/config/config.go +++ b/backend/config/config.go @@ -8,13 +8,15 @@ import ( ) type Config struct { - DSN string `envconfig:"DSN" required:"true"` - DBUser string `envconfig:"DB_USER_NAME" required:"true"` - DBPassword string `envconfig:"DB_PASSWORD" required:"true"` - DBAddress string `envconfig:"DB_ADDR" required:"true"` - DBName string `envconfig:"DB_NAME" required:"true"` - GrpcPort string `envconfig:"PORT" default:"50051"` - ModeDev bool `envconfig:"MODE_DEV" default:"true"` + DSN string `envconfig:"DSN" required:"true"` + DBUser string `envconfig:"DB_USER_NAME" required:"true"` + DBPassword string `envconfig:"DB_PASSWORD" required:"true"` + DBAddress string `envconfig:"DB_ADDR" required:"true"` + DBName string `envconfig:"DB_NAME" required:"true"` + GrpcPort string `envconfig:"PORT" default:"50051"` + ModeDev bool `envconfig:"MODE_DEV" default:"true"` + GoogleApplicationCredentials string `envconfig:"GOOGLE_APPLICATION_CREDENTIALS" required:"true"` + StorageBucketName string `envconfig:"STORAGE_BUCKET_NAME" required:"true"` } func New() (*Config, error) { diff --git a/backend/go.mod b/backend/go.mod index c16076a4..58e1d2d5 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -4,21 +4,48 @@ go 1.21.5 require ( entgo.io/ent v0.13.0 - github.com/google/uuid v1.4.0 + github.com/google/uuid v1.5.0 ) -require google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect +require ( + cloud.google.com/go v0.112.0 // indirect + cloud.google.com/go/compute v1.23.3 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v1.1.5 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect + go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect + go.opentelemetry.io/otel v1.21.0 // indirect + go.opentelemetry.io/otel/metric v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.21.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/api v0.157.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240122161410-6c6643bf1457 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect +) require ( github.com/golang/protobuf v1.5.3 // indirect - golang.org/x/net v0.18.0 // indirect + golang.org/x/net v0.20.0 // indirect golang.org/x/sys v0.17.0 // indirect google.golang.org/grpc v1.61.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf v1.32.0 ) require ( ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43 // indirect + cloud.google.com/go/storage v1.37.0 github.com/agext/levenshtein v1.2.1 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/go-openapi/inflect v0.19.0 // indirect diff --git a/backend/go.sum b/backend/go.sum index 20bf2808..80f613e2 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -1,32 +1,92 @@ ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43 h1:GwdJbXydHCYPedeeLt4x/lrlIISQ4JTH1mRWuE5ZZ14= ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43/go.mod h1:uj3pm+hUTVN/X5yfdBexHlZv+1Xu5u5ZbZx7+CDavNU= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +cloud.google.com/go/storage v1.37.0 h1:WI8CsaFO8Q9KjPVtsZ5Cmi0dXV25zMoX0FklT7c3Jm4= +cloud.google.com/go/storage v1.37.0/go.mod h1:i34TiT2IhiNDmcj65PqwCjcoUX7Z5pLzS8DEmoiFq1k= entgo.io/ent v0.13.0 h1:DclxWczaCpyiKn6ZWVcJjq1zIKtJ11iNKy+08lNYsJE= entgo.io/ent v0.13.0/go.mod h1:+oU8oGna69xy29O+g+NEz+/TM7yJDhQQGJfuOWq1pT8= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101 h1:7To3pQ+pZo0i3dsWEbinPNFs5gPSBOsJtx3wTT94VBY= +github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 h1:HcUWd006luQPljE73d5sk+/VgYPGUReEVz2y1/qylwY= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1/go.mod h1:w9Y7gY31krpLmrVU5ZPG9H7l9fZuRu5/3R3S3FMtVQ4= github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc= @@ -49,46 +109,145 @@ github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzC github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= +go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= +go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= +go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= +go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +google.golang.org/api v0.157.0 h1:ORAeqmbrrozeyw5NjnMxh7peHO0UzV4wWYSwZeCUb20= +google.golang.org/api v0.157.0/go.mod h1:+z4v4ufbZ1WEpld6yMGHyggs+PmAHiaLNj5ytP3N01g= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= +google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= +google.golang.org/genproto/googleapis/api v0.0.0-20240122161410-6c6643bf1457 h1:KHBtwE+eQc3+NxpjmRFlQ3pJQ2FNnhhgB9xOV8kyBuU= +google.golang.org/genproto/googleapis/api v0.0.0-20240122161410-6c6643bf1457/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac h1:nUQEQmH/csSvFECKYRv6HWEyypysidKl2I6Qpsglq/0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/backend/gprc_server/option.go b/backend/gprc_server/option.go index e9d5ed9f..a6be0fda 100644 --- a/backend/gprc_server/option.go +++ b/backend/gprc_server/option.go @@ -1,6 +1,7 @@ package grpc_server import ( + "cloud.google.com/go/storage" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" "golang.org/x/exp/slog" ) @@ -8,6 +9,8 @@ import ( type option struct { logger *slog.Logger entClient *ent.Client + storageClient *storage.Client + bucketName string useReflection bool } @@ -37,3 +40,15 @@ func WithEntClient(c *ent.Client) optionFunc { o.entClient = c } } + +func WithStorageClient(s *storage.Client) optionFunc { + return func(o *option) { + o.storageClient = s + } +} + +func WithBucketName(b string) optionFunc { + return func(o *option) { + o.bucketName = b + } +} From 74f46be9041c2ffdb702c6adb84facd2df34fe84 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 12 Feb 2024 23:50:54 +0900 Subject: [PATCH 194/771] =?UTF-8?q?feat:=E7=94=BB=E5=83=8F=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_edit_page/bus_edit_page.dart | 90 ++++++++++++++++--- .../components/stations_list.dart | 2 +- 2 files changed, 77 insertions(+), 15 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 4b29b715..906f115b 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -1,12 +1,26 @@ +import 'dart:io'; import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; -class BusEditPage extends StatelessWidget { +class BusEditPage extends StatefulWidget { final List busStations; - const BusEditPage({super.key, required this.busStations}); + BusEditPage({required this.busStations}); + + @override + _BusEditPage createState() => _BusEditPage(busStations: busStations); +} + +class _BusEditPage extends State { + final List busStations; + final ImagePicker _picker = ImagePicker(); + String? _selectedImagePath; + bool _isPickingImage = false; + + _BusEditPage({required this.busStations}); @override Widget build(BuildContext context) { @@ -22,6 +36,7 @@ class BusEditPage extends StatelessWidget { Widget pageBody(BuildContext context) { return Center( child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ inputFieldsAndThumbnail(context), StationsList(busStationsList: busStations), @@ -32,13 +47,16 @@ class BusEditPage extends StatelessWidget { } Widget inputFieldsAndThumbnail(BuildContext context) { - return Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const InputElement(inputFieldTitle: "コース名", labelText: "コース名", hintText: "コース名を入力してください"), - busThumbnail(context), - ], + return Padding( + padding: EdgeInsets.symmetric(horizontal: MediaQuery.of(context).size.width*0.08), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + busThumbnail(context), + const InputElement(inputFieldTitle: "コース名", labelText: "コース名", hintText: "コース名を入力してください"), + ], + ), ); } @@ -47,15 +65,59 @@ class BusEditPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ const Padding( - padding: EdgeInsets.symmetric(horizontal: 8), + padding: EdgeInsets.all(8), child: Text("サムネイル"), ), - SizedBox( - width: MediaQuery.of(context).size.width * 0.3, - height: MediaQuery.of(context).size.width * 0.3, - child: Card(), + GestureDetector( + onTap: () => pickImage(), + child: _selectedImagePath != null ? SizedBox( + width: MediaQuery.of(context).size.width * 0.3, + height: MediaQuery.of(context).size.width * 0.3, + child: Image.file(File(_selectedImagePath!)), + ) : Center( + child: unselectedImageButton(), + ), ), ] ); } + + Widget unselectedImageButton() { + return ElevatedButton( + onPressed: () => pickImage(), + child: Text ( + "画像が選択されていません", + ), + ); + } + + Future pickImage() async { + if (_isPickingImage) { + // 画像選択が既に進行中なので、新たに画像選択を開始しない + return; + } + + setState(() { + _isPickingImage= true; + }); + + try { + final XFile? image = await _picker.pickImage(source: ImageSource.gallery); + + + if (image != null) { + setState(() { + _selectedImagePath = image.path; + }); + } else { + print('No image selected.'); + } + } catch (e) { + print('Error picking image: $e'); + } finally { + setState(() { + _isPickingImage = false; + }); + } + } } \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart index 178a04c6..9494dd1f 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart @@ -16,7 +16,7 @@ class StationsList extends StatelessWidget { itemCount: busStationsList.length, itemBuilder: (context, index) { return Padding( - padding: const EdgeInsets.fromLTRB(50, 10, 0, 0), + padding: EdgeInsets.fromLTRB(MediaQuery.of(context).size.width*0.1, 10, 0, 0), child: stationsListElement(busStationsList[index]), ); }, From 54b181626b0e807d8f184cf42aef505472536022 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 00:15:44 +0900 Subject: [PATCH 195/771] =?UTF-8?q?feat;=E7=94=BB=E5=83=8F=E3=81=AE?= =?UTF-8?q?=E7=99=BB=E9=8C=B2=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_list_page/student_edit_page.dart | 78 ++++++++++++++++--- frontend/where_child_bus/pubspec.yaml | 1 + 2 files changed, 70 insertions(+), 9 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index 3b3b45c5..8e902a08 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -1,21 +1,39 @@ +import 'dart:io'; import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; class StudentEditPage extends StatefulWidget { - StudentEditPage({super.key}); + const StudentEditPage({super.key}); @override State createState() => _StudentEditPageState(); } class _StudentEditPageState extends State { - final List busCourse = ["コース1", "コース2", "コース3"]; + List? images; + final picker = ImagePicker(); + + final List busName = ["バス1", "バス2", "バス3"]; final List busStop = ["停留所1", "停留所2", "停留所3"]; + Future getImageFromGallery() async { + final pickedFiles = await picker.pickMultiImage(); + + setState(() { + if (pickedFiles != null && pickedFiles.isNotEmpty) { + images = pickedFiles.map((xFile) => File(xFile.path)).toList(); + } else { + print("画像が選択できませんでした。"); + } + }); + } + @override Widget build(BuildContext context) { return GestureDetector( onTap: () => primaryFocus?.unfocus(), child: Scaffold( + resizeToAvoidBottomInset: false, appBar: AppBar(), body: pageBody(context), ), @@ -24,7 +42,36 @@ class _StudentEditPageState extends State { Widget pageBody(BuildContext context) { return Center( - child: editFormBody(context), + child: ListView( + children: [ + selectChildImage(), + editFormBody(context), + ], + )); + } + + Widget selectChildImage() { + return Column( + children: [ + Wrap( + spacing: 8.0, + runSpacing: 4.0, + children: images == null || images!.isEmpty + ? [const Text("画像が選択されていません。")] + : images! + .map((image) => Image.file( + image, + width: 100, + height: 100, + )) + .toList(), + ), + Center( + child: ElevatedButton( + onPressed: getImageFromGallery, + child: const Text("画像を選択する"), + )) + ], ); } @@ -39,8 +86,13 @@ class _StudentEditPageState extends State { context, "保護者氏名", "保護者氏名を入力してください", TextInputType.name), inputLabelAndTextField( context, "保護者連絡先", "保護者連絡先を入力してください", TextInputType.phone), - inputLabelAndSelectBox(context, "利用バスコース", busCourse), - inputLabelAndSelectBox(context, "乗降場所", busStop) + inputLabelAndSelectBox(context, "利用バス", busName), + inputLabelAndSelectBox(context, "乗降場所", busStop), + Container( + margin: const EdgeInsets.only(top: 20.0), + width: MediaQuery.of(context).size.width * 0.6, + child: submitButton(), + ) ], ); } @@ -72,7 +124,7 @@ class _StudentEditPageState extends State { padding: const EdgeInsets.all(8.0), child: Text( label, - style: TextStyle(color: Colors.black, fontSize: 16), + style: const TextStyle(color: Colors.black, fontSize: 16), )); } @@ -96,21 +148,29 @@ class _StudentEditPageState extends State { } Widget selectValueBox(BuildContext context, List lists) { - String isSelectedValue = lists.first; + String? selectedValue; return SizedBox( width: MediaQuery.of(context).size.width * 0.8, height: 50, child: DropdownButton( - value: isSelectedValue, + value: selectedValue ?? lists.first, items: lists .map((String list) => DropdownMenuItem(value: list, child: Text(list))) .toList(), onChanged: (String? value) { setState(() { - isSelectedValue = value!; + selectedValue = value; }); }), ); } + + Widget submitButton() { + return ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Colors.black, foregroundColor: Colors.white), + onPressed: () {}, + child: const Text("保存")); + } } diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index eec12812..15483044 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -12,6 +12,7 @@ dependencies: sdk: flutter cupertino_icons: ^1.0.2 + image_picker: ^1.0.7 dev_dependencies: flutter_test: From 9c9e0ad849775625d7e0ad0d5427be386133720d Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 00:26:41 +0900 Subject: [PATCH 196/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E3=81=AB?= =?UTF-8?q?=E4=B9=97=E8=BB=8A=E3=81=99=E3=82=8B=E5=AD=90=E4=BE=9B=E3=82=92?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E3=81=99=E3=82=8B=E3=83=9C=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_edit_page/bus_edit_page.dart | 27 ++++++++++++++-- .../components/confirm_button.dart | 31 ++++++++++--------- .../bus_edit_page/components/input_field.dart | 7 +++-- .../bus_edit_page/styles/styles.dart | 9 +++++- 4 files changed, 53 insertions(+), 21 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 906f115b..7091418c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -39,7 +39,7 @@ class _BusEditPage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ inputFieldsAndThumbnail(context), - StationsList(busStationsList: busStations), + manageChildrenButton(), ConfirmButton(buttonText: "保存"), ], ), @@ -54,12 +54,21 @@ class _BusEditPage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ busThumbnail(context), - const InputElement(inputFieldTitle: "コース名", labelText: "コース名", hintText: "コース名を入力してください"), + inputFields(), ], ), ); } + Widget inputFields() { + return const Column( + children: [ + InputElement(inputFieldTitle: "バス名", labelText: "バス名を入力してください", hintText: "バス名を入力してください"), + InputElement(inputFieldTitle: "ナンバー", labelText: "ナンバーを入力してください", hintText: "ナンバーを入力してください"), + ], + ); + } + Widget busThumbnail(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -85,12 +94,24 @@ class _BusEditPage extends State { Widget unselectedImageButton() { return ElevatedButton( onPressed: () => pickImage(), - child: Text ( + child: const Text ( "画像が選択されていません", ), ); } + Widget manageChildrenButton() { + return Center( + child: Padding( + padding: const EdgeInsets.all(10), + child: ElevatedButton( + onPressed: () {}, + child: const Text("バスに乗車する子供を変更"), + ), + ), + ); + } + Future pickImage() async { if (_isPickingImage) { // 画像選択が既に進行中なので、新たに画像選択を開始しない diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart index fd0447f1..b08c8620 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart @@ -13,20 +13,23 @@ class ConfirmButton extends StatelessWidget { } Widget confirmButton(BuildContext context) { - return Center( - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 10), - child: SizedBox( - width: MediaQuery.of(context).size.width * 0.6, - height: fontSize * 2, - child: ElevatedButton( - onPressed: onTap ?? () {}, - style: ElevatedButton.styleFrom( - backgroundColor: Colors.black, - ), - child: Text( - buttonText, - style: buttonTextStyle(), + return Expanded( + child: Align( + alignment: Alignment.bottomCenter, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10), + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + height: fontSize * 2, + child: ElevatedButton( + onPressed: onTap ?? () {}, + style: ElevatedButton.styleFrom( + backgroundColor: Colors.black, + ), + child: Text( + buttonText, + style: buttonTextStyle(), + ), ), ), ), diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart index e92fa563..61dff552 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart @@ -10,10 +10,11 @@ class InputField extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( - width: MediaQuery.of(context).size.width * 0.5, + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 30, child: TextField( - decoration: editPageInputDecoration(labelText, hintText) + decoration: editPageInputDecoration(labelText, hintText), ), ); } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart index 431edca5..ca0ac818 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart @@ -21,7 +21,14 @@ InputDecoration editPageInputDecoration(String labelText, String hintText) { labelText: labelText, hintText: hintText, border: const OutlineInputBorder(), - contentPadding: EdgeInsets.symmetric(vertical: 5) + contentPadding: const EdgeInsets.symmetric(vertical: 5, horizontal: 10), + labelStyle: inputFieldLabelStyle(), + ); +} + +TextStyle inputFieldLabelStyle() { + return const TextStyle( + fontSize: 15, ); } From 1c014899a3ca17659eec87cb0d9d0eb6712256de Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 00:40:15 +0900 Subject: [PATCH 197/771] =?UTF-8?q?feat(api):=20createChild=E3=83=A1?= =?UTF-8?q?=E3=82=BD=E3=83=83=E3=83=89=E3=81=AE=E5=AE=9F=E8=A3=85=20-=20Cl?= =?UTF-8?q?oudFunction=E3=82=92=E7=99=BA=E7=81=AB=E3=81=95=E3=81=9B?= =?UTF-8?q?=E3=82=8B=E5=87=A6=E7=90=86=E3=81=8C=E6=9C=AA=E5=AE=9F=E8=A3=85?= =?UTF-8?q?=20-=20=E4=B8=80=E9=83=A8=E5=8F=82=E7=85=A7=E5=85=88=E3=81=A7?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=9D=E3=81=8C=E3=81=82=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/server/main.go | 1 - backend/gprc_server/grpc_server.go | 2 +- backend/interfaces/bus.go | 5 + backend/interfaces/child.go | 5 + backend/usecases/child/child.go | 141 ++++++++++++++++++++++++++++- backend/usecases/utils/utils.go | 41 ++++++--- 6 files changed, 178 insertions(+), 17 deletions(-) diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index f91e8006..13fe4726 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -82,7 +82,6 @@ func main() { // gRPCサーバーを起動 srv := grpc_server.New( - grpc_server.WithLogger(logger), grpc_server.WithEntClient(entClient), grpc_server.WithReflection(config.ModeDev), diff --git a/backend/gprc_server/grpc_server.go b/backend/gprc_server/grpc_server.go index 3462ac1d..e9bf18a6 100644 --- a/backend/gprc_server/grpc_server.go +++ b/backend/gprc_server/grpc_server.go @@ -37,7 +37,7 @@ func New(opts ...optionFunc) *grpc.Server { busSrv := grpc_interfaces.NewBusServiceServer(busInteractor) pb.RegisterBusServiceServer(srv, busSrv) - childInteractor := child.NewInteractor(opt.entClient, opt.logger) + childInteractor := child.NewInteractor(opt.entClient, opt.logger, opt.storageClient, opt.bucketName) // NOTE: GCSを使うのでstorageClientとbucketNameを渡す childSrv := grpc_interfaces.NewChildServiceServer(childInteractor) pb.RegisterChildServiceServer(srv, childSrv) diff --git a/backend/interfaces/bus.go b/backend/interfaces/bus.go index 6f1f88ab..7d9cfc71 100644 --- a/backend/interfaces/bus.go +++ b/backend/interfaces/bus.go @@ -15,6 +15,11 @@ func NewBusServiceServer(interactor *bus.Interactor) pb.BusServiceServer { return &busServiceServer{interactor} } +// CreateBus implements where_child_busv1.BusServiceServer. +func (s *busServiceServer) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (*pb.CreateBusResponse, error) { + panic("unimplemented") +} + // GetBusListByNurseryId implements where_child_busv1.BusServiceServer. func (s *busServiceServer) GetBusListByNurseryId(ctx context.Context, req *pb.GetBusListByNurseryIdRequest) (*pb.GetBusListByNurseryIdResponse, error) { return s.interactor.GetBusListByNurseryID(ctx, req) diff --git a/backend/interfaces/child.go b/backend/interfaces/child.go index 5fc129e6..ecb60602 100644 --- a/backend/interfaces/child.go +++ b/backend/interfaces/child.go @@ -15,6 +15,11 @@ func NewChildServiceServer(interactor *child.Interactor) pb.ChildServiceServer { return &childServiceServer{interactor} } +// CreateChild implements where_child_busv1.ChildServiceServer. +func (s *childServiceServer) CreateChild(ctx context.Context, req *pb.CreateChildRequest) (*pb.CreateChildResponse, error) { + return s.interactor.CreateChild(ctx, req) +} + // GetChildListByGuardianID implements where_child_busv1.ChildServiceServer. func (s *childServiceServer) GetChildListByGuardianID(ctx context.Context, req *pb.GetChildListByGuardianIDRequest) (*pb.GetChildListByGuardianIDResponse, error) { return s.interactor.GetChildListByGuardianID(ctx, req) diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index 4af10338..d2d049ce 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -3,6 +3,7 @@ package child import ( "fmt" + "cloud.google.com/go/storage" "github.com/google/uuid" "golang.org/x/exp/slog" @@ -18,12 +19,109 @@ import ( ) type Interactor struct { - entClient *ent.Client - logger *slog.Logger + entClient *ent.Client + logger *slog.Logger + StorageClient *storage.Client + BucketName string } -func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { - return &Interactor{entClient, logger} +func NewInteractor(entClient *ent.Client, logger *slog.Logger, storageClient *storage.Client, bucketName string) *Interactor { + return &Interactor{entClient, logger, storageClient, bucketName} +} + +func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest) (*pb.CreateChildResponse, error) { + nurseryID, err := uuid.Parse(req.NurseryId) + if err != nil { + return nil, fmt.Errorf("failed to parse nursery ID '%s': %w", req.NurseryId, err) + } + + guardianID, err := uuid.Parse(req.GuardianId) + if err != nil { + return nil, fmt.Errorf("failed to parse guardian ID '%s': %w", req.GuardianId, err) + } + + // トランザクションの開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + i.logger.Error("failed to start transaction", "error", err) + return nil, err + } + + // 成功した場合にロールバックを防ぐためのフラグ + var commit bool + defer func() { + if !commit { + tx.Rollback() + } + }() + + sex, err := utils.ConvertPbSexToEntSex(req.Sex) + if err != nil { + return nil, fmt.Errorf("failed to convert sex: %w", err) + } + age := int(req.Age) + + // 子供のレコードを作成 + child, err := tx.Child. + Create(). + SetNurseryID(nurseryID). + SetGuardianID(guardianID). + SetName(req.Name). + SetAge(age). + SetSex(*sex). + Save(ctx) + if err != nil { + return nil, fmt.Errorf("failed to create child: %w", err) + } + + // アップロードされた写真のIDを追跡するスライス + var uploadedPhotoIDs []uuid.UUID + + // 関数終了時にアップロードされたすべての写真をクリーンアップ + defer func() { + // エラーが発生した場合のみクリーンアップを実行 + if err != nil { + for _, photoID := range uploadedPhotoIDs { + // 写真の削除に失敗した場合のエラーはログに記録するのみで、 + // 元のエラーには影響させない + if delErr := i.deletePhotoFromGCS(ctx, nurseryID.String(), child.ID.String(), photoID.String()); delErr != nil { + i.logger.Error("failed to delete photo from GCS", "photoID", photoID, "error", delErr) + } + } + } + }() + + // 写真のアップロードとchildPhotoレコードの作成 + for _, photoData := range req.Photos { + photoID := uuid.New() // 写真に一意のIDを生成 + uploadedPhotoIDs = append(uploadedPhotoIDs, photoID) // アップロードされた写真のIDを追跡 + + // 写真をGCSにアップロード + if err := i.uploadPhotoToGCS(ctx, nurseryID.String(), child.ID.String(), photoID.String(), photoData); err != nil { + return nil, fmt.Errorf("failed to upload photo to GCS: %w", err) + } + + // childPhotoレコードをデータベースに作成 + _, err := tx.ChildPhoto. + Create(). + SetID(photoID). + SetChildID(child.ID). + Save(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to create child photo record: %w", err) + } + } + + // トランザクションのコミット + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + commit = true // トランザクションが成功した + + return &pb.CreateChildResponse{ + Child: utils.ToPbChild(child), + }, nil } func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetChildListByGuardianIDRequest) (*pb.GetChildListByGuardianIDResponse, error) { @@ -89,3 +187,38 @@ func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) ( return pbChildren, nil } + +// uploadPhotoToGCS は写真をGCPのCloud Storageにアップロードします。 +func (i *Interactor) uploadPhotoToGCS(ctx context.Context, nurseryID, childID, photoID string, photo []byte) error { + // Cloud Storage上の写真のパスを生成 + objectName := fmt.Sprintf("%s/%s/raw/%s.png", nurseryID, childID, photoID) + + // 指定したバケットにオブジェクトを作成 + wc := i.StorageClient.Bucket(i.BucketName).Object(objectName).NewWriter(ctx) + + // 写真のバイトデータを書き込む + if _, err := wc.Write(photo); err != nil { + return err + } + + // ライターを閉じて、アップロードを完了させる + if err := wc.Close(); err != nil { + return err + } + + return nil +} + +// deletePhotoFromGCS は指定された写真IDに対応する写真をGCSから削除します。 +func (i *Interactor) deletePhotoFromGCS(ctx context.Context, nurseryID, childID, photoID string) error { + // Cloud Storage上の写真のパスを生成 + objectName := fmt.Sprintf("%s/%s/raw/%s.png", nurseryID, childID, photoID) + + // 指定したバケット内のオブジェクトを削除 + o := i.StorageClient.Bucket(i.BucketName).Object(objectName) + if err := o.Delete(ctx); err != nil { + return fmt.Errorf("failed to delete photo '%s' from GCS: %w", objectName, err) + } + + return nil +} diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 1e0a6e85..cf8f9b3f 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -1,6 +1,8 @@ package utils import ( + "fmt" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "google.golang.org/protobuf/types/known/timestamppb" @@ -24,23 +26,23 @@ func ToPbChild(t *ent.Child) *pb.Child { HasBag: t.HasBag, HasLunchBox: t.HasLunchBox, HasWaterBottle: t.HasWaterBottle, - HasUmbrera: t.HasUmbrella, + HasUmbrella: t.HasUmbrella, HasOther: t.HasOther, CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, } } -func convertSexToPbSex(sex child.Sex) pb.Child_Sex { +func convertSexToPbSex(sex child.Sex) pb.Sex { switch sex { case child.SexMan: - return pb.Child_SEX_MAN - case child.SexWomen: - return pb.Child_SEX_WOMEN + return pb.Sex_SEX_MAN + case child.SexWoman: + return pb.Sex_SEX_WOMAN case child.SexOther: - return pb.Child_SEX_OTHER + return pb.Sex_SEX_OTHER default: - return pb.Child_SEX_UNSPECIFIED + return pb.Sex_SEX_UNSPECIFIED } } @@ -59,14 +61,31 @@ func ToPbBus(t *ent.Bus) *pb.Bus { } } -func convertStatusToPbStatus(status bus.Status) pb.Bus_Status { +func ConvertPbSexToEntSex(pbSex pb.Sex) (*child.Sex, error) { + switch pbSex { + case pb.Sex_SEX_MAN: + sex := child.SexMan + return &sex, nil + case pb.Sex_SEX_WOMAN: // 修正: WOMEN -> WOMAN + sex := child.SexWoman + return &sex, nil + case pb.Sex_SEX_OTHER: + sex := child.SexOther + return &sex, nil + default: + // 不正な値の場合はエラーを返す + return nil, fmt.Errorf("invalid Sex value: %v", pbSex) + } +} + +func convertStatusToPbStatus(status bus.Status) pb.Status { switch status { case bus.StatusRunning: - return pb.Bus_STATUS_RUNNING + return pb.Status_STATUS_RUNNING case bus.StatusStopped: - return pb.Bus_STATUS_STOPPED + return pb.Status_STATUS_STOPPED default: - return pb.Bus_STATUS_UNSPECIFIED + return pb.Status_STATUS_UNSPECIFIED } } From 2c88200f7823c5cfab1433fc117a45b664012de3 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 00:40:57 +0900 Subject: [PATCH 198/771] =?UTF-8?q?chore:=20.env=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=81=AE=E5=A4=89=E6=9B=B4=E3=81=A8secrets?= =?UTF-8?q?=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/.gitignore b/backend/.gitignore index 727236a5..432dd73d 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -27,4 +27,7 @@ go.work # End of https://www.toptal.com/developers/gitignore/api/go # envfile -.env \ No newline at end of file +.env + +# secrets +secrets/* \ No newline at end of file From 9393dee8db89ec0f2431447f7c61a3179e742d84 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 00:43:13 +0900 Subject: [PATCH 199/771] fix: typo in child schema --- backend/domain/repository/ent/child/child.go | 4 ++-- backend/domain/repository/ent/migrate/schema.go | 2 +- backend/domain/repository/ent/schema/child.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/domain/repository/ent/child/child.go b/backend/domain/repository/ent/child/child.go index ee71c92c..02920279 100644 --- a/backend/domain/repository/ent/child/child.go +++ b/backend/domain/repository/ent/child/child.go @@ -164,7 +164,7 @@ type Sex string // Sex values. const ( SexMan Sex = "man" - SexWomen Sex = "women" + SexWoman Sex = "woman" SexOther Sex = "other" ) @@ -175,7 +175,7 @@ func (s Sex) String() string { // SexValidator is a validator for the "sex" field enum values. It is called by the builders before save. func SexValidator(s Sex) error { switch s { - case SexMan, SexWomen, SexOther: + case SexMan, SexWoman, SexOther: return nil default: return fmt.Errorf("child: invalid enum value for sex field: %q", s) diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 166d32e4..7a29b1ad 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -67,7 +67,7 @@ var ( {Name: "id", Type: field.TypeUUID, Unique: true}, {Name: "name", Type: field.TypeString}, {Name: "age", Type: field.TypeInt}, - {Name: "sex", Type: field.TypeEnum, Enums: []string{"man", "women", "other"}}, + {Name: "sex", Type: field.TypeEnum, Enums: []string{"man", "woman", "other"}}, {Name: "is_ride_morning_bus", Type: field.TypeBool, Default: false}, {Name: "is_ride_evening_bus", Type: field.TypeBool, Default: false}, {Name: "check_for_missing_items", Type: field.TypeBool, Default: false}, diff --git a/backend/domain/repository/ent/schema/child.go b/backend/domain/repository/ent/schema/child.go index 6b354762..8fd97c4d 100644 --- a/backend/domain/repository/ent/schema/child.go +++ b/backend/domain/repository/ent/schema/child.go @@ -21,7 +21,7 @@ func (Child) Fields() []ent.Field { field.String("name"), field.Int("age"), field.Enum("sex"). - Values("man", "women", "other"), + Values("man", "woman", "other"), field.Bool("is_ride_morning_bus").Default(false).Comment("朝のバスに乗るかどうか"), field.Bool("is_ride_evening_bus").Default(false).Comment("放課後のバスに乗るかどうか"), field.Bool("check_for_missing_items").Default(false).Comment("持ち物が欠けていないかをチェックするかどうか"), From 8ecd25061659590828dcb33673020234f9f19829 Mon Sep 17 00:00:00 2001 From: xyzyxJP Date: Tue, 13 Feb 2024 00:48:23 +0900 Subject: [PATCH 200/771] =?UTF-8?q?feat(frontend):=20=E8=AA=8D=E8=A8=BC?= =?UTF-8?q?=E3=83=AA=E3=82=AF=E3=82=A8=E3=82=B9=E3=83=88=E3=81=AE=E9=80=81?= =?UTF-8?q?=E4=BF=A1=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/main.dart | 6 ++--- .../lib/pages/auth_page/auth_page.dart | 3 +++ .../lib/util/api/nursery_login.dart | 26 +++++++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 frontend/where_child_bus/lib/util/api/nursery_login.dart diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 33e1e26b..a16943fd 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:where_child_bus/app.dart'; -import 'package:where_child_bus/util/api/health_check.dart'; import 'package:where_child_bus/config/config.dart'; +import 'package:where_child_bus/pages/auth_page/auth_page.dart'; +import 'package:where_child_bus/util/api/health_check.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); @@ -31,7 +31,7 @@ class _MyAppState extends State { colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), - home: const App(), + home: const AuthPage(), ); } } diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index 171c0937..1d6b8ea4 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:where_child_bus/util/api/nursery_login.dart'; class AuthPage extends StatefulWidget { const AuthPage({super.key}); @@ -60,6 +61,8 @@ class _AuthPageState extends State { debugPrint("email: ${_emailController.text}"); debugPrint("password: ${_passwordController.text}"); } + nurseryLogin( + _emailController.text, _passwordController.text); }, child: const Text('ログイン'), ), diff --git a/frontend/where_child_bus/lib/util/api/nursery_login.dart b/frontend/where_child_bus/lib/util/api/nursery_login.dart new file mode 100644 index 00000000..5b958c30 --- /dev/null +++ b/frontend/where_child_bus/lib/util/api/nursery_login.dart @@ -0,0 +1,26 @@ +import 'dart:developer' as developer; + +import 'package:flutter/foundation.dart'; +import 'package:grpc/grpc.dart'; +import 'package:where_child_bus/config/config.dart'; +import 'package:where_child_bus/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart'; + +Future nurseryLogin(String email, String password) async { + var channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + var client = NurseryServiceClient(channel); + try { + var req = NurseryLoginRequest(email: email, password: password); + var res = await client.nurseryLogin(req); + if (kDebugMode) { + debugPrint(res.toString()); + } + return res; + } catch (err) { + developer.log("Caught error", error: err); + await channel.shutdown(); + return Future.error(err); + } +} From 9acb5c5a081c878d00ab8207497a6b9078caf133 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 00:55:01 +0900 Subject: [PATCH 201/771] =?UTF-8?q?feat(api):=20=E5=89=8D=E3=81=AE?= =?UTF-8?q?=E3=82=B3=E3=83=9F=E3=83=83=E3=83=88=E3=81=AEproto=E3=82=92?= =?UTF-8?q?=E7=94=9F=E6=88=90=20&=20=E3=82=BF=E3=82=A4=E3=83=9D=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/where_child_bus/v1/child.pb.go | 327 ++++++++++---- .../go/where_child_bus/v1/child_grpc.pb.go | 37 ++ .../go/where_child_bus/v1/guardian.pb.go | 300 +++++++++--- .../go/where_child_bus/v1/guardian_grpc.pb.go | 39 +- .../go/where_child_bus/v1/nursery.pb.go | 288 +++++++++--- .../go/where_child_bus/v1/nursery_grpc.pb.go | 39 +- .../go/where_child_bus/v1/resources.pb.go | 8 +- .../go/where_child_bus/v1/station.pb.go | 426 ++++++++++++++++++ .../go/where_child_bus/v1/station_grpc.pb.go | 144 ++++++ backend/proto/where_child_bus/v1/child.proto | 5 +- .../proto/where_child_bus/v1/guardian.proto | 4 +- .../proto/where_child_bus/v1/nursery.proto | 6 +- .../proto/where_child_bus/v1/resources.proto | 2 +- .../proto/where_child_bus/v1/station.proto | 2 +- .../proto-gen/where_child_bus/v1/bus.pb.dart | 24 +- .../where_child_bus/v1/bus.pbgrpc.dart | 20 + .../where_child_bus/v1/bus.pbjson.dart | 32 ++ .../where_child_bus/v1/child.pb.dart | 275 ++++++++++- .../where_child_bus/v1/child.pbgrpc.dart | 40 ++ .../where_child_bus/v1/child.pbjson.dart | 58 +++ .../where_child_bus/v1/child_photo.pb.dart | 10 - .../v1/child_photo.pbgrpc.dart | 59 +++ .../v1/child_photo.pbjson.dart | 19 - .../where_child_bus/v1/guardian.pb.dart | 180 +++++++- .../where_child_bus/v1/guardian.pbgrpc.dart | 40 +- .../where_child_bus/v1/guardian.pbjson.dart | 31 ++ .../v1/health_check.pbgrpc.dart | 20 +- .../where_child_bus/v1/nursery.pb.dart | 170 ++++++- .../where_child_bus/v1/nursery.pbgrpc.dart | 40 +- .../where_child_bus/v1/nursery.pbjson.dart | 31 ++ .../where_child_bus/v1/resources.pb.dart | 172 +++---- .../where_child_bus/v1/resources.pbenum.dart | 4 +- .../where_child_bus/v1/resources.pbjson.dart | 4 +- .../where_child_bus/v1/station.pb.dart | 260 +++++++++++ .../where_child_bus/v1/station.pbenum.dart | 11 + .../where_child_bus/v1/station.pbgrpc.dart | 79 ++++ .../where_child_bus/v1/station.pbjson.dart | 73 +++ .../proto-gen/where_child_bus/v1/child_pb2.py | 32 +- .../where_child_bus/v1/child_pb2_grpc.py | 33 ++ .../where_child_bus/v1/guardian_pb2.py | 18 +- .../where_child_bus/v1/guardian_pb2_grpc.py | 33 ++ .../where_child_bus/v1/nursery_pb2.py | 18 +- .../where_child_bus/v1/nursery_pb2_grpc.py | 33 ++ .../where_child_bus/v1/resources_pb2.py | 2 +- .../where_child_bus/v1/station_pb2.py | 36 ++ .../where_child_bus/v1/station_pb2_grpc.py | 99 ++++ 46 files changed, 3148 insertions(+), 435 deletions(-) create mode 100644 backend/proto-gen/go/where_child_bus/v1/station.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbenum.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart create mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py diff --git a/backend/proto-gen/go/where_child_bus/v1/child.pb.go b/backend/proto-gen/go/where_child_bus/v1/child.pb.go index 7199f16c..ad3f8263 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child.pb.go @@ -28,8 +28,9 @@ type CreateChildRequest struct { NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` GuardianId string `protobuf:"bytes,2,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Sex Sex `protobuf:"varint,4,opt,name=sex,proto3,enum=where_child_bus.v1.Sex" json:"sex,omitempty"` - Photos [][]byte `protobuf:"bytes,5,rep,name=photos,proto3" json:"photos,omitempty"` + Age int32 `protobuf:"varint,4,opt,name=age,proto3" json:"age,omitempty"` + Sex Sex `protobuf:"varint,5,opt,name=sex,proto3,enum=where_child_bus.v1.Sex" json:"sex,omitempty"` + Photos [][]byte `protobuf:"bytes,6,rep,name=photos,proto3" json:"photos,omitempty"` } func (x *CreateChildRequest) Reset() { @@ -85,6 +86,13 @@ func (x *CreateChildRequest) GetName() string { return "" } +func (x *CreateChildRequest) GetAge() int32 { + if x != nil { + return x.Age + } + return 0 +} + func (x *CreateChildRequest) GetSex() Sex { if x != nil { return x.Sex @@ -334,6 +342,100 @@ func (x *GetChildListByGuardianIDResponse) GetChildren() []*Child { return nil } +type GetChildListByBusIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` +} + +func (x *GetChildListByBusIDRequest) Reset() { + *x = GetChildListByBusIDRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChildListByBusIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChildListByBusIDRequest) ProtoMessage() {} + +func (x *GetChildListByBusIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChildListByBusIDRequest.ProtoReflect.Descriptor instead. +func (*GetChildListByBusIDRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{6} +} + +func (x *GetChildListByBusIDRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +type GetChildListByBusIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *GetChildListByBusIDResponse) Reset() { + *x = GetChildListByBusIDResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChildListByBusIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChildListByBusIDResponse) ProtoMessage() {} + +func (x *GetChildListByBusIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChildListByBusIDResponse.ProtoReflect.Descriptor instead. +func (*GetChildListByBusIDResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{7} +} + +func (x *GetChildListByBusIDResponse) GetChildren() []*Child { + if x != nil { + return x.Children + } + return nil +} + var File_where_child_bus_v1_child_proto protoreflect.FileDescriptor var file_where_child_bus_v1_child_proto_rawDesc = []byte{ @@ -342,81 +444,99 @@ var file_where_child_bus_v1_child_proto_rawDesc = []byte{ 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, - 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x46, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, - 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, 0x3f, - 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, - 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, - 0x58, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x42, 0x0a, 0x1f, 0x47, 0x65, 0x74, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x59, 0x0a, - 0x20, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x32, 0xfb, 0x02, 0x0a, 0x0c, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0c, + 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x46, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2f, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x22, 0x3f, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x22, 0x58, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x42, 0x0a, 0x1f, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, + 0x59, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x33, 0x0a, 0x1a, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, + 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, + 0x54, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, + 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x32, 0xf3, 0x03, 0x0a, 0x0c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, - 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, - 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x49, 0x44, 0x12, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x18, + 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x12, 0x2e, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, + 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, + 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xed, 0x01, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, + 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -431,7 +551,7 @@ func file_where_child_bus_v1_child_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_child_proto_rawDescData } -var file_where_child_bus_v1_child_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_where_child_bus_v1_child_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ (*CreateChildRequest)(nil), // 0: where_child_bus.v1.CreateChildRequest (*CreateChildResponse)(nil), // 1: where_child_bus.v1.CreateChildResponse @@ -439,25 +559,30 @@ var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ (*GetChildListByNurseryIDResponse)(nil), // 3: where_child_bus.v1.GetChildListByNurseryIDResponse (*GetChildListByGuardianIDRequest)(nil), // 4: where_child_bus.v1.GetChildListByGuardianIDRequest (*GetChildListByGuardianIDResponse)(nil), // 5: where_child_bus.v1.GetChildListByGuardianIDResponse - (Sex)(0), // 6: where_child_bus.v1.Sex - (*Child)(nil), // 7: where_child_bus.v1.Child + (*GetChildListByBusIDRequest)(nil), // 6: where_child_bus.v1.GetChildListByBusIDRequest + (*GetChildListByBusIDResponse)(nil), // 7: where_child_bus.v1.GetChildListByBusIDResponse + (Sex)(0), // 8: where_child_bus.v1.Sex + (*Child)(nil), // 9: where_child_bus.v1.Child } var file_where_child_bus_v1_child_proto_depIdxs = []int32{ - 6, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex - 7, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child - 7, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child - 7, // 3: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child - 0, // 4: where_child_bus.v1.ChildService.CreateChild:input_type -> where_child_bus.v1.CreateChildRequest - 2, // 5: where_child_bus.v1.ChildService.GetChildListByNurseryID:input_type -> where_child_bus.v1.GetChildListByNurseryIDRequest - 4, // 6: where_child_bus.v1.ChildService.GetChildListByGuardianID:input_type -> where_child_bus.v1.GetChildListByGuardianIDRequest - 1, // 7: where_child_bus.v1.ChildService.CreateChild:output_type -> where_child_bus.v1.CreateChildResponse - 3, // 8: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse - 5, // 9: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse - 7, // [7:10] is the sub-list for method output_type - 4, // [4:7] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 8, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex + 9, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child + 9, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child + 9, // 3: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child + 9, // 4: where_child_bus.v1.GetChildListByBusIDResponse.children:type_name -> where_child_bus.v1.Child + 0, // 5: where_child_bus.v1.ChildService.CreateChild:input_type -> where_child_bus.v1.CreateChildRequest + 2, // 6: where_child_bus.v1.ChildService.GetChildListByNurseryID:input_type -> where_child_bus.v1.GetChildListByNurseryIDRequest + 4, // 7: where_child_bus.v1.ChildService.GetChildListByGuardianID:input_type -> where_child_bus.v1.GetChildListByGuardianIDRequest + 6, // 8: where_child_bus.v1.ChildService.GetChildListByBusID:input_type -> where_child_bus.v1.GetChildListByBusIDRequest + 1, // 9: where_child_bus.v1.ChildService.CreateChild:output_type -> where_child_bus.v1.CreateChildResponse + 3, // 10: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse + 5, // 11: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse + 7, // 12: where_child_bus.v1.ChildService.GetChildListByBusID:output_type -> where_child_bus.v1.GetChildListByBusIDResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_where_child_bus_v1_child_proto_init() } @@ -539,6 +664,30 @@ func file_where_child_bus_v1_child_proto_init() { return nil } } + file_where_child_bus_v1_child_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChildListByBusIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChildListByBusIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -546,7 +695,7 @@ func file_where_child_bus_v1_child_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_child_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go index d16ff79b..206fea4f 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go @@ -22,6 +22,7 @@ const ( ChildService_CreateChild_FullMethodName = "/where_child_bus.v1.ChildService/CreateChild" ChildService_GetChildListByNurseryID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByNurseryID" ChildService_GetChildListByGuardianID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByGuardianID" + ChildService_GetChildListByBusID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByBusID" ) // ChildServiceClient is the client API for ChildService service. @@ -31,6 +32,7 @@ type ChildServiceClient interface { CreateChild(ctx context.Context, in *CreateChildRequest, opts ...grpc.CallOption) (*CreateChildResponse, error) GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (*GetChildListByNurseryIDResponse, error) GetChildListByGuardianID(ctx context.Context, in *GetChildListByGuardianIDRequest, opts ...grpc.CallOption) (*GetChildListByGuardianIDResponse, error) + GetChildListByBusID(ctx context.Context, in *GetChildListByBusIDRequest, opts ...grpc.CallOption) (*GetChildListByBusIDResponse, error) } type childServiceClient struct { @@ -68,6 +70,15 @@ func (c *childServiceClient) GetChildListByGuardianID(ctx context.Context, in *G return out, nil } +func (c *childServiceClient) GetChildListByBusID(ctx context.Context, in *GetChildListByBusIDRequest, opts ...grpc.CallOption) (*GetChildListByBusIDResponse, error) { + out := new(GetChildListByBusIDResponse) + err := c.cc.Invoke(ctx, ChildService_GetChildListByBusID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ChildServiceServer is the server API for ChildService service. // All implementations should embed UnimplementedChildServiceServer // for forward compatibility @@ -75,6 +86,7 @@ type ChildServiceServer interface { CreateChild(context.Context, *CreateChildRequest) (*CreateChildResponse, error) GetChildListByNurseryID(context.Context, *GetChildListByNurseryIDRequest) (*GetChildListByNurseryIDResponse, error) GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) + GetChildListByBusID(context.Context, *GetChildListByBusIDRequest) (*GetChildListByBusIDResponse, error) } // UnimplementedChildServiceServer should be embedded to have forward compatible implementations. @@ -90,6 +102,9 @@ func (UnimplementedChildServiceServer) GetChildListByNurseryID(context.Context, func (UnimplementedChildServiceServer) GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChildListByGuardianID not implemented") } +func (UnimplementedChildServiceServer) GetChildListByBusID(context.Context, *GetChildListByBusIDRequest) (*GetChildListByBusIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChildListByBusID not implemented") +} // UnsafeChildServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ChildServiceServer will @@ -156,6 +171,24 @@ func _ChildService_GetChildListByGuardianID_Handler(srv interface{}, ctx context return interceptor(ctx, in, info, handler) } +func _ChildService_GetChildListByBusID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetChildListByBusIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChildServiceServer).GetChildListByBusID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChildService_GetChildListByBusID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChildServiceServer).GetChildListByBusID(ctx, req.(*GetChildListByBusIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ChildService_ServiceDesc is the grpc.ServiceDesc for ChildService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -175,6 +208,10 @@ var ChildService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetChildListByGuardianID", Handler: _ChildService_GetChildListByGuardianID_Handler, }, + { + MethodName: "GetChildListByBusID", + Handler: _ChildService_GetChildListByBusID_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/child.proto", diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go index 6f0094e4..032b53bd 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go @@ -20,6 +20,132 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type CreateGuardianRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NurseryCode string `protobuf:"bytes,1,opt,name=nursery_code,json=nurseryCode,proto3" json:"nursery_code,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` +} + +func (x *CreateGuardianRequest) Reset() { + *x = CreateGuardianRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGuardianRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGuardianRequest) ProtoMessage() {} + +func (x *CreateGuardianRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateGuardianRequest.ProtoReflect.Descriptor instead. +func (*CreateGuardianRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateGuardianRequest) GetNurseryCode() string { + if x != nil { + return x.NurseryCode + } + return "" +} + +func (x *CreateGuardianRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *CreateGuardianRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *CreateGuardianRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateGuardianRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +type CreateGuardianResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Guardian *GuardianResponse `protobuf:"bytes,1,opt,name=guardian,proto3" json:"guardian,omitempty"` +} + +func (x *CreateGuardianResponse) Reset() { + *x = CreateGuardianResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGuardianResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGuardianResponse) ProtoMessage() {} + +func (x *CreateGuardianResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateGuardianResponse.ProtoReflect.Descriptor instead. +func (*CreateGuardianResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateGuardianResponse) GetGuardian() *GuardianResponse { + if x != nil { + return x.Guardian + } + return nil +} + type GuardianLoginRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -32,7 +158,7 @@ type GuardianLoginRequest struct { func (x *GuardianLoginRequest) Reset() { *x = GuardianLoginRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_guardian_proto_msgTypes[0] + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +171,7 @@ func (x *GuardianLoginRequest) String() string { func (*GuardianLoginRequest) ProtoMessage() {} func (x *GuardianLoginRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_guardian_proto_msgTypes[0] + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +184,7 @@ func (x *GuardianLoginRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GuardianLoginRequest.ProtoReflect.Descriptor instead. func (*GuardianLoginRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{0} + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{2} } func (x *GuardianLoginRequest) GetEmail() string { @@ -88,7 +214,7 @@ type GuardianLoginResponse struct { func (x *GuardianLoginResponse) Reset() { *x = GuardianLoginResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_guardian_proto_msgTypes[1] + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -101,7 +227,7 @@ func (x *GuardianLoginResponse) String() string { func (*GuardianLoginResponse) ProtoMessage() {} func (x *GuardianLoginResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_guardian_proto_msgTypes[1] + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114,7 +240,7 @@ func (x *GuardianLoginResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GuardianLoginResponse.ProtoReflect.Descriptor instead. func (*GuardianLoginResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{1} + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{3} } func (x *GuardianLoginResponse) GetSuccess() bool { @@ -146,46 +272,69 @@ var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x14, 0x47, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xb2, 0x01, 0x0a, 0x15, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x08, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x3d, 0x0a, 0x07, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0x77, 0x0a, 0x0f, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, - 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x01, 0x0a, 0x15, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x22, 0x5a, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x22, 0x48, 0x0a, + 0x14, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xb2, 0x01, 0x0a, 0x15, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x08, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x3d, 0x0a, + 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, - 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, - 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0xe0, 0x01, 0x0a, + 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, + 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, + 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -200,23 +349,28 @@ func file_where_child_bus_v1_guardian_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_guardian_proto_rawDescData } -var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_where_child_bus_v1_guardian_proto_goTypes = []interface{}{ - (*GuardianLoginRequest)(nil), // 0: where_child_bus.v1.GuardianLoginRequest - (*GuardianLoginResponse)(nil), // 1: where_child_bus.v1.GuardianLoginResponse - (*GuardianResponse)(nil), // 2: where_child_bus.v1.GuardianResponse - (*NurseryResponse)(nil), // 3: where_child_bus.v1.NurseryResponse + (*CreateGuardianRequest)(nil), // 0: where_child_bus.v1.CreateGuardianRequest + (*CreateGuardianResponse)(nil), // 1: where_child_bus.v1.CreateGuardianResponse + (*GuardianLoginRequest)(nil), // 2: where_child_bus.v1.GuardianLoginRequest + (*GuardianLoginResponse)(nil), // 3: where_child_bus.v1.GuardianLoginResponse + (*GuardianResponse)(nil), // 4: where_child_bus.v1.GuardianResponse + (*NurseryResponse)(nil), // 5: where_child_bus.v1.NurseryResponse } var file_where_child_bus_v1_guardian_proto_depIdxs = []int32{ - 2, // 0: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 3, // 1: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 0, // 2: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest - 1, // 3: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 4, // 0: where_child_bus.v1.CreateGuardianResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 4, // 1: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 5, // 2: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 0, // 3: where_child_bus.v1.GuardianService.CreateGuardian:input_type -> where_child_bus.v1.CreateGuardianRequest + 2, // 4: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest + 1, // 5: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse + 3, // 6: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse + 5, // [5:7] is the sub-list for method output_type + 3, // [3:5] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_where_child_bus_v1_guardian_proto_init() } @@ -227,7 +381,7 @@ func file_where_child_bus_v1_guardian_proto_init() { file_where_child_bus_v1_resources_proto_init() if !protoimpl.UnsafeEnabled { file_where_child_bus_v1_guardian_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GuardianLoginRequest); i { + switch v := v.(*CreateGuardianRequest); i { case 0: return &v.state case 1: @@ -239,6 +393,30 @@ func file_where_child_bus_v1_guardian_proto_init() { } } file_where_child_bus_v1_guardian_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateGuardianResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_guardian_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GuardianLoginRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_guardian_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GuardianLoginResponse); i { case 0: return &v.state @@ -257,7 +435,7 @@ func file_where_child_bus_v1_guardian_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_guardian_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go index 022ab8fc..df4b5828 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go @@ -19,13 +19,15 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - GuardianService_GuardianLogin_FullMethodName = "/where_child_bus.v1.GuardianService/GuardianLogin" + GuardianService_CreateGuardian_FullMethodName = "/where_child_bus.v1.GuardianService/CreateGuardian" + GuardianService_GuardianLogin_FullMethodName = "/where_child_bus.v1.GuardianService/GuardianLogin" ) // GuardianServiceClient is the client API for GuardianService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type GuardianServiceClient interface { + CreateGuardian(ctx context.Context, in *CreateGuardianRequest, opts ...grpc.CallOption) (*CreateGuardianResponse, error) GuardianLogin(ctx context.Context, in *GuardianLoginRequest, opts ...grpc.CallOption) (*GuardianLoginResponse, error) } @@ -37,6 +39,15 @@ func NewGuardianServiceClient(cc grpc.ClientConnInterface) GuardianServiceClient return &guardianServiceClient{cc} } +func (c *guardianServiceClient) CreateGuardian(ctx context.Context, in *CreateGuardianRequest, opts ...grpc.CallOption) (*CreateGuardianResponse, error) { + out := new(CreateGuardianResponse) + err := c.cc.Invoke(ctx, GuardianService_CreateGuardian_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *guardianServiceClient) GuardianLogin(ctx context.Context, in *GuardianLoginRequest, opts ...grpc.CallOption) (*GuardianLoginResponse, error) { out := new(GuardianLoginResponse) err := c.cc.Invoke(ctx, GuardianService_GuardianLogin_FullMethodName, in, out, opts...) @@ -50,6 +61,7 @@ func (c *guardianServiceClient) GuardianLogin(ctx context.Context, in *GuardianL // All implementations should embed UnimplementedGuardianServiceServer // for forward compatibility type GuardianServiceServer interface { + CreateGuardian(context.Context, *CreateGuardianRequest) (*CreateGuardianResponse, error) GuardianLogin(context.Context, *GuardianLoginRequest) (*GuardianLoginResponse, error) } @@ -57,6 +69,9 @@ type GuardianServiceServer interface { type UnimplementedGuardianServiceServer struct { } +func (UnimplementedGuardianServiceServer) CreateGuardian(context.Context, *CreateGuardianRequest) (*CreateGuardianResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGuardian not implemented") +} func (UnimplementedGuardianServiceServer) GuardianLogin(context.Context, *GuardianLoginRequest) (*GuardianLoginResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GuardianLogin not implemented") } @@ -72,6 +87,24 @@ func RegisterGuardianServiceServer(s grpc.ServiceRegistrar, srv GuardianServiceS s.RegisterService(&GuardianService_ServiceDesc, srv) } +func _GuardianService_CreateGuardian_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGuardianRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuardianServiceServer).CreateGuardian(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GuardianService_CreateGuardian_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuardianServiceServer).CreateGuardian(ctx, req.(*CreateGuardianRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _GuardianService_GuardianLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GuardianLoginRequest) if err := dec(in); err != nil { @@ -97,6 +130,10 @@ var GuardianService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "where_child_bus.v1.GuardianService", HandlerType: (*GuardianServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "CreateGuardian", + Handler: _GuardianService_CreateGuardian_Handler, + }, { MethodName: "GuardianLogin", Handler: _GuardianService_GuardianLogin_Handler, diff --git a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go index e385fa72..24959719 100644 --- a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go @@ -20,6 +20,132 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type CreateNurseryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *CreateNurseryRequest) Reset() { + *x = CreateNurseryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNurseryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNurseryRequest) ProtoMessage() {} + +func (x *CreateNurseryRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNurseryRequest.ProtoReflect.Descriptor instead. +func (*CreateNurseryRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateNurseryRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *CreateNurseryRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *CreateNurseryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateNurseryRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *CreateNurseryRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +type CreateNurseryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nursery *NurseryResponse `protobuf:"bytes,1,opt,name=nursery,proto3" json:"nursery,omitempty"` +} + +func (x *CreateNurseryResponse) Reset() { + *x = CreateNurseryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNurseryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNurseryResponse) ProtoMessage() {} + +func (x *CreateNurseryResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNurseryResponse.ProtoReflect.Descriptor instead. +func (*CreateNurseryResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateNurseryResponse) GetNursery() *NurseryResponse { + if x != nil { + return x.Nursery + } + return nil +} + type NurseryLoginRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -32,7 +158,7 @@ type NurseryLoginRequest struct { func (x *NurseryLoginRequest) Reset() { *x = NurseryLoginRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[0] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +171,7 @@ func (x *NurseryLoginRequest) String() string { func (*NurseryLoginRequest) ProtoMessage() {} func (x *NurseryLoginRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[0] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +184,7 @@ func (x *NurseryLoginRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use NurseryLoginRequest.ProtoReflect.Descriptor instead. func (*NurseryLoginRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{0} + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{2} } func (x *NurseryLoginRequest) GetEmail() string { @@ -87,7 +213,7 @@ type NurseryLoginResponse struct { func (x *NurseryLoginResponse) Reset() { *x = NurseryLoginResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[1] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -100,7 +226,7 @@ func (x *NurseryLoginResponse) String() string { func (*NurseryLoginResponse) ProtoMessage() {} func (x *NurseryLoginResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[1] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113,7 +239,7 @@ func (x *NurseryLoginResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use NurseryLoginResponse.ProtoReflect.Descriptor instead. func (*NurseryLoginResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{1} + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{3} } func (x *NurseryLoginResponse) GetSuccess() bool { @@ -138,42 +264,63 @@ var file_where_child_bus_v1_nursery_proto_rawDesc = []byte{ 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a, 0x13, 0x4e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x22, 0x6f, 0x0a, 0x14, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, - 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x32, 0x73, 0x0a, 0x0e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, - 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, - 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, 0x14, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, + 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x56, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x22, 0x47, + 0x0a, 0x13, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x6f, 0x0a, 0x14, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0xd9, 0x01, 0x0a, 0x0e, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x61, 0x0a, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x12, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, + 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -188,21 +335,26 @@ func file_where_child_bus_v1_nursery_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_nursery_proto_rawDescData } -var file_where_child_bus_v1_nursery_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_where_child_bus_v1_nursery_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_where_child_bus_v1_nursery_proto_goTypes = []interface{}{ - (*NurseryLoginRequest)(nil), // 0: where_child_bus.v1.NurseryLoginRequest - (*NurseryLoginResponse)(nil), // 1: where_child_bus.v1.NurseryLoginResponse - (*NurseryResponse)(nil), // 2: where_child_bus.v1.NurseryResponse + (*CreateNurseryRequest)(nil), // 0: where_child_bus.v1.CreateNurseryRequest + (*CreateNurseryResponse)(nil), // 1: where_child_bus.v1.CreateNurseryResponse + (*NurseryLoginRequest)(nil), // 2: where_child_bus.v1.NurseryLoginRequest + (*NurseryLoginResponse)(nil), // 3: where_child_bus.v1.NurseryLoginResponse + (*NurseryResponse)(nil), // 4: where_child_bus.v1.NurseryResponse } var file_where_child_bus_v1_nursery_proto_depIdxs = []int32{ - 2, // 0: where_child_bus.v1.NurseryLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 0, // 1: where_child_bus.v1.NurseryService.NurseryLogin:input_type -> where_child_bus.v1.NurseryLoginRequest - 1, // 2: where_child_bus.v1.NurseryService.NurseryLogin:output_type -> where_child_bus.v1.NurseryLoginResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 4, // 0: where_child_bus.v1.CreateNurseryResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 4, // 1: where_child_bus.v1.NurseryLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 0, // 2: where_child_bus.v1.NurseryService.CreateNursery:input_type -> where_child_bus.v1.CreateNurseryRequest + 2, // 3: where_child_bus.v1.NurseryService.NurseryLogin:input_type -> where_child_bus.v1.NurseryLoginRequest + 1, // 4: where_child_bus.v1.NurseryService.CreateNursery:output_type -> where_child_bus.v1.CreateNurseryResponse + 3, // 5: where_child_bus.v1.NurseryService.NurseryLogin:output_type -> where_child_bus.v1.NurseryLoginResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_where_child_bus_v1_nursery_proto_init() } @@ -213,7 +365,7 @@ func file_where_child_bus_v1_nursery_proto_init() { file_where_child_bus_v1_resources_proto_init() if !protoimpl.UnsafeEnabled { file_where_child_bus_v1_nursery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NurseryLoginRequest); i { + switch v := v.(*CreateNurseryRequest); i { case 0: return &v.state case 1: @@ -225,6 +377,30 @@ func file_where_child_bus_v1_nursery_proto_init() { } } file_where_child_bus_v1_nursery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNurseryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_nursery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NurseryLoginRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_nursery_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NurseryLoginResponse); i { case 0: return &v.state @@ -243,7 +419,7 @@ func file_where_child_bus_v1_nursery_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_nursery_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go index f757b0c6..926a2a61 100644 --- a/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go @@ -19,13 +19,15 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - NurseryService_NurseryLogin_FullMethodName = "/where_child_bus.v1.NurseryService/NurseryLogin" + NurseryService_CreateNursery_FullMethodName = "/where_child_bus.v1.NurseryService/CreateNursery" + NurseryService_NurseryLogin_FullMethodName = "/where_child_bus.v1.NurseryService/NurseryLogin" ) // NurseryServiceClient is the client API for NurseryService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type NurseryServiceClient interface { + CreateNursery(ctx context.Context, in *CreateNurseryRequest, opts ...grpc.CallOption) (*CreateNurseryResponse, error) NurseryLogin(ctx context.Context, in *NurseryLoginRequest, opts ...grpc.CallOption) (*NurseryLoginResponse, error) } @@ -37,6 +39,15 @@ func NewNurseryServiceClient(cc grpc.ClientConnInterface) NurseryServiceClient { return &nurseryServiceClient{cc} } +func (c *nurseryServiceClient) CreateNursery(ctx context.Context, in *CreateNurseryRequest, opts ...grpc.CallOption) (*CreateNurseryResponse, error) { + out := new(CreateNurseryResponse) + err := c.cc.Invoke(ctx, NurseryService_CreateNursery_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *nurseryServiceClient) NurseryLogin(ctx context.Context, in *NurseryLoginRequest, opts ...grpc.CallOption) (*NurseryLoginResponse, error) { out := new(NurseryLoginResponse) err := c.cc.Invoke(ctx, NurseryService_NurseryLogin_FullMethodName, in, out, opts...) @@ -50,6 +61,7 @@ func (c *nurseryServiceClient) NurseryLogin(ctx context.Context, in *NurseryLogi // All implementations should embed UnimplementedNurseryServiceServer // for forward compatibility type NurseryServiceServer interface { + CreateNursery(context.Context, *CreateNurseryRequest) (*CreateNurseryResponse, error) NurseryLogin(context.Context, *NurseryLoginRequest) (*NurseryLoginResponse, error) } @@ -57,6 +69,9 @@ type NurseryServiceServer interface { type UnimplementedNurseryServiceServer struct { } +func (UnimplementedNurseryServiceServer) CreateNursery(context.Context, *CreateNurseryRequest) (*CreateNurseryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateNursery not implemented") +} func (UnimplementedNurseryServiceServer) NurseryLogin(context.Context, *NurseryLoginRequest) (*NurseryLoginResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NurseryLogin not implemented") } @@ -72,6 +87,24 @@ func RegisterNurseryServiceServer(s grpc.ServiceRegistrar, srv NurseryServiceSer s.RegisterService(&NurseryService_ServiceDesc, srv) } +func _NurseryService_CreateNursery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateNurseryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NurseryServiceServer).CreateNursery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NurseryService_CreateNursery_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NurseryServiceServer).CreateNursery(ctx, req.(*CreateNurseryRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _NurseryService_NurseryLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(NurseryLoginRequest) if err := dec(in); err != nil { @@ -97,6 +130,10 @@ var NurseryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "where_child_bus.v1.NurseryService", HandlerType: (*NurseryServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "CreateNursery", + Handler: _NurseryService_CreateNursery_Handler, + }, { MethodName: "NurseryLogin", Handler: _NurseryService_NurseryLogin_Handler, diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 5ca47e9a..16f6ee31 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -78,7 +78,7 @@ type Sex int32 const ( Sex_SEX_UNSPECIFIED Sex = 0 Sex_SEX_MAN Sex = 1 - Sex_SEX_WOMEN Sex = 2 + Sex_SEX_WOMAN Sex = 2 Sex_SEX_OTHER Sex = 3 ) @@ -87,13 +87,13 @@ var ( Sex_name = map[int32]string{ 0: "SEX_UNSPECIFIED", 1: "SEX_MAN", - 2: "SEX_WOMEN", + 2: "SEX_WOMAN", 3: "SEX_OTHER", } Sex_value = map[string]int32{ "SEX_UNSPECIFIED": 0, "SEX_MAN": 1, - "SEX_WOMEN": 2, + "SEX_WOMAN": 2, "SEX_OTHER": 3, } ) @@ -1471,7 +1471,7 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x45, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x45, 0x4e, 0x10, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go new file mode 100644 index 00000000..66fe74a6 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -0,0 +1,426 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/v1/station.proto + +package where_child_busv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateStationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GuardianId string `protobuf:"bytes,1,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` + Longtitude float64 `protobuf:"fixed64,2,opt,name=longtitude,proto3" json:"longtitude,omitempty"` + Latitude float64 `protobuf:"fixed64,3,opt,name=latitude,proto3" json:"latitude,omitempty"` +} + +func (x *CreateStationRequest) Reset() { + *x = CreateStationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_station_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateStationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateStationRequest) ProtoMessage() {} + +func (x *CreateStationRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_station_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateStationRequest.ProtoReflect.Descriptor instead. +func (*CreateStationRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateStationRequest) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +func (x *CreateStationRequest) GetLongtitude() float64 { + if x != nil { + return x.Longtitude + } + return 0 +} + +func (x *CreateStationRequest) GetLatitude() float64 { + if x != nil { + return x.Latitude + } + return 0 +} + +type CreateStationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Station *Station `protobuf:"bytes,1,opt,name=station,proto3" json:"station,omitempty"` +} + +func (x *CreateStationResponse) Reset() { + *x = CreateStationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_station_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateStationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateStationResponse) ProtoMessage() {} + +func (x *CreateStationResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_station_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateStationResponse.ProtoReflect.Descriptor instead. +func (*CreateStationResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateStationResponse) GetStation() *Station { + if x != nil { + return x.Station + } + return nil +} + +type GetStationListByBusIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` +} + +func (x *GetStationListByBusIdRequest) Reset() { + *x = GetStationListByBusIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_station_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStationListByBusIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStationListByBusIdRequest) ProtoMessage() {} + +func (x *GetStationListByBusIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_station_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStationListByBusIdRequest.ProtoReflect.Descriptor instead. +func (*GetStationListByBusIdRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{2} +} + +func (x *GetStationListByBusIdRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +type GetStationListByBusIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stations []*Station `protobuf:"bytes,1,rep,name=stations,proto3" json:"stations,omitempty"` + Guardians []*GuardianResponse `protobuf:"bytes,2,rep,name=guardians,proto3" json:"guardians,omitempty"` + Children []*Child `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *GetStationListByBusIdResponse) Reset() { + *x = GetStationListByBusIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_station_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStationListByBusIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStationListByBusIdResponse) ProtoMessage() {} + +func (x *GetStationListByBusIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_station_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStationListByBusIdResponse.ProtoReflect.Descriptor instead. +func (*GetStationListByBusIdResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{3} +} + +func (x *GetStationListByBusIdResponse) GetStations() []*Station { + if x != nil { + return x.Stations + } + return nil +} + +func (x *GetStationListByBusIdResponse) GetGuardians() []*GuardianResponse { + if x != nil { + return x.Guardians + } + return nil +} + +func (x *GetStationListByBusIdResponse) GetChildren() []*Child { + if x != nil { + return x.Children + } + return nil +} + +var File_where_child_bus_v1_station_proto protoreflect.FileDescriptor + +var file_where_child_bus_v1_station_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x73, 0x0a, 0x14, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x74, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x74, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, + 0x4e, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x35, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0xd3, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x32, 0xf4, 0x01, 0x0a, + 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x64, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, + 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_v1_station_proto_rawDescOnce sync.Once + file_where_child_bus_v1_station_proto_rawDescData = file_where_child_bus_v1_station_proto_rawDesc +) + +func file_where_child_bus_v1_station_proto_rawDescGZIP() []byte { + file_where_child_bus_v1_station_proto_rawDescOnce.Do(func() { + file_where_child_bus_v1_station_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_v1_station_proto_rawDescData) + }) + return file_where_child_bus_v1_station_proto_rawDescData +} + +var file_where_child_bus_v1_station_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_where_child_bus_v1_station_proto_goTypes = []interface{}{ + (*CreateStationRequest)(nil), // 0: where_child_bus.v1.CreateStationRequest + (*CreateStationResponse)(nil), // 1: where_child_bus.v1.CreateStationResponse + (*GetStationListByBusIdRequest)(nil), // 2: where_child_bus.v1.GetStationListByBusIdRequest + (*GetStationListByBusIdResponse)(nil), // 3: where_child_bus.v1.GetStationListByBusIdResponse + (*Station)(nil), // 4: where_child_bus.v1.Station + (*GuardianResponse)(nil), // 5: where_child_bus.v1.GuardianResponse + (*Child)(nil), // 6: where_child_bus.v1.Child +} +var file_where_child_bus_v1_station_proto_depIdxs = []int32{ + 4, // 0: where_child_bus.v1.CreateStationResponse.station:type_name -> where_child_bus.v1.Station + 4, // 1: where_child_bus.v1.GetStationListByBusIdResponse.stations:type_name -> where_child_bus.v1.Station + 5, // 2: where_child_bus.v1.GetStationListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 6, // 3: where_child_bus.v1.GetStationListByBusIdResponse.children:type_name -> where_child_bus.v1.Child + 0, // 4: where_child_bus.v1.StationService.CreateStation:input_type -> where_child_bus.v1.CreateStationRequest + 2, // 5: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest + 1, // 6: where_child_bus.v1.StationService.CreateStation:output_type -> where_child_bus.v1.CreateStationResponse + 3, // 7: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_where_child_bus_v1_station_proto_init() } +func file_where_child_bus_v1_station_proto_init() { + if File_where_child_bus_v1_station_proto != nil { + return + } + file_where_child_bus_v1_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_where_child_bus_v1_station_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateStationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_station_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateStationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_station_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStationListByBusIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_station_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStationListByBusIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_v1_station_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_where_child_bus_v1_station_proto_goTypes, + DependencyIndexes: file_where_child_bus_v1_station_proto_depIdxs, + MessageInfos: file_where_child_bus_v1_station_proto_msgTypes, + }.Build() + File_where_child_bus_v1_station_proto = out.File + file_where_child_bus_v1_station_proto_rawDesc = nil + file_where_child_bus_v1_station_proto_goTypes = nil + file_where_child_bus_v1_station_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go new file mode 100644 index 00000000..890cc3f9 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: where_child_bus/v1/station.proto + +package where_child_busv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + StationService_CreateStation_FullMethodName = "/where_child_bus.v1.StationService/CreateStation" + StationService_GetStationListByBusId_FullMethodName = "/where_child_bus.v1.StationService/GetStationListByBusId" +) + +// StationServiceClient is the client API for StationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type StationServiceClient interface { + CreateStation(ctx context.Context, in *CreateStationRequest, opts ...grpc.CallOption) (*CreateStationResponse, error) + GetStationListByBusId(ctx context.Context, in *GetStationListByBusIdRequest, opts ...grpc.CallOption) (*GetStationListByBusIdResponse, error) +} + +type stationServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewStationServiceClient(cc grpc.ClientConnInterface) StationServiceClient { + return &stationServiceClient{cc} +} + +func (c *stationServiceClient) CreateStation(ctx context.Context, in *CreateStationRequest, opts ...grpc.CallOption) (*CreateStationResponse, error) { + out := new(CreateStationResponse) + err := c.cc.Invoke(ctx, StationService_CreateStation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *stationServiceClient) GetStationListByBusId(ctx context.Context, in *GetStationListByBusIdRequest, opts ...grpc.CallOption) (*GetStationListByBusIdResponse, error) { + out := new(GetStationListByBusIdResponse) + err := c.cc.Invoke(ctx, StationService_GetStationListByBusId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// StationServiceServer is the server API for StationService service. +// All implementations should embed UnimplementedStationServiceServer +// for forward compatibility +type StationServiceServer interface { + CreateStation(context.Context, *CreateStationRequest) (*CreateStationResponse, error) + GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) +} + +// UnimplementedStationServiceServer should be embedded to have forward compatible implementations. +type UnimplementedStationServiceServer struct { +} + +func (UnimplementedStationServiceServer) CreateStation(context.Context, *CreateStationRequest) (*CreateStationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateStation not implemented") +} +func (UnimplementedStationServiceServer) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStationListByBusId not implemented") +} + +// UnsafeStationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to StationServiceServer will +// result in compilation errors. +type UnsafeStationServiceServer interface { + mustEmbedUnimplementedStationServiceServer() +} + +func RegisterStationServiceServer(s grpc.ServiceRegistrar, srv StationServiceServer) { + s.RegisterService(&StationService_ServiceDesc, srv) +} + +func _StationService_CreateStation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateStationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StationServiceServer).CreateStation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StationService_CreateStation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StationServiceServer).CreateStation(ctx, req.(*CreateStationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StationService_GetStationListByBusId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStationListByBusIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StationServiceServer).GetStationListByBusId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StationService_GetStationListByBusId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StationServiceServer).GetStationListByBusId(ctx, req.(*GetStationListByBusIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// StationService_ServiceDesc is the grpc.ServiceDesc for StationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var StationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "where_child_bus.v1.StationService", + HandlerType: (*StationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateStation", + Handler: _StationService_CreateStation_Handler, + }, + { + MethodName: "GetStationListByBusId", + Handler: _StationService_GetStationListByBusId_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "where_child_bus/v1/station.proto", +} diff --git a/backend/proto/where_child_bus/v1/child.proto b/backend/proto/where_child_bus/v1/child.proto index bbee84c9..74fd6737 100644 --- a/backend/proto/where_child_bus/v1/child.proto +++ b/backend/proto/where_child_bus/v1/child.proto @@ -15,8 +15,9 @@ message CreateChildRequest { string nursery_id = 1; string guardian_id = 2; string name = 3; - Sex sex = 4; - repeated bytes photos = 5; + int32 age = 4; + Sex sex =5; + repeated bytes photos = 6; } message CreateChildResponse { diff --git a/backend/proto/where_child_bus/v1/guardian.proto b/backend/proto/where_child_bus/v1/guardian.proto index a21d4c7a..af519c51 100644 --- a/backend/proto/where_child_bus/v1/guardian.proto +++ b/backend/proto/where_child_bus/v1/guardian.proto @@ -5,7 +5,7 @@ package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; service GuardianService { - rpc CreateGuardian(CreateGuardianRequest) returns (CreateGuardianResponces); + rpc CreateGuardian(CreateGuardianRequest) returns (CreateGuardianResponse); rpc GuardianLogin(GuardianLoginRequest) returns (GuardianLoginResponse); } @@ -17,7 +17,7 @@ message CreateGuardianRequest{ string phone_number = 5; } -message CreateGuardianResponces{ +message CreateGuardianResponse{ GuardianResponse guardian = 1; } diff --git a/backend/proto/where_child_bus/v1/nursery.proto b/backend/proto/where_child_bus/v1/nursery.proto index f1b18156..95448466 100644 --- a/backend/proto/where_child_bus/v1/nursery.proto +++ b/backend/proto/where_child_bus/v1/nursery.proto @@ -5,7 +5,7 @@ package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; service NurseryService { - rpc CreateNursery(CreateChildRequest) returns (CreateNurseryResponse); + rpc CreateNursery(CreateNurseryRequest) returns (CreateNurseryResponse); rpc NurseryLogin(NurseryLoginRequest) returns (NurseryLoginResponse); } @@ -18,10 +18,10 @@ message CreateNurseryRequest { } message CreateNurseryResponse { - NurseryResponse nursery = 1: + NurseryResponse nursery = 1; } -message NurseryLoginRequest { +message NurseryLoginRequest {; string email = 1; string password = 2; } diff --git a/backend/proto/where_child_bus/v1/resources.proto b/backend/proto/where_child_bus/v1/resources.proto index 89bd5622..bdf9f601 100644 --- a/backend/proto/where_child_bus/v1/resources.proto +++ b/backend/proto/where_child_bus/v1/resources.proto @@ -73,7 +73,7 @@ message Bus { enum Sex { SEX_UNSPECIFIED = 0; SEX_MAN = 1; - SEX_WOMEN = 2; + SEX_WOMAN = 2; SEX_OTHER = 3; } diff --git a/backend/proto/where_child_bus/v1/station.proto b/backend/proto/where_child_bus/v1/station.proto index 438fd4b0..bd2299e6 100644 --- a/backend/proto/where_child_bus/v1/station.proto +++ b/backend/proto/where_child_bus/v1/station.proto @@ -10,7 +10,7 @@ service StationService { } message CreateStationRequest { - string guardian_id = 1: + string guardian_id = 1; double longtitude = 2; double latitude = 3; } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart index fd9eb912..e715fe34 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -13,7 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $6; +import 'resources.pb.dart' as $8; class CreateBusRequest extends $pb.GeneratedMessage { factory CreateBusRequest({ @@ -103,8 +103,8 @@ class CreateBusRequest extends $pb.GeneratedMessage { class CreateBusResponse extends $pb.GeneratedMessage { factory CreateBusResponse({ - $1.Bus? bus, - $core.Iterable<$1.Child>? children, + $8.Bus? bus, + $core.Iterable<$8.Child>? children, }) { final $result = create(); if (bus != null) { @@ -120,8 +120,8 @@ class CreateBusResponse extends $pb.GeneratedMessage { factory CreateBusResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateBusResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$1.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $1.Bus.create) - ..pc<$1.Child>(2, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $1.Child.create) + ..aOM<$8.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $8.Bus.create) + ..pc<$8.Child>(2, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) ..hasRequiredFields = false ; @@ -147,18 +147,18 @@ class CreateBusResponse extends $pb.GeneratedMessage { static CreateBusResponse? _defaultInstance; @$pb.TagNumber(1) - $1.Bus get bus => $_getN(0); + $8.Bus get bus => $_getN(0); @$pb.TagNumber(1) - set bus($1.Bus v) { setField(1, v); } + set bus($8.Bus v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasBus() => $_has(0); @$pb.TagNumber(1) void clearBus() => clearField(1); @$pb.TagNumber(1) - $1.Bus ensureBus() => $_ensure(0); + $8.Bus ensureBus() => $_ensure(0); @$pb.TagNumber(2) - $core.List<$1.Child> get children => $_getList(1); + $core.List<$8.Child> get children => $_getList(1); } class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { @@ -213,7 +213,7 @@ class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetBusListByNurseryIdResponse({ - $core.Iterable<$6.Bus>? buses, + $core.Iterable<$8.Bus>? buses, }) { final $result = create(); if (buses != null) { @@ -226,7 +226,7 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetBusListByNurseryIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusListByNurseryIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$6.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $6.Bus.create) + ..pc<$8.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $8.Bus.create) ..hasRequiredFields = false ; @@ -252,7 +252,7 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { static GetBusListByNurseryIdResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$6.Bus> get buses => $_getList(0); + $core.List<$8.Bus> get buses => $_getList(0); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart index 393315ee..6e790502 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart @@ -21,6 +21,10 @@ export 'bus.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.BusService') class BusServiceClient extends $grpc.Client { + static final _$createBus = $grpc.ClientMethod<$0.CreateBusRequest, $0.CreateBusResponse>( + '/where_child_bus.v1.BusService/CreateBus', + ($0.CreateBusRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.CreateBusResponse.fromBuffer(value)); static final _$getBusListByNurseryId = $grpc.ClientMethod<$0.GetBusListByNurseryIdRequest, $0.GetBusListByNurseryIdResponse>( '/where_child_bus.v1.BusService/GetBusListByNurseryId', ($0.GetBusListByNurseryIdRequest value) => value.writeToBuffer(), @@ -32,6 +36,10 @@ class BusServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); + $grpc.ResponseFuture<$0.CreateBusResponse> createBus($0.CreateBusRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$createBus, request, options: options); + } + $grpc.ResponseFuture<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($0.GetBusListByNurseryIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getBusListByNurseryId, request, options: options); } @@ -42,6 +50,13 @@ abstract class BusServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.BusService'; BusServiceBase() { + $addMethod($grpc.ServiceMethod<$0.CreateBusRequest, $0.CreateBusResponse>( + 'CreateBus', + createBus_Pre, + false, + false, + ($core.List<$core.int> value) => $0.CreateBusRequest.fromBuffer(value), + ($0.CreateBusResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.GetBusListByNurseryIdRequest, $0.GetBusListByNurseryIdResponse>( 'GetBusListByNurseryId', getBusListByNurseryId_Pre, @@ -51,9 +66,14 @@ abstract class BusServiceBase extends $grpc.Service { ($0.GetBusListByNurseryIdResponse value) => value.writeToBuffer())); } + $async.Future<$0.CreateBusResponse> createBus_Pre($grpc.ServiceCall call, $async.Future<$0.CreateBusRequest> request) async { + return createBus(call, await request); + } + $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId_Pre($grpc.ServiceCall call, $async.Future<$0.GetBusListByNurseryIdRequest> request) async { return getBusListByNurseryId(call, await request); } + $async.Future<$0.CreateBusResponse> createBus($grpc.ServiceCall call, $0.CreateBusRequest request); $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($grpc.ServiceCall call, $0.GetBusListByNurseryIdRequest request); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 11fc1604..5f49dd55 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -13,6 +13,38 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use createBusRequestDescriptor instead') +const CreateBusRequest$json = { + '1': 'CreateBusRequest', + '2': [ + {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'plate_number', '3': 3, '4': 1, '5': 9, '10': 'plateNumber'}, + {'1': 'child_ids', '3': 4, '4': 3, '5': 9, '10': 'childIds'}, + ], +}; + +/// Descriptor for `CreateBusRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createBusRequestDescriptor = $convert.base64Decode( + 'ChBDcmVhdGVCdXNSZXF1ZXN0Eh0KCm51cnNlcnlfaWQYASABKAlSCW51cnNlcnlJZBISCgRuYW' + '1lGAIgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgDIAEoCVILcGxhdGVOdW1iZXISGwoJY2hp' + 'bGRfaWRzGAQgAygJUghjaGlsZElkcw=='); + +@$core.Deprecated('Use createBusResponseDescriptor instead') +const CreateBusResponse$json = { + '1': 'CreateBusResponse', + '2': [ + {'1': 'bus', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Bus', '10': 'bus'}, + {'1': 'children', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + ], +}; + +/// Descriptor for `CreateBusResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createBusResponseDescriptor = $convert.base64Decode( + 'ChFDcmVhdGVCdXNSZXNwb25zZRIpCgNidXMYASABKAsyFy53aGVyZV9jaGlsZF9idXMudjEuQn' + 'VzUgNidXMSNQoIY2hpbGRyZW4YAiADKAsyGS53aGVyZV9jaGlsZF9idXMudjEuQ2hpbGRSCGNo' + 'aWxkcmVu'); + @$core.Deprecated('Use getBusListByNurseryIdRequestDescriptor instead') const GetBusListByNurseryIdRequest$json = { '1': 'GetBusListByNurseryIdRequest', diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart index acfc7397..764ef6bb 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -13,7 +13,174 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $6; +import 'resources.pb.dart' as $8; +import 'resources.pbenum.dart' as $8; + +class CreateChildRequest extends $pb.GeneratedMessage { + factory CreateChildRequest({ + $core.String? nurseryId, + $core.String? guardianId, + $core.String? name, + $core.int? age, + $8.Sex? sex, + $core.Iterable<$core.List<$core.int>>? photos, + }) { + final $result = create(); + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (guardianId != null) { + $result.guardianId = guardianId; + } + if (name != null) { + $result.name = name; + } + if (age != null) { + $result.age = age; + } + if (sex != null) { + $result.sex = sex; + } + if (photos != null) { + $result.photos.addAll(photos); + } + return $result; + } + CreateChildRequest._() : super(); + factory CreateChildRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateChildRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateChildRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'nurseryId') + ..aOS(2, _omitFieldNames ? '' : 'guardianId') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..a<$core.int>(4, _omitFieldNames ? '' : 'age', $pb.PbFieldType.O3) + ..e<$8.Sex>(5, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: $8.Sex.SEX_UNSPECIFIED, valueOf: $8.Sex.valueOf, enumValues: $8.Sex.values) + ..p<$core.List<$core.int>>(6, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateChildRequest clone() => CreateChildRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateChildRequest copyWith(void Function(CreateChildRequest) updates) => super.copyWith((message) => updates(message as CreateChildRequest)) as CreateChildRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateChildRequest create() => CreateChildRequest._(); + CreateChildRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateChildRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateChildRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get nurseryId => $_getSZ(0); + @$pb.TagNumber(1) + set nurseryId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNurseryId() => $_has(0); + @$pb.TagNumber(1) + void clearNurseryId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get guardianId => $_getSZ(1); + @$pb.TagNumber(2) + set guardianId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasGuardianId() => $_has(1); + @$pb.TagNumber(2) + void clearGuardianId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $core.int get age => $_getIZ(3); + @$pb.TagNumber(4) + set age($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasAge() => $_has(3); + @$pb.TagNumber(4) + void clearAge() => clearField(4); + + @$pb.TagNumber(5) + $8.Sex get sex => $_getN(4); + @$pb.TagNumber(5) + set sex($8.Sex v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasSex() => $_has(4); + @$pb.TagNumber(5) + void clearSex() => clearField(5); + + @$pb.TagNumber(6) + $core.List<$core.List<$core.int>> get photos => $_getList(5); +} + +class CreateChildResponse extends $pb.GeneratedMessage { + factory CreateChildResponse({ + $8.Child? child, + }) { + final $result = create(); + if (child != null) { + $result.child = child; + } + return $result; + } + CreateChildResponse._() : super(); + factory CreateChildResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateChildResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateChildResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.Child>(1, _omitFieldNames ? '' : 'child', subBuilder: $8.Child.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateChildResponse clone() => CreateChildResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateChildResponse copyWith(void Function(CreateChildResponse) updates) => super.copyWith((message) => updates(message as CreateChildResponse)) as CreateChildResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateChildResponse create() => CreateChildResponse._(); + CreateChildResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateChildResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateChildResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.Child get child => $_getN(0); + @$pb.TagNumber(1) + set child($8.Child v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasChild() => $_has(0); + @$pb.TagNumber(1) + void clearChild() => clearField(1); + @$pb.TagNumber(1) + $8.Child ensureChild() => $_ensure(0); +} class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { factory GetChildListByNurseryIDRequest({ @@ -67,7 +234,7 @@ class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse({ - $core.Iterable<$6.Child>? children, + $core.Iterable<$8.Child>? children, }) { final $result = create(); if (children != null) { @@ -80,7 +247,7 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByNurseryIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$6.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $6.Child.create) + ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) ..hasRequiredFields = false ; @@ -106,7 +273,7 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { static GetChildListByNurseryIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$6.Child> get children => $_getList(0); + $core.List<$8.Child> get children => $_getList(0); } class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { @@ -161,7 +328,7 @@ class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse({ - $core.Iterable<$6.Child>? children, + $core.Iterable<$8.Child>? children, }) { final $result = create(); if (children != null) { @@ -174,7 +341,7 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByGuardianIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$6.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $6.Child.create) + ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) ..hasRequiredFields = false ; @@ -200,7 +367,101 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { static GetChildListByGuardianIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$6.Child> get children => $_getList(0); + $core.List<$8.Child> get children => $_getList(0); +} + +class GetChildListByBusIDRequest extends $pb.GeneratedMessage { + factory GetChildListByBusIDRequest({ + $core.String? busId, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + return $result; + } + GetChildListByBusIDRequest._() : super(); + factory GetChildListByBusIDRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetChildListByBusIDRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByBusIDRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetChildListByBusIDRequest clone() => GetChildListByBusIDRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetChildListByBusIDRequest copyWith(void Function(GetChildListByBusIDRequest) updates) => super.copyWith((message) => updates(message as GetChildListByBusIDRequest)) as GetChildListByBusIDRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetChildListByBusIDRequest create() => GetChildListByBusIDRequest._(); + GetChildListByBusIDRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetChildListByBusIDRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetChildListByBusIDRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); +} + +class GetChildListByBusIDResponse extends $pb.GeneratedMessage { + factory GetChildListByBusIDResponse({ + $core.Iterable<$8.Child>? children, + }) { + final $result = create(); + if (children != null) { + $result.children.addAll(children); + } + return $result; + } + GetChildListByBusIDResponse._() : super(); + factory GetChildListByBusIDResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetChildListByBusIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByBusIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetChildListByBusIDResponse clone() => GetChildListByBusIDResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetChildListByBusIDResponse copyWith(void Function(GetChildListByBusIDResponse) updates) => super.copyWith((message) => updates(message as GetChildListByBusIDResponse)) as GetChildListByBusIDResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetChildListByBusIDResponse create() => GetChildListByBusIDResponse._(); + GetChildListByBusIDResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetChildListByBusIDResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetChildListByBusIDResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$8.Child> get children => $_getList(0); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart index 35ad0c72..310deac9 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart @@ -21,6 +21,10 @@ export 'child.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.ChildService') class ChildServiceClient extends $grpc.Client { + static final _$createChild = $grpc.ClientMethod<$1.CreateChildRequest, $1.CreateChildResponse>( + '/where_child_bus.v1.ChildService/CreateChild', + ($1.CreateChildRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.CreateChildResponse.fromBuffer(value)); static final _$getChildListByNurseryID = $grpc.ClientMethod<$1.GetChildListByNurseryIDRequest, $1.GetChildListByNurseryIDResponse>( '/where_child_bus.v1.ChildService/GetChildListByNurseryID', ($1.GetChildListByNurseryIDRequest value) => value.writeToBuffer(), @@ -29,6 +33,10 @@ class ChildServiceClient extends $grpc.Client { '/where_child_bus.v1.ChildService/GetChildListByGuardianID', ($1.GetChildListByGuardianIDRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $1.GetChildListByGuardianIDResponse.fromBuffer(value)); + static final _$getChildListByBusID = $grpc.ClientMethod<$1.GetChildListByBusIDRequest, $1.GetChildListByBusIDResponse>( + '/where_child_bus.v1.ChildService/GetChildListByBusID', + ($1.GetChildListByBusIDRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.GetChildListByBusIDResponse.fromBuffer(value)); ChildServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -36,6 +44,10 @@ class ChildServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); + $grpc.ResponseFuture<$1.CreateChildResponse> createChild($1.CreateChildRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$createChild, request, options: options); + } + $grpc.ResponseFuture<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($1.GetChildListByNurseryIDRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getChildListByNurseryID, request, options: options); } @@ -43,6 +55,10 @@ class ChildServiceClient extends $grpc.Client { $grpc.ResponseFuture<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($1.GetChildListByGuardianIDRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getChildListByGuardianID, request, options: options); } + + $grpc.ResponseFuture<$1.GetChildListByBusIDResponse> getChildListByBusID($1.GetChildListByBusIDRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getChildListByBusID, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.ChildService') @@ -50,6 +66,13 @@ abstract class ChildServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.ChildService'; ChildServiceBase() { + $addMethod($grpc.ServiceMethod<$1.CreateChildRequest, $1.CreateChildResponse>( + 'CreateChild', + createChild_Pre, + false, + false, + ($core.List<$core.int> value) => $1.CreateChildRequest.fromBuffer(value), + ($1.CreateChildResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.GetChildListByNurseryIDRequest, $1.GetChildListByNurseryIDResponse>( 'GetChildListByNurseryID', getChildListByNurseryID_Pre, @@ -64,6 +87,17 @@ abstract class ChildServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $1.GetChildListByGuardianIDRequest.fromBuffer(value), ($1.GetChildListByGuardianIDResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.GetChildListByBusIDRequest, $1.GetChildListByBusIDResponse>( + 'GetChildListByBusID', + getChildListByBusID_Pre, + false, + false, + ($core.List<$core.int> value) => $1.GetChildListByBusIDRequest.fromBuffer(value), + ($1.GetChildListByBusIDResponse value) => value.writeToBuffer())); + } + + $async.Future<$1.CreateChildResponse> createChild_Pre($grpc.ServiceCall call, $async.Future<$1.CreateChildRequest> request) async { + return createChild(call, await request); } $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByNurseryIDRequest> request) async { @@ -74,6 +108,12 @@ abstract class ChildServiceBase extends $grpc.Service { return getChildListByGuardianID(call, await request); } + $async.Future<$1.GetChildListByBusIDResponse> getChildListByBusID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByBusIDRequest> request) async { + return getChildListByBusID(call, await request); + } + + $async.Future<$1.CreateChildResponse> createChild($grpc.ServiceCall call, $1.CreateChildRequest request); $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($grpc.ServiceCall call, $1.GetChildListByGuardianIDRequest request); + $async.Future<$1.GetChildListByBusIDResponse> getChildListByBusID($grpc.ServiceCall call, $1.GetChildListByBusIDRequest request); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart index ceef43cf..d18144df 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -13,6 +13,39 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use createChildRequestDescriptor instead') +const CreateChildRequest$json = { + '1': 'CreateChildRequest', + '2': [ + {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'guardian_id', '3': 2, '4': 1, '5': 9, '10': 'guardianId'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'age', '3': 4, '4': 1, '5': 5, '10': 'age'}, + {'1': 'sex', '3': 5, '4': 1, '5': 14, '6': '.where_child_bus.v1.Sex', '10': 'sex'}, + {'1': 'photos', '3': 6, '4': 3, '5': 12, '10': 'photos'}, + ], +}; + +/// Descriptor for `CreateChildRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createChildRequestDescriptor = $convert.base64Decode( + 'ChJDcmVhdGVDaGlsZFJlcXVlc3QSHQoKbnVyc2VyeV9pZBgBIAEoCVIJbnVyc2VyeUlkEh8KC2' + 'd1YXJkaWFuX2lkGAIgASgJUgpndWFyZGlhbklkEhIKBG5hbWUYAyABKAlSBG5hbWUSEAoDYWdl' + 'GAQgASgFUgNhZ2USKQoDc2V4GAUgASgOMhcud2hlcmVfY2hpbGRfYnVzLnYxLlNleFIDc2V4Eh' + 'YKBnBob3RvcxgGIAMoDFIGcGhvdG9z'); + +@$core.Deprecated('Use createChildResponseDescriptor instead') +const CreateChildResponse$json = { + '1': 'CreateChildResponse', + '2': [ + {'1': 'child', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'child'}, + ], +}; + +/// Descriptor for `CreateChildResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createChildResponseDescriptor = $convert.base64Decode( + 'ChNDcmVhdGVDaGlsZFJlc3BvbnNlEi8KBWNoaWxkGAEgASgLMhkud2hlcmVfY2hpbGRfYnVzLn' + 'YxLkNoaWxkUgVjaGlsZA=='); + @$core.Deprecated('Use getChildListByNurseryIDRequestDescriptor instead') const GetChildListByNurseryIDRequest$json = { '1': 'GetChildListByNurseryIDRequest', @@ -65,3 +98,28 @@ final $typed_data.Uint8List getChildListByGuardianIDResponseDescriptor = $conver 'CiBHZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZXNwb25zZRI1CghjaGlsZHJlbhgBIAMoCzIZLn' 'doZXJlX2NoaWxkX2J1cy52MS5DaGlsZFIIY2hpbGRyZW4='); +@$core.Deprecated('Use getChildListByBusIDRequestDescriptor instead') +const GetChildListByBusIDRequest$json = { + '1': 'GetChildListByBusIDRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + ], +}; + +/// Descriptor for `GetChildListByBusIDRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getChildListByBusIDRequestDescriptor = $convert.base64Decode( + 'ChpHZXRDaGlsZExpc3RCeUJ1c0lEUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lk'); + +@$core.Deprecated('Use getChildListByBusIDResponseDescriptor instead') +const GetChildListByBusIDResponse$json = { + '1': 'GetChildListByBusIDResponse', + '2': [ + {'1': 'children', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + ], +}; + +/// Descriptor for `GetChildListByBusIDResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getChildListByBusIDResponseDescriptor = $convert.base64Decode( + 'ChtHZXRDaGlsZExpc3RCeUJ1c0lEUmVzcG9uc2USNQoIY2hpbGRyZW4YASADKAsyGS53aGVyZV' + '9jaGlsZF9idXMudjEuQ2hpbGRSCGNoaWxkcmVu'); + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart index 702e930d..2c4685df 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart @@ -9,7 +9,6 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; @@ -110,15 +109,6 @@ class DeleteChildPhotoResponse extends $pb.GeneratedMessage { $core.List<$core.String> get ids => $_getList(1); } -class ChildPhotoServiceApi { - $pb.RpcClient _client; - ChildPhotoServiceApi(this._client); - - $async.Future deleteChildPhoto($pb.ClientContext? ctx, DeleteChildPhotoRequest request) => - _client.invoke(ctx, 'ChildPhotoService', 'DeleteChildPhoto', request, DeleteChildPhotoResponse()) - ; -} - const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart new file mode 100644 index 00000000..aba19865 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/child_photo.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'child_photo.pb.dart' as $2; + +export 'child_photo.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.ChildPhotoService') +class ChildPhotoServiceClient extends $grpc.Client { + static final _$deleteChildPhoto = $grpc.ClientMethod<$2.DeleteChildPhotoRequest, $2.DeleteChildPhotoResponse>( + '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', + ($2.DeleteChildPhotoRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.DeleteChildPhotoResponse.fromBuffer(value)); + + ChildPhotoServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$2.DeleteChildPhotoResponse> deleteChildPhoto($2.DeleteChildPhotoRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$deleteChildPhoto, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.ChildPhotoService') +abstract class ChildPhotoServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.ChildPhotoService'; + + ChildPhotoServiceBase() { + $addMethod($grpc.ServiceMethod<$2.DeleteChildPhotoRequest, $2.DeleteChildPhotoResponse>( + 'DeleteChildPhoto', + deleteChildPhoto_Pre, + false, + false, + ($core.List<$core.int> value) => $2.DeleteChildPhotoRequest.fromBuffer(value), + ($2.DeleteChildPhotoResponse value) => value.writeToBuffer())); + } + + $async.Future<$2.DeleteChildPhotoResponse> deleteChildPhoto_Pre($grpc.ServiceCall call, $async.Future<$2.DeleteChildPhotoRequest> request) async { + return deleteChildPhoto(call, await request); + } + + $async.Future<$2.DeleteChildPhotoResponse> deleteChildPhoto($grpc.ServiceCall call, $2.DeleteChildPhotoRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart index 30dfe525..68039071 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart @@ -39,22 +39,3 @@ final $typed_data.Uint8List deleteChildPhotoResponseDescriptor = $convert.base64 'ChhEZWxldGVDaGlsZFBob3RvUmVzcG9uc2USJgoPaXNfc3VjY2Vzc19saXN0GAEgAygIUg1pc1' 'N1Y2Nlc3NMaXN0EhAKA2lkcxgCIAMoCVIDaWRz'); -const $core.Map<$core.String, $core.dynamic> ChildPhotoServiceBase$json = { - '1': 'ChildPhotoService', - '2': [ - {'1': 'DeleteChildPhoto', '2': '.where_child_bus.v1.DeleteChildPhotoRequest', '3': '.where_child_bus.v1.DeleteChildPhotoResponse'}, - ], -}; - -@$core.Deprecated('Use childPhotoServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> ChildPhotoServiceBase$messageJson = { - '.where_child_bus.v1.DeleteChildPhotoRequest': DeleteChildPhotoRequest$json, - '.where_child_bus.v1.DeleteChildPhotoResponse': DeleteChildPhotoResponse$json, -}; - -/// Descriptor for `ChildPhotoService`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List childPhotoServiceDescriptor = $convert.base64Decode( - 'ChFDaGlsZFBob3RvU2VydmljZRJtChBEZWxldGVDaGlsZFBob3RvEisud2hlcmVfY2hpbGRfYn' - 'VzLnYxLkRlbGV0ZUNoaWxkUGhvdG9SZXF1ZXN0Giwud2hlcmVfY2hpbGRfYnVzLnYxLkRlbGV0' - 'ZUNoaWxkUGhvdG9SZXNwb25zZQ=='); - diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 0be6e2b9..a4ec1e6a 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -13,7 +13,165 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $6; +import 'resources.pb.dart' as $8; + +class CreateGuardianRequest extends $pb.GeneratedMessage { + factory CreateGuardianRequest({ + $core.String? nurseryCode, + $core.String? email, + $core.String? password, + $core.String? name, + $core.String? phoneNumber, + }) { + final $result = create(); + if (nurseryCode != null) { + $result.nurseryCode = nurseryCode; + } + if (email != null) { + $result.email = email; + } + if (password != null) { + $result.password = password; + } + if (name != null) { + $result.name = name; + } + if (phoneNumber != null) { + $result.phoneNumber = phoneNumber; + } + return $result; + } + CreateGuardianRequest._() : super(); + factory CreateGuardianRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateGuardianRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateGuardianRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'nurseryCode') + ..aOS(2, _omitFieldNames ? '' : 'email') + ..aOS(3, _omitFieldNames ? '' : 'password') + ..aOS(4, _omitFieldNames ? '' : 'name') + ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateGuardianRequest clone() => CreateGuardianRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateGuardianRequest copyWith(void Function(CreateGuardianRequest) updates) => super.copyWith((message) => updates(message as CreateGuardianRequest)) as CreateGuardianRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateGuardianRequest create() => CreateGuardianRequest._(); + CreateGuardianRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateGuardianRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateGuardianRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get nurseryCode => $_getSZ(0); + @$pb.TagNumber(1) + set nurseryCode($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNurseryCode() => $_has(0); + @$pb.TagNumber(1) + void clearNurseryCode() => clearField(1); + + @$pb.TagNumber(2) + $core.String get email => $_getSZ(1); + @$pb.TagNumber(2) + set email($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasEmail() => $_has(1); + @$pb.TagNumber(2) + void clearEmail() => clearField(2); + + @$pb.TagNumber(3) + $core.String get password => $_getSZ(2); + @$pb.TagNumber(3) + set password($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPassword() => $_has(2); + @$pb.TagNumber(3) + void clearPassword() => clearField(3); + + @$pb.TagNumber(4) + $core.String get name => $_getSZ(3); + @$pb.TagNumber(4) + set name($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasName() => $_has(3); + @$pb.TagNumber(4) + void clearName() => clearField(4); + + @$pb.TagNumber(5) + $core.String get phoneNumber => $_getSZ(4); + @$pb.TagNumber(5) + set phoneNumber($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPhoneNumber() => $_has(4); + @$pb.TagNumber(5) + void clearPhoneNumber() => clearField(5); +} + +class CreateGuardianResponse extends $pb.GeneratedMessage { + factory CreateGuardianResponse({ + $8.GuardianResponse? guardian, + }) { + final $result = create(); + if (guardian != null) { + $result.guardian = guardian; + } + return $result; + } + CreateGuardianResponse._() : super(); + factory CreateGuardianResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateGuardianResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateGuardianResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateGuardianResponse clone() => CreateGuardianResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateGuardianResponse copyWith(void Function(CreateGuardianResponse) updates) => super.copyWith((message) => updates(message as CreateGuardianResponse)) as CreateGuardianResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateGuardianResponse create() => CreateGuardianResponse._(); + CreateGuardianResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateGuardianResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateGuardianResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.GuardianResponse get guardian => $_getN(0); + @$pb.TagNumber(1) + set guardian($8.GuardianResponse v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasGuardian() => $_has(0); + @$pb.TagNumber(1) + void clearGuardian() => clearField(1); + @$pb.TagNumber(1) + $8.GuardianResponse ensureGuardian() => $_ensure(0); +} class GuardianLoginRequest extends $pb.GeneratedMessage { factory GuardianLoginRequest({ @@ -82,8 +240,8 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { class GuardianLoginResponse extends $pb.GeneratedMessage { factory GuardianLoginResponse({ $core.bool? success, - $6.GuardianResponse? guardian, - $6.NurseryResponse? nursery, + $8.GuardianResponse? guardian, + $8.NurseryResponse? nursery, }) { final $result = create(); if (success != null) { @@ -103,8 +261,8 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$6.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $6.GuardianResponse.create) - ..aOM<$6.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $6.NurseryResponse.create) + ..aOM<$8.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) + ..aOM<$8.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $8.NurseryResponse.create) ..hasRequiredFields = false ; @@ -139,26 +297,26 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $6.GuardianResponse get guardian => $_getN(1); + $8.GuardianResponse get guardian => $_getN(1); @$pb.TagNumber(2) - set guardian($6.GuardianResponse v) { setField(2, v); } + set guardian($8.GuardianResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasGuardian() => $_has(1); @$pb.TagNumber(2) void clearGuardian() => clearField(2); @$pb.TagNumber(2) - $6.GuardianResponse ensureGuardian() => $_ensure(1); + $8.GuardianResponse ensureGuardian() => $_ensure(1); @$pb.TagNumber(3) - $6.NurseryResponse get nursery => $_getN(2); + $8.NurseryResponse get nursery => $_getN(2); @$pb.TagNumber(3) - set nursery($6.NurseryResponse v) { setField(3, v); } + set nursery($8.NurseryResponse v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasNursery() => $_has(2); @$pb.TagNumber(3) void clearNursery() => clearField(3); @$pb.TagNumber(3) - $6.NurseryResponse ensureNursery() => $_ensure(2); + $8.NurseryResponse ensureNursery() => $_ensure(2); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart index a0ac6e24..f1251a9b 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart @@ -15,16 +15,20 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'guardian.pb.dart' as $2; +import 'guardian.pb.dart' as $3; export 'guardian.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.GuardianService') class GuardianServiceClient extends $grpc.Client { - static final _$guardianLogin = $grpc.ClientMethod<$2.GuardianLoginRequest, $2.GuardianLoginResponse>( + static final _$createGuardian = $grpc.ClientMethod<$3.CreateGuardianRequest, $3.CreateGuardianResponse>( + '/where_child_bus.v1.GuardianService/CreateGuardian', + ($3.CreateGuardianRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.CreateGuardianResponse.fromBuffer(value)); + static final _$guardianLogin = $grpc.ClientMethod<$3.GuardianLoginRequest, $3.GuardianLoginResponse>( '/where_child_bus.v1.GuardianService/GuardianLogin', - ($2.GuardianLoginRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $2.GuardianLoginResponse.fromBuffer(value)); + ($3.GuardianLoginRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.GuardianLoginResponse.fromBuffer(value)); GuardianServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -32,7 +36,11 @@ class GuardianServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$2.GuardianLoginResponse> guardianLogin($2.GuardianLoginRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$3.CreateGuardianResponse> createGuardian($3.CreateGuardianRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$createGuardian, request, options: options); + } + + $grpc.ResponseFuture<$3.GuardianLoginResponse> guardianLogin($3.GuardianLoginRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$guardianLogin, request, options: options); } } @@ -42,18 +50,30 @@ abstract class GuardianServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.GuardianService'; GuardianServiceBase() { - $addMethod($grpc.ServiceMethod<$2.GuardianLoginRequest, $2.GuardianLoginResponse>( + $addMethod($grpc.ServiceMethod<$3.CreateGuardianRequest, $3.CreateGuardianResponse>( + 'CreateGuardian', + createGuardian_Pre, + false, + false, + ($core.List<$core.int> value) => $3.CreateGuardianRequest.fromBuffer(value), + ($3.CreateGuardianResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$3.GuardianLoginRequest, $3.GuardianLoginResponse>( 'GuardianLogin', guardianLogin_Pre, false, false, - ($core.List<$core.int> value) => $2.GuardianLoginRequest.fromBuffer(value), - ($2.GuardianLoginResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $3.GuardianLoginRequest.fromBuffer(value), + ($3.GuardianLoginResponse value) => value.writeToBuffer())); + } + + $async.Future<$3.CreateGuardianResponse> createGuardian_Pre($grpc.ServiceCall call, $async.Future<$3.CreateGuardianRequest> request) async { + return createGuardian(call, await request); } - $async.Future<$2.GuardianLoginResponse> guardianLogin_Pre($grpc.ServiceCall call, $async.Future<$2.GuardianLoginRequest> request) async { + $async.Future<$3.GuardianLoginResponse> guardianLogin_Pre($grpc.ServiceCall call, $async.Future<$3.GuardianLoginRequest> request) async { return guardianLogin(call, await request); } - $async.Future<$2.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $2.GuardianLoginRequest request); + $async.Future<$3.CreateGuardianResponse> createGuardian($grpc.ServiceCall call, $3.CreateGuardianRequest request); + $async.Future<$3.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $3.GuardianLoginRequest request); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart index 1fe34407..5eb151a4 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -13,6 +13,37 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use createGuardianRequestDescriptor instead') +const CreateGuardianRequest$json = { + '1': 'CreateGuardianRequest', + '2': [ + {'1': 'nursery_code', '3': 1, '4': 1, '5': 9, '10': 'nurseryCode'}, + {'1': 'email', '3': 2, '4': 1, '5': 9, '10': 'email'}, + {'1': 'password', '3': 3, '4': 1, '5': 9, '10': 'password'}, + {'1': 'name', '3': 4, '4': 1, '5': 9, '10': 'name'}, + {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, + ], +}; + +/// Descriptor for `CreateGuardianRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createGuardianRequestDescriptor = $convert.base64Decode( + 'ChVDcmVhdGVHdWFyZGlhblJlcXVlc3QSIQoMbnVyc2VyeV9jb2RlGAEgASgJUgtudXJzZXJ5Q2' + '9kZRIUCgVlbWFpbBgCIAEoCVIFZW1haWwSGgoIcGFzc3dvcmQYAyABKAlSCHBhc3N3b3JkEhIK' + 'BG5hbWUYBCABKAlSBG5hbWUSIQoMcGhvbmVfbnVtYmVyGAUgASgJUgtwaG9uZU51bWJlcg=='); + +@$core.Deprecated('Use createGuardianResponseDescriptor instead') +const CreateGuardianResponse$json = { + '1': 'CreateGuardianResponse', + '2': [ + {'1': 'guardian', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.GuardianResponse', '10': 'guardian'}, + ], +}; + +/// Descriptor for `CreateGuardianResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createGuardianResponseDescriptor = $convert.base64Decode( + 'ChZDcmVhdGVHdWFyZGlhblJlc3BvbnNlEkAKCGd1YXJkaWFuGAEgASgLMiQud2hlcmVfY2hpbG' + 'RfYnVzLnYxLkd1YXJkaWFuUmVzcG9uc2VSCGd1YXJkaWFu'); + @$core.Deprecated('Use guardianLoginRequestDescriptor instead') const GuardianLoginRequest$json = { '1': 'GuardianLoginRequest', diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart index 3915bbb5..3aec87de 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart @@ -15,16 +15,16 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'health_check.pb.dart' as $3; +import 'health_check.pb.dart' as $4; export 'health_check.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.HealthcheckService') class HealthcheckServiceClient extends $grpc.Client { - static final _$ping = $grpc.ClientMethod<$3.PingRequest, $3.PingResponse>( + static final _$ping = $grpc.ClientMethod<$4.PingRequest, $4.PingResponse>( '/where_child_bus.v1.HealthcheckService/Ping', - ($3.PingRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $3.PingResponse.fromBuffer(value)); + ($4.PingRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $4.PingResponse.fromBuffer(value)); HealthcheckServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -32,7 +32,7 @@ class HealthcheckServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$3.PingResponse> ping($3.PingRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$4.PingResponse> ping($4.PingRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$ping, request, options: options); } } @@ -42,18 +42,18 @@ abstract class HealthcheckServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.HealthcheckService'; HealthcheckServiceBase() { - $addMethod($grpc.ServiceMethod<$3.PingRequest, $3.PingResponse>( + $addMethod($grpc.ServiceMethod<$4.PingRequest, $4.PingResponse>( 'Ping', ping_Pre, false, false, - ($core.List<$core.int> value) => $3.PingRequest.fromBuffer(value), - ($3.PingResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $4.PingRequest.fromBuffer(value), + ($4.PingResponse value) => value.writeToBuffer())); } - $async.Future<$3.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$3.PingRequest> request) async { + $async.Future<$4.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$4.PingRequest> request) async { return ping(call, await request); } - $async.Future<$3.PingResponse> ping($grpc.ServiceCall call, $3.PingRequest request); + $async.Future<$4.PingResponse> ping($grpc.ServiceCall call, $4.PingRequest request); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart index 452631d3..9dcb9ac3 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -13,7 +13,165 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'resources.pb.dart' as $6; +import 'resources.pb.dart' as $8; + +class CreateNurseryRequest extends $pb.GeneratedMessage { + factory CreateNurseryRequest({ + $core.String? email, + $core.String? password, + $core.String? name, + $core.String? phoneNumber, + $core.String? address, + }) { + final $result = create(); + if (email != null) { + $result.email = email; + } + if (password != null) { + $result.password = password; + } + if (name != null) { + $result.name = name; + } + if (phoneNumber != null) { + $result.phoneNumber = phoneNumber; + } + if (address != null) { + $result.address = address; + } + return $result; + } + CreateNurseryRequest._() : super(); + factory CreateNurseryRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateNurseryRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateNurseryRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'email') + ..aOS(2, _omitFieldNames ? '' : 'password') + ..aOS(3, _omitFieldNames ? '' : 'name') + ..aOS(4, _omitFieldNames ? '' : 'phoneNumber') + ..aOS(5, _omitFieldNames ? '' : 'address') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateNurseryRequest clone() => CreateNurseryRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateNurseryRequest copyWith(void Function(CreateNurseryRequest) updates) => super.copyWith((message) => updates(message as CreateNurseryRequest)) as CreateNurseryRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateNurseryRequest create() => CreateNurseryRequest._(); + CreateNurseryRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateNurseryRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateNurseryRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get email => $_getSZ(0); + @$pb.TagNumber(1) + set email($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasEmail() => $_has(0); + @$pb.TagNumber(1) + void clearEmail() => clearField(1); + + @$pb.TagNumber(2) + $core.String get password => $_getSZ(1); + @$pb.TagNumber(2) + set password($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPassword() => $_has(1); + @$pb.TagNumber(2) + void clearPassword() => clearField(2); + + @$pb.TagNumber(3) + $core.String get name => $_getSZ(2); + @$pb.TagNumber(3) + set name($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasName() => $_has(2); + @$pb.TagNumber(3) + void clearName() => clearField(3); + + @$pb.TagNumber(4) + $core.String get phoneNumber => $_getSZ(3); + @$pb.TagNumber(4) + set phoneNumber($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPhoneNumber() => $_has(3); + @$pb.TagNumber(4) + void clearPhoneNumber() => clearField(4); + + @$pb.TagNumber(5) + $core.String get address => $_getSZ(4); + @$pb.TagNumber(5) + set address($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasAddress() => $_has(4); + @$pb.TagNumber(5) + void clearAddress() => clearField(5); +} + +class CreateNurseryResponse extends $pb.GeneratedMessage { + factory CreateNurseryResponse({ + $8.NurseryResponse? nursery, + }) { + final $result = create(); + if (nursery != null) { + $result.nursery = nursery; + } + return $result; + } + CreateNurseryResponse._() : super(); + factory CreateNurseryResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateNurseryResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateNurseryResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.NurseryResponse>(1, _omitFieldNames ? '' : 'nursery', subBuilder: $8.NurseryResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateNurseryResponse clone() => CreateNurseryResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateNurseryResponse copyWith(void Function(CreateNurseryResponse) updates) => super.copyWith((message) => updates(message as CreateNurseryResponse)) as CreateNurseryResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateNurseryResponse create() => CreateNurseryResponse._(); + CreateNurseryResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateNurseryResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateNurseryResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.NurseryResponse get nursery => $_getN(0); + @$pb.TagNumber(1) + set nursery($8.NurseryResponse v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasNursery() => $_has(0); + @$pb.TagNumber(1) + void clearNursery() => clearField(1); + @$pb.TagNumber(1) + $8.NurseryResponse ensureNursery() => $_ensure(0); +} class NurseryLoginRequest extends $pb.GeneratedMessage { factory NurseryLoginRequest({ @@ -82,7 +240,7 @@ class NurseryLoginRequest extends $pb.GeneratedMessage { class NurseryLoginResponse extends $pb.GeneratedMessage { factory NurseryLoginResponse({ $core.bool? success, - $6.NurseryResponse? nursery, + $8.NurseryResponse? nursery, }) { final $result = create(); if (success != null) { @@ -99,7 +257,7 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$6.NurseryResponse>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $6.NurseryResponse.create) + ..aOM<$8.NurseryResponse>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $8.NurseryResponse.create) ..hasRequiredFields = false ; @@ -134,15 +292,15 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $6.NurseryResponse get nursery => $_getN(1); + $8.NurseryResponse get nursery => $_getN(1); @$pb.TagNumber(2) - set nursery($6.NurseryResponse v) { setField(2, v); } + set nursery($8.NurseryResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasNursery() => $_has(1); @$pb.TagNumber(2) void clearNursery() => clearField(2); @$pb.TagNumber(2) - $6.NurseryResponse ensureNursery() => $_ensure(1); + $8.NurseryResponse ensureNursery() => $_ensure(1); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart index b18831d3..4c71cd96 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart @@ -15,16 +15,20 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'nursery.pb.dart' as $4; +import 'nursery.pb.dart' as $5; export 'nursery.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.NurseryService') class NurseryServiceClient extends $grpc.Client { - static final _$nurseryLogin = $grpc.ClientMethod<$4.NurseryLoginRequest, $4.NurseryLoginResponse>( + static final _$createNursery = $grpc.ClientMethod<$5.CreateNurseryRequest, $5.CreateNurseryResponse>( + '/where_child_bus.v1.NurseryService/CreateNursery', + ($5.CreateNurseryRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $5.CreateNurseryResponse.fromBuffer(value)); + static final _$nurseryLogin = $grpc.ClientMethod<$5.NurseryLoginRequest, $5.NurseryLoginResponse>( '/where_child_bus.v1.NurseryService/NurseryLogin', - ($4.NurseryLoginRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $4.NurseryLoginResponse.fromBuffer(value)); + ($5.NurseryLoginRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $5.NurseryLoginResponse.fromBuffer(value)); NurseryServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -32,7 +36,11 @@ class NurseryServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$4.NurseryLoginResponse> nurseryLogin($4.NurseryLoginRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$5.CreateNurseryResponse> createNursery($5.CreateNurseryRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$createNursery, request, options: options); + } + + $grpc.ResponseFuture<$5.NurseryLoginResponse> nurseryLogin($5.NurseryLoginRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$nurseryLogin, request, options: options); } } @@ -42,18 +50,30 @@ abstract class NurseryServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.NurseryService'; NurseryServiceBase() { - $addMethod($grpc.ServiceMethod<$4.NurseryLoginRequest, $4.NurseryLoginResponse>( + $addMethod($grpc.ServiceMethod<$5.CreateNurseryRequest, $5.CreateNurseryResponse>( + 'CreateNursery', + createNursery_Pre, + false, + false, + ($core.List<$core.int> value) => $5.CreateNurseryRequest.fromBuffer(value), + ($5.CreateNurseryResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$5.NurseryLoginRequest, $5.NurseryLoginResponse>( 'NurseryLogin', nurseryLogin_Pre, false, false, - ($core.List<$core.int> value) => $4.NurseryLoginRequest.fromBuffer(value), - ($4.NurseryLoginResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $5.NurseryLoginRequest.fromBuffer(value), + ($5.NurseryLoginResponse value) => value.writeToBuffer())); + } + + $async.Future<$5.CreateNurseryResponse> createNursery_Pre($grpc.ServiceCall call, $async.Future<$5.CreateNurseryRequest> request) async { + return createNursery(call, await request); } - $async.Future<$4.NurseryLoginResponse> nurseryLogin_Pre($grpc.ServiceCall call, $async.Future<$4.NurseryLoginRequest> request) async { + $async.Future<$5.NurseryLoginResponse> nurseryLogin_Pre($grpc.ServiceCall call, $async.Future<$5.NurseryLoginRequest> request) async { return nurseryLogin(call, await request); } - $async.Future<$4.NurseryLoginResponse> nurseryLogin($grpc.ServiceCall call, $4.NurseryLoginRequest request); + $async.Future<$5.CreateNurseryResponse> createNursery($grpc.ServiceCall call, $5.CreateNurseryRequest request); + $async.Future<$5.NurseryLoginResponse> nurseryLogin($grpc.ServiceCall call, $5.NurseryLoginRequest request); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart index e480999c..2526f3f5 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart @@ -13,6 +13,37 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use createNurseryRequestDescriptor instead') +const CreateNurseryRequest$json = { + '1': 'CreateNurseryRequest', + '2': [ + {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'}, + {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'}, + {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + {'1': 'phone_number', '3': 4, '4': 1, '5': 9, '10': 'phoneNumber'}, + {'1': 'address', '3': 5, '4': 1, '5': 9, '10': 'address'}, + ], +}; + +/// Descriptor for `CreateNurseryRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createNurseryRequestDescriptor = $convert.base64Decode( + 'ChRDcmVhdGVOdXJzZXJ5UmVxdWVzdBIUCgVlbWFpbBgBIAEoCVIFZW1haWwSGgoIcGFzc3dvcm' + 'QYAiABKAlSCHBhc3N3b3JkEhIKBG5hbWUYAyABKAlSBG5hbWUSIQoMcGhvbmVfbnVtYmVyGAQg' + 'ASgJUgtwaG9uZU51bWJlchIYCgdhZGRyZXNzGAUgASgJUgdhZGRyZXNz'); + +@$core.Deprecated('Use createNurseryResponseDescriptor instead') +const CreateNurseryResponse$json = { + '1': 'CreateNurseryResponse', + '2': [ + {'1': 'nursery', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.NurseryResponse', '10': 'nursery'}, + ], +}; + +/// Descriptor for `CreateNurseryResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createNurseryResponseDescriptor = $convert.base64Decode( + 'ChVDcmVhdGVOdXJzZXJ5UmVzcG9uc2USPQoHbnVyc2VyeRgBIAEoCzIjLndoZXJlX2NoaWxkX2' + 'J1cy52MS5OdXJzZXJ5UmVzcG9uc2VSB251cnNlcnk='); + @$core.Deprecated('Use nurseryLoginRequestDescriptor instead') const NurseryLoginRequest$json = { '1': 'NurseryLoginRequest', diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart index c6117a91..adcf397c 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -13,7 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/timestamp.pb.dart' as $5; +import '../../google/protobuf/timestamp.pb.dart' as $7; import 'resources.pbenum.dart'; export 'resources.pbenum.dart'; @@ -27,8 +27,8 @@ class Nursery extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.String? email, $core.String? encryptedPassword, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -72,8 +72,8 @@ class Nursery extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') ..aOS(7, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -162,26 +162,26 @@ class Nursery extends $pb.GeneratedMessage { void clearEncryptedPassword() => clearField(7); @$pb.TagNumber(8) - $5.Timestamp get createdAt => $_getN(7); + $7.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($5.Timestamp v) { setField(8, v); } + set createdAt($7.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $5.Timestamp ensureCreatedAt() => $_ensure(7); + $7.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $5.Timestamp get updatedAt => $_getN(8); + $7.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($5.Timestamp v) { setField(9, v); } + set updatedAt($7.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $5.Timestamp ensureUpdatedAt() => $_ensure(8); + $7.Timestamp ensureUpdatedAt() => $_ensure(8); } class NurseryResponse extends $pb.GeneratedMessage { @@ -192,8 +192,8 @@ class NurseryResponse extends $pb.GeneratedMessage { $core.String? address, $core.String? phoneNumber, $core.String? email, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -233,8 +233,8 @@ class NurseryResponse extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'address') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') - ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -315,26 +315,26 @@ class NurseryResponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(7) - $5.Timestamp get createdAt => $_getN(6); + $7.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($5.Timestamp v) { setField(7, v); } + set createdAt($7.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $5.Timestamp ensureCreatedAt() => $_ensure(6); + $7.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $5.Timestamp get updatedAt => $_getN(7); + $7.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($5.Timestamp v) { setField(8, v); } + set updatedAt($7.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $5.Timestamp ensureUpdatedAt() => $_ensure(7); + $7.Timestamp ensureUpdatedAt() => $_ensure(7); } class Guardian extends $pb.GeneratedMessage { @@ -345,8 +345,8 @@ class Guardian extends $pb.GeneratedMessage { $core.String? email, $core.String? phoneNumber, $core.String? encryptedPassword, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -386,8 +386,8 @@ class Guardian extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -467,26 +467,26 @@ class Guardian extends $pb.GeneratedMessage { void clearEncryptedPassword() => clearField(6); @$pb.TagNumber(7) - $5.Timestamp get createdAt => $_getN(6); + $7.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($5.Timestamp v) { setField(7, v); } + set createdAt($7.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $5.Timestamp ensureCreatedAt() => $_ensure(6); + $7.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $5.Timestamp get updatedAt => $_getN(7); + $7.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($5.Timestamp v) { setField(8, v); } + set updatedAt($7.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $5.Timestamp ensureUpdatedAt() => $_ensure(7); + $7.Timestamp ensureUpdatedAt() => $_ensure(7); } class GuardianResponse extends $pb.GeneratedMessage { @@ -496,8 +496,8 @@ class GuardianResponse extends $pb.GeneratedMessage { $core.String? name, $core.String? email, $core.String? phoneNumber, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -533,8 +533,8 @@ class GuardianResponse extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$7.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -606,26 +606,26 @@ class GuardianResponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(6) - $5.Timestamp get createdAt => $_getN(5); + $7.Timestamp get createdAt => $_getN(5); @$pb.TagNumber(6) - set createdAt($5.Timestamp v) { setField(6, v); } + set createdAt($7.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasCreatedAt() => $_has(5); @$pb.TagNumber(6) void clearCreatedAt() => clearField(6); @$pb.TagNumber(6) - $5.Timestamp ensureCreatedAt() => $_ensure(5); + $7.Timestamp ensureCreatedAt() => $_ensure(5); @$pb.TagNumber(7) - $5.Timestamp get updatedAt => $_getN(6); + $7.Timestamp get updatedAt => $_getN(6); @$pb.TagNumber(7) - set updatedAt($5.Timestamp v) { setField(7, v); } + set updatedAt($7.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasUpdatedAt() => $_has(6); @$pb.TagNumber(7) void clearUpdatedAt() => clearField(7); @$pb.TagNumber(7) - $5.Timestamp ensureUpdatedAt() => $_ensure(6); + $7.Timestamp ensureUpdatedAt() => $_ensure(6); } class Bus extends $pb.GeneratedMessage { @@ -637,8 +637,8 @@ class Bus extends $pb.GeneratedMessage { Status? status, $core.double? latitude, $core.double? longitude, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -682,8 +682,8 @@ class Bus extends $pb.GeneratedMessage { ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Status.STATUS_UNSPECIFIED, valueOf: Status.valueOf, enumValues: Status.values) ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -773,26 +773,26 @@ class Bus extends $pb.GeneratedMessage { void clearLongitude() => clearField(7); @$pb.TagNumber(8) - $5.Timestamp get createdAt => $_getN(7); + $7.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($5.Timestamp v) { setField(8, v); } + set createdAt($7.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $5.Timestamp ensureCreatedAt() => $_ensure(7); + $7.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $5.Timestamp get updatedAt => $_getN(8); + $7.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($5.Timestamp v) { setField(9, v); } + set updatedAt($7.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $5.Timestamp ensureUpdatedAt() => $_ensure(8); + $7.Timestamp ensureUpdatedAt() => $_ensure(8); } class Child extends $pb.GeneratedMessage { @@ -811,8 +811,8 @@ class Child extends $pb.GeneratedMessage { $core.bool? hasWaterBottle, $core.bool? hasUmbrera, $core.bool? hasOther, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -884,8 +884,8 @@ class Child extends $pb.GeneratedMessage { ..aOB(12, _omitFieldNames ? '' : 'hasWaterBottle') ..aOB(13, _omitFieldNames ? '' : 'hasUmbrera') ..aOB(14, _omitFieldNames ? '' : 'hasOther') - ..aOM<$5.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$7.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1037,26 +1037,26 @@ class Child extends $pb.GeneratedMessage { void clearHasOther() => clearField(14); @$pb.TagNumber(15) - $5.Timestamp get createdAt => $_getN(14); + $7.Timestamp get createdAt => $_getN(14); @$pb.TagNumber(15) - set createdAt($5.Timestamp v) { setField(15, v); } + set createdAt($7.Timestamp v) { setField(15, v); } @$pb.TagNumber(15) $core.bool hasCreatedAt() => $_has(14); @$pb.TagNumber(15) void clearCreatedAt() => clearField(15); @$pb.TagNumber(15) - $5.Timestamp ensureCreatedAt() => $_ensure(14); + $7.Timestamp ensureCreatedAt() => $_ensure(14); @$pb.TagNumber(16) - $5.Timestamp get updatedAt => $_getN(15); + $7.Timestamp get updatedAt => $_getN(15); @$pb.TagNumber(16) - set updatedAt($5.Timestamp v) { setField(16, v); } + set updatedAt($7.Timestamp v) { setField(16, v); } @$pb.TagNumber(16) $core.bool hasUpdatedAt() => $_has(15); @$pb.TagNumber(16) void clearUpdatedAt() => clearField(16); @$pb.TagNumber(16) - $5.Timestamp ensureUpdatedAt() => $_ensure(15); + $7.Timestamp ensureUpdatedAt() => $_ensure(15); } class Station extends $pb.GeneratedMessage { @@ -1067,8 +1067,8 @@ class Station extends $pb.GeneratedMessage { $core.double? longitude, $core.int? morningOrder, $core.int? eveningOrder, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1108,8 +1108,8 @@ class Station extends $pb.GeneratedMessage { ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.int>(5, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) ..a<$core.int>(6, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) - ..aOM<$5.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1189,26 +1189,26 @@ class Station extends $pb.GeneratedMessage { void clearEveningOrder() => clearField(6); @$pb.TagNumber(7) - $5.Timestamp get createdAt => $_getN(6); + $7.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($5.Timestamp v) { setField(7, v); } + set createdAt($7.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $5.Timestamp ensureCreatedAt() => $_ensure(6); + $7.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $5.Timestamp get updatedAt => $_getN(7); + $7.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($5.Timestamp v) { setField(8, v); } + set updatedAt($7.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $5.Timestamp ensureUpdatedAt() => $_ensure(7); + $7.Timestamp ensureUpdatedAt() => $_ensure(7); } class ChildBusAssociation extends $pb.GeneratedMessage { @@ -1373,8 +1373,8 @@ class ChildPhoto extends $pb.GeneratedMessage { $core.String? childId, $core.String? s3Bucket, $core.String? s3Key, - $5.Timestamp? createdAt, - $5.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1406,8 +1406,8 @@ class ChildPhoto extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 's3Bucket') ..aOS(4, _omitFieldNames ? '' : 's3Key') - ..aOM<$5.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $5.Timestamp.create) - ..aOM<$5.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $5.Timestamp.create) + ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1469,26 +1469,26 @@ class ChildPhoto extends $pb.GeneratedMessage { void clearS3Key() => clearField(4); @$pb.TagNumber(5) - $5.Timestamp get createdAt => $_getN(4); + $7.Timestamp get createdAt => $_getN(4); @$pb.TagNumber(5) - set createdAt($5.Timestamp v) { setField(5, v); } + set createdAt($7.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasCreatedAt() => $_has(4); @$pb.TagNumber(5) void clearCreatedAt() => clearField(5); @$pb.TagNumber(5) - $5.Timestamp ensureCreatedAt() => $_ensure(4); + $7.Timestamp ensureCreatedAt() => $_ensure(4); @$pb.TagNumber(6) - $5.Timestamp get updatedAt => $_getN(5); + $7.Timestamp get updatedAt => $_getN(5); @$pb.TagNumber(6) - set updatedAt($5.Timestamp v) { setField(6, v); } + set updatedAt($7.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasUpdatedAt() => $_has(5); @$pb.TagNumber(6) void clearUpdatedAt() => clearField(6); @$pb.TagNumber(6) - $5.Timestamp ensureUpdatedAt() => $_ensure(5); + $7.Timestamp ensureUpdatedAt() => $_ensure(5); } class BoardingRecord extends $pb.GeneratedMessage { @@ -1497,7 +1497,7 @@ class BoardingRecord extends $pb.GeneratedMessage { $core.String? childId, $core.String? busId, $core.bool? isBoarding, - $5.Timestamp? timestamp, + $7.Timestamp? timestamp, }) { final $result = create(); if (id != null) { @@ -1526,7 +1526,7 @@ class BoardingRecord extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 'busId') ..aOB(4, _omitFieldNames ? '' : 'isBoarding') - ..aOM<$5.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $5.Timestamp.create) + ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1588,15 +1588,15 @@ class BoardingRecord extends $pb.GeneratedMessage { void clearIsBoarding() => clearField(4); @$pb.TagNumber(5) - $5.Timestamp get timestamp => $_getN(4); + $7.Timestamp get timestamp => $_getN(4); @$pb.TagNumber(5) - set timestamp($5.Timestamp v) { setField(5, v); } + set timestamp($7.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasTimestamp() => $_has(4); @$pb.TagNumber(5) void clearTimestamp() => clearField(5); @$pb.TagNumber(5) - $5.Timestamp ensureTimestamp() => $_ensure(4); + $7.Timestamp ensureTimestamp() => $_ensure(4); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart index 9812a756..491d8433 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart @@ -35,13 +35,13 @@ class Status extends $pb.ProtobufEnum { class Sex extends $pb.ProtobufEnum { static const Sex SEX_UNSPECIFIED = Sex._(0, _omitEnumNames ? '' : 'SEX_UNSPECIFIED'); static const Sex SEX_MAN = Sex._(1, _omitEnumNames ? '' : 'SEX_MAN'); - static const Sex SEX_WOMEN = Sex._(2, _omitEnumNames ? '' : 'SEX_WOMEN'); + static const Sex SEX_WOMAN = Sex._(2, _omitEnumNames ? '' : 'SEX_WOMAN'); static const Sex SEX_OTHER = Sex._(3, _omitEnumNames ? '' : 'SEX_OTHER'); static const $core.List values = [ SEX_UNSPECIFIED, SEX_MAN, - SEX_WOMEN, + SEX_WOMAN, SEX_OTHER, ]; diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 33cf4ff7..348df1c1 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -35,14 +35,14 @@ const Sex$json = { '2': [ {'1': 'SEX_UNSPECIFIED', '2': 0}, {'1': 'SEX_MAN', '2': 1}, - {'1': 'SEX_WOMEN', '2': 2}, + {'1': 'SEX_WOMAN', '2': 2}, {'1': 'SEX_OTHER', '2': 3}, ], }; /// Descriptor for `Sex`. Decode as a `google.protobuf.EnumDescriptorProto`. final $typed_data.Uint8List sexDescriptor = $convert.base64Decode( - 'CgNTZXgSEwoPU0VYX1VOU1BFQ0lGSUVEEAASCwoHU0VYX01BThABEg0KCVNFWF9XT01FThACEg' + 'CgNTZXgSEwoPU0VYX1VOU1BFQ0lGSUVEEAASCwoHU0VYX01BThABEg0KCVNFWF9XT01BThACEg' '0KCVNFWF9PVEhFUhAD'); @$core.Deprecated('Use busTypeDescriptor instead') diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart new file mode 100644 index 00000000..2512d375 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -0,0 +1,260 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/station.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'resources.pb.dart' as $8; + +class CreateStationRequest extends $pb.GeneratedMessage { + factory CreateStationRequest({ + $core.String? guardianId, + $core.double? longtitude, + $core.double? latitude, + }) { + final $result = create(); + if (guardianId != null) { + $result.guardianId = guardianId; + } + if (longtitude != null) { + $result.longtitude = longtitude; + } + if (latitude != null) { + $result.latitude = latitude; + } + return $result; + } + CreateStationRequest._() : super(); + factory CreateStationRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateStationRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateStationRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'guardianId') + ..a<$core.double>(2, _omitFieldNames ? '' : 'longtitude', $pb.PbFieldType.OD) + ..a<$core.double>(3, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateStationRequest clone() => CreateStationRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateStationRequest copyWith(void Function(CreateStationRequest) updates) => super.copyWith((message) => updates(message as CreateStationRequest)) as CreateStationRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateStationRequest create() => CreateStationRequest._(); + CreateStationRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateStationRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateStationRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get guardianId => $_getSZ(0); + @$pb.TagNumber(1) + set guardianId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasGuardianId() => $_has(0); + @$pb.TagNumber(1) + void clearGuardianId() => clearField(1); + + @$pb.TagNumber(2) + $core.double get longtitude => $_getN(1); + @$pb.TagNumber(2) + set longtitude($core.double v) { $_setDouble(1, v); } + @$pb.TagNumber(2) + $core.bool hasLongtitude() => $_has(1); + @$pb.TagNumber(2) + void clearLongtitude() => clearField(2); + + @$pb.TagNumber(3) + $core.double get latitude => $_getN(2); + @$pb.TagNumber(3) + set latitude($core.double v) { $_setDouble(2, v); } + @$pb.TagNumber(3) + $core.bool hasLatitude() => $_has(2); + @$pb.TagNumber(3) + void clearLatitude() => clearField(3); +} + +class CreateStationResponse extends $pb.GeneratedMessage { + factory CreateStationResponse({ + $8.Station? station, + }) { + final $result = create(); + if (station != null) { + $result.station = station; + } + return $result; + } + CreateStationResponse._() : super(); + factory CreateStationResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateStationResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateStationResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.Station>(1, _omitFieldNames ? '' : 'station', subBuilder: $8.Station.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateStationResponse clone() => CreateStationResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateStationResponse copyWith(void Function(CreateStationResponse) updates) => super.copyWith((message) => updates(message as CreateStationResponse)) as CreateStationResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateStationResponse create() => CreateStationResponse._(); + CreateStationResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateStationResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateStationResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.Station get station => $_getN(0); + @$pb.TagNumber(1) + set station($8.Station v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasStation() => $_has(0); + @$pb.TagNumber(1) + void clearStation() => clearField(1); + @$pb.TagNumber(1) + $8.Station ensureStation() => $_ensure(0); +} + +class GetStationListByBusIdRequest extends $pb.GeneratedMessage { + factory GetStationListByBusIdRequest({ + $core.String? busId, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + return $result; + } + GetStationListByBusIdRequest._() : super(); + factory GetStationListByBusIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetStationListByBusIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetStationListByBusIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetStationListByBusIdRequest clone() => GetStationListByBusIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetStationListByBusIdRequest copyWith(void Function(GetStationListByBusIdRequest) updates) => super.copyWith((message) => updates(message as GetStationListByBusIdRequest)) as GetStationListByBusIdRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetStationListByBusIdRequest create() => GetStationListByBusIdRequest._(); + GetStationListByBusIdRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetStationListByBusIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetStationListByBusIdRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); +} + +class GetStationListByBusIdResponse extends $pb.GeneratedMessage { + factory GetStationListByBusIdResponse({ + $core.Iterable<$8.Station>? stations, + $core.Iterable<$8.GuardianResponse>? guardians, + $core.Iterable<$8.Child>? children, + }) { + final $result = create(); + if (stations != null) { + $result.stations.addAll(stations); + } + if (guardians != null) { + $result.guardians.addAll(guardians); + } + if (children != null) { + $result.children.addAll(children); + } + return $result; + } + GetStationListByBusIdResponse._() : super(); + factory GetStationListByBusIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetStationListByBusIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetStationListByBusIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc<$8.Station>(1, _omitFieldNames ? '' : 'stations', $pb.PbFieldType.PM, subBuilder: $8.Station.create) + ..pc<$8.GuardianResponse>(2, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) + ..pc<$8.Child>(3, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetStationListByBusIdResponse clone() => GetStationListByBusIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetStationListByBusIdResponse copyWith(void Function(GetStationListByBusIdResponse) updates) => super.copyWith((message) => updates(message as GetStationListByBusIdResponse)) as GetStationListByBusIdResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetStationListByBusIdResponse create() => GetStationListByBusIdResponse._(); + GetStationListByBusIdResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetStationListByBusIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetStationListByBusIdResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$8.Station> get stations => $_getList(0); + + @$pb.TagNumber(2) + $core.List<$8.GuardianResponse> get guardians => $_getList(1); + + @$pb.TagNumber(3) + $core.List<$8.Child> get children => $_getList(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbenum.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbenum.dart new file mode 100644 index 00000000..ff272db7 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/station.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart new file mode 100644 index 00000000..61131d93 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart @@ -0,0 +1,79 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/station.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'station.pb.dart' as $6; + +export 'station.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.StationService') +class StationServiceClient extends $grpc.Client { + static final _$createStation = $grpc.ClientMethod<$6.CreateStationRequest, $6.CreateStationResponse>( + '/where_child_bus.v1.StationService/CreateStation', + ($6.CreateStationRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.CreateStationResponse.fromBuffer(value)); + static final _$getStationListByBusId = $grpc.ClientMethod<$6.GetStationListByBusIdRequest, $6.GetStationListByBusIdResponse>( + '/where_child_bus.v1.StationService/GetStationListByBusId', + ($6.GetStationListByBusIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.GetStationListByBusIdResponse.fromBuffer(value)); + + StationServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$6.CreateStationResponse> createStation($6.CreateStationRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$createStation, request, options: options); + } + + $grpc.ResponseFuture<$6.GetStationListByBusIdResponse> getStationListByBusId($6.GetStationListByBusIdRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getStationListByBusId, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.StationService') +abstract class StationServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.StationService'; + + StationServiceBase() { + $addMethod($grpc.ServiceMethod<$6.CreateStationRequest, $6.CreateStationResponse>( + 'CreateStation', + createStation_Pre, + false, + false, + ($core.List<$core.int> value) => $6.CreateStationRequest.fromBuffer(value), + ($6.CreateStationResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$6.GetStationListByBusIdRequest, $6.GetStationListByBusIdResponse>( + 'GetStationListByBusId', + getStationListByBusId_Pre, + false, + false, + ($core.List<$core.int> value) => $6.GetStationListByBusIdRequest.fromBuffer(value), + ($6.GetStationListByBusIdResponse value) => value.writeToBuffer())); + } + + $async.Future<$6.CreateStationResponse> createStation_Pre($grpc.ServiceCall call, $async.Future<$6.CreateStationRequest> request) async { + return createStation(call, await request); + } + + $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId_Pre($grpc.ServiceCall call, $async.Future<$6.GetStationListByBusIdRequest> request) async { + return getStationListByBusId(call, await request); + } + + $async.Future<$6.CreateStationResponse> createStation($grpc.ServiceCall call, $6.CreateStationRequest request); + $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId($grpc.ServiceCall call, $6.GetStationListByBusIdRequest request); +} diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart new file mode 100644 index 00000000..40e476a0 --- /dev/null +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -0,0 +1,73 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/station.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use createStationRequestDescriptor instead') +const CreateStationRequest$json = { + '1': 'CreateStationRequest', + '2': [ + {'1': 'guardian_id', '3': 1, '4': 1, '5': 9, '10': 'guardianId'}, + {'1': 'longtitude', '3': 2, '4': 1, '5': 1, '10': 'longtitude'}, + {'1': 'latitude', '3': 3, '4': 1, '5': 1, '10': 'latitude'}, + ], +}; + +/// Descriptor for `CreateStationRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createStationRequestDescriptor = $convert.base64Decode( + 'ChRDcmVhdGVTdGF0aW9uUmVxdWVzdBIfCgtndWFyZGlhbl9pZBgBIAEoCVIKZ3VhcmRpYW5JZB' + 'IeCgpsb25ndGl0dWRlGAIgASgBUgpsb25ndGl0dWRlEhoKCGxhdGl0dWRlGAMgASgBUghsYXRp' + 'dHVkZQ=='); + +@$core.Deprecated('Use createStationResponseDescriptor instead') +const CreateStationResponse$json = { + '1': 'CreateStationResponse', + '2': [ + {'1': 'station', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Station', '10': 'station'}, + ], +}; + +/// Descriptor for `CreateStationResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createStationResponseDescriptor = $convert.base64Decode( + 'ChVDcmVhdGVTdGF0aW9uUmVzcG9uc2USNQoHc3RhdGlvbhgBIAEoCzIbLndoZXJlX2NoaWxkX2' + 'J1cy52MS5TdGF0aW9uUgdzdGF0aW9u'); + +@$core.Deprecated('Use getStationListByBusIdRequestDescriptor instead') +const GetStationListByBusIdRequest$json = { + '1': 'GetStationListByBusIdRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + ], +}; + +/// Descriptor for `GetStationListByBusIdRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getStationListByBusIdRequestDescriptor = $convert.base64Decode( + 'ChxHZXRTdGF0aW9uTGlzdEJ5QnVzSWRSZXF1ZXN0EhUKBmJ1c19pZBgBIAEoCVIFYnVzSWQ='); + +@$core.Deprecated('Use getStationListByBusIdResponseDescriptor instead') +const GetStationListByBusIdResponse$json = { + '1': 'GetStationListByBusIdResponse', + '2': [ + {'1': 'stations', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Station', '10': 'stations'}, + {'1': 'guardians', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.GuardianResponse', '10': 'guardians'}, + {'1': 'children', '3': 3, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + ], +}; + +/// Descriptor for `GetStationListByBusIdResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getStationListByBusIdResponseDescriptor = $convert.base64Decode( + 'Ch1HZXRTdGF0aW9uTGlzdEJ5QnVzSWRSZXNwb25zZRI3CghzdGF0aW9ucxgBIAMoCzIbLndoZX' + 'JlX2NoaWxkX2J1cy52MS5TdGF0aW9uUghzdGF0aW9ucxJCCglndWFyZGlhbnMYAiADKAsyJC53' + 'aGVyZV9jaGlsZF9idXMudjEuR3VhcmRpYW5SZXNwb25zZVIJZ3VhcmRpYW5zEjUKCGNoaWxkcm' + 'VuGAMgAygLMhkud2hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJlbg=='); + diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py index 724aaf74..5039ce1f 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xab\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12)\n\x03sex\x18\x04 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x05 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"X\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"Y\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xfb\x02\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"X\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"Y\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"T\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xf3\x03\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,17 +24,21 @@ _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\nChildProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' _globals['_CREATECHILDREQUEST']._serialized_start=91 - _globals['_CREATECHILDREQUEST']._serialized_end=262 - _globals['_CREATECHILDRESPONSE']._serialized_start=264 - _globals['_CREATECHILDRESPONSE']._serialized_end=334 - _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=336 - _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=399 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=401 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=489 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=491 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=557 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=559 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=648 - _globals['_CHILDSERVICE']._serialized_start=651 - _globals['_CHILDSERVICE']._serialized_end=1030 + _globals['_CREATECHILDREQUEST']._serialized_end=280 + _globals['_CREATECHILDRESPONSE']._serialized_start=282 + _globals['_CREATECHILDRESPONSE']._serialized_end=352 + _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=354 + _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=417 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=419 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=507 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=509 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=575 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=577 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=666 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=668 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=719 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=721 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=805 + _globals['_CHILDSERVICE']._serialized_start=808 + _globals['_CHILDSERVICE']._serialized_end=1307 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py index 26458531..d76d8ecb 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py @@ -29,6 +29,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.FromString, ) + self.GetChildListByBusID = channel.unary_unary( + '/where_child_bus.v1.ChildService/GetChildListByBusID', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.FromString, + ) class ChildServiceServicer(object): @@ -52,6 +57,12 @@ def GetChildListByGuardianID(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetChildListByBusID(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_ChildServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -70,6 +81,11 @@ def add_ChildServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.SerializeToString, ), + 'GetChildListByBusID': grpc.unary_unary_rpc_method_handler( + servicer.GetChildListByBusID, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.ChildService', rpc_method_handlers) @@ -130,3 +146,20 @@ def GetChildListByGuardianID(request, where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetChildListByBusID(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByBusID', + where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.SerializeToString, + where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py index c369d022..9ada04d8 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2w\n\x0fGuardianService\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xe0\x01\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,10 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\rGuardianProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_GUARDIANLOGINREQUEST']._serialized_start=93 - _globals['_GUARDIANLOGINREQUEST']._serialized_end=165 - _globals['_GUARDIANLOGINRESPONSE']._serialized_start=168 - _globals['_GUARDIANLOGINRESPONSE']._serialized_end=346 - _globals['_GUARDIANSERVICE']._serialized_start=348 - _globals['_GUARDIANSERVICE']._serialized_end=467 + _globals['_CREATEGUARDIANREQUEST']._serialized_start=94 + _globals['_CREATEGUARDIANREQUEST']._serialized_end=257 + _globals['_CREATEGUARDIANRESPONSE']._serialized_start=259 + _globals['_CREATEGUARDIANRESPONSE']._serialized_end=349 + _globals['_GUARDIANLOGINREQUEST']._serialized_start=351 + _globals['_GUARDIANLOGINREQUEST']._serialized_end=423 + _globals['_GUARDIANLOGINRESPONSE']._serialized_start=426 + _globals['_GUARDIANLOGINRESPONSE']._serialized_end=604 + _globals['_GUARDIANSERVICE']._serialized_start=607 + _globals['_GUARDIANSERVICE']._serialized_end=831 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py index 5d2c5eb9..1f96f928 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py @@ -14,6 +14,11 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.CreateGuardian = channel.unary_unary( + '/where_child_bus.v1.GuardianService/CreateGuardian', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.FromString, + ) self.GuardianLogin = channel.unary_unary( '/where_child_bus.v1.GuardianService/GuardianLogin', request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.SerializeToString, @@ -24,6 +29,12 @@ def __init__(self, channel): class GuardianServiceServicer(object): """Missing associated documentation comment in .proto file.""" + def CreateGuardian(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GuardianLogin(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -33,6 +44,11 @@ def GuardianLogin(self, request, context): def add_GuardianServiceServicer_to_server(servicer, server): rpc_method_handlers = { + 'CreateGuardian': grpc.unary_unary_rpc_method_handler( + servicer.CreateGuardian, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.SerializeToString, + ), 'GuardianLogin': grpc.unary_unary_rpc_method_handler( servicer.GuardianLogin, request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.FromString, @@ -48,6 +64,23 @@ def add_GuardianServiceServicer_to_server(servicer, server): class GuardianService(object): """Missing associated documentation comment in .proto file.""" + @staticmethod + def CreateGuardian(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/CreateGuardian', + where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.SerializeToString, + where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def GuardianLogin(request, target, diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py index 2fd0abba..c827e961 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2s\n\x0eNurseryService\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xd9\x01\n\x0eNurseryService\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,10 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014NurseryProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_NURSERYLOGINREQUEST']._serialized_start=92 - _globals['_NURSERYLOGINREQUEST']._serialized_end=163 - _globals['_NURSERYLOGINRESPONSE']._serialized_start=165 - _globals['_NURSERYLOGINRESPONSE']._serialized_end=276 - _globals['_NURSERYSERVICE']._serialized_start=278 - _globals['_NURSERYSERVICE']._serialized_end=393 + _globals['_CREATENURSERYREQUEST']._serialized_start=93 + _globals['_CREATENURSERYREQUEST']._serialized_end=246 + _globals['_CREATENURSERYRESPONSE']._serialized_start=248 + _globals['_CREATENURSERYRESPONSE']._serialized_end=334 + _globals['_NURSERYLOGINREQUEST']._serialized_start=336 + _globals['_NURSERYLOGINREQUEST']._serialized_end=407 + _globals['_NURSERYLOGINRESPONSE']._serialized_start=409 + _globals['_NURSERYLOGINRESPONSE']._serialized_end=520 + _globals['_NURSERYSERVICE']._serialized_start=523 + _globals['_NURSERYSERVICE']._serialized_end=740 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py index 149d5cf9..2d559ee0 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py @@ -14,6 +14,11 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.CreateNursery = channel.unary_unary( + '/where_child_bus.v1.NurseryService/CreateNursery', + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.FromString, + ) self.NurseryLogin = channel.unary_unary( '/where_child_bus.v1.NurseryService/NurseryLogin', request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.SerializeToString, @@ -24,6 +29,12 @@ def __init__(self, channel): class NurseryServiceServicer(object): """Missing associated documentation comment in .proto file.""" + def CreateNursery(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def NurseryLogin(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -33,6 +44,11 @@ def NurseryLogin(self, request, context): def add_NurseryServiceServicer_to_server(servicer, server): rpc_method_handlers = { + 'CreateNursery': grpc.unary_unary_rpc_method_handler( + servicer.CreateNursery, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.SerializeToString, + ), 'NurseryLogin': grpc.unary_unary_rpc_method_handler( servicer.NurseryLogin, request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.FromString, @@ -48,6 +64,23 @@ def add_NurseryServiceServicer_to_server(servicer, server): class NurseryService(object): """Missing associated documentation comment in .proto file.""" + @staticmethod + def CreateNursery(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/CreateNursery', + where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.SerializeToString, + where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def NurseryLogin(request, target, diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index 30dade74..79403ad3 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xcf\x02\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xd8\x04\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMEN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xcf\x02\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xd8\x04\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py new file mode 100644 index 00000000..5520633f --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/v1/station.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"s\n\x14\x43reateStationRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1e\n\nlongtitude\x18\x02 \x01(\x01R\nlongtitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"N\n\x15\x43reateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xd3\x01\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xf4\x01\n\x0eStationService\x12\x64\n\rCreateStation\x12(.where_child_bus.v1.CreateStationRequest\x1a).where_child_bus.v1.CreateStationResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.station_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014StationProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_CREATESTATIONREQUEST']._serialized_start=92 + _globals['_CREATESTATIONREQUEST']._serialized_end=207 + _globals['_CREATESTATIONRESPONSE']._serialized_start=209 + _globals['_CREATESTATIONRESPONSE']._serialized_end=287 + _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_start=289 + _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_end=342 + _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=345 + _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=556 + _globals['_STATIONSERVICE']._serialized_start=559 + _globals['_STATIONSERVICE']._serialized_end=803 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py new file mode 100644 index 00000000..ac4de641 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from where_child_bus.v1 import station_pb2 as where__child__bus_dot_v1_dot_station__pb2 + + +class StationServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateStation = channel.unary_unary( + '/where_child_bus.v1.StationService/CreateStation', + request_serializer=where__child__bus_dot_v1_dot_station__pb2.CreateStationRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.CreateStationResponse.FromString, + ) + self.GetStationListByBusId = channel.unary_unary( + '/where_child_bus.v1.StationService/GetStationListByBusId', + request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.FromString, + ) + + +class StationServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreateStation(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetStationListByBusId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_StationServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateStation': grpc.unary_unary_rpc_method_handler( + servicer.CreateStation, + request_deserializer=where__child__bus_dot_v1_dot_station__pb2.CreateStationRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_station__pb2.CreateStationResponse.SerializeToString, + ), + 'GetStationListByBusId': grpc.unary_unary_rpc_method_handler( + servicer.GetStationListByBusId, + request_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'where_child_bus.v1.StationService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class StationService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreateStation(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/CreateStation', + where__child__bus_dot_v1_dot_station__pb2.CreateStationRequest.SerializeToString, + where__child__bus_dot_v1_dot_station__pb2.CreateStationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetStationListByBusId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/GetStationListByBusId', + where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.SerializeToString, + where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) From d2d816917c8731f2e03d8c36d619b1ff601c1612 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 00:57:19 +0900 Subject: [PATCH 202/771] =?UTF-8?q?refactor:SubmitButton=E3=82=AF=E3=83=A9?= =?UTF-8?q?=E3=82=B9=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compornents/submit_button.dart | 16 ++++++++++++++++ .../student_list_page/student_edit_page.dart | 7 ++----- .../student_list_page/student_list_page.dart | 9 ++++++++- 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/student_list_page/compornents/submit_button.dart diff --git a/frontend/where_child_bus/lib/pages/student_list_page/compornents/submit_button.dart b/frontend/where_child_bus/lib/pages/student_list_page/compornents/submit_button.dart new file mode 100644 index 00000000..19fbe6e3 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/student_list_page/compornents/submit_button.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; + +class SubmitButton extends StatelessWidget { + final VoidCallback onPressed; + + const SubmitButton({required this.onPressed}); + + @override + Widget build(BuildContext context) { + return ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Colors.black, foregroundColor: Colors.white), + onPressed: onPressed, + child: const Text("保存")); + } +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index 8e902a08..ca550a62 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; +import './compornents/submit_button.dart'; class StudentEditPage extends StatefulWidget { const StudentEditPage({super.key}); @@ -167,10 +168,6 @@ class _StudentEditPageState extends State { } Widget submitButton() { - return ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: Colors.black, foregroundColor: Colors.white), - onPressed: () {}, - child: const Text("保存")); + return SubmitButton(onPressed: () {}); } } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 874ccc44..87f6d875 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -36,7 +36,14 @@ class _StudentListPageState extends State { Widget build(BuildContext context) { var screenSize = MediaQuery.of(context).size; - return childCardListBuilder(screenSize); + return Scaffold( + appBar: AppBar(), + body: childCardListBuilder(screenSize), + floatingActionButton: FloatingActionButton( + onPressed: () {}, + child: const Icon(Icons.add), + ), + ); } //TODO: 将来的にはAPIからデータを取得する。 From 4c9c186b6b5077f36a7a11ffa06f82269a676bee Mon Sep 17 00:00:00 2001 From: xyzyxJP Date: Tue, 13 Feb 2024 01:08:33 +0900 Subject: [PATCH 203/771] =?UTF-8?q?feat(frontend):=20=E4=BF=9D=E8=AD=B7?= =?UTF-8?q?=E8=80=85=E5=90=91=E3=81=91=E3=81=AE=E3=82=A2=E3=83=97=E3=83=AA?= =?UTF-8?q?=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/.gitignore | 43 ++ frontend/where_child_bus_guardian/.metadata | 45 ++ frontend/where_child_bus_guardian/README.md | 16 + .../analysis_options.yaml | 28 + .../android/.gitignore | 13 + .../android/app/build.gradle | 67 ++ .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 33 + .../where_child_bus_guardian/MainActivity.kt | 6 + .../res/drawable-v21/launch_background.xml | 12 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 + .../app/src/main/res/values/styles.xml | 18 + .../app/src/profile/AndroidManifest.xml | 7 + .../android/build.gradle | 30 + .../android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 5 + .../android/settings.gradle | 29 + .../where_child_bus_guardian/ios/.gitignore | 34 + .../ios/Flutter/AppFrameworkInfo.plist | 26 + .../ios/Flutter/Debug.xcconfig | 1 + .../ios/Flutter/Release.xcconfig | 1 + .../ios/Runner.xcodeproj/project.pbxproj | 617 ++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 98 +++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../ios/Runner/AppDelegate.swift | 13 + .../AppIcon.appiconset/Contents.json | 122 +++ .../Icon-App-1024x1024@1x.png | Bin 0 -> 10932 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 295 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 406 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 450 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 282 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 462 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 704 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 406 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 0 -> 586 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 0 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 0 -> 1674 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 762 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 1226 bytes .../Icon-App-83.5x83.5@2x.png | Bin 0 -> 1418 bytes .../LaunchImage.imageset/Contents.json | 23 + .../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/README.md | 5 + .../Runner/Base.lproj/LaunchScreen.storyboard | 37 + .../ios/Runner/Base.lproj/Main.storyboard | 26 + .../ios/Runner/Info.plist | 49 ++ .../ios/Runner/Runner-Bridging-Header.h | 1 + .../ios/RunnerTests/RunnerTests.swift | 12 + .../where_child_bus_guardian/lib/app.dart | 47 ++ .../where_child_bus_guardian/lib/main.dart | 29 + .../lib/pages/auth_page/auth_page.dart | 74 ++ .../lib/pages/check_page/check_page.dart | 24 + .../lib/pages/daily_page/daily_page.dart | 24 + .../lib/pages/map_page/map_page.dart | 24 + .../where_child_bus_guardian/linux/.gitignore | 1 + .../linux/CMakeLists.txt | 145 ++++ .../linux/flutter/CMakeLists.txt | 88 +++ .../flutter/generated_plugin_registrant.cc | 11 + .../flutter/generated_plugin_registrant.h | 15 + .../linux/flutter/generated_plugins.cmake | 23 + .../where_child_bus_guardian/linux/main.cc | 6 + .../linux/my_application.cc | 104 +++ .../linux/my_application.h | 18 + .../where_child_bus_guardian/macos/.gitignore | 7 + .../macos/Flutter/Flutter-Debug.xcconfig | 1 + .../macos/Flutter/Flutter-Release.xcconfig | 1 + .../Flutter/GeneratedPluginRegistrant.swift | 10 + .../macos/Runner.xcodeproj/project.pbxproj | 695 ++++++++++++++++++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 98 +++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../macos/Runner/AppDelegate.swift | 9 + .../AppIcon.appiconset/Contents.json | 68 ++ .../AppIcon.appiconset/app_icon_1024.png | Bin 0 -> 102994 bytes .../AppIcon.appiconset/app_icon_128.png | Bin 0 -> 5680 bytes .../AppIcon.appiconset/app_icon_16.png | Bin 0 -> 520 bytes .../AppIcon.appiconset/app_icon_256.png | Bin 0 -> 14142 bytes .../AppIcon.appiconset/app_icon_32.png | Bin 0 -> 1066 bytes .../AppIcon.appiconset/app_icon_512.png | Bin 0 -> 36406 bytes .../AppIcon.appiconset/app_icon_64.png | Bin 0 -> 2218 bytes .../macos/Runner/Base.lproj/MainMenu.xib | 343 +++++++++ .../macos/Runner/Configs/AppInfo.xcconfig | 14 + .../macos/Runner/Configs/Debug.xcconfig | 2 + .../macos/Runner/Configs/Release.xcconfig | 2 + .../macos/Runner/Configs/Warnings.xcconfig | 13 + .../macos/Runner/DebugProfile.entitlements | 12 + .../macos/Runner/Info.plist | 32 + .../macos/Runner/MainFlutterWindow.swift | 15 + .../macos/Runner/Release.entitlements | 8 + .../macos/RunnerTests/RunnerTests.swift | 12 + .../where_child_bus_guardian/pubspec.lock | 308 ++++++++ .../where_child_bus_guardian/pubspec.yaml | 29 + .../test/widget_test.dart | 1 + .../where_child_bus_guardian/web/favicon.png | Bin 0 -> 917 bytes .../web/icons/Icon-192.png | Bin 0 -> 5292 bytes .../web/icons/Icon-512.png | Bin 0 -> 8252 bytes .../web/icons/Icon-maskable-192.png | Bin 0 -> 5594 bytes .../web/icons/Icon-maskable-512.png | Bin 0 -> 20998 bytes .../where_child_bus_guardian/web/index.html | 59 ++ .../web/manifest.json | 35 + .../windows/.gitignore | 17 + .../windows/CMakeLists.txt | 108 +++ .../windows/flutter/CMakeLists.txt | 109 +++ .../flutter/generated_plugin_registrant.cc | 11 + .../flutter/generated_plugin_registrant.h | 15 + .../windows/flutter/generated_plugins.cmake | 23 + .../windows/runner/CMakeLists.txt | 40 + .../windows/runner/Runner.rc | 121 +++ .../windows/runner/flutter_window.cpp | 71 ++ .../windows/runner/flutter_window.h | 33 + .../windows/runner/main.cpp | 43 ++ .../windows/runner/resource.h | 16 + .../windows/runner/resources/app_icon.ico | Bin 0 -> 33772 bytes .../windows/runner/runner.exe.manifest | 20 + .../windows/runner/utils.cpp | 65 ++ .../windows/runner/utils.h | 19 + .../windows/runner/win32_window.cpp | 288 ++++++++ .../windows/runner/win32_window.h | 102 +++ 133 files changed, 5034 insertions(+) create mode 100644 frontend/where_child_bus_guardian/.gitignore create mode 100644 frontend/where_child_bus_guardian/.metadata create mode 100644 frontend/where_child_bus_guardian/README.md create mode 100644 frontend/where_child_bus_guardian/analysis_options.yaml create mode 100644 frontend/where_child_bus_guardian/android/.gitignore create mode 100644 frontend/where_child_bus_guardian/android/app/build.gradle create mode 100644 frontend/where_child_bus_guardian/android/app/src/debug/AndroidManifest.xml create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/kotlin/com/example/where_child_bus_guardian/MainActivity.kt create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/res/drawable/launch_background.xml create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/res/values-night/styles.xml create mode 100644 frontend/where_child_bus_guardian/android/app/src/main/res/values/styles.xml create mode 100644 frontend/where_child_bus_guardian/android/app/src/profile/AndroidManifest.xml create mode 100644 frontend/where_child_bus_guardian/android/build.gradle create mode 100644 frontend/where_child_bus_guardian/android/gradle.properties create mode 100644 frontend/where_child_bus_guardian/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 frontend/where_child_bus_guardian/android/settings.gradle create mode 100644 frontend/where_child_bus_guardian/ios/.gitignore create mode 100644 frontend/where_child_bus_guardian/ios/Flutter/AppFrameworkInfo.plist create mode 100644 frontend/where_child_bus_guardian/ios/Flutter/Debug.xcconfig create mode 100644 frontend/where_child_bus_guardian/ios/Flutter/Release.xcconfig create mode 100644 frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.pbxproj create mode 100644 frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 frontend/where_child_bus_guardian/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 frontend/where_child_bus_guardian/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 frontend/where_child_bus_guardian/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 frontend/where_child_bus_guardian/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Base.lproj/Main.storyboard create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Info.plist create mode 100644 frontend/where_child_bus_guardian/ios/Runner/Runner-Bridging-Header.h create mode 100644 frontend/where_child_bus_guardian/ios/RunnerTests/RunnerTests.swift create mode 100644 frontend/where_child_bus_guardian/lib/app.dart create mode 100644 frontend/where_child_bus_guardian/lib/main.dart create mode 100644 frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart create mode 100644 frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart create mode 100644 frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart create mode 100644 frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart create mode 100644 frontend/where_child_bus_guardian/linux/.gitignore create mode 100644 frontend/where_child_bus_guardian/linux/CMakeLists.txt create mode 100644 frontend/where_child_bus_guardian/linux/flutter/CMakeLists.txt create mode 100644 frontend/where_child_bus_guardian/linux/flutter/generated_plugin_registrant.cc create mode 100644 frontend/where_child_bus_guardian/linux/flutter/generated_plugin_registrant.h create mode 100644 frontend/where_child_bus_guardian/linux/flutter/generated_plugins.cmake create mode 100644 frontend/where_child_bus_guardian/linux/main.cc create mode 100644 frontend/where_child_bus_guardian/linux/my_application.cc create mode 100644 frontend/where_child_bus_guardian/linux/my_application.h create mode 100644 frontend/where_child_bus_guardian/macos/.gitignore create mode 100644 frontend/where_child_bus_guardian/macos/Flutter/Flutter-Debug.xcconfig create mode 100644 frontend/where_child_bus_guardian/macos/Flutter/Flutter-Release.xcconfig create mode 100644 frontend/where_child_bus_guardian/macos/Flutter/GeneratedPluginRegistrant.swift create mode 100644 frontend/where_child_bus_guardian/macos/Runner.xcodeproj/project.pbxproj create mode 100644 frontend/where_child_bus_guardian/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 frontend/where_child_bus_guardian/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 frontend/where_child_bus_guardian/macos/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 frontend/where_child_bus_guardian/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 frontend/where_child_bus_guardian/macos/Runner/AppDelegate.swift create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Base.lproj/MainMenu.xib create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Configs/AppInfo.xcconfig create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Configs/Debug.xcconfig create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Configs/Release.xcconfig create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Configs/Warnings.xcconfig create mode 100644 frontend/where_child_bus_guardian/macos/Runner/DebugProfile.entitlements create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Info.plist create mode 100644 frontend/where_child_bus_guardian/macos/Runner/MainFlutterWindow.swift create mode 100644 frontend/where_child_bus_guardian/macos/Runner/Release.entitlements create mode 100644 frontend/where_child_bus_guardian/macos/RunnerTests/RunnerTests.swift create mode 100644 frontend/where_child_bus_guardian/pubspec.lock create mode 100644 frontend/where_child_bus_guardian/pubspec.yaml create mode 100644 frontend/where_child_bus_guardian/test/widget_test.dart create mode 100644 frontend/where_child_bus_guardian/web/favicon.png create mode 100644 frontend/where_child_bus_guardian/web/icons/Icon-192.png create mode 100644 frontend/where_child_bus_guardian/web/icons/Icon-512.png create mode 100644 frontend/where_child_bus_guardian/web/icons/Icon-maskable-192.png create mode 100644 frontend/where_child_bus_guardian/web/icons/Icon-maskable-512.png create mode 100644 frontend/where_child_bus_guardian/web/index.html create mode 100644 frontend/where_child_bus_guardian/web/manifest.json create mode 100644 frontend/where_child_bus_guardian/windows/.gitignore create mode 100644 frontend/where_child_bus_guardian/windows/CMakeLists.txt create mode 100644 frontend/where_child_bus_guardian/windows/flutter/CMakeLists.txt create mode 100644 frontend/where_child_bus_guardian/windows/flutter/generated_plugin_registrant.cc create mode 100644 frontend/where_child_bus_guardian/windows/flutter/generated_plugin_registrant.h create mode 100644 frontend/where_child_bus_guardian/windows/flutter/generated_plugins.cmake create mode 100644 frontend/where_child_bus_guardian/windows/runner/CMakeLists.txt create mode 100644 frontend/where_child_bus_guardian/windows/runner/Runner.rc create mode 100644 frontend/where_child_bus_guardian/windows/runner/flutter_window.cpp create mode 100644 frontend/where_child_bus_guardian/windows/runner/flutter_window.h create mode 100644 frontend/where_child_bus_guardian/windows/runner/main.cpp create mode 100644 frontend/where_child_bus_guardian/windows/runner/resource.h create mode 100644 frontend/where_child_bus_guardian/windows/runner/resources/app_icon.ico create mode 100644 frontend/where_child_bus_guardian/windows/runner/runner.exe.manifest create mode 100644 frontend/where_child_bus_guardian/windows/runner/utils.cpp create mode 100644 frontend/where_child_bus_guardian/windows/runner/utils.h create mode 100644 frontend/where_child_bus_guardian/windows/runner/win32_window.cpp create mode 100644 frontend/where_child_bus_guardian/windows/runner/win32_window.h diff --git a/frontend/where_child_bus_guardian/.gitignore b/frontend/where_child_bus_guardian/.gitignore new file mode 100644 index 00000000..29a3a501 --- /dev/null +++ b/frontend/where_child_bus_guardian/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/frontend/where_child_bus_guardian/.metadata b/frontend/where_child_bus_guardian/.metadata new file mode 100644 index 00000000..b5c370f3 --- /dev/null +++ b/frontend/where_child_bus_guardian/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "41456452f29d64e8deb623a3c927524bcf9f111b" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: android + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: ios + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: linux + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: macos + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: web + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + - platform: windows + create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/frontend/where_child_bus_guardian/README.md b/frontend/where_child_bus_guardian/README.md new file mode 100644 index 00000000..2802f1ec --- /dev/null +++ b/frontend/where_child_bus_guardian/README.md @@ -0,0 +1,16 @@ +# where_child_bus_guardian + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/frontend/where_child_bus_guardian/analysis_options.yaml b/frontend/where_child_bus_guardian/analysis_options.yaml new file mode 100644 index 00000000..0d290213 --- /dev/null +++ b/frontend/where_child_bus_guardian/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/frontend/where_child_bus_guardian/android/.gitignore b/frontend/where_child_bus_guardian/android/.gitignore new file mode 100644 index 00000000..6f568019 --- /dev/null +++ b/frontend/where_child_bus_guardian/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/frontend/where_child_bus_guardian/android/app/build.gradle b/frontend/where_child_bus_guardian/android/app/build.gradle new file mode 100644 index 00000000..ed752966 --- /dev/null +++ b/frontend/where_child_bus_guardian/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "com.example.where_child_bus_guardian" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.where_child_bus_guardian" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/frontend/where_child_bus_guardian/android/app/src/debug/AndroidManifest.xml b/frontend/where_child_bus_guardian/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/frontend/where_child_bus_guardian/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml b/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..0fefc09c --- /dev/null +++ b/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus_guardian/android/app/src/main/kotlin/com/example/where_child_bus_guardian/MainActivity.kt b/frontend/where_child_bus_guardian/android/app/src/main/kotlin/com/example/where_child_bus_guardian/MainActivity.kt new file mode 100644 index 00000000..75f7bafd --- /dev/null +++ b/frontend/where_child_bus_guardian/android/app/src/main/kotlin/com/example/where_child_bus_guardian/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.where_child_bus_guardian + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/frontend/where_child_bus_guardian/android/app/src/main/res/drawable-v21/launch_background.xml b/frontend/where_child_bus_guardian/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 00000000..f74085f3 --- /dev/null +++ b/frontend/where_child_bus_guardian/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/frontend/where_child_bus_guardian/android/app/src/main/res/drawable/launch_background.xml b/frontend/where_child_bus_guardian/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/frontend/where_child_bus_guardian/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/frontend/where_child_bus_guardian/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/android/app/src/main/res/values-night/styles.xml b/frontend/where_child_bus_guardian/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 00000000..06952be7 --- /dev/null +++ b/frontend/where_child_bus_guardian/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/frontend/where_child_bus_guardian/android/app/src/main/res/values/styles.xml b/frontend/where_child_bus_guardian/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..cb1ef880 --- /dev/null +++ b/frontend/where_child_bus_guardian/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/frontend/where_child_bus_guardian/android/app/src/profile/AndroidManifest.xml b/frontend/where_child_bus_guardian/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/frontend/where_child_bus_guardian/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/frontend/where_child_bus_guardian/android/build.gradle b/frontend/where_child_bus_guardian/android/build.gradle new file mode 100644 index 00000000..e83fb5da --- /dev/null +++ b/frontend/where_child_bus_guardian/android/build.gradle @@ -0,0 +1,30 @@ +buildscript { + ext.kotlin_version = '1.7.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/frontend/where_child_bus_guardian/android/gradle.properties b/frontend/where_child_bus_guardian/android/gradle.properties new file mode 100644 index 00000000..598d13fe --- /dev/null +++ b/frontend/where_child_bus_guardian/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/frontend/where_child_bus_guardian/android/gradle/wrapper/gradle-wrapper.properties b/frontend/where_child_bus_guardian/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..3c472b99 --- /dev/null +++ b/frontend/where_child_bus_guardian/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/frontend/where_child_bus_guardian/android/settings.gradle b/frontend/where_child_bus_guardian/android/settings.gradle new file mode 100644 index 00000000..7cd71285 --- /dev/null +++ b/frontend/where_child_bus_guardian/android/settings.gradle @@ -0,0 +1,29 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false +} + +include ":app" diff --git a/frontend/where_child_bus_guardian/ios/.gitignore b/frontend/where_child_bus_guardian/ios/.gitignore new file mode 100644 index 00000000..7a7f9873 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/frontend/where_child_bus_guardian/ios/Flutter/AppFrameworkInfo.plist b/frontend/where_child_bus_guardian/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..7c569640 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/frontend/where_child_bus_guardian/ios/Flutter/Debug.xcconfig b/frontend/where_child_bus_guardian/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/frontend/where_child_bus_guardian/ios/Flutter/Release.xcconfig b/frontend/where_child_bus_guardian/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.pbxproj b/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..402b7026 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,617 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807E294A63A400263BE5 /* Frameworks */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = Y43PZADGA4; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBusGuardian; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBusGuardian.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBusGuardian.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBusGuardian.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = Y43PZADGA4; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBusGuardian; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = Y43PZADGA4; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBusGuardian; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..87131a09 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus_guardian/ios/Runner.xcworkspace/contents.xcworkspacedata b/frontend/where_child_bus_guardian/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/where_child_bus_guardian/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/where_child_bus_guardian/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/frontend/where_child_bus_guardian/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/frontend/where_child_bus_guardian/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..70693e4a --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d36b1fab --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..dc9ada4725e9b0ddb1deab583e5b5102493aa332 GIT binary patch literal 10932 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..797d452e458972bab9d994556c8305db4c827017 GIT binary patch literal 406 zcmV;H0crk;P))>cdjpWt&rLJgVp-t?DREyuq1A%0Z4)6_WsQ7{nzjN zo!X zGXV)2i3kcZIL~_j>uIKPK_zib+3T+Nt3Mb&Br)s)UIaA}@p{wDda>7=Q|mGRp7pqY zkJ!7E{MNz$9nOwoVqpFb)}$IP24Wn2JJ=Cw(!`OXJBr45rP>>AQr$6c7slJWvbpNW z@KTwna6d?PP>hvXCcp=4F;=GR@R4E7{4VU^0p4F>v^#A|>07*qoM6N<$f*5nx ACIA2c literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..6ed2d933e1120817fe9182483a228007b18ab6ae GIT binary patch literal 450 zcmV;z0X_bSP)iGWQ_5NJQ_~rNh*z)}eT%KUb z`7gNk0#AwF^#0T0?hIa^`~Ck;!}#m+_uT050aTR(J!bU#|IzRL%^UsMS#KsYnTF*!YeDOytlP4VhV?b} z%rz_<=#CPc)tU1MZTq~*2=8~iZ!lSa<{9b@2Jl;?IEV8)=fG217*|@)CCYgFze-x? zIFODUIA>nWKpE+bn~n7;-89sa>#DR>TSlqWk*!2hSN6D~Qb#VqbP~4Fk&m`@1$JGr zXPIdeRE&b2Thd#{MtDK$px*d3-Wx``>!oimf%|A-&-q*6KAH)e$3|6JV%HX{Hig)k suLT-RhftRq8b9;(V=235Wa|I=027H2wCDra;{X5v07*qoM6N<$f;9x^2LJ#7 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..4cd7b0099ca80c806f8fe495613e8d6c69460d76 GIT binary patch literal 282 zcmV+#0p(^bcu7P-R4C8Q z&e;xxFbF_Vrezo%_kH*OKhshZ6BFpG-Y1e10`QXJKbND7AMQ&cMj60B5TNObaZxYybcN07*qoM6N<$g3m;S%K!iX literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..fe730945a01f64a61e2235dbe3f45b08f7729182 GIT binary patch literal 462 zcmV;<0WtoGP)-}iV`2<;=$?g5M=KQbZ{F&YRNy7Nn@%_*5{gvDM0aKI4?ESmw z{NnZg)A0R`+4?NF_RZexyVB&^^ZvN!{I28tr{Vje;QNTz`dG&Jz0~Ek&f2;*Z7>B|cg}xYpxEFY+0YrKLF;^Q+-HreN0P{&i zK~zY`?b7ECf-n?@;d<&orQ*Q7KoR%4|C>{W^h6@&01>0SKS`dn{Q}GT%Qj_{PLZ_& zs`MFI#j-(>?bvdZ!8^xTwlY{qA)T4QLbY@j(!YJ7aXJervHy6HaG_2SB`6CC{He}f zHVw(fJWApwPq!6VY7r1w-Fs)@ox~N+q|w~e;JI~C4Vf^@d>Wvj=fl`^u9x9wd9 zR%3*Q+)t%S!MU_`id^@&Y{y7-r98lZX0?YrHlfmwb?#}^1b{8g&KzmkE(L>Z&)179 zp<)v6Y}pRl100G2FL_t(o!|l{-Q-VMg#&MKg7c{O0 z2wJImOS3Gy*Z2Qifdv~JYOp;v+U)a|nLoc7hNH;I$;lzDt$}rkaFw1mYK5_0Q(Sut zvbEloxON7$+HSOgC9Z8ltuC&0OSF!-mXv5caV>#bc3@hBPX@I$58-z}(ZZE!t-aOG zpjNkbau@>yEzH(5Yj4kZiMH32XI!4~gVXNnjAvRx;Sdg^`>2DpUEwoMhTs_st8pKG z(%SHyHdU&v%f36~uERh!bd`!T2dw;z6PrOTQ7Vt*#9F2uHlUVnb#ev_o^fh}Dzmq} zWtlk35}k=?xj28uO|5>>$yXadTUE@@IPpgH`gJ~Ro4>jd1IF|(+IX>8M4Ps{PNvmI zNj4D+XgN83gPt_Gm}`Ybv{;+&yu-C(Grdiahmo~BjG-l&mWM+{e5M1sm&=xduwgM9 z`8OEh`=F3r`^E{n_;%9weN{cf2%7=VzC@cYj+lg>+3|D|_1C@{hcU(DyQG_BvBWe? zvTv``=%b1zrol#=R`JB)>cdjpWt&rLJgVp-t?DREyuq1A%0Z4)6_WsQ7{nzjN zo!X zGXV)2i3kcZIL~_j>uIKPK_zib+3T+Nt3Mb&Br)s)UIaA}@p{wDda>7=Q|mGRp7pqY zkJ!7E{MNz$9nOwoVqpFb)}$IP24Wn2JJ=Cw(!`OXJBr45rP>>AQr$6c7slJWvbpNW z@KTwna6d?PP>hvXCcp=4F;=GR@R4E7{4VU^0p4F>v^#A|>07*qoM6N<$f*5nx ACIA2c literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..502f463a9bc882b461c96aadf492d1729e49e725 GIT binary patch literal 586 zcmV-Q0=4~#P)+}#`wDE{8-2Mebf5<{{PqV{TgVcv*r8?UZ3{-|G?_}T*&y;@cqf{ z{Q*~+qr%%p!1pS*_Uicl#q9lc(D`!D`LN62sNwq{oYw(Wmhk)k<@f$!$@ng~_5)Ru z0Z)trIA5^j{DIW^c+vT2%lW+2<(RtE2wR;4O@)Tm`Xr*?A(qYoM}7i5Yxw>D(&6ou zxz!_Xr~yNF+waPe00049Nkl*;a!v6h%{rlvIH#gW3s8p;bFr=l}mRqpW2h zw=OA%hdyL~z+UHOzl0eKhEr$YYOL-c-%Y<)=j?(bzDweB7{b+%_ypvm_cG{SvM=DK zhv{K@m>#Bw>2W$eUI#iU)Wdgs8Y3U+A$Gd&{+j)d)BmGKx+43U_!tik_YlN)>$7G! zhkE!s;%oku3;IwG3U^2kw?z+HM)jB{@zFhK8P#KMSytSthr+4!c(5c%+^UBn`0X*2 zy3(k600_CSZj?O$Qu%&$;|TGUJrptR(HzyIx>5E(2r{eA(<6t3e3I0B)7d6s7?Z5J zZ!rtKvA{MiEBm&KFtoifx>5P^Z=vl)95XJn()aS5%ad(s?4-=Tkis9IGu{`Fy8r+H07*qoM6N<$f20Z)wqMt%V?S?~D#06};F zA3KcL`Wb+>5ObvgQIG&ig8(;V04hz?@cqy3{mSh8o!|U|)cI!1_+!fWH@o*8vh^CU z^ws0;(c$gI+2~q^tO#GDHf@=;DncUw00J^eL_t(&-tE|HQ`%4vfZ;WsBqu-$0nu1R zq^Vj;p$clf^?twn|KHO+IGt^q#a3X?w9dXC@*yxhv&l}F322(8Y1&=P&I}~G@#h6; z1CV9ecD9ZEe87{{NtI*)_aJ<`kJa z?5=RBtFF50s;jQLFil-`)m2wrb=6h(&brpj%nG_U&ut~$?8Rokzxi8zJoWr#2dto5 zOX_URcc<1`Iky+jc;A%Vzx}1QU{2$|cKPom2Vf1{8m`vja4{F>HS?^Nc^rp}xo+Nh zxd}eOm`fm3@MQC1< zIk&aCjb~Yh%5+Yq0`)D;q{#-Uqlv*o+Oor zE!I71Z@ASH3grl8&P^L0WpavHoP|UX4e?!igT`4?AZk$hu*@%6WJ;zDOGlw7kj@ zY5!B-0ft0f?Lgb>C;$Ke07*qoM6N<$f~t1N9smFU literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0ec303439225b78712f49115768196d8d76f6790 GIT binary patch literal 862 zcmV-k1EKthP)20Z)wqMt%V?S?~D#06};F zA3KcL`Wb+>5ObvgQIG&ig8(;V04hz?@cqy3{mSh8o!|U|)cI!1_+!fWH@o*8vh^CU z^ws0;(c$gI+2~q^tO#GDHf@=;DncUw00J^eL_t(&-tE|HQ`%4vfZ;WsBqu-$0nu1R zq^Vj;p$clf^?twn|KHO+IGt^q#a3X?w9dXC@*yxhv&l}F322(8Y1&=P&I}~G@#h6; z1CV9ecD9ZEe87{{NtI*)_aJ<`kJa z?5=RBtFF50s;jQLFil-`)m2wrb=6h(&brpj%nG_U&ut~$?8Rokzxi8zJoWr#2dto5 zOX_URcc<1`Iky+jc;A%Vzx}1QU{2$|cKPom2Vf1{8m`vja4{F>HS?^Nc^rp}xo+Nh zxd}eOm`fm3@MQC1< zIk&aCjb~Yh%5+Yq0`)D;q{#-Uqlv*o+Oor zE!I71Z@ASH3grl8&P^L0WpavHoP|UX4e?!igT`4?AZk$hu*@%6WJ;zDOGlw7kj@ zY5!B-0ft0f?Lgb>C;$Ke07*qoM6N<$f~t1N9smFU literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..e9f5fea27c705180eb716271f41b582e76dcbd90 GIT binary patch literal 1674 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0467bf12aa4d28f374bb26596605a46dcbb3e7c8 GIT binary patch literal 1418 zcmV;51$Fv~P)q zKfU)WzW*n(@|xWGCA9ScMt*e9`2kdxPQ&&>|-UCa7_51w+ zLUsW@ZzZSW0y$)Hp~e9%PvP|a03ks1`~K?q{u;6NC8*{AOqIUq{CL&;p56Lf$oQGq z^={4hPQv)y=I|4n+?>7Fim=dxt1 z2H+Dm+1+fh+IF>G0SjJMkQQre1x4|G*Z==(Ot&kCnUrL4I(rf(ucITwmuHf^hXiJT zkdTm&kdTm&kdTm&kdP`esgWG0BcWCVkVZ&2dUwN`cgM8QJb`Z7Z~e<&Yj2(}>Tmf` zm1{eLgw!b{bXkjWbF%dTkTZEJWyWOb##Lfw4EK2}<0d6%>AGS{po>WCOy&f$Tay_> z?NBlkpo@s-O;0V%Y_Xa-G#_O08q5LR*~F%&)}{}r&L%Sbs8AS4t7Y0NEx*{soY=0MZExqA5XHQkqi#4gW3 zqODM^iyZl;dvf)-bOXtOru(s)Uc7~BFx{w-FK;2{`VA?(g&@3z&bfLFyctOH!cVsF z7IL=fo-qBndRUm;kAdXR4e6>k-z|21AaN%ubeVrHl*<|s&Ax@W-t?LR(P-24A5=>a z*R9#QvjzF8n%@1Nw@?CG@6(%>+-0ASK~jEmCV|&a*7-GKT72W<(TbSjf)&Eme6nGE z>Gkj4Sq&2e+-G%|+NM8OOm5zVl9{Z8Dd8A5z3y8mZ=4Bv4%>as_{9cN#bm~;h>62( zdqY93Zy}v&c4n($Vv!UybR8ocs7#zbfX1IY-*w~)p}XyZ-SFC~4w>BvMVr`dFbelV{lLL0bx7@*ZZdebr3`sP;? zVImji)kG)(6Juv0lz@q`F!k1FE;CQ(D0iG$wchPbKZQELlsZ#~rt8#90Y_Xh&3U-< z{s<&cCV_1`^TD^ia9!*mQDq& zn2{r`j};V|uV%_wsP!zB?m%;FeaRe+X47K0e+KE!8C{gAWF8)lCd1u1%~|M!XNRvw zvtqy3iz0WSpWdhn6$hP8PaRBmp)q`#PCA`Vd#Tc$@f1tAcM>f_I@bC)hkI9|o(Iqv zo}Piadq!j76}004RBio<`)70k^`K1NK)q>w?p^C6J2ZC!+UppiK6&y3Kmbv&O!oYF z34$0Z;QO!JOY#!`qyGH<3Pd}Pt@q*A0V=3SVtWKRR8d8Z&@)3qLPA19LPA19LPEUC YUoZo%k(ykuW&i*H07*qoM6N<$f+CH{y8r+H literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 00000000..0bedcf2f --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000..89c2725b --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/frontend/where_child_bus_guardian/ios/Runner/Base.lproj/LaunchScreen.storyboard b/frontend/where_child_bus_guardian/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus_guardian/ios/Runner/Base.lproj/Main.storyboard b/frontend/where_child_bus_guardian/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus_guardian/ios/Runner/Info.plist b/frontend/where_child_bus_guardian/ios/Runner/Info.plist new file mode 100644 index 00000000..e6ac9a69 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Where Child Bus Guardian + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + where_child_bus_guardian + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/frontend/where_child_bus_guardian/ios/Runner/Runner-Bridging-Header.h b/frontend/where_child_bus_guardian/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000..308a2a56 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/frontend/where_child_bus_guardian/ios/RunnerTests/RunnerTests.swift b/frontend/where_child_bus_guardian/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 00000000..86a7c3b1 --- /dev/null +++ b/frontend/where_child_bus_guardian/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart new file mode 100644 index 00000000..80ed40fb --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -0,0 +1,47 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_guardian/pages/check_page/check_page.dart'; +import 'package:where_child_bus_guardian/pages/daily_page/daily_page.dart'; +import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; + +class App extends StatefulWidget { + const App({super.key}); + + @override + State createState() => _AppState(); +} + +class _AppState extends State { + int _selectedIndex = 0; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text(['日々の記録', '地図', '乗車確認'][_selectedIndex]), + ), + body: [ + const DailyPage(), + const MapPage(), + const CheckPage() + ][_selectedIndex], + bottomNavigationBar: BottomNavigationBar( + currentIndex: _selectedIndex, + onTap: (int index) => setState(() => _selectedIndex = index), + items: const [ + BottomNavigationBarItem( + icon: Icon(Icons.note_alt), + label: '日々の記録', + ), + BottomNavigationBarItem( + icon: Icon(Icons.bus_alert), + label: '地図', + ), + BottomNavigationBarItem( + icon: Icon(Icons.notifications_active), + label: '乗車確認', + ), + ], + ), + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/main.dart b/frontend/where_child_bus_guardian/lib/main.dart new file mode 100644 index 00000000..5c127a65 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/main.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_guardian/app.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'WhereChildBus Guardian', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const App(), + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart new file mode 100644 index 00000000..171c0937 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -0,0 +1,74 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +class AuthPage extends StatefulWidget { + const AuthPage({super.key}); + + @override + State createState() => _AuthPageState(); +} + +class _AuthPageState extends State { + final _emailController = TextEditingController(); + final _passwordController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( + body: Center( + child: Padding( + padding: const EdgeInsets.all(32), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'WhereChildBus', + style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 32), + Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'メールアドレス', + ), + controller: _emailController, + keyboardType: TextInputType.emailAddress, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'パスワード', + ), + controller: _passwordController, + obscureText: true, + keyboardType: TextInputType.visiblePassword, + ), + ), + const SizedBox(height: 32), + SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + child: ElevatedButton( + onPressed: () { + if (kDebugMode) { + debugPrint("email: ${_emailController.text}"); + debugPrint("password: ${_passwordController.text}"); + } + }, + child: const Text('ログイン'), + ), + ) + ], + ), + ), + ), + ), + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart new file mode 100644 index 00000000..c8b766cf --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; + +class CheckPage extends StatefulWidget { + const CheckPage({super.key}); + + @override + State createState() => _CheckPageState(); +} + +class _CheckPageState extends State { + @override + Widget build(BuildContext context) { + return const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '乗車確認', + ), + ], + ), + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart new file mode 100644 index 00000000..e0dd2832 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; + +class DailyPage extends StatefulWidget { + const DailyPage({super.key}); + + @override + State createState() => _DailyPageState(); +} + +class _DailyPageState extends State { + @override + Widget build(BuildContext context) { + return const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '日々の記録', + ), + ], + ), + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart new file mode 100644 index 00000000..f3b62bb1 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; + +class MapPage extends StatefulWidget { + const MapPage({super.key}); + + @override + State createState() => _MapPageState(); +} + +class _MapPageState extends State { + @override + Widget build(BuildContext context) { + return const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '地図', + ), + ], + ), + ); + } +} diff --git a/frontend/where_child_bus_guardian/linux/.gitignore b/frontend/where_child_bus_guardian/linux/.gitignore new file mode 100644 index 00000000..d3896c98 --- /dev/null +++ b/frontend/where_child_bus_guardian/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/frontend/where_child_bus_guardian/linux/CMakeLists.txt b/frontend/where_child_bus_guardian/linux/CMakeLists.txt new file mode 100644 index 00000000..805c44d8 --- /dev/null +++ b/frontend/where_child_bus_guardian/linux/CMakeLists.txt @@ -0,0 +1,145 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "where_child_bus_guardian") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.where_child_bus_guardian") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Define the application target. To change its name, change BINARY_NAME above, +# not the value here, or `flutter run` will no longer work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/frontend/where_child_bus_guardian/linux/flutter/CMakeLists.txt b/frontend/where_child_bus_guardian/linux/flutter/CMakeLists.txt new file mode 100644 index 00000000..d5bd0164 --- /dev/null +++ b/frontend/where_child_bus_guardian/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/frontend/where_child_bus_guardian/linux/flutter/generated_plugin_registrant.cc b/frontend/where_child_bus_guardian/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 00000000..e71a16d2 --- /dev/null +++ b/frontend/where_child_bus_guardian/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void fl_register_plugins(FlPluginRegistry* registry) { +} diff --git a/frontend/where_child_bus_guardian/linux/flutter/generated_plugin_registrant.h b/frontend/where_child_bus_guardian/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 00000000..e0f0a47b --- /dev/null +++ b/frontend/where_child_bus_guardian/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/frontend/where_child_bus_guardian/linux/flutter/generated_plugins.cmake b/frontend/where_child_bus_guardian/linux/flutter/generated_plugins.cmake new file mode 100644 index 00000000..2e1de87a --- /dev/null +++ b/frontend/where_child_bus_guardian/linux/flutter/generated_plugins.cmake @@ -0,0 +1,23 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/frontend/where_child_bus_guardian/linux/main.cc b/frontend/where_child_bus_guardian/linux/main.cc new file mode 100644 index 00000000..e7c5c543 --- /dev/null +++ b/frontend/where_child_bus_guardian/linux/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/frontend/where_child_bus_guardian/linux/my_application.cc b/frontend/where_child_bus_guardian/linux/my_application.cc new file mode 100644 index 00000000..1dbc4445 --- /dev/null +++ b/frontend/where_child_bus_guardian/linux/my_application.cc @@ -0,0 +1,104 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "where_child_bus_guardian"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "where_child_bus_guardian"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/frontend/where_child_bus_guardian/linux/my_application.h b/frontend/where_child_bus_guardian/linux/my_application.h new file mode 100644 index 00000000..72271d5e --- /dev/null +++ b/frontend/where_child_bus_guardian/linux/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/frontend/where_child_bus_guardian/macos/.gitignore b/frontend/where_child_bus_guardian/macos/.gitignore new file mode 100644 index 00000000..746adbb6 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/frontend/where_child_bus_guardian/macos/Flutter/Flutter-Debug.xcconfig b/frontend/where_child_bus_guardian/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 00000000..c2efd0b6 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/frontend/where_child_bus_guardian/macos/Flutter/Flutter-Release.xcconfig b/frontend/where_child_bus_guardian/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 00000000..c2efd0b6 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/frontend/where_child_bus_guardian/macos/Flutter/GeneratedPluginRegistrant.swift b/frontend/where_child_bus_guardian/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 00000000..cccf817a --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,10 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { +} diff --git a/frontend/where_child_bus_guardian/macos/Runner.xcodeproj/project.pbxproj b/frontend/where_child_bus_guardian/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..e4f2b4ca --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,695 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* where_child_bus_guardian.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "where_child_bus_guardian.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* where_child_bus_guardian.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* where_child_bus_guardian.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBusGuardian.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/where_child_bus_guardian.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/where_child_bus_guardian"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBusGuardian.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/where_child_bus_guardian.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/where_child_bus_guardian"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBusGuardian.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/where_child_bus_guardian.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/where_child_bus_guardian"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/frontend/where_child_bus_guardian/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/where_child_bus_guardian/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/frontend/where_child_bus_guardian/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/frontend/where_child_bus_guardian/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..e156773d --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus_guardian/macos/Runner.xcworkspace/contents.xcworkspacedata b/frontend/where_child_bus_guardian/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/where_child_bus_guardian/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/where_child_bus_guardian/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/frontend/where_child_bus_guardian/macos/Runner/AppDelegate.swift b/frontend/where_child_bus_guardian/macos/Runner/AppDelegate.swift new file mode 100644 index 00000000..d53ef643 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..a2ec33f1 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000000000000000000000000000000000..82b6f9d9a33e198f5747104729e1fcef999772a5 GIT binary patch literal 102994 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ⅅ8MglG&ER{i5lN315cO?EdHNLrg? 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 z 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 Pe7HEdAEg|=c=LY&YVNkY literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000000000000000000000000000000000000..13b35eba55c6dabc3aac36f33d859266c18fa0d0 GIT binary patch literal 5680 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000000000000000000000000000000000000..0a3f5fa40fb3d1e0710331a48de5d256da3f275d GIT binary patch literal 520 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/frontend/where_child_bus_guardian/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000000000000000000000000000000000000..2f1632cfddf3d9dade342351e627a0a75609fb46 GIT binary patch literal 2218 zcmV;b2vzrqP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91K%fHv1ONa40RR91KmY&$07g+lumAuE6iGxuRCodHTWf3-RTMruyW6Fu zQYeUM04eX6D5c0FCjKKPrco1(K`<0SL=crI{PC3-^hZU0kQie$gh-5!7z6SH6Q0J% zqot*`H1q{R5fHFYS}dje@;kG=v$L0(yY0?wY2%*c?A&{2?!D*x?m71{of2gv!$5|C z3>qG_BW}7K_yUcT3A5C6QD<+{aq?x;MAUyAiJn#Jv8_zZtQ{P zTRzbL3U9!qVuZzS$xKU10KiW~Bgdcv1-!uAhQxf3a7q+dU6lj?yoO4Lq4TUN4}h{N z*fIM=SS8|C2$(T>w$`t@3Tka!(r!7W`x z-isCVgQD^mG-MJ;XtJuK3V{Vy72GQ83KRWsHU?e*wrhKk=ApIYeDqLi;JI1e zuvv}5^Dc=k7F7?nm3nIw$NVmU-+R>> zyqOR$-2SDpJ}Pt;^RkJytDVXNTsu|mI1`~G7yw`EJR?VkGfNdqK9^^8P`JdtTV&tX4CNcV4 z&N06nZa??Fw1AgQOUSE2AmPE@WO(Fvo`%m`cDgiv(fAeRA%3AGXUbsGw{7Q`cY;1BI#ac3iN$$Hw z0LT0;xc%=q)me?Y*$xI@GRAw?+}>=9D+KTk??-HJ4=A>`V&vKFS75@MKdSF1JTq{S zc1!^8?YA|t+uKigaq!sT;Z!&0F2=k7F0PIU;F$leJLaw2UI6FL^w}OG&!;+b%ya1c z1n+6-inU<0VM-Y_s5iTElq)ThyF?StVcebpGI znw#+zLx2@ah{$_2jn+@}(zJZ{+}_N9BM;z)0yr|gF-4=Iyu@hI*Lk=-A8f#bAzc9f z`Kd6K--x@t04swJVC3JK1cHY-Hq+=|PN-VO;?^_C#;coU6TDP7Bt`;{JTG;!+jj(` zw5cLQ-(Cz-Tlb`A^w7|R56Ce;Wmr0)$KWOUZ6ai0PhzPeHwdl0H(etP zUV`va_i0s-4#DkNM8lUlqI7>YQLf)(lz9Q3Uw`)nc(z3{m5ZE77Ul$V%m)E}3&8L0 z-XaU|eB~Is08eORPk;=<>!1w)Kf}FOVS2l&9~A+@R#koFJ$Czd%Y(ENTV&A~U(IPI z;UY+gf+&6ioZ=roly<0Yst8ck>(M=S?B-ys3mLdM&)ex!hbt+ol|T6CTS+Sc0jv(& z7ijdvFwBq;0a{%3GGwkDKTeG`b+lyj0jjS1OMkYnepCdoosNY`*zmBIo*981BU%%U z@~$z0V`OVtIbEx5pa|Tct|Lg#ZQf5OYMUMRD>Wdxm5SAqV2}3!ceE-M2 z@O~lQ0OiKQp}o9I;?uxCgYVV?FH|?Riri*U$Zi_`V2eiA>l zdSm6;SEm6#T+SpcE8Ro_f2AwxzI z44hfe^WE3!h@W3RDyA_H440cpmYkv*)6m1XazTqw%=E5Xv7^@^^T7Q2wxr+Z2kVYr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus_guardian/macos/Runner/Configs/AppInfo.xcconfig b/frontend/where_child_bus_guardian/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 00000000..8e5febbd --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = where_child_bus_guardian + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.whereChildBusGuardian + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. diff --git a/frontend/where_child_bus_guardian/macos/Runner/Configs/Debug.xcconfig b/frontend/where_child_bus_guardian/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 00000000..36b0fd94 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/frontend/where_child_bus_guardian/macos/Runner/Configs/Release.xcconfig b/frontend/where_child_bus_guardian/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 00000000..dff4f495 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/frontend/where_child_bus_guardian/macos/Runner/Configs/Warnings.xcconfig b/frontend/where_child_bus_guardian/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 00000000..42bcbf47 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/frontend/where_child_bus_guardian/macos/Runner/DebugProfile.entitlements b/frontend/where_child_bus_guardian/macos/Runner/DebugProfile.entitlements new file mode 100644 index 00000000..dddb8a30 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/frontend/where_child_bus_guardian/macos/Runner/Info.plist b/frontend/where_child_bus_guardian/macos/Runner/Info.plist new file mode 100644 index 00000000..4789daa6 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/frontend/where_child_bus_guardian/macos/Runner/MainFlutterWindow.swift b/frontend/where_child_bus_guardian/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 00000000..3cc05eb2 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/frontend/where_child_bus_guardian/macos/Runner/Release.entitlements b/frontend/where_child_bus_guardian/macos/Runner/Release.entitlements new file mode 100644 index 00000000..852fa1a4 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/frontend/where_child_bus_guardian/macos/RunnerTests/RunnerTests.swift b/frontend/where_child_bus_guardian/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 00000000..5418c9f5 --- /dev/null +++ b/frontend/where_child_bus_guardian/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import FlutterMacOS +import Cocoa +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock new file mode 100644 index 00000000..d0f3b00d --- /dev/null +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -0,0 +1,308 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + archive: + dependency: transitive + description: + name: archive + sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" + url: "https://pub.dev" + source: hosted + version: "3.4.10" + args: + dependency: transitive + description: + name: args + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" + source: hosted + version: "1.0.6" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_dotenv: + dependency: "direct main" + description: + name: flutter_dotenv + sha256: "9357883bdd153ab78cbf9ffa07656e336b8bbb2b5a3ca596b0b27e119f7c7d77" + url: "https://pub.dev" + source: hosted + version: "5.1.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + googleapis_auth: + dependency: transitive + description: + name: googleapis_auth + sha256: af7c3a3edf9d0de2e1e0a77e994fae0a581c525fa7012af4fa0d4a52ed9484da + url: "https://pub.dev" + source: hosted + version: "1.4.1" + grpc: + dependency: "direct main" + description: + name: grpc + sha256: e93ee3bce45c134bf44e9728119102358c7cd69de7832d9a874e2e74eb8cab40 + url: "https://pub.dev" + source: hosted + version: "3.2.4" + http: + dependency: transitive + description: + name: http + sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + url: "https://pub.dev" + source: hosted + version: "1.2.0" + http2: + dependency: transitive + description: + name: http2 + sha256: "9ced024a160b77aba8fb8674e38f70875e321d319e6f303ec18e87bd5a4b0c1d" + url: "https://pub.dev" + source: hosted + version: "2.3.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" + source: hosted + version: "0.12.16" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" + source: hosted + version: "0.5.0" + meta: + dependency: transitive + description: + name: meta + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + url: "https://pub.dev" + source: hosted + version: "1.10.0" + path: + dependency: transitive + description: + name: path + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" + source: hosted + version: "1.8.3" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" + url: "https://pub.dev" + source: hosted + version: "3.7.4" + protobuf: + dependency: "direct main" + description: + name: protobuf + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" + source: hosted + version: "0.6.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + web: + dependency: transitive + description: + name: web + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + url: "https://pub.dev" + source: hosted + version: "0.3.0" +sdks: + dart: ">=3.2.6 <4.0.0" diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml new file mode 100644 index 00000000..040f79e4 --- /dev/null +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -0,0 +1,29 @@ +name: where_child_bus_guardian +description: "WhereChildBus Guardian" +publish_to: "none" + +version: 1.0.0+1 + +environment: + sdk: ">=3.2.6 <4.0.0" + +dependencies: + flutter: + sdk: flutter + grpc: ^3.2.4 + protobuf: ^3.1.0 + flutter_dotenv: ^5.1.0 + + cupertino_icons: ^1.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_lints: ^2.0.0 + +flutter: + uses-material-design: true + assets: + - assets/images/ + # - .env diff --git a/frontend/where_child_bus_guardian/test/widget_test.dart b/frontend/where_child_bus_guardian/test/widget_test.dart new file mode 100644 index 00000000..ab73b3a2 --- /dev/null +++ b/frontend/where_child_bus_guardian/test/widget_test.dart @@ -0,0 +1 @@ +void main() {} diff --git a/frontend/where_child_bus_guardian/web/favicon.png b/frontend/where_child_bus_guardian/web/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..8aaa46ac1ae21512746f852a42ba87e4165dfdd1 GIT binary patch literal 917 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0X7 zltGxWVyS%@P(fs7NJL45ua8x7ey(0(N`6wRUPW#JP&EUCO@$SZnVVXYs8ErclUHn2 zVXFjIVFhG^g!Ppaz)DK8ZIvQ?0~DO|i&7O#^-S~(l1AfjnEK zjFOT9D}DX)@^Za$W4-*MbbUihOG|wNBYh(yU7!lx;>x^|#0uTKVr7USFmqf|i<65o z3raHc^AtelCMM;Vme?vOfh>Xph&xL%(-1c06+^uR^q@XSM&D4+Kp$>4P^%3{)XKjo zGZknv$b36P8?Z_gF{nK@`XI}Z90TzwSQO}0J1!f2c(B=V`5aP@1P1a|PZ!4!3&Gl8 zTYqUsf!gYFyJnXpu0!n&N*SYAX-%d(5gVjrHJWqXQshj@!Zm{!01WsQrH~9=kTxW#6SvuapgMqt>$=j#%eyGrQzr zP{L-3gsMA^$I1&gsBAEL+vxi1*Igl=8#8`5?A-T5=z-sk46WA1IUT)AIZHx1rdUrf zVJrJn<74DDw`j)Ki#gt}mIT-Q`XRa2-jQXQoI%w`nb|XblvzK${ZzlV)m-XcwC(od z71_OEC5Bt9GEXosOXaPTYOia#R4ID2TiU~`zVMl08TV_C%DnU4^+HE>9(CE4D6?Fz oujB08i7adh9xk7*FX66dWH6F5TM;?E2b5PlUHx3vIVCg!0Dx9vYXATM literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/web/icons/Icon-192.png b/frontend/where_child_bus_guardian/web/icons/Icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..b749bfef07473333cf1dd31e9eed89862a5d52aa GIT binary patch literal 5292 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/web/icons/Icon-512.png b/frontend/where_child_bus_guardian/web/icons/Icon-512.png new file mode 100644 index 0000000000000000000000000000000000000000..88cfd48dff1169879ba46840804b412fe02fefd6 GIT binary patch literal 8252 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/web/icons/Icon-maskable-192.png b/frontend/where_child_bus_guardian/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9b4d76e525556d5d89141648c724331630325d GIT binary patch literal 5594 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 X>c!)3PgKfL&lX^$Z>Cpu&6)6jvi^Z! literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/web/icons/Icon-maskable-512.png b/frontend/where_child_bus_guardian/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000000000000000000000000000000000..d69c56691fbdb0b7efa65097c7cc1edac12a6d3e GIT binary patch literal 20998 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 MPgg&ebxsLQ025IeI{*Lx literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/web/index.html b/frontend/where_child_bus_guardian/web/index.html new file mode 100644 index 00000000..7f84743a --- /dev/null +++ b/frontend/where_child_bus_guardian/web/index.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + where_child_bus_guardian + + + + + + + + + + diff --git a/frontend/where_child_bus_guardian/web/manifest.json b/frontend/where_child_bus_guardian/web/manifest.json new file mode 100644 index 00000000..e00c1458 --- /dev/null +++ b/frontend/where_child_bus_guardian/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "where_child_bus_guardian", + "short_name": "where_child_bus_guardian", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/frontend/where_child_bus_guardian/windows/.gitignore b/frontend/where_child_bus_guardian/windows/.gitignore new file mode 100644 index 00000000..d492d0d9 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/frontend/where_child_bus_guardian/windows/CMakeLists.txt b/frontend/where_child_bus_guardian/windows/CMakeLists.txt new file mode 100644 index 00000000..af550d8c --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/CMakeLists.txt @@ -0,0 +1,108 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.14) +project(where_child_bus_guardian LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "where_child_bus_guardian") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(VERSION 3.14...3.25) + +# Define build configuration option. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") + endif() +endif() +# Define settings for the Profile build mode. +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/frontend/where_child_bus_guardian/windows/flutter/CMakeLists.txt b/frontend/where_child_bus_guardian/windows/flutter/CMakeLists.txt new file mode 100644 index 00000000..903f4899 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/flutter/CMakeLists.txt @@ -0,0 +1,109 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.14) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + ${FLUTTER_TARGET_PLATFORM} $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/frontend/where_child_bus_guardian/windows/flutter/generated_plugin_registrant.cc b/frontend/where_child_bus_guardian/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 00000000..8b6d4680 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void RegisterPlugins(flutter::PluginRegistry* registry) { +} diff --git a/frontend/where_child_bus_guardian/windows/flutter/generated_plugin_registrant.h b/frontend/where_child_bus_guardian/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 00000000..dc139d85 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void RegisterPlugins(flutter::PluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/frontend/where_child_bus_guardian/windows/flutter/generated_plugins.cmake b/frontend/where_child_bus_guardian/windows/flutter/generated_plugins.cmake new file mode 100644 index 00000000..b93c4c30 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/flutter/generated_plugins.cmake @@ -0,0 +1,23 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/frontend/where_child_bus_guardian/windows/runner/CMakeLists.txt b/frontend/where_child_bus_guardian/windows/runner/CMakeLists.txt new file mode 100644 index 00000000..394917c0 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/frontend/where_child_bus_guardian/windows/runner/Runner.rc b/frontend/where_child_bus_guardian/windows/runner/Runner.rc new file mode 100644 index 00000000..b21e27b5 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "com.example" "\0" + VALUE "FileDescription", "where_child_bus_guardian" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "where_child_bus_guardian" "\0" + VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "where_child_bus_guardian.exe" "\0" + VALUE "ProductName", "where_child_bus_guardian" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/frontend/where_child_bus_guardian/windows/runner/flutter_window.cpp b/frontend/where_child_bus_guardian/windows/runner/flutter_window.cpp new file mode 100644 index 00000000..955ee303 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/flutter_window.cpp @@ -0,0 +1,71 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + + flutter_controller_->engine()->SetNextFrameCallback([&]() { + this->Show(); + }); + + // Flutter can complete the first frame before the "show window" callback is + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. + flutter_controller_->ForceRedraw(); + + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/frontend/where_child_bus_guardian/windows/runner/flutter_window.h b/frontend/where_child_bus_guardian/windows/runner/flutter_window.h new file mode 100644 index 00000000..6da0652f --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/frontend/where_child_bus_guardian/windows/runner/main.cpp b/frontend/where_child_bus_guardian/windows/runner/main.cpp new file mode 100644 index 00000000..4f3938ec --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.Create(L"where_child_bus_guardian", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/frontend/where_child_bus_guardian/windows/runner/resource.h b/frontend/where_child_bus_guardian/windows/runner/resource.h new file mode 100644 index 00000000..66a65d1e --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/frontend/where_child_bus_guardian/windows/runner/resources/app_icon.ico b/frontend/where_child_bus_guardian/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c04e20caf6370ebb9253ad831cc31de4a9c965f6 GIT binary patch literal 33772 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 literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus_guardian/windows/runner/runner.exe.manifest b/frontend/where_child_bus_guardian/windows/runner/runner.exe.manifest new file mode 100644 index 00000000..a42ea768 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ + + + + + PerMonitorV2 + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus_guardian/windows/runner/utils.cpp b/frontend/where_child_bus_guardian/windows/runner/utils.cpp new file mode 100644 index 00000000..b2b08734 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/utils.cpp @@ -0,0 +1,65 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr) + -1; // remove the trailing null character + int input_length = (int)wcslen(utf16_string); + std::string utf8_string; + if (target_length <= 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + input_length, utf8_string.data(), target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/frontend/where_child_bus_guardian/windows/runner/utils.h b/frontend/where_child_bus_guardian/windows/runner/utils.h new file mode 100644 index 00000000..3879d547 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/frontend/where_child_bus_guardian/windows/runner/win32_window.cpp b/frontend/where_child_bus_guardian/windows/runner/win32_window.cpp new file mode 100644 index 00000000..60608d0f --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/win32_window.cpp @@ -0,0 +1,288 @@ +#include "win32_window.h" + +#include +#include + +#include "resource.h" + +namespace { + +/// Window attribute that enables dark mode window decorations. +/// +/// Redefined in case the developer's machine has a Windows SDK older than +/// version 10.0.22000.0. +/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +/// Registry key for app theme preference. +/// +/// A value of 0 indicates apps should use dark mode. A non-zero or missing +/// value indicates apps should use light mode. +constexpr const wchar_t kGetPreferredBrightnessRegKey[] = + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; +constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + } + FreeLibrary(user32_module); +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registrar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::Create(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + UpdateTheme(window); + + return OnCreate(); +} + +bool Win32Window::Show() { + return ShowWindow(window_handle_, SW_SHOWNORMAL); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + + case WM_DWMCOLORIZATIONCOLORCHANGED: + UpdateTheme(hwnd); + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} + +void Win32Window::UpdateTheme(HWND const window) { + DWORD light_mode; + DWORD light_mode_size = sizeof(light_mode); + LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, + kGetPreferredBrightnessRegValue, + RRF_RT_REG_DWORD, nullptr, &light_mode, + &light_mode_size); + + if (result == ERROR_SUCCESS) { + BOOL enable_dark_mode = light_mode == 0; + DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, + &enable_dark_mode, sizeof(enable_dark_mode)); + } +} diff --git a/frontend/where_child_bus_guardian/windows/runner/win32_window.h b/frontend/where_child_bus_guardian/windows/runner/win32_window.h new file mode 100644 index 00000000..e901dde6 --- /dev/null +++ b/frontend/where_child_bus_guardian/windows/runner/win32_window.h @@ -0,0 +1,102 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates a win32 window with |title| that is positioned and sized using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size this function will scale the inputted width and height as + // as appropriate for the default monitor. The window is invisible until + // |Show| is called. Returns true if the window was created successfully. + bool Create(const std::wstring& title, const Point& origin, const Size& size); + + // Show the current window. Returns true if the window was successfully shown. + bool Show(); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + // Update the window frame's theme to match the system theme. + static void UpdateTheme(HWND const window); + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_ From 39e3bda57fa17584886502f08b7e2cefebafb5de Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 01:20:54 +0900 Subject: [PATCH 204/771] fix(proto): typo in has_umbrera field name --- .../go/where_child_bus/v1/resources.pb.go | 210 +++++++++--------- .../proto/where_child_bus/v1/resources.proto | 2 +- .../where_child_bus/v1/resources.pb.dart | 16 +- .../where_child_bus/v1/resources.pbjson.dart | 10 +- .../where_child_bus/v1/resources_pb2.py | 36 +-- 5 files changed, 137 insertions(+), 137 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 16f6ee31..47ed9d2d 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -717,7 +717,7 @@ type Child struct { HasBag bool `protobuf:"varint,10,opt,name=has_bag,json=hasBag,proto3" json:"has_bag,omitempty"` HasLunchBox bool `protobuf:"varint,11,opt,name=has_lunch_box,json=hasLunchBox,proto3" json:"has_lunch_box,omitempty"` HasWaterBottle bool `protobuf:"varint,12,opt,name=has_water_bottle,json=hasWaterBottle,proto3" json:"has_water_bottle,omitempty"` - HasUmbrera bool `protobuf:"varint,13,opt,name=has_umbrera,json=hasUmbrera,proto3" json:"has_umbrera,omitempty"` + HasUmbrella bool `protobuf:"varint,13,opt,name=has_umbrella,json=hasUmbrella,proto3" json:"has_umbrella,omitempty"` HasOther bool `protobuf:"varint,14,opt,name=has_other,json=hasOther,proto3" json:"has_other,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` @@ -839,9 +839,9 @@ func (x *Child) GetHasWaterBottle() bool { return false } -func (x *Child) GetHasUmbrera() bool { +func (x *Child) GetHasUmbrella() bool { if x != nil { - return x.HasUmbrera + return x.HasUmbrella } return false } @@ -1366,7 +1366,7 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, - 0xd8, 0x04, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0xda, 0x04, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, @@ -1392,108 +1392,108 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, - 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, - 0x62, 0x72, 0x65, 0x72, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, - 0x55, 0x6d, 0x62, 0x72, 0x65, 0x72, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, - 0x74, 0x68, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, - 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb4, 0x02, 0x0a, 0x07, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, - 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, - 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, + 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, + 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, + 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, + 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, - 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, - 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, - 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, - 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, - 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x73, 0x33, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x73, 0x33, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x33, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, 0x65, 0x79, - 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, - 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, - 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, - 0x45, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, - 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, - 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, - 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, - 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, - 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, - 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, - 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, - 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb4, 0x02, 0x0a, + 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, + 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, + 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, + 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, + 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x33, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, + 0x33, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, + 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, + 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, + 0x4e, 0x54, 0x45, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x45, 0x0a, 0x03, 0x53, + 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, + 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, + 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, + 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, + 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, + 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, + 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, + 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, + 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/proto/where_child_bus/v1/resources.proto b/backend/proto/where_child_bus/v1/resources.proto index bdf9f601..af070ed0 100644 --- a/backend/proto/where_child_bus/v1/resources.proto +++ b/backend/proto/where_child_bus/v1/resources.proto @@ -90,7 +90,7 @@ message Child { bool has_bag = 10; bool has_lunch_box = 11; bool has_water_bottle = 12; - bool has_umbrera = 13; + bool has_umbrella = 13; bool has_other = 14; google.protobuf.Timestamp created_at = 15; google.protobuf.Timestamp updated_at = 16; diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart index adcf397c..04bffcf9 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -809,7 +809,7 @@ class Child extends $pb.GeneratedMessage { $core.bool? hasBag, $core.bool? hasLunchBox, $core.bool? hasWaterBottle, - $core.bool? hasUmbrera, + $core.bool? hasUmbrella, $core.bool? hasOther, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, @@ -851,8 +851,8 @@ class Child extends $pb.GeneratedMessage { if (hasWaterBottle != null) { $result.hasWaterBottle = hasWaterBottle; } - if (hasUmbrera != null) { - $result.hasUmbrera = hasUmbrera; + if (hasUmbrella != null) { + $result.hasUmbrella = hasUmbrella; } if (hasOther != null) { $result.hasOther = hasOther; @@ -882,7 +882,7 @@ class Child extends $pb.GeneratedMessage { ..aOB(10, _omitFieldNames ? '' : 'hasBag') ..aOB(11, _omitFieldNames ? '' : 'hasLunchBox') ..aOB(12, _omitFieldNames ? '' : 'hasWaterBottle') - ..aOB(13, _omitFieldNames ? '' : 'hasUmbrera') + ..aOB(13, _omitFieldNames ? '' : 'hasUmbrella') ..aOB(14, _omitFieldNames ? '' : 'hasOther') ..aOM<$7.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) ..aOM<$7.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) @@ -1019,13 +1019,13 @@ class Child extends $pb.GeneratedMessage { void clearHasWaterBottle() => clearField(12); @$pb.TagNumber(13) - $core.bool get hasUmbrera => $_getBF(12); + $core.bool get hasUmbrella => $_getBF(12); @$pb.TagNumber(13) - set hasUmbrera($core.bool v) { $_setBool(12, v); } + set hasUmbrella($core.bool v) { $_setBool(12, v); } @$pb.TagNumber(13) - $core.bool hasHasUmbrera() => $_has(12); + $core.bool hasHasUmbrella() => $_has(12); @$pb.TagNumber(13) - void clearHasUmbrera() => clearField(13); + void clearHasUmbrella() => clearField(13); @$pb.TagNumber(14) $core.bool get hasOther => $_getBF(13); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 348df1c1..461d9f61 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -197,7 +197,7 @@ const Child$json = { {'1': 'has_bag', '3': 10, '4': 1, '5': 8, '10': 'hasBag'}, {'1': 'has_lunch_box', '3': 11, '4': 1, '5': 8, '10': 'hasLunchBox'}, {'1': 'has_water_bottle', '3': 12, '4': 1, '5': 8, '10': 'hasWaterBottle'}, - {'1': 'has_umbrera', '3': 13, '4': 1, '5': 8, '10': 'hasUmbrera'}, + {'1': 'has_umbrella', '3': 13, '4': 1, '5': 8, '10': 'hasUmbrella'}, {'1': 'has_other', '3': 14, '4': 1, '5': 8, '10': 'hasOther'}, {'1': 'created_at', '3': 15, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, {'1': 'updated_at', '3': 16, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, @@ -213,10 +213,10 @@ final $typed_data.Uint8List childDescriptor = $convert.base64Decode( 'cmlkZV9ldmVuaW5nX2J1cxgIIAEoCFIQaXNSaWRlRXZlbmluZ0J1cxI1ChdjaGVja19mb3JfbW' 'lzc2luZ19pdGVtcxgJIAEoCFIUY2hlY2tGb3JNaXNzaW5nSXRlbXMSFwoHaGFzX2JhZxgKIAEo' 'CFIGaGFzQmFnEiIKDWhhc19sdW5jaF9ib3gYCyABKAhSC2hhc0x1bmNoQm94EigKEGhhc193YX' - 'Rlcl9ib3R0bGUYDCABKAhSDmhhc1dhdGVyQm90dGxlEh8KC2hhc191bWJyZXJhGA0gASgIUgpo' - 'YXNVbWJyZXJhEhsKCWhhc19vdGhlchgOIAEoCFIIaGFzT3RoZXISOQoKY3JlYXRlZF9hdBgPIA' - 'EoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRhdGVkX2F0' - 'GBAgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); + 'Rlcl9ib3R0bGUYDCABKAhSDmhhc1dhdGVyQm90dGxlEiEKDGhhc191bWJyZWxsYRgNIAEoCFIL' + 'aGFzVW1icmVsbGESGwoJaGFzX290aGVyGA4gASgIUghoYXNPdGhlchI5CgpjcmVhdGVkX2F0GA' + '8gASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRf' + 'YXQYECABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); @$core.Deprecated('Use stationDescriptor instead') const Station$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index 79403ad3..951d6a41 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xcf\x02\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xd8\x04\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12\x1f\n\x0bhas_umbrera\x18\r \x01(\x08R\nhasUmbrera\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xcf\x02\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xda\x04\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\r \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,12 +23,12 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_STATUS']._serialized_start=3160 - _globals['_STATUS']._serialized_end=3257 - _globals['_SEX']._serialized_start=3259 - _globals['_SEX']._serialized_end=3328 - _globals['_BUSTYPE']._serialized_start=3330 - _globals['_BUSTYPE']._serialized_end=3409 + _globals['_STATUS']._serialized_start=3162 + _globals['_STATUS']._serialized_end=3259 + _globals['_SEX']._serialized_start=3261 + _globals['_SEX']._serialized_end=3330 + _globals['_BUSTYPE']._serialized_start=3332 + _globals['_BUSTYPE']._serialized_end=3411 _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=420 _globals['_NURSERYRESPONSE']._serialized_start=423 @@ -40,15 +40,15 @@ _globals['_BUS']._serialized_start=1280 _globals['_BUS']._serialized_end=1615 _globals['_CHILD']._serialized_start=1618 - _globals['_CHILD']._serialized_end=2218 - _globals['_STATION']._serialized_start=2221 - _globals['_STATION']._serialized_end=2529 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2532 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2675 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=2677 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=2754 - _globals['_CHILDPHOTO']._serialized_start=2757 - _globals['_CHILDPHOTO']._serialized_end=2982 - _globals['_BOARDINGRECORD']._serialized_start=2985 - _globals['_BOARDINGRECORD']._serialized_end=3158 + _globals['_CHILD']._serialized_end=2220 + _globals['_STATION']._serialized_start=2223 + _globals['_STATION']._serialized_end=2531 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2534 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2677 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=2679 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=2756 + _globals['_CHILDPHOTO']._serialized_start=2759 + _globals['_CHILDPHOTO']._serialized_end=2984 + _globals['_BOARDINGRECORD']._serialized_start=2987 + _globals['_BOARDINGRECORD']._serialized_end=3160 # @@protoc_insertion_point(module_scope) From 6b6cd310497740ddbb885cccfa86b9f0a4dc85af Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 01:37:07 +0900 Subject: [PATCH 205/771] =?UTF-8?q?refactor:childList=E3=82=92=E3=82=AF?= =?UTF-8?q?=E3=83=A9=E3=82=B9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/child_list.dart | 88 +++++++++++++++++++ .../bus_edit_page/bus_edit_page.dart | 4 +- 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 frontend/where_child_bus/lib/components/utils/child_list.dart diff --git a/frontend/where_child_bus/lib/components/utils/child_list.dart b/frontend/where_child_bus/lib/components/utils/child_list.dart new file mode 100644 index 00000000..6bafdc01 --- /dev/null +++ b/frontend/where_child_bus/lib/components/utils/child_list.dart @@ -0,0 +1,88 @@ +import "package:flutter/material.dart"; + +class ChildList extends StatelessWidget { + final List childNames; + final List groupNames; + final List images; + final VoidCallback? callback; + + ChildList({required this.childNames, required this.groupNames, required this.images, this.callback}); + + @override + Widget build(BuildContext context) { + Size screenSize = MediaQuery.of(context).size; + return childCardListBuilder(screenSize); + } + + //TODO: 将来的にはAPIからデータを取得する。 + Widget childCardListBuilder(Size screenSize) { + return ListView.separated( + itemCount: childNames.length, + separatorBuilder: (BuildContext context, int index) { + return const Divider( + height: 20, + color: Colors.transparent, + ); + }, + itemBuilder: (BuildContext context, int index) { + return childCardListInner(index, screenSize); + } + ); + } + + Widget childCardListInner(int index, Size screenSize) { + return FractionallySizedBox( + widthFactor: 0.8, + child: InkWell( + onTap: () {}, + child: childCard(index, screenSize), + )); + } + + //TODO: Child型を受け取る + Widget childCard(int index, Size screenSize) { + return Card( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row(children: [ + childFaceImage(index), + SizedBox( + width: screenSize.width * 0.05, + ), + childNameAndGroupName(index), + ] + ) + ) + ); + } + + Widget childFaceImage(int index) { + return SizedBox( + width: 100, + height: 100, + child: Image.asset("assets/images/face_${images[index]}.png")); + } + + Widget childNameAndGroupName(int index) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(childNames[index], + style: const TextStyle(color: Colors.black, fontSize: 24)), + Text( + groupNames[index], + style: const TextStyle(color: Colors.black), + ), + busStopName(), + ]); + } + + //TODO: 引数に停留所名を加える。 + Widget busStopName() { + return const Row(children: [ + Icon(Icons.location_on), + Text("停留所名"), + ]); + } +} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 7091418c..e75143f9 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -105,7 +105,9 @@ class _BusEditPage extends State { child: Padding( padding: const EdgeInsets.all(10), child: ElevatedButton( - onPressed: () {}, + onPressed: () { + + }, child: const Text("バスに乗車する子供を変更"), ), ), From 9aa3f6b0196b660a4c33226c1cd75218dbcd1021 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 02:11:06 +0900 Subject: [PATCH 206/771] =?UTF-8?q?feat(api):=20=E3=83=91=E3=82=B9?= =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=83=89=E3=81=AE=E3=83=8F=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=A5=E5=8C=96=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.env.example | 3 ++- backend/config/config.go | 1 + backend/usecases/guardian/guardian.go | 3 +-- backend/usecases/nursery/nursery.go | 3 +-- backend/usecases/utils/utils.go | 24 ++++++++++++++++++++++++ 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/backend/.env.example b/backend/.env.example index 78869f5b..7a97dd4c 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -6,4 +6,5 @@ DB_NAME= PORT= MODE_DEV= GOOGLE_APPLICATION_CREDENTIALS= -STORAGE_BUCKET_NAME= \ No newline at end of file +STORAGE_BUCKET_NAME= +PASSWORD_PEPPER= \ No newline at end of file diff --git a/backend/config/config.go b/backend/config/config.go index d8d36350..1922b5c9 100644 --- a/backend/config/config.go +++ b/backend/config/config.go @@ -17,6 +17,7 @@ type Config struct { ModeDev bool `envconfig:"MODE_DEV" default:"true"` GoogleApplicationCredentials string `envconfig:"GOOGLE_APPLICATION_CREDENTIALS" required:"true"` StorageBucketName string `envconfig:"STORAGE_BUCKET_NAME" required:"true"` + PasswordPepper string `envconfig:"PASSWORD_PEPPER" required:"true"` } func New() (*Config, error) { diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 7a60bae3..3fd5cfde 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -3,7 +3,6 @@ package guardian import ( "fmt" - "golang.org/x/crypto/bcrypt" "golang.org/x/exp/slog" "context" @@ -25,7 +24,7 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginRequest) (*pb.GuardianLoginResponse, error) { // パスワードをハッシュ化 - hashedPassword, err := bcrypt.GenerateFromPassword([]byte(req.Password), bcrypt.DefaultCost) + hashedPassword, err := utils.HashPassword(req.Password) if err != nil { // エラーハンドリング return nil, fmt.Errorf("failed to hash password: %w", err) diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index 0ef68fb2..740a4d50 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -3,7 +3,6 @@ package nursery import ( "fmt" - "golang.org/x/crypto/bcrypt" "golang.org/x/exp/slog" "context" @@ -25,7 +24,7 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginRequest) (*pb.NurseryLoginResponse, error) { //パスワードをハッシュ化 - hashedPassword, err := bcrypt.GenerateFromPassword([]byte(req.Password), bcrypt.DefaultCost) + hashedPassword, err := utils.HashPassword(req.Password) if err != nil { //エラーハンドリング return nil, fmt.Errorf("failed to hash password: %w", err) diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index cf8f9b3f..d6ddd301 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -3,7 +3,9 @@ package utils import ( "fmt" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "golang.org/x/crypto/bcrypt" "google.golang.org/protobuf/types/known/timestamppb" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" @@ -113,3 +115,25 @@ func ToPbNurseryResponse(t *ent.Nursery) *pb.NurseryResponse { UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, } } + +func HashPassword(password string) (string, error) { + // 環境変数からペッパーを取得 + config, _ := config.New() + pepper := config.PasswordPepper + + // パスワードにペッパーを追加 + passwordWithPepper := password + pepper + + // ハッシュ計算のコストを増やす(例: bcrypt.MinCost + 5) + cost := bcrypt.MinCost + 5 + if cost > bcrypt.MaxCost { + cost = bcrypt.MaxCost + } + + // ペッパーを追加したパスワードをハッシュ化 + hashedPassword, err := bcrypt.GenerateFromPassword([]byte(passwordWithPepper), cost) + if err != nil { + return "", fmt.Errorf("failed to hash password: %w", err) + } + return string(hashedPassword), nil +} From 2a89b714a84505a9e5f18261edbd6165a2ad3d46 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 02:12:03 +0900 Subject: [PATCH 207/771] =?UTF-8?q?chore(api):=20=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=82=BF=E3=83=BC=E3=83=95=E3=82=A7=E3=83=BC=E3=82=B9=E3=81=AB?= =?UTF-8?q?=E6=96=B0=E3=81=97=E3=81=84=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/child.go | 5 +++++ backend/interfaces/guardian.go | 5 +++++ backend/interfaces/nursery.go | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/backend/interfaces/child.go b/backend/interfaces/child.go index ecb60602..1b9a62f7 100644 --- a/backend/interfaces/child.go +++ b/backend/interfaces/child.go @@ -15,6 +15,11 @@ func NewChildServiceServer(interactor *child.Interactor) pb.ChildServiceServer { return &childServiceServer{interactor} } +// GetChildListByBusID implements where_child_busv1.ChildServiceServer. +func (*childServiceServer) GetChildListByBusID(context.Context, *pb.GetChildListByBusIDRequest) (*pb.GetChildListByBusIDResponse, error) { + panic("unimplemented") +} + // CreateChild implements where_child_busv1.ChildServiceServer. func (s *childServiceServer) CreateChild(ctx context.Context, req *pb.CreateChildRequest) (*pb.CreateChildResponse, error) { return s.interactor.CreateChild(ctx, req) diff --git a/backend/interfaces/guardian.go b/backend/interfaces/guardian.go index 4b83b9c7..498e0217 100644 --- a/backend/interfaces/guardian.go +++ b/backend/interfaces/guardian.go @@ -15,6 +15,11 @@ func NewGuardianServiceServer(interactor *guardian.Interactor) pb.GuardianServic return &guardianServiceServer{interactor} } +// CreateGuardian implements where_child_busv1.GuardianServiceServer. +func (*guardianServiceServer) CreateGuardian(context.Context, *pb.CreateGuardianRequest) (*pb.CreateGuardianResponse, error) { + panic("unimplemented") +} + // GuardianLogin implements where_child_busv1.GuardianServiceServer. func (s *guardianServiceServer) GuardianLogin(ctx context.Context, req *pb.GuardianLoginRequest) (*pb.GuardianLoginResponse, error) { return s.interactor.GuardianLogin(ctx, req) diff --git a/backend/interfaces/nursery.go b/backend/interfaces/nursery.go index f298e79e..470deef2 100644 --- a/backend/interfaces/nursery.go +++ b/backend/interfaces/nursery.go @@ -15,6 +15,11 @@ func NewNurseryServiceServer(interactor *nursery.Interactor) pb.NurseryServiceSe return &nurseryServiceServer{interactor} } +// CreateNursery implements where_child_busv1.NurseryServiceServer. +func (*nurseryServiceServer) CreateNursery(context.Context, *pb.CreateNurseryRequest) (*pb.CreateNurseryResponse, error) { + panic("unimplemented") +} + func (s *nurseryServiceServer) NurseryLogin(ctx context.Context, req *pb.NurseryLoginRequest) (*pb.NurseryLoginResponse, error) { return s.interactor.NurseryLogin(ctx, req) } From 308108301d4951a7e28f5b4a5400601c3694dba6 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 02:18:13 +0900 Subject: [PATCH 208/771] =?UTF-8?q?feat:=20bus=5Fchild=5Fmanage=5Fpage.dar?= =?UTF-8?q?t=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_child_manage_page.dart | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart new file mode 100644 index 00000000..2990f8bb --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; + +class BusChildManagePage extends StatefulWidget { + + _BusChildManagePage createState() => _BusChildManagePage(); +} + +class _BusChildManagePage extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(), + body: Container(), + ); + } +} \ No newline at end of file From f7e00afe0c1aa6f6e87d279f4e27cb0c27e95af2 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 02:39:46 +0900 Subject: [PATCH 209/771] =?UTF-8?q?chore:child=5Fphoto.pbserver=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/child_photo.pbserver.dart | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart deleted file mode 100644 index 9ebc0cdf..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart +++ /dev/null @@ -1,43 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/child_photo.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'child_photo.pb.dart' as $4; -import 'child_photo.pbjson.dart'; - -export 'child_photo.pb.dart'; - -abstract class ChildPhotoServiceBase extends $pb.GeneratedService { - $async.Future<$4.DeleteChildPhotoResponse> deleteChildPhoto($pb.ServerContext ctx, $4.DeleteChildPhotoRequest request); - - $pb.GeneratedMessage createRequest($core.String methodName) { - switch (methodName) { - case 'DeleteChildPhoto': return $4.DeleteChildPhotoRequest(); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { - switch (methodName) { - case 'DeleteChildPhoto': return this.deleteChildPhoto(ctx, request as $4.DeleteChildPhotoRequest); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => ChildPhotoServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => ChildPhotoServiceBase$messageJson; -} - From 091415707fd642ae1d386aea90a2c9ca0ecc2354 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 13 Feb 2024 03:40:09 +0900 Subject: [PATCH 210/771] =?UTF-8?q?chore(ml):=20package=20tqdm=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/pyproject.toml | 1 + machine_learning/requirements-dev.lock | 1 + machine_learning/requirements.lock | 1 + 3 files changed, 3 insertions(+) diff --git a/machine_learning/pyproject.toml b/machine_learning/pyproject.toml index 61d5b3a1..6453abd7 100644 --- a/machine_learning/pyproject.toml +++ b/machine_learning/pyproject.toml @@ -9,6 +9,7 @@ dependencies = [ "torchvision>=0.17.0", "numpy>=1.24.4", "pyyaml>=6.0.1", + "tqdm>=4.66.2", ] readme = "README.md" requires-python = ">= 3.8" diff --git a/machine_learning/requirements-dev.lock b/machine_learning/requirements-dev.lock index 22dbfcff..27ef6135 100644 --- a/machine_learning/requirements-dev.lock +++ b/machine_learning/requirements-dev.lock @@ -24,5 +24,6 @@ requests==2.31.0 sympy==1.12 torch==2.2.0 torchvision==0.17.0 +tqdm==4.66.2 typing-extensions==4.9.0 urllib3==2.2.0 diff --git a/machine_learning/requirements.lock b/machine_learning/requirements.lock index 22dbfcff..27ef6135 100644 --- a/machine_learning/requirements.lock +++ b/machine_learning/requirements.lock @@ -24,5 +24,6 @@ requests==2.31.0 sympy==1.12 torch==2.2.0 torchvision==0.17.0 +tqdm==4.66.2 typing-extensions==4.9.0 urllib3==2.2.0 From a4a4ac392558951498abfb9526420a6d1a275617 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 13 Feb 2024 03:41:10 +0900 Subject: [PATCH 211/771] =?UTF-8?q?chore(ml):=20clip=E3=81=AE=E5=89=8D?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=81=AB=E5=AF=BE=E3=81=97=E3=81=A6log?= =?UTF-8?q?=E3=82=92=E5=87=BA=E5=8A=9B=EF=BC=8E=E5=AE=9F=E8=A1=8C=E6=99=82?= =?UTF-8?q?=E5=BC=95=E6=95=B0=E3=81=A7local=E7=92=B0=E5=A2=83=E3=81=A8remo?= =?UTF-8?q?te=E7=92=B0=E5=A2=83=E3=82=92=E6=8C=87=E5=AE=9A=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/detectFaceAndClip.py | 45 ++++++++++++++----- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py index b0aa06fc..109467df 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -1,6 +1,16 @@ import cv2 import os import yaml +from tqdm import tqdm +import argparse +import logging + +logging.basicConfig( + format="%(asctime)s - %(levelname)s - %(name)s - PID: %(process)d - %(message)s", + datefmt="%m/%d/%Y %H:%M:%S", + level=logging.INFO, +) +logger = logging.getLogger(__name__) def load_cascade(cascade_path): @@ -35,7 +45,8 @@ def save_face(face, save_dir, save_file_name): cv2.imwrite(save_path, face) -def main(): +def main(args): + logger.info(f"env: {args.env}") # パスの指定 with open("src/face_detect_model/config.yaml", "r") as f: config = yaml.safe_load(f) @@ -48,30 +59,35 @@ def main(): config["face_detect"]["clip_size"]["width"], ) - # 保存先ディレクトリの作成,存在した場合は中身を削除 - os.makedirs(save_dir, exist_ok=True) + if args.env == "local": + # 保存先ディレクトリの作成,存在した場合は中身を削除 + os.makedirs(save_dir, exist_ok=True) + for file in os.listdir(save_dir): + file_path = os.path.join(save_dir, file) + if os.path.isfile(file_path): + os.remove(file_path) - for file in os.listdir(save_dir): - file_path = os.path.join(save_dir, file) - if os.path.isfile(file_path): - os.remove(file_path) # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) # 画像の読み込み # TODO: 良い感じのlog for target_people_name in os.listdir(image_dir_path): + logger.info(f"processing... : {target_people_name}") detect_face_num = 0 - for image_name in os.listdir(os.path.join(image_dir_path, target_people_name)): + for image_name in tqdm( + os.listdir(os.path.join(image_dir_path, target_people_name)) + ): image = cv2.imread( image_path := os.path.join( image_dir_path, target_people_name, image_name ) ) if image is None: - raise ValueError( + logger.error( f"画像ファイルが見つからないか読み込めません: {image_path}" ) + continue # 画像から顔を検出 faces = detect_face( @@ -91,7 +107,16 @@ def main(): save_file_name = f"{target_people_name}-{detect_face_num}.png" save_face(clipped_face, save_dir, save_file_name) detect_face_num += 1 + logger.info("Done") if __name__ == "__main__": - main() + parser = argparse.ArgumentParser() + parser.add_argument( + "--env", + type=str, + choices=["local", "remote"], + help="local: ローカル環境, remote: GCP環境", + ) + args = parser.parse_args() + main(args) From 80a9d24e756949cb6223c689ac8d5ec37d597b64 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 11:43:40 +0900 Subject: [PATCH 212/771] =?UTF-8?q?feat:=E7=94=BB=E9=9D=A2=E9=81=B7?= =?UTF-8?q?=E7=A7=BB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/student_list_page/student_list_page.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 87f6d875..45da8df2 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/student_list_page/student_detail_sheet.dart'; +import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; class StudentListPage extends StatefulWidget { const StudentListPage({super.key}); @@ -40,7 +41,10 @@ class _StudentListPageState extends State { appBar: AppBar(), body: childCardListBuilder(screenSize), floatingActionButton: FloatingActionButton( - onPressed: () {}, + onPressed: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (BuildContext context) => const StudentEditPage())); + }, child: const Icon(Icons.add), ), ); From 679fa7876148772ff70654adc7ec6c453c91f3a4 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 11:45:33 +0900 Subject: [PATCH 213/771] =?UTF-8?q?move:=E4=BF=9D=E5=AD=98=E3=83=9C?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=82=92utils=E3=83=95=E3=82=A9=E3=83=AB?= =?UTF-8?q?=E3=83=80=E3=81=B8=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compornents/{ => utils}/submit_button.dart | 2 +- .../lib/pages/student_list_page/student_edit_page.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename frontend/where_child_bus/lib/pages/student_list_page/compornents/{ => utils}/submit_button.dart (86%) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/compornents/submit_button.dart b/frontend/where_child_bus/lib/pages/student_list_page/compornents/utils/submit_button.dart similarity index 86% rename from frontend/where_child_bus/lib/pages/student_list_page/compornents/submit_button.dart rename to frontend/where_child_bus/lib/pages/student_list_page/compornents/utils/submit_button.dart index 19fbe6e3..3040de83 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/compornents/submit_button.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/compornents/utils/submit_button.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; class SubmitButton extends StatelessWidget { final VoidCallback onPressed; - const SubmitButton({required this.onPressed}); + const SubmitButton({required this.onPressed, super.key}); @override Widget build(BuildContext context) { diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index ca550a62..e5492c1a 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -1,7 +1,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; -import './compornents/submit_button.dart'; +import 'compornents/utils/submit_button.dart'; class StudentEditPage extends StatefulWidget { const StudentEditPage({super.key}); From 83d6dec319c7e131a079625ad3656e2a8aa5c58e Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 12:15:44 +0900 Subject: [PATCH 214/771] =?UTF-8?q?fix:=E3=83=95=E3=82=A9=E3=83=AB?= =?UTF-8?q?=E3=83=80=E5=90=8D=E3=81=AE=E8=AA=A4=E5=AD=97=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/utils/input_value_label.dart | 17 +++++++++++++++++ .../utils/submit_button.dart | 0 .../student_list_page/student_edit_page.dart | 16 ++++------------ 3 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_value_label.dart rename frontend/where_child_bus/lib/pages/student_list_page/{compornents => components}/utils/submit_button.dart (100%) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_value_label.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_value_label.dart new file mode 100644 index 00000000..e1319e40 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_value_label.dart @@ -0,0 +1,17 @@ +import 'package:flutter/material.dart'; + +class InputValueLabel extends StatelessWidget { + final String label; + + const InputValueLabel({required this.label, super.key}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + label, + style: const TextStyle(color: Colors.black, fontSize: 16), + )); + } +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/compornents/utils/submit_button.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/submit_button.dart similarity index 100% rename from frontend/where_child_bus/lib/pages/student_list_page/compornents/utils/submit_button.dart rename to frontend/where_child_bus/lib/pages/student_list_page/components/utils/submit_button.dart diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index e5492c1a..5ab77c03 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -1,7 +1,8 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; -import 'compornents/utils/submit_button.dart'; +import 'components/utils/input_value_label.dart'; +import 'components/utils/submit_button.dart'; class StudentEditPage extends StatefulWidget { const StudentEditPage({super.key}); @@ -103,7 +104,7 @@ class _StudentEditPageState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - inputValueLabel(label), + InputValueLabel(label: label), textInputField(context, hintText, type) ], ); @@ -114,21 +115,12 @@ class _StudentEditPageState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - inputValueLabel(label), + InputValueLabel(label: label), selectValueBox(context, lists), ], ); } - Widget inputValueLabel(String label) { - return Padding( - padding: const EdgeInsets.all(8.0), - child: Text( - label, - style: const TextStyle(color: Colors.black, fontSize: 16), - )); - } - Widget textInputField( BuildContext context, String hintText, TextInputType type) { return SizedBox( From 0c48403c3d21b8cb52dd9fed34ba5a0bffe9ff9f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 14:49:22 +0900 Subject: [PATCH 215/771] =?UTF-8?q?feat(proto):=20=E4=B8=8D=E8=B6=B3?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=84=E3=81=9FPython=E3=83=97=E3=83=A9?= =?UTF-8?q?=E3=82=B0=E3=82=A4=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97?= =?UTF-8?q?=E3=80=81=E5=86=8D=E5=BA=A6=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit buf.build/protocolbuffers/pythonとbuf.build/protocolbuffers/pyiのバージョンをv25.2に更新しました。grpc.experimentalをimportする行を追加しました。新しいスクリプトhealthcheck.pyを追加しました。 --- backend/proto/buf.gen.yaml | 4 +- .../proto-gen/where_child_bus/v1/bus_pb2.pyi | 39 +++ .../where_child_bus/v1/bus_pb2_grpc.py | 2 + .../where_child_bus/v1/child_pb2.pyi | 65 +++++ .../where_child_bus/v1/child_photo_pb2.pyi | 20 ++ .../v1/child_photo_pb2_grpc.py | 2 + .../where_child_bus/v1/guardian_pb2.pyi | 44 ++++ .../where_child_bus/v1/guardian_pb2_grpc.py | 1 + .../where_child_bus/v1/health_check_pb2.pyi | 17 ++ .../v1/health_check_pb2_grpc.py | 1 + .../where_child_bus/v1/healthcheck.py | 22 ++ .../where_child_bus/v1/nursery_pb2.pyi | 42 +++ .../where_child_bus/v1/nursery_pb2_grpc.py | 2 + .../where_child_bus/v1/resources_pb2.pyi | 246 ++++++++++++++++++ .../where_child_bus/v1/station_pb2.pyi | 39 +++ .../where_child_bus/v1/station_pb2_grpc.py | 2 + 16 files changed, 547 insertions(+), 1 deletion(-) create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.pyi create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/healthcheck.py create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.pyi create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi diff --git a/backend/proto/buf.gen.yaml b/backend/proto/buf.gen.yaml index f6b34481..609ff65c 100644 --- a/backend/proto/buf.gen.yaml +++ b/backend/proto/buf.gen.yaml @@ -20,7 +20,9 @@ plugins: out: ../../machine_learning/src/proto-gen/ # dependencies - - plugin: buf.build/protocolbuffers/python + - plugin: buf.build/protocolbuffers/python:v25.2 + out: ../../machine_learning/src/proto-gen/ + - plugin: buf.build/protocolbuffers/pyi:v25.2 out: ../../machine_learning/src/proto-gen/ # Dart用の設定 (クライアント側) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi new file mode 100644 index 00000000..d7e5d230 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi @@ -0,0 +1,39 @@ +from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CreateBusRequest(_message.Message): + __slots__ = ("nursery_id", "name", "plate_number", "child_ids") + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] + CHILD_IDS_FIELD_NUMBER: _ClassVar[int] + nursery_id: str + name: str + plate_number: str + child_ids: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., child_ids: _Optional[_Iterable[str]] = ...) -> None: ... + +class CreateBusResponse(_message.Message): + __slots__ = ("bus", "children") + BUS_FIELD_NUMBER: _ClassVar[int] + CHILDREN_FIELD_NUMBER: _ClassVar[int] + bus: _resources_pb2.Bus + children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] + def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... + +class GetBusListByNurseryIdRequest(_message.Message): + __slots__ = ("nursery_id",) + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + nursery_id: str + def __init__(self, nursery_id: _Optional[str] = ...) -> None: ... + +class GetBusListByNurseryIdResponse(_message.Message): + __slots__ = ("buses",) + BUSES_FIELD_NUMBER: _ClassVar[int] + buses: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Bus] + def __init__(self, buses: _Optional[_Iterable[_Union[_resources_pb2.Bus, _Mapping]]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py index 626025e9..0931079b 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py @@ -1,6 +1,8 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import grpc.experimental + from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi new file mode 100644 index 00000000..fcdc142d --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi @@ -0,0 +1,65 @@ +from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CreateChildRequest(_message.Message): + __slots__ = ("nursery_id", "guardian_id", "name", "age", "sex", "photos") + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + AGE_FIELD_NUMBER: _ClassVar[int] + SEX_FIELD_NUMBER: _ClassVar[int] + PHOTOS_FIELD_NUMBER: _ClassVar[int] + nursery_id: str + guardian_id: str + name: str + age: int + sex: _resources_pb2.Sex + photos: _containers.RepeatedScalarFieldContainer[bytes] + def __init__(self, nursery_id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[_resources_pb2.Sex, str]] = ..., photos: _Optional[_Iterable[bytes]] = ...) -> None: ... + +class CreateChildResponse(_message.Message): + __slots__ = ("child",) + CHILD_FIELD_NUMBER: _ClassVar[int] + child: _resources_pb2.Child + def __init__(self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ...) -> None: ... + +class GetChildListByNurseryIDRequest(_message.Message): + __slots__ = ("nursery_id",) + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + nursery_id: str + def __init__(self, nursery_id: _Optional[str] = ...) -> None: ... + +class GetChildListByNurseryIDResponse(_message.Message): + __slots__ = ("children",) + CHILDREN_FIELD_NUMBER: _ClassVar[int] + children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] + def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... + +class GetChildListByGuardianIDRequest(_message.Message): + __slots__ = ("guardian_id",) + GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] + guardian_id: str + def __init__(self, guardian_id: _Optional[str] = ...) -> None: ... + +class GetChildListByGuardianIDResponse(_message.Message): + __slots__ = ("children",) + CHILDREN_FIELD_NUMBER: _ClassVar[int] + children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] + def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... + +class GetChildListByBusIDRequest(_message.Message): + __slots__ = ("bus_id",) + BUS_ID_FIELD_NUMBER: _ClassVar[int] + bus_id: str + def __init__(self, bus_id: _Optional[str] = ...) -> None: ... + +class GetChildListByBusIDResponse(_message.Message): + __slots__ = ("children",) + CHILDREN_FIELD_NUMBER: _ClassVar[int] + children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] + def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi new file mode 100644 index 00000000..8f15f214 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi @@ -0,0 +1,20 @@ +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class DeleteChildPhotoRequest(_message.Message): + __slots__ = ("ids",) + IDS_FIELD_NUMBER: _ClassVar[int] + ids: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, ids: _Optional[_Iterable[str]] = ...) -> None: ... + +class DeleteChildPhotoResponse(_message.Message): + __slots__ = ("is_success_list", "ids") + IS_SUCCESS_LIST_FIELD_NUMBER: _ClassVar[int] + IDS_FIELD_NUMBER: _ClassVar[int] + is_success_list: _containers.RepeatedScalarFieldContainer[bool] + ids: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, is_success_list: _Optional[_Iterable[bool]] = ..., ids: _Optional[_Iterable[str]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py index 82077476..ef9b2478 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py @@ -1,6 +1,8 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import grpc.experimental + from where_child_bus.v1 import child_photo_pb2 as where__child__bus_dot_v1_dot_child__photo__pb2 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi new file mode 100644 index 00000000..ddf0e20c --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi @@ -0,0 +1,44 @@ +from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CreateGuardianRequest(_message.Message): + __slots__ = ("nursery_code", "email", "password", "name", "phone_number") + NURSERY_CODE_FIELD_NUMBER: _ClassVar[int] + EMAIL_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + nursery_code: str + email: str + password: str + name: str + phone_number: str + def __init__(self, nursery_code: _Optional[str] = ..., email: _Optional[str] = ..., password: _Optional[str] = ..., name: _Optional[str] = ..., phone_number: _Optional[str] = ...) -> None: ... + +class CreateGuardianResponse(_message.Message): + __slots__ = ("guardian",) + GUARDIAN_FIELD_NUMBER: _ClassVar[int] + guardian: _resources_pb2.GuardianResponse + def __init__(self, guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ...) -> None: ... + +class GuardianLoginRequest(_message.Message): + __slots__ = ("email", "password") + EMAIL_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + email: str + password: str + def __init__(self, email: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... + +class GuardianLoginResponse(_message.Message): + __slots__ = ("success", "guardian", "nursery") + SUCCESS_FIELD_NUMBER: _ClassVar[int] + GUARDIAN_FIELD_NUMBER: _ClassVar[int] + NURSERY_FIELD_NUMBER: _ClassVar[int] + success: bool + guardian: _resources_pb2.GuardianResponse + nursery: _resources_pb2.NurseryResponse + def __init__(self, success: bool = ..., guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py index 1f96f928..7c1cced2 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py @@ -1,6 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import grpc.experimental from where_child_bus.v1 import guardian_pb2 as where__child__bus_dot_v1_dot_guardian__pb2 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.pyi new file mode 100644 index 00000000..fb2e805c --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.pyi @@ -0,0 +1,17 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class PingRequest(_message.Message): + __slots__ = ("name",) + NAME_FIELD_NUMBER: _ClassVar[int] + name: str + def __init__(self, name: _Optional[str] = ...) -> None: ... + +class PingResponse(_message.Message): + __slots__ = ("message",) + MESSAGE_FIELD_NUMBER: _ClassVar[int] + message: str + def __init__(self, message: _Optional[str] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py index f0f6381c..655c0c66 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py @@ -1,6 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import grpc.experimental from where_child_bus.v1 import health_check_pb2 as where__child__bus_dot_v1_dot_health__check__pb2 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/healthcheck.py b/machine_learning/src/proto-gen/where_child_bus/v1/healthcheck.py new file mode 100644 index 00000000..a7c47408 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/healthcheck.py @@ -0,0 +1,22 @@ +import sys +import os + +# このスクリプトが存在するディレクトリの親ディレクトリを検索パスに追加 +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +import health_check_pb2_grpc +import health_check_pb2 + +import grpc + +# gRPCクライアントの設定 +client = grpc.insecure_channel('where-child-bus-grpc-k3dkun2lpq-uw.a.run.app:443') +stub = health_check_pb2_grpc.HealthcheckServiceStub(client) + +reqst = health_check_pb2.PingRequest() +reqst.name = "ping" + +res = health_check_pb2.PingResponse(stub.Ping(reqst)) + +print(res.message) + diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.pyi new file mode 100644 index 00000000..fbce8808 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.pyi @@ -0,0 +1,42 @@ +from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CreateNurseryRequest(_message.Message): + __slots__ = ("email", "password", "name", "phone_number", "address") + EMAIL_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] + email: str + password: str + name: str + phone_number: str + address: str + def __init__(self, email: _Optional[str] = ..., password: _Optional[str] = ..., name: _Optional[str] = ..., phone_number: _Optional[str] = ..., address: _Optional[str] = ...) -> None: ... + +class CreateNurseryResponse(_message.Message): + __slots__ = ("nursery",) + NURSERY_FIELD_NUMBER: _ClassVar[int] + nursery: _resources_pb2.NurseryResponse + def __init__(self, nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... + +class NurseryLoginRequest(_message.Message): + __slots__ = ("email", "password") + EMAIL_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + email: str + password: str + def __init__(self, email: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... + +class NurseryLoginResponse(_message.Message): + __slots__ = ("success", "nursery") + SUCCESS_FIELD_NUMBER: _ClassVar[int] + NURSERY_FIELD_NUMBER: _ClassVar[int] + success: bool + nursery: _resources_pb2.NurseryResponse + def __init__(self, success: bool = ..., nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py index 2d559ee0..238843cd 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py @@ -1,6 +1,8 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import grpc.experimental + from where_child_bus.v1 import nursery_pb2 as where__child__bus_dot_v1_dot_nursery__pb2 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi new file mode 100644 index 00000000..e7546cd4 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi @@ -0,0 +1,246 @@ +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + STATUS_UNSPECIFIED: _ClassVar[Status] + STATUS_STOPPED: _ClassVar[Status] + STATUS_RUNNING: _ClassVar[Status] + STATUS_MAINTEINANCE: _ClassVar[Status] + +class Sex(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + SEX_UNSPECIFIED: _ClassVar[Sex] + SEX_MAN: _ClassVar[Sex] + SEX_WOMAN: _ClassVar[Sex] + SEX_OTHER: _ClassVar[Sex] + +class BusType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + BUS_TYPE_UNSPECIFIED: _ClassVar[BusType] + BUS_TYPE_MORNING: _ClassVar[BusType] + BUS_TYPE_EVENING: _ClassVar[BusType] +STATUS_UNSPECIFIED: Status +STATUS_STOPPED: Status +STATUS_RUNNING: Status +STATUS_MAINTEINANCE: Status +SEX_UNSPECIFIED: Sex +SEX_MAN: Sex +SEX_WOMAN: Sex +SEX_OTHER: Sex +BUS_TYPE_UNSPECIFIED: BusType +BUS_TYPE_MORNING: BusType +BUS_TYPE_EVENING: BusType + +class Nursery(_message.Message): + __slots__ = ("id", "nursery_code", "name", "address", "phone_number", "email", "encrypted_password", "created_at", "updated_at") + ID_FIELD_NUMBER: _ClassVar[int] + NURSERY_CODE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] + PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + EMAIL_FIELD_NUMBER: _ClassVar[int] + ENCRYPTED_PASSWORD_FIELD_NUMBER: _ClassVar[int] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + UPDATED_AT_FIELD_NUMBER: _ClassVar[int] + id: str + nursery_code: str + name: str + address: str + phone_number: str + email: str + encrypted_password: str + created_at: _timestamp_pb2.Timestamp + updated_at: _timestamp_pb2.Timestamp + def __init__(self, id: _Optional[str] = ..., nursery_code: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., encrypted_password: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class NurseryResponse(_message.Message): + __slots__ = ("id", "nursery_code", "name", "address", "phone_number", "email", "created_at", "updated_at") + ID_FIELD_NUMBER: _ClassVar[int] + NURSERY_CODE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] + PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + EMAIL_FIELD_NUMBER: _ClassVar[int] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + UPDATED_AT_FIELD_NUMBER: _ClassVar[int] + id: str + nursery_code: str + name: str + address: str + phone_number: str + email: str + created_at: _timestamp_pb2.Timestamp + updated_at: _timestamp_pb2.Timestamp + def __init__(self, id: _Optional[str] = ..., nursery_code: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class Guardian(_message.Message): + __slots__ = ("id", "nursery_id", "name", "email", "phone_number", "encrypted_password", "created_at", "updated_at") + ID_FIELD_NUMBER: _ClassVar[int] + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + EMAIL_FIELD_NUMBER: _ClassVar[int] + PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + ENCRYPTED_PASSWORD_FIELD_NUMBER: _ClassVar[int] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + UPDATED_AT_FIELD_NUMBER: _ClassVar[int] + id: str + nursery_id: str + name: str + email: str + phone_number: str + encrypted_password: str + created_at: _timestamp_pb2.Timestamp + updated_at: _timestamp_pb2.Timestamp + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., encrypted_password: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class GuardianResponse(_message.Message): + __slots__ = ("id", "nursery_id", "name", "email", "phone_number", "created_at", "updated_at") + ID_FIELD_NUMBER: _ClassVar[int] + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + EMAIL_FIELD_NUMBER: _ClassVar[int] + PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + UPDATED_AT_FIELD_NUMBER: _ClassVar[int] + id: str + nursery_id: str + name: str + email: str + phone_number: str + created_at: _timestamp_pb2.Timestamp + updated_at: _timestamp_pb2.Timestamp + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class Bus(_message.Message): + __slots__ = ("id", "nursery_id", "name", "plate_number", "status", "latitude", "longitude", "created_at", "updated_at") + ID_FIELD_NUMBER: _ClassVar[int] + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + LATITUDE_FIELD_NUMBER: _ClassVar[int] + LONGITUDE_FIELD_NUMBER: _ClassVar[int] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + UPDATED_AT_FIELD_NUMBER: _ClassVar[int] + id: str + nursery_id: str + name: str + plate_number: str + status: Status + latitude: float + longitude: float + created_at: _timestamp_pb2.Timestamp + updated_at: _timestamp_pb2.Timestamp + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., status: _Optional[_Union[Status, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class Child(_message.Message): + __slots__ = ("id", "nursery_id", "guardian_id", "name", "age", "sex", "is_ride_morning_bus", "is_ride_evening_bus", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "created_at", "updated_at") + ID_FIELD_NUMBER: _ClassVar[int] + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + AGE_FIELD_NUMBER: _ClassVar[int] + SEX_FIELD_NUMBER: _ClassVar[int] + IS_RIDE_MORNING_BUS_FIELD_NUMBER: _ClassVar[int] + IS_RIDE_EVENING_BUS_FIELD_NUMBER: _ClassVar[int] + CHECK_FOR_MISSING_ITEMS_FIELD_NUMBER: _ClassVar[int] + HAS_BAG_FIELD_NUMBER: _ClassVar[int] + HAS_LUNCH_BOX_FIELD_NUMBER: _ClassVar[int] + HAS_WATER_BOTTLE_FIELD_NUMBER: _ClassVar[int] + HAS_UMBRELLA_FIELD_NUMBER: _ClassVar[int] + HAS_OTHER_FIELD_NUMBER: _ClassVar[int] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + UPDATED_AT_FIELD_NUMBER: _ClassVar[int] + id: str + nursery_id: str + guardian_id: str + name: str + age: int + sex: Sex + is_ride_morning_bus: bool + is_ride_evening_bus: bool + check_for_missing_items: bool + has_bag: bool + has_lunch_box: bool + has_water_bottle: bool + has_umbrella: bool + has_other: bool + created_at: _timestamp_pb2.Timestamp + updated_at: _timestamp_pb2.Timestamp + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[Sex, str]] = ..., is_ride_morning_bus: bool = ..., is_ride_evening_bus: bool = ..., check_for_missing_items: bool = ..., has_bag: bool = ..., has_lunch_box: bool = ..., has_water_bottle: bool = ..., has_umbrella: bool = ..., has_other: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class Station(_message.Message): + __slots__ = ("id", "guardian_id", "latitude", "longitude", "morning_order", "evening_order", "created_at", "updated_at") + ID_FIELD_NUMBER: _ClassVar[int] + GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] + LATITUDE_FIELD_NUMBER: _ClassVar[int] + LONGITUDE_FIELD_NUMBER: _ClassVar[int] + MORNING_ORDER_FIELD_NUMBER: _ClassVar[int] + EVENING_ORDER_FIELD_NUMBER: _ClassVar[int] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + UPDATED_AT_FIELD_NUMBER: _ClassVar[int] + id: str + guardian_id: str + latitude: float + longitude: float + morning_order: int + evening_order: int + created_at: _timestamp_pb2.Timestamp + updated_at: _timestamp_pb2.Timestamp + def __init__(self, id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., morning_order: _Optional[int] = ..., evening_order: _Optional[int] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class ChildBusAssociation(_message.Message): + __slots__ = ("id", "bus_id", "child_id", "bus_type") + ID_FIELD_NUMBER: _ClassVar[int] + BUS_ID_FIELD_NUMBER: _ClassVar[int] + CHILD_ID_FIELD_NUMBER: _ClassVar[int] + BUS_TYPE_FIELD_NUMBER: _ClassVar[int] + id: str + bus_id: str + child_id: str + bus_type: BusType + def __init__(self, id: _Optional[str] = ..., bus_id: _Optional[str] = ..., child_id: _Optional[str] = ..., bus_type: _Optional[_Union[BusType, str]] = ...) -> None: ... + +class BusStationAssociation(_message.Message): + __slots__ = ("bus_id", "station_id") + BUS_ID_FIELD_NUMBER: _ClassVar[int] + STATION_ID_FIELD_NUMBER: _ClassVar[int] + bus_id: str + station_id: str + def __init__(self, bus_id: _Optional[str] = ..., station_id: _Optional[str] = ...) -> None: ... + +class ChildPhoto(_message.Message): + __slots__ = ("id", "child_id", "s3_bucket", "s3_key", "created_at", "updated_at") + ID_FIELD_NUMBER: _ClassVar[int] + CHILD_ID_FIELD_NUMBER: _ClassVar[int] + S3_BUCKET_FIELD_NUMBER: _ClassVar[int] + S3_KEY_FIELD_NUMBER: _ClassVar[int] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + UPDATED_AT_FIELD_NUMBER: _ClassVar[int] + id: str + child_id: str + s3_bucket: str + s3_key: str + created_at: _timestamp_pb2.Timestamp + updated_at: _timestamp_pb2.Timestamp + def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., s3_bucket: _Optional[str] = ..., s3_key: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class BoardingRecord(_message.Message): + __slots__ = ("id", "child_id", "bus_id", "is_boarding", "timestamp") + ID_FIELD_NUMBER: _ClassVar[int] + CHILD_ID_FIELD_NUMBER: _ClassVar[int] + BUS_ID_FIELD_NUMBER: _ClassVar[int] + IS_BOARDING_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + id: str + child_id: str + bus_id: str + is_boarding: bool + timestamp: _timestamp_pb2.Timestamp + def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., bus_id: _Optional[str] = ..., is_boarding: bool = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi new file mode 100644 index 00000000..14a7e245 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi @@ -0,0 +1,39 @@ +from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CreateStationRequest(_message.Message): + __slots__ = ("guardian_id", "longtitude", "latitude") + GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] + LONGTITUDE_FIELD_NUMBER: _ClassVar[int] + LATITUDE_FIELD_NUMBER: _ClassVar[int] + guardian_id: str + longtitude: float + latitude: float + def __init__(self, guardian_id: _Optional[str] = ..., longtitude: _Optional[float] = ..., latitude: _Optional[float] = ...) -> None: ... + +class CreateStationResponse(_message.Message): + __slots__ = ("station",) + STATION_FIELD_NUMBER: _ClassVar[int] + station: _resources_pb2.Station + def __init__(self, station: _Optional[_Union[_resources_pb2.Station, _Mapping]] = ...) -> None: ... + +class GetStationListByBusIdRequest(_message.Message): + __slots__ = ("bus_id",) + BUS_ID_FIELD_NUMBER: _ClassVar[int] + bus_id: str + def __init__(self, bus_id: _Optional[str] = ...) -> None: ... + +class GetStationListByBusIdResponse(_message.Message): + __slots__ = ("stations", "guardians", "children") + STATIONS_FIELD_NUMBER: _ClassVar[int] + GUARDIANS_FIELD_NUMBER: _ClassVar[int] + CHILDREN_FIELD_NUMBER: _ClassVar[int] + stations: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Station] + guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] + children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] + def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py index ac4de641..8f5de3a1 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py @@ -1,6 +1,8 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import grpc.experimental + from where_child_bus.v1 import station_pb2 as where__child__bus_dot_v1_dot_station__pb2 From ffece5042c7284007b9e4ccc963ca775232cd62d Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 14:49:59 +0900 Subject: [PATCH 216/771] =?UTF-8?q?chore:=20python=E3=81=AEgRPCClient?= =?UTF-8?q?=E3=82=B5=E3=83=B3=E3=83=97=E3=83=AB=E3=81=A8=E3=83=89=E3=82=AD?= =?UTF-8?q?=E3=83=A5=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/proto-gen/README.md | 18 ++++++++++++++++++ .../src/proto-gen/where_child_bus/v1/client.py | 14 ++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 machine_learning/src/proto-gen/README.md create mode 100644 machine_learning/src/proto-gen/where_child_bus/v1/client.py diff --git a/machine_learning/src/proto-gen/README.md b/machine_learning/src/proto-gen/README.md new file mode 100644 index 00000000..575ebdd8 --- /dev/null +++ b/machine_learning/src/proto-gen/README.md @@ -0,0 +1,18 @@ +# proto-gen + +`proto-gen`は、gRPC と Protocol Buffers を使用して API を定義し、Python クライアントのために生成されたコードをまとめたディレクトリです + +## クライアントの実装例 + +`where_child_bus/v1`ディレクトリ内の`client.py`に API クライアントの実装例が含まれています。このクライアントを使用して、API を介してバスに乗っている子供の位置情報を取得することができます。 + +## gRPC ファイルの修正 + +生成された`*_grpc.py`ファイルには、いくつかの場合において import 文が不足している可能性があります。この問題は、`import grpc.experimental`を追加することで解決できます。 + +### 解決方法 + +1. `*_grpc.py`ファイルを開きます。 +2. ファイルの先頭に`import grpc.experimental`を追加します。 + +これにより、不足していた import による問題が解決され、ファイルが正常に機能するようになります。 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/client.py b/machine_learning/src/proto-gen/where_child_bus/v1/client.py new file mode 100644 index 00000000..0a311882 --- /dev/null +++ b/machine_learning/src/proto-gen/where_child_bus/v1/client.py @@ -0,0 +1,14 @@ +import grpc +import health_check_pb2 +import health_check_pb2_grpc + + +ENDPOINT = 'where-child-bus-grpc-k3dkun2lpq-uw.a.run.app:443' +with grpc.secure_channel(ENDPOINT, grpc.ssl_channel_credentials()) as channel: + stub = health_check_pb2_grpc.HealthcheckServiceStub(channel) + request = health_check_pb2.PingRequest() + stub.Ping(request) + request.name = 'ping' + response = stub.Ping(request) + print(response.message) + channel.close() \ No newline at end of file From 83b3a900be43c08fdd3565606ee10d8e34b38b5b Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 13 Feb 2024 15:37:39 +0900 Subject: [PATCH 217/771] =?UTF-8?q?chore(ml):=20google-cloud-storage=20pac?= =?UTF-8?q?kage=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/pyproject.toml | 1 + machine_learning/requirements-dev.lock | 12 ++++++++++++ machine_learning/requirements.lock | 12 ++++++++++++ 3 files changed, 25 insertions(+) diff --git a/machine_learning/pyproject.toml b/machine_learning/pyproject.toml index 6453abd7..5fc80b44 100644 --- a/machine_learning/pyproject.toml +++ b/machine_learning/pyproject.toml @@ -10,6 +10,7 @@ dependencies = [ "numpy>=1.24.4", "pyyaml>=6.0.1", "tqdm>=4.66.2", + "google-cloud-storage>=2.14.0", ] readme = "README.md" requires-python = ">= 3.8" diff --git a/machine_learning/requirements-dev.lock b/machine_learning/requirements-dev.lock index 27ef6135..0d473b8f 100644 --- a/machine_learning/requirements-dev.lock +++ b/machine_learning/requirements-dev.lock @@ -7,10 +7,18 @@ # all-features: false -e file:. +cachetools==5.3.2 certifi==2024.2.2 charset-normalizer==3.3.2 filelock==3.13.1 fsspec==2024.2.0 +google-api-core==2.17.0 +google-auth==2.27.0 +google-cloud-core==2.4.1 +google-cloud-storage==2.14.0 +google-crc32c==1.5.0 +google-resumable-media==2.7.0 +googleapis-common-protos==1.62.0 idna==3.6 jinja2==3.1.3 markupsafe==2.1.5 @@ -19,8 +27,12 @@ networkx==3.2.1 numpy==1.26.4 opencv-python==4.9.0.80 pillow==10.2.0 +protobuf==4.25.2 +pyasn1==0.5.1 +pyasn1-modules==0.3.0 pyyaml==6.0.1 requests==2.31.0 +rsa==4.9 sympy==1.12 torch==2.2.0 torchvision==0.17.0 diff --git a/machine_learning/requirements.lock b/machine_learning/requirements.lock index 27ef6135..0d473b8f 100644 --- a/machine_learning/requirements.lock +++ b/machine_learning/requirements.lock @@ -7,10 +7,18 @@ # all-features: false -e file:. +cachetools==5.3.2 certifi==2024.2.2 charset-normalizer==3.3.2 filelock==3.13.1 fsspec==2024.2.0 +google-api-core==2.17.0 +google-auth==2.27.0 +google-cloud-core==2.4.1 +google-cloud-storage==2.14.0 +google-crc32c==1.5.0 +google-resumable-media==2.7.0 +googleapis-common-protos==1.62.0 idna==3.6 jinja2==3.1.3 markupsafe==2.1.5 @@ -19,8 +27,12 @@ networkx==3.2.1 numpy==1.26.4 opencv-python==4.9.0.80 pillow==10.2.0 +protobuf==4.25.2 +pyasn1==0.5.1 +pyasn1-modules==0.3.0 pyyaml==6.0.1 requests==2.31.0 +rsa==4.9 sympy==1.12 torch==2.2.0 torchvision==0.17.0 From 3b86b2aa3f299268574d7352c886fd5c06e1fd82 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 15:52:12 +0900 Subject: [PATCH 218/771] =?UTF-8?q?feat:edit=E3=83=9C=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E3=81=8B=E3=82=89=E3=81=AE=E9=81=B7=E7=A7=BB=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_child_manage_page.dart | 52 +++++++++++++++++-- .../bus_edit_page/bus_edit_page.dart | 5 +- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart index 2990f8bb..d144d55c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart @@ -1,16 +1,62 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/utils/child_list.dart'; class BusChildManagePage extends StatefulWidget { + // final List childNames; + // final List groupNames; + // final List images; - _BusChildManagePage createState() => _BusChildManagePage(); + + final List name = [ + "園児1", + "園児2", + "園児3", + "園児4", + "園児5", + ]; + final List group = [ + "1組", + "2組", + "3組", + "4組", + "5組", + ]; + final List image = [ + "1", + "2", + "1", + "1", + "2", + ]; + + // BusChildManagePage({required this.childNames, required this.groupNames, required this.images}); + + @override + _BusChildManagePage createState() => _BusChildManagePage(childNames: name, groupNames: group, images: image); } class _BusChildManagePage extends State { + final List childNames; + final List groupNames; + final List images; + _BusChildManagePage({required this.childNames, required this.groupNames, required this.images}); + @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(), - body: Container(), + appBar: pageAppBar(), + body: pageBody(), ); } + + pageAppBar() { + return AppBar( + title: const Text("子供の管理"), + backgroundColor: Colors.white, + ); + } + + Widget pageBody() { + return ChildList(childNames: childNames, groupNames: groupNames, images: images); + } } \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index e75143f9..4082b37c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; @@ -106,7 +107,9 @@ class _BusEditPage extends State { padding: const EdgeInsets.all(10), child: ElevatedButton( onPressed: () { - + Navigator.push( + context,MaterialPageRoute(builder: (context) => BusChildManagePage()) + ); }, child: const Text("バスに乗車する子供を変更"), ), From 6d1c7ae545b5f2901ab3d93fe212912883aafb11 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 13 Feb 2024 15:53:49 +0900 Subject: [PATCH 219/771] =?UTF-8?q?chore(ml):=20service=5Faccount.json?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machine_learning/.gitignore b/machine_learning/.gitignore index c6c7625a..b1662f4c 100644 --- a/machine_learning/.gitignore +++ b/machine_learning/.gitignore @@ -1,6 +1,8 @@ # Created by https://www.toptal.com/developers/gitignore/api/macos,python,visualstudiocode # Edit at https://www.toptal.com/developers/gitignore?templates=macos,python,visualstudiocode +service_account_where_child_bus.json + ### macOS ### # General .DS_Store From f927f668901fa459f543c0dfa07818d582822599 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 13 Feb 2024 16:23:49 +0900 Subject: [PATCH 220/771] =?UTF-8?q?feat(ml):=20GCS=E3=81=B8=E3=81=AE?= =?UTF-8?q?=E6=8E=A5=E7=B6=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/detectFaceAndClip.py | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py index 109467df..e01c24b1 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -66,12 +66,29 @@ def main(args): file_path = os.path.join(save_dir, file) if os.path.isfile(file_path): os.remove(file_path) + elif args.env == "remote": + from google.oauth2 import service_account + import google.cloud.storage as gcs + + key_path = "service_account_where_child_bus.json" + credential = service_account.Credentials.from_service_account_file(key_path) + + # TODO: 保育園のIDと写真のIDを指定して、その写真を取得する + PROJECT_ID = "wherechildbus" + BUCKET_NAME = "where_child_bus_photo_bucket" + SOURCE_BLOB_NAME = "00001/" + + client = gcs.Client(PROJECT_ID, credentials=credential) + logger.info("get client success!") + # bucket = client.get_bucket(BUCKET_NAME) + # blob = bucket.blob(SOURCE_BLOB_NAME) + [print(file.name) for file in client.list_blobs(BUCKET_NAME)] + exit() # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) # 画像の読み込み - # TODO: 良い感じのlog for target_people_name in os.listdir(image_dir_path): logger.info(f"processing... : {target_people_name}") detect_face_num = 0 @@ -107,6 +124,9 @@ def main(args): save_file_name = f"{target_people_name}-{detect_face_num}.png" save_face(clipped_face, save_dir, save_file_name) detect_face_num += 1 + if args.env == "remote": + # TODO: GCSに保存するprocess + pass logger.info("Done") From b96c2da42a0e18d16e453e65efbf487f21c4701b Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 16:36:12 +0900 Subject: [PATCH 221/771] =?UTF-8?q?refactor:=E5=85=A5=E5=8A=9B=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=A0=E3=82=92=E3=82=AF=E3=83=A9=E3=82=B9?= =?UTF-8?q?=E3=81=AB=E5=88=86=E5=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/utils/input_form_body.dart | 119 ++++++++++++++ .../components/utils/select_value_box.dart | 31 ++++ .../components/utils/text_input_field.dart | 27 ++++ .../student_list_page/student_edit_page.dart | 145 +----------------- 4 files changed, 182 insertions(+), 140 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart create mode 100644 frontend/where_child_bus/lib/pages/student_list_page/components/utils/select_value_box.dart create mode 100644 frontend/where_child_bus/lib/pages/student_list_page/components/utils/text_input_field.dart diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart new file mode 100644 index 00000000..eaa6313a --- /dev/null +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -0,0 +1,119 @@ +import 'dart:io'; +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; +import 'input_value_label.dart'; +import 'text_input_field.dart'; +import 'select_value_box.dart'; +import 'submit_button.dart'; + +class InputFormBody extends StatefulWidget { + final List busName; + final List busStop; + + const InputFormBody( + {required this.busName, required this.busStop, super.key}); + + @override + State createState() => _InputFormBody(); +} + +class _InputFormBody extends State { + List? images; + final picker = ImagePicker(); + + Future getImageFromGallery() async { + final pickedFiles = await picker.pickMultiImage(); + + setState(() { + if (pickedFiles != null && pickedFiles.isNotEmpty) { + images = pickedFiles.map((xFile) => File(xFile.path)).toList(); + } else { + print("画像が選択できませんでした。"); + } + }); + } + + @override + Widget build(BuildContext context) { + return Center( + child: ListView( + children: [ + selectChildImage(), + editFormBody(context), + ], + )); + } + + Widget selectChildImage() { + return Column( + children: [ + Wrap( + spacing: 8.0, + runSpacing: 4.0, + children: images == null || images!.isEmpty + ? [const Text("画像が選択されていません。")] + : images! + .map((image) => Image.file( + image, + width: 100, + height: 100, + )) + .toList(), + ), + Center( + child: ElevatedButton( + onPressed: getImageFromGallery, + child: const Text("画像を選択する"), + )) + ], + ); + } + + Widget editFormBody(BuildContext context) { + return Column( + children: [ + inputLabelAndTextField( + context, "園児氏名", "園児氏名を入力してください", TextInputType.name), + inputLabelAndTextField( + context, "年齢", "年齢を入力してください", TextInputType.number), + inputLabelAndTextField( + context, "保護者氏名", "保護者氏名を入力してください", TextInputType.name), + inputLabelAndTextField( + context, "保護者連絡先", "保護者連絡先を入力してください", TextInputType.phone), + inputLabelAndSelectBox(context, "利用バス", widget.busName), + inputLabelAndSelectBox(context, "乗降場所", widget.busStop), + Container( + margin: const EdgeInsets.only(top: 20.0), + width: MediaQuery.of(context).size.width * 0.6, + child: submitButton(), + ) + ], + ); + } + + Widget inputLabelAndTextField( + BuildContext context, String label, String hintText, TextInputType type) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InputValueLabel(label: label), + TextInputField(hintText: hintText, type: type) + ], + ); + } + + Widget inputLabelAndSelectBox( + BuildContext context, String label, List lists) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InputValueLabel(label: label), + SelectValueBox(lists: lists), + ], + ); + } + + Widget submitButton() { + return SubmitButton(onPressed: () {}); + } +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/select_value_box.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/select_value_box.dart new file mode 100644 index 00000000..b0b4b5da --- /dev/null +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/select_value_box.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; + +class SelectValueBox extends StatefulWidget { + final List lists; + + const SelectValueBox({required this.lists, super.key}); + @override + State createState() => _SelectValueBox(); +} + +class _SelectValueBox extends State { + @override + Widget build(BuildContext context) { + String? selectedValue; + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 50, + child: DropdownButton( + value: selectedValue ?? widget.lists.first, + items: widget.lists + .map((String list) => + DropdownMenuItem(value: list, child: Text(list))) + .toList(), + onChanged: (String? value) { + setState(() { + selectedValue = value; + }); + }), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/text_input_field.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/text_input_field.dart new file mode 100644 index 00000000..f5f6651c --- /dev/null +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/text_input_field.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; + +class TextInputField extends StatelessWidget { + final String hintText; + final TextInputType type; + + const TextInputField({required this.hintText, required this.type, super.key}); + + @override + Widget build(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 40, + child: TextField( + decoration: formInputDecoration(hintText), + keyboardType: type, + )); + } + + InputDecoration formInputDecoration(String hintText) { + return InputDecoration( + hintText: hintText, + hintStyle: const TextStyle(fontSize: 13), + border: const OutlineInputBorder(), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index 5ab77c03..4d73ef62 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -1,8 +1,6 @@ import 'dart:io'; import 'package:flutter/material.dart'; -import 'package:image_picker/image_picker.dart'; -import 'components/utils/input_value_label.dart'; -import 'components/utils/submit_button.dart'; +import 'components/utils/input_form_body.dart'; class StudentEditPage extends StatefulWidget { const StudentEditPage({super.key}); @@ -12,24 +10,9 @@ class StudentEditPage extends StatefulWidget { } class _StudentEditPageState extends State { - List? images; - final picker = ImagePicker(); - final List busName = ["バス1", "バス2", "バス3"]; final List busStop = ["停留所1", "停留所2", "停留所3"]; - Future getImageFromGallery() async { - final pickedFiles = await picker.pickMultiImage(); - - setState(() { - if (pickedFiles != null && pickedFiles.isNotEmpty) { - images = pickedFiles.map((xFile) => File(xFile.path)).toList(); - } else { - print("画像が選択できませんでした。"); - } - }); - } - @override Widget build(BuildContext context) { return GestureDetector( @@ -37,129 +20,11 @@ class _StudentEditPageState extends State { child: Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar(), - body: pageBody(context), - ), - ); - } - - Widget pageBody(BuildContext context) { - return Center( - child: ListView( - children: [ - selectChildImage(), - editFormBody(context), - ], - )); - } - - Widget selectChildImage() { - return Column( - children: [ - Wrap( - spacing: 8.0, - runSpacing: 4.0, - children: images == null || images!.isEmpty - ? [const Text("画像が選択されていません。")] - : images! - .map((image) => Image.file( - image, - width: 100, - height: 100, - )) - .toList(), + body: InputFormBody( + busName: busName, + busStop: busStop, ), - Center( - child: ElevatedButton( - onPressed: getImageFromGallery, - child: const Text("画像を選択する"), - )) - ], - ); - } - - Widget editFormBody(BuildContext context) { - return Column( - children: [ - inputLabelAndTextField( - context, "園児氏名", "園児氏名を入力してください", TextInputType.name), - inputLabelAndTextField( - context, "年齢", "年齢を入力してください", TextInputType.number), - inputLabelAndTextField( - context, "保護者氏名", "保護者氏名を入力してください", TextInputType.name), - inputLabelAndTextField( - context, "保護者連絡先", "保護者連絡先を入力してください", TextInputType.phone), - inputLabelAndSelectBox(context, "利用バス", busName), - inputLabelAndSelectBox(context, "乗降場所", busStop), - Container( - margin: const EdgeInsets.only(top: 20.0), - width: MediaQuery.of(context).size.width * 0.6, - child: submitButton(), - ) - ], - ); - } - - Widget inputLabelAndTextField( - BuildContext context, String label, String hintText, TextInputType type) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - InputValueLabel(label: label), - textInputField(context, hintText, type) - ], - ); - } - - Widget inputLabelAndSelectBox( - BuildContext context, String label, List lists) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - InputValueLabel(label: label), - selectValueBox(context, lists), - ], - ); - } - - Widget textInputField( - BuildContext context, String hintText, TextInputType type) { - return SizedBox( - width: MediaQuery.of(context).size.width * 0.8, - height: 40, - child: TextField( - decoration: formInputDecoration(hintText), - keyboardType: type, - )); - } - - InputDecoration formInputDecoration(String hintText) { - return InputDecoration( - hintText: hintText, - hintStyle: const TextStyle(fontSize: 13), - border: const OutlineInputBorder(), - ); - } - - Widget selectValueBox(BuildContext context, List lists) { - String? selectedValue; - return SizedBox( - width: MediaQuery.of(context).size.width * 0.8, - height: 50, - child: DropdownButton( - value: selectedValue ?? lists.first, - items: lists - .map((String list) => - DropdownMenuItem(value: list, child: Text(list))) - .toList(), - onChanged: (String? value) { - setState(() { - selectedValue = value; - }); - }), + ), ); } - - Widget submitButton() { - return SubmitButton(onPressed: () {}); - } } From 61018cbb069f56b78ed1b13efbcc9359457a329a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 17:34:30 +0900 Subject: [PATCH 222/771] =?UTF-8?q?refactor:ChildList=E3=82=AF=E3=83=A9?= =?UTF-8?q?=E3=82=B9=E3=82=92=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/child_list.dart | 102 +++++++++--------- .../components/utils/child_list_element.dart | 78 ++++++++++++++ 2 files changed, 127 insertions(+), 53 deletions(-) create mode 100644 frontend/where_child_bus/lib/components/utils/child_list_element.dart diff --git a/frontend/where_child_bus/lib/components/utils/child_list.dart b/frontend/where_child_bus/lib/components/utils/child_list.dart index 6bafdc01..9a49c345 100644 --- a/frontend/where_child_bus/lib/components/utils/child_list.dart +++ b/frontend/where_child_bus/lib/components/utils/child_list.dart @@ -1,4 +1,5 @@ import "package:flutter/material.dart"; +import "package:where_child_bus/components/utils/child_list_element.dart"; class ChildList extends StatelessWidget { final List childNames; @@ -14,75 +15,70 @@ class ChildList extends StatelessWidget { return childCardListBuilder(screenSize); } - //TODO: 将来的にはAPIからデータを取得する。 Widget childCardListBuilder(Size screenSize) { return ListView.separated( - itemCount: childNames.length, - separatorBuilder: (BuildContext context, int index) { - return const Divider( - height: 20, - color: Colors.transparent, - ); - }, - itemBuilder: (BuildContext context, int index) { - return childCardListInner(index, screenSize); - } + itemCount: childNames.length, + separatorBuilder: (BuildContext context, int index) { + return const Divider( + height: 20, + color: Colors.transparent, + ); + }, + itemBuilder: (BuildContext context, int index) { + return ChildListElement( + childName: childNames[index], + groupName: groupNames[index], + image: images[index], + screenSize: screenSize, + onTap: callback, + ); + } ); } - Widget childCardListInner(int index, Size screenSize) { + Widget childCardListInner(String childName, String groupName, String image, Size screenSize) { return FractionallySizedBox( widthFactor: 0.8, child: InkWell( - onTap: () {}, - child: childCard(index, screenSize), + onTap: callback, + child: childCard(childName, groupName, image, screenSize), )); } - //TODO: Child型を受け取る - Widget childCard(int index, Size screenSize) { + Widget childCard(String childName, String groupName, String image, Size screenSize) { return Card( - color: Colors.white, - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Row(children: [ - childFaceImage(index), - SizedBox( - width: screenSize.width * 0.05, - ), - childNameAndGroupName(index), - ] - ) - ) - ); + color: Colors.white, + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row(children: [ + childFaceImage(image), + SizedBox( + width: screenSize.width * 0.05, + ), + childNameAndGroupName(childName, groupName), + ]) + ) + ); } - Widget childFaceImage(int index) { + Widget childFaceImage(String image) { return SizedBox( - width: 100, - height: 100, - child: Image.asset("assets/images/face_${images[index]}.png")); + width: 100, + height: 100, + child: Image.asset("assets/images/face_$image.png"), + ); } - Widget childNameAndGroupName(int index) { + Widget childNameAndGroupName(String childName, String groupName) { return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(childNames[index], - style: const TextStyle(color: Colors.black, fontSize: 24)), - Text( - groupNames[index], - style: const TextStyle(color: Colors.black), - ), - busStopName(), - ]); - } - - //TODO: 引数に停留所名を加える。 - Widget busStopName() { - return const Row(children: [ - Icon(Icons.location_on), - Text("停留所名"), - ]); + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(childName, + style: const TextStyle(color: Colors.black, fontSize: 24)), + Text( + groupName, + style: const TextStyle(color: Colors.black), + ), + ]); } -} \ No newline at end of file +} diff --git a/frontend/where_child_bus/lib/components/utils/child_list_element.dart b/frontend/where_child_bus/lib/components/utils/child_list_element.dart new file mode 100644 index 00000000..3e40639b --- /dev/null +++ b/frontend/where_child_bus/lib/components/utils/child_list_element.dart @@ -0,0 +1,78 @@ +import 'package:flutter/material.dart'; + +class ChildListElement extends StatelessWidget { + final String childName; + final String groupName; + final String image; + final Size screenSize; + final VoidCallback? onTap; + + const ChildListElement({ + Key? key, + required this.childName, + required this.groupName, + required this.image, + required this.screenSize, + this.onTap, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return FractionallySizedBox( + widthFactor: 0.8, + child: InkWell( + onTap: onTap, + child: Card( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row(children: [ + ChildImage(image: image), + SizedBox(width: screenSize.width * 0.05), + ChildDetails(childName: childName, groupName: groupName), + ]), + ), + ), + ), + ); + } +} + +class ChildImage extends StatelessWidget { + final String image; + + const ChildImage({Key? key, required this.image}) : super(key: key); + + @override + Widget build(BuildContext context) { + return SizedBox( + width: 100, + height: 100, + child: Image.asset("assets/images/face_$image.png"), + ); + } +} + +class ChildDetails extends StatelessWidget { + final String childName; + final String groupName; + + const ChildDetails({Key? key, required this.childName, required this.groupName}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + childName, + style: const TextStyle(color: Colors.black, fontSize: 24), + ), + Text( + groupName, + style: const TextStyle(color: Colors.black), + ), + ], + ); + } +} From cca07edeb4f69d0b44363ca3f6dfda0d07341084 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 17:44:05 +0900 Subject: [PATCH 223/771] =?UTF-8?q?chore:=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E4=BD=8D=E7=BD=AE=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/child_list/child_list.dart | 38 +++++++++ .../child_list_element.dart | 42 +++++++--- .../child_list_element_with_button.dart | 42 ++++++++++ .../child_list/child_manage_list.dart | 0 .../lib/components/utils/child_list.dart | 84 ------------------- 5 files changed, 111 insertions(+), 95 deletions(-) create mode 100644 frontend/where_child_bus/lib/components/child_list/child_list.dart rename frontend/where_child_bus/lib/components/{utils => child_list}/child_list_element.dart (65%) create mode 100644 frontend/where_child_bus/lib/components/child_list/child_list_element_with_button.dart create mode 100644 frontend/where_child_bus/lib/components/child_list/child_manage_list.dart delete mode 100644 frontend/where_child_bus/lib/components/utils/child_list.dart diff --git a/frontend/where_child_bus/lib/components/child_list/child_list.dart b/frontend/where_child_bus/lib/components/child_list/child_list.dart new file mode 100644 index 00000000..bad417e2 --- /dev/null +++ b/frontend/where_child_bus/lib/components/child_list/child_list.dart @@ -0,0 +1,38 @@ +import "package:flutter/material.dart"; +import 'package:where_child_bus/components/child_list/child_list_element.dart'; + +class ChildList extends StatelessWidget { + final List childNames; + final List groupNames; + final List images; + final VoidCallback? callback; + + ChildList({required this.childNames, required this.groupNames, required this.images, this.callback}); + + @override + Widget build(BuildContext context) { + Size screenSize = MediaQuery.of(context).size; + return childCardListBuilder(screenSize); + } + + Widget childCardListBuilder(Size screenSize) { + return ListView.separated( + itemCount: childNames.length, + separatorBuilder: (BuildContext context, int index) { + return const Divider( + height: 20, + color: Colors.transparent, + ); + }, + itemBuilder: (BuildContext context, int index) { + return ChildListElement( + childName: childNames[index], + groupName: groupNames[index], + image: images[index], + screenSize: screenSize, + onTap: callback, + ); + } + ); + } +} diff --git a/frontend/where_child_bus/lib/components/utils/child_list_element.dart b/frontend/where_child_bus/lib/components/child_list/child_list_element.dart similarity index 65% rename from frontend/where_child_bus/lib/components/utils/child_list_element.dart rename to frontend/where_child_bus/lib/components/child_list/child_list_element.dart index 3e40639b..f6a73b40 100644 --- a/frontend/where_child_bus/lib/components/utils/child_list_element.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list_element.dart @@ -22,17 +22,37 @@ class ChildListElement extends StatelessWidget { widthFactor: 0.8, child: InkWell( onTap: onTap, - child: Card( - color: Colors.white, - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Row(children: [ - ChildImage(image: image), - SizedBox(width: screenSize.width * 0.05), - ChildDetails(childName: childName, groupName: groupName), - ]), - ), - ), + child: ChildCard(image: image, screenSize: screenSize, childName: childName, groupName: groupName), + ), + ); + } +} + +class ChildCard extends StatelessWidget { + const ChildCard({ + super.key, + required this.image, + required this.screenSize, + required this.childName, + required this.groupName, + }); + + final String image; + final Size screenSize; + final String childName; + final String groupName; + + @override + Widget build(BuildContext context) { + return Card( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row(children: [ + ChildImage(image: image), + SizedBox(width: screenSize.width * 0.05), + ChildDetails(childName: childName, groupName: groupName), + ]), ), ); } diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_element_with_button.dart b/frontend/where_child_bus/lib/components/child_list/child_list_element_with_button.dart new file mode 100644 index 00000000..d9b495db --- /dev/null +++ b/frontend/where_child_bus/lib/components/child_list/child_list_element_with_button.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/child_list/child_list_element.dart'; + +// ChildListElementWithButtonクラスの定義 +class ChildListElementWithButton extends ChildListElement { + final VoidCallback? onButtonTap; + + const ChildListElementWithButton({ + Key? key, + required String childName, + required String groupName, + required String image, + required Size screenSize, + VoidCallback? onTap, + this.onButtonTap, + }) : super( + key: key, + childName: childName, + groupName: groupName, + image: image, + screenSize: screenSize, + onTap: onTap, + ); + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + super.build(context), // 親クラスのbuildメソッドを呼び出す + Positioned( + right: 10, + bottom: 10, + child: FloatingActionButton( + mini: true, + child: Icon(Icons.edit), + onPressed: onButtonTap, + ), + ), + ], + ); + } +} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/components/child_list/child_manage_list.dart b/frontend/where_child_bus/lib/components/child_list/child_manage_list.dart new file mode 100644 index 00000000..e69de29b diff --git a/frontend/where_child_bus/lib/components/utils/child_list.dart b/frontend/where_child_bus/lib/components/utils/child_list.dart deleted file mode 100644 index 9a49c345..00000000 --- a/frontend/where_child_bus/lib/components/utils/child_list.dart +++ /dev/null @@ -1,84 +0,0 @@ -import "package:flutter/material.dart"; -import "package:where_child_bus/components/utils/child_list_element.dart"; - -class ChildList extends StatelessWidget { - final List childNames; - final List groupNames; - final List images; - final VoidCallback? callback; - - ChildList({required this.childNames, required this.groupNames, required this.images, this.callback}); - - @override - Widget build(BuildContext context) { - Size screenSize = MediaQuery.of(context).size; - return childCardListBuilder(screenSize); - } - - Widget childCardListBuilder(Size screenSize) { - return ListView.separated( - itemCount: childNames.length, - separatorBuilder: (BuildContext context, int index) { - return const Divider( - height: 20, - color: Colors.transparent, - ); - }, - itemBuilder: (BuildContext context, int index) { - return ChildListElement( - childName: childNames[index], - groupName: groupNames[index], - image: images[index], - screenSize: screenSize, - onTap: callback, - ); - } - ); - } - - Widget childCardListInner(String childName, String groupName, String image, Size screenSize) { - return FractionallySizedBox( - widthFactor: 0.8, - child: InkWell( - onTap: callback, - child: childCard(childName, groupName, image, screenSize), - )); - } - - Widget childCard(String childName, String groupName, String image, Size screenSize) { - return Card( - color: Colors.white, - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Row(children: [ - childFaceImage(image), - SizedBox( - width: screenSize.width * 0.05, - ), - childNameAndGroupName(childName, groupName), - ]) - ) - ); - } - - Widget childFaceImage(String image) { - return SizedBox( - width: 100, - height: 100, - child: Image.asset("assets/images/face_$image.png"), - ); - } - - Widget childNameAndGroupName(String childName, String groupName) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(childName, - style: const TextStyle(color: Colors.black, fontSize: 24)), - Text( - groupName, - style: const TextStyle(color: Colors.black), - ), - ]); - } -} From 3b333df9a9970c315fbc41a6976887f78ea8ce19 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 18:15:23 +0900 Subject: [PATCH 224/771] =?UTF-8?q?feat:=E4=B9=97=E8=BB=8A=E6=9C=89?= =?UTF-8?q?=E7=84=A1=E3=82=92=E7=99=BB=E9=8C=B2=E3=81=99=E3=82=8B=E3=83=9C?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/check_page/check_page.dart | 39 ++++++++++++++++--- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index c8b766cf..d130abe1 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -8,16 +8,43 @@ class CheckPage extends StatefulWidget { } class _CheckPageState extends State { + bool isRideBus = true; + @override Widget build(BuildContext context) { - return const Center( + return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - '乗車確認', - ), - ], + children: [isRideBusToggleButton()], + ), + ); + } + + Widget isRideBusToggleButton() { + return Column( + children: [ + toggleButtonBody("乗る", true), + const SizedBox(height: 20), + toggleButtonBody("乗らない", false), + ], + ); + } + + Widget toggleButtonBody(String text, bool isRide) { + return SizedBox( + width: 200, + height: 50, + child: ElevatedButton( + onPressed: () { + setState(() { + isRideBus = isRide; + }); + }, + style: ElevatedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(5))), + ), + child: Text(text), ), ); } From 34c56f064cc7e16548e7f8beb078156f19634f4b Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 18:28:37 +0900 Subject: [PATCH 225/771] =?UTF-8?q?feat:=E7=8F=BE=E5=9C=A8=E6=99=82?= =?UTF-8?q?=E5=88=BB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/check_page/check_page.dart | 14 ++++--- .../components/utils/current_time_body.dart | 14 +++++++ .../components/utils/current_time_widget.dart | 41 +++++++++++++++++++ 3 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart create mode 100644 frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_widget.dart diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index d130abe1..3feebc8d 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import '../components/utils/current_time_body.dart'; class CheckPage extends StatefulWidget { const CheckPage({super.key}); @@ -15,22 +16,25 @@ class _CheckPageState extends State { return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: [isRideBusToggleButton()], + children: [ + CurrentTimeBody(), + toggleButtonBody(), + ], ), ); } - Widget isRideBusToggleButton() { + Widget toggleButtonBody() { return Column( children: [ - toggleButtonBody("乗る", true), + isRideBusToggleButtonBody("乗る", true), const SizedBox(height: 20), - toggleButtonBody("乗らない", false), + isRideBusToggleButtonBody("乗らない", false), ], ); } - Widget toggleButtonBody(String text, bool isRide) { + Widget isRideBusToggleButtonBody(String text, bool isRide) { return SizedBox( width: 200, height: 50, diff --git a/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart b/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart new file mode 100644 index 00000000..393f8b5d --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart @@ -0,0 +1,14 @@ +import 'package:flutter/material.dart'; +import 'current_time_widget.dart'; + +class CurrentTimeBody extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Column( + children: [ + const Text("現在時刻"), + CurrentTimeWidget(), + ], + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_widget.dart b/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_widget.dart new file mode 100644 index 00000000..cf33b26a --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_widget.dart @@ -0,0 +1,41 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; + +class CurrentTimeWidget extends StatefulWidget { + @override + State createState() => _CurrentTimeWidgetState(); +} + +class _CurrentTimeWidgetState extends State { + Timer? _timer; + String _currentTime = ''; + + @override + void initState() { + super.initState(); + _updateTime(); + _timer = Timer.periodic(Duration(seconds: 1), (Timer t) => _updateTime()); + } + + void _updateTime() { + setState(() { + final now = DateTime.now(); + _currentTime = + '${now.hour.toString().padLeft(2, '0')}:${now.minute.toString().padLeft(2, '0')}'; + }); + } + + @override + void dispose() { + _timer?.cancel(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Text( + _currentTime, + style: const TextStyle(fontSize: 50), + ); + } +} From 542e96a3d41416cd53553c71de527c087deebd67 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 18:39:14 +0900 Subject: [PATCH 226/771] =?UTF-8?q?feat:=E3=83=9C=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E6=8A=BC=E4=B8=8B=E6=99=82=E3=81=AB=E8=83=8C=E6=99=AF=E8=89=B2?= =?UTF-8?q?=E3=81=8C=E5=A4=89=E5=8C=96=E3=81=99=E3=82=8B=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/check_page/check_page.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index 3feebc8d..3f90e239 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -45,6 +45,7 @@ class _CheckPageState extends State { }); }, style: ElevatedButton.styleFrom( + backgroundColor: isRideBus != isRide ? Colors.grey : null, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(5))), ), From a9e5499ac1132a72843d942071fbc9aea3ad84c7 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 18:55:05 +0900 Subject: [PATCH 227/771] =?UTF-8?q?update:=E8=A6=81=E7=B4=A0=E3=81=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/check_page/check_page.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index 3f90e239..e7f1656c 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -15,9 +15,12 @@ class _CheckPageState extends State { Widget build(BuildContext context) { return Center( child: Column( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, children: [ CurrentTimeBody(), + const SizedBox( + height: 50, + ), toggleButtonBody(), ], ), @@ -27,6 +30,11 @@ class _CheckPageState extends State { Widget toggleButtonBody() { return Column( children: [ + const Text( + "本日の乗車予定", + style: TextStyle(fontSize: 16), + ), + const SizedBox(height: 20), isRideBusToggleButtonBody("乗る", true), const SizedBox(height: 20), isRideBusToggleButtonBody("乗らない", false), From b03649ddfbe8945f333713821d10bc60a8f07e25 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 18:58:44 +0900 Subject: [PATCH 228/771] =?UTF-8?q?change:=E3=83=95=E3=82=A9=E3=83=B3?= =?UTF-8?q?=E3=81=9F=E3=82=B5=E3=82=A4=E3=82=BA=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/check_page/check_page.dart | 3 ++- .../lib/pages/components/utils/current_time_body.dart | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index e7f1656c..e84f5839 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -32,7 +32,7 @@ class _CheckPageState extends State { children: [ const Text( "本日の乗車予定", - style: TextStyle(fontSize: 16), + style: TextStyle(fontSize: 20), ), const SizedBox(height: 20), isRideBusToggleButtonBody("乗る", true), @@ -53,6 +53,7 @@ class _CheckPageState extends State { }); }, style: ElevatedButton.styleFrom( + textStyle: TextStyle(fontSize: 20), backgroundColor: isRideBus != isRide ? Colors.grey : null, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(5))), diff --git a/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart b/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart index 393f8b5d..7b6838ea 100644 --- a/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart @@ -6,7 +6,10 @@ class CurrentTimeBody extends StatelessWidget { Widget build(BuildContext context) { return Column( children: [ - const Text("現在時刻"), + const Text( + "現在時刻", + style: TextStyle(fontSize: 20), + ), CurrentTimeWidget(), ], ); From 7e610b5fc3f39fb0674e366d7c0e813da395109b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 19:18:34 +0900 Subject: [PATCH 229/771] =?UTF-8?q?feat:=E5=AD=90=E4=BE=9B=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AB=E3=83=9C=E3=82=BF?= =?UTF-8?q?=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/child_list/child_list.dart | 51 +++++----- .../child_list/child_list_element.dart | 98 ------------------- .../child_list_element_with_button.dart | 42 -------- .../child_list/child_list_with_button.dart | 80 +++++++++++++++ .../child_list/child_manage_list.dart | 0 .../element/child_list_element.dart | 48 +++++++++ .../bus_child_manage_page.dart | 63 ++++++------ 7 files changed, 187 insertions(+), 195 deletions(-) delete mode 100644 frontend/where_child_bus/lib/components/child_list/child_list_element.dart delete mode 100644 frontend/where_child_bus/lib/components/child_list/child_list_element_with_button.dart create mode 100644 frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart delete mode 100644 frontend/where_child_bus/lib/components/child_list/child_manage_list.dart create mode 100644 frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart diff --git a/frontend/where_child_bus/lib/components/child_list/child_list.dart b/frontend/where_child_bus/lib/components/child_list/child_list.dart index bad417e2..8aed5b91 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list.dart @@ -1,38 +1,41 @@ -import "package:flutter/material.dart"; -import 'package:where_child_bus/components/child_list/child_list_element.dart'; +import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; -class ChildList extends StatelessWidget { +class ChildList extends StatefulWidget { final List childNames; final List groupNames; final List images; final VoidCallback? callback; - ChildList({required this.childNames, required this.groupNames, required this.images, this.callback}); + const ChildList({ + Key? key, + required this.childNames, + required this.groupNames, + required this.images, + this.callback, + }) : super(key: key); + @override + _ChildListState createState() => _ChildListState(); +} + +class _ChildListState extends State { @override Widget build(BuildContext context) { - Size screenSize = MediaQuery.of(context).size; - return childCardListBuilder(screenSize); + return ListView.separated( + itemCount: widget.childNames.length, + separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), + itemBuilder: (BuildContext context, int index) => childListElement(context, index), + ); } - Widget childCardListBuilder(Size screenSize) { - return ListView.separated( - itemCount: childNames.length, - separatorBuilder: (BuildContext context, int index) { - return const Divider( - height: 20, - color: Colors.transparent, - ); - }, - itemBuilder: (BuildContext context, int index) { - return ChildListElement( - childName: childNames[index], - groupName: groupNames[index], - image: images[index], - screenSize: screenSize, - onTap: callback, - ); - } + Widget childListElement(BuildContext context, int index) { + return ChildListElement( + title: widget.childNames[index], + subtitle: widget.groupNames[index], + imagePath: "assets/images/face_${widget.images[index]}.png", + onTap: widget.callback, + // actionButton: ここに任意のアクションボタンウィジェットを追加可能 ); } } diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_element.dart b/frontend/where_child_bus/lib/components/child_list/child_list_element.dart deleted file mode 100644 index f6a73b40..00000000 --- a/frontend/where_child_bus/lib/components/child_list/child_list_element.dart +++ /dev/null @@ -1,98 +0,0 @@ -import 'package:flutter/material.dart'; - -class ChildListElement extends StatelessWidget { - final String childName; - final String groupName; - final String image; - final Size screenSize; - final VoidCallback? onTap; - - const ChildListElement({ - Key? key, - required this.childName, - required this.groupName, - required this.image, - required this.screenSize, - this.onTap, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - return FractionallySizedBox( - widthFactor: 0.8, - child: InkWell( - onTap: onTap, - child: ChildCard(image: image, screenSize: screenSize, childName: childName, groupName: groupName), - ), - ); - } -} - -class ChildCard extends StatelessWidget { - const ChildCard({ - super.key, - required this.image, - required this.screenSize, - required this.childName, - required this.groupName, - }); - - final String image; - final Size screenSize; - final String childName; - final String groupName; - - @override - Widget build(BuildContext context) { - return Card( - color: Colors.white, - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Row(children: [ - ChildImage(image: image), - SizedBox(width: screenSize.width * 0.05), - ChildDetails(childName: childName, groupName: groupName), - ]), - ), - ); - } -} - -class ChildImage extends StatelessWidget { - final String image; - - const ChildImage({Key? key, required this.image}) : super(key: key); - - @override - Widget build(BuildContext context) { - return SizedBox( - width: 100, - height: 100, - child: Image.asset("assets/images/face_$image.png"), - ); - } -} - -class ChildDetails extends StatelessWidget { - final String childName; - final String groupName; - - const ChildDetails({Key? key, required this.childName, required this.groupName}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - childName, - style: const TextStyle(color: Colors.black, fontSize: 24), - ), - Text( - groupName, - style: const TextStyle(color: Colors.black), - ), - ], - ); - } -} diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_element_with_button.dart b/frontend/where_child_bus/lib/components/child_list/child_list_element_with_button.dart deleted file mode 100644 index d9b495db..00000000 --- a/frontend/where_child_bus/lib/components/child_list/child_list_element_with_button.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:where_child_bus/components/child_list/child_list_element.dart'; - -// ChildListElementWithButtonクラスの定義 -class ChildListElementWithButton extends ChildListElement { - final VoidCallback? onButtonTap; - - const ChildListElementWithButton({ - Key? key, - required String childName, - required String groupName, - required String image, - required Size screenSize, - VoidCallback? onTap, - this.onButtonTap, - }) : super( - key: key, - childName: childName, - groupName: groupName, - image: image, - screenSize: screenSize, - onTap: onTap, - ); - - @override - Widget build(BuildContext context) { - return Stack( - children: [ - super.build(context), // 親クラスのbuildメソッドを呼び出す - Positioned( - right: 10, - bottom: 10, - child: FloatingActionButton( - mini: true, - child: Icon(Icons.edit), - onPressed: onButtonTap, - ), - ), - ], - ); - } -} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart b/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart new file mode 100644 index 00000000..dbbfde5e --- /dev/null +++ b/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart @@ -0,0 +1,80 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; + +enum ButtonIconType { add, remove } + +class ChildListWithButton extends StatefulWidget { + final List childNames; + final List groupNames; + final List images; + final List buttonIconTypes; // 各アイテムのボタンアイコンタイプ + final VoidCallback? callback; + + ChildListWithButton({ + Key? key, + required this.childNames, + required this.groupNames, + required this.images, + required this.buttonIconTypes, // コンストラクタでボタンアイコンタイプを受け取る + this.callback, + }) : super(key: key); + + @override + _ChildListWithButtonState createState() => _ChildListWithButtonState(); +} + +class _ChildListWithButtonState extends State { + @override + Widget build(BuildContext context) { + return ListView.separated( + itemCount: widget.childNames.length, + separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), + itemBuilder: (BuildContext context, int index) => ChildListElementWithButton(widget: widget, context: context, index: index), + ); + } +} + +class ChildListElementWithButton extends StatelessWidget { + const ChildListElementWithButton({ + super.key, + required this.widget, + required this.context, + required this.index, + }); + + final ChildListWithButton widget; + final BuildContext context; + final int index; + + @override + Widget build(BuildContext context) { + // 各アイテムに対応するボタンアイコンタイプを取得 + ButtonIconType buttonIconType = widget.buttonIconTypes[index]; + + return Padding( + padding: const EdgeInsets.all(10), + child: Stack( + children: [ + ChildListElement( + title: widget.childNames[index], + subtitle: widget.groupNames[index], + imagePath: "assets/images/face_${widget.images[index]}.png", + onTap: widget.callback, + ), + Positioned( + right: 4, + bottom: 4, + child: IconButton( + icon: Icon(buttonIconType == ButtonIconType.add ? Icons.add : Icons.remove), + onPressed: () { + // ここにボタンタップ時のアクションを実装 + }, + color: Theme.of(context).primaryColor, + iconSize: 24.0, + ), + ), + ], + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/components/child_list/child_manage_list.dart b/frontend/where_child_bus/lib/components/child_list/child_manage_list.dart deleted file mode 100644 index e69de29b..00000000 diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart new file mode 100644 index 00000000..d44e4fdc --- /dev/null +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart @@ -0,0 +1,48 @@ +import 'package:flutter/material.dart'; + +// 再利用性の高いChildListElementクラスの定義 +class ChildListElement extends StatelessWidget { + final String title; + final String subtitle; + final String imagePath; + final VoidCallback? onTap; + final Widget? actionButton; + + const ChildListElement({ + Key? key, + required this.title, + required this.subtitle, + required this.imagePath, + this.onTap, + this.actionButton, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onTap, + child: Card( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Row( + children: [ + Image.asset(imagePath, width: 100, height: 100), + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(title, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), + const SizedBox(height: 8), + Text(subtitle), + ], + ), + ), + if (actionButton != null) actionButton!, // アクションボタンを表示 + ], + ), + ), + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart index d144d55c..eb65ac5d 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart @@ -1,27 +1,29 @@ import 'package:flutter/material.dart'; -import 'package:where_child_bus/components/utils/child_list.dart'; +import 'package:where_child_bus/components/child_list/child_list_with_button.dart'; class BusChildManagePage extends StatefulWidget { - // final List childNames; - // final List groupNames; - // final List images; - + @override + _BusChildManagePageState createState() => _BusChildManagePageState(); +} - final List name = [ +class _BusChildManagePageState extends State { + final List name = [ "園児1", "園児2", "園児3", "園児4", "園児5", ]; - final List group = [ + + final List group = [ "1組", "2組", "3組", "4組", "5組", ]; - final List image = [ + + final List image = [ "1", "2", "1", @@ -29,34 +31,33 @@ class BusChildManagePage extends StatefulWidget { "2", ]; - // BusChildManagePage({required this.childNames, required this.groupNames, required this.images}); - - @override - _BusChildManagePage createState() => _BusChildManagePage(childNames: name, groupNames: group, images: image); -} - -class _BusChildManagePage extends State { - final List childNames; - final List groupNames; - final List images; - _BusChildManagePage({required this.childNames, required this.groupNames, required this.images}); - @override Widget build(BuildContext context) { return Scaffold( - appBar: pageAppBar(), + appBar: AppBar( + title: const Text("子供の管理"), + backgroundColor: Colors.white, + ), body: pageBody(), - ); - } - - pageAppBar() { - return AppBar( - title: const Text("子供の管理"), - backgroundColor: Colors.white, ); } Widget pageBody() { - return ChildList(childNames: childNames, groupNames: groupNames, images: images); - } -} \ No newline at end of file + // ChildListWithButton ウィジェットを使用してリストを表示 + return ChildListWithButton( + childNames: name, + groupNames: group, + images: image, + callback: () { + // ここでリストアイテムがタップされたときの動作を定義 + print("リストアイテムがタップされました"); + }, + buttonIconTypes: List.generate(name.length, (index) { + // ここで条件に基づいてアイコンタイプを決定するロジックを追加できる + // 例として、すべてのアイテムに対して 'add' アイコンを設定 + return ButtonIconType.add; + }), + ); +} + +} From 3109d83cb0e40e48959249e86407becc0a605c98 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 13 Feb 2024 19:29:18 +0900 Subject: [PATCH 230/771] =?UTF-8?q?chore(ml):=20=E3=82=AF=E3=83=AA?= =?UTF-8?q?=E3=83=83=E3=83=97=E7=94=A8=E3=81=AE=E9=96=A2=E6=95=B0=E7=BE=A4?= =?UTF-8?q?=E3=81=AE=E5=88=86=E5=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../face_detect_model/data/detectFaceUtil.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 machine_learning/src/face_detect_model/data/detectFaceUtil.py diff --git a/machine_learning/src/face_detect_model/data/detectFaceUtil.py b/machine_learning/src/face_detect_model/data/detectFaceUtil.py new file mode 100644 index 00000000..ea3e2a01 --- /dev/null +++ b/machine_learning/src/face_detect_model/data/detectFaceUtil.py @@ -0,0 +1,34 @@ +import cv2 +import os + + +def load_cascade(cascade_path): + """Haar Cascadeを読み込む""" + return cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) + + +def detect_face( + image, face_cascade, scaleFactor=1.1, minNeighbors=15, minSize=(50, 50) +): + """画像から顔を検出する""" + gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) + faces = face_cascade.detectMultiScale( + gray, scaleFactor=scaleFactor, minNeighbors=minNeighbors, minSize=minSize + ) + return faces + + +def clip_and_resize_face(face, image, image_size): + """検出された顔をクリップし、指定サイズにリサイズする""" + (x, y, w, h) = face + face_roi = image[y : y + h, x : x + w] + resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) + return resized_face + + +def save_face(face, save_dir, save_file_name): + """クリップされた顔画像を保存する""" + os.makedirs(save_dir, exist_ok=True) + + save_path = os.path.join(save_dir, save_file_name) + cv2.imwrite(save_path, face) From b93b7145d8cbce6a0e4bb01dcfa0cba4a9c95915 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 13 Feb 2024 19:40:23 +0900 Subject: [PATCH 231/771] =?UTF-8?q?feat(ml):=20=E3=83=AD=E3=83=BC=E3=82=AB?= =?UTF-8?q?=E3=83=AB=E7=92=B0=E5=A2=83=E3=81=AE=E7=94=BB=E5=83=8F=E3=81=A8?= =?UTF-8?q?GCS=E4=B8=8A=E3=81=AE=E7=94=BB=E5=83=8F=E3=81=9D=E3=82=8C?= =?UTF-8?q?=E3=81=9E=E3=82=8C=E3=81=AB=E5=AF=BE=E3=81=97=E3=81=A6Clip?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=82=92=E8=A1=8C=E3=81=88=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/detectFaceAndClip.py | 206 ++++++++++-------- 1 file changed, 119 insertions(+), 87 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py index e01c24b1..4fbc0fbb 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -1,9 +1,20 @@ import cv2 import os import yaml -from tqdm import tqdm +import numpy as np import argparse import logging +from dotenv import load_dotenv + + +from detectFaceUtil import ( + load_cascade, + detect_face, + clip_and_resize_face, + save_face, +) + +load_dotenv() logging.basicConfig( format="%(asctime)s - %(levelname)s - %(name)s - PID: %(process)d - %(message)s", @@ -13,130 +24,151 @@ logger = logging.getLogger(__name__) -def load_cascade(cascade_path): - """Haar Cascadeを読み込む""" - return cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) - - -def detect_face( - image, face_cascade, scaleFactor=1.1, minNeighbors=15, minSize=(50, 50) -): - """画像から顔を検出する""" - gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) - faces = face_cascade.detectMultiScale( - gray, scaleFactor=scaleFactor, minNeighbors=minNeighbors, minSize=minSize - ) - return faces - - -def clip_and_resize_face(face, image, image_size): - """検出された顔をクリップし、指定サイズにリサイズする""" - (x, y, w, h) = face - face_roi = image[y : y + h, x : x + w] - resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) - return resized_face - - -def save_face(face, save_dir, save_file_name): - """クリップされた顔画像を保存する""" - os.makedirs(save_dir, exist_ok=True) - - save_path = os.path.join(save_dir, save_file_name) - cv2.imwrite(save_path, face) - - def main(args): logger.info(f"env: {args.env}") - # パスの指定 with open("src/face_detect_model/config.yaml", "r") as f: config = yaml.safe_load(f) face_cascade_path = config["face_detect"]["cascade_path"] - image_dir_path = "src/face_detect_model/data/img" - save_dir = "src/face_detect_model/data/detect_img" image_size = ( config["face_detect"]["clip_size"]["height"], config["face_detect"]["clip_size"]["width"], ) if args.env == "local": + image_dir_path = args.img_dir_path + save_dir_path = args.save_dir_path # 保存先ディレクトリの作成,存在した場合は中身を削除 - os.makedirs(save_dir, exist_ok=True) - for file in os.listdir(save_dir): - file_path = os.path.join(save_dir, file) + os.makedirs(save_dir_path, exist_ok=True) + for file in os.listdir(save_dir_path): + file_path = os.path.join(save_dir_path, file) if os.path.isfile(file_path): os.remove(file_path) elif args.env == "remote": from google.oauth2 import service_account import google.cloud.storage as gcs - key_path = "service_account_where_child_bus.json" + # TODO: GCP Cloud Functions でdeployする際の実装 + key_path = os.environ.get("CREDENTIALS_KEY_PATH") credential = service_account.Credentials.from_service_account_file(key_path) - # TODO: 保育園のIDと写真のIDを指定して、その写真を取得する - PROJECT_ID = "wherechildbus" - BUCKET_NAME = "where_child_bus_photo_bucket" - SOURCE_BLOB_NAME = "00001/" + PROJECT_ID = os.environ.get("PROJECT_ID") + BUCKET_NAME = os.environ.get("BUCKET_NAME") + + nursery_id = args.nursery_id + child_id = args.child_id + SOURCE_BLOB_NAME = f"{nursery_id}/{child_id}/row/" client = gcs.Client(PROJECT_ID, credentials=credential) - logger.info("get client success!") - # bucket = client.get_bucket(BUCKET_NAME) - # blob = bucket.blob(SOURCE_BLOB_NAME) - [print(file.name) for file in client.list_blobs(BUCKET_NAME)] - exit() + bucket = client.bucket(BUCKET_NAME) + logger.info("get bucket success!") + + blobs = bucket.list_blobs(prefix=SOURCE_BLOB_NAME, delimiter="/") # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) # 画像の読み込み - for target_people_name in os.listdir(image_dir_path): - logger.info(f"processing... : {target_people_name}") - detect_face_num = 0 - for image_name in tqdm( - os.listdir(os.path.join(image_dir_path, target_people_name)) - ): - image = cv2.imread( - image_path := os.path.join( - image_dir_path, target_people_name, image_name - ) - ) + images = [] + if args.env == "local": + for image_path in os.listdir(image_dir_path): + logger.info(f"loading: {image_path}") + image = cv2.imread(image_dir_path + image_path) if image is None: - logger.error( - f"画像ファイルが見つからないか読み込めません: {image_path}" - ) + logger.error(f"Can not find or load : {image_path}") continue + images.append(image) + elif args.env == "remote": + for blob in blobs: + logger.info(f"loading: {blob.name}") + if blob.name.endswith("/"): + logger.info(f"skip: {blob.name}") + continue + + # バイトデータから numpy 配列を作成 + image_data = blob.download_as_string() + image_array = np.frombuffer(image_data, dtype=np.uint8) + + # cv2.imdecode でバイト配列を画像に変換 + image = cv2.imdecode(image_array, cv2.IMREAD_COLOR) + if image is None: + logger.error(f"Can not load: {blob.name}") + continue + images.append(image) + + logger.info("Detecting faces...") - # 画像から顔を検出 - faces = detect_face( - image, - face_cascade, - scaleFactor=config["face_detect"]["scale_factor"], - minNeighbors=config["face_detect"]["min_neighbors"], - minSize=( - config["face_detect"]["min_size"]["height"], - config["face_detect"]["min_size"]["width"], - ), - ) - - # 検出された各顔に対して処理 - for face in faces: - clipped_face = clip_and_resize_face(face, image, image_size) - save_file_name = f"{target_people_name}-{detect_face_num}.png" - save_face(clipped_face, save_dir, save_file_name) - detect_face_num += 1 if args.env == "remote": - # TODO: GCSに保存するprocess - pass + from google.cloud.storage import Blob + + detect_face_num = 0 + for image in images: + faces = detect_face( + image, + face_cascade, + scaleFactor=config["face_detect"]["scale_factor"], + minNeighbors=config["face_detect"]["min_neighbors"], + minSize=( + config["face_detect"]["min_size"]["height"], + config["face_detect"]["min_size"]["width"], + ), + ) + + # 検出された各顔に対して処理 + for face in faces: + clipped_face = clip_and_resize_face(face, image, image_size) + if args.env == "local": + save_file_name = f"{detect_face_num}.png" + logger.info(f"saving: {save_file_name}") + save_face(clipped_face, save_dir_path, save_file_name) + elif args.env == "remote": + _, encoded_image = cv2.imencode(".png", clipped_face) + png_cliped_face_data = encoded_image.tobytes() + + save_blob_name = ( + f"{nursery_id}/{child_id}/clipped/{child_id}-{detect_face_num}.png" + ) + + logger.info(f"uploading: {save_blob_name}") + save_blob = Blob(save_blob_name, bucket) + save_blob.upload_from_string( + data=png_cliped_face_data, content_type="image/png" + ) + detect_face_num += 1 logger.info("Done") if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument( - "--env", + env_subparsers = parser.add_subparsers(dest="env") + + local_parser = env_subparsers.add_parser("local") + local_parser.add_argument( + "--img_dir_path", + type=str, + help="画像のディレクトリパス", + required=True, + ) + local_parser.add_argument( + "--save_dir_path", type=str, - choices=["local", "remote"], - help="local: ローカル環境, remote: GCP環境", + help="保存先のディレクトリパス", + required=True, ) + + remote_parser = env_subparsers.add_parser("remote") + remote_parser.add_argument( + "--nursery_id", + type=str, + help="保育園・幼稚園のID", + required=True, + ) + remote_parser.add_argument( + "--child_id", + type=str, + help="園児のID", + required=True, + ) + args = parser.parse_args() main(args) From 0a83066902a58e088e154b3fec10ac74d719ddb6 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 13 Feb 2024 19:40:46 +0900 Subject: [PATCH 232/771] =?UTF-8?q?chore(ml):=20python-dotenv=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/pyproject.toml | 1 + machine_learning/requirements-dev.lock | 1 + machine_learning/requirements.lock | 1 + 3 files changed, 3 insertions(+) diff --git a/machine_learning/pyproject.toml b/machine_learning/pyproject.toml index 5fc80b44..d93bf8ea 100644 --- a/machine_learning/pyproject.toml +++ b/machine_learning/pyproject.toml @@ -11,6 +11,7 @@ dependencies = [ "pyyaml>=6.0.1", "tqdm>=4.66.2", "google-cloud-storage>=2.14.0", + "python-dotenv>=1.0.1", ] readme = "README.md" requires-python = ">= 3.8" diff --git a/machine_learning/requirements-dev.lock b/machine_learning/requirements-dev.lock index 0d473b8f..80e190ae 100644 --- a/machine_learning/requirements-dev.lock +++ b/machine_learning/requirements-dev.lock @@ -30,6 +30,7 @@ pillow==10.2.0 protobuf==4.25.2 pyasn1==0.5.1 pyasn1-modules==0.3.0 +python-dotenv==1.0.1 pyyaml==6.0.1 requests==2.31.0 rsa==4.9 diff --git a/machine_learning/requirements.lock b/machine_learning/requirements.lock index 0d473b8f..80e190ae 100644 --- a/machine_learning/requirements.lock +++ b/machine_learning/requirements.lock @@ -30,6 +30,7 @@ pillow==10.2.0 protobuf==4.25.2 pyasn1==0.5.1 pyasn1-modules==0.3.0 +python-dotenv==1.0.1 pyyaml==6.0.1 requests==2.31.0 rsa==4.9 From 718ea3599723f4a9a72f4e7625f49ed31eb53e85 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 19:52:21 +0900 Subject: [PATCH 233/771] =?UTF-8?q?feat:=E3=83=9C=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E3=81=AE=E3=81=AE=E3=82=BF=E3=83=83=E3=83=97=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../child_list/child_list_with_button.dart | 64 +++++----------- .../element/child_list_element.dart | 44 ++++++----- .../child_list_element_with_button.dart | 75 +++++++++++++++++++ 3 files changed, 117 insertions(+), 66 deletions(-) create mode 100644 frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart b/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart index dbbfde5e..3a5d3d07 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; +import 'package:where_child_bus/components/child_list/element/child_list_element_with_button.dart'; enum ButtonIconType { add, remove } @@ -29,52 +29,24 @@ class _ChildListWithButtonState extends State { return ListView.separated( itemCount: widget.childNames.length, separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), - itemBuilder: (BuildContext context, int index) => ChildListElementWithButton(widget: widget, context: context, index: index), + itemBuilder: (BuildContext context, int index) { + // ChildListElementWithButtonに必要な情報を渡す + return ChildListElementWithButton( + childName: widget.childNames[index], + groupName: widget.groupNames[index], + image: widget.images[index], + buttonIconType: widget.buttonIconTypes[index], // 各アイテムに対応するアイコンタイプ + onTap: () { + // ここでリストアイテムがタップされたときの動作を定義 + print("${widget.childNames[index]}がタップされました"); + }, + onButtonTap: () { + // ここでアイコンボタンがタップされたときの動作を定義 + print("${widget.childNames[index]}のボタンがタップされました"); + }, + ); + }, ); } } -class ChildListElementWithButton extends StatelessWidget { - const ChildListElementWithButton({ - super.key, - required this.widget, - required this.context, - required this.index, - }); - - final ChildListWithButton widget; - final BuildContext context; - final int index; - - @override - Widget build(BuildContext context) { - // 各アイテムに対応するボタンアイコンタイプを取得 - ButtonIconType buttonIconType = widget.buttonIconTypes[index]; - - return Padding( - padding: const EdgeInsets.all(10), - child: Stack( - children: [ - ChildListElement( - title: widget.childNames[index], - subtitle: widget.groupNames[index], - imagePath: "assets/images/face_${widget.images[index]}.png", - onTap: widget.callback, - ), - Positioned( - right: 4, - bottom: 4, - child: IconButton( - icon: Icon(buttonIconType == ButtonIconType.add ? Icons.add : Icons.remove), - onPressed: () { - // ここにボタンタップ時のアクションを実装 - }, - color: Theme.of(context).primaryColor, - iconSize: 24.0, - ), - ), - ], - ), - ); - } -} diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart index d44e4fdc..f9ce5784 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart @@ -19,27 +19,31 @@ class ChildListElement extends StatelessWidget { @override Widget build(BuildContext context) { - return InkWell( - onTap: onTap, - child: Card( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Row( - children: [ - Image.asset(imagePath, width: 100, height: 100), - const SizedBox(width: 16), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(title, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), - const SizedBox(height: 8), - Text(subtitle), - ], + return Card( + elevation: 8, + child: Material( + color: Colors.white, // Cardの背景色 + child: InkWell( + onTap: onTap, // タップ時のアクション + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Row( + children: [ + Image.asset(imagePath, width: 100, height: 100), + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(title, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), + const SizedBox(height: 8), + Text(subtitle), + ], + ), ), - ), - if (actionButton != null) actionButton!, // アクションボタンを表示 - ], + if (actionButton != null) actionButton!, // アクションボタンを表示 + ], + ), ), ), ), diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart new file mode 100644 index 00000000..906dfc79 --- /dev/null +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/child_list/child_list_with_button.dart'; +import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; + + +class ChildListElementWithButton extends StatefulWidget { + final String childName; + final String groupName; + final String image; + final VoidCallback? onTap; + final VoidCallback? onButtonTap; + final ButtonIconType buttonIconType; + + ChildListElementWithButton({ + Key? key, + required this.childName, + required this.groupName, + required this.image, + this.onTap, + this.onButtonTap, + this.buttonIconType = ButtonIconType.add, // デフォルト値を提供 + }) : super(key: key); + + @override + _ChildListElementWithButtonState createState() => _ChildListElementWithButtonState(); +} + +class _ChildListElementWithButtonState extends State { + ButtonIconType? currentButtonType; + + @override + void initState() { + super.initState(); + currentButtonType = widget.buttonIconType; // 初期アイコンタイプを設定 + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(10), + child: Stack( + children: [ + ChildListElement( + title: widget.childName, + subtitle: widget.groupName, + imagePath: "assets/images/face_${widget.image}.png", + onTap: widget.onTap, + ), + Positioned( + right: 8, + bottom: 8, + child: IconButton( + icon: Icon( + currentButtonType == ButtonIconType.add ? Icons.add : Icons.remove, + // アイコンの色を動的に変更 + color: currentButtonType == ButtonIconType.add ? Colors.green : Colors.red, + size: 50.0, // アイコンサイズの指定もここで行う + ), + onPressed: () { + if (widget.onButtonTap != null) { + widget.onButtonTap!(); + } + // アイコンタイプの切り替え + setState(() { + currentButtonType = currentButtonType == ButtonIconType.add ? ButtonIconType.remove : ButtonIconType.add; + }); + }, + // IconButton自体の色指定は不要になるため削除 + ), + ), + ], + ), + ); + } +} From 8223d83810adf5958c67b7120625739b3873b7c5 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 13 Feb 2024 19:59:18 +0900 Subject: [PATCH 234/771] =?UTF-8?q?refactor(ml):=20=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E8=AA=AD=E3=81=BF=E8=BE=BC=E3=81=BF=E3=81=AE=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=82=92=E9=96=A2=E6=95=B0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/detectFaceAndClip.py | 70 ++++++++++--------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py index 4fbc0fbb..cf1f1d28 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -24,6 +24,38 @@ logger = logging.getLogger(__name__) +def load_image(args, blobs=None): + # 画像の読み込み + images = [] + if args.env == "local": + for image_path in os.listdir(args.image_dir_path): + logger.info(f"loading: {image_path}") + image = cv2.imread(args.image_dir_path + image_path) + if image is None: + logger.error(f"Can not find or load : {image_path}") + continue + images.append(image) + elif args.env == "remote": + + for blob in blobs: + logger.info(f"loading: {blob.name}") + if blob.name.endswith("/"): + logger.info(f"skip: {blob.name}") + continue + + # バイトデータから numpy 配列を作成 + image_data = blob.download_as_string() + image_array = np.frombuffer(image_data, dtype=np.uint8) + + # cv2.imdecode でバイト配列を画像に変換 + image = cv2.imdecode(image_array, cv2.IMREAD_COLOR) + if image is None: + logger.error(f"Can not load: {blob.name}") + continue + images.append(image) + return images + + def main(args): logger.info(f"env: {args.env}") with open("src/face_detect_model/config.yaml", "r") as f: @@ -36,7 +68,6 @@ def main(args): ) if args.env == "local": - image_dir_path = args.img_dir_path save_dir_path = args.save_dir_path # 保存先ディレクトリの作成,存在した場合は中身を削除 os.makedirs(save_dir_path, exist_ok=True) @@ -55,9 +86,7 @@ def main(args): PROJECT_ID = os.environ.get("PROJECT_ID") BUCKET_NAME = os.environ.get("BUCKET_NAME") - nursery_id = args.nursery_id - child_id = args.child_id - SOURCE_BLOB_NAME = f"{nursery_id}/{child_id}/row/" + SOURCE_BLOB_NAME = f"{args.nursery_id}/{args.child_id}/row/" client = gcs.Client(PROJECT_ID, credentials=credential) bucket = client.bucket(BUCKET_NAME) @@ -68,36 +97,12 @@ def main(args): # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) - # 画像の読み込み - images = [] if args.env == "local": - for image_path in os.listdir(image_dir_path): - logger.info(f"loading: {image_path}") - image = cv2.imread(image_dir_path + image_path) - if image is None: - logger.error(f"Can not find or load : {image_path}") - continue - images.append(image) + images = load_image(args) elif args.env == "remote": - for blob in blobs: - logger.info(f"loading: {blob.name}") - if blob.name.endswith("/"): - logger.info(f"skip: {blob.name}") - continue - - # バイトデータから numpy 配列を作成 - image_data = blob.download_as_string() - image_array = np.frombuffer(image_data, dtype=np.uint8) - - # cv2.imdecode でバイト配列を画像に変換 - image = cv2.imdecode(image_array, cv2.IMREAD_COLOR) - if image is None: - logger.error(f"Can not load: {blob.name}") - continue - images.append(image) + images = load_image(args, blobs=blobs) logger.info("Detecting faces...") - if args.env == "remote": from google.cloud.storage import Blob @@ -125,10 +130,7 @@ def main(args): _, encoded_image = cv2.imencode(".png", clipped_face) png_cliped_face_data = encoded_image.tobytes() - save_blob_name = ( - f"{nursery_id}/{child_id}/clipped/{child_id}-{detect_face_num}.png" - ) - + save_blob_name = f"{args.nursery_id}/{args.child_id}/clipped/{args.child_id}-{detect_face_num}.png" logger.info(f"uploading: {save_blob_name}") save_blob = Blob(save_blob_name, bucket) save_blob.upload_from_string( From 564d015af0a4b5d50801785d4b414cdb293dd90f Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 20:26:10 +0900 Subject: [PATCH 235/771] =?UTF-8?q?refactor:=E5=9C=92=E5=85=90=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E3=82=92=E3=82=AF=E3=83=A9=E3=82=B9=E3=81=AB=E5=88=86?= =?UTF-8?q?=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/child_list/child_list.dart | 18 ++++- .../element/child_list_element.dart | 49 ++++++------ frontend/where_child_bus/lib/main.dart | 3 + .../student_list_page/student_list_page.dart | 78 +------------------ frontend/where_child_bus/pubspec.yaml | 1 - 5 files changed, 47 insertions(+), 102 deletions(-) diff --git a/frontend/where_child_bus/lib/components/child_list/child_list.dart b/frontend/where_child_bus/lib/components/child_list/child_list.dart index 8aed5b91..a1959cba 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; +import 'package:where_child_bus/pages/student_list_page/student_detail_sheet.dart'; class ChildList extends StatefulWidget { final List childNames; @@ -34,8 +35,21 @@ class _ChildListState extends State { title: widget.childNames[index], subtitle: widget.groupNames[index], imagePath: "assets/images/face_${widget.images[index]}.png", - onTap: widget.callback, - // actionButton: ここに任意のアクションボタンウィジェットを追加可能 + onTap: () { + if (widget.callback == null) { + childDetailModal(index); + } else { + widget.callback!(); + } + } ); } + + childDetailModal(int index) async{ + await showModalBottomSheet( + context: context, + builder: (BuildContext context) { + return StudentDetailSheet(childName: widget.childNames[index]); + }); + } } diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart index f9ce5784..42676998 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart @@ -19,30 +19,33 @@ class ChildListElement extends StatelessWidget { @override Widget build(BuildContext context) { - return Card( - elevation: 8, - child: Material( - color: Colors.white, // Cardの背景色 - child: InkWell( - onTap: onTap, // タップ時のアクション - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Row( - children: [ - Image.asset(imagePath, width: 100, height: 100), - const SizedBox(width: 16), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(title, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), - const SizedBox(height: 8), - Text(subtitle), - ], + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: Card( + elevation: 8, + child: Material( + color: Colors.white, // Cardの背景色 + child: InkWell( + onTap: onTap, // タップ時のアクション + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Row( + children: [ + Image.asset(imagePath, width: 100, height: 100), + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(title, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), + const SizedBox(height: 8), + Text(subtitle), + ], + ), ), - ), - if (actionButton != null) actionButton!, // アクションボタンを表示 - ], + if (actionButton != null) actionButton!, // アクションボタンを表示 + ], + ), ), ), ), diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 33e1e26b..e66e97cf 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -30,6 +30,9 @@ class _MyAppState extends State { theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, + appBarTheme: const AppBarTheme( + backgroundColor: Colors.white, // AppBarの背景色を白に設定 + ), ), home: const App(), ); diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 45da8df2..89d1193a 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/child_list/child_list.dart'; import 'package:where_child_bus/pages/student_list_page/student_detail_sheet.dart'; import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; @@ -38,8 +39,7 @@ class _StudentListPageState extends State { var screenSize = MediaQuery.of(context).size; return Scaffold( - appBar: AppBar(), - body: childCardListBuilder(screenSize), + body: ChildList(childNames: name, groupNames: group, images: image,), floatingActionButton: FloatingActionButton( onPressed: () { Navigator.of(context).push(MaterialPageRoute( @@ -49,78 +49,4 @@ class _StudentListPageState extends State { ), ); } - - //TODO: 将来的にはAPIからデータを取得する。 - Widget childCardListBuilder(Size screenSize) { - return ListView.separated( - itemCount: name.length, - separatorBuilder: (BuildContext context, int index) { - return const Divider( - height: 20, - color: Colors.transparent, - ); - }, - itemBuilder: (BuildContext context, int index) { - return childCardListInner(index, screenSize); - }); - } - - Widget childCardListInner(int index, Size screenSize) { - return FractionallySizedBox( - widthFactor: 0.8, - child: InkWell( - onTap: () async { - await showModalBottomSheet( - context: context, - builder: (BuildContext context) { - return StudentDetailSheet(childName: name[index]); - }); - }, - child: childCard(index, screenSize), - )); - } - - //TODO: Child型を受け取る - Widget childCard(int index, Size screenSize) { - return Card( - color: Colors.white, - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Row(children: [ - childFaceImage(index), - SizedBox( - width: screenSize.width * 0.05, - ), - childNameAndGroupName(index), - ]))); - } - - Widget childFaceImage(int index) { - return SizedBox( - width: 100, - height: 100, - child: Image.asset("assets/images/face_${image[index]}.png")); - } - - Widget childNameAndGroupName(int index) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(name[index], - style: const TextStyle(color: Colors.black, fontSize: 24)), - Text( - group[index], - style: const TextStyle(color: Colors.black), - ), - busStopName(), - ]); - } - - //TODO: 引数に停留所名を加える。 - Widget busStopName() { - return const Row(children: [ - Icon(Icons.location_on), - Text("停留所名"), - ]); - } } diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index efcce7b2..250b6c59 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -16,7 +16,6 @@ dependencies: image_picker: ^1.0.7 cupertino_icons: ^1.0.2 - image_picker: ^1.0.7 dev_dependencies: flutter_test: From 65e0f26db9940def602aafba8695054391468179 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 20:33:41 +0900 Subject: [PATCH 236/771] =?UTF-8?q?chore:=E5=9C=92=E5=85=90=E3=81=AE?= =?UTF-8?q?=E3=82=B9=E3=82=BF=E3=82=A4=E3=83=AB=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../child_list/element/child_list_element.dart | 15 +++++++++++---- .../element/child_list_element_with_button.dart | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart index 42676998..deb4c2d4 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart @@ -19,16 +19,16 @@ class ChildListElement extends StatelessWidget { @override Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 10), - child: Card( + return listElementPadding( + Card( elevation: 8, + clipBehavior: Clip.antiAliasWithSaveLayer, child: Material( color: Colors.white, // Cardの背景色 child: InkWell( onTap: onTap, // タップ時のアクション child: Padding( - padding: const EdgeInsets.all(16.0), + padding: const EdgeInsets.all(8.0), child: Row( children: [ Image.asset(imagePath, width: 100, height: 100), @@ -52,4 +52,11 @@ class ChildListElement extends StatelessWidget { ), ); } + + Padding listElementPadding(Widget child) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: child, + ); + } } diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart index 906dfc79..cf18820a 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart @@ -47,8 +47,8 @@ class _ChildListElementWithButtonState extends State onTap: widget.onTap, ), Positioned( - right: 8, - bottom: 8, + right: 25, + bottom: 2, child: IconButton( icon: Icon( currentButtonType == ButtonIconType.add ? Icons.add : Icons.remove, From 3bff7293824c237b858d9156eb988a8690de9af6 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 21:02:21 +0900 Subject: [PATCH 237/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_edit_page/bus_edit_page.dart | 3 ++- .../pages/bus_list_page/bus_list_page.dart | 21 ++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 4082b37c..6ace51ed 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -8,8 +8,9 @@ import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/sta class BusEditPage extends StatefulWidget { final List busStations; + static const defaultBusStations = ["バス停が登録されていません"]; - BusEditPage({required this.busStations}); + BusEditPage({ this.busStations = defaultBusStations}); @override _BusEditPage createState() => _BusEditPage(busStations: busStations); diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index d6f73d56..3f8fddac 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; class BusListPage extends StatefulWidget { const BusListPage({super.key}); @@ -17,10 +18,17 @@ class _BusListPageState extends State { @override Widget build(BuildContext context) { + return Scaffold( + body: pageBody(), + floatingActionButton: addBusButton(), + ); + } + + Widget pageBody() { return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ Expanded( child: listViewBuilder(), ) @@ -29,6 +37,17 @@ class _BusListPageState extends State { ); } + Widget addBusButton() { + return FloatingActionButton( + onPressed: (){ + Navigator.push( + context,MaterialPageRoute(builder: (context) => BusEditPage()) + ); + }, + child: const Icon(Icons.add), + ); + } + Widget listViewBuilder() { return ListView.builder( //TODO: 実際にはAPIからデータを取得 From 5207403b9689530aef96fddd9c32e4a16f719ed3 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 21:41:33 +0900 Subject: [PATCH 238/771] =?UTF-8?q?feat:=E6=9C=9D=E5=A4=95=E3=81=9D?= =?UTF-8?q?=E3=82=8C=E3=81=9E=E3=82=8C=E3=81=AE=E3=83=88=E3=82=B0=E3=83=AB?= =?UTF-8?q?=E3=82=B9=E3=82=A4=E3=83=83=E3=83=81=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/check_page/check_page.dart | 106 ++++++++++++------ .../components/utils/current_time_body.dart | 21 ++-- 2 files changed, 86 insertions(+), 41 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index e84f5839..489e5c00 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -9,7 +9,8 @@ class CheckPage extends StatefulWidget { } class _CheckPageState extends State { - bool isRideBus = true; + var isRideMorningBus = true; + var isRideEveningBus = true; @override Widget build(BuildContext context) { @@ -21,44 +22,85 @@ class _CheckPageState extends State { const SizedBox( height: 50, ), - toggleButtonBody(), + toggleSwitchBody(context), ], ), ); } - Widget toggleButtonBody() { - return Column( - children: [ - const Text( - "本日の乗車予定", - style: TextStyle(fontSize: 20), - ), - const SizedBox(height: 20), - isRideBusToggleButtonBody("乗る", true), - const SizedBox(height: 20), - isRideBusToggleButtonBody("乗らない", false), - ], - ); + Widget toggleSwitchBody(BuildContext context) { + return Container( + width: MediaQuery.of(context).size.width * 0.8, + alignment: Alignment.center, + child: Column( + children: [ + const Text( + "本日の乗車予定", + style: TextStyle(fontSize: 20), + ), + Padding( + padding: const EdgeInsets.only(top: 20), + child: Column( + children: [ + Column(children: [ + const Text("朝のバス"), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + displayRideOrNot(context, isRideMorningBus), + SizedBox( + width: MediaQuery.of(context).size.width * 0.3, + child: Switch( + value: !isRideMorningBus, + onChanged: (value) { + setState(() { + isRideMorningBus = !value; + }); + })), + ], + ), + ]), + Column( + children: [ + const Text("夕方のバス"), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + displayRideOrNot(context, isRideEveningBus), + SizedBox( + width: MediaQuery.of(context).size.width * 0.3, + child: Switch( + value: !isRideEveningBus, + onChanged: (value) { + setState(() { + isRideEveningBus = !value; + }); + })), + ], + ), + ], + ) + ], + ), + ), + ], + )); } - Widget isRideBusToggleButtonBody(String text, bool isRide) { - return SizedBox( - width: 200, - height: 50, - child: ElevatedButton( - onPressed: () { - setState(() { - isRideBus = isRide; - }); - }, - style: ElevatedButton.styleFrom( - textStyle: TextStyle(fontSize: 20), - backgroundColor: isRideBus != isRide ? Colors.grey : null, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(5))), - ), - child: Text(text), + Widget displayRideOrNot(BuildContext context, bool isRide) { + return Container( + padding: const EdgeInsets.all(10.0), + width: MediaQuery.of(context).size.width * 0.3, + decoration: BoxDecoration( + color: isRide ? Colors.green[100] : Colors.red[100], + borderRadius: BorderRadius.circular(5), + border: Border.all(color: isRide ? Colors.green : Colors.red)), + child: Text( + isRide ? "乗る" : "乗らない", + style: TextStyle( + color: isRide ? Colors.green : Colors.red, + fontWeight: FontWeight.bold), + textAlign: TextAlign.center, ), ); } diff --git a/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart b/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart index 7b6838ea..ace931f9 100644 --- a/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart @@ -4,14 +4,17 @@ import 'current_time_widget.dart'; class CurrentTimeBody extends StatelessWidget { @override Widget build(BuildContext context) { - return Column( - children: [ - const Text( - "現在時刻", - style: TextStyle(fontSize: 20), - ), - CurrentTimeWidget(), - ], - ); + return Container( + height: MediaQuery.of(context).size.height * 0.2, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + const Text( + "現在時刻", + style: TextStyle(fontSize: 20), + ), + CurrentTimeWidget(), + ], + )); } } From 9fe1d205b742881932fa0f3f168462b52b4455f0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 21:42:03 +0900 Subject: [PATCH 239/771] =?UTF-8?q?feta:=E4=B9=97=E5=AE=A2=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=B8=E3=81=AE=E9=81=B7?= =?UTF-8?q?=E7=A7=BB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../element/child_list_element.dart | 32 ++++++++---- .../element/child_list_element_with_mark.dart | 0 .../lib/pages/bus_list_page/bottom_sheet.dart | 41 ++++----------- .../bus_passenger_page.dart | 50 +++++++++++++++++++ 4 files changed, 84 insertions(+), 39 deletions(-) create mode 100644 frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart index deb4c2d4..d924a39f 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; -// 再利用性の高いChildListElementクラスの定義 class ChildListElement extends StatelessWidget { final String title; final String subtitle; @@ -34,14 +33,7 @@ class ChildListElement extends StatelessWidget { Image.asset(imagePath, width: 100, height: 100), const SizedBox(width: 16), Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(title, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), - const SizedBox(height: 8), - Text(subtitle), - ], - ), + child: titleAndSubTitle(title, subtitle), ), if (actionButton != null) actionButton!, // アクションボタンを表示 ], @@ -53,6 +45,28 @@ class ChildListElement extends StatelessWidget { ); } + Column titleAndSubTitle(String title, String subtitle) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + titleText(title), + subTitleText(subtitle), + ], + ); + } + + Text titleText(String title) { + return Text( + title, + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold) + ); + } + + Text subTitleText(String subtitle) { + return Text(subtitle); + } + Padding listElementPadding(Widget child) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 20), diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart new file mode 100644 index 00000000..e69de29b diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index f9c1e0ab..3af018ae 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -3,6 +3,7 @@ import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page. import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart'; class BottomSheetWidget extends StatelessWidget { final busStations = ["station1", "station2", "station3","station4","station5","station6", "station7", "station8", "station7", "station7"]; @@ -39,12 +40,21 @@ class BottomSheetWidget extends StatelessWidget { // titleText(), modalHeader(busName, "test"), StationsList(busStationsList: busStations), - ConfirmButton(buttonText: "乗客情報"), + ConfirmButton( + buttonText: "乗客情報", + onTap: () => moveToBusPassengerPage(context), + ), ], ) ); } + moveToBusPassengerPage(BuildContext context) { + Navigator.push( + context,MaterialPageRoute(builder: (context) => BusPassengerPage()) + ); + } + Widget editButton(BuildContext context) { return Align( alignment: const Alignment(1, -0.98), @@ -155,33 +165,4 @@ class BottomSheetWidget extends StatelessWidget { ), ); } -//TODO 将来的に乗客詳細ページへの遷移を実装する - Widget boardingConfirmButton(BuildContext context) { - const double fontSize = 20; - - return Center( - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 10), - child: SizedBox( - width: MediaQuery.of(context).size.width * 0.6, - height: fontSize * 2, - child: ElevatedButton( - onPressed: () { - }, - style: ElevatedButton.styleFrom( - backgroundColor: Colors.black, - ), - child: const Text( - "乗客状況", - style: TextStyle( - color: Colors.white, - fontSize: fontSize, - ), - ), - ), - ), - ), - ); - } - } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart new file mode 100644 index 00000000..aa32c1e6 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart @@ -0,0 +1,50 @@ +import "package:flutter/material.dart"; +import "package:where_child_bus/app.dart"; +import "package:where_child_bus/components/child_list/child_list.dart"; + +class BusPassengerPage extends StatefulWidget { + final List name = [ + "園児1", + "園児2", + "園児3", + "園児4", + "園児5", + ]; + final List group = [ + "1組", + "2組", + "3組", + "4組", + "5組", + ]; + final List image = [ + "1", + "2", + "1", + "1", + "2", + ]; + + @override + _BusPassengerPage createState() => _BusPassengerPage(); +} + +class _BusPassengerPage extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: pageAppBar(), + body:pageBody(), + ); + } + + AppBar pageAppBar() { + return AppBar( + title: const Text("乗客情報"), + ); + } + + Widget pageBody() { + return ChildList(childNames: widget.name, groupNames: widget.group, images: widget.image); + } +} \ No newline at end of file From 579df4f6b9c119e2fecf4cd57d5a8cc244e0825c Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 13 Feb 2024 22:11:36 +0900 Subject: [PATCH 240/771] =?UTF-8?q?refactor:=E3=83=88=E3=82=B0=E3=83=AB?= =?UTF-8?q?=E3=82=B9=E3=82=A4=E3=83=83=E3=83=81=E3=82=92widget=E3=81=AB?= =?UTF-8?q?=E5=88=86=E5=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/check_page/check_page.dart | 70 +++++++++---------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index 489e5c00..603a956c 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -42,44 +42,10 @@ class _CheckPageState extends State { padding: const EdgeInsets.only(top: 20), child: Column( children: [ - Column(children: [ - const Text("朝のバス"), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - displayRideOrNot(context, isRideMorningBus), - SizedBox( - width: MediaQuery.of(context).size.width * 0.3, - child: Switch( - value: !isRideMorningBus, - onChanged: (value) { - setState(() { - isRideMorningBus = !value; - }); - })), - ], - ), - ]), - Column( - children: [ - const Text("夕方のバス"), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - displayRideOrNot(context, isRideEveningBus), - SizedBox( - width: MediaQuery.of(context).size.width * 0.3, - child: Switch( - value: !isRideEveningBus, - onChanged: (value) { - setState(() { - isRideEveningBus = !value; - }); - })), - ], - ), - ], - ) + busTitleAndToggleSwitch( + context, "朝のバス", isRideMorningBus, true), + busTitleAndToggleSwitch( + context, "夕方のバス", isRideEveningBus, false), ], ), ), @@ -87,6 +53,34 @@ class _CheckPageState extends State { )); } + Widget busTitleAndToggleSwitch( + BuildContext context, String title, bool isRide, bool isMorning) { + return Column(children: [ + Text(title), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + displayRideOrNot(context, isRide), + toggleSwitch(context, isRide, isMorning), + ], + ), + ]); + } + + Widget toggleSwitch(BuildContext context, bool isRide, bool isMorning) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.3, + child: Switch( + value: !isRide, + onChanged: (value) { + setState(() { + isMorning + ? isRideMorningBus = !value + : isRideEveningBus = !value; + }); + })); + } + Widget displayRideOrNot(BuildContext context, bool isRide) { return Container( padding: const EdgeInsets.all(10.0), From fe432c7cf65a6c8bb735c97fd2f7df97d7ed33de Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 22:21:21 +0900 Subject: [PATCH 241/771] =?UTF-8?q?feat:=E3=83=9E=E3=83=BC=E3=82=AF?= =?UTF-8?q?=E4=BB=98=E3=81=8D=E3=81=AE=E8=A6=81=E7=B4=A0=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../element/child_list_element_with_mark.dart | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart index e69de29b..10a62e9b 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; + +// ChildListElementを再利用する新しいStatefulWidgetクラス +class ChildListElementWithMark extends StatefulWidget { + final String title; + final String subtitle; + final String imagePath; + final VoidCallback? onTap; + final Widget mark; // マークを表示するためのウィジェット + + const ChildListElementWithMark({ + Key? key, + required this.title, + required this.subtitle, + required this.imagePath, + this.onTap, + required this.mark, + }) : super(key: key); + + @override + _ChildListElementWithMarkState createState() => _ChildListElementWithMarkState(); +} + +class _ChildListElementWithMarkState extends State { + @override + Widget build(BuildContext context) { + // ChildListElementを再利用して、actionButtonとしてmarkを渡す + return ChildListElement( + title: widget.title, + subtitle: widget.subtitle, + imagePath: widget.imagePath, + onTap: widget.onTap, + actionButton: Padding( + padding: const EdgeInsets.only(left: 16), // マークと他の要素との間隔を調整 + child: widget.mark, + ), + ); + } +} From 9909d22315eeccb9cae981344be112e51f218901 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 22:55:32 +0900 Subject: [PATCH 242/771] =?UTF-8?q?feat:=20Cloud=20Function=E3=81=B8?= =?UTF-8?q?=E3=81=AE=E8=AA=8D=E8=A8=BC=E6=B8=88=E3=81=BFGET=E3=83=AA?= =?UTF-8?q?=E3=82=AF=E3=82=A8=E3=82=B9=E3=83=88=E3=81=AE=E5=AE=9F=E8=A3=85?= =?UTF-8?q?=E4=BE=8B=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/client/main.go | 47 ++++++++++++++++++- backend/go.mod | 2 +- .../v1/child_photo.pbserver.dart | 43 ----------------- 3 files changed, 47 insertions(+), 45 deletions(-) delete mode 100644 frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart diff --git a/backend/cmd/client/main.go b/backend/cmd/client/main.go index f998db70..82842fd2 100644 --- a/backend/cmd/client/main.go +++ b/backend/cmd/client/main.go @@ -4,20 +4,37 @@ import ( "context" "crypto/tls" "flag" + "fmt" + "io" "log" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" + "google.golang.org/api/idtoken" + "google.golang.org/api/option" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ) var ( - grpcEndpoint = flag.String("grpc_endpoint", "", "The gRPC Endpoint of the Server") + grpcEndpoint = flag.String("grpc_endpoint", "", "The gRPC Endpoint of the Server") + cloudFunctionURL = "https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionHealthCheck" // Cloud FunctionのURL ) func main() { flag.Parse() + + // コンフィグレーションを読み込む + cfg, err := config.New() + if err != nil { + log.Fatalf("Failed to load config: %v", err) + } + + // Cloud Functionに対して認証済みGETリクエストを行う + if err := makeGetRequest(cfg.GoogleApplicationCredentials, cloudFunctionURL, cloudFunctionURL); err != nil { + log.Fatalf("Failed to make GET request: %v", err) + } if *grpcEndpoint == "" { log.Fatal("[main] unable to start client without gRPC endpoint to server") } @@ -65,3 +82,31 @@ func NewClient(conn *grpc.ClientConn) *Client { func (c *Client) Ping(ctx context.Context, r *pb.PingRequest) (*pb.PingResponse, error) { return c.client.Ping(ctx, r) } + +// `makeGetRequest` makes a request to the provided `targetURL` +// with an authenticated client using audience `audience`. +func makeGetRequest(credsPath, targetURL, audience string) error { + ctx := context.Background() + + // client is a http.Client that automatically adds an "Authorization" header + // to any requests made. + client, err := idtoken.NewClient(ctx, audience, option.WithCredentialsFile(credsPath)) + if err != nil { + return fmt.Errorf("idtoken.NewClient: %w", err) + } + + resp, err := client.Get(targetURL) + if err != nil { + return fmt.Errorf("client.Get: %w", err) + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + return fmt.Errorf("ioutil.ReadAll: %w", err) + } + + log.Printf("Cloud Function response: %s", string(body)) + + return nil +} diff --git a/backend/go.mod b/backend/go.mod index 58e1d2d5..ebf9f509 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -5,6 +5,7 @@ go 1.21.5 require ( entgo.io/ent v0.13.0 github.com/google/uuid v1.5.0 + google.golang.org/api v0.157.0 ) require ( @@ -28,7 +29,6 @@ require ( golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.157.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240122161410-6c6643bf1457 // indirect diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart deleted file mode 100644 index 9ebc0cdf..00000000 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbserver.dart +++ /dev/null @@ -1,43 +0,0 @@ -// -// Generated code. Do not modify. -// source: where_child_bus/v1/child_photo.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'child_photo.pb.dart' as $4; -import 'child_photo.pbjson.dart'; - -export 'child_photo.pb.dart'; - -abstract class ChildPhotoServiceBase extends $pb.GeneratedService { - $async.Future<$4.DeleteChildPhotoResponse> deleteChildPhoto($pb.ServerContext ctx, $4.DeleteChildPhotoRequest request); - - $pb.GeneratedMessage createRequest($core.String methodName) { - switch (methodName) { - case 'DeleteChildPhoto': return $4.DeleteChildPhotoRequest(); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String methodName, $pb.GeneratedMessage request) { - switch (methodName) { - case 'DeleteChildPhoto': return this.deleteChildPhoto(ctx, request as $4.DeleteChildPhotoRequest); - default: throw $core.ArgumentError('Unknown method: $methodName'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => ChildPhotoServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => ChildPhotoServiceBase$messageJson; -} - From a4df62b70f10c4673cca604165f7fab7b186a02b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 13 Feb 2024 23:08:30 +0900 Subject: [PATCH 243/771] =?UTF-8?q?feat:=E3=83=9E=E3=83=BC=E3=82=AF?= =?UTF-8?q?=E3=81=AE=E4=BD=8D=E7=BD=AE=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../child_list/child_list_with_mark.dart | 42 +++++++++++++++++++ .../element/child_list_element_with_mark.dart | 22 ++++++++-- .../bus_passenger_page.dart | 6 +-- 3 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart b/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart new file mode 100644 index 00000000..d16937a0 --- /dev/null +++ b/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart @@ -0,0 +1,42 @@ +import "package:flutter/material.dart"; +import "package:where_child_bus/components/child_list/element/child_list_element_with_mark.dart"; + +class ChildListWithMark extends StatefulWidget { + final List childNames; + final List groupNames; + final List images; + final VoidCallback? callback; + + const ChildListWithMark({ + Key? key, + required this.childNames, + required this.groupNames, + required this.images, + this.callback, + }) : super(key: key); + + @override + _ChildListWithMarkState createState() => _ChildListWithMarkState(); +} + +class _ChildListWithMarkState extends State { + @override + Widget build(BuildContext context) { + return ListView.separated( + itemCount: widget.childNames.length, + separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), + itemBuilder: (BuildContext context, int index) => childListElement(context, index), + ); + } + + Widget childListElement(BuildContext context, int index) { + return ChildListElementWithMark( + title: widget.childNames[index], + subtitle: widget.groupNames[index], + imagePath: "assets/images/face_${widget.images[index]}.png", + onTap: () { + widget.callback!(); + } + ); + } +} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart index 10a62e9b..6eb0ef26 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart @@ -1,13 +1,11 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; -// ChildListElementを再利用する新しいStatefulWidgetクラス class ChildListElementWithMark extends StatefulWidget { final String title; final String subtitle; final String imagePath; final VoidCallback? onTap; - final Widget mark; // マークを表示するためのウィジェット const ChildListElementWithMark({ Key? key, @@ -15,7 +13,6 @@ class ChildListElementWithMark extends StatefulWidget { required this.subtitle, required this.imagePath, this.onTap, - required this.mark, }) : super(key: key); @override @@ -23,6 +20,7 @@ class ChildListElementWithMark extends StatefulWidget { } class _ChildListElementWithMarkState extends State { + //TODO:将来的にはChildのListを受け取ってマークを動的に変える @override Widget build(BuildContext context) { // ChildListElementを再利用して、actionButtonとしてmarkを渡す @@ -33,8 +31,24 @@ class _ChildListElementWithMarkState extends State { onTap: widget.onTap, actionButton: Padding( padding: const EdgeInsets.only(left: 16), // マークと他の要素との間隔を調整 - child: widget.mark, + child: markRide(), ), ); } + + Widget markRide() { + return const SizedBox( + width: 100, + height: 100, + child: Card(), + ); + } + + Widget markNotRide() { + return const SizedBox( + width: 100, + height: 100, + child: Card(), + ); + } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart index aa32c1e6..4227ac6f 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart @@ -1,6 +1,5 @@ import "package:flutter/material.dart"; -import "package:where_child_bus/app.dart"; -import "package:where_child_bus/components/child_list/child_list.dart"; +import "package:where_child_bus/components/child_list/child_list_with_mark.dart"; class BusPassengerPage extends StatefulWidget { final List name = [ @@ -45,6 +44,7 @@ class _BusPassengerPage extends State { } Widget pageBody() { - return ChildList(childNames: widget.name, groupNames: widget.group, images: widget.image); + //TODO:将来的にはChildのリストを渡す + return ChildListWithMark(childNames: widget.name, groupNames: widget.group, images: widget.image); } } \ No newline at end of file From 0bafbb5727d522cc4e82590b8f3b1f2dd5cba0e8 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 23:44:09 +0900 Subject: [PATCH 244/771] =?UTF-8?q?feat:=20=E5=AD=90=E4=BE=9B=E3=83=87?= =?UTF-8?q?=E3=83=BC=E3=82=BF=E3=81=AE=E4=BD=9C=E6=88=90=E3=81=AE=E6=9C=80?= =?UTF-8?q?=E5=BE=8C=E3=81=ABCloudFunction=E3=82=92=E5=91=BC=E3=81=B3?= =?UTF-8?q?=E5=87=BA=E3=81=99=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/client/main.go | 4 +-- backend/config/config.go | 42 ++++++++++++---------- backend/usecases/child/child.go | 6 ++++ backend/usecases/utils/cloud_function.go | 46 ++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 20 deletions(-) create mode 100644 backend/usecases/utils/cloud_function.go diff --git a/backend/cmd/client/main.go b/backend/cmd/client/main.go index 82842fd2..02a57f82 100644 --- a/backend/cmd/client/main.go +++ b/backend/cmd/client/main.go @@ -85,12 +85,12 @@ func (c *Client) Ping(ctx context.Context, r *pb.PingRequest) (*pb.PingResponse, // `makeGetRequest` makes a request to the provided `targetURL` // with an authenticated client using audience `audience`. -func makeGetRequest(credsPath, targetURL, audience string) error { +func makeGetRequest(credsPath, targetURL string) error { ctx := context.Background() // client is a http.Client that automatically adds an "Authorization" header // to any requests made. - client, err := idtoken.NewClient(ctx, audience, option.WithCredentialsFile(credsPath)) + client, err := idtoken.NewClient(ctx, targetURL, option.WithCredentialsFile(credsPath)) if err != nil { return fmt.Errorf("idtoken.NewClient: %w", err) } diff --git a/backend/config/config.go b/backend/config/config.go index 1922b5c9..76fa428b 100644 --- a/backend/config/config.go +++ b/backend/config/config.go @@ -8,23 +8,27 @@ import ( ) type Config struct { - DSN string `envconfig:"DSN" required:"true"` - DBUser string `envconfig:"DB_USER_NAME" required:"true"` - DBPassword string `envconfig:"DB_PASSWORD" required:"true"` - DBAddress string `envconfig:"DB_ADDR" required:"true"` - DBName string `envconfig:"DB_NAME" required:"true"` - GrpcPort string `envconfig:"PORT" default:"50051"` - ModeDev bool `envconfig:"MODE_DEV" default:"true"` - GoogleApplicationCredentials string `envconfig:"GOOGLE_APPLICATION_CREDENTIALS" required:"true"` - StorageBucketName string `envconfig:"STORAGE_BUCKET_NAME" required:"true"` - PasswordPepper string `envconfig:"PASSWORD_PEPPER" required:"true"` + DSN string `envconfig:"DSN" required:"true"` + DBUser string `envconfig:"DB_USER_NAME" required:"true"` + DBPassword string `envconfig:"DB_PASSWORD" required:"true"` + DBAddress string `envconfig:"DB_ADDR" required:"true"` + DBName string `envconfig:"DB_NAME" required:"true"` + GrpcPort string `envconfig:"PORT" default:"50051"` + ModeDev bool `envconfig:"MODE_DEV" default:"true"` + GoogleApplicationCredentials string `envconfig:"GOOGLE_APPLICATION_CREDENTIALS" required:"true"` + StorageBucketName string `envconfig:"STORAGE_BUCKET_NAME" required:"true"` + PasswordPepper string `envconfig:"PASSWORD_PEPPER" required:"true"` + EndPointPingRequest string `default:"https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionHealthCheck"` + EndPointCreateChildNotification string `default:"https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionCreateChildNotification"` + EndPointCreateBusNotification string `default:"https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionCreateBusNotification"` + EndPointChildGetOnBusNotification string `default:"https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionChildGetOnBusNotification"` + EndPointChildGetOffBusNotification string `default:"https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionChildGetOffBusNotification"` } func New() (*Config, error) { // .env ファイルから環境変数を読み込む if err := godotenv.Load(); err != nil { - log.Println("Error loading .env file") - return nil, err + log.Println("No .env file found or error loading .env file, continuing with environment variables") } config := &Config{} @@ -33,12 +37,14 @@ func New() (*Config, error) { return nil, err } - // デバッグログを出力 - log.Println("DSN:", config.DSN) - log.Println("DB User:", config.DBUser) - log.Println("DB Address:", config.DBAddress) - log.Println("DB Name:", config.DBName) - log.Println("Port:", config.GrpcPort) + // 開発モードが有効な場合にのみデバッグログを出力 + if config.ModeDev { + log.Println("DSN:", config.DSN) + log.Println("DB User:", config.DBUser) + log.Println("DB Address:", config.DBAddress) + log.Println("DB Name:", config.DBName) + log.Println("Port:", config.GrpcPort) + } return config, nil } diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index d2d049ce..ead50f08 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -9,6 +9,7 @@ import ( "context" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" @@ -119,6 +120,11 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest } commit = true // トランザクションが成功した + // 最後にCloudFunctionに通知を送信 + // TODO: 将来的に子供作成の通知にする + cfg, err := config.New() + utils.MakeCloudFunctionRequest(cfg.EndPointPingRequest, "POST") + return &pb.CreateChildResponse{ Child: utils.ToPbChild(child), }, nil diff --git a/backend/usecases/utils/cloud_function.go b/backend/usecases/utils/cloud_function.go new file mode 100644 index 00000000..1dff9521 --- /dev/null +++ b/backend/usecases/utils/cloud_function.go @@ -0,0 +1,46 @@ +package utils + +import ( + "context" + "fmt" + "io" + "net/http" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" + "google.golang.org/api/idtoken" + "google.golang.org/api/option" +) + +// MakeCloudFunctionRequest makes a request to the provided targetURL +// with an authenticated client using audience. It returns the response body. +func MakeCloudFunctionRequest(targetURL, method string) (string, error) { + cfg, err := config.New() + + ctx := context.Background() + client, err := idtoken.NewClient(ctx, targetURL, option.WithCredentialsFile(cfg.GoogleApplicationCredentials)) + if err != nil { + return "", fmt.Errorf("idtoken.NewClient: %w", err) + } + + var resp *http.Response + switch method { + case "GET": + resp, err = client.Get(targetURL) + case "POST": + resp, err = client.Post(targetURL, "application/json", nil) // Note: In a real scenario, you might want to pass a non-nil body for POST requests. + default: + return "", fmt.Errorf("unsupported method: %s", method) + } + + if err != nil { + return "", fmt.Errorf("%s request failed: %w", method, err) + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + return "", fmt.Errorf("reading response body failed: %w", err) + } + + return string(body), nil +} From 9d85775f33fac13bd726cd48f0d48c3ab5f14fe7 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 13 Feb 2024 23:44:43 +0900 Subject: [PATCH 245/771] =?UTF-8?q?fix:=20Cloud=20Function=E3=81=B8?= =?UTF-8?q?=E3=81=AEGET=E3=83=AA=E3=82=AF=E3=82=A8=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=81=AE=E4=BD=9C=E6=88=90=E6=96=B9=E6=B3=95=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/client/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/cmd/client/main.go b/backend/cmd/client/main.go index 02a57f82..94a0d091 100644 --- a/backend/cmd/client/main.go +++ b/backend/cmd/client/main.go @@ -32,7 +32,7 @@ func main() { } // Cloud Functionに対して認証済みGETリクエストを行う - if err := makeGetRequest(cfg.GoogleApplicationCredentials, cloudFunctionURL, cloudFunctionURL); err != nil { + if err := makeGetRequest(cfg.GoogleApplicationCredentials, cloudFunctionURL); err != nil { log.Fatalf("Failed to make GET request: %v", err) } if *grpcEndpoint == "" { From f45132e24058506fa2a7675860e345445c551ee2 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 00:27:52 +0900 Subject: [PATCH 246/771] refactor: Add environment variables for API endpoints --- backend/.env.example | 7 ++++++- backend/config/config.go | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/backend/.env.example b/backend/.env.example index 7a97dd4c..c2dfb74f 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -7,4 +7,9 @@ PORT= MODE_DEV= GOOGLE_APPLICATION_CREDENTIALS= STORAGE_BUCKET_NAME= -PASSWORD_PEPPER= \ No newline at end of file +PASSWORD_PEPPER= +ENDPOINT_PING_REQUEST= +ENDPOINT_CREATE_CHILD_NOTIFICATION= +ENDPOINT_CREATE_BUS_NOTIFICATION= +ENDPOINT_CHILD_GET_ON_BUS_NOTIFICATION= +ENDPOINT_CHILD_GET_OFF_BUS_NOTIFICATION= \ No newline at end of file diff --git a/backend/config/config.go b/backend/config/config.go index 76fa428b..b12a5f15 100644 --- a/backend/config/config.go +++ b/backend/config/config.go @@ -18,11 +18,11 @@ type Config struct { GoogleApplicationCredentials string `envconfig:"GOOGLE_APPLICATION_CREDENTIALS" required:"true"` StorageBucketName string `envconfig:"STORAGE_BUCKET_NAME" required:"true"` PasswordPepper string `envconfig:"PASSWORD_PEPPER" required:"true"` - EndPointPingRequest string `default:"https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionHealthCheck"` - EndPointCreateChildNotification string `default:"https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionCreateChildNotification"` - EndPointCreateBusNotification string `default:"https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionCreateBusNotification"` - EndPointChildGetOnBusNotification string `default:"https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionChildGetOnBusNotification"` - EndPointChildGetOffBusNotification string `default:"https://us-central1-wherechildbus.cloudfunctions.net/CloudFunctionChildGetOffBusNotification"` + EndPointPingRequest string `envconfig:"ENDPOINT_PING_REQUEST" required:"true"` + EndPointCreateChildNotification string `envconfig:"ENDPOINT_CREATE_CHILD_NOTIFICATION" required:"true"` + EndPointCreateBusNotification string `envconfig:"ENDPOINT_CREATE_BUS_NOTIFICATION" required:"true"` + EndPointChildGetOnBusNotification string `envconfig:"ENDPOINT_CHILD_GET_ON_BUS_NOTIFICATION" required:"true"` + EndPointChildGetOffBusNotification string `envconfig:"ENDPOINT_CHILD_GET_OFF_BUS_NOTIFICATION" required:"true"` } func New() (*Config, error) { From 4cd8800d624912ffccf36a578744d822dbe29892 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 00:28:00 +0900 Subject: [PATCH 247/771] ci: Add DockerfileLocal for local development --- backend/DockerfileLocal | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 backend/DockerfileLocal diff --git a/backend/DockerfileLocal b/backend/DockerfileLocal new file mode 100644 index 00000000..5a85d0b1 --- /dev/null +++ b/backend/DockerfileLocal @@ -0,0 +1,30 @@ +# First stage: build environment +FROM golang:1.21.5 AS builder + +WORKDIR /srv/grpc +COPY . . + +RUN go mod download + +ARG VERS="3.11.4" +ARG ARCH="linux-x86_64" + +RUN CGO_ENABLED=0 GOOS=linux \ + go build -a -installsuffix cgo \ + -o /go/bin/server \ + github.com/GreenTeaProgrammers/WhereChildBus/backend/cmd/server + +# Final stage: runtime environment +# CA証明書が必要なので、alpineをベースにする +FROM alpine:latest + +# 必要なパッケージをインストール +RUN apk --no-cache add ca-certificates + +# ビルドステージからバイナリと.envファイルをコピー +COPY --from=builder /go/bin/server /server +COPY --from=builder /srv/grpc/.env / +COPY --from=builder /srv/grpc/secrets /secrets + +# アプリケーションの起動 +ENTRYPOINT ["/server"] \ No newline at end of file From 1a7253aa00048e3320caa34a1791247aee9777d6 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 00:45:10 +0900 Subject: [PATCH 248/771] =?UTF-8?q?update:=E3=83=88=E3=82=B0=E3=83=AB?= =?UTF-8?q?=E3=83=9C=E3=82=BF=E3=83=B3=E3=81=AE=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/check_page/check_page.dart | 68 +++++++++---------- .../where_child_bus_guardian/pubspec.lock | 9 +++ .../where_child_bus_guardian/pubspec.yaml | 1 + 3 files changed, 41 insertions(+), 37 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index 603a956c..4734ff63 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter_toggle_tab/flutter_toggle_tab.dart'; import '../components/utils/current_time_body.dart'; class CheckPage extends StatefulWidget { @@ -42,9 +43,9 @@ class _CheckPageState extends State { padding: const EdgeInsets.only(top: 20), child: Column( children: [ - busTitleAndToggleSwitch( + busTitleAndToggleButton( context, "朝のバス", isRideMorningBus, true), - busTitleAndToggleSwitch( + busTitleAndToggleButton( context, "夕方のバス", isRideEveningBus, false), ], ), @@ -53,49 +54,42 @@ class _CheckPageState extends State { )); } - Widget busTitleAndToggleSwitch( + Widget busTitleAndToggleButton( BuildContext context, String title, bool isRide, bool isMorning) { return Column(children: [ - Text(title), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - displayRideOrNot(context, isRide), - toggleSwitch(context, isRide, isMorning), - ], + Padding( + padding: const EdgeInsets.all(10.0), + child: Text(title, style: const TextStyle(fontSize: 16)), ), + toggleSwitch(context, isRide, isMorning), ]); } Widget toggleSwitch(BuildContext context, bool isRide, bool isMorning) { - return SizedBox( - width: MediaQuery.of(context).size.width * 0.3, - child: Switch( - value: !isRide, - onChanged: (value) { - setState(() { - isMorning - ? isRideMorningBus = !value - : isRideEveningBus = !value; - }); - })); - } - - Widget displayRideOrNot(BuildContext context, bool isRide) { - return Container( - padding: const EdgeInsets.all(10.0), - width: MediaQuery.of(context).size.width * 0.3, - decoration: BoxDecoration( - color: isRide ? Colors.green[100] : Colors.red[100], - borderRadius: BorderRadius.circular(5), - border: Border.all(color: isRide ? Colors.green : Colors.red)), - child: Text( - isRide ? "乗る" : "乗らない", - style: TextStyle( - color: isRide ? Colors.green : Colors.red, - fontWeight: FontWeight.bold), - textAlign: TextAlign.center, + int selectedIndex = isRide ? 0 : 1; + return FlutterToggleTab( + width: 70, + height: 50, + borderRadius: 15, + selectedBackgroundColors: const [Colors.blue], + selectedTextStyle: const TextStyle( + color: Colors.white, + fontSize: 16, + ), + unSelectedTextStyle: const TextStyle( + color: Colors.black, + fontSize: 14, ), + labels: const ["乗る", "乗らない"], + selectedIndex: selectedIndex, + selectedLabelIndex: (index) { + setState(() { + isMorning + ? isRideMorningBus = index == 0 + : isRideEveningBus = index == 0; + }); + }, + marginSelected: const EdgeInsets.symmetric(horizontal: 3, vertical: 4), ); } } diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index d0f3b00d..f89addc7 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -123,6 +123,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_toggle_tab: + dependency: "direct main" + description: + name: flutter_toggle_tab + sha256: "90ad0d050f656df677998825f985637d010117a1793828cd7e6dadada4ecd2c5" + url: "https://pub.dev" + source: hosted + version: "1.4.1" googleapis_auth: dependency: transitive description: @@ -306,3 +314,4 @@ packages: version: "0.3.0" sdks: dart: ">=3.2.6 <4.0.0" + flutter: ">=1.17.0" diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index 040f79e4..c5a24e9a 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -15,6 +15,7 @@ dependencies: flutter_dotenv: ^5.1.0 cupertino_icons: ^1.0.2 + flutter_toggle_tab: ^1.4.1 dev_dependencies: flutter_test: From 398a0b88a7263db426ea709113c5b78f066745cd Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 00:55:57 +0900 Subject: [PATCH 249/771] =?UTF-8?q?refactor:=E4=B9=97=E8=BB=8A=E6=9C=89?= =?UTF-8?q?=E7=84=A1=E3=81=AE=E7=8A=B6=E6=85=8B=E3=82=92=E3=82=BB=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=99=E3=82=8B=E9=96=A2=E6=95=B0=E3=82=92=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/check_page/check_page.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index 4734ff63..630f4ff7 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -84,12 +84,18 @@ class _CheckPageState extends State { selectedIndex: selectedIndex, selectedLabelIndex: (index) { setState(() { - isMorning - ? isRideMorningBus = index == 0 - : isRideEveningBus = index == 0; + setRideState(isMorning, index); }); }, marginSelected: const EdgeInsets.symmetric(horizontal: 3, vertical: 4), ); } + + void setRideState(bool isMorning, int index) { + if (isMorning) { + isRideMorningBus = index == 0; + } else { + isRideEveningBus = index == 0; + } + } } From e900729fb8856e238143119330e4d14641add255 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 00:56:07 +0900 Subject: [PATCH 250/771] =?UTF-8?q?refactor:=E3=82=A6=E3=82=A3=E3=82=B8?= =?UTF-8?q?=E3=82=A7=E3=83=83=E3=83=88=E3=82=92=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/auth_page/auth_page.dart | 132 +++++++++++------- 1 file changed, 80 insertions(+), 52 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index 1d6b8ea4..f3ed12e0 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -18,60 +18,88 @@ class _AuthPageState extends State { return GestureDetector( onTap: () => FocusScope.of(context).unfocus(), child: Scaffold( - body: Center( - child: Padding( - padding: const EdgeInsets.all(32), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - 'WhereChildBus', - style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold), - ), - const SizedBox(height: 32), - Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: 'メールアドレス', - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - ), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: 'パスワード', - ), - controller: _passwordController, - obscureText: true, - keyboardType: TextInputType.visiblePassword, - ), - ), - const SizedBox(height: 32), - SizedBox( - width: MediaQuery.of(context).size.width * 0.6, - child: ElevatedButton( - onPressed: () { - if (kDebugMode) { - debugPrint("email: ${_emailController.text}"); - debugPrint("password: ${_passwordController.text}"); - } - nurseryLogin( - _emailController.text, _passwordController.text); - }, - child: const Text('ログイン'), - ), - ) - ], - ), - ), + body: pageBody(), + ), + ); + } + + Widget pageBody() { + return Center( + child: Padding( + padding: const EdgeInsets.all(32), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + titleText(), + mailInputField(), + passwordInputField(), + spacer32(), + loginButton(), + ], + ), + ), + ); + } + + Widget titleText() { + return const Padding( + padding: EdgeInsets.only(bottom: 32), + child: Text( + 'WhereChildBus', + style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold), + ), + ); + } + + Widget mailInputField() { + return Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'メールアドレス', ), + controller: _emailController, + keyboardType: TextInputType.emailAddress, ), ); } + + Widget passwordInputField() { + return Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'パスワード', + ), + controller: _passwordController, + obscureText: true, + keyboardType: TextInputType.visiblePassword, + ), + ); + } + + Widget loginButton() { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + child: ElevatedButton( + onPressed: () { + if (kDebugMode) { + debugPrint("email: ${_emailController.text}"); + debugPrint("password: ${_passwordController.text}"); + } + nurseryLogin( + _emailController.text, _passwordController.text); + }, + child: const Text('ログイン'), + ), + ); + } + + Widget spacer32() { + return const SizedBox( + height: 32, + ); + } } From 007dfd08a7c7f56d49a2e9e80f9fbc9cec83bcab Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 14 Feb 2024 01:12:21 +0900 Subject: [PATCH 251/771] =?UTF-8?q?chore(ml):=20resize=E6=99=82=E3=81=AE?= =?UTF-8?q?=E3=82=A2=E3=83=AB=E3=82=B4=E3=83=AA=E3=82=BA=E3=83=A0=E3=82=92?= =?UTF-8?q?INTER=5FCUBIC(=E3=83=90=E3=82=A4=E3=82=AD=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=83=93=E3=83=83=E3=82=AF=E8=A3=9C=E9=96=93=E6=B3=95)?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/data/detectFaceUtil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/data/detectFaceUtil.py b/machine_learning/src/face_detect_model/data/detectFaceUtil.py index ea3e2a01..29b0b7e9 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceUtil.py +++ b/machine_learning/src/face_detect_model/data/detectFaceUtil.py @@ -22,7 +22,7 @@ def clip_and_resize_face(face, image, image_size): """検出された顔をクリップし、指定サイズにリサイズする""" (x, y, w, h) = face face_roi = image[y : y + h, x : x + w] - resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_AREA) + resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_CUBIC) return resized_face From 5d01d9db48ef04dab70804d12b8c873ec9f2a356 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 01:13:30 +0900 Subject: [PATCH 252/771] =?UTF-8?q?chore:TODO=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/check_page/check_page.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index 630f4ff7..bf314890 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -91,6 +91,7 @@ class _CheckPageState extends State { ); } + //TODO: 将来的にバックエンドとの通信を行う void setRideState(bool isMorning, int index) { if (isMorning) { isRideMorningBus = index == 0; From 5142d4500d200af0cc335d652fc602ffacaf0b38 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 14 Feb 2024 01:13:47 +0900 Subject: [PATCH 253/771] fix(ml): typo --- .../src/face_detect_model/data/detectFaceAndClip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py index cf1f1d28..b58fe4ba 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -28,9 +28,9 @@ def load_image(args, blobs=None): # 画像の読み込み images = [] if args.env == "local": - for image_path in os.listdir(args.image_dir_path): + for image_path in os.listdir(args.img_dir_path): logger.info(f"loading: {image_path}") - image = cv2.imread(args.image_dir_path + image_path) + image = cv2.imread(args.img_dir_path + image_path) if image is None: logger.error(f"Can not find or load : {image_path}") continue From 39e9b03dfb5fe35cbbbe58e1e685ccbdcc1bcac2 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 01:15:01 +0900 Subject: [PATCH 254/771] =?UTF-8?q?move:=E7=8F=BE=E5=9C=A8=E6=99=82?= =?UTF-8?q?=E5=88=BB=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=82=92=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/{pages => }/components/utils/current_time_body.dart | 0 .../lib/{pages => }/components/utils/current_time_widget.dart | 0 .../lib/pages/check_page/check_page.dart | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename frontend/where_child_bus_guardian/lib/{pages => }/components/utils/current_time_body.dart (100%) rename frontend/where_child_bus_guardian/lib/{pages => }/components/utils/current_time_widget.dart (100%) diff --git a/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart b/frontend/where_child_bus_guardian/lib/components/utils/current_time_body.dart similarity index 100% rename from frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_body.dart rename to frontend/where_child_bus_guardian/lib/components/utils/current_time_body.dart diff --git a/frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_widget.dart b/frontend/where_child_bus_guardian/lib/components/utils/current_time_widget.dart similarity index 100% rename from frontend/where_child_bus_guardian/lib/pages/components/utils/current_time_widget.dart rename to frontend/where_child_bus_guardian/lib/components/utils/current_time_widget.dart diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index bf314890..66618b33 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_toggle_tab/flutter_toggle_tab.dart'; -import '../components/utils/current_time_body.dart'; +import '../../components/utils/current_time_body.dart'; class CheckPage extends StatefulWidget { const CheckPage({super.key}); From 6928e08985ff1ac67188e617bcffe1af790c2d0f Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 14 Feb 2024 01:22:43 +0900 Subject: [PATCH 255/771] =?UTF-8?q?refactor(ml):=20=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E8=AA=AD=E3=81=BF=E8=BE=BC=E3=81=BF=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E9=96=A2=E6=95=B0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/detectFaceAndClip.py | 59 +++++++++++-------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py index b58fe4ba..65d68445 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -25,34 +25,43 @@ def load_image(args, blobs=None): - # 画像の読み込み - images = [] + """画像の読み込みを行うラッパー関数""" if args.env == "local": - for image_path in os.listdir(args.img_dir_path): - logger.info(f"loading: {image_path}") - image = cv2.imread(args.img_dir_path + image_path) - if image is None: - logger.error(f"Can not find or load : {image_path}") - continue - images.append(image) + return load_image_fromm_local(args.img_dir_path) elif args.env == "remote": + return load_image_from_remote(args.nursery_id, args.child_id, blobs) + - for blob in blobs: - logger.info(f"loading: {blob.name}") - if blob.name.endswith("/"): - logger.info(f"skip: {blob.name}") - continue - - # バイトデータから numpy 配列を作成 - image_data = blob.download_as_string() - image_array = np.frombuffer(image_data, dtype=np.uint8) - - # cv2.imdecode でバイト配列を画像に変換 - image = cv2.imdecode(image_array, cv2.IMREAD_COLOR) - if image is None: - logger.error(f"Can not load: {blob.name}") - continue - images.append(image) +def load_image_fromm_local(img_dir_path): + images = [] + for image_path in os.listdir(img_dir_path): + logger.info(f"loading: {image_path}") + image = cv2.imread(img_dir_path + image_path) + if image is None: + logger.error(f"Can not find or load : {image_path}") + continue + images.append(image) + return images + + +def load_image_from_remote(nursery_id, child_id, blobs): + images = [] + for blob in blobs: + logger.info(f"loading: {blob.name}") + if blob.name.endswith("/"): + logger.info(f"skip: {blob.name}") + continue + + # バイトデータから numpy 配列を作成 + image_data = blob.download_as_string() + image_array = np.frombuffer(image_data, dtype=np.uint8) + + # cv2.imdecode でバイト配列を画像に変換 + image = cv2.imdecode(image_array, cv2.IMREAD_COLOR) + if image is None: + logger.error(f"Can not load: {blob.name}") + continue + images.append(image) return images From 32db6efdcea94160374c804ea35f23697017d762 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 14 Feb 2024 01:38:36 +0900 Subject: [PATCH 256/771] =?UTF-8?q?chore(ml):=20secrets=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_learning/.gitignore b/machine_learning/.gitignore index b1662f4c..6967495b 100644 --- a/machine_learning/.gitignore +++ b/machine_learning/.gitignore @@ -1,7 +1,7 @@ # Created by https://www.toptal.com/developers/gitignore/api/macos,python,visualstudiocode # Edit at https://www.toptal.com/developers/gitignore?templates=macos,python,visualstudiocode -service_account_where_child_bus.json +secrets/ ### macOS ### # General From 65cfa736f9e7701d650e380ecfdd35629fece322 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 14 Feb 2024 01:40:20 +0900 Subject: [PATCH 257/771] =?UTF-8?q?refactor(ml):=20=E3=81=84=E3=81=8F?= =?UTF-8?q?=E3=81=A4=E3=81=8B=E3=81=AE=E5=87=A6=E7=90=86=E3=81=AE=E9=96=A2?= =?UTF-8?q?=E6=95=B0=E5=8C=96=E3=83=BB=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/detectFaceAndClip.py | 45 ++++++++++++------- .../face_detect_model/data/detectFaceUtil.py | 8 ---- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py index 65d68445..0283e431 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/data/detectFaceAndClip.py @@ -11,10 +11,9 @@ load_cascade, detect_face, clip_and_resize_face, - save_face, ) -load_dotenv() +load_dotenv("secrets/.env") logging.basicConfig( format="%(asctime)s - %(levelname)s - %(name)s - PID: %(process)d - %(message)s", @@ -65,6 +64,25 @@ def load_image_from_remote(nursery_id, child_id, blobs): return images +def save_face_image_to_local(face, save_dir, save_file_name): + """クリップされた顔画像を保存する""" + os.makedirs(save_dir, exist_ok=True) + + save_path = os.path.join(save_dir, save_file_name) + cv2.imwrite(save_path, face) + + +def save_face_image_to_remote(face, save_blob_name, bucket): + from google.cloud.storage import Blob + + """クリップされた顔画像をGCSに保存する""" + _, encoded_image = cv2.imencode(".png", face) + png_cliped_face_data = encoded_image.tobytes() + + save_blob = Blob(save_blob_name, bucket) + save_blob.upload_from_string(data=png_cliped_face_data, content_type="image/png") + + def main(args): logger.info(f"env: {args.env}") with open("src/face_detect_model/config.yaml", "r") as f: @@ -76,15 +94,17 @@ def main(args): config["face_detect"]["clip_size"]["width"], ) + # 保存先ディレクトリの作成,存在した場合は中身を削除 if args.env == "local": save_dir_path = args.save_dir_path - # 保存先ディレクトリの作成,存在した場合は中身を削除 os.makedirs(save_dir_path, exist_ok=True) for file in os.listdir(save_dir_path): file_path = os.path.join(save_dir_path, file) if os.path.isfile(file_path): os.remove(file_path) - elif args.env == "remote": + + # GCSとの接続 + if args.env == "remote": from google.oauth2 import service_account import google.cloud.storage as gcs @@ -112,9 +132,6 @@ def main(args): images = load_image(args, blobs=blobs) logger.info("Detecting faces...") - if args.env == "remote": - from google.cloud.storage import Blob - detect_face_num = 0 for image in images: faces = detect_face( @@ -133,18 +150,12 @@ def main(args): clipped_face = clip_and_resize_face(face, image, image_size) if args.env == "local": save_file_name = f"{detect_face_num}.png" - logger.info(f"saving: {save_file_name}") - save_face(clipped_face, save_dir_path, save_file_name) + logger.info(f"save: {save_file_name}") + save_face_image_to_local(clipped_face, save_dir_path, save_file_name) elif args.env == "remote": - _, encoded_image = cv2.imencode(".png", clipped_face) - png_cliped_face_data = encoded_image.tobytes() - save_blob_name = f"{args.nursery_id}/{args.child_id}/clipped/{args.child_id}-{detect_face_num}.png" - logger.info(f"uploading: {save_blob_name}") - save_blob = Blob(save_blob_name, bucket) - save_blob.upload_from_string( - data=png_cliped_face_data, content_type="image/png" - ) + logger.info(f"save: {save_blob_name}") + save_face_image_to_remote(clipped_face, save_blob_name, bucket) detect_face_num += 1 logger.info("Done") diff --git a/machine_learning/src/face_detect_model/data/detectFaceUtil.py b/machine_learning/src/face_detect_model/data/detectFaceUtil.py index 29b0b7e9..00726dc4 100644 --- a/machine_learning/src/face_detect_model/data/detectFaceUtil.py +++ b/machine_learning/src/face_detect_model/data/detectFaceUtil.py @@ -24,11 +24,3 @@ def clip_and_resize_face(face, image, image_size): face_roi = image[y : y + h, x : x + w] resized_face = cv2.resize(face_roi, image_size, interpolation=cv2.INTER_CUBIC) return resized_face - - -def save_face(face, save_dir, save_file_name): - """クリップされた顔画像を保存する""" - os.makedirs(save_dir, exist_ok=True) - - save_path = os.path.join(save_dir, save_file_name) - cv2.imwrite(save_path, face) From 03586e04274691fe7c2544a154cd3d415379e9e2 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 01:44:04 +0900 Subject: [PATCH 258/771] =?UTF-8?q?feat:=E3=83=AA=E3=82=AF=E3=82=A8?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=AE=E3=83=87=E3=83=90=E3=83=83=E3=82=B0?= =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=80=81=E5=8D=98=E7=B4=94=E3=81=AA=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=83=8F=E3=83=B3=E3=83=89=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=B0=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/auth_page/auth_page.dart | 30 ++++++++++++++----- .../lib/util/api/nursery_login.dart | 7 ++++- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index f3ed12e0..906ece58 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:where_child_bus/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart'; import 'package:where_child_bus/util/api/nursery_login.dart'; class AuthPage extends StatefulWidget { @@ -84,19 +85,32 @@ class _AuthPageState extends State { return SizedBox( width: MediaQuery.of(context).size.width * 0.6, child: ElevatedButton( - onPressed: () { - if (kDebugMode) { - debugPrint("email: ${_emailController.text}"); - debugPrint("password: ${_passwordController.text}"); - } - nurseryLogin( - _emailController.text, _passwordController.text); - }, + onPressed: () => login(), child: const Text('ログイン'), ), ); } + login() async { + try { + NurseryLoginResponse res = await nurseryLogin( + _emailController.text, _passwordController.text); + + if (res.success) { + print(res.success); + print(res.nursery.name); + // ログイン成功後の処理をここに記述 + } else { + // ログイン失敗時の処理をここに記述 + print('Login failed'); + } + } catch (e) { + // エラーハンドリング + print('An error occurred: $e'); + // エラーメッセージを表示するか、ユーザーに通知するなどの処理を行う + } + } + Widget spacer32() { return const SizedBox( height: 32, diff --git a/frontend/where_child_bus/lib/util/api/nursery_login.dart b/frontend/where_child_bus/lib/util/api/nursery_login.dart index 5b958c30..91362a9b 100644 --- a/frontend/where_child_bus/lib/util/api/nursery_login.dart +++ b/frontend/where_child_bus/lib/util/api/nursery_login.dart @@ -13,6 +13,11 @@ Future nurseryLogin(String email, String password) async { var client = NurseryServiceClient(channel); try { var req = NurseryLoginRequest(email: email, password: password); + + if(kDebugMode) { + print("リクエスト: ${req}"); + } + jk var res = await client.nurseryLogin(req); if (kDebugMode) { debugPrint(res.toString()); @@ -23,4 +28,4 @@ Future nurseryLogin(String email, String password) async { await channel.shutdown(); return Future.error(err); } -} +} \ No newline at end of file From 1b5a7bd6ff9fffc635f1629743f10e16e4224e8f Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 02:13:23 +0900 Subject: [PATCH 259/771] =?UTF-8?q?feat:=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=81=AE=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/auth_page/auth_page.dart | 49 +++++++++++++++---- .../lib/util/api/nursery_login.dart | 2 +- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index 906ece58..b96250ac 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -3,6 +3,14 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart'; import 'package:where_child_bus/util/api/nursery_login.dart'; +enum NurseryLoginError { + unknown, + invalidCredentials, + serverError, + networkError, + databaseError, + // 他のエラータイプをここに追加 +} class AuthPage extends StatefulWidget { const AuthPage({super.key}); @@ -14,6 +22,8 @@ class _AuthPageState extends State { final _emailController = TextEditingController(); final _passwordController = TextEditingController(); + NurseryLoginError? _loginError; + @override Widget build(BuildContext context) { return GestureDetector( @@ -25,18 +35,24 @@ class _AuthPageState extends State { } Widget pageBody() { + List columnChildren = [ + titleText(), + mailInputField(), + passwordInputField(), + spacer32(), + loginButton(), + ]; + + if (_loginError != null && _loginError == NurseryLoginError.invalidCredentials) { + columnChildren.add(emailOrPasswordNotFound()); + } + return Center( child: Padding( padding: const EdgeInsets.all(32), child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: [ - titleText(), - mailInputField(), - passwordInputField(), - spacer32(), - loginButton(), - ], + children: columnChildren, ), ), ); @@ -91,6 +107,19 @@ class _AuthPageState extends State { ); } + Widget emailOrPasswordNotFound() { + return const Padding( + padding: EdgeInsets.all(8.0), + child: Text( + "メールアドレスかパスワードが間違っています", + style: TextStyle( + color: Colors.red, + fontSize: 13, + ), + ), + ); + } + login() async { try { NurseryLoginResponse res = await nurseryLogin( @@ -105,9 +134,9 @@ class _AuthPageState extends State { print('Login failed'); } } catch (e) { - // エラーハンドリング - print('An error occurred: $e'); - // エラーメッセージを表示するか、ユーザーに通知するなどの処理を行う + setState(() { + _loginError = NurseryLoginError.invalidCredentials; + }); } } diff --git a/frontend/where_child_bus/lib/util/api/nursery_login.dart b/frontend/where_child_bus/lib/util/api/nursery_login.dart index 91362a9b..973e903e 100644 --- a/frontend/where_child_bus/lib/util/api/nursery_login.dart +++ b/frontend/where_child_bus/lib/util/api/nursery_login.dart @@ -17,7 +17,7 @@ Future nurseryLogin(String email, String password) async { if(kDebugMode) { print("リクエスト: ${req}"); } - jk + var res = await client.nurseryLogin(req); if (kDebugMode) { debugPrint(res.toString()); From 991bda244ed9136ac4b9586f30ea0fed84d8d5f4 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 02:13:28 +0900 Subject: [PATCH 260/771] =?UTF-8?q?feat:=E7=8F=BE=E5=9C=A8=E6=99=82?= =?UTF-8?q?=E5=88=BB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/daily_page/daily_page.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index e0dd2832..98997cb3 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus_guardian/components/utils/current_time_body.dart'; class DailyPage extends StatefulWidget { const DailyPage({super.key}); @@ -10,12 +11,13 @@ class DailyPage extends StatefulWidget { class _DailyPageState extends State { @override Widget build(BuildContext context) { - return const Center( + return Center( child: Column( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, children: [ - Text( - '日々の記録', + CurrentTimeBody(), + const SizedBox( + height: 50, ), ], ), From 9bc267a54dea5ffeb37b04b393e6d29296d4c0ff Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 02:18:52 +0900 Subject: [PATCH 261/771] =?UTF-8?q?feat:=E5=9C=92=E5=85=90=E3=81=AE?= =?UTF-8?q?=E5=86=99=E7=9C=9F=E3=81=A8=E8=A1=A8=E6=83=85=E3=80=81=E6=B0=8F?= =?UTF-8?q?=E5=90=8D=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/daily_page/daily_page.dart | 56 ++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index 98997cb3..dd9e6402 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -17,10 +17,64 @@ class _DailyPageState extends State { children: [ CurrentTimeBody(), const SizedBox( - height: 50, + height: 20, ), + childDailyRecordBody() ], ), ); } + + Widget childDailyRecordBody() { + return Container( + child: Column( + children: [ + childFaceAndExpression(), + Padding( + padding: EdgeInsets.only(top: 20, bottom: 20), + child: childName()), + ], + ), + ); + } + + Widget childFaceAndExpression() { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [childFaceImage(), childExpressionIcon()], + ); + } + + //TODO: 将来的に画像を受け取る + Widget childFaceImage() { + return const SizedBox( + width: 150, + height: 150, + child: Card( + color: Colors.grey, + child: Text("ここに子供の写真が入る"), + ), + ); + } + + //TODO: 将来的に表情を受け取る + Widget childExpressionIcon() { + return const SizedBox( + width: 100, + height: 100, + child: Card( + color: Colors.grey, + child: Text("ここに表情のアイコンが入る"), + ), + ); + } + + //将来的に名前を受け取る + Widget childName() { + return const Text( + "園児1", + style: TextStyle(fontSize: 24), + textAlign: TextAlign.center, + ); + } } From 3dd3df00ceb490fb0051cc2cb2ad2024535c4333 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 02:23:46 +0900 Subject: [PATCH 262/771] =?UTF-8?q?fix:NurseryLogin=E3=81=AE=E3=83=91?= =?UTF-8?q?=E3=82=B9=E3=83=AF=E3=83=BC=E3=83=89=E3=81=AE=E6=AF=94=E8=BC=83?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/nursery/nursery.go | 15 ++++++--------- backend/usecases/utils/utils.go | 6 ++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index 740a4d50..93c98367 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -23,13 +23,6 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { } func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginRequest) (*pb.NurseryLoginResponse, error) { - //パスワードをハッシュ化 - hashedPassword, err := utils.HashPassword(req.Password) - if err != nil { - //エラーハンドリング - return nil, fmt.Errorf("failed to hash password: %w", err) - } - //トランザクションを開始 tx, err := i.entClient.Tx(ctx) if err != nil { @@ -37,16 +30,20 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque } defer tx.Rollback() - //Nurseryを取得 + // Nurseryを取得 nursery, err := tx.Nursery.Query(). Where(nurseryRepo.Email(req.Email)). - Where(nurseryRepo.HashedPassword(string(hashedPassword))). Only(ctx) if err != nil { return nil, fmt.Errorf("failed to get nursery: %w", err) } + // フロントエンドから送られてきたパスワードとデータベースのハッシュ値を比較 + if !utils.CheckPassword(nursery.HashedPassword, req.Password) { + return nil, fmt.Errorf("failed to get nursery: %w", err) + } + //トランザクションをコミット if err := tx.Commit(); err != nil { return nil, fmt.Errorf("failed to commit transaction: %w", err) diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index d6ddd301..80be18e3 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -137,3 +137,9 @@ func HashPassword(password string) (string, error) { } return string(hashedPassword), nil } + +// ハッシュ化されたパスワードと送られてきたパスワードを比較 +func CheckPassword(hashedPassword string, plainPassword string) bool { + err := bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte(plainPassword)) + return err == nil +} From 2956d74d6416b9e9cdfcf714c075e3a0d63f1bd6 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 02:30:07 +0900 Subject: [PATCH 263/771] =?UTF-8?q?fix:GuardianLogin=E3=81=AE=E3=83=91?= =?UTF-8?q?=E3=82=B9=E3=83=AF=E3=83=BC=E3=83=89=E3=81=AE=E6=AF=94=E8=BC=83?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/guardian/guardian.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 3fd5cfde..2832a1db 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -23,13 +23,6 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { } func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginRequest) (*pb.GuardianLoginResponse, error) { - // パスワードをハッシュ化 - hashedPassword, err := utils.HashPassword(req.Password) - if err != nil { - // エラーハンドリング - return nil, fmt.Errorf("failed to hash password: %w", err) - } - // トランザクションを開始 tx, err := i.entClient.Tx(ctx) if err != nil { @@ -40,13 +33,17 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq // Guardianを取得 guardian, err := tx.Guardian.Query(). Where(guardianRepo.Email(req.Email)). - Where(guardianRepo.HashedPassword(string(hashedPassword))). Only(ctx) if err != nil { return nil, fmt.Errorf("failed to get guardian: %w", err) } + // フロントエンドから送られてきたパスワードとデータベースのハッシュ値を比較 + if !utils.CheckPassword(guardian.HashedPassword, req.Password) { + return nil, fmt.Errorf("failed to get guardian: %w", err) + } + // トランザクションをコミット if err := tx.Commit(); err != nil { return nil, fmt.Errorf("failed to commit transaction: %w", err) @@ -57,5 +54,4 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq Success: true, Guardian: utils.ToPbGuardianResponse(guardian), }, nil - } From 37261d834134708d246224f6fc0a2a38df703e64 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 02:33:05 +0900 Subject: [PATCH 264/771] =?UTF-8?q?feat(schema):=20is=5Fduplicate=E3=83=95?= =?UTF-8?q?=E3=82=A3=E3=83=BC=E3=83=AB=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/childphoto.go | 31 ++-- .../repository/ent/childphoto/childphoto.go | 22 +-- .../domain/repository/ent/childphoto/where.go | 143 ++---------------- .../repository/ent/childphoto_create.go | 35 +++-- .../domain/repository/ent/childphoto_query.go | 8 +- .../repository/ent/childphoto_update.go | 70 +++------ .../domain/repository/ent/migrate/schema.go | 5 +- backend/domain/repository/ent/mutation.go | 110 ++++---------- backend/domain/repository/ent/runtime.go | 8 +- .../repository/ent/schema/child_photo.go | 4 +- 10 files changed, 103 insertions(+), 333 deletions(-) diff --git a/backend/domain/repository/ent/childphoto.go b/backend/domain/repository/ent/childphoto.go index 84b37541..c93649ee 100644 --- a/backend/domain/repository/ent/childphoto.go +++ b/backend/domain/repository/ent/childphoto.go @@ -19,10 +19,8 @@ type ChildPhoto struct { config `json:"-"` // ID of the ent. ID uuid.UUID `json:"id,omitempty"` - // AWS S3のバケット名 - S3Bucket string `json:"s3_bucket,omitempty"` - // S3内の画像ファイルのキー(ファイルパス含む) - S3Key string `json:"s3_key,omitempty"` + // 重複画像があるかどうか + IsDuplicate bool `json:"is_duplicate,omitempty"` // レコードの作成日時 CreatedAt time.Time `json:"created_at,omitempty"` // レコードの最終更新日時 @@ -61,8 +59,8 @@ func (*ChildPhoto) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { - case childphoto.FieldS3Bucket, childphoto.FieldS3Key: - values[i] = new(sql.NullString) + case childphoto.FieldIsDuplicate: + values[i] = new(sql.NullBool) case childphoto.FieldCreatedAt, childphoto.FieldUpdatedAt: values[i] = new(sql.NullTime) case childphoto.FieldID: @@ -90,17 +88,11 @@ func (cp *ChildPhoto) assignValues(columns []string, values []any) error { } else if value != nil { cp.ID = *value } - case childphoto.FieldS3Bucket: - if value, ok := values[i].(*sql.NullString); !ok { - return fmt.Errorf("unexpected type %T for field s3_bucket", values[i]) + case childphoto.FieldIsDuplicate: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field is_duplicate", values[i]) } else if value.Valid { - cp.S3Bucket = value.String - } - case childphoto.FieldS3Key: - if value, ok := values[i].(*sql.NullString); !ok { - return fmt.Errorf("unexpected type %T for field s3_key", values[i]) - } else if value.Valid { - cp.S3Key = value.String + cp.IsDuplicate = value.Bool } case childphoto.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { @@ -162,11 +154,8 @@ func (cp *ChildPhoto) String() string { var builder strings.Builder builder.WriteString("ChildPhoto(") builder.WriteString(fmt.Sprintf("id=%v, ", cp.ID)) - builder.WriteString("s3_bucket=") - builder.WriteString(cp.S3Bucket) - builder.WriteString(", ") - builder.WriteString("s3_key=") - builder.WriteString(cp.S3Key) + builder.WriteString("is_duplicate=") + builder.WriteString(fmt.Sprintf("%v", cp.IsDuplicate)) builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(cp.CreatedAt.Format(time.ANSIC)) diff --git a/backend/domain/repository/ent/childphoto/childphoto.go b/backend/domain/repository/ent/childphoto/childphoto.go index b258f82a..8493f511 100644 --- a/backend/domain/repository/ent/childphoto/childphoto.go +++ b/backend/domain/repository/ent/childphoto/childphoto.go @@ -15,10 +15,8 @@ const ( Label = "child_photo" // FieldID holds the string denoting the id field in the database. FieldID = "id" - // FieldS3Bucket holds the string denoting the s3_bucket field in the database. - FieldS3Bucket = "s3_bucket" - // FieldS3Key holds the string denoting the s3_key field in the database. - FieldS3Key = "s3_key" + // FieldIsDuplicate holds the string denoting the is_duplicate field in the database. + FieldIsDuplicate = "is_duplicate" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -39,8 +37,7 @@ const ( // Columns holds all SQL columns for childphoto fields. var Columns = []string{ FieldID, - FieldS3Bucket, - FieldS3Key, + FieldIsDuplicate, FieldCreatedAt, FieldUpdatedAt, } @@ -67,6 +64,8 @@ func ValidColumn(column string) bool { } var ( + // DefaultIsDuplicate holds the default value on creation for the "is_duplicate" field. + DefaultIsDuplicate bool // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. @@ -85,14 +84,9 @@ func ByID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldID, opts...).ToFunc() } -// ByS3Bucket orders the results by the s3_bucket field. -func ByS3Bucket(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldS3Bucket, opts...).ToFunc() -} - -// ByS3Key orders the results by the s3_key field. -func ByS3Key(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldS3Key, opts...).ToFunc() +// ByIsDuplicate orders the results by the is_duplicate field. +func ByIsDuplicate(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldIsDuplicate, opts...).ToFunc() } // ByCreatedAt orders the results by the created_at field. diff --git a/backend/domain/repository/ent/childphoto/where.go b/backend/domain/repository/ent/childphoto/where.go index 9c366e30..c8e5d408 100644 --- a/backend/domain/repository/ent/childphoto/where.go +++ b/backend/domain/repository/ent/childphoto/where.go @@ -56,14 +56,9 @@ func IDLTE(id uuid.UUID) predicate.ChildPhoto { return predicate.ChildPhoto(sql.FieldLTE(FieldID, id)) } -// S3Bucket applies equality check predicate on the "s3_bucket" field. It's identical to S3BucketEQ. -func S3Bucket(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldEQ(FieldS3Bucket, v)) -} - -// S3Key applies equality check predicate on the "s3_key" field. It's identical to S3KeyEQ. -func S3Key(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldEQ(FieldS3Key, v)) +// IsDuplicate applies equality check predicate on the "is_duplicate" field. It's identical to IsDuplicateEQ. +func IsDuplicate(v bool) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldIsDuplicate, v)) } // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. @@ -76,134 +71,14 @@ func UpdatedAt(v time.Time) predicate.ChildPhoto { return predicate.ChildPhoto(sql.FieldEQ(FieldUpdatedAt, v)) } -// S3BucketEQ applies the EQ predicate on the "s3_bucket" field. -func S3BucketEQ(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldEQ(FieldS3Bucket, v)) -} - -// S3BucketNEQ applies the NEQ predicate on the "s3_bucket" field. -func S3BucketNEQ(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldNEQ(FieldS3Bucket, v)) -} - -// S3BucketIn applies the In predicate on the "s3_bucket" field. -func S3BucketIn(vs ...string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldIn(FieldS3Bucket, vs...)) -} - -// S3BucketNotIn applies the NotIn predicate on the "s3_bucket" field. -func S3BucketNotIn(vs ...string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldNotIn(FieldS3Bucket, vs...)) -} - -// S3BucketGT applies the GT predicate on the "s3_bucket" field. -func S3BucketGT(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldGT(FieldS3Bucket, v)) -} - -// S3BucketGTE applies the GTE predicate on the "s3_bucket" field. -func S3BucketGTE(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldGTE(FieldS3Bucket, v)) -} - -// S3BucketLT applies the LT predicate on the "s3_bucket" field. -func S3BucketLT(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldLT(FieldS3Bucket, v)) -} - -// S3BucketLTE applies the LTE predicate on the "s3_bucket" field. -func S3BucketLTE(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldLTE(FieldS3Bucket, v)) -} - -// S3BucketContains applies the Contains predicate on the "s3_bucket" field. -func S3BucketContains(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldContains(FieldS3Bucket, v)) -} - -// S3BucketHasPrefix applies the HasPrefix predicate on the "s3_bucket" field. -func S3BucketHasPrefix(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldHasPrefix(FieldS3Bucket, v)) -} - -// S3BucketHasSuffix applies the HasSuffix predicate on the "s3_bucket" field. -func S3BucketHasSuffix(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldHasSuffix(FieldS3Bucket, v)) -} - -// S3BucketEqualFold applies the EqualFold predicate on the "s3_bucket" field. -func S3BucketEqualFold(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldEqualFold(FieldS3Bucket, v)) -} - -// S3BucketContainsFold applies the ContainsFold predicate on the "s3_bucket" field. -func S3BucketContainsFold(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldContainsFold(FieldS3Bucket, v)) -} - -// S3KeyEQ applies the EQ predicate on the "s3_key" field. -func S3KeyEQ(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldEQ(FieldS3Key, v)) -} - -// S3KeyNEQ applies the NEQ predicate on the "s3_key" field. -func S3KeyNEQ(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldNEQ(FieldS3Key, v)) -} - -// S3KeyIn applies the In predicate on the "s3_key" field. -func S3KeyIn(vs ...string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldIn(FieldS3Key, vs...)) -} - -// S3KeyNotIn applies the NotIn predicate on the "s3_key" field. -func S3KeyNotIn(vs ...string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldNotIn(FieldS3Key, vs...)) -} - -// S3KeyGT applies the GT predicate on the "s3_key" field. -func S3KeyGT(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldGT(FieldS3Key, v)) -} - -// S3KeyGTE applies the GTE predicate on the "s3_key" field. -func S3KeyGTE(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldGTE(FieldS3Key, v)) -} - -// S3KeyLT applies the LT predicate on the "s3_key" field. -func S3KeyLT(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldLT(FieldS3Key, v)) -} - -// S3KeyLTE applies the LTE predicate on the "s3_key" field. -func S3KeyLTE(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldLTE(FieldS3Key, v)) -} - -// S3KeyContains applies the Contains predicate on the "s3_key" field. -func S3KeyContains(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldContains(FieldS3Key, v)) -} - -// S3KeyHasPrefix applies the HasPrefix predicate on the "s3_key" field. -func S3KeyHasPrefix(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldHasPrefix(FieldS3Key, v)) -} - -// S3KeyHasSuffix applies the HasSuffix predicate on the "s3_key" field. -func S3KeyHasSuffix(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldHasSuffix(FieldS3Key, v)) -} - -// S3KeyEqualFold applies the EqualFold predicate on the "s3_key" field. -func S3KeyEqualFold(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldEqualFold(FieldS3Key, v)) +// IsDuplicateEQ applies the EQ predicate on the "is_duplicate" field. +func IsDuplicateEQ(v bool) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldEQ(FieldIsDuplicate, v)) } -// S3KeyContainsFold applies the ContainsFold predicate on the "s3_key" field. -func S3KeyContainsFold(v string) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldContainsFold(FieldS3Key, v)) +// IsDuplicateNEQ applies the NEQ predicate on the "is_duplicate" field. +func IsDuplicateNEQ(v bool) predicate.ChildPhoto { + return predicate.ChildPhoto(sql.FieldNEQ(FieldIsDuplicate, v)) } // CreatedAtEQ applies the EQ predicate on the "created_at" field. diff --git a/backend/domain/repository/ent/childphoto_create.go b/backend/domain/repository/ent/childphoto_create.go index 115f486a..5137f811 100644 --- a/backend/domain/repository/ent/childphoto_create.go +++ b/backend/domain/repository/ent/childphoto_create.go @@ -22,15 +22,17 @@ type ChildPhotoCreate struct { hooks []Hook } -// SetS3Bucket sets the "s3_bucket" field. -func (cpc *ChildPhotoCreate) SetS3Bucket(s string) *ChildPhotoCreate { - cpc.mutation.SetS3Bucket(s) +// SetIsDuplicate sets the "is_duplicate" field. +func (cpc *ChildPhotoCreate) SetIsDuplicate(b bool) *ChildPhotoCreate { + cpc.mutation.SetIsDuplicate(b) return cpc } -// SetS3Key sets the "s3_key" field. -func (cpc *ChildPhotoCreate) SetS3Key(s string) *ChildPhotoCreate { - cpc.mutation.SetS3Key(s) +// SetNillableIsDuplicate sets the "is_duplicate" field if the given value is not nil. +func (cpc *ChildPhotoCreate) SetNillableIsDuplicate(b *bool) *ChildPhotoCreate { + if b != nil { + cpc.SetIsDuplicate(*b) + } return cpc } @@ -130,6 +132,10 @@ func (cpc *ChildPhotoCreate) ExecX(ctx context.Context) { // defaults sets the default values of the builder before save. func (cpc *ChildPhotoCreate) defaults() { + if _, ok := cpc.mutation.IsDuplicate(); !ok { + v := childphoto.DefaultIsDuplicate + cpc.mutation.SetIsDuplicate(v) + } if _, ok := cpc.mutation.CreatedAt(); !ok { v := childphoto.DefaultCreatedAt() cpc.mutation.SetCreatedAt(v) @@ -146,11 +152,8 @@ func (cpc *ChildPhotoCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (cpc *ChildPhotoCreate) check() error { - if _, ok := cpc.mutation.S3Bucket(); !ok { - return &ValidationError{Name: "s3_bucket", err: errors.New(`ent: missing required field "ChildPhoto.s3_bucket"`)} - } - if _, ok := cpc.mutation.S3Key(); !ok { - return &ValidationError{Name: "s3_key", err: errors.New(`ent: missing required field "ChildPhoto.s3_key"`)} + if _, ok := cpc.mutation.IsDuplicate(); !ok { + return &ValidationError{Name: "is_duplicate", err: errors.New(`ent: missing required field "ChildPhoto.is_duplicate"`)} } if _, ok := cpc.mutation.CreatedAt(); !ok { return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "ChildPhoto.created_at"`)} @@ -193,13 +196,9 @@ func (cpc *ChildPhotoCreate) createSpec() (*ChildPhoto, *sqlgraph.CreateSpec) { _node.ID = id _spec.ID.Value = &id } - if value, ok := cpc.mutation.S3Bucket(); ok { - _spec.SetField(childphoto.FieldS3Bucket, field.TypeString, value) - _node.S3Bucket = value - } - if value, ok := cpc.mutation.S3Key(); ok { - _spec.SetField(childphoto.FieldS3Key, field.TypeString, value) - _node.S3Key = value + if value, ok := cpc.mutation.IsDuplicate(); ok { + _spec.SetField(childphoto.FieldIsDuplicate, field.TypeBool, value) + _node.IsDuplicate = value } if value, ok := cpc.mutation.CreatedAt(); ok { _spec.SetField(childphoto.FieldCreatedAt, field.TypeTime, value) diff --git a/backend/domain/repository/ent/childphoto_query.go b/backend/domain/repository/ent/childphoto_query.go index bfb21c35..c9a67b69 100644 --- a/backend/domain/repository/ent/childphoto_query.go +++ b/backend/domain/repository/ent/childphoto_query.go @@ -299,12 +299,12 @@ func (cpq *ChildPhotoQuery) WithChild(opts ...func(*ChildQuery)) *ChildPhotoQuer // Example: // // var v []struct { -// S3Bucket string `json:"s3_bucket,omitempty"` +// IsDuplicate bool `json:"is_duplicate,omitempty"` // Count int `json:"count,omitempty"` // } // // client.ChildPhoto.Query(). -// GroupBy(childphoto.FieldS3Bucket). +// GroupBy(childphoto.FieldIsDuplicate). // Aggregate(ent.Count()). // Scan(ctx, &v) func (cpq *ChildPhotoQuery) GroupBy(field string, fields ...string) *ChildPhotoGroupBy { @@ -322,11 +322,11 @@ func (cpq *ChildPhotoQuery) GroupBy(field string, fields ...string) *ChildPhotoG // Example: // // var v []struct { -// S3Bucket string `json:"s3_bucket,omitempty"` +// IsDuplicate bool `json:"is_duplicate,omitempty"` // } // // client.ChildPhoto.Query(). -// Select(childphoto.FieldS3Bucket). +// Select(childphoto.FieldIsDuplicate). // Scan(ctx, &v) func (cpq *ChildPhotoQuery) Select(fields ...string) *ChildPhotoSelect { cpq.ctx.Fields = append(cpq.ctx.Fields, fields...) diff --git a/backend/domain/repository/ent/childphoto_update.go b/backend/domain/repository/ent/childphoto_update.go index 13268a3b..96351be1 100644 --- a/backend/domain/repository/ent/childphoto_update.go +++ b/backend/domain/repository/ent/childphoto_update.go @@ -30,30 +30,16 @@ func (cpu *ChildPhotoUpdate) Where(ps ...predicate.ChildPhoto) *ChildPhotoUpdate return cpu } -// SetS3Bucket sets the "s3_bucket" field. -func (cpu *ChildPhotoUpdate) SetS3Bucket(s string) *ChildPhotoUpdate { - cpu.mutation.SetS3Bucket(s) +// SetIsDuplicate sets the "is_duplicate" field. +func (cpu *ChildPhotoUpdate) SetIsDuplicate(b bool) *ChildPhotoUpdate { + cpu.mutation.SetIsDuplicate(b) return cpu } -// SetNillableS3Bucket sets the "s3_bucket" field if the given value is not nil. -func (cpu *ChildPhotoUpdate) SetNillableS3Bucket(s *string) *ChildPhotoUpdate { - if s != nil { - cpu.SetS3Bucket(*s) - } - return cpu -} - -// SetS3Key sets the "s3_key" field. -func (cpu *ChildPhotoUpdate) SetS3Key(s string) *ChildPhotoUpdate { - cpu.mutation.SetS3Key(s) - return cpu -} - -// SetNillableS3Key sets the "s3_key" field if the given value is not nil. -func (cpu *ChildPhotoUpdate) SetNillableS3Key(s *string) *ChildPhotoUpdate { - if s != nil { - cpu.SetS3Key(*s) +// SetNillableIsDuplicate sets the "is_duplicate" field if the given value is not nil. +func (cpu *ChildPhotoUpdate) SetNillableIsDuplicate(b *bool) *ChildPhotoUpdate { + if b != nil { + cpu.SetIsDuplicate(*b) } return cpu } @@ -153,11 +139,8 @@ func (cpu *ChildPhotoUpdate) sqlSave(ctx context.Context) (n int, err error) { } } } - if value, ok := cpu.mutation.S3Bucket(); ok { - _spec.SetField(childphoto.FieldS3Bucket, field.TypeString, value) - } - if value, ok := cpu.mutation.S3Key(); ok { - _spec.SetField(childphoto.FieldS3Key, field.TypeString, value) + if value, ok := cpu.mutation.IsDuplicate(); ok { + _spec.SetField(childphoto.FieldIsDuplicate, field.TypeBool, value) } if value, ok := cpu.mutation.CreatedAt(); ok { _spec.SetField(childphoto.FieldCreatedAt, field.TypeTime, value) @@ -214,30 +197,16 @@ type ChildPhotoUpdateOne struct { mutation *ChildPhotoMutation } -// SetS3Bucket sets the "s3_bucket" field. -func (cpuo *ChildPhotoUpdateOne) SetS3Bucket(s string) *ChildPhotoUpdateOne { - cpuo.mutation.SetS3Bucket(s) +// SetIsDuplicate sets the "is_duplicate" field. +func (cpuo *ChildPhotoUpdateOne) SetIsDuplicate(b bool) *ChildPhotoUpdateOne { + cpuo.mutation.SetIsDuplicate(b) return cpuo } -// SetNillableS3Bucket sets the "s3_bucket" field if the given value is not nil. -func (cpuo *ChildPhotoUpdateOne) SetNillableS3Bucket(s *string) *ChildPhotoUpdateOne { - if s != nil { - cpuo.SetS3Bucket(*s) - } - return cpuo -} - -// SetS3Key sets the "s3_key" field. -func (cpuo *ChildPhotoUpdateOne) SetS3Key(s string) *ChildPhotoUpdateOne { - cpuo.mutation.SetS3Key(s) - return cpuo -} - -// SetNillableS3Key sets the "s3_key" field if the given value is not nil. -func (cpuo *ChildPhotoUpdateOne) SetNillableS3Key(s *string) *ChildPhotoUpdateOne { - if s != nil { - cpuo.SetS3Key(*s) +// SetNillableIsDuplicate sets the "is_duplicate" field if the given value is not nil. +func (cpuo *ChildPhotoUpdateOne) SetNillableIsDuplicate(b *bool) *ChildPhotoUpdateOne { + if b != nil { + cpuo.SetIsDuplicate(*b) } return cpuo } @@ -367,11 +336,8 @@ func (cpuo *ChildPhotoUpdateOne) sqlSave(ctx context.Context) (_node *ChildPhoto } } } - if value, ok := cpuo.mutation.S3Bucket(); ok { - _spec.SetField(childphoto.FieldS3Bucket, field.TypeString, value) - } - if value, ok := cpuo.mutation.S3Key(); ok { - _spec.SetField(childphoto.FieldS3Key, field.TypeString, value) + if value, ok := cpuo.mutation.IsDuplicate(); ok { + _spec.SetField(childphoto.FieldIsDuplicate, field.TypeBool, value) } if value, ok := cpuo.mutation.CreatedAt(); ok { _spec.SetField(childphoto.FieldCreatedAt, field.TypeTime, value) diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 7a29b1ad..5dca92e4 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -131,8 +131,7 @@ var ( // ChildPhotosColumns holds the columns for the "child_photos" table. ChildPhotosColumns = []*schema.Column{ {Name: "id", Type: field.TypeUUID, Unique: true}, - {Name: "s3_bucket", Type: field.TypeString}, - {Name: "s3_key", Type: field.TypeString}, + {Name: "is_duplicate", Type: field.TypeBool, Default: false}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "child_photos", Type: field.TypeUUID, Nullable: true}, @@ -145,7 +144,7 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "child_photos_childs_photos", - Columns: []*schema.Column{ChildPhotosColumns[5]}, + Columns: []*schema.Column{ChildPhotosColumns[4]}, RefColumns: []*schema.Column{ChildsColumns[0]}, OnDelete: schema.SetNull, }, diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index b0a5c13f..659a22b3 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -3592,8 +3592,7 @@ type ChildPhotoMutation struct { op Op typ string id *uuid.UUID - s3_bucket *string - s3_key *string + is_duplicate *bool created_at *time.Time updated_at *time.Time clearedFields map[string]struct{} @@ -3708,76 +3707,40 @@ func (m *ChildPhotoMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { } } -// SetS3Bucket sets the "s3_bucket" field. -func (m *ChildPhotoMutation) SetS3Bucket(s string) { - m.s3_bucket = &s +// SetIsDuplicate sets the "is_duplicate" field. +func (m *ChildPhotoMutation) SetIsDuplicate(b bool) { + m.is_duplicate = &b } -// S3Bucket returns the value of the "s3_bucket" field in the mutation. -func (m *ChildPhotoMutation) S3Bucket() (r string, exists bool) { - v := m.s3_bucket +// IsDuplicate returns the value of the "is_duplicate" field in the mutation. +func (m *ChildPhotoMutation) IsDuplicate() (r bool, exists bool) { + v := m.is_duplicate if v == nil { return } return *v, true } -// OldS3Bucket returns the old "s3_bucket" field's value of the ChildPhoto entity. +// OldIsDuplicate returns the old "is_duplicate" field's value of the ChildPhoto entity. // If the ChildPhoto object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *ChildPhotoMutation) OldS3Bucket(ctx context.Context) (v string, err error) { +func (m *ChildPhotoMutation) OldIsDuplicate(ctx context.Context) (v bool, err error) { if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldS3Bucket is only allowed on UpdateOne operations") + return v, errors.New("OldIsDuplicate is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, errors.New("OldS3Bucket requires an ID field in the mutation") + return v, errors.New("OldIsDuplicate requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { - return v, fmt.Errorf("querying old value for OldS3Bucket: %w", err) + return v, fmt.Errorf("querying old value for OldIsDuplicate: %w", err) } - return oldValue.S3Bucket, nil + return oldValue.IsDuplicate, nil } -// ResetS3Bucket resets all changes to the "s3_bucket" field. -func (m *ChildPhotoMutation) ResetS3Bucket() { - m.s3_bucket = nil -} - -// SetS3Key sets the "s3_key" field. -func (m *ChildPhotoMutation) SetS3Key(s string) { - m.s3_key = &s -} - -// S3Key returns the value of the "s3_key" field in the mutation. -func (m *ChildPhotoMutation) S3Key() (r string, exists bool) { - v := m.s3_key - if v == nil { - return - } - return *v, true -} - -// OldS3Key returns the old "s3_key" field's value of the ChildPhoto entity. -// If the ChildPhoto object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *ChildPhotoMutation) OldS3Key(ctx context.Context) (v string, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldS3Key is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldS3Key requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldS3Key: %w", err) - } - return oldValue.S3Key, nil -} - -// ResetS3Key resets all changes to the "s3_key" field. -func (m *ChildPhotoMutation) ResetS3Key() { - m.s3_key = nil +// ResetIsDuplicate resets all changes to the "is_duplicate" field. +func (m *ChildPhotoMutation) ResetIsDuplicate() { + m.is_duplicate = nil } // SetCreatedAt sets the "created_at" field. @@ -3925,12 +3888,9 @@ func (m *ChildPhotoMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *ChildPhotoMutation) Fields() []string { - fields := make([]string, 0, 4) - if m.s3_bucket != nil { - fields = append(fields, childphoto.FieldS3Bucket) - } - if m.s3_key != nil { - fields = append(fields, childphoto.FieldS3Key) + fields := make([]string, 0, 3) + if m.is_duplicate != nil { + fields = append(fields, childphoto.FieldIsDuplicate) } if m.created_at != nil { fields = append(fields, childphoto.FieldCreatedAt) @@ -3946,10 +3906,8 @@ func (m *ChildPhotoMutation) Fields() []string { // schema. func (m *ChildPhotoMutation) Field(name string) (ent.Value, bool) { switch name { - case childphoto.FieldS3Bucket: - return m.S3Bucket() - case childphoto.FieldS3Key: - return m.S3Key() + case childphoto.FieldIsDuplicate: + return m.IsDuplicate() case childphoto.FieldCreatedAt: return m.CreatedAt() case childphoto.FieldUpdatedAt: @@ -3963,10 +3921,8 @@ func (m *ChildPhotoMutation) Field(name string) (ent.Value, bool) { // database failed. func (m *ChildPhotoMutation) OldField(ctx context.Context, name string) (ent.Value, error) { switch name { - case childphoto.FieldS3Bucket: - return m.OldS3Bucket(ctx) - case childphoto.FieldS3Key: - return m.OldS3Key(ctx) + case childphoto.FieldIsDuplicate: + return m.OldIsDuplicate(ctx) case childphoto.FieldCreatedAt: return m.OldCreatedAt(ctx) case childphoto.FieldUpdatedAt: @@ -3980,19 +3936,12 @@ func (m *ChildPhotoMutation) OldField(ctx context.Context, name string) (ent.Val // type. func (m *ChildPhotoMutation) SetField(name string, value ent.Value) error { switch name { - case childphoto.FieldS3Bucket: - v, ok := value.(string) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetS3Bucket(v) - return nil - case childphoto.FieldS3Key: - v, ok := value.(string) + case childphoto.FieldIsDuplicate: + v, ok := value.(bool) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetS3Key(v) + m.SetIsDuplicate(v) return nil case childphoto.FieldCreatedAt: v, ok := value.(time.Time) @@ -4057,11 +4006,8 @@ func (m *ChildPhotoMutation) ClearField(name string) error { // It returns an error if the field is not defined in the schema. func (m *ChildPhotoMutation) ResetField(name string) error { switch name { - case childphoto.FieldS3Bucket: - m.ResetS3Bucket() - return nil - case childphoto.FieldS3Key: - m.ResetS3Key() + case childphoto.FieldIsDuplicate: + m.ResetIsDuplicate() return nil case childphoto.FieldCreatedAt: m.ResetCreatedAt() diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index 45c84e97..4cd2c00d 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -96,12 +96,16 @@ func init() { child.DefaultID = childDescID.Default.(func() uuid.UUID) childphotoFields := schema.ChildPhoto{}.Fields() _ = childphotoFields + // childphotoDescIsDuplicate is the schema descriptor for is_duplicate field. + childphotoDescIsDuplicate := childphotoFields[1].Descriptor() + // childphoto.DefaultIsDuplicate holds the default value on creation for the is_duplicate field. + childphoto.DefaultIsDuplicate = childphotoDescIsDuplicate.Default.(bool) // childphotoDescCreatedAt is the schema descriptor for created_at field. - childphotoDescCreatedAt := childphotoFields[3].Descriptor() + childphotoDescCreatedAt := childphotoFields[2].Descriptor() // childphoto.DefaultCreatedAt holds the default value on creation for the created_at field. childphoto.DefaultCreatedAt = childphotoDescCreatedAt.Default.(func() time.Time) // childphotoDescUpdatedAt is the schema descriptor for updated_at field. - childphotoDescUpdatedAt := childphotoFields[4].Descriptor() + childphotoDescUpdatedAt := childphotoFields[3].Descriptor() // childphoto.DefaultUpdatedAt holds the default value on creation for the updated_at field. childphoto.DefaultUpdatedAt = childphotoDescUpdatedAt.Default.(func() time.Time) // childphoto.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. diff --git a/backend/domain/repository/ent/schema/child_photo.go b/backend/domain/repository/ent/schema/child_photo.go index 9c33d492..dffd70f4 100644 --- a/backend/domain/repository/ent/schema/child_photo.go +++ b/backend/domain/repository/ent/schema/child_photo.go @@ -18,9 +18,7 @@ type ChildPhoto struct { func (ChildPhoto) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), - // TODO: s3周りのfieldを要件等 - field.String("s3_bucket").Comment("AWS S3のバケット名"), - field.String("s3_key").Comment("S3内の画像ファイルのキー(ファイルパス含む)"), + field.Bool("is_duplicate").Default(false).Comment("重複画像があるかどうか"), field.Time("created_at").Default(time.Now).Comment("レコードの作成日時"), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now).Comment("レコードの最終更新日時"), } From d0a1adb8d9bf5ca6aa7960aa191a4c4897f05c78 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 02:50:56 +0900 Subject: [PATCH 265/771] =?UTF-8?q?fix:=E3=83=91=E3=82=B9=E3=83=AF?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=82=92=E6=AF=94=E8=BC=83=E3=81=99=E3=82=8B?= =?UTF-8?q?=E9=9A=9B=E3=81=AB=E3=83=9A=E3=83=83=E3=83=91=E3=83=BC=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/utils/utils.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 80be18e3..319535ce 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -140,6 +140,12 @@ func HashPassword(password string) (string, error) { // ハッシュ化されたパスワードと送られてきたパスワードを比較 func CheckPassword(hashedPassword string, plainPassword string) bool { - err := bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte(plainPassword)) + config, _ := config.New() + pepper := config.PasswordPepper + + //パスワードにペッパーを追加 + passwordWithPepper := plainPassword + pepper + + err := bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte(passwordWithPepper)) return err == nil } From 094a64747578d1829a74f29ec7746c95a927fc8c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 02:55:05 +0900 Subject: [PATCH 266/771] =?UTF-8?q?fix:=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E5=90=8C?= =?UTF-8?q?=E4=B8=80=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/guardian/guardian.go | 8 ++++---- backend/usecases/nursery/nursery.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 2832a1db..a8b8eb92 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -36,17 +36,17 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq Only(ctx) if err != nil { - return nil, fmt.Errorf("failed to get guardian: %w", err) + return nil, fmt.Errorf("failed to get guardian") } - // フロントエンドから送られてきたパスワードとデータベースのハッシュ値を比較 + // フロントエンドから送られてきたパスワードとデータベースのハッシュ値を比較 if !utils.CheckPassword(guardian.HashedPassword, req.Password) { - return nil, fmt.Errorf("failed to get guardian: %w", err) + return nil, fmt.Errorf("failed to get guardian") } // トランザクションをコミット if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + return nil, fmt.Errorf("failed to commit transaction: %w") } // レスポンスを返す diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index 93c98367..9ddae432 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -36,15 +36,15 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque Only(ctx) if err != nil { - return nil, fmt.Errorf("failed to get nursery: %w", err) + return nil, fmt.Errorf("failed to get nursery") } - // フロントエンドから送られてきたパスワードとデータベースのハッシュ値を比較 + // フロントエンドから送られてきたパスワードとデータベースのハッシュ値を比較 if !utils.CheckPassword(nursery.HashedPassword, req.Password) { - return nil, fmt.Errorf("failed to get nursery: %w", err) + return nil, fmt.Errorf("failed to get nursery") } - //トランザクションをコミット + // トランザクションをコミット if err := tx.Commit(); err != nil { return nil, fmt.Errorf("failed to commit transaction: %w", err) } From 635c9e481d6266237c31e3306e71c5e32d2c662a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 03:12:17 +0900 Subject: [PATCH 267/771] =?UTF-8?q?feat:=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E6=88=90=E5=8A=9F=E6=99=82=E3=81=AE=E9=81=B7=E7=A7=BB?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/pages/auth_page/auth_page.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index b96250ac..c0645e54 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:where_child_bus/app.dart'; import 'package:where_child_bus/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart'; import 'package:where_child_bus/util/api/nursery_login.dart'; @@ -121,6 +122,7 @@ class _AuthPageState extends State { } login() async { + BuildContext currentContext = context; try { NurseryLoginResponse res = await nurseryLogin( _emailController.text, _passwordController.text); @@ -128,7 +130,12 @@ class _AuthPageState extends State { if (res.success) { print(res.success); print(res.nursery.name); - // ログイン成功後の処理をここに記述 + Navigator.pushReplacement( + currentContext, + MaterialPageRoute( + builder: (BuildContext context) => const App(), + ), + ); } else { // ログイン失敗時の処理をここに記述 print('Login failed'); From 1ebd8ded431127972a9bcfce222bee7ad37ce704 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 03:19:16 +0900 Subject: [PATCH 268/771] =?UTF-8?q?feat:=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=81=AE=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/pages/auth_page/auth_page.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index c0645e54..aac9fd9b 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -41,13 +41,11 @@ class _AuthPageState extends State { mailInputField(), passwordInputField(), spacer32(), + if (_loginError != null && _loginError == NurseryLoginError.invalidCredentials) + emailOrPasswordNotFound(), loginButton(), ]; - if (_loginError != null && _loginError == NurseryLoginError.invalidCredentials) { - columnChildren.add(emailOrPasswordNotFound()); - } - return Center( child: Padding( padding: const EdgeInsets.all(32), From cbdccbfd6262dbbb993a0c2f975741059071cd48 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 03:35:55 +0900 Subject: [PATCH 269/771] =?UTF-8?q?feat:=20=E3=83=90=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=A8=E3=83=B3=E3=83=89=E3=81=AE=E3=82=A4=E3=83=B3=E3=82=BF?= =?UTF-8?q?=E3=83=BC=E3=83=95=E3=82=A7=E3=83=BC=E3=82=B9=E3=81=A8=E3=83=A6?= =?UTF-8?q?=E3=83=BC=E3=82=B9=E3=82=B1=E3=83=BC=E3=82=B9=E3=81=AE=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ***バックエンドのインターフェースとユースケースの実装を修正しました。*** ***変更内容:*** - `guardianServiceServer`の`CreateGuardian`メソッドを修正しました。 - `childServiceServer`の`GetChildListByBusID`メソッドを修正しました。 - `nurseryServiceServer`の`CreateNursery`メソッドを修正しました。 - `nursery`パッケージの`Interactor`に`CreateNursery`メソッドを追加しました。 - `child`パッケージの`Interactor`に`GetChildListByBusID`メソッドを追加しました。 --- backend/interfaces/child.go | 4 +-- backend/interfaces/guardian.go | 4 +-- backend/interfaces/nursery.go | 4 +-- backend/usecases/child/child.go | 28 +++++++++++++++ backend/usecases/guardian/guardian.go | 50 +++++++++++++++++++++++++++ backend/usecases/nursery/nursery.go | 29 +++++++++++++++- 6 files changed, 112 insertions(+), 7 deletions(-) diff --git a/backend/interfaces/child.go b/backend/interfaces/child.go index 1b9a62f7..db7b6d3d 100644 --- a/backend/interfaces/child.go +++ b/backend/interfaces/child.go @@ -16,8 +16,8 @@ func NewChildServiceServer(interactor *child.Interactor) pb.ChildServiceServer { } // GetChildListByBusID implements where_child_busv1.ChildServiceServer. -func (*childServiceServer) GetChildListByBusID(context.Context, *pb.GetChildListByBusIDRequest) (*pb.GetChildListByBusIDResponse, error) { - panic("unimplemented") +func (s *childServiceServer) GetChildListByBusID(ctx context.Context, req *pb.GetChildListByBusIDRequest) (*pb.GetChildListByBusIDResponse, error) { + return s.interactor.GetChildListByBusID(ctx, req) } // CreateChild implements where_child_busv1.ChildServiceServer. diff --git a/backend/interfaces/guardian.go b/backend/interfaces/guardian.go index 498e0217..6effc3d3 100644 --- a/backend/interfaces/guardian.go +++ b/backend/interfaces/guardian.go @@ -16,8 +16,8 @@ func NewGuardianServiceServer(interactor *guardian.Interactor) pb.GuardianServic } // CreateGuardian implements where_child_busv1.GuardianServiceServer. -func (*guardianServiceServer) CreateGuardian(context.Context, *pb.CreateGuardianRequest) (*pb.CreateGuardianResponse, error) { - panic("unimplemented") +func (s *guardianServiceServer) CreateGuardian(ctx context.Context, req *pb.CreateGuardianRequest) (*pb.CreateGuardianResponse, error) { + return s.interactor.CreateGuardian(ctx, req) } // GuardianLogin implements where_child_busv1.GuardianServiceServer. diff --git a/backend/interfaces/nursery.go b/backend/interfaces/nursery.go index 470deef2..db46afab 100644 --- a/backend/interfaces/nursery.go +++ b/backend/interfaces/nursery.go @@ -16,8 +16,8 @@ func NewNurseryServiceServer(interactor *nursery.Interactor) pb.NurseryServiceSe } // CreateNursery implements where_child_busv1.NurseryServiceServer. -func (*nurseryServiceServer) CreateNursery(context.Context, *pb.CreateNurseryRequest) (*pb.CreateNurseryResponse, error) { - panic("unimplemented") +func (s *nurseryServiceServer) CreateNursery(ctx context.Context, req *pb.CreateNurseryRequest) (*pb.CreateNurseryResponse, error) { + return s.interactor.CreateNursery(ctx, req) } func (s *nurseryServiceServer) NurseryLogin(ctx context.Context, req *pb.NurseryLoginRequest) (*pb.NurseryLoginResponse, error) { diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index ead50f08..869266e6 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -15,6 +15,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + childBusAssociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" ) @@ -164,6 +165,33 @@ func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChi return &pb.GetChildListByNurseryIDResponse{Children: children}, nil } +func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildListByBusIDRequest) (*pb.GetChildListByBusIDResponse, error) { + busID, err := uuid.Parse(req.BusId) + if err != nil { + return nil, fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) + } + + // childBusAssociationテーブルからバスIDに紐づく子供のIDを取得 + associations, err := i.entClient.ChildBusAssociation.Query().Where(childBusAssociationRepo.BusIDEQ(busID)).All(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get child associations: %w", err) + } + + var children []*pb.Child + for _, association := range associations { + child, err := i.entClient.Child.Get(ctx, association.ChildID) + if err != nil { + i.logger.Error("failed to get child details", "childID", association.ChildID, "error", err) + continue // エラーがあった場合はその子供をスキップ + } + + pbChild := utils.ToPbChild(child) + children = append(children, pbChild) + } + + return &pb.GetChildListByBusIDResponse{Children: children}, nil +} + // getChildList abstracts the common logic for fetching child lists. func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.ChildQuery, error)) ([]*pb.Child, error) { tx, err := i.entClient.Tx(ctx) diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index a8b8eb92..037d9284 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -9,6 +9,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" ) @@ -22,6 +23,53 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { return &Interactor{entClient, logger} } +func (i *Interactor) CreateGuardian(ctx context.Context, req *pb.CreateGuardianRequest) (*pb.CreateGuardianResponse, error) { + // パスワードをハッシュ化 + hashedPassword, err := utils.HashPassword(req.Password) + if err != nil { + // エラーハンドリング + return nil, fmt.Errorf("failed to hash password: %w", err) + } + + // トランザクションを開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + defer tx.Rollback() + + // req.nurseryCodeからnurseryを取得 + nursery, err := tx.Nursery.Query(). + Where(nurseryRepo.NurseryCode(req.NurseryCode)). + Only(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get nursery: %w", err) + } + + // Guardianを作成 + guardian, err := tx.Guardian.Create(). + SetEmail(req.Email). + SetHashedPassword(string(hashedPassword)). + SetName(req.Name). + SetPhoneNumber(req.PhoneNumber). + SetNursery(nursery). + Save(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to create guardian: %w", err) + } + + // トランザクションをコミット + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + + // レスポンスを返す + return &pb.CreateGuardianResponse{ + Guardian: utils.ToPbGuardianResponse(guardian), + }, nil +} + func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginRequest) (*pb.GuardianLoginResponse, error) { // トランザクションを開始 tx, err := i.entClient.Tx(ctx) @@ -33,6 +81,7 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq // Guardianを取得 guardian, err := tx.Guardian.Query(). Where(guardianRepo.Email(req.Email)). + WithNursery(). Only(ctx) if err != nil { @@ -53,5 +102,6 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq return &pb.GuardianLoginResponse{ Success: true, Guardian: utils.ToPbGuardianResponse(guardian), + Nursery: utils.ToPbNurseryResponse(guardian.Edges.Nursery), }, nil } diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index 9ddae432..ccae67bb 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -22,8 +22,35 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { return &Interactor{entClient, logger} } +func (i *Interactor) CreateNursery(ctx context.Context, req *pb.CreateNurseryRequest) (*pb.CreateNurseryResponse, error) { + //パスワードをハッシュ化 + hashedPassword, err := utils.HashPassword(req.Password) + if err != nil { + //エラーハンドリング + return nil, fmt.Errorf("failed to hash password: %w", err) + } + + //Nurseryを作成 + nursery, err := i.entClient.Nursery.Create(). + SetName(req.Name). + SetEmail(req.Email). + SetHashedPassword(string(hashedPassword)). + SetPhoneNumber(req.PhoneNumber). + SetAddress(req.Address). + Save(ctx) + + if err != nil { + //エラーハンドリング + return nil, fmt.Errorf("failed to create nursery: %w", err) + } + + return &pb.CreateNurseryResponse{ + Nursery: utils.ToPbNurseryResponse(nursery), + }, nil +} + func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginRequest) (*pb.NurseryLoginResponse, error) { - //トランザクションを開始 + // トランザクションを開始 tx, err := i.entClient.Tx(ctx) if err != nil { return nil, fmt.Errorf("failed to start transaction: %w", err) From 5e58be43a6c9be903d8e3eaebdc3c6bcab550722 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 14 Feb 2024 04:32:02 +0900 Subject: [PATCH 270/771] =?UTF-8?q?chore(ml):=20=E9=A1=94=E6=A4=9C?= =?UTF-8?q?=E5=87=BA=E3=81=A8=E7=94=BB=E5=83=8F=E3=82=AF=E3=83=AA=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=81=AB=E9=96=A2=E3=82=8F=E3=82=8B=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E7=BE=A4=E3=82=92=E5=88=A5=E3=83=87=E3=82=A3=E3=83=AC?= =?UTF-8?q?=E3=82=AF=E3=83=88=E3=83=AA=E3=81=AB=E5=88=87=E3=82=8A=E5=87=BA?= =?UTF-8?q?=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{data => DetectFaceAndClip}/detectFaceAndClip.py | 0 .../{data => DetectFaceAndClip}/detectFaceUtil.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename machine_learning/src/face_detect_model/{data => DetectFaceAndClip}/detectFaceAndClip.py (100%) rename machine_learning/src/face_detect_model/{data => DetectFaceAndClip}/detectFaceUtil.py (100%) diff --git a/machine_learning/src/face_detect_model/data/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py similarity index 100% rename from machine_learning/src/face_detect_model/data/detectFaceAndClip.py rename to machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py diff --git a/machine_learning/src/face_detect_model/data/detectFaceUtil.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceUtil.py similarity index 100% rename from machine_learning/src/face_detect_model/data/detectFaceUtil.py rename to machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceUtil.py From 33fad14e03000e1e19e91f61d4731d6efd27b5c5 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 14 Feb 2024 04:32:57 +0900 Subject: [PATCH 271/771] =?UTF-8?q?refactor(ml):=20=E3=83=97=E3=83=AD?= =?UTF-8?q?=E3=82=B8=E3=82=A7=E3=82=AF=E3=83=88=E4=BE=9D=E5=AD=98=E3=81=AE?= =?UTF-8?q?gitignore=E3=81=AE=E8=A8=98=E8=BF=B0=E3=82=92=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/.gitignore | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/machine_learning/.gitignore b/machine_learning/.gitignore index 6967495b..a08b5ca8 100644 --- a/machine_learning/.gitignore +++ b/machine_learning/.gitignore @@ -1,8 +1,11 @@ # Created by https://www.toptal.com/developers/gitignore/api/macos,python,visualstudiocode # Edit at https://www.toptal.com/developers/gitignore?templates=macos,python,visualstudiocode +## local secrets/ +src/face_detect_model/pickle/* +src/face_detect_model/DetectFaceAndClip/img ### macOS ### # General .DS_Store @@ -37,9 +40,7 @@ Temporary Items *.icloud ### Python ### -src/face_detect_model/pickle/* -src/face_detect_model/data/img -src/face_detect_model/data/detect_img + # Byte-compiled / optimized / DLL files __pycache__/ From 17e9dca5b240e14088147b66af84d2b2795fb77d Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Wed, 14 Feb 2024 13:21:06 +0900 Subject: [PATCH 272/771] feat: add augmation methods --- .../data/faceDetectDataset.py | 58 ++++++++++++------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index d090bd70..1f5781b1 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -36,6 +36,22 @@ def __init__(self, config, transform=None): image, # ここではNumPy配列として格納 )) + + def get_label_name_dict(self): + return self.label_name_dict + + def get_label_num(self): + return self.label_num + + def get_image_shape(self): + if len(self.face_data) > 0: + _, sample_image = self.face_data[0] + if self.transform: + sample_image = self.transform(sample_image) + return sample_image.shape + else: + return None + @staticmethod def default_transforms(): return transforms.Compose([ @@ -45,6 +61,20 @@ def default_transforms(): transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), ]) + + + def augment_image(self, image, num_variations=5): + + transformations = self.default_transforms() # デフォルトの変換を使用 + augmented_images = [] + + for _ in range(num_variations): + # ここでランダムな変換を適用する + # 例: transforms.RandomHorizontalFlip() など、ランダム性を含む変換を追加できる + augmented_image = transformations(image) + augmented_images.append(augmented_image) + + return torch.stack(augmented_images) # テンソルのリストをスタックして返す def _is_valid_file(self, file_name): return os.path.splitext(file_name)[1].lower() in self.VALID_EXTENSIONS @@ -52,26 +82,12 @@ def _is_valid_file(self, file_name): def __len__(self): return len(self.face_data) - def __getitem__(self, idx): - label, image = self.face_data[idx] - - # NumPy配列をPIL Imageに変換し、transformが定義されている場合は適用 - if self.transform: - image = self.transform(image) - - return label, image +def __getitem__(self, idx): + label, image_np = self.face_data[idx] + image = Image.fromarray(image_np) # NumPy配列をPIL Imageに変換 - def get_label_name_dict(self): - return self.label_name_dict - - def get_label_num(self): - return self.label_num + # ここでaugment_imageメソッドを使用して画像のバリエーションを生成 + augmented_images = self.augment_image(image) - def get_image_shape(self): - if len(self.face_data) > 0: - _, sample_image = self.face_data[0] - if self.transform: - sample_image = self.transform(sample_image) - return sample_image.shape - else: - return None \ No newline at end of file + # ラベルと拡張された画像のリストを紐付けて返す + return [(label, augmented_image) for augmented_image in augmented_images] \ No newline at end of file From 78b4eb63855d164a752dcfd6548ffe53c5263974 Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Wed, 14 Feb 2024 13:25:53 +0900 Subject: [PATCH 273/771] refactor: changed order and fix typo --- .../data/faceDetectDataset.py | 51 +++++++++---------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index 1f5781b1..3f65d372 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -2,6 +2,7 @@ from torchvision import transforms import os import cv2 +from PIL import Image # PILライブラリからImageクラスをインポート class FaceDetectDataset(torch.utils.data.Dataset): VALID_EXTENSIONS = {".png"} # 変更しない @@ -36,22 +37,6 @@ def __init__(self, config, transform=None): image, # ここではNumPy配列として格納 )) - - def get_label_name_dict(self): - return self.label_name_dict - - def get_label_num(self): - return self.label_num - - def get_image_shape(self): - if len(self.face_data) > 0: - _, sample_image = self.face_data[0] - if self.transform: - sample_image = self.transform(sample_image) - return sample_image.shape - else: - return None - @staticmethod def default_transforms(): return transforms.Compose([ @@ -61,16 +46,13 @@ def default_transforms(): transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), ]) - - - def augment_image(self, image, num_variations=5): + def augment_image(self, image, num_variations=5): transformations = self.default_transforms() # デフォルトの変換を使用 augmented_images = [] for _ in range(num_variations): # ここでランダムな変換を適用する - # 例: transforms.RandomHorizontalFlip() など、ランダム性を含む変換を追加できる augmented_image = transformations(image) augmented_images.append(augmented_image) @@ -82,12 +64,27 @@ def _is_valid_file(self, file_name): def __len__(self): return len(self.face_data) -def __getitem__(self, idx): - label, image_np = self.face_data[idx] - image = Image.fromarray(image_np) # NumPy配列をPIL Imageに変換 + def __getitem__(self, idx): + label, image_np = self.face_data[idx] + image = Image.fromarray(image_np) # NumPy配列をPIL Imageに変換 + + # ここでaugment_imageメソッドを使用して画像のバリエーションを生成 + augmented_images = self.augment_image(image) + + # ラベルと拡張された画像のリストを紐付けて返す + return [(label, augmented_image) for augmented_image in augmented_images] + + def get_label_name_dict(self): + return self.label_name_dict - # ここでaugment_imageメソッドを使用して画像のバリエーションを生成 - augmented_images = self.augment_image(image) + def get_label_num(self): + return self.label_num - # ラベルと拡張された画像のリストを紐付けて返す - return [(label, augmented_image) for augmented_image in augmented_images] \ No newline at end of file + def get_image_shape(self): + if len(self.face_data) > 0: + _, sample_image = self.face_data[0] + if self.transform: + sample_image = self.transform(sample_image) + return sample_image.shape + else: + return None \ No newline at end of file From df52b815acf9c7f7e2ca1cb5a9ba31be55f01ba8 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 14:55:41 +0900 Subject: [PATCH 274/771] =?UTF-8?q?feat:=E5=BF=98=E3=82=8C=E7=89=A9?= =?UTF-8?q?=E7=A2=BA=E8=AA=8D=E3=83=AA=E3=82=B9=E3=83=88=E3=81=AE=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/daily_page/daily_page.dart | 85 ++++++++++++++++--- 1 file changed, 74 insertions(+), 11 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index dd9e6402..0c98fbd7 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -9,32 +9,38 @@ class DailyPage extends StatefulWidget { } class _DailyPageState extends State { + var hasBag = true; + var hasLunchBox = true; + var hasWaterBottle = true; + var hasUmbrella = true; + var isBoarding = true; + @override Widget build(BuildContext context) { return Center( child: Column( mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ CurrentTimeBody(), const SizedBox( height: 20, ), - childDailyRecordBody() + childDailyRecordBody(context) ], ), ); } - Widget childDailyRecordBody() { - return Container( - child: Column( - children: [ - childFaceAndExpression(), - Padding( - padding: EdgeInsets.only(top: 20, bottom: 20), - child: childName()), - ], - ), + Widget childDailyRecordBody(BuildContext context) { + return Column( + children: [ + childFaceAndExpression(), + Padding( + padding: const EdgeInsets.only(top: 20, bottom: 20), + child: childName()), + statusIconAndStatusField(Icons.business_center, childItemList(context)), + ], ); } @@ -77,4 +83,61 @@ class _DailyPageState extends State { textAlign: TextAlign.center, ); } + + Widget statusIconAndStatusField(IconData icon, Widget statusField) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.9, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Icon( + icon, + size: 80, + ), + statusField, + ], + )); + } + + Widget childItemList(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + child: Wrap( + direction: Axis.horizontal, + alignment: WrapAlignment.center, + spacing: 8.0, + runAlignment: WrapAlignment.spaceBetween, + runSpacing: 4.0, + children: [ + itemText("かばん", hasBag), + itemText("お弁当", hasLunchBox), + itemText("水筒", hasWaterBottle), + itemText("傘", hasUmbrella), + ], + ), + ); + } + + Widget itemText(String itemName, bool hasItem) { + return Container( + width: 90, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + border: Border.all( + color: hasItem ? Colors.green : Colors.red, + ), + color: hasItem ? Colors.green[100] : Colors.red[100], + ), + child: Padding( + padding: const EdgeInsets.all(10.0), + child: Text( + itemName, + style: TextStyle( + fontSize: 16, + color: hasItem ? Colors.green : Colors.red, + ), + textAlign: TextAlign.center, + ), + )); + } } From 6213976dbc47779336fe41e77529caa26ae473df Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 15:38:44 +0900 Subject: [PATCH 275/771] =?UTF-8?q?feat(api):=20Station=E3=82=A8=E3=83=B3?= =?UTF-8?q?=E3=83=86=E3=82=A3=E3=83=86=E3=82=A3=E3=81=AEAPI=E5=AE=9F?= =?UTF-8?q?=E8=A3=85=20-=20CreateStation=20-=20GetStationListByBusId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/station.go | 26 +++++++ backend/usecases/station/station.go | 107 ++++++++++++++++++++++++++++ backend/usecases/utils/utils.go | 13 ++++ 3 files changed, 146 insertions(+) create mode 100644 backend/interfaces/station.go create mode 100644 backend/usecases/station/station.go diff --git a/backend/interfaces/station.go b/backend/interfaces/station.go new file mode 100644 index 00000000..101399c2 --- /dev/null +++ b/backend/interfaces/station.go @@ -0,0 +1,26 @@ +package interfaces + +import ( + "context" + + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/station" +) + +type stationServiceServer struct { + interactor *station.Interactor +} + +func NewStationServiceServer(interactor *station.Interactor) pb.StationServiceServer { + return &stationServiceServer{interactor} +} + +// CreateStation implements where_child_busv1.StationServiceServer. +func (s *stationServiceServer) CreateStation(ctx context.Context, req *pb.CreateStationRequest) (*pb.CreateStationResponse, error) { + return s.interactor.CreateStation(ctx, req) +} + +// GetStationListByBusId implements where_child_busv1.StationServiceServer. +func (s *stationServiceServer) GetStationListByBusId(ctx context.Context, req *pb.GetStationListByBusIdRequest) (*pb.GetStationListByBusIdResponse, error) { + return s.interactor.GetStationListByBusId(ctx, req) +} diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go new file mode 100644 index 00000000..60af67fc --- /dev/null +++ b/backend/usecases/station/station.go @@ -0,0 +1,107 @@ +package station + +import ( + "context" + "fmt" + + "golang.org/x/exp/slog" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + stationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" + "github.com/google/uuid" +) + +type Interactor struct { + entClient *ent.Client + logger *slog.Logger +} + +func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { + return &Interactor{entClient, logger} +} + +func (i *Interactor) CreateStation(ctx context.Context, req *pb.CreateStationRequest) (*pb.CreateStationResponse, error) { + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + defer tx.Rollback() + + guardianID, err := uuid.Parse(req.GuardianId) + if err != nil { + return nil, fmt.Errorf("failed to parse ID: %w", err) + } + + station, err := tx.Station.Create(). + SetGuardianID(guardianID). + SetLatitude(req.Latitude). + SetLongitude(req.longitude). + Save(ctx) + if err != nil { + return nil, fmt.Errorf("failed to create station: %w", err) + } + + return &pb.CreateStationResponse{ + Station: utils.ToPbStation(station), + }, nil +} + +func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStationListByBusIdRequest) (*pb.GetStationListByBusIdResponse, error) { + busID, err := uuid.Parse(req.BusId) + if err != nil { + return nil, fmt.Errorf("failed to parse bus ID: %w", err) + } + + stations, err := i.entClient.Station.Query(). + Where(stationRepo.HasBusWith(busRepo.ID(busID))). + WithGuardian(func(q *ent.GuardianQuery) { + q.WithChildren() // Guardian に紐づく Children も取得 + }). + All(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get stations with guardians and children: %w", err) + } + + pbStations := make([]*pb.Station, 0, len(stations)) + uniqueGuardians := make(map[string]*pb.GuardianResponse) + uniqueChildren := make(map[string]*pb.Child) + + for _, station := range stations { + // ステーションをプロトコルバッファ形式に変換 + pbStation := utils.ToPbStation(station) + pbStations = append(pbStations, pbStation) + + if station.Edges.Guardian != nil { + guardian := station.Edges.Guardian + pbGuardian := utils.ToPbGuardianResponse(guardian) + guardianID := guardian.ID.String() + uniqueGuardians[guardianID] = pbGuardian // ガーディアンを一意に保持 + + for _, child := range guardian.Edges.Children { + pbChild := utils.ToPbChild(child) + childID := child.ID.String() + uniqueChildren[childID] = pbChild // 子供を一意に保持 + } + } + } + + // マップからスライスへの変換 + pbGuardians := make([]*pb.GuardianResponse, 0, len(uniqueGuardians)) + for _, guardian := range uniqueGuardians { + pbGuardians = append(pbGuardians, guardian) + } + + pbChildren := make([]*pb.Child, 0, len(uniqueChildren)) + for _, child := range uniqueChildren { + pbChildren = append(pbChildren, child) + } + + return &pb.GetStationListByBusIdResponse{ + Stations: pbStations, + Guardians: pbGuardians, + Children: pbChildren, + }, nil +} diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 319535ce..a0c32717 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -116,6 +116,19 @@ func ToPbNurseryResponse(t *ent.Nursery) *pb.NurseryResponse { } } +func ToPbStation(t *ent.Station) *pb.Station { + return &pb.Station{ + Id: t.ID.String(), + GuardianId: t.Edges.Guardian.ID.String(), + Latitude: t.Latitude, + Longitude: t.Longitude, + MorningOrder: int32(t.MorningOrder), + EveningOrder: int32(t.EveningOrder), + CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, + UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + } +} + func HashPassword(password string) (string, error) { // 環境変数からペッパーを取得 config, _ := config.New() From a81b0633a69c55554ff9dfc550603e7adc055b2a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 15:44:41 +0900 Subject: [PATCH 276/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E3=82=B9=E3=82=AD=E3=83=BC=E3=83=9E=E3=81=AB=E9=A1=94=E8=AD=98?= =?UTF-8?q?=E5=88=A5=E3=82=92=E6=9C=89=E5=8A=B9=E3=81=AB=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB=E3=83=89=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/bus.go | 13 +++++ backend/domain/repository/ent/bus/bus.go | 10 ++++ backend/domain/repository/ent/bus/where.go | 15 +++++ backend/domain/repository/ent/bus_create.go | 25 +++++++++ backend/domain/repository/ent/bus_update.go | 34 +++++++++++ .../domain/repository/ent/migrate/schema.go | 3 +- backend/domain/repository/ent/mutation.go | 56 ++++++++++++++++++- backend/domain/repository/ent/runtime.go | 8 ++- backend/domain/repository/ent/schema/bus.go | 1 + 9 files changed, 161 insertions(+), 4 deletions(-) diff --git a/backend/domain/repository/ent/bus.go b/backend/domain/repository/ent/bus.go index 3bd64037..d29981b7 100644 --- a/backend/domain/repository/ent/bus.go +++ b/backend/domain/repository/ent/bus.go @@ -29,6 +29,8 @@ type Bus struct { Longitude float64 `json:"longitude,omitempty"` // バスのステータス(運行中、停止中など) Status bus.Status `json:"status,omitempty"` + // 顔識別が有効かどうか + EnableFaceRecognition bool `json:"enable_face_recognition,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. @@ -100,6 +102,8 @@ func (*Bus) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { + case bus.FieldEnableFaceRecognition: + values[i] = new(sql.NullBool) case bus.FieldLatitude, bus.FieldLongitude: values[i] = new(sql.NullFloat64) case bus.FieldName, bus.FieldPlateNumber, bus.FieldStatus: @@ -161,6 +165,12 @@ func (b *Bus) assignValues(columns []string, values []any) error { } else if value.Valid { b.Status = bus.Status(value.String) } + case bus.FieldEnableFaceRecognition: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field enable_face_recognition", values[i]) + } else if value.Valid { + b.EnableFaceRecognition = value.Bool + } case bus.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { return fmt.Errorf("unexpected type %T for field created_at", values[i]) @@ -251,6 +261,9 @@ func (b *Bus) String() string { builder.WriteString("status=") builder.WriteString(fmt.Sprintf("%v", b.Status)) builder.WriteString(", ") + builder.WriteString("enable_face_recognition=") + builder.WriteString(fmt.Sprintf("%v", b.EnableFaceRecognition)) + builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(b.CreatedAt.Format(time.ANSIC)) builder.WriteString(", ") diff --git a/backend/domain/repository/ent/bus/bus.go b/backend/domain/repository/ent/bus/bus.go index db552332..9cd69982 100644 --- a/backend/domain/repository/ent/bus/bus.go +++ b/backend/domain/repository/ent/bus/bus.go @@ -26,6 +26,8 @@ const ( FieldLongitude = "longitude" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" + // FieldEnableFaceRecognition holds the string denoting the enable_face_recognition field in the database. + FieldEnableFaceRecognition = "enable_face_recognition" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -76,6 +78,7 @@ var Columns = []string{ FieldLatitude, FieldLongitude, FieldStatus, + FieldEnableFaceRecognition, FieldCreatedAt, FieldUpdatedAt, } @@ -108,6 +111,8 @@ func ValidColumn(column string) bool { } var ( + // DefaultEnableFaceRecognition holds the default value on creation for the "enable_face_recognition" field. + DefaultEnableFaceRecognition bool // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. @@ -178,6 +183,11 @@ func ByStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStatus, opts...).ToFunc() } +// ByEnableFaceRecognition orders the results by the enable_face_recognition field. +func ByEnableFaceRecognition(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEnableFaceRecognition, opts...).ToFunc() +} + // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() diff --git a/backend/domain/repository/ent/bus/where.go b/backend/domain/repository/ent/bus/where.go index 9ddc9e53..74da26b0 100644 --- a/backend/domain/repository/ent/bus/where.go +++ b/backend/domain/repository/ent/bus/where.go @@ -76,6 +76,11 @@ func Longitude(v float64) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldLongitude, v)) } +// EnableFaceRecognition applies equality check predicate on the "enable_face_recognition" field. It's identical to EnableFaceRecognitionEQ. +func EnableFaceRecognition(v bool) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldEnableFaceRecognition, v)) +} + // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. func CreatedAt(v time.Time) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldCreatedAt, v)) @@ -346,6 +351,16 @@ func StatusNotIn(vs ...Status) predicate.Bus { return predicate.Bus(sql.FieldNotIn(FieldStatus, vs...)) } +// EnableFaceRecognitionEQ applies the EQ predicate on the "enable_face_recognition" field. +func EnableFaceRecognitionEQ(v bool) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldEnableFaceRecognition, v)) +} + +// EnableFaceRecognitionNEQ applies the NEQ predicate on the "enable_face_recognition" field. +func EnableFaceRecognitionNEQ(v bool) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldEnableFaceRecognition, v)) +} + // CreatedAtEQ applies the EQ predicate on the "created_at" field. func CreatedAtEQ(v time.Time) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldCreatedAt, v)) diff --git a/backend/domain/repository/ent/bus_create.go b/backend/domain/repository/ent/bus_create.go index 78d1a015..c08f438a 100644 --- a/backend/domain/repository/ent/bus_create.go +++ b/backend/domain/repository/ent/bus_create.go @@ -87,6 +87,20 @@ func (bc *BusCreate) SetNillableStatus(b *bus.Status) *BusCreate { return bc } +// SetEnableFaceRecognition sets the "enable_face_recognition" field. +func (bc *BusCreate) SetEnableFaceRecognition(b bool) *BusCreate { + bc.mutation.SetEnableFaceRecognition(b) + return bc +} + +// SetNillableEnableFaceRecognition sets the "enable_face_recognition" field if the given value is not nil. +func (bc *BusCreate) SetNillableEnableFaceRecognition(b *bool) *BusCreate { + if b != nil { + bc.SetEnableFaceRecognition(*b) + } + return bc +} + // SetCreatedAt sets the "created_at" field. func (bc *BusCreate) SetCreatedAt(t time.Time) *BusCreate { bc.mutation.SetCreatedAt(t) @@ -232,6 +246,10 @@ func (bc *BusCreate) defaults() { v := bus.DefaultStatus bc.mutation.SetStatus(v) } + if _, ok := bc.mutation.EnableFaceRecognition(); !ok { + v := bus.DefaultEnableFaceRecognition + bc.mutation.SetEnableFaceRecognition(v) + } if _, ok := bc.mutation.CreatedAt(); !ok { v := bus.DefaultCreatedAt() bc.mutation.SetCreatedAt(v) @@ -259,6 +277,9 @@ func (bc *BusCreate) check() error { return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Bus.status": %w`, err)} } } + if _, ok := bc.mutation.EnableFaceRecognition(); !ok { + return &ValidationError{Name: "enable_face_recognition", err: errors.New(`ent: missing required field "Bus.enable_face_recognition"`)} + } if _, ok := bc.mutation.CreatedAt(); !ok { return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Bus.created_at"`)} } @@ -320,6 +341,10 @@ func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { _spec.SetField(bus.FieldStatus, field.TypeEnum, value) _node.Status = value } + if value, ok := bc.mutation.EnableFaceRecognition(); ok { + _spec.SetField(bus.FieldEnableFaceRecognition, field.TypeBool, value) + _node.EnableFaceRecognition = value + } if value, ok := bc.mutation.CreatedAt(); ok { _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) _node.CreatedAt = value diff --git a/backend/domain/repository/ent/bus_update.go b/backend/domain/repository/ent/bus_update.go index ad2b32a5..e414da01 100644 --- a/backend/domain/repository/ent/bus_update.go +++ b/backend/domain/repository/ent/bus_update.go @@ -135,6 +135,20 @@ func (bu *BusUpdate) SetNillableStatus(b *bus.Status) *BusUpdate { return bu } +// SetEnableFaceRecognition sets the "enable_face_recognition" field. +func (bu *BusUpdate) SetEnableFaceRecognition(b bool) *BusUpdate { + bu.mutation.SetEnableFaceRecognition(b) + return bu +} + +// SetNillableEnableFaceRecognition sets the "enable_face_recognition" field if the given value is not nil. +func (bu *BusUpdate) SetNillableEnableFaceRecognition(b *bool) *BusUpdate { + if b != nil { + bu.SetEnableFaceRecognition(*b) + } + return bu +} + // SetCreatedAt sets the "created_at" field. func (bu *BusUpdate) SetCreatedAt(t time.Time) *BusUpdate { bu.mutation.SetCreatedAt(t) @@ -381,6 +395,9 @@ func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := bu.mutation.Status(); ok { _spec.SetField(bus.FieldStatus, field.TypeEnum, value) } + if value, ok := bu.mutation.EnableFaceRecognition(); ok { + _spec.SetField(bus.FieldEnableFaceRecognition, field.TypeBool, value) + } if value, ok := bu.mutation.CreatedAt(); ok { _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) } @@ -673,6 +690,20 @@ func (buo *BusUpdateOne) SetNillableStatus(b *bus.Status) *BusUpdateOne { return buo } +// SetEnableFaceRecognition sets the "enable_face_recognition" field. +func (buo *BusUpdateOne) SetEnableFaceRecognition(b bool) *BusUpdateOne { + buo.mutation.SetEnableFaceRecognition(b) + return buo +} + +// SetNillableEnableFaceRecognition sets the "enable_face_recognition" field if the given value is not nil. +func (buo *BusUpdateOne) SetNillableEnableFaceRecognition(b *bool) *BusUpdateOne { + if b != nil { + buo.SetEnableFaceRecognition(*b) + } + return buo +} + // SetCreatedAt sets the "created_at" field. func (buo *BusUpdateOne) SetCreatedAt(t time.Time) *BusUpdateOne { buo.mutation.SetCreatedAt(t) @@ -949,6 +980,9 @@ func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { if value, ok := buo.mutation.Status(); ok { _spec.SetField(bus.FieldStatus, field.TypeEnum, value) } + if value, ok := buo.mutation.EnableFaceRecognition(); ok { + _spec.SetField(bus.FieldEnableFaceRecognition, field.TypeBool, value) + } if value, ok := buo.mutation.CreatedAt(); ok { _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) } diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 5dca92e4..5f2bb489 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -44,6 +44,7 @@ var ( {Name: "latitude", Type: field.TypeFloat64, Nullable: true}, {Name: "longitude", Type: field.TypeFloat64, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"stopped", "running", "maintenance"}, Default: "stopped"}, + {Name: "enable_face_recognition", Type: field.TypeBool, Default: false}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "bus_nursery", Type: field.TypeUUID, Nullable: true}, @@ -56,7 +57,7 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "bus_nurseries_nursery", - Columns: []*schema.Column{BusColumns[8]}, + Columns: []*schema.Column{BusColumns[9]}, RefColumns: []*schema.Column{NurseriesColumns[0]}, OnDelete: schema.SetNull, }, diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index 659a22b3..7f3ceecc 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -567,6 +567,7 @@ type BusMutation struct { longitude *float64 addlongitude *float64 status *bus.Status + enable_face_recognition *bool created_at *time.Time updated_at *time.Time clearedFields map[string]struct{} @@ -951,6 +952,42 @@ func (m *BusMutation) ResetStatus() { m.status = nil } +// SetEnableFaceRecognition sets the "enable_face_recognition" field. +func (m *BusMutation) SetEnableFaceRecognition(b bool) { + m.enable_face_recognition = &b +} + +// EnableFaceRecognition returns the value of the "enable_face_recognition" field in the mutation. +func (m *BusMutation) EnableFaceRecognition() (r bool, exists bool) { + v := m.enable_face_recognition + if v == nil { + return + } + return *v, true +} + +// OldEnableFaceRecognition returns the old "enable_face_recognition" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldEnableFaceRecognition(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldEnableFaceRecognition is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldEnableFaceRecognition requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldEnableFaceRecognition: %w", err) + } + return oldValue.EnableFaceRecognition, nil +} + +// ResetEnableFaceRecognition resets all changes to the "enable_face_recognition" field. +func (m *BusMutation) ResetEnableFaceRecognition() { + m.enable_face_recognition = nil +} + // SetCreatedAt sets the "created_at" field. func (m *BusMutation) SetCreatedAt(t time.Time) { m.created_at = &t @@ -1258,7 +1295,7 @@ func (m *BusMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *BusMutation) Fields() []string { - fields := make([]string, 0, 7) + fields := make([]string, 0, 8) if m.name != nil { fields = append(fields, bus.FieldName) } @@ -1274,6 +1311,9 @@ func (m *BusMutation) Fields() []string { if m.status != nil { fields = append(fields, bus.FieldStatus) } + if m.enable_face_recognition != nil { + fields = append(fields, bus.FieldEnableFaceRecognition) + } if m.created_at != nil { fields = append(fields, bus.FieldCreatedAt) } @@ -1298,6 +1338,8 @@ func (m *BusMutation) Field(name string) (ent.Value, bool) { return m.Longitude() case bus.FieldStatus: return m.Status() + case bus.FieldEnableFaceRecognition: + return m.EnableFaceRecognition() case bus.FieldCreatedAt: return m.CreatedAt() case bus.FieldUpdatedAt: @@ -1321,6 +1363,8 @@ func (m *BusMutation) OldField(ctx context.Context, name string) (ent.Value, err return m.OldLongitude(ctx) case bus.FieldStatus: return m.OldStatus(ctx) + case bus.FieldEnableFaceRecognition: + return m.OldEnableFaceRecognition(ctx) case bus.FieldCreatedAt: return m.OldCreatedAt(ctx) case bus.FieldUpdatedAt: @@ -1369,6 +1413,13 @@ func (m *BusMutation) SetField(name string, value ent.Value) error { } m.SetStatus(v) return nil + case bus.FieldEnableFaceRecognition: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetEnableFaceRecognition(v) + return nil case bus.FieldCreatedAt: v, ok := value.(time.Time) if !ok { @@ -1495,6 +1546,9 @@ func (m *BusMutation) ResetField(name string) error { case bus.FieldStatus: m.ResetStatus() return nil + case bus.FieldEnableFaceRecognition: + m.ResetEnableFaceRecognition() + return nil case bus.FieldCreatedAt: m.ResetCreatedAt() return nil diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index 4cd2c00d..fabc11e9 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -32,12 +32,16 @@ func init() { boardingrecord.DefaultID = boardingrecordDescID.Default.(func() uuid.UUID) busFields := schema.Bus{}.Fields() _ = busFields + // busDescEnableFaceRecognition is the schema descriptor for enable_face_recognition field. + busDescEnableFaceRecognition := busFields[6].Descriptor() + // bus.DefaultEnableFaceRecognition holds the default value on creation for the enable_face_recognition field. + bus.DefaultEnableFaceRecognition = busDescEnableFaceRecognition.Default.(bool) // busDescCreatedAt is the schema descriptor for created_at field. - busDescCreatedAt := busFields[6].Descriptor() + busDescCreatedAt := busFields[7].Descriptor() // bus.DefaultCreatedAt holds the default value on creation for the created_at field. bus.DefaultCreatedAt = busDescCreatedAt.Default.(func() time.Time) // busDescUpdatedAt is the schema descriptor for updated_at field. - busDescUpdatedAt := busFields[7].Descriptor() + busDescUpdatedAt := busFields[8].Descriptor() // bus.DefaultUpdatedAt holds the default value on creation for the updated_at field. bus.DefaultUpdatedAt = busDescUpdatedAt.Default.(func() time.Time) // bus.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. diff --git a/backend/domain/repository/ent/schema/bus.go b/backend/domain/repository/ent/schema/bus.go index 2fabf6f4..90269e69 100644 --- a/backend/domain/repository/ent/schema/bus.go +++ b/backend/domain/repository/ent/schema/bus.go @@ -24,6 +24,7 @@ func (Bus) Fields() []ent.Field { field.Float("longitude").Optional().Comment("現在の経度"), field.Enum("status").Default("stopped").Comment("バスのステータス(運行中、停止中など)"). Values("stopped", "running", "maintenance"), + field.Bool("enable_face_recognition").Default(false).Comment("顔識別が有効かどうか"), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } From d69c89f8162056c3a4132ba28940c413741144df Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 15:56:08 +0900 Subject: [PATCH 277/771] =?UTF-8?q?feat:=E4=B9=97=E9=99=8D=E7=8A=B6?= =?UTF-8?q?=E6=85=8B=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/utils/current_time_body.dart | 6 +-- .../lib/pages/daily_page/daily_page.dart | 40 +++++++++++++++---- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/components/utils/current_time_body.dart b/frontend/where_child_bus_guardian/lib/components/utils/current_time_body.dart index ace931f9..496f016b 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/current_time_body.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/current_time_body.dart @@ -4,10 +4,10 @@ import 'current_time_widget.dart'; class CurrentTimeBody extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( - height: MediaQuery.of(context).size.height * 0.2, + return SizedBox( + height: MediaQuery.of(context).size.height * 0.15, child: Column( - mainAxisAlignment: MainAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.center, children: [ const Text( "現在時刻", diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index 0c98fbd7..35709e33 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -9,11 +9,11 @@ class DailyPage extends StatefulWidget { } class _DailyPageState extends State { + var isBoarding = false; var hasBag = true; var hasLunchBox = true; var hasWaterBottle = true; - var hasUmbrella = true; - var isBoarding = true; + var hasUmbrella = false; @override Widget build(BuildContext context) { @@ -37,8 +37,10 @@ class _DailyPageState extends State { children: [ childFaceAndExpression(), Padding( - padding: const EdgeInsets.only(top: 20, bottom: 20), + padding: const EdgeInsets.only(top: 20, bottom: 10), child: childName()), + statusIconAndStatusField( + Icons.directions_bus, isBoardingStatusField(context)), statusIconAndStatusField(Icons.business_center, childItemList(context)), ], ); @@ -99,13 +101,35 @@ class _DailyPageState extends State { )); } + Widget isBoardingStatusField(context) { + return Container( + width: MediaQuery.of(context).size.width * 0.5, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + border: Border.all( + color: isBoarding ? Colors.red : Colors.green, + ), + color: isBoarding ? Colors.red[100] : Colors.green[100], + ), + child: Padding( + padding: const EdgeInsets.all(10.0), + child: Text( + isBoarding ? "乗車中" : "降車済", + style: TextStyle( + fontSize: 16, + color: isBoarding ? Colors.red : Colors.green, + ), + textAlign: TextAlign.center, + )), + ); + } + Widget childItemList(BuildContext context) { return SizedBox( - width: MediaQuery.of(context).size.width * 0.6, + width: MediaQuery.of(context).size.width * 0.5, child: Wrap( direction: Axis.horizontal, - alignment: WrapAlignment.center, - spacing: 8.0, + alignment: WrapAlignment.spaceBetween, runAlignment: WrapAlignment.spaceBetween, runSpacing: 4.0, children: [ @@ -120,7 +144,7 @@ class _DailyPageState extends State { Widget itemText(String itemName, bool hasItem) { return Container( - width: 90, + width: MediaQuery.of(context).size.width * 0.24, decoration: BoxDecoration( borderRadius: BorderRadius.circular(5), border: Border.all( @@ -129,7 +153,7 @@ class _DailyPageState extends State { color: hasItem ? Colors.green[100] : Colors.red[100], ), child: Padding( - padding: const EdgeInsets.all(10.0), + padding: const EdgeInsets.only(top: 10.0, bottom: 10.0), child: Text( itemName, style: TextStyle( From bfe8b25878ad59c2cea9c0bb77b5c59da32b4dc1 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 17:14:48 +0900 Subject: [PATCH 278/771] =?UTF-8?q?feat!:=20schema=E3=82=92=E5=A4=A7?= =?UTF-8?q?=E5=B9=85=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BREAKING CHANGE --- backend/domain/repository/ent/child.go | 24 +- backend/domain/repository/ent/child/child.go | 20 - backend/domain/repository/ent/child/where.go | 30 - backend/domain/repository/ent/child_create.go | 50 -- backend/domain/repository/ent/child_update.go | 68 -- backend/domain/repository/ent/childphoto.go | 13 - .../repository/ent/childphoto/childphoto.go | 10 - .../domain/repository/ent/childphoto/where.go | 15 - .../repository/ent/childphoto_create.go | 25 - .../domain/repository/ent/childphoto_query.go | 8 +- .../repository/ent/childphoto_update.go | 34 - backend/domain/repository/ent/client.go | 64 ++ backend/domain/repository/ent/guardian.go | 24 + .../repository/ent/guardian/guardian.go | 20 + .../domain/repository/ent/guardian/where.go | 30 + .../domain/repository/ent/guardian_create.go | 50 ++ .../domain/repository/ent/guardian_update.go | 68 ++ .../domain/repository/ent/migrate/schema.go | 33 +- backend/domain/repository/ent/mutation.go | 818 ++++++++++-------- backend/domain/repository/ent/runtime.go | 48 +- backend/domain/repository/ent/schema/child.go | 2 - .../repository/ent/schema/child_photo.go | 1 - .../domain/repository/ent/schema/guardian.go | 2 + .../domain/repository/ent/schema/station.go | 10 +- backend/domain/repository/ent/station.go | 124 ++- .../domain/repository/ent/station/station.go | 112 ++- .../domain/repository/ent/station/where.go | 182 ++-- .../domain/repository/ent/station_create.go | 160 +++- .../domain/repository/ent/station_query.go | 328 ++++++- .../domain/repository/ent/station_update.go | 648 +++++++++++--- 30 files changed, 2023 insertions(+), 998 deletions(-) diff --git a/backend/domain/repository/ent/child.go b/backend/domain/repository/ent/child.go index 629ab85a..122fd6a6 100644 --- a/backend/domain/repository/ent/child.go +++ b/backend/domain/repository/ent/child.go @@ -26,10 +26,6 @@ type Child struct { Age int `json:"age,omitempty"` // Sex holds the value of the "sex" field. Sex child.Sex `json:"sex,omitempty"` - // 朝のバスに乗るかどうか - IsRideMorningBus bool `json:"is_ride_morning_bus,omitempty"` - // 放課後のバスに乗るかどうか - IsRideEveningBus bool `json:"is_ride_evening_bus,omitempty"` // 持ち物が欠けていないかをチェックするかどうか CheckForMissingItems bool `json:"check_for_missing_items,omitempty"` // HasBag holds the value of the "has_bag" field. @@ -129,7 +125,7 @@ func (*Child) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { - case child.FieldIsRideMorningBus, child.FieldIsRideEveningBus, child.FieldCheckForMissingItems, child.FieldHasBag, child.FieldHasLunchBox, child.FieldHasWaterBottle, child.FieldHasUmbrella, child.FieldHasOther: + case child.FieldCheckForMissingItems, child.FieldHasBag, child.FieldHasLunchBox, child.FieldHasWaterBottle, child.FieldHasUmbrella, child.FieldHasOther: values[i] = new(sql.NullBool) case child.FieldAge: values[i] = new(sql.NullInt64) @@ -182,18 +178,6 @@ func (c *Child) assignValues(columns []string, values []any) error { } else if value.Valid { c.Sex = child.Sex(value.String) } - case child.FieldIsRideMorningBus: - if value, ok := values[i].(*sql.NullBool); !ok { - return fmt.Errorf("unexpected type %T for field is_ride_morning_bus", values[i]) - } else if value.Valid { - c.IsRideMorningBus = value.Bool - } - case child.FieldIsRideEveningBus: - if value, ok := values[i].(*sql.NullBool); !ok { - return fmt.Errorf("unexpected type %T for field is_ride_evening_bus", values[i]) - } else if value.Valid { - c.IsRideEveningBus = value.Bool - } case child.FieldCheckForMissingItems: if value, ok := values[i].(*sql.NullBool); !ok { return fmt.Errorf("unexpected type %T for field check_for_missing_items", values[i]) @@ -326,12 +310,6 @@ func (c *Child) String() string { builder.WriteString("sex=") builder.WriteString(fmt.Sprintf("%v", c.Sex)) builder.WriteString(", ") - builder.WriteString("is_ride_morning_bus=") - builder.WriteString(fmt.Sprintf("%v", c.IsRideMorningBus)) - builder.WriteString(", ") - builder.WriteString("is_ride_evening_bus=") - builder.WriteString(fmt.Sprintf("%v", c.IsRideEveningBus)) - builder.WriteString(", ") builder.WriteString("check_for_missing_items=") builder.WriteString(fmt.Sprintf("%v", c.CheckForMissingItems)) builder.WriteString(", ") diff --git a/backend/domain/repository/ent/child/child.go b/backend/domain/repository/ent/child/child.go index 02920279..753fd161 100644 --- a/backend/domain/repository/ent/child/child.go +++ b/backend/domain/repository/ent/child/child.go @@ -22,10 +22,6 @@ const ( FieldAge = "age" // FieldSex holds the string denoting the sex field in the database. FieldSex = "sex" - // FieldIsRideMorningBus holds the string denoting the is_ride_morning_bus field in the database. - FieldIsRideMorningBus = "is_ride_morning_bus" - // FieldIsRideEveningBus holds the string denoting the is_ride_evening_bus field in the database. - FieldIsRideEveningBus = "is_ride_evening_bus" // FieldCheckForMissingItems holds the string denoting the check_for_missing_items field in the database. FieldCheckForMissingItems = "check_for_missing_items" // FieldHasBag holds the string denoting the has_bag field in the database. @@ -97,8 +93,6 @@ var Columns = []string{ FieldName, FieldAge, FieldSex, - FieldIsRideMorningBus, - FieldIsRideEveningBus, FieldCheckForMissingItems, FieldHasBag, FieldHasLunchBox, @@ -132,10 +126,6 @@ func ValidColumn(column string) bool { } var ( - // DefaultIsRideMorningBus holds the default value on creation for the "is_ride_morning_bus" field. - DefaultIsRideMorningBus bool - // DefaultIsRideEveningBus holds the default value on creation for the "is_ride_evening_bus" field. - DefaultIsRideEveningBus bool // DefaultCheckForMissingItems holds the default value on creation for the "check_for_missing_items" field. DefaultCheckForMissingItems bool // DefaultHasBag holds the default value on creation for the "has_bag" field. @@ -205,16 +195,6 @@ func BySex(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldSex, opts...).ToFunc() } -// ByIsRideMorningBus orders the results by the is_ride_morning_bus field. -func ByIsRideMorningBus(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldIsRideMorningBus, opts...).ToFunc() -} - -// ByIsRideEveningBus orders the results by the is_ride_evening_bus field. -func ByIsRideEveningBus(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldIsRideEveningBus, opts...).ToFunc() -} - // ByCheckForMissingItems orders the results by the check_for_missing_items field. func ByCheckForMissingItems(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCheckForMissingItems, opts...).ToFunc() diff --git a/backend/domain/repository/ent/child/where.go b/backend/domain/repository/ent/child/where.go index 9ba51ff3..9e17bca5 100644 --- a/backend/domain/repository/ent/child/where.go +++ b/backend/domain/repository/ent/child/where.go @@ -66,16 +66,6 @@ func Age(v int) predicate.Child { return predicate.Child(sql.FieldEQ(FieldAge, v)) } -// IsRideMorningBus applies equality check predicate on the "is_ride_morning_bus" field. It's identical to IsRideMorningBusEQ. -func IsRideMorningBus(v bool) predicate.Child { - return predicate.Child(sql.FieldEQ(FieldIsRideMorningBus, v)) -} - -// IsRideEveningBus applies equality check predicate on the "is_ride_evening_bus" field. It's identical to IsRideEveningBusEQ. -func IsRideEveningBus(v bool) predicate.Child { - return predicate.Child(sql.FieldEQ(FieldIsRideEveningBus, v)) -} - // CheckForMissingItems applies equality check predicate on the "check_for_missing_items" field. It's identical to CheckForMissingItemsEQ. func CheckForMissingItems(v bool) predicate.Child { return predicate.Child(sql.FieldEQ(FieldCheckForMissingItems, v)) @@ -241,26 +231,6 @@ func SexNotIn(vs ...Sex) predicate.Child { return predicate.Child(sql.FieldNotIn(FieldSex, vs...)) } -// IsRideMorningBusEQ applies the EQ predicate on the "is_ride_morning_bus" field. -func IsRideMorningBusEQ(v bool) predicate.Child { - return predicate.Child(sql.FieldEQ(FieldIsRideMorningBus, v)) -} - -// IsRideMorningBusNEQ applies the NEQ predicate on the "is_ride_morning_bus" field. -func IsRideMorningBusNEQ(v bool) predicate.Child { - return predicate.Child(sql.FieldNEQ(FieldIsRideMorningBus, v)) -} - -// IsRideEveningBusEQ applies the EQ predicate on the "is_ride_evening_bus" field. -func IsRideEveningBusEQ(v bool) predicate.Child { - return predicate.Child(sql.FieldEQ(FieldIsRideEveningBus, v)) -} - -// IsRideEveningBusNEQ applies the NEQ predicate on the "is_ride_evening_bus" field. -func IsRideEveningBusNEQ(v bool) predicate.Child { - return predicate.Child(sql.FieldNEQ(FieldIsRideEveningBus, v)) -} - // CheckForMissingItemsEQ applies the EQ predicate on the "check_for_missing_items" field. func CheckForMissingItemsEQ(v bool) predicate.Child { return predicate.Child(sql.FieldEQ(FieldCheckForMissingItems, v)) diff --git a/backend/domain/repository/ent/child_create.go b/backend/domain/repository/ent/child_create.go index f0cc6369..ed256ed4 100644 --- a/backend/domain/repository/ent/child_create.go +++ b/backend/domain/repository/ent/child_create.go @@ -44,34 +44,6 @@ func (cc *ChildCreate) SetSex(c child.Sex) *ChildCreate { return cc } -// SetIsRideMorningBus sets the "is_ride_morning_bus" field. -func (cc *ChildCreate) SetIsRideMorningBus(b bool) *ChildCreate { - cc.mutation.SetIsRideMorningBus(b) - return cc -} - -// SetNillableIsRideMorningBus sets the "is_ride_morning_bus" field if the given value is not nil. -func (cc *ChildCreate) SetNillableIsRideMorningBus(b *bool) *ChildCreate { - if b != nil { - cc.SetIsRideMorningBus(*b) - } - return cc -} - -// SetIsRideEveningBus sets the "is_ride_evening_bus" field. -func (cc *ChildCreate) SetIsRideEveningBus(b bool) *ChildCreate { - cc.mutation.SetIsRideEveningBus(b) - return cc -} - -// SetNillableIsRideEveningBus sets the "is_ride_evening_bus" field if the given value is not nil. -func (cc *ChildCreate) SetNillableIsRideEveningBus(b *bool) *ChildCreate { - if b != nil { - cc.SetIsRideEveningBus(*b) - } - return cc -} - // SetCheckForMissingItems sets the "check_for_missing_items" field. func (cc *ChildCreate) SetCheckForMissingItems(b bool) *ChildCreate { cc.mutation.SetCheckForMissingItems(b) @@ -316,14 +288,6 @@ func (cc *ChildCreate) ExecX(ctx context.Context) { // defaults sets the default values of the builder before save. func (cc *ChildCreate) defaults() { - if _, ok := cc.mutation.IsRideMorningBus(); !ok { - v := child.DefaultIsRideMorningBus - cc.mutation.SetIsRideMorningBus(v) - } - if _, ok := cc.mutation.IsRideEveningBus(); !ok { - v := child.DefaultIsRideEveningBus - cc.mutation.SetIsRideEveningBus(v) - } if _, ok := cc.mutation.CheckForMissingItems(); !ok { v := child.DefaultCheckForMissingItems cc.mutation.SetCheckForMissingItems(v) @@ -378,12 +342,6 @@ func (cc *ChildCreate) check() error { return &ValidationError{Name: "sex", err: fmt.Errorf(`ent: validator failed for field "Child.sex": %w`, err)} } } - if _, ok := cc.mutation.IsRideMorningBus(); !ok { - return &ValidationError{Name: "is_ride_morning_bus", err: errors.New(`ent: missing required field "Child.is_ride_morning_bus"`)} - } - if _, ok := cc.mutation.IsRideEveningBus(); !ok { - return &ValidationError{Name: "is_ride_evening_bus", err: errors.New(`ent: missing required field "Child.is_ride_evening_bus"`)} - } if _, ok := cc.mutation.CheckForMissingItems(); !ok { return &ValidationError{Name: "check_for_missing_items", err: errors.New(`ent: missing required field "Child.check_for_missing_items"`)} } @@ -455,14 +413,6 @@ func (cc *ChildCreate) createSpec() (*Child, *sqlgraph.CreateSpec) { _spec.SetField(child.FieldSex, field.TypeEnum, value) _node.Sex = value } - if value, ok := cc.mutation.IsRideMorningBus(); ok { - _spec.SetField(child.FieldIsRideMorningBus, field.TypeBool, value) - _node.IsRideMorningBus = value - } - if value, ok := cc.mutation.IsRideEveningBus(); ok { - _spec.SetField(child.FieldIsRideEveningBus, field.TypeBool, value) - _node.IsRideEveningBus = value - } if value, ok := cc.mutation.CheckForMissingItems(); ok { _spec.SetField(child.FieldCheckForMissingItems, field.TypeBool, value) _node.CheckForMissingItems = value diff --git a/backend/domain/repository/ent/child_update.go b/backend/domain/repository/ent/child_update.go index 2cfeef5a..43463e86 100644 --- a/backend/domain/repository/ent/child_update.go +++ b/backend/domain/repository/ent/child_update.go @@ -83,34 +83,6 @@ func (cu *ChildUpdate) SetNillableSex(c *child.Sex) *ChildUpdate { return cu } -// SetIsRideMorningBus sets the "is_ride_morning_bus" field. -func (cu *ChildUpdate) SetIsRideMorningBus(b bool) *ChildUpdate { - cu.mutation.SetIsRideMorningBus(b) - return cu -} - -// SetNillableIsRideMorningBus sets the "is_ride_morning_bus" field if the given value is not nil. -func (cu *ChildUpdate) SetNillableIsRideMorningBus(b *bool) *ChildUpdate { - if b != nil { - cu.SetIsRideMorningBus(*b) - } - return cu -} - -// SetIsRideEveningBus sets the "is_ride_evening_bus" field. -func (cu *ChildUpdate) SetIsRideEveningBus(b bool) *ChildUpdate { - cu.mutation.SetIsRideEveningBus(b) - return cu -} - -// SetNillableIsRideEveningBus sets the "is_ride_evening_bus" field if the given value is not nil. -func (cu *ChildUpdate) SetNillableIsRideEveningBus(b *bool) *ChildUpdate { - if b != nil { - cu.SetIsRideEveningBus(*b) - } - return cu -} - // SetCheckForMissingItems sets the "check_for_missing_items" field. func (cu *ChildUpdate) SetCheckForMissingItems(b bool) *ChildUpdate { cu.mutation.SetCheckForMissingItems(b) @@ -448,12 +420,6 @@ func (cu *ChildUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := cu.mutation.Sex(); ok { _spec.SetField(child.FieldSex, field.TypeEnum, value) } - if value, ok := cu.mutation.IsRideMorningBus(); ok { - _spec.SetField(child.FieldIsRideMorningBus, field.TypeBool, value) - } - if value, ok := cu.mutation.IsRideEveningBus(); ok { - _spec.SetField(child.FieldIsRideEveningBus, field.TypeBool, value) - } if value, ok := cu.mutation.CheckForMissingItems(); ok { _spec.SetField(child.FieldCheckForMissingItems, field.TypeBool, value) } @@ -740,34 +706,6 @@ func (cuo *ChildUpdateOne) SetNillableSex(c *child.Sex) *ChildUpdateOne { return cuo } -// SetIsRideMorningBus sets the "is_ride_morning_bus" field. -func (cuo *ChildUpdateOne) SetIsRideMorningBus(b bool) *ChildUpdateOne { - cuo.mutation.SetIsRideMorningBus(b) - return cuo -} - -// SetNillableIsRideMorningBus sets the "is_ride_morning_bus" field if the given value is not nil. -func (cuo *ChildUpdateOne) SetNillableIsRideMorningBus(b *bool) *ChildUpdateOne { - if b != nil { - cuo.SetIsRideMorningBus(*b) - } - return cuo -} - -// SetIsRideEveningBus sets the "is_ride_evening_bus" field. -func (cuo *ChildUpdateOne) SetIsRideEveningBus(b bool) *ChildUpdateOne { - cuo.mutation.SetIsRideEveningBus(b) - return cuo -} - -// SetNillableIsRideEveningBus sets the "is_ride_evening_bus" field if the given value is not nil. -func (cuo *ChildUpdateOne) SetNillableIsRideEveningBus(b *bool) *ChildUpdateOne { - if b != nil { - cuo.SetIsRideEveningBus(*b) - } - return cuo -} - // SetCheckForMissingItems sets the "check_for_missing_items" field. func (cuo *ChildUpdateOne) SetCheckForMissingItems(b bool) *ChildUpdateOne { cuo.mutation.SetCheckForMissingItems(b) @@ -1135,12 +1073,6 @@ func (cuo *ChildUpdateOne) sqlSave(ctx context.Context) (_node *Child, err error if value, ok := cuo.mutation.Sex(); ok { _spec.SetField(child.FieldSex, field.TypeEnum, value) } - if value, ok := cuo.mutation.IsRideMorningBus(); ok { - _spec.SetField(child.FieldIsRideMorningBus, field.TypeBool, value) - } - if value, ok := cuo.mutation.IsRideEveningBus(); ok { - _spec.SetField(child.FieldIsRideEveningBus, field.TypeBool, value) - } if value, ok := cuo.mutation.CheckForMissingItems(); ok { _spec.SetField(child.FieldCheckForMissingItems, field.TypeBool, value) } diff --git a/backend/domain/repository/ent/childphoto.go b/backend/domain/repository/ent/childphoto.go index c93649ee..77826be0 100644 --- a/backend/domain/repository/ent/childphoto.go +++ b/backend/domain/repository/ent/childphoto.go @@ -19,8 +19,6 @@ type ChildPhoto struct { config `json:"-"` // ID of the ent. ID uuid.UUID `json:"id,omitempty"` - // 重複画像があるかどうか - IsDuplicate bool `json:"is_duplicate,omitempty"` // レコードの作成日時 CreatedAt time.Time `json:"created_at,omitempty"` // レコードの最終更新日時 @@ -59,8 +57,6 @@ func (*ChildPhoto) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { - case childphoto.FieldIsDuplicate: - values[i] = new(sql.NullBool) case childphoto.FieldCreatedAt, childphoto.FieldUpdatedAt: values[i] = new(sql.NullTime) case childphoto.FieldID: @@ -88,12 +84,6 @@ func (cp *ChildPhoto) assignValues(columns []string, values []any) error { } else if value != nil { cp.ID = *value } - case childphoto.FieldIsDuplicate: - if value, ok := values[i].(*sql.NullBool); !ok { - return fmt.Errorf("unexpected type %T for field is_duplicate", values[i]) - } else if value.Valid { - cp.IsDuplicate = value.Bool - } case childphoto.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { return fmt.Errorf("unexpected type %T for field created_at", values[i]) @@ -154,9 +144,6 @@ func (cp *ChildPhoto) String() string { var builder strings.Builder builder.WriteString("ChildPhoto(") builder.WriteString(fmt.Sprintf("id=%v, ", cp.ID)) - builder.WriteString("is_duplicate=") - builder.WriteString(fmt.Sprintf("%v", cp.IsDuplicate)) - builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(cp.CreatedAt.Format(time.ANSIC)) builder.WriteString(", ") diff --git a/backend/domain/repository/ent/childphoto/childphoto.go b/backend/domain/repository/ent/childphoto/childphoto.go index 8493f511..e44fcff1 100644 --- a/backend/domain/repository/ent/childphoto/childphoto.go +++ b/backend/domain/repository/ent/childphoto/childphoto.go @@ -15,8 +15,6 @@ const ( Label = "child_photo" // FieldID holds the string denoting the id field in the database. FieldID = "id" - // FieldIsDuplicate holds the string denoting the is_duplicate field in the database. - FieldIsDuplicate = "is_duplicate" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -37,7 +35,6 @@ const ( // Columns holds all SQL columns for childphoto fields. var Columns = []string{ FieldID, - FieldIsDuplicate, FieldCreatedAt, FieldUpdatedAt, } @@ -64,8 +61,6 @@ func ValidColumn(column string) bool { } var ( - // DefaultIsDuplicate holds the default value on creation for the "is_duplicate" field. - DefaultIsDuplicate bool // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. @@ -84,11 +79,6 @@ func ByID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldID, opts...).ToFunc() } -// ByIsDuplicate orders the results by the is_duplicate field. -func ByIsDuplicate(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldIsDuplicate, opts...).ToFunc() -} - // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() diff --git a/backend/domain/repository/ent/childphoto/where.go b/backend/domain/repository/ent/childphoto/where.go index c8e5d408..dec324c4 100644 --- a/backend/domain/repository/ent/childphoto/where.go +++ b/backend/domain/repository/ent/childphoto/where.go @@ -56,11 +56,6 @@ func IDLTE(id uuid.UUID) predicate.ChildPhoto { return predicate.ChildPhoto(sql.FieldLTE(FieldID, id)) } -// IsDuplicate applies equality check predicate on the "is_duplicate" field. It's identical to IsDuplicateEQ. -func IsDuplicate(v bool) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldEQ(FieldIsDuplicate, v)) -} - // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. func CreatedAt(v time.Time) predicate.ChildPhoto { return predicate.ChildPhoto(sql.FieldEQ(FieldCreatedAt, v)) @@ -71,16 +66,6 @@ func UpdatedAt(v time.Time) predicate.ChildPhoto { return predicate.ChildPhoto(sql.FieldEQ(FieldUpdatedAt, v)) } -// IsDuplicateEQ applies the EQ predicate on the "is_duplicate" field. -func IsDuplicateEQ(v bool) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldEQ(FieldIsDuplicate, v)) -} - -// IsDuplicateNEQ applies the NEQ predicate on the "is_duplicate" field. -func IsDuplicateNEQ(v bool) predicate.ChildPhoto { - return predicate.ChildPhoto(sql.FieldNEQ(FieldIsDuplicate, v)) -} - // CreatedAtEQ applies the EQ predicate on the "created_at" field. func CreatedAtEQ(v time.Time) predicate.ChildPhoto { return predicate.ChildPhoto(sql.FieldEQ(FieldCreatedAt, v)) diff --git a/backend/domain/repository/ent/childphoto_create.go b/backend/domain/repository/ent/childphoto_create.go index 5137f811..bba1543a 100644 --- a/backend/domain/repository/ent/childphoto_create.go +++ b/backend/domain/repository/ent/childphoto_create.go @@ -22,20 +22,6 @@ type ChildPhotoCreate struct { hooks []Hook } -// SetIsDuplicate sets the "is_duplicate" field. -func (cpc *ChildPhotoCreate) SetIsDuplicate(b bool) *ChildPhotoCreate { - cpc.mutation.SetIsDuplicate(b) - return cpc -} - -// SetNillableIsDuplicate sets the "is_duplicate" field if the given value is not nil. -func (cpc *ChildPhotoCreate) SetNillableIsDuplicate(b *bool) *ChildPhotoCreate { - if b != nil { - cpc.SetIsDuplicate(*b) - } - return cpc -} - // SetCreatedAt sets the "created_at" field. func (cpc *ChildPhotoCreate) SetCreatedAt(t time.Time) *ChildPhotoCreate { cpc.mutation.SetCreatedAt(t) @@ -132,10 +118,6 @@ func (cpc *ChildPhotoCreate) ExecX(ctx context.Context) { // defaults sets the default values of the builder before save. func (cpc *ChildPhotoCreate) defaults() { - if _, ok := cpc.mutation.IsDuplicate(); !ok { - v := childphoto.DefaultIsDuplicate - cpc.mutation.SetIsDuplicate(v) - } if _, ok := cpc.mutation.CreatedAt(); !ok { v := childphoto.DefaultCreatedAt() cpc.mutation.SetCreatedAt(v) @@ -152,9 +134,6 @@ func (cpc *ChildPhotoCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (cpc *ChildPhotoCreate) check() error { - if _, ok := cpc.mutation.IsDuplicate(); !ok { - return &ValidationError{Name: "is_duplicate", err: errors.New(`ent: missing required field "ChildPhoto.is_duplicate"`)} - } if _, ok := cpc.mutation.CreatedAt(); !ok { return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "ChildPhoto.created_at"`)} } @@ -196,10 +175,6 @@ func (cpc *ChildPhotoCreate) createSpec() (*ChildPhoto, *sqlgraph.CreateSpec) { _node.ID = id _spec.ID.Value = &id } - if value, ok := cpc.mutation.IsDuplicate(); ok { - _spec.SetField(childphoto.FieldIsDuplicate, field.TypeBool, value) - _node.IsDuplicate = value - } if value, ok := cpc.mutation.CreatedAt(); ok { _spec.SetField(childphoto.FieldCreatedAt, field.TypeTime, value) _node.CreatedAt = value diff --git a/backend/domain/repository/ent/childphoto_query.go b/backend/domain/repository/ent/childphoto_query.go index c9a67b69..e118c8d2 100644 --- a/backend/domain/repository/ent/childphoto_query.go +++ b/backend/domain/repository/ent/childphoto_query.go @@ -299,12 +299,12 @@ func (cpq *ChildPhotoQuery) WithChild(opts ...func(*ChildQuery)) *ChildPhotoQuer // Example: // // var v []struct { -// IsDuplicate bool `json:"is_duplicate,omitempty"` +// CreatedAt time.Time `json:"created_at,omitempty"` // Count int `json:"count,omitempty"` // } // // client.ChildPhoto.Query(). -// GroupBy(childphoto.FieldIsDuplicate). +// GroupBy(childphoto.FieldCreatedAt). // Aggregate(ent.Count()). // Scan(ctx, &v) func (cpq *ChildPhotoQuery) GroupBy(field string, fields ...string) *ChildPhotoGroupBy { @@ -322,11 +322,11 @@ func (cpq *ChildPhotoQuery) GroupBy(field string, fields ...string) *ChildPhotoG // Example: // // var v []struct { -// IsDuplicate bool `json:"is_duplicate,omitempty"` +// CreatedAt time.Time `json:"created_at,omitempty"` // } // // client.ChildPhoto.Query(). -// Select(childphoto.FieldIsDuplicate). +// Select(childphoto.FieldCreatedAt). // Scan(ctx, &v) func (cpq *ChildPhotoQuery) Select(fields ...string) *ChildPhotoSelect { cpq.ctx.Fields = append(cpq.ctx.Fields, fields...) diff --git a/backend/domain/repository/ent/childphoto_update.go b/backend/domain/repository/ent/childphoto_update.go index 96351be1..57585e54 100644 --- a/backend/domain/repository/ent/childphoto_update.go +++ b/backend/domain/repository/ent/childphoto_update.go @@ -30,20 +30,6 @@ func (cpu *ChildPhotoUpdate) Where(ps ...predicate.ChildPhoto) *ChildPhotoUpdate return cpu } -// SetIsDuplicate sets the "is_duplicate" field. -func (cpu *ChildPhotoUpdate) SetIsDuplicate(b bool) *ChildPhotoUpdate { - cpu.mutation.SetIsDuplicate(b) - return cpu -} - -// SetNillableIsDuplicate sets the "is_duplicate" field if the given value is not nil. -func (cpu *ChildPhotoUpdate) SetNillableIsDuplicate(b *bool) *ChildPhotoUpdate { - if b != nil { - cpu.SetIsDuplicate(*b) - } - return cpu -} - // SetCreatedAt sets the "created_at" field. func (cpu *ChildPhotoUpdate) SetCreatedAt(t time.Time) *ChildPhotoUpdate { cpu.mutation.SetCreatedAt(t) @@ -139,9 +125,6 @@ func (cpu *ChildPhotoUpdate) sqlSave(ctx context.Context) (n int, err error) { } } } - if value, ok := cpu.mutation.IsDuplicate(); ok { - _spec.SetField(childphoto.FieldIsDuplicate, field.TypeBool, value) - } if value, ok := cpu.mutation.CreatedAt(); ok { _spec.SetField(childphoto.FieldCreatedAt, field.TypeTime, value) } @@ -197,20 +180,6 @@ type ChildPhotoUpdateOne struct { mutation *ChildPhotoMutation } -// SetIsDuplicate sets the "is_duplicate" field. -func (cpuo *ChildPhotoUpdateOne) SetIsDuplicate(b bool) *ChildPhotoUpdateOne { - cpuo.mutation.SetIsDuplicate(b) - return cpuo -} - -// SetNillableIsDuplicate sets the "is_duplicate" field if the given value is not nil. -func (cpuo *ChildPhotoUpdateOne) SetNillableIsDuplicate(b *bool) *ChildPhotoUpdateOne { - if b != nil { - cpuo.SetIsDuplicate(*b) - } - return cpuo -} - // SetCreatedAt sets the "created_at" field. func (cpuo *ChildPhotoUpdateOne) SetCreatedAt(t time.Time) *ChildPhotoUpdateOne { cpuo.mutation.SetCreatedAt(t) @@ -336,9 +305,6 @@ func (cpuo *ChildPhotoUpdateOne) sqlSave(ctx context.Context) (_node *ChildPhoto } } } - if value, ok := cpuo.mutation.IsDuplicate(); ok { - _spec.SetField(childphoto.FieldIsDuplicate, field.TypeBool, value) - } if value, ok := cpuo.mutation.CreatedAt(); ok { _spec.SetField(childphoto.FieldCreatedAt, field.TypeTime, value) } diff --git a/backend/domain/repository/ent/client.go b/backend/domain/repository/ent/client.go index 9d922f24..7ce2d91d 100644 --- a/backend/domain/repository/ent/client.go +++ b/backend/domain/repository/ent/client.go @@ -1655,6 +1655,70 @@ func (c *StationClient) QueryBus(s *Station) *BusQuery { return query } +// QueryMorningPreviousStation queries the morning_previous_station edge of a Station. +func (c *StationClient) QueryMorningPreviousStation(s *Station) *StationQuery { + query := (&StationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := s.ID + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, id), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, station.MorningPreviousStationTable, station.MorningPreviousStationColumn), + ) + fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryMorningNextStation queries the morning_next_station edge of a Station. +func (c *StationClient) QueryMorningNextStation(s *Station) *StationQuery { + query := (&StationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := s.ID + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, id), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, station.MorningNextStationTable, station.MorningNextStationColumn), + ) + fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryEveningPreviousStation queries the evening_previous_station edge of a Station. +func (c *StationClient) QueryEveningPreviousStation(s *Station) *StationQuery { + query := (&StationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := s.ID + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, id), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, station.EveningPreviousStationTable, station.EveningPreviousStationColumn), + ) + fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryEveningNextStation queries the evening_next_station edge of a Station. +func (c *StationClient) QueryEveningNextStation(s *Station) *StationQuery { + query := (&StationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := s.ID + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, id), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, station.EveningNextStationTable, station.EveningNextStationColumn), + ) + fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) + return fromV, nil + } + return query +} + // Hooks returns the client hooks. func (c *StationClient) Hooks() []Hook { return c.hooks.Station diff --git a/backend/domain/repository/ent/guardian.go b/backend/domain/repository/ent/guardian.go index 660017b8..13a341d4 100644 --- a/backend/domain/repository/ent/guardian.go +++ b/backend/domain/repository/ent/guardian.go @@ -28,6 +28,10 @@ type Guardian struct { Name string `json:"name,omitempty"` // PhoneNumber holds the value of the "phone_number" field. PhoneNumber string `json:"phone_number,omitempty"` + // バスを利用するかどうか + IsUseMorningBus bool `json:"is_use_morning_bus,omitempty"` + // バスを利用するかどうか + IsUseEveningBus bool `json:"is_use_evening_bus,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. @@ -92,6 +96,8 @@ func (*Guardian) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { + case guardian.FieldIsUseMorningBus, guardian.FieldIsUseEveningBus: + values[i] = new(sql.NullBool) case guardian.FieldEmail, guardian.FieldHashedPassword, guardian.FieldName, guardian.FieldPhoneNumber: values[i] = new(sql.NullString) case guardian.FieldCreatedAt, guardian.FieldUpdatedAt: @@ -145,6 +151,18 @@ func (gu *Guardian) assignValues(columns []string, values []any) error { } else if value.Valid { gu.PhoneNumber = value.String } + case guardian.FieldIsUseMorningBus: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field is_use_morning_bus", values[i]) + } else if value.Valid { + gu.IsUseMorningBus = value.Bool + } + case guardian.FieldIsUseEveningBus: + if value, ok := values[i].(*sql.NullBool); !ok { + return fmt.Errorf("unexpected type %T for field is_use_evening_bus", values[i]) + } else if value.Valid { + gu.IsUseEveningBus = value.Bool + } case guardian.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { return fmt.Errorf("unexpected type %T for field created_at", values[i]) @@ -227,6 +245,12 @@ func (gu *Guardian) String() string { builder.WriteString("phone_number=") builder.WriteString(gu.PhoneNumber) builder.WriteString(", ") + builder.WriteString("is_use_morning_bus=") + builder.WriteString(fmt.Sprintf("%v", gu.IsUseMorningBus)) + builder.WriteString(", ") + builder.WriteString("is_use_evening_bus=") + builder.WriteString(fmt.Sprintf("%v", gu.IsUseEveningBus)) + builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(gu.CreatedAt.Format(time.ANSIC)) builder.WriteString(", ") diff --git a/backend/domain/repository/ent/guardian/guardian.go b/backend/domain/repository/ent/guardian/guardian.go index 1277416c..1e94f531 100644 --- a/backend/domain/repository/ent/guardian/guardian.go +++ b/backend/domain/repository/ent/guardian/guardian.go @@ -23,6 +23,10 @@ const ( FieldName = "name" // FieldPhoneNumber holds the string denoting the phone_number field in the database. FieldPhoneNumber = "phone_number" + // FieldIsUseMorningBus holds the string denoting the is_use_morning_bus field in the database. + FieldIsUseMorningBus = "is_use_morning_bus" + // FieldIsUseEveningBus holds the string denoting the is_use_evening_bus field in the database. + FieldIsUseEveningBus = "is_use_evening_bus" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -65,6 +69,8 @@ var Columns = []string{ FieldHashedPassword, FieldName, FieldPhoneNumber, + FieldIsUseMorningBus, + FieldIsUseEveningBus, FieldCreatedAt, FieldUpdatedAt, } @@ -91,6 +97,10 @@ func ValidColumn(column string) bool { } var ( + // DefaultIsUseMorningBus holds the default value on creation for the "is_use_morning_bus" field. + DefaultIsUseMorningBus bool + // DefaultIsUseEveningBus holds the default value on creation for the "is_use_evening_bus" field. + DefaultIsUseEveningBus bool // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. @@ -129,6 +139,16 @@ func ByPhoneNumber(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPhoneNumber, opts...).ToFunc() } +// ByIsUseMorningBus orders the results by the is_use_morning_bus field. +func ByIsUseMorningBus(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldIsUseMorningBus, opts...).ToFunc() +} + +// ByIsUseEveningBus orders the results by the is_use_evening_bus field. +func ByIsUseEveningBus(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldIsUseEveningBus, opts...).ToFunc() +} + // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() diff --git a/backend/domain/repository/ent/guardian/where.go b/backend/domain/repository/ent/guardian/where.go index f98cb444..0661a617 100644 --- a/backend/domain/repository/ent/guardian/where.go +++ b/backend/domain/repository/ent/guardian/where.go @@ -76,6 +76,16 @@ func PhoneNumber(v string) predicate.Guardian { return predicate.Guardian(sql.FieldEQ(FieldPhoneNumber, v)) } +// IsUseMorningBus applies equality check predicate on the "is_use_morning_bus" field. It's identical to IsUseMorningBusEQ. +func IsUseMorningBus(v bool) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldIsUseMorningBus, v)) +} + +// IsUseEveningBus applies equality check predicate on the "is_use_evening_bus" field. It's identical to IsUseEveningBusEQ. +func IsUseEveningBus(v bool) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldIsUseEveningBus, v)) +} + // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. func CreatedAt(v time.Time) predicate.Guardian { return predicate.Guardian(sql.FieldEQ(FieldCreatedAt, v)) @@ -356,6 +366,26 @@ func PhoneNumberContainsFold(v string) predicate.Guardian { return predicate.Guardian(sql.FieldContainsFold(FieldPhoneNumber, v)) } +// IsUseMorningBusEQ applies the EQ predicate on the "is_use_morning_bus" field. +func IsUseMorningBusEQ(v bool) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldIsUseMorningBus, v)) +} + +// IsUseMorningBusNEQ applies the NEQ predicate on the "is_use_morning_bus" field. +func IsUseMorningBusNEQ(v bool) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldIsUseMorningBus, v)) +} + +// IsUseEveningBusEQ applies the EQ predicate on the "is_use_evening_bus" field. +func IsUseEveningBusEQ(v bool) predicate.Guardian { + return predicate.Guardian(sql.FieldEQ(FieldIsUseEveningBus, v)) +} + +// IsUseEveningBusNEQ applies the NEQ predicate on the "is_use_evening_bus" field. +func IsUseEveningBusNEQ(v bool) predicate.Guardian { + return predicate.Guardian(sql.FieldNEQ(FieldIsUseEveningBus, v)) +} + // CreatedAtEQ applies the EQ predicate on the "created_at" field. func CreatedAtEQ(v time.Time) predicate.Guardian { return predicate.Guardian(sql.FieldEQ(FieldCreatedAt, v)) diff --git a/backend/domain/repository/ent/guardian_create.go b/backend/domain/repository/ent/guardian_create.go index 6bc5f927..377ca850 100644 --- a/backend/domain/repository/ent/guardian_create.go +++ b/backend/domain/repository/ent/guardian_create.go @@ -56,6 +56,34 @@ func (gc *GuardianCreate) SetNillablePhoneNumber(s *string) *GuardianCreate { return gc } +// SetIsUseMorningBus sets the "is_use_morning_bus" field. +func (gc *GuardianCreate) SetIsUseMorningBus(b bool) *GuardianCreate { + gc.mutation.SetIsUseMorningBus(b) + return gc +} + +// SetNillableIsUseMorningBus sets the "is_use_morning_bus" field if the given value is not nil. +func (gc *GuardianCreate) SetNillableIsUseMorningBus(b *bool) *GuardianCreate { + if b != nil { + gc.SetIsUseMorningBus(*b) + } + return gc +} + +// SetIsUseEveningBus sets the "is_use_evening_bus" field. +func (gc *GuardianCreate) SetIsUseEveningBus(b bool) *GuardianCreate { + gc.mutation.SetIsUseEveningBus(b) + return gc +} + +// SetNillableIsUseEveningBus sets the "is_use_evening_bus" field if the given value is not nil. +func (gc *GuardianCreate) SetNillableIsUseEveningBus(b *bool) *GuardianCreate { + if b != nil { + gc.SetIsUseEveningBus(*b) + } + return gc +} + // SetCreatedAt sets the "created_at" field. func (gc *GuardianCreate) SetCreatedAt(t time.Time) *GuardianCreate { gc.mutation.SetCreatedAt(t) @@ -186,6 +214,14 @@ func (gc *GuardianCreate) ExecX(ctx context.Context) { // defaults sets the default values of the builder before save. func (gc *GuardianCreate) defaults() { + if _, ok := gc.mutation.IsUseMorningBus(); !ok { + v := guardian.DefaultIsUseMorningBus + gc.mutation.SetIsUseMorningBus(v) + } + if _, ok := gc.mutation.IsUseEveningBus(); !ok { + v := guardian.DefaultIsUseEveningBus + gc.mutation.SetIsUseEveningBus(v) + } if _, ok := gc.mutation.CreatedAt(); !ok { v := guardian.DefaultCreatedAt() gc.mutation.SetCreatedAt(v) @@ -211,6 +247,12 @@ func (gc *GuardianCreate) check() error { if _, ok := gc.mutation.Name(); !ok { return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Guardian.name"`)} } + if _, ok := gc.mutation.IsUseMorningBus(); !ok { + return &ValidationError{Name: "is_use_morning_bus", err: errors.New(`ent: missing required field "Guardian.is_use_morning_bus"`)} + } + if _, ok := gc.mutation.IsUseEveningBus(); !ok { + return &ValidationError{Name: "is_use_evening_bus", err: errors.New(`ent: missing required field "Guardian.is_use_evening_bus"`)} + } if _, ok := gc.mutation.CreatedAt(); !ok { return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Guardian.created_at"`)} } @@ -268,6 +310,14 @@ func (gc *GuardianCreate) createSpec() (*Guardian, *sqlgraph.CreateSpec) { _spec.SetField(guardian.FieldPhoneNumber, field.TypeString, value) _node.PhoneNumber = value } + if value, ok := gc.mutation.IsUseMorningBus(); ok { + _spec.SetField(guardian.FieldIsUseMorningBus, field.TypeBool, value) + _node.IsUseMorningBus = value + } + if value, ok := gc.mutation.IsUseEveningBus(); ok { + _spec.SetField(guardian.FieldIsUseEveningBus, field.TypeBool, value) + _node.IsUseEveningBus = value + } if value, ok := gc.mutation.CreatedAt(); ok { _spec.SetField(guardian.FieldCreatedAt, field.TypeTime, value) _node.CreatedAt = value diff --git a/backend/domain/repository/ent/guardian_update.go b/backend/domain/repository/ent/guardian_update.go index fb4c5b21..2db1ee88 100644 --- a/backend/domain/repository/ent/guardian_update.go +++ b/backend/domain/repository/ent/guardian_update.go @@ -94,6 +94,34 @@ func (gu *GuardianUpdate) ClearPhoneNumber() *GuardianUpdate { return gu } +// SetIsUseMorningBus sets the "is_use_morning_bus" field. +func (gu *GuardianUpdate) SetIsUseMorningBus(b bool) *GuardianUpdate { + gu.mutation.SetIsUseMorningBus(b) + return gu +} + +// SetNillableIsUseMorningBus sets the "is_use_morning_bus" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillableIsUseMorningBus(b *bool) *GuardianUpdate { + if b != nil { + gu.SetIsUseMorningBus(*b) + } + return gu +} + +// SetIsUseEveningBus sets the "is_use_evening_bus" field. +func (gu *GuardianUpdate) SetIsUseEveningBus(b bool) *GuardianUpdate { + gu.mutation.SetIsUseEveningBus(b) + return gu +} + +// SetNillableIsUseEveningBus sets the "is_use_evening_bus" field if the given value is not nil. +func (gu *GuardianUpdate) SetNillableIsUseEveningBus(b *bool) *GuardianUpdate { + if b != nil { + gu.SetIsUseEveningBus(*b) + } + return gu +} + // SetCreatedAt sets the "created_at" field. func (gu *GuardianUpdate) SetCreatedAt(t time.Time) *GuardianUpdate { gu.mutation.SetCreatedAt(t) @@ -265,6 +293,12 @@ func (gu *GuardianUpdate) sqlSave(ctx context.Context) (n int, err error) { if gu.mutation.PhoneNumberCleared() { _spec.ClearField(guardian.FieldPhoneNumber, field.TypeString) } + if value, ok := gu.mutation.IsUseMorningBus(); ok { + _spec.SetField(guardian.FieldIsUseMorningBus, field.TypeBool, value) + } + if value, ok := gu.mutation.IsUseEveningBus(); ok { + _spec.SetField(guardian.FieldIsUseEveningBus, field.TypeBool, value) + } if value, ok := gu.mutation.CreatedAt(); ok { _spec.SetField(guardian.FieldCreatedAt, field.TypeTime, value) } @@ -456,6 +490,34 @@ func (guo *GuardianUpdateOne) ClearPhoneNumber() *GuardianUpdateOne { return guo } +// SetIsUseMorningBus sets the "is_use_morning_bus" field. +func (guo *GuardianUpdateOne) SetIsUseMorningBus(b bool) *GuardianUpdateOne { + guo.mutation.SetIsUseMorningBus(b) + return guo +} + +// SetNillableIsUseMorningBus sets the "is_use_morning_bus" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableIsUseMorningBus(b *bool) *GuardianUpdateOne { + if b != nil { + guo.SetIsUseMorningBus(*b) + } + return guo +} + +// SetIsUseEveningBus sets the "is_use_evening_bus" field. +func (guo *GuardianUpdateOne) SetIsUseEveningBus(b bool) *GuardianUpdateOne { + guo.mutation.SetIsUseEveningBus(b) + return guo +} + +// SetNillableIsUseEveningBus sets the "is_use_evening_bus" field if the given value is not nil. +func (guo *GuardianUpdateOne) SetNillableIsUseEveningBus(b *bool) *GuardianUpdateOne { + if b != nil { + guo.SetIsUseEveningBus(*b) + } + return guo +} + // SetCreatedAt sets the "created_at" field. func (guo *GuardianUpdateOne) SetCreatedAt(t time.Time) *GuardianUpdateOne { guo.mutation.SetCreatedAt(t) @@ -657,6 +719,12 @@ func (guo *GuardianUpdateOne) sqlSave(ctx context.Context) (_node *Guardian, err if guo.mutation.PhoneNumberCleared() { _spec.ClearField(guardian.FieldPhoneNumber, field.TypeString) } + if value, ok := guo.mutation.IsUseMorningBus(); ok { + _spec.SetField(guardian.FieldIsUseMorningBus, field.TypeBool, value) + } + if value, ok := guo.mutation.IsUseEveningBus(); ok { + _spec.SetField(guardian.FieldIsUseEveningBus, field.TypeBool, value) + } if value, ok := guo.mutation.CreatedAt(); ok { _spec.SetField(guardian.FieldCreatedAt, field.TypeTime, value) } diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 5f2bb489..7529e26c 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -69,8 +69,6 @@ var ( {Name: "name", Type: field.TypeString}, {Name: "age", Type: field.TypeInt}, {Name: "sex", Type: field.TypeEnum, Enums: []string{"man", "woman", "other"}}, - {Name: "is_ride_morning_bus", Type: field.TypeBool, Default: false}, - {Name: "is_ride_evening_bus", Type: field.TypeBool, Default: false}, {Name: "check_for_missing_items", Type: field.TypeBool, Default: false}, {Name: "has_bag", Type: field.TypeBool, Default: true}, {Name: "has_lunch_box", Type: field.TypeBool, Default: true}, @@ -90,13 +88,13 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "childs_nurseries_nursery", - Columns: []*schema.Column{ChildsColumns[14]}, + Columns: []*schema.Column{ChildsColumns[12]}, RefColumns: []*schema.Column{NurseriesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "childs_guardians_children", - Columns: []*schema.Column{ChildsColumns[15]}, + Columns: []*schema.Column{ChildsColumns[13]}, RefColumns: []*schema.Column{GuardiansColumns[0]}, OnDelete: schema.SetNull, }, @@ -132,7 +130,6 @@ var ( // ChildPhotosColumns holds the columns for the "child_photos" table. ChildPhotosColumns = []*schema.Column{ {Name: "id", Type: field.TypeUUID, Unique: true}, - {Name: "is_duplicate", Type: field.TypeBool, Default: false}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "child_photos", Type: field.TypeUUID, Nullable: true}, @@ -145,7 +142,7 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "child_photos_childs_photos", - Columns: []*schema.Column{ChildPhotosColumns[4]}, + Columns: []*schema.Column{ChildPhotosColumns[3]}, RefColumns: []*schema.Column{ChildsColumns[0]}, OnDelete: schema.SetNull, }, @@ -158,6 +155,8 @@ var ( {Name: "hashed_password", Type: field.TypeString}, {Name: "name", Type: field.TypeString}, {Name: "phone_number", Type: field.TypeString, Nullable: true}, + {Name: "is_use_morning_bus", Type: field.TypeBool, Default: true}, + {Name: "is_use_evening_bus", Type: field.TypeBool, Default: true}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "guardian_nursery", Type: field.TypeUUID, Nullable: true}, @@ -170,7 +169,7 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "guardians_nurseries_nursery", - Columns: []*schema.Column{GuardiansColumns[7]}, + Columns: []*schema.Column{GuardiansColumns[9]}, RefColumns: []*schema.Column{NurseriesColumns[0]}, OnDelete: schema.SetNull, }, @@ -199,11 +198,11 @@ var ( {Name: "id", Type: field.TypeUUID, Unique: true}, {Name: "latitude", Type: field.TypeFloat64, Nullable: true}, {Name: "longitude", Type: field.TypeFloat64, Nullable: true}, - {Name: "morning_order", Type: field.TypeInt}, - {Name: "evening_order", Type: field.TypeInt}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "guardian_station", Type: field.TypeUUID, Unique: true, Nullable: true}, + {Name: "station_morning_next_station", Type: field.TypeUUID, Nullable: true}, + {Name: "station_evening_next_station", Type: field.TypeUUID, Nullable: true}, } // StationsTable holds the schema information for the "stations" table. StationsTable = &schema.Table{ @@ -213,10 +212,22 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "stations_guardians_station", - Columns: []*schema.Column{StationsColumns[7]}, + Columns: []*schema.Column{StationsColumns[5]}, RefColumns: []*schema.Column{GuardiansColumns[0]}, OnDelete: schema.SetNull, }, + { + Symbol: "stations_stations_morning_next_station", + Columns: []*schema.Column{StationsColumns[6]}, + RefColumns: []*schema.Column{StationsColumns[0]}, + OnDelete: schema.SetNull, + }, + { + Symbol: "stations_stations_evening_next_station", + Columns: []*schema.Column{StationsColumns[7]}, + RefColumns: []*schema.Column{StationsColumns[0]}, + OnDelete: schema.SetNull, + }, }, } // BusStationsColumns holds the columns for the "bus_stations" table. @@ -269,6 +280,8 @@ func init() { ChildPhotosTable.ForeignKeys[0].RefTable = ChildsTable GuardiansTable.ForeignKeys[0].RefTable = NurseriesTable StationsTable.ForeignKeys[0].RefTable = GuardiansTable + StationsTable.ForeignKeys[1].RefTable = StationsTable + StationsTable.ForeignKeys[2].RefTable = StationsTable BusStationsTable.ForeignKeys[0].RefTable = BusTable BusStationsTable.ForeignKeys[1].RefTable = StationsTable } diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index 7f3ceecc..ee935c6d 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -1723,8 +1723,6 @@ type ChildMutation struct { age *int addage *int sex *child.Sex - is_ride_morning_bus *bool - is_ride_evening_bus *bool check_for_missing_items *bool has_bag *bool has_lunch_box *bool @@ -1984,78 +1982,6 @@ func (m *ChildMutation) ResetSex() { m.sex = nil } -// SetIsRideMorningBus sets the "is_ride_morning_bus" field. -func (m *ChildMutation) SetIsRideMorningBus(b bool) { - m.is_ride_morning_bus = &b -} - -// IsRideMorningBus returns the value of the "is_ride_morning_bus" field in the mutation. -func (m *ChildMutation) IsRideMorningBus() (r bool, exists bool) { - v := m.is_ride_morning_bus - if v == nil { - return - } - return *v, true -} - -// OldIsRideMorningBus returns the old "is_ride_morning_bus" field's value of the Child entity. -// If the Child object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *ChildMutation) OldIsRideMorningBus(ctx context.Context) (v bool, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldIsRideMorningBus is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldIsRideMorningBus requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldIsRideMorningBus: %w", err) - } - return oldValue.IsRideMorningBus, nil -} - -// ResetIsRideMorningBus resets all changes to the "is_ride_morning_bus" field. -func (m *ChildMutation) ResetIsRideMorningBus() { - m.is_ride_morning_bus = nil -} - -// SetIsRideEveningBus sets the "is_ride_evening_bus" field. -func (m *ChildMutation) SetIsRideEveningBus(b bool) { - m.is_ride_evening_bus = &b -} - -// IsRideEveningBus returns the value of the "is_ride_evening_bus" field in the mutation. -func (m *ChildMutation) IsRideEveningBus() (r bool, exists bool) { - v := m.is_ride_evening_bus - if v == nil { - return - } - return *v, true -} - -// OldIsRideEveningBus returns the old "is_ride_evening_bus" field's value of the Child entity. -// If the Child object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *ChildMutation) OldIsRideEveningBus(ctx context.Context) (v bool, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldIsRideEveningBus is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldIsRideEveningBus requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldIsRideEveningBus: %w", err) - } - return oldValue.IsRideEveningBus, nil -} - -// ResetIsRideEveningBus resets all changes to the "is_ride_evening_bus" field. -func (m *ChildMutation) ResetIsRideEveningBus() { - m.is_ride_evening_bus = nil -} - // SetCheckForMissingItems sets the "check_for_missing_items" field. func (m *ChildMutation) SetCheckForMissingItems(b bool) { m.check_for_missing_items = &b @@ -2618,7 +2544,7 @@ func (m *ChildMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *ChildMutation) Fields() []string { - fields := make([]string, 0, 13) + fields := make([]string, 0, 11) if m.name != nil { fields = append(fields, child.FieldName) } @@ -2628,12 +2554,6 @@ func (m *ChildMutation) Fields() []string { if m.sex != nil { fields = append(fields, child.FieldSex) } - if m.is_ride_morning_bus != nil { - fields = append(fields, child.FieldIsRideMorningBus) - } - if m.is_ride_evening_bus != nil { - fields = append(fields, child.FieldIsRideEveningBus) - } if m.check_for_missing_items != nil { fields = append(fields, child.FieldCheckForMissingItems) } @@ -2672,10 +2592,6 @@ func (m *ChildMutation) Field(name string) (ent.Value, bool) { return m.Age() case child.FieldSex: return m.Sex() - case child.FieldIsRideMorningBus: - return m.IsRideMorningBus() - case child.FieldIsRideEveningBus: - return m.IsRideEveningBus() case child.FieldCheckForMissingItems: return m.CheckForMissingItems() case child.FieldHasBag: @@ -2707,10 +2623,6 @@ func (m *ChildMutation) OldField(ctx context.Context, name string) (ent.Value, e return m.OldAge(ctx) case child.FieldSex: return m.OldSex(ctx) - case child.FieldIsRideMorningBus: - return m.OldIsRideMorningBus(ctx) - case child.FieldIsRideEveningBus: - return m.OldIsRideEveningBus(ctx) case child.FieldCheckForMissingItems: return m.OldCheckForMissingItems(ctx) case child.FieldHasBag: @@ -2757,20 +2669,6 @@ func (m *ChildMutation) SetField(name string, value ent.Value) error { } m.SetSex(v) return nil - case child.FieldIsRideMorningBus: - v, ok := value.(bool) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetIsRideMorningBus(v) - return nil - case child.FieldIsRideEveningBus: - v, ok := value.(bool) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetIsRideEveningBus(v) - return nil case child.FieldCheckForMissingItems: v, ok := value.(bool) if !ok { @@ -2900,12 +2798,6 @@ func (m *ChildMutation) ResetField(name string) error { case child.FieldSex: m.ResetSex() return nil - case child.FieldIsRideMorningBus: - m.ResetIsRideMorningBus() - return nil - case child.FieldIsRideEveningBus: - m.ResetIsRideEveningBus() - return nil case child.FieldCheckForMissingItems: m.ResetCheckForMissingItems() return nil @@ -3646,7 +3538,6 @@ type ChildPhotoMutation struct { op Op typ string id *uuid.UUID - is_duplicate *bool created_at *time.Time updated_at *time.Time clearedFields map[string]struct{} @@ -3761,42 +3652,6 @@ func (m *ChildPhotoMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { } } -// SetIsDuplicate sets the "is_duplicate" field. -func (m *ChildPhotoMutation) SetIsDuplicate(b bool) { - m.is_duplicate = &b -} - -// IsDuplicate returns the value of the "is_duplicate" field in the mutation. -func (m *ChildPhotoMutation) IsDuplicate() (r bool, exists bool) { - v := m.is_duplicate - if v == nil { - return - } - return *v, true -} - -// OldIsDuplicate returns the old "is_duplicate" field's value of the ChildPhoto entity. -// If the ChildPhoto object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *ChildPhotoMutation) OldIsDuplicate(ctx context.Context) (v bool, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldIsDuplicate is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldIsDuplicate requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldIsDuplicate: %w", err) - } - return oldValue.IsDuplicate, nil -} - -// ResetIsDuplicate resets all changes to the "is_duplicate" field. -func (m *ChildPhotoMutation) ResetIsDuplicate() { - m.is_duplicate = nil -} - // SetCreatedAt sets the "created_at" field. func (m *ChildPhotoMutation) SetCreatedAt(t time.Time) { m.created_at = &t @@ -3942,10 +3797,7 @@ func (m *ChildPhotoMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *ChildPhotoMutation) Fields() []string { - fields := make([]string, 0, 3) - if m.is_duplicate != nil { - fields = append(fields, childphoto.FieldIsDuplicate) - } + fields := make([]string, 0, 2) if m.created_at != nil { fields = append(fields, childphoto.FieldCreatedAt) } @@ -3960,8 +3812,6 @@ func (m *ChildPhotoMutation) Fields() []string { // schema. func (m *ChildPhotoMutation) Field(name string) (ent.Value, bool) { switch name { - case childphoto.FieldIsDuplicate: - return m.IsDuplicate() case childphoto.FieldCreatedAt: return m.CreatedAt() case childphoto.FieldUpdatedAt: @@ -3975,8 +3825,6 @@ func (m *ChildPhotoMutation) Field(name string) (ent.Value, bool) { // database failed. func (m *ChildPhotoMutation) OldField(ctx context.Context, name string) (ent.Value, error) { switch name { - case childphoto.FieldIsDuplicate: - return m.OldIsDuplicate(ctx) case childphoto.FieldCreatedAt: return m.OldCreatedAt(ctx) case childphoto.FieldUpdatedAt: @@ -3990,13 +3838,6 @@ func (m *ChildPhotoMutation) OldField(ctx context.Context, name string) (ent.Val // type. func (m *ChildPhotoMutation) SetField(name string, value ent.Value) error { switch name { - case childphoto.FieldIsDuplicate: - v, ok := value.(bool) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetIsDuplicate(v) - return nil case childphoto.FieldCreatedAt: v, ok := value.(time.Time) if !ok { @@ -4060,9 +3901,6 @@ func (m *ChildPhotoMutation) ClearField(name string) error { // It returns an error if the field is not defined in the schema. func (m *ChildPhotoMutation) ResetField(name string) error { switch name { - case childphoto.FieldIsDuplicate: - m.ResetIsDuplicate() - return nil case childphoto.FieldCreatedAt: m.ResetCreatedAt() return nil @@ -4150,26 +3988,28 @@ func (m *ChildPhotoMutation) ResetEdge(name string) error { // GuardianMutation represents an operation that mutates the Guardian nodes in the graph. type GuardianMutation struct { config - op Op - typ string - id *uuid.UUID - email *string - hashed_password *string - name *string - phone_number *string - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - children map[uuid.UUID]struct{} - removedchildren map[uuid.UUID]struct{} - clearedchildren bool - nursery *uuid.UUID - clearednursery bool - station *uuid.UUID - clearedstation bool - done bool - oldValue func(context.Context) (*Guardian, error) - predicates []predicate.Guardian + op Op + typ string + id *uuid.UUID + email *string + hashed_password *string + name *string + phone_number *string + is_use_morning_bus *bool + is_use_evening_bus *bool + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + children map[uuid.UUID]struct{} + removedchildren map[uuid.UUID]struct{} + clearedchildren bool + nursery *uuid.UUID + clearednursery bool + station *uuid.UUID + clearedstation bool + done bool + oldValue func(context.Context) (*Guardian, error) + predicates []predicate.Guardian } var _ ent.Mutation = (*GuardianMutation)(nil) @@ -4433,6 +4273,78 @@ func (m *GuardianMutation) ResetPhoneNumber() { delete(m.clearedFields, guardian.FieldPhoneNumber) } +// SetIsUseMorningBus sets the "is_use_morning_bus" field. +func (m *GuardianMutation) SetIsUseMorningBus(b bool) { + m.is_use_morning_bus = &b +} + +// IsUseMorningBus returns the value of the "is_use_morning_bus" field in the mutation. +func (m *GuardianMutation) IsUseMorningBus() (r bool, exists bool) { + v := m.is_use_morning_bus + if v == nil { + return + } + return *v, true +} + +// OldIsUseMorningBus returns the old "is_use_morning_bus" field's value of the Guardian entity. +// If the Guardian object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *GuardianMutation) OldIsUseMorningBus(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldIsUseMorningBus is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldIsUseMorningBus requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldIsUseMorningBus: %w", err) + } + return oldValue.IsUseMorningBus, nil +} + +// ResetIsUseMorningBus resets all changes to the "is_use_morning_bus" field. +func (m *GuardianMutation) ResetIsUseMorningBus() { + m.is_use_morning_bus = nil +} + +// SetIsUseEveningBus sets the "is_use_evening_bus" field. +func (m *GuardianMutation) SetIsUseEveningBus(b bool) { + m.is_use_evening_bus = &b +} + +// IsUseEveningBus returns the value of the "is_use_evening_bus" field in the mutation. +func (m *GuardianMutation) IsUseEveningBus() (r bool, exists bool) { + v := m.is_use_evening_bus + if v == nil { + return + } + return *v, true +} + +// OldIsUseEveningBus returns the old "is_use_evening_bus" field's value of the Guardian entity. +// If the Guardian object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *GuardianMutation) OldIsUseEveningBus(ctx context.Context) (v bool, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldIsUseEveningBus is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldIsUseEveningBus requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldIsUseEveningBus: %w", err) + } + return oldValue.IsUseEveningBus, nil +} + +// ResetIsUseEveningBus resets all changes to the "is_use_evening_bus" field. +func (m *GuardianMutation) ResetIsUseEveningBus() { + m.is_use_evening_bus = nil +} + // SetCreatedAt sets the "created_at" field. func (m *GuardianMutation) SetCreatedAt(t time.Time) { m.created_at = &t @@ -4671,7 +4583,7 @@ func (m *GuardianMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *GuardianMutation) Fields() []string { - fields := make([]string, 0, 6) + fields := make([]string, 0, 8) if m.email != nil { fields = append(fields, guardian.FieldEmail) } @@ -4684,6 +4596,12 @@ func (m *GuardianMutation) Fields() []string { if m.phone_number != nil { fields = append(fields, guardian.FieldPhoneNumber) } + if m.is_use_morning_bus != nil { + fields = append(fields, guardian.FieldIsUseMorningBus) + } + if m.is_use_evening_bus != nil { + fields = append(fields, guardian.FieldIsUseEveningBus) + } if m.created_at != nil { fields = append(fields, guardian.FieldCreatedAt) } @@ -4706,6 +4624,10 @@ func (m *GuardianMutation) Field(name string) (ent.Value, bool) { return m.Name() case guardian.FieldPhoneNumber: return m.PhoneNumber() + case guardian.FieldIsUseMorningBus: + return m.IsUseMorningBus() + case guardian.FieldIsUseEveningBus: + return m.IsUseEveningBus() case guardian.FieldCreatedAt: return m.CreatedAt() case guardian.FieldUpdatedAt: @@ -4727,6 +4649,10 @@ func (m *GuardianMutation) OldField(ctx context.Context, name string) (ent.Value return m.OldName(ctx) case guardian.FieldPhoneNumber: return m.OldPhoneNumber(ctx) + case guardian.FieldIsUseMorningBus: + return m.OldIsUseMorningBus(ctx) + case guardian.FieldIsUseEveningBus: + return m.OldIsUseEveningBus(ctx) case guardian.FieldCreatedAt: return m.OldCreatedAt(ctx) case guardian.FieldUpdatedAt: @@ -4768,6 +4694,20 @@ func (m *GuardianMutation) SetField(name string, value ent.Value) error { } m.SetPhoneNumber(v) return nil + case guardian.FieldIsUseMorningBus: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetIsUseMorningBus(v) + return nil + case guardian.FieldIsUseEveningBus: + v, ok := value.(bool) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetIsUseEveningBus(v) + return nil case guardian.FieldCreatedAt: v, ok := value.(time.Time) if !ok { @@ -4852,6 +4792,12 @@ func (m *GuardianMutation) ResetField(name string) error { case guardian.FieldPhoneNumber: m.ResetPhoneNumber() return nil + case guardian.FieldIsUseMorningBus: + m.ResetIsUseMorningBus() + return nil + case guardian.FieldIsUseEveningBus: + m.ResetIsUseEveningBus() + return nil case guardian.FieldCreatedAt: m.ResetCreatedAt() return nil @@ -5995,28 +5941,34 @@ func (m *NurseryMutation) ResetEdge(name string) error { // StationMutation represents an operation that mutates the Station nodes in the graph. type StationMutation struct { config - op Op - typ string - id *uuid.UUID - latitude *float64 - addlatitude *float64 - longitude *float64 - addlongitude *float64 - morning_order *int - addmorning_order *int - evening_order *int - addevening_order *int - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - guardian *uuid.UUID - clearedguardian bool - bus map[uuid.UUID]struct{} - removedbus map[uuid.UUID]struct{} - clearedbus bool - done bool - oldValue func(context.Context) (*Station, error) - predicates []predicate.Station + op Op + typ string + id *uuid.UUID + latitude *float64 + addlatitude *float64 + longitude *float64 + addlongitude *float64 + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + guardian *uuid.UUID + clearedguardian bool + bus map[uuid.UUID]struct{} + removedbus map[uuid.UUID]struct{} + clearedbus bool + morning_previous_station *uuid.UUID + clearedmorning_previous_station bool + morning_next_station map[uuid.UUID]struct{} + removedmorning_next_station map[uuid.UUID]struct{} + clearedmorning_next_station bool + evening_previous_station *uuid.UUID + clearedevening_previous_station bool + evening_next_station map[uuid.UUID]struct{} + removedevening_next_station map[uuid.UUID]struct{} + clearedevening_next_station bool + done bool + oldValue func(context.Context) (*Station, error) + predicates []predicate.Station } var _ ent.Mutation = (*StationMutation)(nil) @@ -6263,118 +6215,6 @@ func (m *StationMutation) ResetLongitude() { delete(m.clearedFields, station.FieldLongitude) } -// SetMorningOrder sets the "morning_order" field. -func (m *StationMutation) SetMorningOrder(i int) { - m.morning_order = &i - m.addmorning_order = nil -} - -// MorningOrder returns the value of the "morning_order" field in the mutation. -func (m *StationMutation) MorningOrder() (r int, exists bool) { - v := m.morning_order - if v == nil { - return - } - return *v, true -} - -// OldMorningOrder returns the old "morning_order" field's value of the Station entity. -// If the Station object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *StationMutation) OldMorningOrder(ctx context.Context) (v int, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldMorningOrder is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldMorningOrder requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldMorningOrder: %w", err) - } - return oldValue.MorningOrder, nil -} - -// AddMorningOrder adds i to the "morning_order" field. -func (m *StationMutation) AddMorningOrder(i int) { - if m.addmorning_order != nil { - *m.addmorning_order += i - } else { - m.addmorning_order = &i - } -} - -// AddedMorningOrder returns the value that was added to the "morning_order" field in this mutation. -func (m *StationMutation) AddedMorningOrder() (r int, exists bool) { - v := m.addmorning_order - if v == nil { - return - } - return *v, true -} - -// ResetMorningOrder resets all changes to the "morning_order" field. -func (m *StationMutation) ResetMorningOrder() { - m.morning_order = nil - m.addmorning_order = nil -} - -// SetEveningOrder sets the "evening_order" field. -func (m *StationMutation) SetEveningOrder(i int) { - m.evening_order = &i - m.addevening_order = nil -} - -// EveningOrder returns the value of the "evening_order" field in the mutation. -func (m *StationMutation) EveningOrder() (r int, exists bool) { - v := m.evening_order - if v == nil { - return - } - return *v, true -} - -// OldEveningOrder returns the old "evening_order" field's value of the Station entity. -// If the Station object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *StationMutation) OldEveningOrder(ctx context.Context) (v int, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldEveningOrder is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldEveningOrder requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldEveningOrder: %w", err) - } - return oldValue.EveningOrder, nil -} - -// AddEveningOrder adds i to the "evening_order" field. -func (m *StationMutation) AddEveningOrder(i int) { - if m.addevening_order != nil { - *m.addevening_order += i - } else { - m.addevening_order = &i - } -} - -// AddedEveningOrder returns the value that was added to the "evening_order" field in this mutation. -func (m *StationMutation) AddedEveningOrder() (r int, exists bool) { - v := m.addevening_order - if v == nil { - return - } - return *v, true -} - -// ResetEveningOrder resets all changes to the "evening_order" field. -func (m *StationMutation) ResetEveningOrder() { - m.evening_order = nil - m.addevening_order = nil -} - // SetCreatedAt sets the "created_at" field. func (m *StationMutation) SetCreatedAt(t time.Time) { m.created_at = &t @@ -6540,6 +6380,192 @@ func (m *StationMutation) ResetBus() { m.removedbus = nil } +// SetMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by id. +func (m *StationMutation) SetMorningPreviousStationID(id uuid.UUID) { + m.morning_previous_station = &id +} + +// ClearMorningPreviousStation clears the "morning_previous_station" edge to the Station entity. +func (m *StationMutation) ClearMorningPreviousStation() { + m.clearedmorning_previous_station = true +} + +// MorningPreviousStationCleared reports if the "morning_previous_station" edge to the Station entity was cleared. +func (m *StationMutation) MorningPreviousStationCleared() bool { + return m.clearedmorning_previous_station +} + +// MorningPreviousStationID returns the "morning_previous_station" edge ID in the mutation. +func (m *StationMutation) MorningPreviousStationID() (id uuid.UUID, exists bool) { + if m.morning_previous_station != nil { + return *m.morning_previous_station, true + } + return +} + +// MorningPreviousStationIDs returns the "morning_previous_station" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// MorningPreviousStationID instead. It exists only for internal usage by the builders. +func (m *StationMutation) MorningPreviousStationIDs() (ids []uuid.UUID) { + if id := m.morning_previous_station; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetMorningPreviousStation resets all changes to the "morning_previous_station" edge. +func (m *StationMutation) ResetMorningPreviousStation() { + m.morning_previous_station = nil + m.clearedmorning_previous_station = false +} + +// AddMorningNextStationIDs adds the "morning_next_station" edge to the Station entity by ids. +func (m *StationMutation) AddMorningNextStationIDs(ids ...uuid.UUID) { + if m.morning_next_station == nil { + m.morning_next_station = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.morning_next_station[ids[i]] = struct{}{} + } +} + +// ClearMorningNextStation clears the "morning_next_station" edge to the Station entity. +func (m *StationMutation) ClearMorningNextStation() { + m.clearedmorning_next_station = true +} + +// MorningNextStationCleared reports if the "morning_next_station" edge to the Station entity was cleared. +func (m *StationMutation) MorningNextStationCleared() bool { + return m.clearedmorning_next_station +} + +// RemoveMorningNextStationIDs removes the "morning_next_station" edge to the Station entity by IDs. +func (m *StationMutation) RemoveMorningNextStationIDs(ids ...uuid.UUID) { + if m.removedmorning_next_station == nil { + m.removedmorning_next_station = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.morning_next_station, ids[i]) + m.removedmorning_next_station[ids[i]] = struct{}{} + } +} + +// RemovedMorningNextStation returns the removed IDs of the "morning_next_station" edge to the Station entity. +func (m *StationMutation) RemovedMorningNextStationIDs() (ids []uuid.UUID) { + for id := range m.removedmorning_next_station { + ids = append(ids, id) + } + return +} + +// MorningNextStationIDs returns the "morning_next_station" edge IDs in the mutation. +func (m *StationMutation) MorningNextStationIDs() (ids []uuid.UUID) { + for id := range m.morning_next_station { + ids = append(ids, id) + } + return +} + +// ResetMorningNextStation resets all changes to the "morning_next_station" edge. +func (m *StationMutation) ResetMorningNextStation() { + m.morning_next_station = nil + m.clearedmorning_next_station = false + m.removedmorning_next_station = nil +} + +// SetEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by id. +func (m *StationMutation) SetEveningPreviousStationID(id uuid.UUID) { + m.evening_previous_station = &id +} + +// ClearEveningPreviousStation clears the "evening_previous_station" edge to the Station entity. +func (m *StationMutation) ClearEveningPreviousStation() { + m.clearedevening_previous_station = true +} + +// EveningPreviousStationCleared reports if the "evening_previous_station" edge to the Station entity was cleared. +func (m *StationMutation) EveningPreviousStationCleared() bool { + return m.clearedevening_previous_station +} + +// EveningPreviousStationID returns the "evening_previous_station" edge ID in the mutation. +func (m *StationMutation) EveningPreviousStationID() (id uuid.UUID, exists bool) { + if m.evening_previous_station != nil { + return *m.evening_previous_station, true + } + return +} + +// EveningPreviousStationIDs returns the "evening_previous_station" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// EveningPreviousStationID instead. It exists only for internal usage by the builders. +func (m *StationMutation) EveningPreviousStationIDs() (ids []uuid.UUID) { + if id := m.evening_previous_station; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetEveningPreviousStation resets all changes to the "evening_previous_station" edge. +func (m *StationMutation) ResetEveningPreviousStation() { + m.evening_previous_station = nil + m.clearedevening_previous_station = false +} + +// AddEveningNextStationIDs adds the "evening_next_station" edge to the Station entity by ids. +func (m *StationMutation) AddEveningNextStationIDs(ids ...uuid.UUID) { + if m.evening_next_station == nil { + m.evening_next_station = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.evening_next_station[ids[i]] = struct{}{} + } +} + +// ClearEveningNextStation clears the "evening_next_station" edge to the Station entity. +func (m *StationMutation) ClearEveningNextStation() { + m.clearedevening_next_station = true +} + +// EveningNextStationCleared reports if the "evening_next_station" edge to the Station entity was cleared. +func (m *StationMutation) EveningNextStationCleared() bool { + return m.clearedevening_next_station +} + +// RemoveEveningNextStationIDs removes the "evening_next_station" edge to the Station entity by IDs. +func (m *StationMutation) RemoveEveningNextStationIDs(ids ...uuid.UUID) { + if m.removedevening_next_station == nil { + m.removedevening_next_station = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.evening_next_station, ids[i]) + m.removedevening_next_station[ids[i]] = struct{}{} + } +} + +// RemovedEveningNextStation returns the removed IDs of the "evening_next_station" edge to the Station entity. +func (m *StationMutation) RemovedEveningNextStationIDs() (ids []uuid.UUID) { + for id := range m.removedevening_next_station { + ids = append(ids, id) + } + return +} + +// EveningNextStationIDs returns the "evening_next_station" edge IDs in the mutation. +func (m *StationMutation) EveningNextStationIDs() (ids []uuid.UUID) { + for id := range m.evening_next_station { + ids = append(ids, id) + } + return +} + +// ResetEveningNextStation resets all changes to the "evening_next_station" edge. +func (m *StationMutation) ResetEveningNextStation() { + m.evening_next_station = nil + m.clearedevening_next_station = false + m.removedevening_next_station = nil +} + // Where appends a list predicates to the StationMutation builder. func (m *StationMutation) Where(ps ...predicate.Station) { m.predicates = append(m.predicates, ps...) @@ -6574,19 +6600,13 @@ func (m *StationMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *StationMutation) Fields() []string { - fields := make([]string, 0, 6) + fields := make([]string, 0, 4) if m.latitude != nil { fields = append(fields, station.FieldLatitude) } if m.longitude != nil { fields = append(fields, station.FieldLongitude) } - if m.morning_order != nil { - fields = append(fields, station.FieldMorningOrder) - } - if m.evening_order != nil { - fields = append(fields, station.FieldEveningOrder) - } if m.created_at != nil { fields = append(fields, station.FieldCreatedAt) } @@ -6605,10 +6625,6 @@ func (m *StationMutation) Field(name string) (ent.Value, bool) { return m.Latitude() case station.FieldLongitude: return m.Longitude() - case station.FieldMorningOrder: - return m.MorningOrder() - case station.FieldEveningOrder: - return m.EveningOrder() case station.FieldCreatedAt: return m.CreatedAt() case station.FieldUpdatedAt: @@ -6626,10 +6642,6 @@ func (m *StationMutation) OldField(ctx context.Context, name string) (ent.Value, return m.OldLatitude(ctx) case station.FieldLongitude: return m.OldLongitude(ctx) - case station.FieldMorningOrder: - return m.OldMorningOrder(ctx) - case station.FieldEveningOrder: - return m.OldEveningOrder(ctx) case station.FieldCreatedAt: return m.OldCreatedAt(ctx) case station.FieldUpdatedAt: @@ -6657,20 +6669,6 @@ func (m *StationMutation) SetField(name string, value ent.Value) error { } m.SetLongitude(v) return nil - case station.FieldMorningOrder: - v, ok := value.(int) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetMorningOrder(v) - return nil - case station.FieldEveningOrder: - v, ok := value.(int) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetEveningOrder(v) - return nil case station.FieldCreatedAt: v, ok := value.(time.Time) if !ok { @@ -6699,12 +6697,6 @@ func (m *StationMutation) AddedFields() []string { if m.addlongitude != nil { fields = append(fields, station.FieldLongitude) } - if m.addmorning_order != nil { - fields = append(fields, station.FieldMorningOrder) - } - if m.addevening_order != nil { - fields = append(fields, station.FieldEveningOrder) - } return fields } @@ -6717,10 +6709,6 @@ func (m *StationMutation) AddedField(name string) (ent.Value, bool) { return m.AddedLatitude() case station.FieldLongitude: return m.AddedLongitude() - case station.FieldMorningOrder: - return m.AddedMorningOrder() - case station.FieldEveningOrder: - return m.AddedEveningOrder() } return nil, false } @@ -6744,20 +6732,6 @@ func (m *StationMutation) AddField(name string, value ent.Value) error { } m.AddLongitude(v) return nil - case station.FieldMorningOrder: - v, ok := value.(int) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.AddMorningOrder(v) - return nil - case station.FieldEveningOrder: - v, ok := value.(int) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.AddEveningOrder(v) - return nil } return fmt.Errorf("unknown Station numeric field %s", name) } @@ -6806,12 +6780,6 @@ func (m *StationMutation) ResetField(name string) error { case station.FieldLongitude: m.ResetLongitude() return nil - case station.FieldMorningOrder: - m.ResetMorningOrder() - return nil - case station.FieldEveningOrder: - m.ResetEveningOrder() - return nil case station.FieldCreatedAt: m.ResetCreatedAt() return nil @@ -6824,13 +6792,25 @@ func (m *StationMutation) ResetField(name string) error { // AddedEdges returns all edge names that were set/added in this mutation. func (m *StationMutation) AddedEdges() []string { - edges := make([]string, 0, 2) + edges := make([]string, 0, 6) if m.guardian != nil { edges = append(edges, station.EdgeGuardian) } if m.bus != nil { edges = append(edges, station.EdgeBus) } + if m.morning_previous_station != nil { + edges = append(edges, station.EdgeMorningPreviousStation) + } + if m.morning_next_station != nil { + edges = append(edges, station.EdgeMorningNextStation) + } + if m.evening_previous_station != nil { + edges = append(edges, station.EdgeEveningPreviousStation) + } + if m.evening_next_station != nil { + edges = append(edges, station.EdgeEveningNextStation) + } return edges } @@ -6848,16 +6828,42 @@ func (m *StationMutation) AddedIDs(name string) []ent.Value { ids = append(ids, id) } return ids + case station.EdgeMorningPreviousStation: + if id := m.morning_previous_station; id != nil { + return []ent.Value{*id} + } + case station.EdgeMorningNextStation: + ids := make([]ent.Value, 0, len(m.morning_next_station)) + for id := range m.morning_next_station { + ids = append(ids, id) + } + return ids + case station.EdgeEveningPreviousStation: + if id := m.evening_previous_station; id != nil { + return []ent.Value{*id} + } + case station.EdgeEveningNextStation: + ids := make([]ent.Value, 0, len(m.evening_next_station)) + for id := range m.evening_next_station { + ids = append(ids, id) + } + return ids } return nil } // RemovedEdges returns all edge names that were removed in this mutation. func (m *StationMutation) RemovedEdges() []string { - edges := make([]string, 0, 2) + edges := make([]string, 0, 6) if m.removedbus != nil { edges = append(edges, station.EdgeBus) } + if m.removedmorning_next_station != nil { + edges = append(edges, station.EdgeMorningNextStation) + } + if m.removedevening_next_station != nil { + edges = append(edges, station.EdgeEveningNextStation) + } return edges } @@ -6871,19 +6877,43 @@ func (m *StationMutation) RemovedIDs(name string) []ent.Value { ids = append(ids, id) } return ids + case station.EdgeMorningNextStation: + ids := make([]ent.Value, 0, len(m.removedmorning_next_station)) + for id := range m.removedmorning_next_station { + ids = append(ids, id) + } + return ids + case station.EdgeEveningNextStation: + ids := make([]ent.Value, 0, len(m.removedevening_next_station)) + for id := range m.removedevening_next_station { + ids = append(ids, id) + } + return ids } return nil } // ClearedEdges returns all edge names that were cleared in this mutation. func (m *StationMutation) ClearedEdges() []string { - edges := make([]string, 0, 2) + edges := make([]string, 0, 6) if m.clearedguardian { edges = append(edges, station.EdgeGuardian) } if m.clearedbus { edges = append(edges, station.EdgeBus) } + if m.clearedmorning_previous_station { + edges = append(edges, station.EdgeMorningPreviousStation) + } + if m.clearedmorning_next_station { + edges = append(edges, station.EdgeMorningNextStation) + } + if m.clearedevening_previous_station { + edges = append(edges, station.EdgeEveningPreviousStation) + } + if m.clearedevening_next_station { + edges = append(edges, station.EdgeEveningNextStation) + } return edges } @@ -6895,6 +6925,14 @@ func (m *StationMutation) EdgeCleared(name string) bool { return m.clearedguardian case station.EdgeBus: return m.clearedbus + case station.EdgeMorningPreviousStation: + return m.clearedmorning_previous_station + case station.EdgeMorningNextStation: + return m.clearedmorning_next_station + case station.EdgeEveningPreviousStation: + return m.clearedevening_previous_station + case station.EdgeEveningNextStation: + return m.clearedevening_next_station } return false } @@ -6906,6 +6944,12 @@ func (m *StationMutation) ClearEdge(name string) error { case station.EdgeGuardian: m.ClearGuardian() return nil + case station.EdgeMorningPreviousStation: + m.ClearMorningPreviousStation() + return nil + case station.EdgeEveningPreviousStation: + m.ClearEveningPreviousStation() + return nil } return fmt.Errorf("unknown Station unique edge %s", name) } @@ -6920,6 +6964,18 @@ func (m *StationMutation) ResetEdge(name string) error { case station.EdgeBus: m.ResetBus() return nil + case station.EdgeMorningPreviousStation: + m.ResetMorningPreviousStation() + return nil + case station.EdgeMorningNextStation: + m.ResetMorningNextStation() + return nil + case station.EdgeEveningPreviousStation: + m.ResetEveningPreviousStation() + return nil + case station.EdgeEveningNextStation: + m.ResetEveningNextStation() + return nil } return fmt.Errorf("unknown Station edge %s", name) } diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index fabc11e9..697a9155 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -52,44 +52,36 @@ func init() { bus.DefaultID = busDescID.Default.(func() uuid.UUID) childFields := schema.Child{}.Fields() _ = childFields - // childDescIsRideMorningBus is the schema descriptor for is_ride_morning_bus field. - childDescIsRideMorningBus := childFields[4].Descriptor() - // child.DefaultIsRideMorningBus holds the default value on creation for the is_ride_morning_bus field. - child.DefaultIsRideMorningBus = childDescIsRideMorningBus.Default.(bool) - // childDescIsRideEveningBus is the schema descriptor for is_ride_evening_bus field. - childDescIsRideEveningBus := childFields[5].Descriptor() - // child.DefaultIsRideEveningBus holds the default value on creation for the is_ride_evening_bus field. - child.DefaultIsRideEveningBus = childDescIsRideEveningBus.Default.(bool) // childDescCheckForMissingItems is the schema descriptor for check_for_missing_items field. - childDescCheckForMissingItems := childFields[6].Descriptor() + childDescCheckForMissingItems := childFields[4].Descriptor() // child.DefaultCheckForMissingItems holds the default value on creation for the check_for_missing_items field. child.DefaultCheckForMissingItems = childDescCheckForMissingItems.Default.(bool) // childDescHasBag is the schema descriptor for has_bag field. - childDescHasBag := childFields[7].Descriptor() + childDescHasBag := childFields[5].Descriptor() // child.DefaultHasBag holds the default value on creation for the has_bag field. child.DefaultHasBag = childDescHasBag.Default.(bool) // childDescHasLunchBox is the schema descriptor for has_lunch_box field. - childDescHasLunchBox := childFields[8].Descriptor() + childDescHasLunchBox := childFields[6].Descriptor() // child.DefaultHasLunchBox holds the default value on creation for the has_lunch_box field. child.DefaultHasLunchBox = childDescHasLunchBox.Default.(bool) // childDescHasWaterBottle is the schema descriptor for has_water_bottle field. - childDescHasWaterBottle := childFields[9].Descriptor() + childDescHasWaterBottle := childFields[7].Descriptor() // child.DefaultHasWaterBottle holds the default value on creation for the has_water_bottle field. child.DefaultHasWaterBottle = childDescHasWaterBottle.Default.(bool) // childDescHasUmbrella is the schema descriptor for has_umbrella field. - childDescHasUmbrella := childFields[10].Descriptor() + childDescHasUmbrella := childFields[8].Descriptor() // child.DefaultHasUmbrella holds the default value on creation for the has_umbrella field. child.DefaultHasUmbrella = childDescHasUmbrella.Default.(bool) // childDescHasOther is the schema descriptor for has_other field. - childDescHasOther := childFields[11].Descriptor() + childDescHasOther := childFields[9].Descriptor() // child.DefaultHasOther holds the default value on creation for the has_other field. child.DefaultHasOther = childDescHasOther.Default.(bool) // childDescCreatedAt is the schema descriptor for created_at field. - childDescCreatedAt := childFields[12].Descriptor() + childDescCreatedAt := childFields[10].Descriptor() // child.DefaultCreatedAt holds the default value on creation for the created_at field. child.DefaultCreatedAt = childDescCreatedAt.Default.(func() time.Time) // childDescUpdatedAt is the schema descriptor for updated_at field. - childDescUpdatedAt := childFields[13].Descriptor() + childDescUpdatedAt := childFields[11].Descriptor() // child.DefaultUpdatedAt holds the default value on creation for the updated_at field. child.DefaultUpdatedAt = childDescUpdatedAt.Default.(func() time.Time) // child.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. @@ -100,16 +92,12 @@ func init() { child.DefaultID = childDescID.Default.(func() uuid.UUID) childphotoFields := schema.ChildPhoto{}.Fields() _ = childphotoFields - // childphotoDescIsDuplicate is the schema descriptor for is_duplicate field. - childphotoDescIsDuplicate := childphotoFields[1].Descriptor() - // childphoto.DefaultIsDuplicate holds the default value on creation for the is_duplicate field. - childphoto.DefaultIsDuplicate = childphotoDescIsDuplicate.Default.(bool) // childphotoDescCreatedAt is the schema descriptor for created_at field. - childphotoDescCreatedAt := childphotoFields[2].Descriptor() + childphotoDescCreatedAt := childphotoFields[1].Descriptor() // childphoto.DefaultCreatedAt holds the default value on creation for the created_at field. childphoto.DefaultCreatedAt = childphotoDescCreatedAt.Default.(func() time.Time) // childphotoDescUpdatedAt is the schema descriptor for updated_at field. - childphotoDescUpdatedAt := childphotoFields[3].Descriptor() + childphotoDescUpdatedAt := childphotoFields[2].Descriptor() // childphoto.DefaultUpdatedAt holds the default value on creation for the updated_at field. childphoto.DefaultUpdatedAt = childphotoDescUpdatedAt.Default.(func() time.Time) // childphoto.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. @@ -120,12 +108,20 @@ func init() { childphoto.DefaultID = childphotoDescID.Default.(func() uuid.UUID) guardianFields := schema.Guardian{}.Fields() _ = guardianFields + // guardianDescIsUseMorningBus is the schema descriptor for is_use_morning_bus field. + guardianDescIsUseMorningBus := guardianFields[5].Descriptor() + // guardian.DefaultIsUseMorningBus holds the default value on creation for the is_use_morning_bus field. + guardian.DefaultIsUseMorningBus = guardianDescIsUseMorningBus.Default.(bool) + // guardianDescIsUseEveningBus is the schema descriptor for is_use_evening_bus field. + guardianDescIsUseEveningBus := guardianFields[6].Descriptor() + // guardian.DefaultIsUseEveningBus holds the default value on creation for the is_use_evening_bus field. + guardian.DefaultIsUseEveningBus = guardianDescIsUseEveningBus.Default.(bool) // guardianDescCreatedAt is the schema descriptor for created_at field. - guardianDescCreatedAt := guardianFields[5].Descriptor() + guardianDescCreatedAt := guardianFields[7].Descriptor() // guardian.DefaultCreatedAt holds the default value on creation for the created_at field. guardian.DefaultCreatedAt = guardianDescCreatedAt.Default.(func() time.Time) // guardianDescUpdatedAt is the schema descriptor for updated_at field. - guardianDescUpdatedAt := guardianFields[6].Descriptor() + guardianDescUpdatedAt := guardianFields[8].Descriptor() // guardian.DefaultUpdatedAt holds the default value on creation for the updated_at field. guardian.DefaultUpdatedAt = guardianDescUpdatedAt.Default.(func() time.Time) // guardian.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. @@ -153,11 +149,11 @@ func init() { stationFields := schema.Station{}.Fields() _ = stationFields // stationDescCreatedAt is the schema descriptor for created_at field. - stationDescCreatedAt := stationFields[5].Descriptor() + stationDescCreatedAt := stationFields[3].Descriptor() // station.DefaultCreatedAt holds the default value on creation for the created_at field. station.DefaultCreatedAt = stationDescCreatedAt.Default.(func() time.Time) // stationDescUpdatedAt is the schema descriptor for updated_at field. - stationDescUpdatedAt := stationFields[6].Descriptor() + stationDescUpdatedAt := stationFields[4].Descriptor() // station.DefaultUpdatedAt holds the default value on creation for the updated_at field. station.DefaultUpdatedAt = stationDescUpdatedAt.Default.(func() time.Time) // station.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. diff --git a/backend/domain/repository/ent/schema/child.go b/backend/domain/repository/ent/schema/child.go index 8fd97c4d..1b21472c 100644 --- a/backend/domain/repository/ent/schema/child.go +++ b/backend/domain/repository/ent/schema/child.go @@ -22,8 +22,6 @@ func (Child) Fields() []ent.Field { field.Int("age"), field.Enum("sex"). Values("man", "woman", "other"), - field.Bool("is_ride_morning_bus").Default(false).Comment("朝のバスに乗るかどうか"), - field.Bool("is_ride_evening_bus").Default(false).Comment("放課後のバスに乗るかどうか"), field.Bool("check_for_missing_items").Default(false).Comment("持ち物が欠けていないかをチェックするかどうか"), // ?: 持ち物エンティティを作成する? field.Bool("has_bag").Default(true), diff --git a/backend/domain/repository/ent/schema/child_photo.go b/backend/domain/repository/ent/schema/child_photo.go index dffd70f4..0c78d056 100644 --- a/backend/domain/repository/ent/schema/child_photo.go +++ b/backend/domain/repository/ent/schema/child_photo.go @@ -18,7 +18,6 @@ type ChildPhoto struct { func (ChildPhoto) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), - field.Bool("is_duplicate").Default(false).Comment("重複画像があるかどうか"), field.Time("created_at").Default(time.Now).Comment("レコードの作成日時"), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now).Comment("レコードの最終更新日時"), } diff --git a/backend/domain/repository/ent/schema/guardian.go b/backend/domain/repository/ent/schema/guardian.go index ce67934d..009083c2 100644 --- a/backend/domain/repository/ent/schema/guardian.go +++ b/backend/domain/repository/ent/schema/guardian.go @@ -22,6 +22,8 @@ func (Guardian) Fields() []ent.Field { field.String("hashed_password"), field.String("name"), field.String("phone_number").Optional(), + field.Bool("is_use_morning_bus").Default(true).Comment("バスを利用するかどうか"), + field.Bool("is_use_evening_bus").Default(true).Comment("バスを利用するかどうか"), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } diff --git a/backend/domain/repository/ent/schema/station.go b/backend/domain/repository/ent/schema/station.go index 116ead7e..f3ad75e8 100644 --- a/backend/domain/repository/ent/schema/station.go +++ b/backend/domain/repository/ent/schema/station.go @@ -20,8 +20,6 @@ func (Station) Fields() []ent.Field { field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), field.Float("latitude").Optional(), field.Float("longitude").Optional(), - field.Int("morning_order").Comment("朝のバス停の順番"), - field.Int("evening_order").Comment("帰りのバス停の順番"), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } @@ -35,5 +33,13 @@ func (Station) Edges() []ent.Edge { Unique(), edge.From("bus", Bus.Type). Ref("stations"), + // 朝の次のステーションへの自己参照エッジ + edge.To("morning_next_station", Station.Type). + From("morning_previous_station"). + Unique(), + // 夕方の次のステーションへの自己参照エッジ + edge.To("evening_next_station", Station.Type). + From("evening_previous_station"). + Unique(), } } diff --git a/backend/domain/repository/ent/station.go b/backend/domain/repository/ent/station.go index 2edbce17..7c16104d 100644 --- a/backend/domain/repository/ent/station.go +++ b/backend/domain/repository/ent/station.go @@ -23,19 +23,17 @@ type Station struct { Latitude float64 `json:"latitude,omitempty"` // Longitude holds the value of the "longitude" field. Longitude float64 `json:"longitude,omitempty"` - // 朝のバス停の順番 - MorningOrder int `json:"morning_order,omitempty"` - // 帰りのバス停の順番 - EveningOrder int `json:"evening_order,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the StationQuery when eager-loading is set. - Edges StationEdges `json:"edges"` - guardian_station *uuid.UUID - selectValues sql.SelectValues + Edges StationEdges `json:"edges"` + guardian_station *uuid.UUID + station_morning_next_station *uuid.UUID + station_evening_next_station *uuid.UUID + selectValues sql.SelectValues } // StationEdges holds the relations/edges for other nodes in the graph. @@ -44,9 +42,17 @@ type StationEdges struct { Guardian *Guardian `json:"guardian,omitempty"` // Bus holds the value of the bus edge. Bus []*Bus `json:"bus,omitempty"` + // MorningPreviousStation holds the value of the morning_previous_station edge. + MorningPreviousStation *Station `json:"morning_previous_station,omitempty"` + // MorningNextStation holds the value of the morning_next_station edge. + MorningNextStation []*Station `json:"morning_next_station,omitempty"` + // EveningPreviousStation holds the value of the evening_previous_station edge. + EveningPreviousStation *Station `json:"evening_previous_station,omitempty"` + // EveningNextStation holds the value of the evening_next_station edge. + EveningNextStation []*Station `json:"evening_next_station,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. - loadedTypes [2]bool + loadedTypes [6]bool } // GuardianOrErr returns the Guardian value or an error if the edge @@ -71,6 +77,50 @@ func (e StationEdges) BusOrErr() ([]*Bus, error) { return nil, &NotLoadedError{edge: "bus"} } +// MorningPreviousStationOrErr returns the MorningPreviousStation value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e StationEdges) MorningPreviousStationOrErr() (*Station, error) { + if e.loadedTypes[2] { + if e.MorningPreviousStation == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: station.Label} + } + return e.MorningPreviousStation, nil + } + return nil, &NotLoadedError{edge: "morning_previous_station"} +} + +// MorningNextStationOrErr returns the MorningNextStation value or an error if the edge +// was not loaded in eager-loading. +func (e StationEdges) MorningNextStationOrErr() ([]*Station, error) { + if e.loadedTypes[3] { + return e.MorningNextStation, nil + } + return nil, &NotLoadedError{edge: "morning_next_station"} +} + +// EveningPreviousStationOrErr returns the EveningPreviousStation value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e StationEdges) EveningPreviousStationOrErr() (*Station, error) { + if e.loadedTypes[4] { + if e.EveningPreviousStation == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: station.Label} + } + return e.EveningPreviousStation, nil + } + return nil, &NotLoadedError{edge: "evening_previous_station"} +} + +// EveningNextStationOrErr returns the EveningNextStation value or an error if the edge +// was not loaded in eager-loading. +func (e StationEdges) EveningNextStationOrErr() ([]*Station, error) { + if e.loadedTypes[5] { + return e.EveningNextStation, nil + } + return nil, &NotLoadedError{edge: "evening_next_station"} +} + // scanValues returns the types for scanning values from sql.Rows. func (*Station) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) @@ -78,14 +128,16 @@ func (*Station) scanValues(columns []string) ([]any, error) { switch columns[i] { case station.FieldLatitude, station.FieldLongitude: values[i] = new(sql.NullFloat64) - case station.FieldMorningOrder, station.FieldEveningOrder: - values[i] = new(sql.NullInt64) case station.FieldCreatedAt, station.FieldUpdatedAt: values[i] = new(sql.NullTime) case station.FieldID: values[i] = new(uuid.UUID) case station.ForeignKeys[0]: // guardian_station values[i] = &sql.NullScanner{S: new(uuid.UUID)} + case station.ForeignKeys[1]: // station_morning_next_station + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + case station.ForeignKeys[2]: // station_evening_next_station + values[i] = &sql.NullScanner{S: new(uuid.UUID)} default: values[i] = new(sql.UnknownType) } @@ -119,18 +171,6 @@ func (s *Station) assignValues(columns []string, values []any) error { } else if value.Valid { s.Longitude = value.Float64 } - case station.FieldMorningOrder: - if value, ok := values[i].(*sql.NullInt64); !ok { - return fmt.Errorf("unexpected type %T for field morning_order", values[i]) - } else if value.Valid { - s.MorningOrder = int(value.Int64) - } - case station.FieldEveningOrder: - if value, ok := values[i].(*sql.NullInt64); !ok { - return fmt.Errorf("unexpected type %T for field evening_order", values[i]) - } else if value.Valid { - s.EveningOrder = int(value.Int64) - } case station.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { return fmt.Errorf("unexpected type %T for field created_at", values[i]) @@ -150,6 +190,20 @@ func (s *Station) assignValues(columns []string, values []any) error { s.guardian_station = new(uuid.UUID) *s.guardian_station = *value.S.(*uuid.UUID) } + case station.ForeignKeys[1]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field station_morning_next_station", values[i]) + } else if value.Valid { + s.station_morning_next_station = new(uuid.UUID) + *s.station_morning_next_station = *value.S.(*uuid.UUID) + } + case station.ForeignKeys[2]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field station_evening_next_station", values[i]) + } else if value.Valid { + s.station_evening_next_station = new(uuid.UUID) + *s.station_evening_next_station = *value.S.(*uuid.UUID) + } default: s.selectValues.Set(columns[i], values[i]) } @@ -173,6 +227,26 @@ func (s *Station) QueryBus() *BusQuery { return NewStationClient(s.config).QueryBus(s) } +// QueryMorningPreviousStation queries the "morning_previous_station" edge of the Station entity. +func (s *Station) QueryMorningPreviousStation() *StationQuery { + return NewStationClient(s.config).QueryMorningPreviousStation(s) +} + +// QueryMorningNextStation queries the "morning_next_station" edge of the Station entity. +func (s *Station) QueryMorningNextStation() *StationQuery { + return NewStationClient(s.config).QueryMorningNextStation(s) +} + +// QueryEveningPreviousStation queries the "evening_previous_station" edge of the Station entity. +func (s *Station) QueryEveningPreviousStation() *StationQuery { + return NewStationClient(s.config).QueryEveningPreviousStation(s) +} + +// QueryEveningNextStation queries the "evening_next_station" edge of the Station entity. +func (s *Station) QueryEveningNextStation() *StationQuery { + return NewStationClient(s.config).QueryEveningNextStation(s) +} + // Update returns a builder for updating this Station. // Note that you need to call Station.Unwrap() before calling this method if this Station // was returned from a transaction, and the transaction was committed or rolled back. @@ -202,12 +276,6 @@ func (s *Station) String() string { builder.WriteString("longitude=") builder.WriteString(fmt.Sprintf("%v", s.Longitude)) builder.WriteString(", ") - builder.WriteString("morning_order=") - builder.WriteString(fmt.Sprintf("%v", s.MorningOrder)) - builder.WriteString(", ") - builder.WriteString("evening_order=") - builder.WriteString(fmt.Sprintf("%v", s.EveningOrder)) - builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(s.CreatedAt.Format(time.ANSIC)) builder.WriteString(", ") diff --git a/backend/domain/repository/ent/station/station.go b/backend/domain/repository/ent/station/station.go index 73f96037..c1ccf5f8 100644 --- a/backend/domain/repository/ent/station/station.go +++ b/backend/domain/repository/ent/station/station.go @@ -19,10 +19,6 @@ const ( FieldLatitude = "latitude" // FieldLongitude holds the string denoting the longitude field in the database. FieldLongitude = "longitude" - // FieldMorningOrder holds the string denoting the morning_order field in the database. - FieldMorningOrder = "morning_order" - // FieldEveningOrder holds the string denoting the evening_order field in the database. - FieldEveningOrder = "evening_order" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -31,6 +27,14 @@ const ( EdgeGuardian = "guardian" // EdgeBus holds the string denoting the bus edge name in mutations. EdgeBus = "bus" + // EdgeMorningPreviousStation holds the string denoting the morning_previous_station edge name in mutations. + EdgeMorningPreviousStation = "morning_previous_station" + // EdgeMorningNextStation holds the string denoting the morning_next_station edge name in mutations. + EdgeMorningNextStation = "morning_next_station" + // EdgeEveningPreviousStation holds the string denoting the evening_previous_station edge name in mutations. + EdgeEveningPreviousStation = "evening_previous_station" + // EdgeEveningNextStation holds the string denoting the evening_next_station edge name in mutations. + EdgeEveningNextStation = "evening_next_station" // Table holds the table name of the station in the database. Table = "stations" // GuardianTable is the table that holds the guardian relation/edge. @@ -45,6 +49,22 @@ const ( // BusInverseTable is the table name for the Bus entity. // It exists in this package in order to avoid circular dependency with the "bus" package. BusInverseTable = "bus" + // MorningPreviousStationTable is the table that holds the morning_previous_station relation/edge. + MorningPreviousStationTable = "stations" + // MorningPreviousStationColumn is the table column denoting the morning_previous_station relation/edge. + MorningPreviousStationColumn = "station_morning_next_station" + // MorningNextStationTable is the table that holds the morning_next_station relation/edge. + MorningNextStationTable = "stations" + // MorningNextStationColumn is the table column denoting the morning_next_station relation/edge. + MorningNextStationColumn = "station_morning_next_station" + // EveningPreviousStationTable is the table that holds the evening_previous_station relation/edge. + EveningPreviousStationTable = "stations" + // EveningPreviousStationColumn is the table column denoting the evening_previous_station relation/edge. + EveningPreviousStationColumn = "station_evening_next_station" + // EveningNextStationTable is the table that holds the evening_next_station relation/edge. + EveningNextStationTable = "stations" + // EveningNextStationColumn is the table column denoting the evening_next_station relation/edge. + EveningNextStationColumn = "station_evening_next_station" ) // Columns holds all SQL columns for station fields. @@ -52,8 +72,6 @@ var Columns = []string{ FieldID, FieldLatitude, FieldLongitude, - FieldMorningOrder, - FieldEveningOrder, FieldCreatedAt, FieldUpdatedAt, } @@ -62,6 +80,8 @@ var Columns = []string{ // table and are not defined as standalone fields in the schema. var ForeignKeys = []string{ "guardian_station", + "station_morning_next_station", + "station_evening_next_station", } var ( @@ -114,16 +134,6 @@ func ByLongitude(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLongitude, opts...).ToFunc() } -// ByMorningOrder orders the results by the morning_order field. -func ByMorningOrder(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldMorningOrder, opts...).ToFunc() -} - -// ByEveningOrder orders the results by the evening_order field. -func ByEveningOrder(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldEveningOrder, opts...).ToFunc() -} - // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() @@ -154,6 +164,48 @@ func ByBus(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { sqlgraph.OrderByNeighborTerms(s, newBusStep(), append([]sql.OrderTerm{term}, terms...)...) } } + +// ByMorningPreviousStationField orders the results by morning_previous_station field. +func ByMorningPreviousStationField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newMorningPreviousStationStep(), sql.OrderByField(field, opts...)) + } +} + +// ByMorningNextStationCount orders the results by morning_next_station count. +func ByMorningNextStationCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newMorningNextStationStep(), opts...) + } +} + +// ByMorningNextStation orders the results by morning_next_station terms. +func ByMorningNextStation(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newMorningNextStationStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByEveningPreviousStationField orders the results by evening_previous_station field. +func ByEveningPreviousStationField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newEveningPreviousStationStep(), sql.OrderByField(field, opts...)) + } +} + +// ByEveningNextStationCount orders the results by evening_next_station count. +func ByEveningNextStationCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newEveningNextStationStep(), opts...) + } +} + +// ByEveningNextStation orders the results by evening_next_station terms. +func ByEveningNextStation(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newEveningNextStationStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} func newGuardianStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), @@ -168,3 +220,31 @@ func newBusStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.M2M, true, BusTable, BusPrimaryKey...), ) } +func newMorningPreviousStationStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, MorningPreviousStationTable, MorningPreviousStationColumn), + ) +} +func newMorningNextStationStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, MorningNextStationTable, MorningNextStationColumn), + ) +} +func newEveningPreviousStationStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, EveningPreviousStationTable, EveningPreviousStationColumn), + ) +} +func newEveningNextStationStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, EveningNextStationTable, EveningNextStationColumn), + ) +} diff --git a/backend/domain/repository/ent/station/where.go b/backend/domain/repository/ent/station/where.go index 2de60d55..ff4422b0 100644 --- a/backend/domain/repository/ent/station/where.go +++ b/backend/domain/repository/ent/station/where.go @@ -66,16 +66,6 @@ func Longitude(v float64) predicate.Station { return predicate.Station(sql.FieldEQ(FieldLongitude, v)) } -// MorningOrder applies equality check predicate on the "morning_order" field. It's identical to MorningOrderEQ. -func MorningOrder(v int) predicate.Station { - return predicate.Station(sql.FieldEQ(FieldMorningOrder, v)) -} - -// EveningOrder applies equality check predicate on the "evening_order" field. It's identical to EveningOrderEQ. -func EveningOrder(v int) predicate.Station { - return predicate.Station(sql.FieldEQ(FieldEveningOrder, v)) -} - // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. func CreatedAt(v time.Time) predicate.Station { return predicate.Station(sql.FieldEQ(FieldCreatedAt, v)) @@ -186,86 +176,6 @@ func LongitudeNotNil() predicate.Station { return predicate.Station(sql.FieldNotNull(FieldLongitude)) } -// MorningOrderEQ applies the EQ predicate on the "morning_order" field. -func MorningOrderEQ(v int) predicate.Station { - return predicate.Station(sql.FieldEQ(FieldMorningOrder, v)) -} - -// MorningOrderNEQ applies the NEQ predicate on the "morning_order" field. -func MorningOrderNEQ(v int) predicate.Station { - return predicate.Station(sql.FieldNEQ(FieldMorningOrder, v)) -} - -// MorningOrderIn applies the In predicate on the "morning_order" field. -func MorningOrderIn(vs ...int) predicate.Station { - return predicate.Station(sql.FieldIn(FieldMorningOrder, vs...)) -} - -// MorningOrderNotIn applies the NotIn predicate on the "morning_order" field. -func MorningOrderNotIn(vs ...int) predicate.Station { - return predicate.Station(sql.FieldNotIn(FieldMorningOrder, vs...)) -} - -// MorningOrderGT applies the GT predicate on the "morning_order" field. -func MorningOrderGT(v int) predicate.Station { - return predicate.Station(sql.FieldGT(FieldMorningOrder, v)) -} - -// MorningOrderGTE applies the GTE predicate on the "morning_order" field. -func MorningOrderGTE(v int) predicate.Station { - return predicate.Station(sql.FieldGTE(FieldMorningOrder, v)) -} - -// MorningOrderLT applies the LT predicate on the "morning_order" field. -func MorningOrderLT(v int) predicate.Station { - return predicate.Station(sql.FieldLT(FieldMorningOrder, v)) -} - -// MorningOrderLTE applies the LTE predicate on the "morning_order" field. -func MorningOrderLTE(v int) predicate.Station { - return predicate.Station(sql.FieldLTE(FieldMorningOrder, v)) -} - -// EveningOrderEQ applies the EQ predicate on the "evening_order" field. -func EveningOrderEQ(v int) predicate.Station { - return predicate.Station(sql.FieldEQ(FieldEveningOrder, v)) -} - -// EveningOrderNEQ applies the NEQ predicate on the "evening_order" field. -func EveningOrderNEQ(v int) predicate.Station { - return predicate.Station(sql.FieldNEQ(FieldEveningOrder, v)) -} - -// EveningOrderIn applies the In predicate on the "evening_order" field. -func EveningOrderIn(vs ...int) predicate.Station { - return predicate.Station(sql.FieldIn(FieldEveningOrder, vs...)) -} - -// EveningOrderNotIn applies the NotIn predicate on the "evening_order" field. -func EveningOrderNotIn(vs ...int) predicate.Station { - return predicate.Station(sql.FieldNotIn(FieldEveningOrder, vs...)) -} - -// EveningOrderGT applies the GT predicate on the "evening_order" field. -func EveningOrderGT(v int) predicate.Station { - return predicate.Station(sql.FieldGT(FieldEveningOrder, v)) -} - -// EveningOrderGTE applies the GTE predicate on the "evening_order" field. -func EveningOrderGTE(v int) predicate.Station { - return predicate.Station(sql.FieldGTE(FieldEveningOrder, v)) -} - -// EveningOrderLT applies the LT predicate on the "evening_order" field. -func EveningOrderLT(v int) predicate.Station { - return predicate.Station(sql.FieldLT(FieldEveningOrder, v)) -} - -// EveningOrderLTE applies the LTE predicate on the "evening_order" field. -func EveningOrderLTE(v int) predicate.Station { - return predicate.Station(sql.FieldLTE(FieldEveningOrder, v)) -} - // CreatedAtEQ applies the EQ predicate on the "created_at" field. func CreatedAtEQ(v time.Time) predicate.Station { return predicate.Station(sql.FieldEQ(FieldCreatedAt, v)) @@ -392,6 +302,98 @@ func HasBusWith(preds ...predicate.Bus) predicate.Station { }) } +// HasMorningPreviousStation applies the HasEdge predicate on the "morning_previous_station" edge. +func HasMorningPreviousStation() predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, MorningPreviousStationTable, MorningPreviousStationColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasMorningPreviousStationWith applies the HasEdge predicate on the "morning_previous_station" edge with a given conditions (other predicates). +func HasMorningPreviousStationWith(preds ...predicate.Station) predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := newMorningPreviousStationStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasMorningNextStation applies the HasEdge predicate on the "morning_next_station" edge. +func HasMorningNextStation() predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, MorningNextStationTable, MorningNextStationColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasMorningNextStationWith applies the HasEdge predicate on the "morning_next_station" edge with a given conditions (other predicates). +func HasMorningNextStationWith(preds ...predicate.Station) predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := newMorningNextStationStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasEveningPreviousStation applies the HasEdge predicate on the "evening_previous_station" edge. +func HasEveningPreviousStation() predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, EveningPreviousStationTable, EveningPreviousStationColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasEveningPreviousStationWith applies the HasEdge predicate on the "evening_previous_station" edge with a given conditions (other predicates). +func HasEveningPreviousStationWith(preds ...predicate.Station) predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := newEveningPreviousStationStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasEveningNextStation applies the HasEdge predicate on the "evening_next_station" edge. +func HasEveningNextStation() predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, EveningNextStationTable, EveningNextStationColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasEveningNextStationWith applies the HasEdge predicate on the "evening_next_station" edge with a given conditions (other predicates). +func HasEveningNextStationWith(preds ...predicate.Station) predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := newEveningNextStationStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + // And groups predicates with the AND operator between them. func And(predicates ...predicate.Station) predicate.Station { return predicate.Station(sql.AndPredicates(predicates...)) diff --git a/backend/domain/repository/ent/station_create.go b/backend/domain/repository/ent/station_create.go index f98a53b7..039d2fd0 100644 --- a/backend/domain/repository/ent/station_create.go +++ b/backend/domain/repository/ent/station_create.go @@ -51,18 +51,6 @@ func (sc *StationCreate) SetNillableLongitude(f *float64) *StationCreate { return sc } -// SetMorningOrder sets the "morning_order" field. -func (sc *StationCreate) SetMorningOrder(i int) *StationCreate { - sc.mutation.SetMorningOrder(i) - return sc -} - -// SetEveningOrder sets the "evening_order" field. -func (sc *StationCreate) SetEveningOrder(i int) *StationCreate { - sc.mutation.SetEveningOrder(i) - return sc -} - // SetCreatedAt sets the "created_at" field. func (sc *StationCreate) SetCreatedAt(t time.Time) *StationCreate { sc.mutation.SetCreatedAt(t) @@ -139,6 +127,74 @@ func (sc *StationCreate) AddBus(b ...*Bus) *StationCreate { return sc.AddBuIDs(ids...) } +// SetMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID. +func (sc *StationCreate) SetMorningPreviousStationID(id uuid.UUID) *StationCreate { + sc.mutation.SetMorningPreviousStationID(id) + return sc +} + +// SetNillableMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID if the given value is not nil. +func (sc *StationCreate) SetNillableMorningPreviousStationID(id *uuid.UUID) *StationCreate { + if id != nil { + sc = sc.SetMorningPreviousStationID(*id) + } + return sc +} + +// SetMorningPreviousStation sets the "morning_previous_station" edge to the Station entity. +func (sc *StationCreate) SetMorningPreviousStation(s *Station) *StationCreate { + return sc.SetMorningPreviousStationID(s.ID) +} + +// AddMorningNextStationIDs adds the "morning_next_station" edge to the Station entity by IDs. +func (sc *StationCreate) AddMorningNextStationIDs(ids ...uuid.UUID) *StationCreate { + sc.mutation.AddMorningNextStationIDs(ids...) + return sc +} + +// AddMorningNextStation adds the "morning_next_station" edges to the Station entity. +func (sc *StationCreate) AddMorningNextStation(s ...*Station) *StationCreate { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return sc.AddMorningNextStationIDs(ids...) +} + +// SetEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID. +func (sc *StationCreate) SetEveningPreviousStationID(id uuid.UUID) *StationCreate { + sc.mutation.SetEveningPreviousStationID(id) + return sc +} + +// SetNillableEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID if the given value is not nil. +func (sc *StationCreate) SetNillableEveningPreviousStationID(id *uuid.UUID) *StationCreate { + if id != nil { + sc = sc.SetEveningPreviousStationID(*id) + } + return sc +} + +// SetEveningPreviousStation sets the "evening_previous_station" edge to the Station entity. +func (sc *StationCreate) SetEveningPreviousStation(s *Station) *StationCreate { + return sc.SetEveningPreviousStationID(s.ID) +} + +// AddEveningNextStationIDs adds the "evening_next_station" edge to the Station entity by IDs. +func (sc *StationCreate) AddEveningNextStationIDs(ids ...uuid.UUID) *StationCreate { + sc.mutation.AddEveningNextStationIDs(ids...) + return sc +} + +// AddEveningNextStation adds the "evening_next_station" edges to the Station entity. +func (sc *StationCreate) AddEveningNextStation(s ...*Station) *StationCreate { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return sc.AddEveningNextStationIDs(ids...) +} + // Mutation returns the StationMutation object of the builder. func (sc *StationCreate) Mutation() *StationMutation { return sc.mutation @@ -190,12 +246,6 @@ func (sc *StationCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (sc *StationCreate) check() error { - if _, ok := sc.mutation.MorningOrder(); !ok { - return &ValidationError{Name: "morning_order", err: errors.New(`ent: missing required field "Station.morning_order"`)} - } - if _, ok := sc.mutation.EveningOrder(); !ok { - return &ValidationError{Name: "evening_order", err: errors.New(`ent: missing required field "Station.evening_order"`)} - } if _, ok := sc.mutation.CreatedAt(); !ok { return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Station.created_at"`)} } @@ -245,14 +295,6 @@ func (sc *StationCreate) createSpec() (*Station, *sqlgraph.CreateSpec) { _spec.SetField(station.FieldLongitude, field.TypeFloat64, value) _node.Longitude = value } - if value, ok := sc.mutation.MorningOrder(); ok { - _spec.SetField(station.FieldMorningOrder, field.TypeInt, value) - _node.MorningOrder = value - } - if value, ok := sc.mutation.EveningOrder(); ok { - _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) - _node.EveningOrder = value - } if value, ok := sc.mutation.CreatedAt(); ok { _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) _node.CreatedAt = value @@ -294,6 +336,72 @@ func (sc *StationCreate) createSpec() (*Station, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } + if nodes := sc.mutation.MorningPreviousStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: station.MorningPreviousStationTable, + Columns: []string{station.MorningPreviousStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.station_morning_next_station = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := sc.mutation.MorningNextStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.MorningNextStationTable, + Columns: []string{station.MorningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := sc.mutation.EveningPreviousStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: station.EveningPreviousStationTable, + Columns: []string{station.EveningPreviousStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.station_evening_next_station = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := sc.mutation.EveningNextStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.EveningNextStationTable, + Columns: []string{station.EveningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } return _node, _spec } diff --git a/backend/domain/repository/ent/station_query.go b/backend/domain/repository/ent/station_query.go index 40d3a8b5..c2b5ca0e 100644 --- a/backend/domain/repository/ent/station_query.go +++ b/backend/domain/repository/ent/station_query.go @@ -21,13 +21,17 @@ import ( // StationQuery is the builder for querying Station entities. type StationQuery struct { config - ctx *QueryContext - order []station.OrderOption - inters []Interceptor - predicates []predicate.Station - withGuardian *GuardianQuery - withBus *BusQuery - withFKs bool + ctx *QueryContext + order []station.OrderOption + inters []Interceptor + predicates []predicate.Station + withGuardian *GuardianQuery + withBus *BusQuery + withMorningPreviousStation *StationQuery + withMorningNextStation *StationQuery + withEveningPreviousStation *StationQuery + withEveningNextStation *StationQuery + withFKs bool // intermediate query (i.e. traversal path). sql *sql.Selector path func(context.Context) (*sql.Selector, error) @@ -108,6 +112,94 @@ func (sq *StationQuery) QueryBus() *BusQuery { return query } +// QueryMorningPreviousStation chains the current query on the "morning_previous_station" edge. +func (sq *StationQuery) QueryMorningPreviousStation() *StationQuery { + query := (&StationClient{config: sq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := sq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := sq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, selector), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, station.MorningPreviousStationTable, station.MorningPreviousStationColumn), + ) + fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryMorningNextStation chains the current query on the "morning_next_station" edge. +func (sq *StationQuery) QueryMorningNextStation() *StationQuery { + query := (&StationClient{config: sq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := sq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := sq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, selector), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, station.MorningNextStationTable, station.MorningNextStationColumn), + ) + fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryEveningPreviousStation chains the current query on the "evening_previous_station" edge. +func (sq *StationQuery) QueryEveningPreviousStation() *StationQuery { + query := (&StationClient{config: sq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := sq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := sq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, selector), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, station.EveningPreviousStationTable, station.EveningPreviousStationColumn), + ) + fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryEveningNextStation chains the current query on the "evening_next_station" edge. +func (sq *StationQuery) QueryEveningNextStation() *StationQuery { + query := (&StationClient{config: sq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := sq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := sq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, selector), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, station.EveningNextStationTable, station.EveningNextStationColumn), + ) + fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) + return fromU, nil + } + return query +} + // First returns the first Station entity from the query. // Returns a *NotFoundError when no Station was found. func (sq *StationQuery) First(ctx context.Context) (*Station, error) { @@ -295,13 +387,17 @@ func (sq *StationQuery) Clone() *StationQuery { return nil } return &StationQuery{ - config: sq.config, - ctx: sq.ctx.Clone(), - order: append([]station.OrderOption{}, sq.order...), - inters: append([]Interceptor{}, sq.inters...), - predicates: append([]predicate.Station{}, sq.predicates...), - withGuardian: sq.withGuardian.Clone(), - withBus: sq.withBus.Clone(), + config: sq.config, + ctx: sq.ctx.Clone(), + order: append([]station.OrderOption{}, sq.order...), + inters: append([]Interceptor{}, sq.inters...), + predicates: append([]predicate.Station{}, sq.predicates...), + withGuardian: sq.withGuardian.Clone(), + withBus: sq.withBus.Clone(), + withMorningPreviousStation: sq.withMorningPreviousStation.Clone(), + withMorningNextStation: sq.withMorningNextStation.Clone(), + withEveningPreviousStation: sq.withEveningPreviousStation.Clone(), + withEveningNextStation: sq.withEveningNextStation.Clone(), // clone intermediate query. sql: sq.sql.Clone(), path: sq.path, @@ -330,6 +426,50 @@ func (sq *StationQuery) WithBus(opts ...func(*BusQuery)) *StationQuery { return sq } +// WithMorningPreviousStation tells the query-builder to eager-load the nodes that are connected to +// the "morning_previous_station" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithMorningPreviousStation(opts ...func(*StationQuery)) *StationQuery { + query := (&StationClient{config: sq.config}).Query() + for _, opt := range opts { + opt(query) + } + sq.withMorningPreviousStation = query + return sq +} + +// WithMorningNextStation tells the query-builder to eager-load the nodes that are connected to +// the "morning_next_station" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithMorningNextStation(opts ...func(*StationQuery)) *StationQuery { + query := (&StationClient{config: sq.config}).Query() + for _, opt := range opts { + opt(query) + } + sq.withMorningNextStation = query + return sq +} + +// WithEveningPreviousStation tells the query-builder to eager-load the nodes that are connected to +// the "evening_previous_station" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithEveningPreviousStation(opts ...func(*StationQuery)) *StationQuery { + query := (&StationClient{config: sq.config}).Query() + for _, opt := range opts { + opt(query) + } + sq.withEveningPreviousStation = query + return sq +} + +// WithEveningNextStation tells the query-builder to eager-load the nodes that are connected to +// the "evening_next_station" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithEveningNextStation(opts ...func(*StationQuery)) *StationQuery { + query := (&StationClient{config: sq.config}).Query() + for _, opt := range opts { + opt(query) + } + sq.withEveningNextStation = query + return sq +} + // GroupBy is used to group vertices by one or more fields/columns. // It is often used with aggregate functions, like: count, max, mean, min, sum. // @@ -409,12 +549,16 @@ func (sq *StationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Stat nodes = []*Station{} withFKs = sq.withFKs _spec = sq.querySpec() - loadedTypes = [2]bool{ + loadedTypes = [6]bool{ sq.withGuardian != nil, sq.withBus != nil, + sq.withMorningPreviousStation != nil, + sq.withMorningNextStation != nil, + sq.withEveningPreviousStation != nil, + sq.withEveningNextStation != nil, } ) - if sq.withGuardian != nil { + if sq.withGuardian != nil || sq.withMorningPreviousStation != nil || sq.withEveningPreviousStation != nil { withFKs = true } if withFKs { @@ -451,6 +595,32 @@ func (sq *StationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Stat return nil, err } } + if query := sq.withMorningPreviousStation; query != nil { + if err := sq.loadMorningPreviousStation(ctx, query, nodes, nil, + func(n *Station, e *Station) { n.Edges.MorningPreviousStation = e }); err != nil { + return nil, err + } + } + if query := sq.withMorningNextStation; query != nil { + if err := sq.loadMorningNextStation(ctx, query, nodes, + func(n *Station) { n.Edges.MorningNextStation = []*Station{} }, + func(n *Station, e *Station) { n.Edges.MorningNextStation = append(n.Edges.MorningNextStation, e) }); err != nil { + return nil, err + } + } + if query := sq.withEveningPreviousStation; query != nil { + if err := sq.loadEveningPreviousStation(ctx, query, nodes, nil, + func(n *Station, e *Station) { n.Edges.EveningPreviousStation = e }); err != nil { + return nil, err + } + } + if query := sq.withEveningNextStation; query != nil { + if err := sq.loadEveningNextStation(ctx, query, nodes, + func(n *Station) { n.Edges.EveningNextStation = []*Station{} }, + func(n *Station, e *Station) { n.Edges.EveningNextStation = append(n.Edges.EveningNextStation, e) }); err != nil { + return nil, err + } + } return nodes, nil } @@ -547,6 +717,132 @@ func (sq *StationQuery) loadBus(ctx context.Context, query *BusQuery, nodes []*S } return nil } +func (sq *StationQuery) loadMorningPreviousStation(ctx context.Context, query *StationQuery, nodes []*Station, init func(*Station), assign func(*Station, *Station)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Station) + for i := range nodes { + if nodes[i].station_morning_next_station == nil { + continue + } + fk := *nodes[i].station_morning_next_station + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(station.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "station_morning_next_station" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (sq *StationQuery) loadMorningNextStation(ctx context.Context, query *StationQuery, nodes []*Station, init func(*Station), assign func(*Station, *Station)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Station) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Station(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(station.MorningNextStationColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.station_morning_next_station + if fk == nil { + return fmt.Errorf(`foreign-key "station_morning_next_station" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "station_morning_next_station" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} +func (sq *StationQuery) loadEveningPreviousStation(ctx context.Context, query *StationQuery, nodes []*Station, init func(*Station), assign func(*Station, *Station)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Station) + for i := range nodes { + if nodes[i].station_evening_next_station == nil { + continue + } + fk := *nodes[i].station_evening_next_station + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(station.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "station_evening_next_station" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (sq *StationQuery) loadEveningNextStation(ctx context.Context, query *StationQuery, nodes []*Station, init func(*Station), assign func(*Station, *Station)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Station) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Station(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(station.EveningNextStationColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.station_evening_next_station + if fk == nil { + return fmt.Errorf(`foreign-key "station_evening_next_station" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "station_evening_next_station" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} func (sq *StationQuery) sqlCount(ctx context.Context) (int, error) { _spec := sq.querySpec() diff --git a/backend/domain/repository/ent/station_update.go b/backend/domain/repository/ent/station_update.go index d3fc2669..71db6690 100644 --- a/backend/domain/repository/ent/station_update.go +++ b/backend/domain/repository/ent/station_update.go @@ -85,48 +85,6 @@ func (su *StationUpdate) ClearLongitude() *StationUpdate { return su } -// SetMorningOrder sets the "morning_order" field. -func (su *StationUpdate) SetMorningOrder(i int) *StationUpdate { - su.mutation.ResetMorningOrder() - su.mutation.SetMorningOrder(i) - return su -} - -// SetNillableMorningOrder sets the "morning_order" field if the given value is not nil. -func (su *StationUpdate) SetNillableMorningOrder(i *int) *StationUpdate { - if i != nil { - su.SetMorningOrder(*i) - } - return su -} - -// AddMorningOrder adds i to the "morning_order" field. -func (su *StationUpdate) AddMorningOrder(i int) *StationUpdate { - su.mutation.AddMorningOrder(i) - return su -} - -// SetEveningOrder sets the "evening_order" field. -func (su *StationUpdate) SetEveningOrder(i int) *StationUpdate { - su.mutation.ResetEveningOrder() - su.mutation.SetEveningOrder(i) - return su -} - -// SetNillableEveningOrder sets the "evening_order" field if the given value is not nil. -func (su *StationUpdate) SetNillableEveningOrder(i *int) *StationUpdate { - if i != nil { - su.SetEveningOrder(*i) - } - return su -} - -// AddEveningOrder adds i to the "evening_order" field. -func (su *StationUpdate) AddEveningOrder(i int) *StationUpdate { - su.mutation.AddEveningOrder(i) - return su -} - // SetCreatedAt sets the "created_at" field. func (su *StationUpdate) SetCreatedAt(t time.Time) *StationUpdate { su.mutation.SetCreatedAt(t) @@ -181,6 +139,74 @@ func (su *StationUpdate) AddBus(b ...*Bus) *StationUpdate { return su.AddBuIDs(ids...) } +// SetMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID. +func (su *StationUpdate) SetMorningPreviousStationID(id uuid.UUID) *StationUpdate { + su.mutation.SetMorningPreviousStationID(id) + return su +} + +// SetNillableMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID if the given value is not nil. +func (su *StationUpdate) SetNillableMorningPreviousStationID(id *uuid.UUID) *StationUpdate { + if id != nil { + su = su.SetMorningPreviousStationID(*id) + } + return su +} + +// SetMorningPreviousStation sets the "morning_previous_station" edge to the Station entity. +func (su *StationUpdate) SetMorningPreviousStation(s *Station) *StationUpdate { + return su.SetMorningPreviousStationID(s.ID) +} + +// AddMorningNextStationIDs adds the "morning_next_station" edge to the Station entity by IDs. +func (su *StationUpdate) AddMorningNextStationIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.AddMorningNextStationIDs(ids...) + return su +} + +// AddMorningNextStation adds the "morning_next_station" edges to the Station entity. +func (su *StationUpdate) AddMorningNextStation(s ...*Station) *StationUpdate { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return su.AddMorningNextStationIDs(ids...) +} + +// SetEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID. +func (su *StationUpdate) SetEveningPreviousStationID(id uuid.UUID) *StationUpdate { + su.mutation.SetEveningPreviousStationID(id) + return su +} + +// SetNillableEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID if the given value is not nil. +func (su *StationUpdate) SetNillableEveningPreviousStationID(id *uuid.UUID) *StationUpdate { + if id != nil { + su = su.SetEveningPreviousStationID(*id) + } + return su +} + +// SetEveningPreviousStation sets the "evening_previous_station" edge to the Station entity. +func (su *StationUpdate) SetEveningPreviousStation(s *Station) *StationUpdate { + return su.SetEveningPreviousStationID(s.ID) +} + +// AddEveningNextStationIDs adds the "evening_next_station" edge to the Station entity by IDs. +func (su *StationUpdate) AddEveningNextStationIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.AddEveningNextStationIDs(ids...) + return su +} + +// AddEveningNextStation adds the "evening_next_station" edges to the Station entity. +func (su *StationUpdate) AddEveningNextStation(s ...*Station) *StationUpdate { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return su.AddEveningNextStationIDs(ids...) +} + // Mutation returns the StationMutation object of the builder. func (su *StationUpdate) Mutation() *StationMutation { return su.mutation @@ -213,6 +239,60 @@ func (su *StationUpdate) RemoveBus(b ...*Bus) *StationUpdate { return su.RemoveBuIDs(ids...) } +// ClearMorningPreviousStation clears the "morning_previous_station" edge to the Station entity. +func (su *StationUpdate) ClearMorningPreviousStation() *StationUpdate { + su.mutation.ClearMorningPreviousStation() + return su +} + +// ClearMorningNextStation clears all "morning_next_station" edges to the Station entity. +func (su *StationUpdate) ClearMorningNextStation() *StationUpdate { + su.mutation.ClearMorningNextStation() + return su +} + +// RemoveMorningNextStationIDs removes the "morning_next_station" edge to Station entities by IDs. +func (su *StationUpdate) RemoveMorningNextStationIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.RemoveMorningNextStationIDs(ids...) + return su +} + +// RemoveMorningNextStation removes "morning_next_station" edges to Station entities. +func (su *StationUpdate) RemoveMorningNextStation(s ...*Station) *StationUpdate { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return su.RemoveMorningNextStationIDs(ids...) +} + +// ClearEveningPreviousStation clears the "evening_previous_station" edge to the Station entity. +func (su *StationUpdate) ClearEveningPreviousStation() *StationUpdate { + su.mutation.ClearEveningPreviousStation() + return su +} + +// ClearEveningNextStation clears all "evening_next_station" edges to the Station entity. +func (su *StationUpdate) ClearEveningNextStation() *StationUpdate { + su.mutation.ClearEveningNextStation() + return su +} + +// RemoveEveningNextStationIDs removes the "evening_next_station" edge to Station entities by IDs. +func (su *StationUpdate) RemoveEveningNextStationIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.RemoveEveningNextStationIDs(ids...) + return su +} + +// RemoveEveningNextStation removes "evening_next_station" edges to Station entities. +func (su *StationUpdate) RemoveEveningNextStation(s ...*Station) *StationUpdate { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return su.RemoveEveningNextStationIDs(ids...) +} + // Save executes the query and returns the number of nodes affected by the update operation. func (su *StationUpdate) Save(ctx context.Context) (int, error) { su.defaults() @@ -276,18 +356,6 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { if su.mutation.LongitudeCleared() { _spec.ClearField(station.FieldLongitude, field.TypeFloat64) } - if value, ok := su.mutation.MorningOrder(); ok { - _spec.SetField(station.FieldMorningOrder, field.TypeInt, value) - } - if value, ok := su.mutation.AddedMorningOrder(); ok { - _spec.AddField(station.FieldMorningOrder, field.TypeInt, value) - } - if value, ok := su.mutation.EveningOrder(); ok { - _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) - } - if value, ok := su.mutation.AddedEveningOrder(); ok { - _spec.AddField(station.FieldEveningOrder, field.TypeInt, value) - } if value, ok := su.mutation.CreatedAt(); ok { _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) } @@ -368,6 +436,154 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if su.mutation.MorningPreviousStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: station.MorningPreviousStationTable, + Columns: []string{station.MorningPreviousStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.MorningPreviousStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: station.MorningPreviousStationTable, + Columns: []string{station.MorningPreviousStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if su.mutation.MorningNextStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.MorningNextStationTable, + Columns: []string{station.MorningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.RemovedMorningNextStationIDs(); len(nodes) > 0 && !su.mutation.MorningNextStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.MorningNextStationTable, + Columns: []string{station.MorningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.MorningNextStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.MorningNextStationTable, + Columns: []string{station.MorningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if su.mutation.EveningPreviousStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: station.EveningPreviousStationTable, + Columns: []string{station.EveningPreviousStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.EveningPreviousStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: station.EveningPreviousStationTable, + Columns: []string{station.EveningPreviousStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if su.mutation.EveningNextStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.EveningNextStationTable, + Columns: []string{station.EveningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.RemovedEveningNextStationIDs(); len(nodes) > 0 && !su.mutation.EveningNextStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.EveningNextStationTable, + Columns: []string{station.EveningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.EveningNextStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.EveningNextStationTable, + Columns: []string{station.EveningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } if n, err = sqlgraph.UpdateNodes(ctx, su.driver, _spec); err != nil { if _, ok := err.(*sqlgraph.NotFoundError); ok { err = &NotFoundError{station.Label} @@ -442,48 +658,6 @@ func (suo *StationUpdateOne) ClearLongitude() *StationUpdateOne { return suo } -// SetMorningOrder sets the "morning_order" field. -func (suo *StationUpdateOne) SetMorningOrder(i int) *StationUpdateOne { - suo.mutation.ResetMorningOrder() - suo.mutation.SetMorningOrder(i) - return suo -} - -// SetNillableMorningOrder sets the "morning_order" field if the given value is not nil. -func (suo *StationUpdateOne) SetNillableMorningOrder(i *int) *StationUpdateOne { - if i != nil { - suo.SetMorningOrder(*i) - } - return suo -} - -// AddMorningOrder adds i to the "morning_order" field. -func (suo *StationUpdateOne) AddMorningOrder(i int) *StationUpdateOne { - suo.mutation.AddMorningOrder(i) - return suo -} - -// SetEveningOrder sets the "evening_order" field. -func (suo *StationUpdateOne) SetEveningOrder(i int) *StationUpdateOne { - suo.mutation.ResetEveningOrder() - suo.mutation.SetEveningOrder(i) - return suo -} - -// SetNillableEveningOrder sets the "evening_order" field if the given value is not nil. -func (suo *StationUpdateOne) SetNillableEveningOrder(i *int) *StationUpdateOne { - if i != nil { - suo.SetEveningOrder(*i) - } - return suo -} - -// AddEveningOrder adds i to the "evening_order" field. -func (suo *StationUpdateOne) AddEveningOrder(i int) *StationUpdateOne { - suo.mutation.AddEveningOrder(i) - return suo -} - // SetCreatedAt sets the "created_at" field. func (suo *StationUpdateOne) SetCreatedAt(t time.Time) *StationUpdateOne { suo.mutation.SetCreatedAt(t) @@ -538,6 +712,74 @@ func (suo *StationUpdateOne) AddBus(b ...*Bus) *StationUpdateOne { return suo.AddBuIDs(ids...) } +// SetMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID. +func (suo *StationUpdateOne) SetMorningPreviousStationID(id uuid.UUID) *StationUpdateOne { + suo.mutation.SetMorningPreviousStationID(id) + return suo +} + +// SetNillableMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID if the given value is not nil. +func (suo *StationUpdateOne) SetNillableMorningPreviousStationID(id *uuid.UUID) *StationUpdateOne { + if id != nil { + suo = suo.SetMorningPreviousStationID(*id) + } + return suo +} + +// SetMorningPreviousStation sets the "morning_previous_station" edge to the Station entity. +func (suo *StationUpdateOne) SetMorningPreviousStation(s *Station) *StationUpdateOne { + return suo.SetMorningPreviousStationID(s.ID) +} + +// AddMorningNextStationIDs adds the "morning_next_station" edge to the Station entity by IDs. +func (suo *StationUpdateOne) AddMorningNextStationIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.AddMorningNextStationIDs(ids...) + return suo +} + +// AddMorningNextStation adds the "morning_next_station" edges to the Station entity. +func (suo *StationUpdateOne) AddMorningNextStation(s ...*Station) *StationUpdateOne { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return suo.AddMorningNextStationIDs(ids...) +} + +// SetEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID. +func (suo *StationUpdateOne) SetEveningPreviousStationID(id uuid.UUID) *StationUpdateOne { + suo.mutation.SetEveningPreviousStationID(id) + return suo +} + +// SetNillableEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID if the given value is not nil. +func (suo *StationUpdateOne) SetNillableEveningPreviousStationID(id *uuid.UUID) *StationUpdateOne { + if id != nil { + suo = suo.SetEveningPreviousStationID(*id) + } + return suo +} + +// SetEveningPreviousStation sets the "evening_previous_station" edge to the Station entity. +func (suo *StationUpdateOne) SetEveningPreviousStation(s *Station) *StationUpdateOne { + return suo.SetEveningPreviousStationID(s.ID) +} + +// AddEveningNextStationIDs adds the "evening_next_station" edge to the Station entity by IDs. +func (suo *StationUpdateOne) AddEveningNextStationIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.AddEveningNextStationIDs(ids...) + return suo +} + +// AddEveningNextStation adds the "evening_next_station" edges to the Station entity. +func (suo *StationUpdateOne) AddEveningNextStation(s ...*Station) *StationUpdateOne { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return suo.AddEveningNextStationIDs(ids...) +} + // Mutation returns the StationMutation object of the builder. func (suo *StationUpdateOne) Mutation() *StationMutation { return suo.mutation @@ -570,6 +812,60 @@ func (suo *StationUpdateOne) RemoveBus(b ...*Bus) *StationUpdateOne { return suo.RemoveBuIDs(ids...) } +// ClearMorningPreviousStation clears the "morning_previous_station" edge to the Station entity. +func (suo *StationUpdateOne) ClearMorningPreviousStation() *StationUpdateOne { + suo.mutation.ClearMorningPreviousStation() + return suo +} + +// ClearMorningNextStation clears all "morning_next_station" edges to the Station entity. +func (suo *StationUpdateOne) ClearMorningNextStation() *StationUpdateOne { + suo.mutation.ClearMorningNextStation() + return suo +} + +// RemoveMorningNextStationIDs removes the "morning_next_station" edge to Station entities by IDs. +func (suo *StationUpdateOne) RemoveMorningNextStationIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.RemoveMorningNextStationIDs(ids...) + return suo +} + +// RemoveMorningNextStation removes "morning_next_station" edges to Station entities. +func (suo *StationUpdateOne) RemoveMorningNextStation(s ...*Station) *StationUpdateOne { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return suo.RemoveMorningNextStationIDs(ids...) +} + +// ClearEveningPreviousStation clears the "evening_previous_station" edge to the Station entity. +func (suo *StationUpdateOne) ClearEveningPreviousStation() *StationUpdateOne { + suo.mutation.ClearEveningPreviousStation() + return suo +} + +// ClearEveningNextStation clears all "evening_next_station" edges to the Station entity. +func (suo *StationUpdateOne) ClearEveningNextStation() *StationUpdateOne { + suo.mutation.ClearEveningNextStation() + return suo +} + +// RemoveEveningNextStationIDs removes the "evening_next_station" edge to Station entities by IDs. +func (suo *StationUpdateOne) RemoveEveningNextStationIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.RemoveEveningNextStationIDs(ids...) + return suo +} + +// RemoveEveningNextStation removes "evening_next_station" edges to Station entities. +func (suo *StationUpdateOne) RemoveEveningNextStation(s ...*Station) *StationUpdateOne { + ids := make([]uuid.UUID, len(s)) + for i := range s { + ids[i] = s[i].ID + } + return suo.RemoveEveningNextStationIDs(ids...) +} + // Where appends a list predicates to the StationUpdate builder. func (suo *StationUpdateOne) Where(ps ...predicate.Station) *StationUpdateOne { suo.mutation.Where(ps...) @@ -663,18 +959,6 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e if suo.mutation.LongitudeCleared() { _spec.ClearField(station.FieldLongitude, field.TypeFloat64) } - if value, ok := suo.mutation.MorningOrder(); ok { - _spec.SetField(station.FieldMorningOrder, field.TypeInt, value) - } - if value, ok := suo.mutation.AddedMorningOrder(); ok { - _spec.AddField(station.FieldMorningOrder, field.TypeInt, value) - } - if value, ok := suo.mutation.EveningOrder(); ok { - _spec.SetField(station.FieldEveningOrder, field.TypeInt, value) - } - if value, ok := suo.mutation.AddedEveningOrder(); ok { - _spec.AddField(station.FieldEveningOrder, field.TypeInt, value) - } if value, ok := suo.mutation.CreatedAt(); ok { _spec.SetField(station.FieldCreatedAt, field.TypeTime, value) } @@ -755,6 +1039,154 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if suo.mutation.MorningPreviousStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: station.MorningPreviousStationTable, + Columns: []string{station.MorningPreviousStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.MorningPreviousStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: station.MorningPreviousStationTable, + Columns: []string{station.MorningPreviousStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if suo.mutation.MorningNextStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.MorningNextStationTable, + Columns: []string{station.MorningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.RemovedMorningNextStationIDs(); len(nodes) > 0 && !suo.mutation.MorningNextStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.MorningNextStationTable, + Columns: []string{station.MorningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.MorningNextStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.MorningNextStationTable, + Columns: []string{station.MorningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if suo.mutation.EveningPreviousStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: station.EveningPreviousStationTable, + Columns: []string{station.EveningPreviousStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.EveningPreviousStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: station.EveningPreviousStationTable, + Columns: []string{station.EveningPreviousStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if suo.mutation.EveningNextStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.EveningNextStationTable, + Columns: []string{station.EveningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.RemovedEveningNextStationIDs(); len(nodes) > 0 && !suo.mutation.EveningNextStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.EveningNextStationTable, + Columns: []string{station.EveningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.EveningNextStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: station.EveningNextStationTable, + Columns: []string{station.EveningNextStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } _node = &Station{config: suo.config} _spec.Assign = _node.assignValues _spec.ScanValues = _node.scanValues From 0ff0eaa5c5224996d7b1187d03f9537a8b76caae Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 17:43:15 +0900 Subject: [PATCH 279/771] =?UTF-8?q?chore:TODO=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/daily_page/daily_page.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index 35709e33..06faea96 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -9,11 +9,12 @@ class DailyPage extends StatefulWidget { } class _DailyPageState extends State { - var isBoarding = false; - var hasBag = true; + //TODO: 将来的に真偽値を受け取る + var isBoarding = true; + var hasBag = false; var hasLunchBox = true; var hasWaterBottle = true; - var hasUmbrella = false; + var hasUmbrella = true; @override Widget build(BuildContext context) { @@ -65,7 +66,7 @@ class _DailyPageState extends State { ); } - //TODO: 将来的に表情を受け取る + //TODO: 将来的に表情を受け取り、アイコンを表示する Widget childExpressionIcon() { return const SizedBox( width: 100, @@ -77,7 +78,7 @@ class _DailyPageState extends State { ); } - //将来的に名前を受け取る + //TODO: 将来的に名前を受け取る Widget childName() { return const Text( "園児1", From e147ed4bb92193935b0f9bc536cdd41337310e95 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 18:12:05 +0900 Subject: [PATCH 280/771] =?UTF-8?q?feat:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E4=B8=80=E8=A6=A7=E3=83=9A=E3=83=BC=E3=82=B8=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guardian_list/guardian_list.dart | 39 ++++++++++ .../guardian_list_element.dart | 75 +++++++++++++++++++ .../bus_guardian_manage_page.dart | 60 +++++++++++++++ .../bus_edit_page/bus_edit_page.dart | 5 +- 4 files changed, 177 insertions(+), 2 deletions(-) create mode 100644 frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart create mode 100644 frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/guardian_list_element.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart diff --git a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart new file mode 100644 index 00000000..46cb4674 --- /dev/null +++ b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart @@ -0,0 +1,39 @@ + +import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/guardian_list/guardian_list_element/guardian_list_element.dart'; +import 'package:where_child_bus/pages/student_list_page/student_detail_sheet.dart'; + +class GuardianList extends StatefulWidget { + final List guardianNames; + final List groupNames; + final VoidCallback? callback; + + const GuardianList({ + Key? key, + required this.guardianNames, + required this.groupNames, + this.callback, + }) : super(key: key); + + @override + _GuardiansListState createState() => _GuardiansListState(); +} + +class _GuardiansListState extends State { + @override + Widget build(BuildContext context) { + return ListView.separated( + itemCount: widget.guardianNames.length, + separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), + itemBuilder: (BuildContext context, int index) => guardianListElement(context, index), + ); + } + + Widget guardianListElement(BuildContext context, int index) { + return GuardianListElement( + title: widget.guardianNames[index], + subtitle: widget.groupNames[index], + // imagePath: "assets/images/face_${widget.images[index]}.png", + ); + } +} diff --git a/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/guardian_list_element.dart b/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/guardian_list_element.dart new file mode 100644 index 00000000..c7cb632d --- /dev/null +++ b/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/guardian_list_element.dart @@ -0,0 +1,75 @@ + +import 'package:flutter/material.dart'; + +class GuardianListElement extends StatelessWidget { + final String title; + final String subtitle; + final VoidCallback? onTap; + final Widget? actionButton; + + const GuardianListElement({ + Key? key, + required this.title, + required this.subtitle, + this.onTap, + this.actionButton, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return listElementPadding( + Card( + elevation: 8, + clipBehavior: Clip.antiAliasWithSaveLayer, + child: Material( + color: Colors.white, // Cardの背景色 + child: InkWell( + onTap: onTap, // タップ時のアクション + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + children: [ + // Image.asset(imagePath, width: 100, height: 100), + // const SizedBox(width: 16), + Expanded( + child: titleAndSubTitle(title, subtitle), + ), + if (actionButton != null) actionButton!, // アクションボタンを表示 + ], + ), + ), + ), + ), + ), + ); + } + + Column titleAndSubTitle(String title, String subtitle) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + titleText(title), + subTitleText(subtitle), + ], + ); + } + + Text titleText(String title) { + return Text( + title, + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold) + ); + } + + Text subTitleText(String subtitle) { + return Text(subtitle); + } + + Padding listElementPadding(Widget child) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: child, + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart new file mode 100644 index 00000000..e1c1909d --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -0,0 +1,60 @@ +import "package:flutter/material.dart"; +import "package:where_child_bus/components/guardian_list/guardian_list.dart"; +import "package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart"; + +class BusGuardianManagePage extends StatefulWidget { + @override + _BusGuardianManagePageState createState() => _BusGuardianManagePageState(); +} + +class _BusGuardianManagePageState extends State { + // サンプルデータのリスト + final List guardianNames = ['保護者1', '保護者2', '保護者3']; + final List groupNames = ['グループA', 'グループB', 'グループC']; + + @override + Widget build(BuildContext context) { + return DefaultTabController( + length: 2, + child: Scaffold( + appBar: pageAppBar(), + body: pageBody(), + ), + ); + } + + AppBar pageAppBar() { + return AppBar( + bottom : const TabBar( + tabs: [ + Tab(text: "昼",), + Tab(text: "夜",), + ], + ) + ); + } + + Widget pageBody() { + return Column( + children: [ + Expanded( + child: TabBarView( + children: [ + morningGuardianList(), + eveningGuardianList(), + ], + ), + ), + ConfirmButton(buttonText: "保存"), + ], + ); + } + + Widget morningGuardianList() { + return GuardianList(guardianNames: guardianNames, groupNames: groupNames); + } + + Widget eveningGuardianList() { + return GuardianList(guardianNames: guardianNames, groupNames: groupNames); + } +} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 6ace51ed..154e0114 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; @@ -109,10 +110,10 @@ class _BusEditPage extends State { child: ElevatedButton( onPressed: () { Navigator.push( - context,MaterialPageRoute(builder: (context) => BusChildManagePage()) + context,MaterialPageRoute(builder: (context) => BusGuardianManagePage()) ); }, - child: const Text("バスに乗車する子供を変更"), + child: const Text("バスを利用する保護者を変更"), ), ), ); From f287b3ad56cbda73a3ea120248909df5ef1bcbc0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 18:12:32 +0900 Subject: [PATCH 281/771] =?UTF-8?q?feat:=E3=83=87=E3=83=90=E3=83=83?= =?UTF-8?q?=E3=82=B0=E3=82=82=E3=83=BC=E3=81=A9=E6=99=82=E3=81=AE=E3=81=BF?= =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=82=A2=E3=82=AB=E3=82=A6=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=81=A7=E8=87=AA=E5=8B=95=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/auth_page/auth_page.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index aac9fd9b..373d7467 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -121,9 +121,16 @@ class _AuthPageState extends State { login() async { BuildContext currentContext = context; + NurseryLoginResponse res; try { - NurseryLoginResponse res = await nurseryLogin( - _emailController.text, _passwordController.text); + if(kDebugMode) { + res = await nurseryLogin( + "demo@example.com", "password"); + } else { + res = await nurseryLogin( + _emailController.text, _passwordController.text); + } + if (res.success) { print(res.success); From c83c9bff5ac81ef1aecf03765cd6870c1344c5f6 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 18:47:51 +0900 Subject: [PATCH 282/771] =?UTF-8?q?feat:=E6=95=B0=E5=AD=97=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E3=81=99=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3=E3=82=92?= =?UTF-8?q?=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/util/number_icon.dart | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 frontend/where_child_bus/lib/components/util/number_icon.dart diff --git a/frontend/where_child_bus/lib/components/util/number_icon.dart b/frontend/where_child_bus/lib/components/util/number_icon.dart new file mode 100644 index 00000000..f082e4b4 --- /dev/null +++ b/frontend/where_child_bus/lib/components/util/number_icon.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; + +class NumberIcon extends StatelessWidget { + final int number; // 表示する数字 + final IconData icon; // 使用するアイコン + final Color color; // アイコンの色 + final double size; // アイコンのサイズ + + const NumberIcon({ + Key? key, + required this.number, + this.icon = Icons.circle, // デフォルトのアイコン + this.color = Colors.blue, // デフォルトの色 + this.size = 24.0, // デフォルトのサイズ + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Stack( + alignment: Alignment.center, + children: [ + Icon( + icon, + color: color, + size: size, + ), + Positioned( + right: 0, + child: Container( + padding: const EdgeInsets.all(1), + decoration: BoxDecoration( + color: Colors.red, + borderRadius: BorderRadius.circular(6), + ), + constraints: const BoxConstraints( + minWidth: 12, + minHeight: 12, + ), + child: Text( + '$number', + style: const TextStyle( + color: Colors.white, + fontSize: 8, + ), + textAlign: TextAlign.center, + ), + ), + ), + ], + ); + } +} From 7269ede47375320295d6341548e9bad20bb5fe7e Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 18:54:07 +0900 Subject: [PATCH 283/771] =?UTF-8?q?feat:=20=E3=83=97=E3=83=AD=E3=83=88?= =?UTF-8?q?=E3=82=B3=E3=83=AB=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AE?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=82=92=E3=82=B3=E3=83=9F=E3=83=83=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 124 +++-- .../go/where_child_bus/v1/resources.pb.go | 526 ++++++++++-------- .../go/where_child_bus/v1/station.pb.go | 172 +++--- .../go/where_child_bus/v1/station_grpc.pb.go | 30 +- backend/proto/where_child_bus/v1/bus.proto | 3 +- .../proto/where_child_bus/v1/guardian.proto | 2 +- .../proto/where_child_bus/v1/nursery.proto | 10 +- .../proto/where_child_bus/v1/resources.proto | 55 +- .../proto/where_child_bus/v1/station.proto | 12 +- .../proto-gen/where_child_bus/v1/bus.pb.dart | 18 +- .../where_child_bus/v1/bus.pbjson.dart | 8 +- .../where_child_bus/v1/resources.pb.dart | 436 ++++++++------- .../where_child_bus/v1/resources.pbjson.dart | 123 ++-- .../where_child_bus/v1/station.pb.dart | 68 +-- .../where_child_bus/v1/station.pbgrpc.dart | 28 +- .../where_child_bus/v1/station.pbjson.dart | 30 +- .../proto-gen/where_child_bus/v1/bus_pb2.py | 20 +- .../proto-gen/where_child_bus/v1/bus_pb2.pyi | 10 +- .../where_child_bus/v1/resources_pb2.py | 56 +- .../where_child_bus/v1/resources_pb2.pyi | 58 +- .../where_child_bus/v1/station_pb2.py | 22 +- .../where_child_bus/v1/station_pb2.pyi | 12 +- .../where_child_bus/v1/station_pb2_grpc.py | 26 +- 23 files changed, 984 insertions(+), 865 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 9fb0a92a..914681ce 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -25,10 +25,11 @@ type CreateBusRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - PlateNumber string `protobuf:"bytes,3,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` - ChildIds []string `protobuf:"bytes,4,rep,name=child_ids,json=childIds,proto3" json:"child_ids,omitempty"` + NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + PlateNumber string `protobuf:"bytes,3,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` + MorningGuardianIds []string `protobuf:"bytes,4,rep,name=morning_guardian_ids,json=morningGuardianIds,proto3" json:"morning_guardian_ids,omitempty"` + EveningGuardianIds []string `protobuf:"bytes,5,rep,name=evening_guardian_ids,json=eveningGuardianIds,proto3" json:"evening_guardian_ids,omitempty"` } func (x *CreateBusRequest) Reset() { @@ -84,9 +85,16 @@ func (x *CreateBusRequest) GetPlateNumber() string { return "" } -func (x *CreateBusRequest) GetChildIds() []string { +func (x *CreateBusRequest) GetMorningGuardianIds() []string { if x != nil { - return x.ChildIds + return x.MorningGuardianIds + } + return nil +} + +func (x *CreateBusRequest) GetEveningGuardianIds() []string { + if x != nil { + return x.EveningGuardianIds } return nil } @@ -248,62 +256,66 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0x75, - 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x12, 0x35, - 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x65, 0x73, 0x32, 0xe4, 0x01, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, - 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xeb, 0x01, 0x0a, 0x16, - 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, - 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, - 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, - 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, - 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x72, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x12, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x75, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, + 0x52, 0x03, 0x62, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x3d, 0x0a, 0x1c, + 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, + 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, + 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x32, 0xe4, 0x01, 0x0a, 0x0a, + 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, + 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 47ed9d2d..987fcb19 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -179,15 +179,15 @@ type Nursery struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryCode string `protobuf:"bytes,2,opt,name=nursery_code,json=nurseryCode,proto3" json:"nursery_code,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` - PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` - EncryptedPassword string `protobuf:"bytes,7,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryCode string `protobuf:"bytes,2,opt,name=nursery_code,json=nurseryCode,proto3" json:"nursery_code,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` + HashedPassword string `protobuf:"bytes,7,opt,name=hashed_password,json=hashedPassword,proto3" json:"hashed_password,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *Nursery) Reset() { @@ -264,9 +264,9 @@ func (x *Nursery) GetEmail() string { return "" } -func (x *Nursery) GetEncryptedPassword() string { +func (x *Nursery) GetHashedPassword() string { if x != nil { - return x.EncryptedPassword + return x.HashedPassword } return "" } @@ -394,14 +394,16 @@ type Guardian struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` - PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - EncryptedPassword string `protobuf:"bytes,6,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + HashedPassword string `protobuf:"bytes,6,opt,name=hashed_password,json=hashedPassword,proto3" json:"hashed_password,omitempty"` + IsUseMorningBus bool `protobuf:"varint,7,opt,name=is_use_morning_bus,json=isUseMorningBus,proto3" json:"is_use_morning_bus,omitempty"` + IsUseEveningBus bool `protobuf:"varint,8,opt,name=is_use_evening_bus,json=isUseEveningBus,proto3" json:"is_use_evening_bus,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *Guardian) Reset() { @@ -471,13 +473,27 @@ func (x *Guardian) GetPhoneNumber() string { return "" } -func (x *Guardian) GetEncryptedPassword() string { +func (x *Guardian) GetHashedPassword() string { if x != nil { - return x.EncryptedPassword + return x.HashedPassword } return "" } +func (x *Guardian) GetIsUseMorningBus() bool { + if x != nil { + return x.IsUseMorningBus + } + return false +} + +func (x *Guardian) GetIsUseEveningBus() bool { + if x != nil { + return x.IsUseEveningBus + } + return false +} + func (x *Guardian) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -503,8 +519,10 @@ type GuardianResponse struct { Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` PhoneNumber string `protobuf:"bytes,5,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // ハッシュ化されたパスワードは除外 - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + IsUseMorningBus bool `protobuf:"varint,6,opt,name=is_use_morning_bus,json=isUseMorningBus,proto3" json:"is_use_morning_bus,omitempty"` + IsUseEveningBus bool `protobuf:"varint,7,opt,name=is_use_evening_bus,json=isUseEveningBus,proto3" json:"is_use_evening_bus,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *GuardianResponse) Reset() { @@ -574,6 +592,20 @@ func (x *GuardianResponse) GetPhoneNumber() string { return "" } +func (x *GuardianResponse) GetIsUseMorningBus() bool { + if x != nil { + return x.IsUseMorningBus + } + return false +} + +func (x *GuardianResponse) GetIsUseEveningBus() bool { + if x != nil { + return x.IsUseEveningBus + } + return false +} + func (x *GuardianResponse) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -599,10 +631,11 @@ type Bus struct { PlateNumber string `protobuf:"bytes,4,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` Status Status `protobuf:"varint,5,opt,name=status,proto3,enum=where_child_bus.v1.Status" json:"status,omitempty"` // 緯度経度 - Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` + EnableFaceRecognition bool `protobuf:"varint,8,opt,name=enable_face_recognition,json=enableFaceRecognition,proto3" json:"enable_face_recognition,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *Bus) Reset() { @@ -686,6 +719,13 @@ func (x *Bus) GetLongitude() float64 { return 0 } +func (x *Bus) GetEnableFaceRecognition() bool { + if x != nil { + return x.EnableFaceRecognition + } + return false +} + func (x *Bus) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -711,16 +751,14 @@ type Child struct { Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` Age int32 `protobuf:"varint,5,opt,name=age,proto3" json:"age,omitempty"` Sex Sex `protobuf:"varint,6,opt,name=sex,proto3,enum=where_child_bus.v1.Sex" json:"sex,omitempty"` - IsRideMorningBus bool `protobuf:"varint,7,opt,name=is_ride_morning_bus,json=isRideMorningBus,proto3" json:"is_ride_morning_bus,omitempty"` - IsRideEveningBus bool `protobuf:"varint,8,opt,name=is_ride_evening_bus,json=isRideEveningBus,proto3" json:"is_ride_evening_bus,omitempty"` - CheckForMissingItems bool `protobuf:"varint,9,opt,name=check_for_missing_items,json=checkForMissingItems,proto3" json:"check_for_missing_items,omitempty"` - HasBag bool `protobuf:"varint,10,opt,name=has_bag,json=hasBag,proto3" json:"has_bag,omitempty"` - HasLunchBox bool `protobuf:"varint,11,opt,name=has_lunch_box,json=hasLunchBox,proto3" json:"has_lunch_box,omitempty"` - HasWaterBottle bool `protobuf:"varint,12,opt,name=has_water_bottle,json=hasWaterBottle,proto3" json:"has_water_bottle,omitempty"` - HasUmbrella bool `protobuf:"varint,13,opt,name=has_umbrella,json=hasUmbrella,proto3" json:"has_umbrella,omitempty"` - HasOther bool `protobuf:"varint,14,opt,name=has_other,json=hasOther,proto3" json:"has_other,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + CheckForMissingItems bool `protobuf:"varint,7,opt,name=check_for_missing_items,json=checkForMissingItems,proto3" json:"check_for_missing_items,omitempty"` + HasBag bool `protobuf:"varint,8,opt,name=has_bag,json=hasBag,proto3" json:"has_bag,omitempty"` + HasLunchBox bool `protobuf:"varint,9,opt,name=has_lunch_box,json=hasLunchBox,proto3" json:"has_lunch_box,omitempty"` + HasWaterBottle bool `protobuf:"varint,10,opt,name=has_water_bottle,json=hasWaterBottle,proto3" json:"has_water_bottle,omitempty"` + HasUmbrella bool `protobuf:"varint,11,opt,name=has_umbrella,json=hasUmbrella,proto3" json:"has_umbrella,omitempty"` + HasOther bool `protobuf:"varint,12,opt,name=has_other,json=hasOther,proto3" json:"has_other,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *Child) Reset() { @@ -797,20 +835,6 @@ func (x *Child) GetSex() Sex { return Sex_SEX_UNSPECIFIED } -func (x *Child) GetIsRideMorningBus() bool { - if x != nil { - return x.IsRideMorningBus - } - return false -} - -func (x *Child) GetIsRideEveningBus() bool { - if x != nil { - return x.IsRideEveningBus - } - return false -} - func (x *Child) GetCheckForMissingItems() bool { if x != nil { return x.CheckForMissingItems @@ -872,14 +896,16 @@ type Station struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - GuardianId string `protobuf:"bytes,2,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` - Latitude float64 `protobuf:"fixed64,3,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,4,opt,name=longitude,proto3" json:"longitude,omitempty"` - MorningOrder int32 `protobuf:"varint,5,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` - EveningOrder int32 `protobuf:"varint,6,opt,name=evening_order,json=eveningOrder,proto3" json:"evening_order,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + GuardianId string `protobuf:"bytes,2,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` + MorningNextStationId string `protobuf:"bytes,3,opt,name=morning_next_station_id,json=morningNextStationId,proto3" json:"morning_next_station_id,omitempty"` + EveningNextStationId string `protobuf:"bytes,4,opt,name=evening_next_station_id,json=eveningNextStationId,proto3" json:"evening_next_station_id,omitempty"` + Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` + MorningOrder int32 `protobuf:"varint,7,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` + EveningOrder int32 `protobuf:"varint,8,opt,name=evening_order,json=eveningOrder,proto3" json:"evening_order,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *Station) Reset() { @@ -928,6 +954,20 @@ func (x *Station) GetGuardianId() string { return "" } +func (x *Station) GetMorningNextStationId() string { + if x != nil { + return x.MorningNextStationId + } + return "" +} + +func (x *Station) GetEveningNextStationId() string { + if x != nil { + return x.EveningNextStationId + } + return "" +} + func (x *Station) GetLatitude() float64 { if x != nil { return x.Latitude @@ -1103,8 +1143,6 @@ type ChildPhoto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - S3Bucket string `protobuf:"bytes,3,opt,name=s3_bucket,json=s3Bucket,proto3" json:"s3_bucket,omitempty"` - S3Key string `protobuf:"bytes,4,opt,name=s3_key,json=s3Key,proto3" json:"s3_key,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } @@ -1155,20 +1193,6 @@ func (x *ChildPhoto) GetChildId() string { return "" } -func (x *ChildPhoto) GetS3Bucket() string { - if x != nil { - return x.S3Bucket - } - return "" -} - -func (x *ChildPhoto) GetS3Key() string { - if x != nil { - return x.S3Key - } - return "" -} - func (x *ChildPhoto) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -1270,7 +1294,7 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x02, 0x0a, 0x07, 0x4e, 0x75, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x02, 0x0a, 0x07, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x75, 0x72, @@ -1281,92 +1305,106 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, - 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x27, 0x0a, 0x0f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xa1, + 0x02, 0x0a, 0x0f, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x39, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x22, 0xff, 0x02, 0x0a, 0x08, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x68, + 0x61, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2b, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x6d, + 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0f, 0x69, 0x73, 0x55, 0x73, 0x65, 0x4d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, + 0x73, 0x12, 0x2b, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, + 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, + 0x73, 0x55, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0xa1, 0x02, 0x0a, 0x0f, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x02, 0x0a, 0x08, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x10, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xcf, 0x02, - 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, - 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, - 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x65, 0x64, 0x41, 0x74, 0x22, 0xde, 0x02, 0x0a, 0x10, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x5f, + 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0f, 0x69, 0x73, 0x55, 0x73, 0x65, 0x4d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, + 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x65, 0x76, 0x65, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, + 0x69, 0x73, 0x55, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, + 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x87, 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, + 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, - 0xda, 0x04, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0xfc, 0x03, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, @@ -1376,51 +1414,52 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, - 0x5f, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, - 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x4d, - 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x69, 0x73, 0x5f, - 0x72, 0x69, 0x64, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x73, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x52, 0x69, 0x64, 0x65, 0x45, 0x76, - 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, - 0x65, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, - 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, - 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, - 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, - 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, - 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, - 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, - 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, - 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb4, 0x02, 0x0a, - 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, + 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, + 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, + 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, + 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, + 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, + 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, + 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xa2, + 0x03, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x6d, + 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x6f, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x78, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, + 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, + 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, - 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, @@ -1437,63 +1476,60 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xad, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1b, - 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x73, 0x33, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, - 0x33, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x33, 0x4b, - 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, - 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, - 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, - 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, - 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, - 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, - 0x4e, 0x54, 0x45, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x45, 0x0a, 0x03, 0x53, - 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, - 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, - 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, - 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, - 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, - 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, - 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, - 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, - 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, - 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, - 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, + 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, + 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, + 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, + 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, + 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, + 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, + 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, + 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, + 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index 66fe74a6..b5151868 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -20,18 +20,18 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type CreateStationRequest struct { +type UpdateStationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields GuardianId string `protobuf:"bytes,1,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` - Longtitude float64 `protobuf:"fixed64,2,opt,name=longtitude,proto3" json:"longtitude,omitempty"` + Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"` Latitude float64 `protobuf:"fixed64,3,opt,name=latitude,proto3" json:"latitude,omitempty"` } -func (x *CreateStationRequest) Reset() { - *x = CreateStationRequest{} +func (x *UpdateStationRequest) Reset() { + *x = UpdateStationRequest{} if protoimpl.UnsafeEnabled { mi := &file_where_child_bus_v1_station_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39,13 +39,13 @@ func (x *CreateStationRequest) Reset() { } } -func (x *CreateStationRequest) String() string { +func (x *UpdateStationRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateStationRequest) ProtoMessage() {} +func (*UpdateStationRequest) ProtoMessage() {} -func (x *CreateStationRequest) ProtoReflect() protoreflect.Message { +func (x *UpdateStationRequest) ProtoReflect() protoreflect.Message { mi := &file_where_child_bus_v1_station_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57,33 +57,33 @@ func (x *CreateStationRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateStationRequest.ProtoReflect.Descriptor instead. -func (*CreateStationRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateStationRequest.ProtoReflect.Descriptor instead. +func (*UpdateStationRequest) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{0} } -func (x *CreateStationRequest) GetGuardianId() string { +func (x *UpdateStationRequest) GetGuardianId() string { if x != nil { return x.GuardianId } return "" } -func (x *CreateStationRequest) GetLongtitude() float64 { +func (x *UpdateStationRequest) GetLongitude() float64 { if x != nil { - return x.Longtitude + return x.Longitude } return 0 } -func (x *CreateStationRequest) GetLatitude() float64 { +func (x *UpdateStationRequest) GetLatitude() float64 { if x != nil { return x.Latitude } return 0 } -type CreateStationResponse struct { +type UpdateStationResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -91,8 +91,8 @@ type CreateStationResponse struct { Station *Station `protobuf:"bytes,1,opt,name=station,proto3" json:"station,omitempty"` } -func (x *CreateStationResponse) Reset() { - *x = CreateStationResponse{} +func (x *UpdateStationResponse) Reset() { + *x = UpdateStationResponse{} if protoimpl.UnsafeEnabled { mi := &file_where_child_bus_v1_station_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100,13 +100,13 @@ func (x *CreateStationResponse) Reset() { } } -func (x *CreateStationResponse) String() string { +func (x *UpdateStationResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateStationResponse) ProtoMessage() {} +func (*UpdateStationResponse) ProtoMessage() {} -func (x *CreateStationResponse) ProtoReflect() protoreflect.Message { +func (x *UpdateStationResponse) ProtoReflect() protoreflect.Message { mi := &file_where_child_bus_v1_station_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -118,12 +118,12 @@ func (x *CreateStationResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateStationResponse.ProtoReflect.Descriptor instead. -func (*CreateStationResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateStationResponse.ProtoReflect.Descriptor instead. +func (*UpdateStationResponse) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{1} } -func (x *CreateStationResponse) GetStation() *Station { +func (x *UpdateStationResponse) GetStation() *Station { if x != nil { return x.Station } @@ -248,67 +248,67 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x73, 0x0a, 0x14, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x71, 0x0a, 0x14, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x74, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x74, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, - 0x4e, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x35, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0xd3, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, - 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x32, 0xf4, 0x01, 0x0a, - 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x64, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, + 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x4e, 0x0a, + 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, + 0x1c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, + 0x75, 0x73, 0x49, 0x64, 0x22, 0xd3, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x32, 0xf4, 0x01, 0x0a, 0x0e, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, + 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, - 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, - 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, + 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, + 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -325,8 +325,8 @@ func file_where_child_bus_v1_station_proto_rawDescGZIP() []byte { var file_where_child_bus_v1_station_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_where_child_bus_v1_station_proto_goTypes = []interface{}{ - (*CreateStationRequest)(nil), // 0: where_child_bus.v1.CreateStationRequest - (*CreateStationResponse)(nil), // 1: where_child_bus.v1.CreateStationResponse + (*UpdateStationRequest)(nil), // 0: where_child_bus.v1.UpdateStationRequest + (*UpdateStationResponse)(nil), // 1: where_child_bus.v1.UpdateStationResponse (*GetStationListByBusIdRequest)(nil), // 2: where_child_bus.v1.GetStationListByBusIdRequest (*GetStationListByBusIdResponse)(nil), // 3: where_child_bus.v1.GetStationListByBusIdResponse (*Station)(nil), // 4: where_child_bus.v1.Station @@ -334,13 +334,13 @@ var file_where_child_bus_v1_station_proto_goTypes = []interface{}{ (*Child)(nil), // 6: where_child_bus.v1.Child } var file_where_child_bus_v1_station_proto_depIdxs = []int32{ - 4, // 0: where_child_bus.v1.CreateStationResponse.station:type_name -> where_child_bus.v1.Station + 4, // 0: where_child_bus.v1.UpdateStationResponse.station:type_name -> where_child_bus.v1.Station 4, // 1: where_child_bus.v1.GetStationListByBusIdResponse.stations:type_name -> where_child_bus.v1.Station 5, // 2: where_child_bus.v1.GetStationListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse 6, // 3: where_child_bus.v1.GetStationListByBusIdResponse.children:type_name -> where_child_bus.v1.Child - 0, // 4: where_child_bus.v1.StationService.CreateStation:input_type -> where_child_bus.v1.CreateStationRequest + 0, // 4: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest 2, // 5: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest - 1, // 6: where_child_bus.v1.StationService.CreateStation:output_type -> where_child_bus.v1.CreateStationResponse + 1, // 6: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse 3, // 7: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse 6, // [6:8] is the sub-list for method output_type 4, // [4:6] is the sub-list for method input_type @@ -357,7 +357,7 @@ func file_where_child_bus_v1_station_proto_init() { file_where_child_bus_v1_resources_proto_init() if !protoimpl.UnsafeEnabled { file_where_child_bus_v1_station_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateStationRequest); i { + switch v := v.(*UpdateStationRequest); i { case 0: return &v.state case 1: @@ -369,7 +369,7 @@ func file_where_child_bus_v1_station_proto_init() { } } file_where_child_bus_v1_station_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateStationResponse); i { + switch v := v.(*UpdateStationResponse); i { case 0: return &v.state case 1: diff --git a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go index 890cc3f9..5ded9354 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go @@ -19,7 +19,7 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - StationService_CreateStation_FullMethodName = "/where_child_bus.v1.StationService/CreateStation" + StationService_UpdateStation_FullMethodName = "/where_child_bus.v1.StationService/UpdateStation" StationService_GetStationListByBusId_FullMethodName = "/where_child_bus.v1.StationService/GetStationListByBusId" ) @@ -27,7 +27,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type StationServiceClient interface { - CreateStation(ctx context.Context, in *CreateStationRequest, opts ...grpc.CallOption) (*CreateStationResponse, error) + UpdateStation(ctx context.Context, in *UpdateStationRequest, opts ...grpc.CallOption) (*UpdateStationResponse, error) GetStationListByBusId(ctx context.Context, in *GetStationListByBusIdRequest, opts ...grpc.CallOption) (*GetStationListByBusIdResponse, error) } @@ -39,9 +39,9 @@ func NewStationServiceClient(cc grpc.ClientConnInterface) StationServiceClient { return &stationServiceClient{cc} } -func (c *stationServiceClient) CreateStation(ctx context.Context, in *CreateStationRequest, opts ...grpc.CallOption) (*CreateStationResponse, error) { - out := new(CreateStationResponse) - err := c.cc.Invoke(ctx, StationService_CreateStation_FullMethodName, in, out, opts...) +func (c *stationServiceClient) UpdateStation(ctx context.Context, in *UpdateStationRequest, opts ...grpc.CallOption) (*UpdateStationResponse, error) { + out := new(UpdateStationResponse) + err := c.cc.Invoke(ctx, StationService_UpdateStation_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -61,7 +61,7 @@ func (c *stationServiceClient) GetStationListByBusId(ctx context.Context, in *Ge // All implementations should embed UnimplementedStationServiceServer // for forward compatibility type StationServiceServer interface { - CreateStation(context.Context, *CreateStationRequest) (*CreateStationResponse, error) + UpdateStation(context.Context, *UpdateStationRequest) (*UpdateStationResponse, error) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) } @@ -69,8 +69,8 @@ type StationServiceServer interface { type UnimplementedStationServiceServer struct { } -func (UnimplementedStationServiceServer) CreateStation(context.Context, *CreateStationRequest) (*CreateStationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateStation not implemented") +func (UnimplementedStationServiceServer) UpdateStation(context.Context, *UpdateStationRequest) (*UpdateStationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateStation not implemented") } func (UnimplementedStationServiceServer) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStationListByBusId not implemented") @@ -87,20 +87,20 @@ func RegisterStationServiceServer(s grpc.ServiceRegistrar, srv StationServiceSer s.RegisterService(&StationService_ServiceDesc, srv) } -func _StationService_CreateStation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateStationRequest) +func _StationService_UpdateStation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateStationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(StationServiceServer).CreateStation(ctx, in) + return srv.(StationServiceServer).UpdateStation(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: StationService_CreateStation_FullMethodName, + FullMethod: StationService_UpdateStation_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StationServiceServer).CreateStation(ctx, req.(*CreateStationRequest)) + return srv.(StationServiceServer).UpdateStation(ctx, req.(*UpdateStationRequest)) } return interceptor(ctx, in, info, handler) } @@ -131,8 +131,8 @@ var StationService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*StationServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "CreateStation", - Handler: _StationService_CreateStation_Handler, + MethodName: "UpdateStation", + Handler: _StationService_UpdateStation_Handler, }, { MethodName: "GetStationListByBusId", diff --git a/backend/proto/where_child_bus/v1/bus.proto b/backend/proto/where_child_bus/v1/bus.proto index e53031be..89c5406d 100644 --- a/backend/proto/where_child_bus/v1/bus.proto +++ b/backend/proto/where_child_bus/v1/bus.proto @@ -13,7 +13,8 @@ message CreateBusRequest { string nursery_id = 1; string name = 2; string plate_number = 3; - repeated string child_ids = 4; + repeated string morning_guardian_ids = 4; + repeated string evening_guardian_ids = 5; } message CreateBusResponse { diff --git a/backend/proto/where_child_bus/v1/guardian.proto b/backend/proto/where_child_bus/v1/guardian.proto index af519c51..ce302af7 100644 --- a/backend/proto/where_child_bus/v1/guardian.proto +++ b/backend/proto/where_child_bus/v1/guardian.proto @@ -9,7 +9,7 @@ service GuardianService { rpc GuardianLogin(GuardianLoginRequest) returns (GuardianLoginResponse); } -message CreateGuardianRequest{ +message CreateGuardianRequest { string nursery_code = 1; string email = 2; string password = 3; diff --git a/backend/proto/where_child_bus/v1/nursery.proto b/backend/proto/where_child_bus/v1/nursery.proto index 95448466..7613f52b 100644 --- a/backend/proto/where_child_bus/v1/nursery.proto +++ b/backend/proto/where_child_bus/v1/nursery.proto @@ -10,11 +10,11 @@ service NurseryService { } message CreateNurseryRequest { - string email = 1; - string password = 2; - string name = 3; - string phone_number = 4; - string address = 5; + string email = 1; + string password = 2; + string name = 3; + string phone_number = 4; + string address = 5; } message CreateNurseryResponse { diff --git a/backend/proto/where_child_bus/v1/resources.proto b/backend/proto/where_child_bus/v1/resources.proto index af070ed0..8012c24d 100644 --- a/backend/proto/where_child_bus/v1/resources.proto +++ b/backend/proto/where_child_bus/v1/resources.proto @@ -11,7 +11,7 @@ message Nursery { string address = 4; string phone_number = 5; string email = 6; - string encrypted_password = 7; + string hashed_password = 7; google.protobuf.Timestamp created_at = 8; google.protobuf.Timestamp updated_at = 9; } @@ -34,9 +34,11 @@ message Guardian { string name = 3; string email = 4; string phone_number = 5; - string encrypted_password = 6; - google.protobuf.Timestamp created_at = 7; - google.protobuf.Timestamp updated_at =8; + string hashed_password = 6; + bool is_use_morning_bus = 7; + bool is_use_evening_bus = 8; + google.protobuf.Timestamp created_at = 9; + google.protobuf.Timestamp updated_at =10; } message GuardianResponse { @@ -46,8 +48,10 @@ message GuardianResponse { string email = 4; string phone_number = 5; // ハッシュ化されたパスワードは除外 - google.protobuf.Timestamp created_at = 6; - google.protobuf.Timestamp updated_at = 7; + bool is_use_morning_bus = 6; + bool is_use_evening_bus = 7; + google.protobuf.Timestamp created_at = 8; + google.protobuf.Timestamp updated_at = 9; } enum Status { @@ -66,8 +70,9 @@ message Bus { //緯度経度 double latitude = 6; double longitude = 7; - google.protobuf.Timestamp created_at = 8; - google.protobuf.Timestamp updated_at = 9; + bool enable_face_recognition = 8; + google.protobuf.Timestamp created_at = 9; + google.protobuf.Timestamp updated_at = 10; } enum Sex { @@ -84,27 +89,27 @@ message Child { string name = 4; int32 age = 5; Sex sex = 6; - bool is_ride_morning_bus = 7; - bool is_ride_evening_bus = 8; - bool check_for_missing_items = 9; - bool has_bag = 10; - bool has_lunch_box = 11; - bool has_water_bottle = 12; - bool has_umbrella = 13; - bool has_other = 14; - google.protobuf.Timestamp created_at = 15; - google.protobuf.Timestamp updated_at = 16; + bool check_for_missing_items = 7; + bool has_bag = 8; + bool has_lunch_box = 9; + bool has_water_bottle = 10; + bool has_umbrella = 11; + bool has_other = 12; + google.protobuf.Timestamp created_at = 13; + google.protobuf.Timestamp updated_at = 14; } message Station { string id = 1; string guardian_id = 2; - double latitude = 3; - double longitude = 4; - int32 morning_order = 5; - int32 evening_order = 6; - google.protobuf.Timestamp created_at = 7; - google.protobuf.Timestamp updated_at = 8; + string morning_next_station_id = 3; + string evening_next_station_id = 4; + double latitude = 5; + double longitude = 6; + int32 morning_order = 7; + int32 evening_order = 8; + google.protobuf.Timestamp created_at = 9; + google.protobuf.Timestamp updated_at = 10; } enum BusType { @@ -128,8 +133,6 @@ message BusStationAssociation { message ChildPhoto { string id = 1; string child_id = 2; - string s3_bucket = 3; - string s3_key = 4; google.protobuf.Timestamp created_at = 5; google.protobuf.Timestamp updated_at = 6; } diff --git a/backend/proto/where_child_bus/v1/station.proto b/backend/proto/where_child_bus/v1/station.proto index bd2299e6..00c4499f 100644 --- a/backend/proto/where_child_bus/v1/station.proto +++ b/backend/proto/where_child_bus/v1/station.proto @@ -5,17 +5,17 @@ package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; service StationService { - rpc CreateStation(CreateStationRequest) returns (CreateStationResponse); + rpc UpdateStation(UpdateStationRequest) returns (UpdateStationResponse); rpc GetStationListByBusId(GetStationListByBusIdRequest) returns (GetStationListByBusIdResponse); } -message CreateStationRequest { - string guardian_id = 1; - double longtitude = 2; - double latitude = 3; +message UpdateStationRequest { + string guardian_id = 1; + double longitude = 2; + double latitude = 3; } -message CreateStationResponse { +message UpdateStationResponse { Station station = 1; } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart index e715fe34..f746f704 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -20,7 +20,8 @@ class CreateBusRequest extends $pb.GeneratedMessage { $core.String? nurseryId, $core.String? name, $core.String? plateNumber, - $core.Iterable<$core.String>? childIds, + $core.Iterable<$core.String>? morningGuardianIds, + $core.Iterable<$core.String>? eveningGuardianIds, }) { final $result = create(); if (nurseryId != null) { @@ -32,8 +33,11 @@ class CreateBusRequest extends $pb.GeneratedMessage { if (plateNumber != null) { $result.plateNumber = plateNumber; } - if (childIds != null) { - $result.childIds.addAll(childIds); + if (morningGuardianIds != null) { + $result.morningGuardianIds.addAll(morningGuardianIds); + } + if (eveningGuardianIds != null) { + $result.eveningGuardianIds.addAll(eveningGuardianIds); } return $result; } @@ -45,7 +49,8 @@ class CreateBusRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'nurseryId') ..aOS(2, _omitFieldNames ? '' : 'name') ..aOS(3, _omitFieldNames ? '' : 'plateNumber') - ..pPS(4, _omitFieldNames ? '' : 'childIds') + ..pPS(4, _omitFieldNames ? '' : 'morningGuardianIds') + ..pPS(5, _omitFieldNames ? '' : 'eveningGuardianIds') ..hasRequiredFields = false ; @@ -98,7 +103,10 @@ class CreateBusRequest extends $pb.GeneratedMessage { void clearPlateNumber() => clearField(3); @$pb.TagNumber(4) - $core.List<$core.String> get childIds => $_getList(3); + $core.List<$core.String> get morningGuardianIds => $_getList(3); + + @$pb.TagNumber(5) + $core.List<$core.String> get eveningGuardianIds => $_getList(4); } class CreateBusResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 5f49dd55..9d4b4c89 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -20,15 +20,17 @@ const CreateBusRequest$json = { {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, {'1': 'plate_number', '3': 3, '4': 1, '5': 9, '10': 'plateNumber'}, - {'1': 'child_ids', '3': 4, '4': 3, '5': 9, '10': 'childIds'}, + {'1': 'morning_guardian_ids', '3': 4, '4': 3, '5': 9, '10': 'morningGuardianIds'}, + {'1': 'evening_guardian_ids', '3': 5, '4': 3, '5': 9, '10': 'eveningGuardianIds'}, ], }; /// Descriptor for `CreateBusRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List createBusRequestDescriptor = $convert.base64Decode( 'ChBDcmVhdGVCdXNSZXF1ZXN0Eh0KCm51cnNlcnlfaWQYASABKAlSCW51cnNlcnlJZBISCgRuYW' - '1lGAIgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgDIAEoCVILcGxhdGVOdW1iZXISGwoJY2hp' - 'bGRfaWRzGAQgAygJUghjaGlsZElkcw=='); + '1lGAIgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgDIAEoCVILcGxhdGVOdW1iZXISMAoUbW9y' + 'bmluZ19ndWFyZGlhbl9pZHMYBCADKAlSEm1vcm5pbmdHdWFyZGlhbklkcxIwChRldmVuaW5nX2' + 'd1YXJkaWFuX2lkcxgFIAMoCVISZXZlbmluZ0d1YXJkaWFuSWRz'); @$core.Deprecated('Use createBusResponseDescriptor instead') const CreateBusResponse$json = { diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 04bffcf9..7bf27f42 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -26,7 +26,7 @@ class Nursery extends $pb.GeneratedMessage { $core.String? address, $core.String? phoneNumber, $core.String? email, - $core.String? encryptedPassword, + $core.String? hashedPassword, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, }) { @@ -49,8 +49,8 @@ class Nursery extends $pb.GeneratedMessage { if (email != null) { $result.email = email; } - if (encryptedPassword != null) { - $result.encryptedPassword = encryptedPassword; + if (hashedPassword != null) { + $result.hashedPassword = hashedPassword; } if (createdAt != null) { $result.createdAt = createdAt; @@ -71,7 +71,7 @@ class Nursery extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'address') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') - ..aOS(7, _omitFieldNames ? '' : 'encryptedPassword') + ..aOS(7, _omitFieldNames ? '' : 'hashedPassword') ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false @@ -153,13 +153,13 @@ class Nursery extends $pb.GeneratedMessage { void clearEmail() => clearField(6); @$pb.TagNumber(7) - $core.String get encryptedPassword => $_getSZ(6); + $core.String get hashedPassword => $_getSZ(6); @$pb.TagNumber(7) - set encryptedPassword($core.String v) { $_setString(6, v); } + set hashedPassword($core.String v) { $_setString(6, v); } @$pb.TagNumber(7) - $core.bool hasEncryptedPassword() => $_has(6); + $core.bool hasHashedPassword() => $_has(6); @$pb.TagNumber(7) - void clearEncryptedPassword() => clearField(7); + void clearHashedPassword() => clearField(7); @$pb.TagNumber(8) $7.Timestamp get createdAt => $_getN(7); @@ -344,7 +344,9 @@ class Guardian extends $pb.GeneratedMessage { $core.String? name, $core.String? email, $core.String? phoneNumber, - $core.String? encryptedPassword, + $core.String? hashedPassword, + $core.bool? isUseMorningBus, + $core.bool? isUseEveningBus, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, }) { @@ -364,8 +366,14 @@ class Guardian extends $pb.GeneratedMessage { if (phoneNumber != null) { $result.phoneNumber = phoneNumber; } - if (encryptedPassword != null) { - $result.encryptedPassword = encryptedPassword; + if (hashedPassword != null) { + $result.hashedPassword = hashedPassword; + } + if (isUseMorningBus != null) { + $result.isUseMorningBus = isUseMorningBus; + } + if (isUseEveningBus != null) { + $result.isUseEveningBus = isUseEveningBus; } if (createdAt != null) { $result.createdAt = createdAt; @@ -385,9 +393,11 @@ class Guardian extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOS(6, _omitFieldNames ? '' : 'encryptedPassword') - ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOS(6, _omitFieldNames ? '' : 'hashedPassword') + ..aOB(7, _omitFieldNames ? '' : 'isUseMorningBus') + ..aOB(8, _omitFieldNames ? '' : 'isUseEveningBus') + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -458,35 +468,53 @@ class Guardian extends $pb.GeneratedMessage { void clearPhoneNumber() => clearField(5); @$pb.TagNumber(6) - $core.String get encryptedPassword => $_getSZ(5); + $core.String get hashedPassword => $_getSZ(5); @$pb.TagNumber(6) - set encryptedPassword($core.String v) { $_setString(5, v); } + set hashedPassword($core.String v) { $_setString(5, v); } @$pb.TagNumber(6) - $core.bool hasEncryptedPassword() => $_has(5); + $core.bool hasHashedPassword() => $_has(5); @$pb.TagNumber(6) - void clearEncryptedPassword() => clearField(6); + void clearHashedPassword() => clearField(6); @$pb.TagNumber(7) - $7.Timestamp get createdAt => $_getN(6); + $core.bool get isUseMorningBus => $_getBF(6); @$pb.TagNumber(7) - set createdAt($7.Timestamp v) { setField(7, v); } + set isUseMorningBus($core.bool v) { $_setBool(6, v); } @$pb.TagNumber(7) - $core.bool hasCreatedAt() => $_has(6); + $core.bool hasIsUseMorningBus() => $_has(6); @$pb.TagNumber(7) - void clearCreatedAt() => clearField(7); - @$pb.TagNumber(7) - $7.Timestamp ensureCreatedAt() => $_ensure(6); + void clearIsUseMorningBus() => clearField(7); @$pb.TagNumber(8) - $7.Timestamp get updatedAt => $_getN(7); + $core.bool get isUseEveningBus => $_getBF(7); @$pb.TagNumber(8) - set updatedAt($7.Timestamp v) { setField(8, v); } + set isUseEveningBus($core.bool v) { $_setBool(7, v); } @$pb.TagNumber(8) - $core.bool hasUpdatedAt() => $_has(7); - @$pb.TagNumber(8) - void clearUpdatedAt() => clearField(8); + $core.bool hasIsUseEveningBus() => $_has(7); @$pb.TagNumber(8) - $7.Timestamp ensureUpdatedAt() => $_ensure(7); + void clearIsUseEveningBus() => clearField(8); + + @$pb.TagNumber(9) + $7.Timestamp get createdAt => $_getN(8); + @$pb.TagNumber(9) + set createdAt($7.Timestamp v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasCreatedAt() => $_has(8); + @$pb.TagNumber(9) + void clearCreatedAt() => clearField(9); + @$pb.TagNumber(9) + $7.Timestamp ensureCreatedAt() => $_ensure(8); + + @$pb.TagNumber(10) + $7.Timestamp get updatedAt => $_getN(9); + @$pb.TagNumber(10) + set updatedAt($7.Timestamp v) { setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasUpdatedAt() => $_has(9); + @$pb.TagNumber(10) + void clearUpdatedAt() => clearField(10); + @$pb.TagNumber(10) + $7.Timestamp ensureUpdatedAt() => $_ensure(9); } class GuardianResponse extends $pb.GeneratedMessage { @@ -496,6 +524,8 @@ class GuardianResponse extends $pb.GeneratedMessage { $core.String? name, $core.String? email, $core.String? phoneNumber, + $core.bool? isUseMorningBus, + $core.bool? isUseEveningBus, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, }) { @@ -515,6 +545,12 @@ class GuardianResponse extends $pb.GeneratedMessage { if (phoneNumber != null) { $result.phoneNumber = phoneNumber; } + if (isUseMorningBus != null) { + $result.isUseMorningBus = isUseMorningBus; + } + if (isUseEveningBus != null) { + $result.isUseEveningBus = isUseEveningBus; + } if (createdAt != null) { $result.createdAt = createdAt; } @@ -533,8 +569,10 @@ class GuardianResponse extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'email') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..aOM<$7.Timestamp>(6, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOB(6, _omitFieldNames ? '' : 'isUseMorningBus') + ..aOB(7, _omitFieldNames ? '' : 'isUseEveningBus') + ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -606,26 +644,44 @@ class GuardianResponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(6) - $7.Timestamp get createdAt => $_getN(5); + $core.bool get isUseMorningBus => $_getBF(5); @$pb.TagNumber(6) - set createdAt($7.Timestamp v) { setField(6, v); } + set isUseMorningBus($core.bool v) { $_setBool(5, v); } @$pb.TagNumber(6) - $core.bool hasCreatedAt() => $_has(5); + $core.bool hasIsUseMorningBus() => $_has(5); @$pb.TagNumber(6) - void clearCreatedAt() => clearField(6); - @$pb.TagNumber(6) - $7.Timestamp ensureCreatedAt() => $_ensure(5); + void clearIsUseMorningBus() => clearField(6); @$pb.TagNumber(7) - $7.Timestamp get updatedAt => $_getN(6); - @$pb.TagNumber(7) - set updatedAt($7.Timestamp v) { setField(7, v); } + $core.bool get isUseEveningBus => $_getBF(6); @$pb.TagNumber(7) - $core.bool hasUpdatedAt() => $_has(6); + set isUseEveningBus($core.bool v) { $_setBool(6, v); } @$pb.TagNumber(7) - void clearUpdatedAt() => clearField(7); + $core.bool hasIsUseEveningBus() => $_has(6); @$pb.TagNumber(7) - $7.Timestamp ensureUpdatedAt() => $_ensure(6); + void clearIsUseEveningBus() => clearField(7); + + @$pb.TagNumber(8) + $7.Timestamp get createdAt => $_getN(7); + @$pb.TagNumber(8) + set createdAt($7.Timestamp v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasCreatedAt() => $_has(7); + @$pb.TagNumber(8) + void clearCreatedAt() => clearField(8); + @$pb.TagNumber(8) + $7.Timestamp ensureCreatedAt() => $_ensure(7); + + @$pb.TagNumber(9) + $7.Timestamp get updatedAt => $_getN(8); + @$pb.TagNumber(9) + set updatedAt($7.Timestamp v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasUpdatedAt() => $_has(8); + @$pb.TagNumber(9) + void clearUpdatedAt() => clearField(9); + @$pb.TagNumber(9) + $7.Timestamp ensureUpdatedAt() => $_ensure(8); } class Bus extends $pb.GeneratedMessage { @@ -637,6 +693,7 @@ class Bus extends $pb.GeneratedMessage { Status? status, $core.double? latitude, $core.double? longitude, + $core.bool? enableFaceRecognition, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, }) { @@ -662,6 +719,9 @@ class Bus extends $pb.GeneratedMessage { if (longitude != null) { $result.longitude = longitude; } + if (enableFaceRecognition != null) { + $result.enableFaceRecognition = enableFaceRecognition; + } if (createdAt != null) { $result.createdAt = createdAt; } @@ -682,8 +742,9 @@ class Bus extends $pb.GeneratedMessage { ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Status.STATUS_UNSPECIFIED, valueOf: Status.valueOf, enumValues: Status.values) ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOB(8, _omitFieldNames ? '' : 'enableFaceRecognition') + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -773,26 +834,35 @@ class Bus extends $pb.GeneratedMessage { void clearLongitude() => clearField(7); @$pb.TagNumber(8) - $7.Timestamp get createdAt => $_getN(7); - @$pb.TagNumber(8) - set createdAt($7.Timestamp v) { setField(8, v); } + $core.bool get enableFaceRecognition => $_getBF(7); @$pb.TagNumber(8) - $core.bool hasCreatedAt() => $_has(7); + set enableFaceRecognition($core.bool v) { $_setBool(7, v); } @$pb.TagNumber(8) - void clearCreatedAt() => clearField(8); + $core.bool hasEnableFaceRecognition() => $_has(7); @$pb.TagNumber(8) - $7.Timestamp ensureCreatedAt() => $_ensure(7); + void clearEnableFaceRecognition() => clearField(8); @$pb.TagNumber(9) - $7.Timestamp get updatedAt => $_getN(8); + $7.Timestamp get createdAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($7.Timestamp v) { setField(9, v); } + set createdAt($7.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) - $core.bool hasUpdatedAt() => $_has(8); + $core.bool hasCreatedAt() => $_has(8); @$pb.TagNumber(9) - void clearUpdatedAt() => clearField(9); + void clearCreatedAt() => clearField(9); @$pb.TagNumber(9) - $7.Timestamp ensureUpdatedAt() => $_ensure(8); + $7.Timestamp ensureCreatedAt() => $_ensure(8); + + @$pb.TagNumber(10) + $7.Timestamp get updatedAt => $_getN(9); + @$pb.TagNumber(10) + set updatedAt($7.Timestamp v) { setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasUpdatedAt() => $_has(9); + @$pb.TagNumber(10) + void clearUpdatedAt() => clearField(10); + @$pb.TagNumber(10) + $7.Timestamp ensureUpdatedAt() => $_ensure(9); } class Child extends $pb.GeneratedMessage { @@ -803,8 +873,6 @@ class Child extends $pb.GeneratedMessage { $core.String? name, $core.int? age, Sex? sex, - $core.bool? isRideMorningBus, - $core.bool? isRideEveningBus, $core.bool? checkForMissingItems, $core.bool? hasBag, $core.bool? hasLunchBox, @@ -833,12 +901,6 @@ class Child extends $pb.GeneratedMessage { if (sex != null) { $result.sex = sex; } - if (isRideMorningBus != null) { - $result.isRideMorningBus = isRideMorningBus; - } - if (isRideEveningBus != null) { - $result.isRideEveningBus = isRideEveningBus; - } if (checkForMissingItems != null) { $result.checkForMissingItems = checkForMissingItems; } @@ -876,16 +938,14 @@ class Child extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'name') ..a<$core.int>(5, _omitFieldNames ? '' : 'age', $pb.PbFieldType.O3) ..e(6, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: Sex.SEX_UNSPECIFIED, valueOf: Sex.valueOf, enumValues: Sex.values) - ..aOB(7, _omitFieldNames ? '' : 'isRideMorningBus') - ..aOB(8, _omitFieldNames ? '' : 'isRideEveningBus') - ..aOB(9, _omitFieldNames ? '' : 'checkForMissingItems') - ..aOB(10, _omitFieldNames ? '' : 'hasBag') - ..aOB(11, _omitFieldNames ? '' : 'hasLunchBox') - ..aOB(12, _omitFieldNames ? '' : 'hasWaterBottle') - ..aOB(13, _omitFieldNames ? '' : 'hasUmbrella') - ..aOB(14, _omitFieldNames ? '' : 'hasOther') - ..aOM<$7.Timestamp>(15, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(16, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOB(7, _omitFieldNames ? '' : 'checkForMissingItems') + ..aOB(8, _omitFieldNames ? '' : 'hasBag') + ..aOB(9, _omitFieldNames ? '' : 'hasLunchBox') + ..aOB(10, _omitFieldNames ? '' : 'hasWaterBottle') + ..aOB(11, _omitFieldNames ? '' : 'hasUmbrella') + ..aOB(12, _omitFieldNames ? '' : 'hasOther') + ..aOM<$7.Timestamp>(13, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(14, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -965,104 +1025,88 @@ class Child extends $pb.GeneratedMessage { void clearSex() => clearField(6); @$pb.TagNumber(7) - $core.bool get isRideMorningBus => $_getBF(6); + $core.bool get checkForMissingItems => $_getBF(6); @$pb.TagNumber(7) - set isRideMorningBus($core.bool v) { $_setBool(6, v); } + set checkForMissingItems($core.bool v) { $_setBool(6, v); } @$pb.TagNumber(7) - $core.bool hasIsRideMorningBus() => $_has(6); + $core.bool hasCheckForMissingItems() => $_has(6); @$pb.TagNumber(7) - void clearIsRideMorningBus() => clearField(7); + void clearCheckForMissingItems() => clearField(7); @$pb.TagNumber(8) - $core.bool get isRideEveningBus => $_getBF(7); + $core.bool get hasBag => $_getBF(7); @$pb.TagNumber(8) - set isRideEveningBus($core.bool v) { $_setBool(7, v); } + set hasBag($core.bool v) { $_setBool(7, v); } @$pb.TagNumber(8) - $core.bool hasIsRideEveningBus() => $_has(7); + $core.bool hasHasBag() => $_has(7); @$pb.TagNumber(8) - void clearIsRideEveningBus() => clearField(8); + void clearHasBag() => clearField(8); @$pb.TagNumber(9) - $core.bool get checkForMissingItems => $_getBF(8); + $core.bool get hasLunchBox => $_getBF(8); @$pb.TagNumber(9) - set checkForMissingItems($core.bool v) { $_setBool(8, v); } + set hasLunchBox($core.bool v) { $_setBool(8, v); } @$pb.TagNumber(9) - $core.bool hasCheckForMissingItems() => $_has(8); + $core.bool hasHasLunchBox() => $_has(8); @$pb.TagNumber(9) - void clearCheckForMissingItems() => clearField(9); + void clearHasLunchBox() => clearField(9); @$pb.TagNumber(10) - $core.bool get hasBag => $_getBF(9); + $core.bool get hasWaterBottle => $_getBF(9); @$pb.TagNumber(10) - set hasBag($core.bool v) { $_setBool(9, v); } + set hasWaterBottle($core.bool v) { $_setBool(9, v); } @$pb.TagNumber(10) - $core.bool hasHasBag() => $_has(9); + $core.bool hasHasWaterBottle() => $_has(9); @$pb.TagNumber(10) - void clearHasBag() => clearField(10); + void clearHasWaterBottle() => clearField(10); @$pb.TagNumber(11) - $core.bool get hasLunchBox => $_getBF(10); + $core.bool get hasUmbrella => $_getBF(10); @$pb.TagNumber(11) - set hasLunchBox($core.bool v) { $_setBool(10, v); } + set hasUmbrella($core.bool v) { $_setBool(10, v); } @$pb.TagNumber(11) - $core.bool hasHasLunchBox() => $_has(10); + $core.bool hasHasUmbrella() => $_has(10); @$pb.TagNumber(11) - void clearHasLunchBox() => clearField(11); + void clearHasUmbrella() => clearField(11); @$pb.TagNumber(12) - $core.bool get hasWaterBottle => $_getBF(11); + $core.bool get hasOther => $_getBF(11); @$pb.TagNumber(12) - set hasWaterBottle($core.bool v) { $_setBool(11, v); } + set hasOther($core.bool v) { $_setBool(11, v); } @$pb.TagNumber(12) - $core.bool hasHasWaterBottle() => $_has(11); + $core.bool hasHasOther() => $_has(11); @$pb.TagNumber(12) - void clearHasWaterBottle() => clearField(12); + void clearHasOther() => clearField(12); @$pb.TagNumber(13) - $core.bool get hasUmbrella => $_getBF(12); + $7.Timestamp get createdAt => $_getN(12); + @$pb.TagNumber(13) + set createdAt($7.Timestamp v) { setField(13, v); } @$pb.TagNumber(13) - set hasUmbrella($core.bool v) { $_setBool(12, v); } + $core.bool hasCreatedAt() => $_has(12); @$pb.TagNumber(13) - $core.bool hasHasUmbrella() => $_has(12); + void clearCreatedAt() => clearField(13); @$pb.TagNumber(13) - void clearHasUmbrella() => clearField(13); + $7.Timestamp ensureCreatedAt() => $_ensure(12); @$pb.TagNumber(14) - $core.bool get hasOther => $_getBF(13); + $7.Timestamp get updatedAt => $_getN(13); @$pb.TagNumber(14) - set hasOther($core.bool v) { $_setBool(13, v); } + set updatedAt($7.Timestamp v) { setField(14, v); } @$pb.TagNumber(14) - $core.bool hasHasOther() => $_has(13); + $core.bool hasUpdatedAt() => $_has(13); @$pb.TagNumber(14) - void clearHasOther() => clearField(14); - - @$pb.TagNumber(15) - $7.Timestamp get createdAt => $_getN(14); - @$pb.TagNumber(15) - set createdAt($7.Timestamp v) { setField(15, v); } - @$pb.TagNumber(15) - $core.bool hasCreatedAt() => $_has(14); - @$pb.TagNumber(15) - void clearCreatedAt() => clearField(15); - @$pb.TagNumber(15) - $7.Timestamp ensureCreatedAt() => $_ensure(14); - - @$pb.TagNumber(16) - $7.Timestamp get updatedAt => $_getN(15); - @$pb.TagNumber(16) - set updatedAt($7.Timestamp v) { setField(16, v); } - @$pb.TagNumber(16) - $core.bool hasUpdatedAt() => $_has(15); - @$pb.TagNumber(16) - void clearUpdatedAt() => clearField(16); - @$pb.TagNumber(16) - $7.Timestamp ensureUpdatedAt() => $_ensure(15); + void clearUpdatedAt() => clearField(14); + @$pb.TagNumber(14) + $7.Timestamp ensureUpdatedAt() => $_ensure(13); } class Station extends $pb.GeneratedMessage { factory Station({ $core.String? id, $core.String? guardianId, + $core.String? morningNextStationId, + $core.String? eveningNextStationId, $core.double? latitude, $core.double? longitude, $core.int? morningOrder, @@ -1077,6 +1121,12 @@ class Station extends $pb.GeneratedMessage { if (guardianId != null) { $result.guardianId = guardianId; } + if (morningNextStationId != null) { + $result.morningNextStationId = morningNextStationId; + } + if (eveningNextStationId != null) { + $result.eveningNextStationId = eveningNextStationId; + } if (latitude != null) { $result.latitude = latitude; } @@ -1104,12 +1154,14 @@ class Station extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Station', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'guardianId') - ..a<$core.double>(3, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) - ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..a<$core.int>(5, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) - ..a<$core.int>(6, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) - ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOS(3, _omitFieldNames ? '' : 'morningNextStationId') + ..aOS(4, _omitFieldNames ? '' : 'eveningNextStationId') + ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..a<$core.int>(7, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) + ..a<$core.int>(8, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1153,62 +1205,80 @@ class Station extends $pb.GeneratedMessage { void clearGuardianId() => clearField(2); @$pb.TagNumber(3) - $core.double get latitude => $_getN(2); + $core.String get morningNextStationId => $_getSZ(2); @$pb.TagNumber(3) - set latitude($core.double v) { $_setDouble(2, v); } + set morningNextStationId($core.String v) { $_setString(2, v); } @$pb.TagNumber(3) - $core.bool hasLatitude() => $_has(2); + $core.bool hasMorningNextStationId() => $_has(2); @$pb.TagNumber(3) - void clearLatitude() => clearField(3); + void clearMorningNextStationId() => clearField(3); @$pb.TagNumber(4) - $core.double get longitude => $_getN(3); + $core.String get eveningNextStationId => $_getSZ(3); @$pb.TagNumber(4) - set longitude($core.double v) { $_setDouble(3, v); } + set eveningNextStationId($core.String v) { $_setString(3, v); } @$pb.TagNumber(4) - $core.bool hasLongitude() => $_has(3); + $core.bool hasEveningNextStationId() => $_has(3); @$pb.TagNumber(4) - void clearLongitude() => clearField(4); + void clearEveningNextStationId() => clearField(4); @$pb.TagNumber(5) - $core.int get morningOrder => $_getIZ(4); + $core.double get latitude => $_getN(4); @$pb.TagNumber(5) - set morningOrder($core.int v) { $_setSignedInt32(4, v); } + set latitude($core.double v) { $_setDouble(4, v); } @$pb.TagNumber(5) - $core.bool hasMorningOrder() => $_has(4); + $core.bool hasLatitude() => $_has(4); @$pb.TagNumber(5) - void clearMorningOrder() => clearField(5); + void clearLatitude() => clearField(5); @$pb.TagNumber(6) - $core.int get eveningOrder => $_getIZ(5); + $core.double get longitude => $_getN(5); @$pb.TagNumber(6) - set eveningOrder($core.int v) { $_setSignedInt32(5, v); } + set longitude($core.double v) { $_setDouble(5, v); } @$pb.TagNumber(6) - $core.bool hasEveningOrder() => $_has(5); + $core.bool hasLongitude() => $_has(5); @$pb.TagNumber(6) - void clearEveningOrder() => clearField(6); + void clearLongitude() => clearField(6); @$pb.TagNumber(7) - $7.Timestamp get createdAt => $_getN(6); + $core.int get morningOrder => $_getIZ(6); @$pb.TagNumber(7) - set createdAt($7.Timestamp v) { setField(7, v); } + set morningOrder($core.int v) { $_setSignedInt32(6, v); } @$pb.TagNumber(7) - $core.bool hasCreatedAt() => $_has(6); + $core.bool hasMorningOrder() => $_has(6); @$pb.TagNumber(7) - void clearCreatedAt() => clearField(7); - @$pb.TagNumber(7) - $7.Timestamp ensureCreatedAt() => $_ensure(6); + void clearMorningOrder() => clearField(7); @$pb.TagNumber(8) - $7.Timestamp get updatedAt => $_getN(7); - @$pb.TagNumber(8) - set updatedAt($7.Timestamp v) { setField(8, v); } + $core.int get eveningOrder => $_getIZ(7); @$pb.TagNumber(8) - $core.bool hasUpdatedAt() => $_has(7); + set eveningOrder($core.int v) { $_setSignedInt32(7, v); } @$pb.TagNumber(8) - void clearUpdatedAt() => clearField(8); + $core.bool hasEveningOrder() => $_has(7); @$pb.TagNumber(8) - $7.Timestamp ensureUpdatedAt() => $_ensure(7); + void clearEveningOrder() => clearField(8); + + @$pb.TagNumber(9) + $7.Timestamp get createdAt => $_getN(8); + @$pb.TagNumber(9) + set createdAt($7.Timestamp v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasCreatedAt() => $_has(8); + @$pb.TagNumber(9) + void clearCreatedAt() => clearField(9); + @$pb.TagNumber(9) + $7.Timestamp ensureCreatedAt() => $_ensure(8); + + @$pb.TagNumber(10) + $7.Timestamp get updatedAt => $_getN(9); + @$pb.TagNumber(10) + set updatedAt($7.Timestamp v) { setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasUpdatedAt() => $_has(9); + @$pb.TagNumber(10) + void clearUpdatedAt() => clearField(10); + @$pb.TagNumber(10) + $7.Timestamp ensureUpdatedAt() => $_ensure(9); } class ChildBusAssociation extends $pb.GeneratedMessage { @@ -1371,8 +1441,6 @@ class ChildPhoto extends $pb.GeneratedMessage { factory ChildPhoto({ $core.String? id, $core.String? childId, - $core.String? s3Bucket, - $core.String? s3Key, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, }) { @@ -1383,12 +1451,6 @@ class ChildPhoto extends $pb.GeneratedMessage { if (childId != null) { $result.childId = childId; } - if (s3Bucket != null) { - $result.s3Bucket = s3Bucket; - } - if (s3Key != null) { - $result.s3Key = s3Key; - } if (createdAt != null) { $result.createdAt = createdAt; } @@ -1404,8 +1466,6 @@ class ChildPhoto extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildPhoto', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'childId') - ..aOS(3, _omitFieldNames ? '' : 's3Bucket') - ..aOS(4, _omitFieldNames ? '' : 's3Key') ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) ..aOM<$7.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false @@ -1450,45 +1510,27 @@ class ChildPhoto extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearChildId() => clearField(2); - @$pb.TagNumber(3) - $core.String get s3Bucket => $_getSZ(2); - @$pb.TagNumber(3) - set s3Bucket($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasS3Bucket() => $_has(2); - @$pb.TagNumber(3) - void clearS3Bucket() => clearField(3); - - @$pb.TagNumber(4) - $core.String get s3Key => $_getSZ(3); - @$pb.TagNumber(4) - set s3Key($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasS3Key() => $_has(3); - @$pb.TagNumber(4) - void clearS3Key() => clearField(4); - @$pb.TagNumber(5) - $7.Timestamp get createdAt => $_getN(4); + $7.Timestamp get createdAt => $_getN(2); @$pb.TagNumber(5) set createdAt($7.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) - $core.bool hasCreatedAt() => $_has(4); + $core.bool hasCreatedAt() => $_has(2); @$pb.TagNumber(5) void clearCreatedAt() => clearField(5); @$pb.TagNumber(5) - $7.Timestamp ensureCreatedAt() => $_ensure(4); + $7.Timestamp ensureCreatedAt() => $_ensure(2); @$pb.TagNumber(6) - $7.Timestamp get updatedAt => $_getN(5); + $7.Timestamp get updatedAt => $_getN(3); @$pb.TagNumber(6) set updatedAt($7.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) - $core.bool hasUpdatedAt() => $_has(5); + $core.bool hasUpdatedAt() => $_has(3); @$pb.TagNumber(6) void clearUpdatedAt() => clearField(6); @$pb.TagNumber(6) - $7.Timestamp ensureUpdatedAt() => $_ensure(5); + $7.Timestamp ensureUpdatedAt() => $_ensure(3); } class BoardingRecord extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 461d9f61..95589495 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -70,7 +70,7 @@ const Nursery$json = { {'1': 'address', '3': 4, '4': 1, '5': 9, '10': 'address'}, {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, {'1': 'email', '3': 6, '4': 1, '5': 9, '10': 'email'}, - {'1': 'encrypted_password', '3': 7, '4': 1, '5': 9, '10': 'encryptedPassword'}, + {'1': 'hashed_password', '3': 7, '4': 1, '5': 9, '10': 'hashedPassword'}, {'1': 'created_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, {'1': 'updated_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], @@ -80,10 +80,10 @@ const Nursery$json = { final $typed_data.Uint8List nurseryDescriptor = $convert.base64Decode( 'CgdOdXJzZXJ5Eg4KAmlkGAEgASgJUgJpZBIhCgxudXJzZXJ5X2NvZGUYAiABKAlSC251cnNlcn' 'lDb2RlEhIKBG5hbWUYAyABKAlSBG5hbWUSGAoHYWRkcmVzcxgEIAEoCVIHYWRkcmVzcxIhCgxw' - 'aG9uZV9udW1iZXIYBSABKAlSC3Bob25lTnVtYmVyEhQKBWVtYWlsGAYgASgJUgVlbWFpbBItCh' - 'JlbmNyeXB0ZWRfcGFzc3dvcmQYByABKAlSEWVuY3J5cHRlZFBhc3N3b3JkEjkKCmNyZWF0ZWRf' - 'YXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYX' - 'RlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); + 'aG9uZV9udW1iZXIYBSABKAlSC3Bob25lTnVtYmVyEhQKBWVtYWlsGAYgASgJUgVlbWFpbBInCg' + '9oYXNoZWRfcGFzc3dvcmQYByABKAlSDmhhc2hlZFBhc3N3b3JkEjkKCmNyZWF0ZWRfYXQYCCAB' + 'KAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYXRlZF9hdB' + 'gJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); @$core.Deprecated('Use nurseryResponseDescriptor instead') const NurseryResponse$json = { @@ -118,9 +118,11 @@ const Guardian$json = { {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, {'1': 'email', '3': 4, '4': 1, '5': 9, '10': 'email'}, {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, - {'1': 'encrypted_password', '3': 6, '4': 1, '5': 9, '10': 'encryptedPassword'}, - {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'hashed_password', '3': 6, '4': 1, '5': 9, '10': 'hashedPassword'}, + {'1': 'is_use_morning_bus', '3': 7, '4': 1, '5': 8, '10': 'isUseMorningBus'}, + {'1': 'is_use_evening_bus', '3': 8, '4': 1, '5': 8, '10': 'isUseEveningBus'}, + {'1': 'created_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 10, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; @@ -128,10 +130,11 @@ const Guardian$json = { final $typed_data.Uint8List guardianDescriptor = $convert.base64Decode( 'CghHdWFyZGlhbhIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbnVyc2VyeU' 'lkEhIKBG5hbWUYAyABKAlSBG5hbWUSFAoFZW1haWwYBCABKAlSBWVtYWlsEiEKDHBob25lX251' - 'bWJlchgFIAEoCVILcGhvbmVOdW1iZXISLQoSZW5jcnlwdGVkX3Bhc3N3b3JkGAYgASgJUhFlbm' - 'NyeXB0ZWRQYXNzd29yZBI5CgpjcmVhdGVkX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRp' - 'bWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idW' - 'YuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); + 'bWJlchgFIAEoCVILcGhvbmVOdW1iZXISJwoPaGFzaGVkX3Bhc3N3b3JkGAYgASgJUg5oYXNoZW' + 'RQYXNzd29yZBIrChJpc191c2VfbW9ybmluZ19idXMYByABKAhSD2lzVXNlTW9ybmluZ0J1cxIr' + 'ChJpc191c2VfZXZlbmluZ19idXMYCCABKAhSD2lzVXNlRXZlbmluZ0J1cxI5CgpjcmVhdGVkX2' + 'F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0' + 'ZWRfYXQYCiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); @$core.Deprecated('Use guardianResponseDescriptor instead') const GuardianResponse$json = { @@ -142,8 +145,10 @@ const GuardianResponse$json = { {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, {'1': 'email', '3': 4, '4': 1, '5': 9, '10': 'email'}, {'1': 'phone_number', '3': 5, '4': 1, '5': 9, '10': 'phoneNumber'}, - {'1': 'created_at', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'is_use_morning_bus', '3': 6, '4': 1, '5': 8, '10': 'isUseMorningBus'}, + {'1': 'is_use_evening_bus', '3': 7, '4': 1, '5': 8, '10': 'isUseEveningBus'}, + {'1': 'created_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; @@ -151,9 +156,11 @@ const GuardianResponse$json = { final $typed_data.Uint8List guardianResponseDescriptor = $convert.base64Decode( 'ChBHdWFyZGlhblJlc3BvbnNlEg4KAmlkGAEgASgJUgJpZBIdCgpudXJzZXJ5X2lkGAIgASgJUg' 'ludXJzZXJ5SWQSEgoEbmFtZRgDIAEoCVIEbmFtZRIUCgVlbWFpbBgEIAEoCVIFZW1haWwSIQoM' - 'cGhvbmVfbnVtYmVyGAUgASgJUgtwaG9uZU51bWJlchI5CgpjcmVhdGVkX2F0GAYgASgLMhouZ2' - '9vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYByABKAsy' - 'Gi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); + 'cGhvbmVfbnVtYmVyGAUgASgJUgtwaG9uZU51bWJlchIrChJpc191c2VfbW9ybmluZ19idXMYBi' + 'ABKAhSD2lzVXNlTW9ybmluZ0J1cxIrChJpc191c2VfZXZlbmluZ19idXMYByABKAhSD2lzVXNl' + 'RXZlbmluZ0J1cxI5CgpjcmVhdGVkX2F0GAggASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdG' + 'FtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGlt' + 'ZXN0YW1wUgl1cGRhdGVkQXQ='); @$core.Deprecated('Use busDescriptor instead') const Bus$json = { @@ -166,8 +173,9 @@ const Bus$json = { {'1': 'status', '3': 5, '4': 1, '5': 14, '6': '.where_child_bus.v1.Status', '10': 'status'}, {'1': 'latitude', '3': 6, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 7, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'created_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'enable_face_recognition', '3': 8, '4': 1, '5': 8, '10': 'enableFaceRecognition'}, + {'1': 'created_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 10, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; @@ -176,10 +184,11 @@ final $typed_data.Uint8List busDescriptor = $convert.base64Decode( 'CgNCdXMSDgoCaWQYASABKAlSAmlkEh0KCm51cnNlcnlfaWQYAiABKAlSCW51cnNlcnlJZBISCg' 'RuYW1lGAMgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgEIAEoCVILcGxhdGVOdW1iZXISMgoG' 'c3RhdHVzGAUgASgOMhoud2hlcmVfY2hpbGRfYnVzLnYxLlN0YXR1c1IGc3RhdHVzEhoKCGxhdG' - 'l0dWRlGAYgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYByABKAFSCWxvbmdpdHVkZRI5Cgpj' - 'cmVhdGVkX2F0GAggASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRlZEF0Ej' - 'kKCnVwZGF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cGRhdGVk' - 'QXQ='); + 'l0dWRlGAYgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYByABKAFSCWxvbmdpdHVkZRI2Chdl' + 'bmFibGVfZmFjZV9yZWNvZ25pdGlvbhgIIAEoCFIVZW5hYmxlRmFjZVJlY29nbml0aW9uEjkKCm' + 'NyZWF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQS' + 'OQoKdXBkYXRlZF9hdBgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZW' + 'RBdA=='); @$core.Deprecated('Use childDescriptor instead') const Child$json = { @@ -191,16 +200,14 @@ const Child$json = { {'1': 'name', '3': 4, '4': 1, '5': 9, '10': 'name'}, {'1': 'age', '3': 5, '4': 1, '5': 5, '10': 'age'}, {'1': 'sex', '3': 6, '4': 1, '5': 14, '6': '.where_child_bus.v1.Sex', '10': 'sex'}, - {'1': 'is_ride_morning_bus', '3': 7, '4': 1, '5': 8, '10': 'isRideMorningBus'}, - {'1': 'is_ride_evening_bus', '3': 8, '4': 1, '5': 8, '10': 'isRideEveningBus'}, - {'1': 'check_for_missing_items', '3': 9, '4': 1, '5': 8, '10': 'checkForMissingItems'}, - {'1': 'has_bag', '3': 10, '4': 1, '5': 8, '10': 'hasBag'}, - {'1': 'has_lunch_box', '3': 11, '4': 1, '5': 8, '10': 'hasLunchBox'}, - {'1': 'has_water_bottle', '3': 12, '4': 1, '5': 8, '10': 'hasWaterBottle'}, - {'1': 'has_umbrella', '3': 13, '4': 1, '5': 8, '10': 'hasUmbrella'}, - {'1': 'has_other', '3': 14, '4': 1, '5': 8, '10': 'hasOther'}, - {'1': 'created_at', '3': 15, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 16, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'check_for_missing_items', '3': 7, '4': 1, '5': 8, '10': 'checkForMissingItems'}, + {'1': 'has_bag', '3': 8, '4': 1, '5': 8, '10': 'hasBag'}, + {'1': 'has_lunch_box', '3': 9, '4': 1, '5': 8, '10': 'hasLunchBox'}, + {'1': 'has_water_bottle', '3': 10, '4': 1, '5': 8, '10': 'hasWaterBottle'}, + {'1': 'has_umbrella', '3': 11, '4': 1, '5': 8, '10': 'hasUmbrella'}, + {'1': 'has_other', '3': 12, '4': 1, '5': 8, '10': 'hasOther'}, + {'1': 'created_at', '3': 13, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 14, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; @@ -209,14 +216,13 @@ final $typed_data.Uint8List childDescriptor = $convert.base64Decode( 'CgVDaGlsZBIOCgJpZBgBIAEoCVICaWQSHQoKbnVyc2VyeV9pZBgCIAEoCVIJbnVyc2VyeUlkEh' '8KC2d1YXJkaWFuX2lkGAMgASgJUgpndWFyZGlhbklkEhIKBG5hbWUYBCABKAlSBG5hbWUSEAoD' 'YWdlGAUgASgFUgNhZ2USKQoDc2V4GAYgASgOMhcud2hlcmVfY2hpbGRfYnVzLnYxLlNleFIDc2' - 'V4Ei0KE2lzX3JpZGVfbW9ybmluZ19idXMYByABKAhSEGlzUmlkZU1vcm5pbmdCdXMSLQoTaXNf' - 'cmlkZV9ldmVuaW5nX2J1cxgIIAEoCFIQaXNSaWRlRXZlbmluZ0J1cxI1ChdjaGVja19mb3JfbW' - 'lzc2luZ19pdGVtcxgJIAEoCFIUY2hlY2tGb3JNaXNzaW5nSXRlbXMSFwoHaGFzX2JhZxgKIAEo' - 'CFIGaGFzQmFnEiIKDWhhc19sdW5jaF9ib3gYCyABKAhSC2hhc0x1bmNoQm94EigKEGhhc193YX' - 'Rlcl9ib3R0bGUYDCABKAhSDmhhc1dhdGVyQm90dGxlEiEKDGhhc191bWJyZWxsYRgNIAEoCFIL' - 'aGFzVW1icmVsbGESGwoJaGFzX290aGVyGA4gASgIUghoYXNPdGhlchI5CgpjcmVhdGVkX2F0GA' - '8gASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRf' - 'YXQYECABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); + 'V4EjUKF2NoZWNrX2Zvcl9taXNzaW5nX2l0ZW1zGAcgASgIUhRjaGVja0Zvck1pc3NpbmdJdGVt' + 'cxIXCgdoYXNfYmFnGAggASgIUgZoYXNCYWcSIgoNaGFzX2x1bmNoX2JveBgJIAEoCFILaGFzTH' + 'VuY2hCb3gSKAoQaGFzX3dhdGVyX2JvdHRsZRgKIAEoCFIOaGFzV2F0ZXJCb3R0bGUSIQoMaGFz' + 'X3VtYnJlbGxhGAsgASgIUgtoYXNVbWJyZWxsYRIbCgloYXNfb3RoZXIYDCABKAhSCGhhc090aG' + 'VyEjkKCmNyZWF0ZWRfYXQYDSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVh' + 'dGVkQXQSOQoKdXBkYXRlZF9hdBgOIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCX' + 'VwZGF0ZWRBdA=='); @$core.Deprecated('Use stationDescriptor instead') const Station$json = { @@ -224,23 +230,27 @@ const Station$json = { '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'guardian_id', '3': 2, '4': 1, '5': 9, '10': 'guardianId'}, - {'1': 'latitude', '3': 3, '4': 1, '5': 1, '10': 'latitude'}, - {'1': 'longitude', '3': 4, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'morning_order', '3': 5, '4': 1, '5': 5, '10': 'morningOrder'}, - {'1': 'evening_order', '3': 6, '4': 1, '5': 5, '10': 'eveningOrder'}, - {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'morning_next_station_id', '3': 3, '4': 1, '5': 9, '10': 'morningNextStationId'}, + {'1': 'evening_next_station_id', '3': 4, '4': 1, '5': 9, '10': 'eveningNextStationId'}, + {'1': 'latitude', '3': 5, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 6, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'morning_order', '3': 7, '4': 1, '5': 5, '10': 'morningOrder'}, + {'1': 'evening_order', '3': 8, '4': 1, '5': 5, '10': 'eveningOrder'}, + {'1': 'created_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 10, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; /// Descriptor for `Station`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List stationDescriptor = $convert.base64Decode( 'CgdTdGF0aW9uEg4KAmlkGAEgASgJUgJpZBIfCgtndWFyZGlhbl9pZBgCIAEoCVIKZ3VhcmRpYW' - '5JZBIaCghsYXRpdHVkZRgDIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAQgASgBUglsb25n' - 'aXR1ZGUSIwoNbW9ybmluZ19vcmRlchgFIAEoBVIMbW9ybmluZ09yZGVyEiMKDWV2ZW5pbmdfb3' - 'JkZXIYBiABKAVSDGV2ZW5pbmdPcmRlchI5CgpjcmVhdGVkX2F0GAcgASgLMhouZ29vZ2xlLnBy' - 'b3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbG' - 'UucHJvdG9idWYuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); + '5JZBI1Chdtb3JuaW5nX25leHRfc3RhdGlvbl9pZBgDIAEoCVIUbW9ybmluZ05leHRTdGF0aW9u' + 'SWQSNQoXZXZlbmluZ19uZXh0X3N0YXRpb25faWQYBCABKAlSFGV2ZW5pbmdOZXh0U3RhdGlvbk' + 'lkEhoKCGxhdGl0dWRlGAUgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYBiABKAFSCWxvbmdp' + 'dHVkZRIjCg1tb3JuaW5nX29yZGVyGAcgASgFUgxtb3JuaW5nT3JkZXISIwoNZXZlbmluZ19vcm' + 'RlchgIIAEoBVIMZXZlbmluZ09yZGVyEjkKCmNyZWF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJv' + 'dG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYXRlZF9hdBgKIAEoCzIaLmdvb2dsZS' + '5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); @$core.Deprecated('Use childBusAssociationDescriptor instead') const ChildBusAssociation$json = { @@ -279,8 +289,6 @@ const ChildPhoto$json = { '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, - {'1': 's3_bucket', '3': 3, '4': 1, '5': 9, '10': 's3Bucket'}, - {'1': 's3_key', '3': 4, '4': 1, '5': 9, '10': 's3Key'}, {'1': 'created_at', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, {'1': 'updated_at', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], @@ -289,10 +297,9 @@ const ChildPhoto$json = { /// Descriptor for `ChildPhoto`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List childPhotoDescriptor = $convert.base64Decode( 'CgpDaGlsZFBob3RvEg4KAmlkGAEgASgJUgJpZBIZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZB' - 'IbCglzM19idWNrZXQYAyABKAlSCHMzQnVja2V0EhUKBnMzX2tleRgEIAEoCVIFczNLZXkSOQoK' - 'Y3JlYXRlZF9hdBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdB' - 'I5Cgp1cGRhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRl' - 'ZEF0'); + 'I5CgpjcmVhdGVkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRl' + 'ZEF0EjkKCnVwZGF0ZWRfYXQYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cG' + 'RhdGVkQXQ='); @$core.Deprecated('Use boardingRecordDescriptor instead') const BoardingRecord$json = { diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart index 2512d375..7bb2020c 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -15,31 +15,31 @@ import 'package:protobuf/protobuf.dart' as $pb; import 'resources.pb.dart' as $8; -class CreateStationRequest extends $pb.GeneratedMessage { - factory CreateStationRequest({ +class UpdateStationRequest extends $pb.GeneratedMessage { + factory UpdateStationRequest({ $core.String? guardianId, - $core.double? longtitude, + $core.double? longitude, $core.double? latitude, }) { final $result = create(); if (guardianId != null) { $result.guardianId = guardianId; } - if (longtitude != null) { - $result.longtitude = longtitude; + if (longitude != null) { + $result.longitude = longitude; } if (latitude != null) { $result.latitude = latitude; } return $result; } - CreateStationRequest._() : super(); - factory CreateStationRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CreateStationRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + UpdateStationRequest._() : super(); + factory UpdateStationRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateStationRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateStationRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'guardianId') - ..a<$core.double>(2, _omitFieldNames ? '' : 'longtitude', $pb.PbFieldType.OD) + ..a<$core.double>(2, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.double>(3, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..hasRequiredFields = false ; @@ -48,22 +48,22 @@ class CreateStationRequest extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - CreateStationRequest clone() => CreateStationRequest()..mergeFromMessage(this); + UpdateStationRequest clone() => UpdateStationRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - CreateStationRequest copyWith(void Function(CreateStationRequest) updates) => super.copyWith((message) => updates(message as CreateStationRequest)) as CreateStationRequest; + UpdateStationRequest copyWith(void Function(UpdateStationRequest) updates) => super.copyWith((message) => updates(message as UpdateStationRequest)) as UpdateStationRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static CreateStationRequest create() => CreateStationRequest._(); - CreateStationRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static UpdateStationRequest create() => UpdateStationRequest._(); + UpdateStationRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static CreateStationRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CreateStationRequest? _defaultInstance; + static UpdateStationRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateStationRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get guardianId => $_getSZ(0); @@ -75,13 +75,13 @@ class CreateStationRequest extends $pb.GeneratedMessage { void clearGuardianId() => clearField(1); @$pb.TagNumber(2) - $core.double get longtitude => $_getN(1); + $core.double get longitude => $_getN(1); @$pb.TagNumber(2) - set longtitude($core.double v) { $_setDouble(1, v); } + set longitude($core.double v) { $_setDouble(1, v); } @$pb.TagNumber(2) - $core.bool hasLongtitude() => $_has(1); + $core.bool hasLongitude() => $_has(1); @$pb.TagNumber(2) - void clearLongtitude() => clearField(2); + void clearLongitude() => clearField(2); @$pb.TagNumber(3) $core.double get latitude => $_getN(2); @@ -93,8 +93,8 @@ class CreateStationRequest extends $pb.GeneratedMessage { void clearLatitude() => clearField(3); } -class CreateStationResponse extends $pb.GeneratedMessage { - factory CreateStationResponse({ +class UpdateStationResponse extends $pb.GeneratedMessage { + factory UpdateStationResponse({ $8.Station? station, }) { final $result = create(); @@ -103,11 +103,11 @@ class CreateStationResponse extends $pb.GeneratedMessage { } return $result; } - CreateStationResponse._() : super(); - factory CreateStationResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CreateStationResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + UpdateStationResponse._() : super(); + factory UpdateStationResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateStationResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateStationResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOM<$8.Station>(1, _omitFieldNames ? '' : 'station', subBuilder: $8.Station.create) ..hasRequiredFields = false ; @@ -116,22 +116,22 @@ class CreateStationResponse extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - CreateStationResponse clone() => CreateStationResponse()..mergeFromMessage(this); + UpdateStationResponse clone() => UpdateStationResponse()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - CreateStationResponse copyWith(void Function(CreateStationResponse) updates) => super.copyWith((message) => updates(message as CreateStationResponse)) as CreateStationResponse; + UpdateStationResponse copyWith(void Function(UpdateStationResponse) updates) => super.copyWith((message) => updates(message as UpdateStationResponse)) as UpdateStationResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static CreateStationResponse create() => CreateStationResponse._(); - CreateStationResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static UpdateStationResponse create() => UpdateStationResponse._(); + UpdateStationResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static CreateStationResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CreateStationResponse? _defaultInstance; + static UpdateStationResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateStationResponse? _defaultInstance; @$pb.TagNumber(1) $8.Station get station => $_getN(0); diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart index 61131d93..51b51682 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart @@ -21,10 +21,10 @@ export 'station.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.StationService') class StationServiceClient extends $grpc.Client { - static final _$createStation = $grpc.ClientMethod<$6.CreateStationRequest, $6.CreateStationResponse>( - '/where_child_bus.v1.StationService/CreateStation', - ($6.CreateStationRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $6.CreateStationResponse.fromBuffer(value)); + static final _$updateStation = $grpc.ClientMethod<$6.UpdateStationRequest, $6.UpdateStationResponse>( + '/where_child_bus.v1.StationService/UpdateStation', + ($6.UpdateStationRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.UpdateStationResponse.fromBuffer(value)); static final _$getStationListByBusId = $grpc.ClientMethod<$6.GetStationListByBusIdRequest, $6.GetStationListByBusIdResponse>( '/where_child_bus.v1.StationService/GetStationListByBusId', ($6.GetStationListByBusIdRequest value) => value.writeToBuffer(), @@ -36,8 +36,8 @@ class StationServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$6.CreateStationResponse> createStation($6.CreateStationRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$createStation, request, options: options); + $grpc.ResponseFuture<$6.UpdateStationResponse> updateStation($6.UpdateStationRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$updateStation, request, options: options); } $grpc.ResponseFuture<$6.GetStationListByBusIdResponse> getStationListByBusId($6.GetStationListByBusIdRequest request, {$grpc.CallOptions? options}) { @@ -50,13 +50,13 @@ abstract class StationServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.StationService'; StationServiceBase() { - $addMethod($grpc.ServiceMethod<$6.CreateStationRequest, $6.CreateStationResponse>( - 'CreateStation', - createStation_Pre, + $addMethod($grpc.ServiceMethod<$6.UpdateStationRequest, $6.UpdateStationResponse>( + 'UpdateStation', + updateStation_Pre, false, false, - ($core.List<$core.int> value) => $6.CreateStationRequest.fromBuffer(value), - ($6.CreateStationResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $6.UpdateStationRequest.fromBuffer(value), + ($6.UpdateStationResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$6.GetStationListByBusIdRequest, $6.GetStationListByBusIdResponse>( 'GetStationListByBusId', getStationListByBusId_Pre, @@ -66,14 +66,14 @@ abstract class StationServiceBase extends $grpc.Service { ($6.GetStationListByBusIdResponse value) => value.writeToBuffer())); } - $async.Future<$6.CreateStationResponse> createStation_Pre($grpc.ServiceCall call, $async.Future<$6.CreateStationRequest> request) async { - return createStation(call, await request); + $async.Future<$6.UpdateStationResponse> updateStation_Pre($grpc.ServiceCall call, $async.Future<$6.UpdateStationRequest> request) async { + return updateStation(call, await request); } $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId_Pre($grpc.ServiceCall call, $async.Future<$6.GetStationListByBusIdRequest> request) async { return getStationListByBusId(call, await request); } - $async.Future<$6.CreateStationResponse> createStation($grpc.ServiceCall call, $6.CreateStationRequest request); + $async.Future<$6.UpdateStationResponse> updateStation($grpc.ServiceCall call, $6.UpdateStationRequest request); $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId($grpc.ServiceCall call, $6.GetStationListByBusIdRequest request); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart index 40e476a0..57aa60c9 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -13,33 +13,33 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use createStationRequestDescriptor instead') -const CreateStationRequest$json = { - '1': 'CreateStationRequest', +@$core.Deprecated('Use updateStationRequestDescriptor instead') +const UpdateStationRequest$json = { + '1': 'UpdateStationRequest', '2': [ {'1': 'guardian_id', '3': 1, '4': 1, '5': 9, '10': 'guardianId'}, - {'1': 'longtitude', '3': 2, '4': 1, '5': 1, '10': 'longtitude'}, + {'1': 'longitude', '3': 2, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'latitude', '3': 3, '4': 1, '5': 1, '10': 'latitude'}, ], }; -/// Descriptor for `CreateStationRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List createStationRequestDescriptor = $convert.base64Decode( - 'ChRDcmVhdGVTdGF0aW9uUmVxdWVzdBIfCgtndWFyZGlhbl9pZBgBIAEoCVIKZ3VhcmRpYW5JZB' - 'IeCgpsb25ndGl0dWRlGAIgASgBUgpsb25ndGl0dWRlEhoKCGxhdGl0dWRlGAMgASgBUghsYXRp' - 'dHVkZQ=='); +/// Descriptor for `UpdateStationRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateStationRequestDescriptor = $convert.base64Decode( + 'ChRVcGRhdGVTdGF0aW9uUmVxdWVzdBIfCgtndWFyZGlhbl9pZBgBIAEoCVIKZ3VhcmRpYW5JZB' + 'IcCglsb25naXR1ZGUYAiABKAFSCWxvbmdpdHVkZRIaCghsYXRpdHVkZRgDIAEoAVIIbGF0aXR1' + 'ZGU='); -@$core.Deprecated('Use createStationResponseDescriptor instead') -const CreateStationResponse$json = { - '1': 'CreateStationResponse', +@$core.Deprecated('Use updateStationResponseDescriptor instead') +const UpdateStationResponse$json = { + '1': 'UpdateStationResponse', '2': [ {'1': 'station', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Station', '10': 'station'}, ], }; -/// Descriptor for `CreateStationResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List createStationResponseDescriptor = $convert.base64Decode( - 'ChVDcmVhdGVTdGF0aW9uUmVzcG9uc2USNQoHc3RhdGlvbhgBIAEoCzIbLndoZXJlX2NoaWxkX2' +/// Descriptor for `UpdateStationResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateStationResponseDescriptor = $convert.base64Decode( + 'ChVVcGRhdGVTdGF0aW9uUmVzcG9uc2USNQoHc3RhdGlvbhgBIAEoCzIbLndoZXJlX2NoaWxkX2' 'J1cy52MS5TdGF0aW9uUgdzdGF0aW9u'); @$core.Deprecated('Use getStationListByBusIdRequestDescriptor instead') diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py index 4d785b58..e08d1e55 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\x85\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1b\n\tchild_ids\x18\x04 \x03(\tR\x08\x63hildIds\"u\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses2\xe4\x01\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponseB\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\"u\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses2\xe4\x01\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponseB\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,13 +24,13 @@ _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' _globals['_CREATEBUSREQUEST']._serialized_start=89 - _globals['_CREATEBUSREQUEST']._serialized_end=222 - _globals['_CREATEBUSRESPONSE']._serialized_start=224 - _globals['_CREATEBUSRESPONSE']._serialized_end=341 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=343 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=404 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=406 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=484 - _globals['_BUSSERVICE']._serialized_start=487 - _globals['_BUSSERVICE']._serialized_end=715 + _globals['_CREATEBUSREQUEST']._serialized_end=293 + _globals['_CREATEBUSRESPONSE']._serialized_start=295 + _globals['_CREATEBUSRESPONSE']._serialized_end=412 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=414 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=475 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=477 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=555 + _globals['_BUSSERVICE']._serialized_start=558 + _globals['_BUSSERVICE']._serialized_end=786 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi index d7e5d230..747e1882 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi @@ -7,16 +7,18 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor class CreateBusRequest(_message.Message): - __slots__ = ("nursery_id", "name", "plate_number", "child_ids") + __slots__ = ("nursery_id", "name", "plate_number", "morning_guardian_ids", "evening_guardian_ids") NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] - CHILD_IDS_FIELD_NUMBER: _ClassVar[int] + MORNING_GUARDIAN_IDS_FIELD_NUMBER: _ClassVar[int] + EVENING_GUARDIAN_IDS_FIELD_NUMBER: _ClassVar[int] nursery_id: str name: str plate_number: str - child_ids: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., child_ids: _Optional[_Iterable[str]] = ...) -> None: ... + morning_guardian_ids: _containers.RepeatedScalarFieldContainer[str] + evening_guardian_ids: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., morning_guardian_ids: _Optional[_Iterable[str]] = ..., evening_guardian_ids: _Optional[_Iterable[str]] = ...) -> None: ... class CreateBusResponse(_message.Message): __slots__ = ("bus", "children") diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index 951d6a41..d8a9e8d9 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12-\n\x12\x65ncrypted_password\x18\x07 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12-\n\x12\x65ncrypted_password\x18\x06 \x01(\tR\x11\x65ncryptedPassword\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x84\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x39\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xcf\x02\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xda\x04\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12-\n\x13is_ride_morning_bus\x18\x07 \x01(\x08R\x10isRideMorningBus\x12-\n\x13is_ride_evening_bus\x18\x08 \x01(\x08R\x10isRideEveningBus\x12\x35\n\x17\x63heck_for_missing_items\x18\t \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\n \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x0b \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x0c \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\r \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0e \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb4\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x05 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x06 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xe1\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1b\n\ts3_bucket\x18\x03 \x01(\tR\x08s3Bucket\x12\x15\n\x06s3_key\x18\x04 \x01(\tR\x05s3Key\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x87\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xad\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,32 +23,32 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_STATUS']._serialized_start=3162 - _globals['_STATUS']._serialized_end=3259 - _globals['_SEX']._serialized_start=3261 - _globals['_SEX']._serialized_end=3330 - _globals['_BUSTYPE']._serialized_start=3332 - _globals['_BUSTYPE']._serialized_end=3411 + _globals['_STATUS']._serialized_start=3350 + _globals['_STATUS']._serialized_end=3447 + _globals['_SEX']._serialized_start=3449 + _globals['_SEX']._serialized_end=3518 + _globals['_BUSTYPE']._serialized_start=3520 + _globals['_BUSTYPE']._serialized_end=3599 _globals['_NURSERY']._serialized_start=92 - _globals['_NURSERY']._serialized_end=420 - _globals['_NURSERYRESPONSE']._serialized_start=423 - _globals['_NURSERYRESPONSE']._serialized_end=712 - _globals['_GUARDIAN']._serialized_start=715 - _globals['_GUARDIAN']._serialized_end=1014 - _globals['_GUARDIANRESPONSE']._serialized_start=1017 - _globals['_GUARDIANRESPONSE']._serialized_end=1277 - _globals['_BUS']._serialized_start=1280 - _globals['_BUS']._serialized_end=1615 - _globals['_CHILD']._serialized_start=1618 - _globals['_CHILD']._serialized_end=2220 - _globals['_STATION']._serialized_start=2223 - _globals['_STATION']._serialized_end=2531 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2534 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2677 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=2679 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=2756 - _globals['_CHILDPHOTO']._serialized_start=2759 - _globals['_CHILDPHOTO']._serialized_end=2984 - _globals['_BOARDINGRECORD']._serialized_start=2987 - _globals['_BOARDINGRECORD']._serialized_end=3160 + _globals['_NURSERY']._serialized_end=414 + _globals['_NURSERYRESPONSE']._serialized_start=417 + _globals['_NURSERYRESPONSE']._serialized_end=706 + _globals['_GUARDIAN']._serialized_start=709 + _globals['_GUARDIAN']._serialized_end=1092 + _globals['_GUARDIANRESPONSE']._serialized_start=1095 + _globals['_GUARDIANRESPONSE']._serialized_end=1445 + _globals['_BUS']._serialized_start=1448 + _globals['_BUS']._serialized_end=1839 + _globals['_CHILD']._serialized_start=1842 + _globals['_CHILD']._serialized_end=2350 + _globals['_STATION']._serialized_start=2353 + _globals['_STATION']._serialized_end=2771 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2774 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2917 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=2919 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=2996 + _globals['_CHILDPHOTO']._serialized_start=2999 + _globals['_CHILDPHOTO']._serialized_end=3172 + _globals['_BOARDINGRECORD']._serialized_start=3175 + _globals['_BOARDINGRECORD']._serialized_end=3348 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi index e7546cd4..9d5b49cd 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi @@ -38,14 +38,14 @@ BUS_TYPE_MORNING: BusType BUS_TYPE_EVENING: BusType class Nursery(_message.Message): - __slots__ = ("id", "nursery_code", "name", "address", "phone_number", "email", "encrypted_password", "created_at", "updated_at") + __slots__ = ("id", "nursery_code", "name", "address", "phone_number", "email", "hashed_password", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_CODE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] ADDRESS_FIELD_NUMBER: _ClassVar[int] PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] EMAIL_FIELD_NUMBER: _ClassVar[int] - ENCRYPTED_PASSWORD_FIELD_NUMBER: _ClassVar[int] + HASHED_PASSWORD_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str @@ -54,10 +54,10 @@ class Nursery(_message.Message): address: str phone_number: str email: str - encrypted_password: str + hashed_password: str created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_code: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., encrypted_password: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_code: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., hashed_password: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class NurseryResponse(_message.Message): __slots__ = ("id", "nursery_code", "name", "address", "phone_number", "email", "created_at", "updated_at") @@ -80,13 +80,15 @@ class NurseryResponse(_message.Message): def __init__(self, id: _Optional[str] = ..., nursery_code: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Guardian(_message.Message): - __slots__ = ("id", "nursery_id", "name", "email", "phone_number", "encrypted_password", "created_at", "updated_at") + __slots__ = ("id", "nursery_id", "name", "email", "phone_number", "hashed_password", "is_use_morning_bus", "is_use_evening_bus", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] EMAIL_FIELD_NUMBER: _ClassVar[int] PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] - ENCRYPTED_PASSWORD_FIELD_NUMBER: _ClassVar[int] + HASHED_PASSWORD_FIELD_NUMBER: _ClassVar[int] + IS_USE_MORNING_BUS_FIELD_NUMBER: _ClassVar[int] + IS_USE_EVENING_BUS_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str @@ -94,18 +96,22 @@ class Guardian(_message.Message): name: str email: str phone_number: str - encrypted_password: str + hashed_password: str + is_use_morning_bus: bool + is_use_evening_bus: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., encrypted_password: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., hashed_password: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class GuardianResponse(_message.Message): - __slots__ = ("id", "nursery_id", "name", "email", "phone_number", "created_at", "updated_at") + __slots__ = ("id", "nursery_id", "name", "email", "phone_number", "is_use_morning_bus", "is_use_evening_bus", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] EMAIL_FIELD_NUMBER: _ClassVar[int] PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + IS_USE_MORNING_BUS_FIELD_NUMBER: _ClassVar[int] + IS_USE_EVENING_BUS_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str @@ -113,12 +119,14 @@ class GuardianResponse(_message.Message): name: str email: str phone_number: str + is_use_morning_bus: bool + is_use_evening_bus: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Bus(_message.Message): - __slots__ = ("id", "nursery_id", "name", "plate_number", "status", "latitude", "longitude", "created_at", "updated_at") + __slots__ = ("id", "nursery_id", "name", "plate_number", "status", "latitude", "longitude", "enable_face_recognition", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -126,6 +134,7 @@ class Bus(_message.Message): STATUS_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] + ENABLE_FACE_RECOGNITION_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str @@ -135,20 +144,19 @@ class Bus(_message.Message): status: Status latitude: float longitude: float + enable_face_recognition: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., status: _Optional[_Union[Status, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., status: _Optional[_Union[Status, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Child(_message.Message): - __slots__ = ("id", "nursery_id", "guardian_id", "name", "age", "sex", "is_ride_morning_bus", "is_ride_evening_bus", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "created_at", "updated_at") + __slots__ = ("id", "nursery_id", "guardian_id", "name", "age", "sex", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] AGE_FIELD_NUMBER: _ClassVar[int] SEX_FIELD_NUMBER: _ClassVar[int] - IS_RIDE_MORNING_BUS_FIELD_NUMBER: _ClassVar[int] - IS_RIDE_EVENING_BUS_FIELD_NUMBER: _ClassVar[int] CHECK_FOR_MISSING_ITEMS_FIELD_NUMBER: _ClassVar[int] HAS_BAG_FIELD_NUMBER: _ClassVar[int] HAS_LUNCH_BOX_FIELD_NUMBER: _ClassVar[int] @@ -163,8 +171,6 @@ class Child(_message.Message): name: str age: int sex: Sex - is_ride_morning_bus: bool - is_ride_evening_bus: bool check_for_missing_items: bool has_bag: bool has_lunch_box: bool @@ -173,12 +179,14 @@ class Child(_message.Message): has_other: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[Sex, str]] = ..., is_ride_morning_bus: bool = ..., is_ride_evening_bus: bool = ..., check_for_missing_items: bool = ..., has_bag: bool = ..., has_lunch_box: bool = ..., has_water_bottle: bool = ..., has_umbrella: bool = ..., has_other: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[Sex, str]] = ..., check_for_missing_items: bool = ..., has_bag: bool = ..., has_lunch_box: bool = ..., has_water_bottle: bool = ..., has_umbrella: bool = ..., has_other: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Station(_message.Message): - __slots__ = ("id", "guardian_id", "latitude", "longitude", "morning_order", "evening_order", "created_at", "updated_at") + __slots__ = ("id", "guardian_id", "morning_next_station_id", "evening_next_station_id", "latitude", "longitude", "morning_order", "evening_order", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] + MORNING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] + EVENING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] MORNING_ORDER_FIELD_NUMBER: _ClassVar[int] @@ -187,13 +195,15 @@ class Station(_message.Message): UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str guardian_id: str + morning_next_station_id: str + evening_next_station_id: str latitude: float longitude: float morning_order: int evening_order: int created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., morning_order: _Optional[int] = ..., evening_order: _Optional[int] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., morning_next_station_id: _Optional[str] = ..., evening_next_station_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., morning_order: _Optional[int] = ..., evening_order: _Optional[int] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class ChildBusAssociation(_message.Message): __slots__ = ("id", "bus_id", "child_id", "bus_type") @@ -216,20 +226,16 @@ class BusStationAssociation(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., station_id: _Optional[str] = ...) -> None: ... class ChildPhoto(_message.Message): - __slots__ = ("id", "child_id", "s3_bucket", "s3_key", "created_at", "updated_at") + __slots__ = ("id", "child_id", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] CHILD_ID_FIELD_NUMBER: _ClassVar[int] - S3_BUCKET_FIELD_NUMBER: _ClassVar[int] - S3_KEY_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str child_id: str - s3_bucket: str - s3_key: str created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., s3_bucket: _Optional[str] = ..., s3_key: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class BoardingRecord(_message.Message): __slots__ = ("id", "child_id", "bus_id", "is_boarding", "timestamp") diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py index 5520633f..0dac39e8 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"s\n\x14\x43reateStationRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1e\n\nlongtitude\x18\x02 \x01(\x01R\nlongtitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"N\n\x15\x43reateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xd3\x01\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xf4\x01\n\x0eStationService\x12\x64\n\rCreateStation\x12(.where_child_bus.v1.CreateStationRequest\x1a).where_child_bus.v1.CreateStationResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"q\n\x14UpdateStationRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xd3\x01\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xf4\x01\n\x0eStationService\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014StationProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATESTATIONREQUEST']._serialized_start=92 - _globals['_CREATESTATIONREQUEST']._serialized_end=207 - _globals['_CREATESTATIONRESPONSE']._serialized_start=209 - _globals['_CREATESTATIONRESPONSE']._serialized_end=287 - _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_start=289 - _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_end=342 - _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=345 - _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=556 - _globals['_STATIONSERVICE']._serialized_start=559 - _globals['_STATIONSERVICE']._serialized_end=803 + _globals['_UPDATESTATIONREQUEST']._serialized_start=92 + _globals['_UPDATESTATIONREQUEST']._serialized_end=205 + _globals['_UPDATESTATIONRESPONSE']._serialized_start=207 + _globals['_UPDATESTATIONRESPONSE']._serialized_end=285 + _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_start=287 + _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_end=340 + _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=343 + _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=554 + _globals['_STATIONSERVICE']._serialized_start=557 + _globals['_STATIONSERVICE']._serialized_end=801 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi index 14a7e245..3bb846a5 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi @@ -6,17 +6,17 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor -class CreateStationRequest(_message.Message): - __slots__ = ("guardian_id", "longtitude", "latitude") +class UpdateStationRequest(_message.Message): + __slots__ = ("guardian_id", "longitude", "latitude") GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] - LONGTITUDE_FIELD_NUMBER: _ClassVar[int] + LONGITUDE_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] guardian_id: str - longtitude: float + longitude: float latitude: float - def __init__(self, guardian_id: _Optional[str] = ..., longtitude: _Optional[float] = ..., latitude: _Optional[float] = ...) -> None: ... + def __init__(self, guardian_id: _Optional[str] = ..., longitude: _Optional[float] = ..., latitude: _Optional[float] = ...) -> None: ... -class CreateStationResponse(_message.Message): +class UpdateStationResponse(_message.Message): __slots__ = ("station",) STATION_FIELD_NUMBER: _ClassVar[int] station: _resources_pb2.Station diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py index 8f5de3a1..cd8b9ac0 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py @@ -16,10 +16,10 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ - self.CreateStation = channel.unary_unary( - '/where_child_bus.v1.StationService/CreateStation', - request_serializer=where__child__bus_dot_v1_dot_station__pb2.CreateStationRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_station__pb2.CreateStationResponse.FromString, + self.UpdateStation = channel.unary_unary( + '/where_child_bus.v1.StationService/UpdateStation', + request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, ) self.GetStationListByBusId = channel.unary_unary( '/where_child_bus.v1.StationService/GetStationListByBusId', @@ -31,7 +31,7 @@ def __init__(self, channel): class StationServiceServicer(object): """Missing associated documentation comment in .proto file.""" - def CreateStation(self, request, context): + def UpdateStation(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -46,10 +46,10 @@ def GetStationListByBusId(self, request, context): def add_StationServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'CreateStation': grpc.unary_unary_rpc_method_handler( - servicer.CreateStation, - request_deserializer=where__child__bus_dot_v1_dot_station__pb2.CreateStationRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_station__pb2.CreateStationResponse.SerializeToString, + 'UpdateStation': grpc.unary_unary_rpc_method_handler( + servicer.UpdateStation, + request_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.SerializeToString, ), 'GetStationListByBusId': grpc.unary_unary_rpc_method_handler( servicer.GetStationListByBusId, @@ -67,7 +67,7 @@ class StationService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def CreateStation(request, + def UpdateStation(request, target, options=(), channel_credentials=None, @@ -77,9 +77,9 @@ def CreateStation(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/CreateStation', - where__child__bus_dot_v1_dot_station__pb2.CreateStationRequest.SerializeToString, - where__child__bus_dot_v1_dot_station__pb2.CreateStationResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/UpdateStation', + where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, + where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) From 8d62a370af5a640328bb2e1eac03a4faba3d46f5 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 19:00:10 +0900 Subject: [PATCH 284/771] feat(api): Add DuplicationCheck RPC to ChildPhotoService --- .../go/where_child_bus/v1/child_photo.pb.go | 252 ++++++++++++++---- .../where_child_bus/v1/child_photo_grpc.pb.go | 37 +++ .../where_child_bus/v1/child_photo.proto | 12 + .../where_child_bus/v1/child_photo.pb.dart | 110 ++++++++ .../v1/child_photo.pbgrpc.dart | 20 ++ .../v1/child_photo.pbjson.dart | 28 ++ .../where_child_bus/v1/child_photo_pb2.py | 18 +- .../where_child_bus/v1/child_photo_pb2.pyi | 16 ++ .../v1/child_photo_pb2_grpc.py | 33 +++ 9 files changed, 472 insertions(+), 54 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go index 73053a7f..9e15f136 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go @@ -20,6 +20,116 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type DuplicationCheckRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChildIds []string `protobuf:"bytes,1,rep,name=child_ids,json=childIds,proto3" json:"child_ids,omitempty"` +} + +func (x *DuplicationCheckRequest) Reset() { + *x = DuplicationCheckRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DuplicationCheckRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DuplicationCheckRequest) ProtoMessage() {} + +func (x *DuplicationCheckRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DuplicationCheckRequest.ProtoReflect.Descriptor instead. +func (*DuplicationCheckRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{0} +} + +func (x *DuplicationCheckRequest) GetChildIds() []string { + if x != nil { + return x.ChildIds + } + return nil +} + +type DuplicationCheckResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsDuplicated bool `protobuf:"varint,1,opt,name=is_duplicated,json=isDuplicated,proto3" json:"is_duplicated,omitempty"` + PhotoIds []string `protobuf:"bytes,2,rep,name=photo_ids,json=photoIds,proto3" json:"photo_ids,omitempty"` + DuplicatedPhotos [][]byte `protobuf:"bytes,3,rep,name=duplicated_photos,json=duplicatedPhotos,proto3" json:"duplicated_photos,omitempty"` +} + +func (x *DuplicationCheckResponse) Reset() { + *x = DuplicationCheckResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DuplicationCheckResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DuplicationCheckResponse) ProtoMessage() {} + +func (x *DuplicationCheckResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DuplicationCheckResponse.ProtoReflect.Descriptor instead. +func (*DuplicationCheckResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{1} +} + +func (x *DuplicationCheckResponse) GetIsDuplicated() bool { + if x != nil { + return x.IsDuplicated + } + return false +} + +func (x *DuplicationCheckResponse) GetPhotoIds() []string { + if x != nil { + return x.PhotoIds + } + return nil +} + +func (x *DuplicationCheckResponse) GetDuplicatedPhotos() [][]byte { + if x != nil { + return x.DuplicatedPhotos + } + return nil +} + type DeleteChildPhotoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -31,7 +141,7 @@ type DeleteChildPhotoRequest struct { func (x *DeleteChildPhotoRequest) Reset() { *x = DeleteChildPhotoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[0] + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +154,7 @@ func (x *DeleteChildPhotoRequest) String() string { func (*DeleteChildPhotoRequest) ProtoMessage() {} func (x *DeleteChildPhotoRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[0] + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +167,7 @@ func (x *DeleteChildPhotoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteChildPhotoRequest.ProtoReflect.Descriptor instead. func (*DeleteChildPhotoRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{0} + return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{2} } func (x *DeleteChildPhotoRequest) GetIds() []string { @@ -79,7 +189,7 @@ type DeleteChildPhotoResponse struct { func (x *DeleteChildPhotoResponse) Reset() { *x = DeleteChildPhotoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[1] + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -92,7 +202,7 @@ func (x *DeleteChildPhotoResponse) String() string { func (*DeleteChildPhotoResponse) ProtoMessage() {} func (x *DeleteChildPhotoResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[1] + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105,7 +215,7 @@ func (x *DeleteChildPhotoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteChildPhotoResponse.ProtoReflect.Descriptor instead. func (*DeleteChildPhotoResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{1} + return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{3} } func (x *DeleteChildPhotoResponse) GetIsSuccessList() []bool { @@ -128,39 +238,59 @@ var file_where_child_bus_v1_child_photo_proto_rawDesc = []byte{ 0x0a, 0x24, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x2b, 0x0a, 0x17, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, - 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, - 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x32, 0x82, 0x01, - 0x0a, 0x11, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x36, 0x0a, 0x17, 0x44, 0x75, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, + 0x64, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x18, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x69, 0x64, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x49, 0x64, + 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x10, 0x64, 0x75, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x2b, + 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, + 0x74, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x18, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x08, + 0x52, 0x0d, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, + 0x73, 0x32, 0xf1, 0x01, 0x0a, 0x11, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x10, 0x44, 0x75, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2b, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x75, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0xf2, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, - 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, - 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, - 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, - 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf2, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x42, 0x0f, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, + 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, + 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, + 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -175,16 +305,20 @@ func file_where_child_bus_v1_child_photo_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_child_photo_proto_rawDescData } -var file_where_child_bus_v1_child_photo_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_where_child_bus_v1_child_photo_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_where_child_bus_v1_child_photo_proto_goTypes = []interface{}{ - (*DeleteChildPhotoRequest)(nil), // 0: where_child_bus.v1.DeleteChildPhotoRequest - (*DeleteChildPhotoResponse)(nil), // 1: where_child_bus.v1.DeleteChildPhotoResponse + (*DuplicationCheckRequest)(nil), // 0: where_child_bus.v1.DuplicationCheckRequest + (*DuplicationCheckResponse)(nil), // 1: where_child_bus.v1.DuplicationCheckResponse + (*DeleteChildPhotoRequest)(nil), // 2: where_child_bus.v1.DeleteChildPhotoRequest + (*DeleteChildPhotoResponse)(nil), // 3: where_child_bus.v1.DeleteChildPhotoResponse } var file_where_child_bus_v1_child_photo_proto_depIdxs = []int32{ - 0, // 0: where_child_bus.v1.ChildPhotoService.DeleteChildPhoto:input_type -> where_child_bus.v1.DeleteChildPhotoRequest - 1, // 1: where_child_bus.v1.ChildPhotoService.DeleteChildPhoto:output_type -> where_child_bus.v1.DeleteChildPhotoResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type + 0, // 0: where_child_bus.v1.ChildPhotoService.DuplicationCheck:input_type -> where_child_bus.v1.DuplicationCheckRequest + 2, // 1: where_child_bus.v1.ChildPhotoService.DeleteChildPhoto:input_type -> where_child_bus.v1.DeleteChildPhotoRequest + 1, // 2: where_child_bus.v1.ChildPhotoService.DuplicationCheck:output_type -> where_child_bus.v1.DuplicationCheckResponse + 3, // 3: where_child_bus.v1.ChildPhotoService.DeleteChildPhoto:output_type -> where_child_bus.v1.DeleteChildPhotoResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -197,7 +331,7 @@ func file_where_child_bus_v1_child_photo_proto_init() { } if !protoimpl.UnsafeEnabled { file_where_child_bus_v1_child_photo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteChildPhotoRequest); i { + switch v := v.(*DuplicationCheckRequest); i { case 0: return &v.state case 1: @@ -209,6 +343,30 @@ func file_where_child_bus_v1_child_photo_proto_init() { } } file_where_child_bus_v1_child_photo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DuplicationCheckResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_photo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteChildPhotoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_photo_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteChildPhotoResponse); i { case 0: return &v.state @@ -227,7 +385,7 @@ func file_where_child_bus_v1_child_photo_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_child_photo_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go index 3a119427..f32d2441 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go @@ -19,6 +19,7 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( + ChildPhotoService_DuplicationCheck_FullMethodName = "/where_child_bus.v1.ChildPhotoService/DuplicationCheck" ChildPhotoService_DeleteChildPhoto_FullMethodName = "/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto" ) @@ -26,6 +27,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ChildPhotoServiceClient interface { + DuplicationCheck(ctx context.Context, in *DuplicationCheckRequest, opts ...grpc.CallOption) (*DuplicationCheckResponse, error) DeleteChildPhoto(ctx context.Context, in *DeleteChildPhotoRequest, opts ...grpc.CallOption) (*DeleteChildPhotoResponse, error) } @@ -37,6 +39,15 @@ func NewChildPhotoServiceClient(cc grpc.ClientConnInterface) ChildPhotoServiceCl return &childPhotoServiceClient{cc} } +func (c *childPhotoServiceClient) DuplicationCheck(ctx context.Context, in *DuplicationCheckRequest, opts ...grpc.CallOption) (*DuplicationCheckResponse, error) { + out := new(DuplicationCheckResponse) + err := c.cc.Invoke(ctx, ChildPhotoService_DuplicationCheck_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *childPhotoServiceClient) DeleteChildPhoto(ctx context.Context, in *DeleteChildPhotoRequest, opts ...grpc.CallOption) (*DeleteChildPhotoResponse, error) { out := new(DeleteChildPhotoResponse) err := c.cc.Invoke(ctx, ChildPhotoService_DeleteChildPhoto_FullMethodName, in, out, opts...) @@ -50,6 +61,7 @@ func (c *childPhotoServiceClient) DeleteChildPhoto(ctx context.Context, in *Dele // All implementations should embed UnimplementedChildPhotoServiceServer // for forward compatibility type ChildPhotoServiceServer interface { + DuplicationCheck(context.Context, *DuplicationCheckRequest) (*DuplicationCheckResponse, error) DeleteChildPhoto(context.Context, *DeleteChildPhotoRequest) (*DeleteChildPhotoResponse, error) } @@ -57,6 +69,9 @@ type ChildPhotoServiceServer interface { type UnimplementedChildPhotoServiceServer struct { } +func (UnimplementedChildPhotoServiceServer) DuplicationCheck(context.Context, *DuplicationCheckRequest) (*DuplicationCheckResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DuplicationCheck not implemented") +} func (UnimplementedChildPhotoServiceServer) DeleteChildPhoto(context.Context, *DeleteChildPhotoRequest) (*DeleteChildPhotoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteChildPhoto not implemented") } @@ -72,6 +87,24 @@ func RegisterChildPhotoServiceServer(s grpc.ServiceRegistrar, srv ChildPhotoServ s.RegisterService(&ChildPhotoService_ServiceDesc, srv) } +func _ChildPhotoService_DuplicationCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DuplicationCheckRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChildPhotoServiceServer).DuplicationCheck(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChildPhotoService_DuplicationCheck_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChildPhotoServiceServer).DuplicationCheck(ctx, req.(*DuplicationCheckRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ChildPhotoService_DeleteChildPhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteChildPhotoRequest) if err := dec(in); err != nil { @@ -97,6 +130,10 @@ var ChildPhotoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "where_child_bus.v1.ChildPhotoService", HandlerType: (*ChildPhotoServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "DuplicationCheck", + Handler: _ChildPhotoService_DuplicationCheck_Handler, + }, { MethodName: "DeleteChildPhoto", Handler: _ChildPhotoService_DeleteChildPhoto_Handler, diff --git a/backend/proto/where_child_bus/v1/child_photo.proto b/backend/proto/where_child_bus/v1/child_photo.proto index db240302..d1009883 100644 --- a/backend/proto/where_child_bus/v1/child_photo.proto +++ b/backend/proto/where_child_bus/v1/child_photo.proto @@ -3,9 +3,21 @@ syntax = "proto3"; package where_child_bus.v1; service ChildPhotoService { + rpc DuplicationCheck(DuplicationCheckRequest) returns (DuplicationCheckResponse); rpc DeleteChildPhoto(DeleteChildPhotoRequest) returns (DeleteChildPhotoResponse); } +message DuplicationCheckRequest { + repeated string child_ids = 1; +} + +message DuplicationCheckResponse { + bool is_duplicated = 1; + repeated string photo_ids = 2; + repeated bytes duplicated_photos = 3; +} + + message DeleteChildPhotoRequest { repeated string ids = 1; } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart index 2c4685df..1017ce19 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart @@ -13,6 +13,116 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +class DuplicationCheckRequest extends $pb.GeneratedMessage { + factory DuplicationCheckRequest({ + $core.Iterable<$core.String>? childIds, + }) { + final $result = create(); + if (childIds != null) { + $result.childIds.addAll(childIds); + } + return $result; + } + DuplicationCheckRequest._() : super(); + factory DuplicationCheckRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DuplicationCheckRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DuplicationCheckRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'childIds') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DuplicationCheckRequest clone() => DuplicationCheckRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DuplicationCheckRequest copyWith(void Function(DuplicationCheckRequest) updates) => super.copyWith((message) => updates(message as DuplicationCheckRequest)) as DuplicationCheckRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DuplicationCheckRequest create() => DuplicationCheckRequest._(); + DuplicationCheckRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DuplicationCheckRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DuplicationCheckRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.String> get childIds => $_getList(0); +} + +class DuplicationCheckResponse extends $pb.GeneratedMessage { + factory DuplicationCheckResponse({ + $core.bool? isDuplicated, + $core.Iterable<$core.String>? photoIds, + $core.Iterable<$core.List<$core.int>>? duplicatedPhotos, + }) { + final $result = create(); + if (isDuplicated != null) { + $result.isDuplicated = isDuplicated; + } + if (photoIds != null) { + $result.photoIds.addAll(photoIds); + } + if (duplicatedPhotos != null) { + $result.duplicatedPhotos.addAll(duplicatedPhotos); + } + return $result; + } + DuplicationCheckResponse._() : super(); + factory DuplicationCheckResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DuplicationCheckResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DuplicationCheckResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'isDuplicated') + ..pPS(2, _omitFieldNames ? '' : 'photoIds') + ..p<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'duplicatedPhotos', $pb.PbFieldType.PY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DuplicationCheckResponse clone() => DuplicationCheckResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DuplicationCheckResponse copyWith(void Function(DuplicationCheckResponse) updates) => super.copyWith((message) => updates(message as DuplicationCheckResponse)) as DuplicationCheckResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DuplicationCheckResponse create() => DuplicationCheckResponse._(); + DuplicationCheckResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DuplicationCheckResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DuplicationCheckResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get isDuplicated => $_getBF(0); + @$pb.TagNumber(1) + set isDuplicated($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasIsDuplicated() => $_has(0); + @$pb.TagNumber(1) + void clearIsDuplicated() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.String> get photoIds => $_getList(1); + + @$pb.TagNumber(3) + $core.List<$core.List<$core.int>> get duplicatedPhotos => $_getList(2); +} + class DeleteChildPhotoRequest extends $pb.GeneratedMessage { factory DeleteChildPhotoRequest({ $core.Iterable<$core.String>? ids, diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart index aba19865..a320d57c 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart @@ -21,6 +21,10 @@ export 'child_photo.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.ChildPhotoService') class ChildPhotoServiceClient extends $grpc.Client { + static final _$duplicationCheck = $grpc.ClientMethod<$2.DuplicationCheckRequest, $2.DuplicationCheckResponse>( + '/where_child_bus.v1.ChildPhotoService/DuplicationCheck', + ($2.DuplicationCheckRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.DuplicationCheckResponse.fromBuffer(value)); static final _$deleteChildPhoto = $grpc.ClientMethod<$2.DeleteChildPhotoRequest, $2.DeleteChildPhotoResponse>( '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', ($2.DeleteChildPhotoRequest value) => value.writeToBuffer(), @@ -32,6 +36,10 @@ class ChildPhotoServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); + $grpc.ResponseFuture<$2.DuplicationCheckResponse> duplicationCheck($2.DuplicationCheckRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$duplicationCheck, request, options: options); + } + $grpc.ResponseFuture<$2.DeleteChildPhotoResponse> deleteChildPhoto($2.DeleteChildPhotoRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$deleteChildPhoto, request, options: options); } @@ -42,6 +50,13 @@ abstract class ChildPhotoServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.ChildPhotoService'; ChildPhotoServiceBase() { + $addMethod($grpc.ServiceMethod<$2.DuplicationCheckRequest, $2.DuplicationCheckResponse>( + 'DuplicationCheck', + duplicationCheck_Pre, + false, + false, + ($core.List<$core.int> value) => $2.DuplicationCheckRequest.fromBuffer(value), + ($2.DuplicationCheckResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$2.DeleteChildPhotoRequest, $2.DeleteChildPhotoResponse>( 'DeleteChildPhoto', deleteChildPhoto_Pre, @@ -51,9 +66,14 @@ abstract class ChildPhotoServiceBase extends $grpc.Service { ($2.DeleteChildPhotoResponse value) => value.writeToBuffer())); } + $async.Future<$2.DuplicationCheckResponse> duplicationCheck_Pre($grpc.ServiceCall call, $async.Future<$2.DuplicationCheckRequest> request) async { + return duplicationCheck(call, await request); + } + $async.Future<$2.DeleteChildPhotoResponse> deleteChildPhoto_Pre($grpc.ServiceCall call, $async.Future<$2.DeleteChildPhotoRequest> request) async { return deleteChildPhoto(call, await request); } + $async.Future<$2.DuplicationCheckResponse> duplicationCheck($grpc.ServiceCall call, $2.DuplicationCheckRequest request); $async.Future<$2.DeleteChildPhotoResponse> deleteChildPhoto($grpc.ServiceCall call, $2.DeleteChildPhotoRequest request); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart index 68039071..0bd75499 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart @@ -13,6 +13,34 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use duplicationCheckRequestDescriptor instead') +const DuplicationCheckRequest$json = { + '1': 'DuplicationCheckRequest', + '2': [ + {'1': 'child_ids', '3': 1, '4': 3, '5': 9, '10': 'childIds'}, + ], +}; + +/// Descriptor for `DuplicationCheckRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List duplicationCheckRequestDescriptor = $convert.base64Decode( + 'ChdEdXBsaWNhdGlvbkNoZWNrUmVxdWVzdBIbCgljaGlsZF9pZHMYASADKAlSCGNoaWxkSWRz'); + +@$core.Deprecated('Use duplicationCheckResponseDescriptor instead') +const DuplicationCheckResponse$json = { + '1': 'DuplicationCheckResponse', + '2': [ + {'1': 'is_duplicated', '3': 1, '4': 1, '5': 8, '10': 'isDuplicated'}, + {'1': 'photo_ids', '3': 2, '4': 3, '5': 9, '10': 'photoIds'}, + {'1': 'duplicated_photos', '3': 3, '4': 3, '5': 12, '10': 'duplicatedPhotos'}, + ], +}; + +/// Descriptor for `DuplicationCheckResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List duplicationCheckResponseDescriptor = $convert.base64Decode( + 'ChhEdXBsaWNhdGlvbkNoZWNrUmVzcG9uc2USIwoNaXNfZHVwbGljYXRlZBgBIAEoCFIMaXNEdX' + 'BsaWNhdGVkEhsKCXBob3RvX2lkcxgCIAMoCVIIcGhvdG9JZHMSKwoRZHVwbGljYXRlZF9waG90' + 'b3MYAyADKAxSEGR1cGxpY2F0ZWRQaG90b3M='); + @$core.Deprecated('Use deleteChildPhotoRequestDescriptor instead') const DeleteChildPhotoRequest$json = { '1': 'DeleteChildPhotoRequest', diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py index 3b0c7e8b..3d283741 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$where_child_bus/v1/child_photo.proto\x12\x12where_child_bus.v1\"+\n\x17\x44\x65leteChildPhotoRequest\x12\x10\n\x03ids\x18\x01 \x03(\tR\x03ids\"T\n\x18\x44\x65leteChildPhotoResponse\x12&\n\x0fis_success_list\x18\x01 \x03(\x08R\risSuccessList\x12\x10\n\x03ids\x18\x02 \x03(\tR\x03ids2\x82\x01\n\x11\x43hildPhotoService\x12m\n\x10\x44\x65leteChildPhoto\x12+.where_child_bus.v1.DeleteChildPhotoRequest\x1a,.where_child_bus.v1.DeleteChildPhotoResponseB\xf2\x01\n\x16\x63om.where_child_bus.v1B\x0f\x43hildPhotoProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$where_child_bus/v1/child_photo.proto\x12\x12where_child_bus.v1\"6\n\x17\x44uplicationCheckRequest\x12\x1b\n\tchild_ids\x18\x01 \x03(\tR\x08\x63hildIds\"\x89\x01\n\x18\x44uplicationCheckResponse\x12#\n\ris_duplicated\x18\x01 \x01(\x08R\x0cisDuplicated\x12\x1b\n\tphoto_ids\x18\x02 \x03(\tR\x08photoIds\x12+\n\x11\x64uplicated_photos\x18\x03 \x03(\x0cR\x10\x64uplicatedPhotos\"+\n\x17\x44\x65leteChildPhotoRequest\x12\x10\n\x03ids\x18\x01 \x03(\tR\x03ids\"T\n\x18\x44\x65leteChildPhotoResponse\x12&\n\x0fis_success_list\x18\x01 \x03(\x08R\risSuccessList\x12\x10\n\x03ids\x18\x02 \x03(\tR\x03ids2\xf1\x01\n\x11\x43hildPhotoService\x12m\n\x10\x44uplicationCheck\x12+.where_child_bus.v1.DuplicationCheckRequest\x1a,.where_child_bus.v1.DuplicationCheckResponse\x12m\n\x10\x44\x65leteChildPhoto\x12+.where_child_bus.v1.DeleteChildPhotoRequest\x1a,.where_child_bus.v1.DeleteChildPhotoResponseB\xf2\x01\n\x16\x63om.where_child_bus.v1B\x0f\x43hildPhotoProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -22,10 +22,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\017ChildPhotoProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_DELETECHILDPHOTOREQUEST']._serialized_start=60 - _globals['_DELETECHILDPHOTOREQUEST']._serialized_end=103 - _globals['_DELETECHILDPHOTORESPONSE']._serialized_start=105 - _globals['_DELETECHILDPHOTORESPONSE']._serialized_end=189 - _globals['_CHILDPHOTOSERVICE']._serialized_start=192 - _globals['_CHILDPHOTOSERVICE']._serialized_end=322 + _globals['_DUPLICATIONCHECKREQUEST']._serialized_start=60 + _globals['_DUPLICATIONCHECKREQUEST']._serialized_end=114 + _globals['_DUPLICATIONCHECKRESPONSE']._serialized_start=117 + _globals['_DUPLICATIONCHECKRESPONSE']._serialized_end=254 + _globals['_DELETECHILDPHOTOREQUEST']._serialized_start=256 + _globals['_DELETECHILDPHOTOREQUEST']._serialized_end=299 + _globals['_DELETECHILDPHOTORESPONSE']._serialized_start=301 + _globals['_DELETECHILDPHOTORESPONSE']._serialized_end=385 + _globals['_CHILDPHOTOSERVICE']._serialized_start=388 + _globals['_CHILDPHOTOSERVICE']._serialized_end=629 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi index 8f15f214..718db86b 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi @@ -5,6 +5,22 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Op DESCRIPTOR: _descriptor.FileDescriptor +class DuplicationCheckRequest(_message.Message): + __slots__ = ("child_ids",) + CHILD_IDS_FIELD_NUMBER: _ClassVar[int] + child_ids: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, child_ids: _Optional[_Iterable[str]] = ...) -> None: ... + +class DuplicationCheckResponse(_message.Message): + __slots__ = ("is_duplicated", "photo_ids", "duplicated_photos") + IS_DUPLICATED_FIELD_NUMBER: _ClassVar[int] + PHOTO_IDS_FIELD_NUMBER: _ClassVar[int] + DUPLICATED_PHOTOS_FIELD_NUMBER: _ClassVar[int] + is_duplicated: bool + photo_ids: _containers.RepeatedScalarFieldContainer[str] + duplicated_photos: _containers.RepeatedScalarFieldContainer[bytes] + def __init__(self, is_duplicated: bool = ..., photo_ids: _Optional[_Iterable[str]] = ..., duplicated_photos: _Optional[_Iterable[bytes]] = ...) -> None: ... + class DeleteChildPhotoRequest(_message.Message): __slots__ = ("ids",) IDS_FIELD_NUMBER: _ClassVar[int] diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py index ef9b2478..35f45fd1 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py @@ -16,6 +16,11 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.DuplicationCheck = channel.unary_unary( + '/where_child_bus.v1.ChildPhotoService/DuplicationCheck', + request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.FromString, + ) self.DeleteChildPhoto = channel.unary_unary( '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.SerializeToString, @@ -26,6 +31,12 @@ def __init__(self, channel): class ChildPhotoServiceServicer(object): """Missing associated documentation comment in .proto file.""" + def DuplicationCheck(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def DeleteChildPhoto(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -35,6 +46,11 @@ def DeleteChildPhoto(self, request, context): def add_ChildPhotoServiceServicer_to_server(servicer, server): rpc_method_handlers = { + 'DuplicationCheck': grpc.unary_unary_rpc_method_handler( + servicer.DuplicationCheck, + request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.SerializeToString, + ), 'DeleteChildPhoto': grpc.unary_unary_rpc_method_handler( servicer.DeleteChildPhoto, request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.FromString, @@ -50,6 +66,23 @@ def add_ChildPhotoServiceServicer_to_server(servicer, server): class ChildPhotoService(object): """Missing associated documentation comment in .proto file.""" + @staticmethod + def DuplicationCheck(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildPhotoService/DuplicationCheck', + where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.SerializeToString, + where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def DeleteChildPhoto(request, target, From e853d10d6fb6a54bd180fce8826d3e390c8c9a54 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 19:11:14 +0900 Subject: [PATCH 285/771] =?UTF-8?q?feat:=E5=AD=90=E4=BE=9B=E3=82=92?= =?UTF-8?q?=E8=A4=87=E6=95=B0=E4=BA=BA=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=B9=E3=83=A9=E3=82=A4=E3=83=80=E3=83=BC=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/daily_page/daily_page.dart | 77 +++++++++++-------- .../where_child_bus_guardian/pubspec.yaml | 1 + 2 files changed, 48 insertions(+), 30 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index 06faea96..bf10d593 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:carousel_slider/carousel_slider.dart'; import 'package:where_child_bus_guardian/components/utils/current_time_body.dart'; class DailyPage extends StatefulWidget { @@ -9,7 +10,9 @@ class DailyPage extends StatefulWidget { } class _DailyPageState extends State { - //TODO: 将来的に真偽値を受け取る + //TODO: 将来的にChild型を受け取る + final List childNames = ["園児1", "園児2", "園児3"]; + var isBoarding = true; var hasBag = false; var hasLunchBox = true; @@ -27,19 +30,35 @@ class _DailyPageState extends State { const SizedBox( height: 20, ), - childDailyRecordBody(context) + childDailyRecordSlider(context) ], ), ); } - Widget childDailyRecordBody(BuildContext context) { + Widget childDailyRecordSlider(BuildContext context) { + List recordList = childNames.map((name) { + return childDailyRecordBody(context, name); + }).toList(); + return CarouselSlider( + items: recordList, + options: CarouselOptions( + height: MediaQuery.of(context).size.height * 0.6, + initialPage: 0, + autoPlay: false, + viewportFraction: 1, + enableInfiniteScroll: true, + ), + ); + } + + Widget childDailyRecordBody(BuildContext context, String name) { return Column( children: [ childFaceAndExpression(), Padding( padding: const EdgeInsets.only(top: 20, bottom: 10), - child: childName()), + child: childName(name)), statusIconAndStatusField( Icons.directions_bus, isBoardingStatusField(context)), statusIconAndStatusField(Icons.business_center, childItemList(context)), @@ -78,10 +97,9 @@ class _DailyPageState extends State { ); } - //TODO: 将来的に名前を受け取る - Widget childName() { - return const Text( - "園児1", + Widget childName(String name) { + return Text( + name, style: TextStyle(fontSize: 24), textAlign: TextAlign.center, ); @@ -105,21 +123,12 @@ class _DailyPageState extends State { Widget isBoardingStatusField(context) { return Container( width: MediaQuery.of(context).size.width * 0.5, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(5), - border: Border.all( - color: isBoarding ? Colors.red : Colors.green, - ), - color: isBoarding ? Colors.red[100] : Colors.green[100], - ), + decoration: statusFieldDecoration(!isBoarding), child: Padding( padding: const EdgeInsets.all(10.0), child: Text( isBoarding ? "乗車中" : "降車済", - style: TextStyle( - fontSize: 16, - color: isBoarding ? Colors.red : Colors.green, - ), + style: statusFieldTextStyle(!isBoarding), textAlign: TextAlign.center, )), ); @@ -146,23 +155,31 @@ class _DailyPageState extends State { Widget itemText(String itemName, bool hasItem) { return Container( width: MediaQuery.of(context).size.width * 0.24, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(5), - border: Border.all( - color: hasItem ? Colors.green : Colors.red, - ), - color: hasItem ? Colors.green[100] : Colors.red[100], - ), + decoration: statusFieldDecoration(hasItem), child: Padding( padding: const EdgeInsets.only(top: 10.0, bottom: 10.0), child: Text( itemName, - style: TextStyle( - fontSize: 16, - color: hasItem ? Colors.green : Colors.red, - ), + style: statusFieldTextStyle(hasItem), textAlign: TextAlign.center, ), )); } + + BoxDecoration statusFieldDecoration(bool isTrue) { + return BoxDecoration( + borderRadius: BorderRadius.circular(5), + border: Border.all( + color: isTrue ? Colors.green : Colors.red, + ), + color: isTrue ? Colors.green[100] : Colors.red[100], + ); + } + + TextStyle statusFieldTextStyle(bool isTrue) { + return TextStyle( + fontSize: 16, + color: isTrue ? Colors.green : Colors.red, + ); + } } diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index c5a24e9a..bd1b9a13 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -16,6 +16,7 @@ dependencies: cupertino_icons: ^1.0.2 flutter_toggle_tab: ^1.4.1 + carousel_slider: ^4.2.1 dev_dependencies: flutter_test: From 51573aa1589fc879ffcdf81cd52e8a2ca05a6374 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 19:41:31 +0900 Subject: [PATCH 286/771] =?UTF-8?q?refactor:=E5=AD=90=E4=BE=9B=E3=81=AE?= =?UTF-8?q?=E6=83=85=E5=A0=B1=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E9=83=A8?= =?UTF-8?q?=E5=88=86=E3=82=92=E3=82=AF=E3=83=A9=E3=82=B9=E3=81=AB=E5=88=86?= =?UTF-8?q?=E5=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/daily_record_body.dart | 131 ++++++++++++++++ .../lib/pages/daily_page/daily_page.dart | 142 +----------------- .../lib/pages/daily_page/styles/styles.dart | 18 +++ .../where_child_bus_guardian/pubspec.lock | 8 + 4 files changed, 160 insertions(+), 139 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart create mode 100644 frontend/where_child_bus_guardian/lib/pages/daily_page/styles/styles.dart diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart new file mode 100644 index 00000000..897378ea --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -0,0 +1,131 @@ +import 'package:flutter/material.dart'; +import '../styles/styles.dart'; + +class DailyRecordBody extends StatefulWidget { + final String childName; + + const DailyRecordBody({super.key, required this.childName}); + + @override + State createState() => _DailyRecordBody(); +} + +class _DailyRecordBody extends State { + //TODO: 将来的にChild型を受け取る + var isBoarding = true; + var hasBag = true; + var hasLunchBox = true; + var hasWaterBottle = true; + var hasUmbrella = true; + + @override + Widget build(BuildContext context) { + return Column( + children: [ + childFaceAndExpression(), + Padding( + padding: const EdgeInsets.only(top: 20, bottom: 10), + child: Text( + widget.childName, + style: TextStyle(fontSize: 24), + textAlign: TextAlign.center, + )), + statusIconAndStatusField( + Icons.directions_bus, isBoardingStatusField(context)), + statusIconAndStatusField(Icons.business_center, childItemList(context)), + ], + ); + } + + Widget childFaceAndExpression() { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [childFaceImage(), childExpressionIcon()], + ); + } + + //TODO: 将来的に画像を受け取る + Widget childFaceImage() { + return const SizedBox( + width: 150, + height: 150, + child: Card( + color: Colors.grey, + child: Text("ここに子供の写真が入る"), + ), + ); + } + + //TODO: 将来的に表情を受け取り、アイコンを表示する + Widget childExpressionIcon() { + return const SizedBox( + width: 100, + height: 100, + child: Card( + color: Colors.grey, + child: Text("ここに表情のアイコンが入る"), + ), + ); + } + + Widget statusIconAndStatusField(IconData icon, Widget statusField) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.9, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Icon( + icon, + size: 80, + ), + statusField, + ], + )); + } + + Widget isBoardingStatusField(context) { + return Container( + width: MediaQuery.of(context).size.width * 0.5, + decoration: statusFieldDecoration(!isBoarding), + child: Padding( + padding: const EdgeInsets.all(10.0), + child: Text( + isBoarding ? "乗車中" : "降車済", + style: statusFieldTextStyle(!isBoarding), + textAlign: TextAlign.center, + )), + ); + } + + Widget childItemList(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.5, + child: Wrap( + direction: Axis.horizontal, + alignment: WrapAlignment.spaceBetween, + runAlignment: WrapAlignment.spaceBetween, + runSpacing: 4.0, + children: [ + itemText("かばん", hasBag), + itemText("お弁当", hasLunchBox), + itemText("水筒", hasWaterBottle), + itemText("傘", hasUmbrella), + ], + ), + ); + } + + Widget itemText(String itemName, bool hasItem) { + return Container( + width: MediaQuery.of(context).size.width * 0.24, + decoration: statusFieldDecoration(hasItem), + child: Padding( + padding: const EdgeInsets.only(top: 10.0, bottom: 10.0), + child: Text( + itemName, + style: statusFieldTextStyle(hasItem), + textAlign: TextAlign.center, + ), + )); + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index bf10d593..94f8a9c9 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:where_child_bus_guardian/components/utils/current_time_body.dart'; +import 'package:where_child_bus_guardian/pages/daily_page/components/daily_record_body.dart'; class DailyPage extends StatefulWidget { const DailyPage({super.key}); @@ -11,13 +12,7 @@ class DailyPage extends StatefulWidget { class _DailyPageState extends State { //TODO: 将来的にChild型を受け取る - final List childNames = ["園児1", "園児2", "園児3"]; - - var isBoarding = true; - var hasBag = false; - var hasLunchBox = true; - var hasWaterBottle = true; - var hasUmbrella = true; + final List childNames = ["園児1", "園児2"]; @override Widget build(BuildContext context) { @@ -38,7 +33,7 @@ class _DailyPageState extends State { Widget childDailyRecordSlider(BuildContext context) { List recordList = childNames.map((name) { - return childDailyRecordBody(context, name); + return DailyRecordBody(childName: name); }).toList(); return CarouselSlider( items: recordList, @@ -51,135 +46,4 @@ class _DailyPageState extends State { ), ); } - - Widget childDailyRecordBody(BuildContext context, String name) { - return Column( - children: [ - childFaceAndExpression(), - Padding( - padding: const EdgeInsets.only(top: 20, bottom: 10), - child: childName(name)), - statusIconAndStatusField( - Icons.directions_bus, isBoardingStatusField(context)), - statusIconAndStatusField(Icons.business_center, childItemList(context)), - ], - ); - } - - Widget childFaceAndExpression() { - return Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [childFaceImage(), childExpressionIcon()], - ); - } - - //TODO: 将来的に画像を受け取る - Widget childFaceImage() { - return const SizedBox( - width: 150, - height: 150, - child: Card( - color: Colors.grey, - child: Text("ここに子供の写真が入る"), - ), - ); - } - - //TODO: 将来的に表情を受け取り、アイコンを表示する - Widget childExpressionIcon() { - return const SizedBox( - width: 100, - height: 100, - child: Card( - color: Colors.grey, - child: Text("ここに表情のアイコンが入る"), - ), - ); - } - - Widget childName(String name) { - return Text( - name, - style: TextStyle(fontSize: 24), - textAlign: TextAlign.center, - ); - } - - Widget statusIconAndStatusField(IconData icon, Widget statusField) { - return SizedBox( - width: MediaQuery.of(context).size.width * 0.9, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Icon( - icon, - size: 80, - ), - statusField, - ], - )); - } - - Widget isBoardingStatusField(context) { - return Container( - width: MediaQuery.of(context).size.width * 0.5, - decoration: statusFieldDecoration(!isBoarding), - child: Padding( - padding: const EdgeInsets.all(10.0), - child: Text( - isBoarding ? "乗車中" : "降車済", - style: statusFieldTextStyle(!isBoarding), - textAlign: TextAlign.center, - )), - ); - } - - Widget childItemList(BuildContext context) { - return SizedBox( - width: MediaQuery.of(context).size.width * 0.5, - child: Wrap( - direction: Axis.horizontal, - alignment: WrapAlignment.spaceBetween, - runAlignment: WrapAlignment.spaceBetween, - runSpacing: 4.0, - children: [ - itemText("かばん", hasBag), - itemText("お弁当", hasLunchBox), - itemText("水筒", hasWaterBottle), - itemText("傘", hasUmbrella), - ], - ), - ); - } - - Widget itemText(String itemName, bool hasItem) { - return Container( - width: MediaQuery.of(context).size.width * 0.24, - decoration: statusFieldDecoration(hasItem), - child: Padding( - padding: const EdgeInsets.only(top: 10.0, bottom: 10.0), - child: Text( - itemName, - style: statusFieldTextStyle(hasItem), - textAlign: TextAlign.center, - ), - )); - } - - BoxDecoration statusFieldDecoration(bool isTrue) { - return BoxDecoration( - borderRadius: BorderRadius.circular(5), - border: Border.all( - color: isTrue ? Colors.green : Colors.red, - ), - color: isTrue ? Colors.green[100] : Colors.red[100], - ); - } - - TextStyle statusFieldTextStyle(bool isTrue) { - return TextStyle( - fontSize: 16, - color: isTrue ? Colors.green : Colors.red, - ); - } } diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/styles/styles.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/styles/styles.dart new file mode 100644 index 00000000..4f57976e --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/styles/styles.dart @@ -0,0 +1,18 @@ +import 'package:flutter/material.dart'; + +BoxDecoration statusFieldDecoration(bool isTrue) { + return BoxDecoration( + borderRadius: BorderRadius.circular(5), + border: Border.all( + color: isTrue ? Colors.green : Colors.red, + ), + color: isTrue ? Colors.green[100] : Colors.red[100], + ); +} + +TextStyle statusFieldTextStyle(bool isTrue) { + return TextStyle( + fontSize: 16, + color: isTrue ? Colors.green : Colors.red, + ); +} diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index f89addc7..1d483b77 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -33,6 +33,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + carousel_slider: + dependency: "direct main" + description: + name: carousel_slider + sha256: "9c695cc963bf1d04a47bd6021f68befce8970bcd61d24938e1fb0918cf5d9c42" + url: "https://pub.dev" + source: hosted + version: "4.2.1" characters: dependency: transitive description: From 8b95b18fd244c7aea5515ad922b2c0deb91d6ee9 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 20:43:22 +0900 Subject: [PATCH 287/771] =?UTF-8?q?feat:=E3=83=89=E3=83=83=E3=83=88?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=B8=E3=82=B1=E3=83=BC=E3=82=BF=E3=83=BC?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/daily_record_slider.dart | 67 +++++++++++++++++++ .../lib/pages/daily_page/daily_page.dart | 23 +------ .../where_child_bus_guardian/pubspec.lock | 32 +++++++++ .../where_child_bus_guardian/pubspec.yaml | 1 + 4 files changed, 103 insertions(+), 20 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart new file mode 100644 index 00000000..638fa0cd --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart @@ -0,0 +1,67 @@ +import 'package:flutter/material.dart'; +import 'package:carousel_slider/carousel_slider.dart'; +import 'package:where_child_bus_guardian/pages/daily_page/components/daily_record_body.dart'; + +class DailyRecordSlider extends StatefulWidget { + final List childNames; + + const DailyRecordSlider({super.key, required this.childNames}); + + @override + State createState() => _DailyRecordSlider(); +} + +class _DailyRecordSlider extends State { + int currentIndex = 0; + + @override + Widget build(BuildContext context) { + List recordList = widget.childNames.map((childName) { + return DailyRecordBody(childName: childName); + }).toList(); + + return Column( + children: [ + recordCarouselSlider(recordList), + const SizedBox(height: 10), + dotIndicator(recordList) + ], + ); + } + + Widget recordCarouselSlider(List recordList) { + return CarouselSlider( + items: recordList, + options: CarouselOptions( + height: MediaQuery.of(context).size.height * 0.55, + initialPage: 0, + autoPlay: false, + viewportFraction: 1, + enableInfiniteScroll: true, + onPageChanged: ((index, reason) { + setState(() { + currentIndex = index; + }); + }), + ), + ); + } + + Widget dotIndicator(List recordList) { + return Row( + mainAxisAlignment: MainAxisAlignment.center, + children: recordList.map((url) { + int index = recordList.indexOf(url); + return Container( + width: 8.0, + height: 8.0, + margin: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 2.0), + decoration: BoxDecoration( + shape: BoxShape.circle, + color: + currentIndex == index ? Colors.grey[800] : Colors.grey[500]), + ); + }).toList(), + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index 94f8a9c9..a0ec3868 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:carousel_slider/carousel_slider.dart'; import 'package:where_child_bus_guardian/components/utils/current_time_body.dart'; -import 'package:where_child_bus_guardian/pages/daily_page/components/daily_record_body.dart'; +import 'package:where_child_bus_guardian/pages/daily_page/components/daily_record_slider.dart'; class DailyPage extends StatefulWidget { const DailyPage({super.key}); @@ -12,7 +11,7 @@ class DailyPage extends StatefulWidget { class _DailyPageState extends State { //TODO: 将来的にChild型を受け取る - final List childNames = ["園児1", "園児2"]; + final List childNames = ["園児1", "園児2", "園児3"]; @override Widget build(BuildContext context) { @@ -25,25 +24,9 @@ class _DailyPageState extends State { const SizedBox( height: 20, ), - childDailyRecordSlider(context) + DailyRecordSlider(childNames: childNames), ], ), ); } - - Widget childDailyRecordSlider(BuildContext context) { - List recordList = childNames.map((name) { - return DailyRecordBody(childName: name); - }).toList(); - return CarouselSlider( - items: recordList, - options: CarouselOptions( - height: MediaQuery.of(context).size.height * 0.6, - initialPage: 0, - autoPlay: false, - viewportFraction: 1, - enableInfiniteScroll: true, - ), - ); - } } diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index 1d483b77..2e418455 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -126,6 +126,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + flutter_state_notifier: + dependency: "direct main" + description: + name: flutter_state_notifier + sha256: bd8d4eabd4b74f11733409305369c112fa2f7989290f73ee75ae2cbfcf04b8a3 + url: "https://pub.dev" + source: hosted + version: "1.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -219,6 +227,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" path: dependency: transitive description: @@ -243,6 +259,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.0" + provider: + dependency: transitive + description: + name: provider + sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096" + url: "https://pub.dev" + source: hosted + version: "6.1.1" sky_engine: dependency: transitive description: flutter @@ -264,6 +288,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.11.1" + state_notifier: + dependency: transitive + description: + name: state_notifier + sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb + url: "https://pub.dev" + source: hosted + version: "1.0.0" stream_channel: dependency: transitive description: diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index bd1b9a13..58fa9e6c 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -17,6 +17,7 @@ dependencies: cupertino_icons: ^1.0.2 flutter_toggle_tab: ^1.4.1 carousel_slider: ^4.2.1 + flutter_state_notifier: ^1.0.0 dev_dependencies: flutter_test: From fbd4e65ff490924e17d84c044b8e52291a893dfc Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 21:09:34 +0900 Subject: [PATCH 288/771] =?UTF-8?q?feat:=E5=BF=98=E3=82=8C=E7=89=A9?= =?UTF-8?q?=E3=81=AE=E6=9C=89=E7=84=A1=E3=81=AB=E3=82=A2=E3=82=A4=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/daily_record_body.dart | 29 ++++++++++++------- .../lib/pages/daily_page/styles/styles.dart | 2 +- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 897378ea..9cc0dc53 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -13,7 +13,7 @@ class DailyRecordBody extends StatefulWidget { class _DailyRecordBody extends State { //TODO: 将来的にChild型を受け取る var isBoarding = true; - var hasBag = true; + var hasBag = false; var hasLunchBox = true; var hasWaterBottle = true; var hasUmbrella = true; @@ -116,16 +116,25 @@ class _DailyRecordBody extends State { } Widget itemText(String itemName, bool hasItem) { - return Container( + return SizedBox( width: MediaQuery.of(context).size.width * 0.24, - decoration: statusFieldDecoration(hasItem), child: Padding( - padding: const EdgeInsets.only(top: 10.0, bottom: 10.0), - child: Text( - itemName, - style: statusFieldTextStyle(hasItem), - textAlign: TextAlign.center, - ), - )); + padding: const EdgeInsets.only(top: 5.0, bottom: 5.0), + child: Row( + children: [ + SizedBox( + width: 20, + child: hasItem + ? const Icon(Icons.check, color: Colors.green) + : const Icon(Icons.error_outline, color: Colors.red), + ), + const SizedBox(width: 8), + Text( + itemName, + style: statusFieldTextStyle(hasItem), + textAlign: TextAlign.center, + ), + ], + ))); } } diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/styles/styles.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/styles/styles.dart index 4f57976e..4e2aa0e2 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/styles/styles.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/styles/styles.dart @@ -13,6 +13,6 @@ BoxDecoration statusFieldDecoration(bool isTrue) { TextStyle statusFieldTextStyle(bool isTrue) { return TextStyle( fontSize: 16, - color: isTrue ? Colors.green : Colors.red, + color: isTrue ? Colors.green[900] : Colors.red[900], ); } From 32b7f7a2ff2b106ab0cb083262de7db626b95e9d Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 21:20:33 +0900 Subject: [PATCH 289/771] =?UTF-8?q?feat:=E4=B8=A6=E3=81=B3=E6=9B=BF?= =?UTF-8?q?=E3=81=88=E3=81=AA=E8=83=BD=E3=81=AA=E8=A6=AA=E3=83=AA=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guardian_list/guardian_list.dart | 89 +++++++++++++++++-- .../guardian_list_element.dart | 67 ++++++++------ .../selected_guardian_list_element.dart | 75 ++++++++++++++++ .../lib/components/util/number_icon.dart | 54 +++++------ .../bus_guardian_manage_page.dart | 26 ++++-- 5 files changed, 237 insertions(+), 74 deletions(-) create mode 100644 frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/selected_guardian_list_element.dart diff --git a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart index 46cb4674..0a3f158c 100644 --- a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart +++ b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart @@ -1,17 +1,18 @@ - import 'package:flutter/material.dart'; import 'package:where_child_bus/components/guardian_list/guardian_list_element/guardian_list_element.dart'; -import 'package:where_child_bus/pages/student_list_page/student_detail_sheet.dart'; +import 'package:where_child_bus/components/guardian_list/guardian_list_element/selected_guardian_list_element.dart'; class GuardianList extends StatefulWidget { final List guardianNames; final List groupNames; + final List addedGuardians; final VoidCallback? callback; const GuardianList({ Key? key, required this.guardianNames, required this.groupNames, + required this.addedGuardians, this.callback, }) : super(key: key); @@ -20,20 +21,94 @@ class GuardianList extends StatefulWidget { } class _GuardiansListState extends State { + @override Widget build(BuildContext context) { - return ListView.separated( - itemCount: widget.guardianNames.length, - separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), - itemBuilder: (BuildContext context, int index) => guardianListElement(context, index), + return body(); + } + + Widget body() { + return Column( + children: [ + addedGuardiansListView(), + unSelectedGuardiansListView(), + ], ); } + Widget unSelectedGuardiansListView() { + return Expanded( + child: ListView.separated( + itemCount: widget.guardianNames.length, + separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), + itemBuilder: (BuildContext context, int index) { + // orderIndexesに基づいて項目を表示 + return guardianListElement(context, index); + }, + ), + ); + } + +Widget addedGuardiansListView() { + double screenHeight = MediaQuery.of(context).size.height; + double maxHeight = screenHeight * 0.5; + + double itemHeight = 100.0; + double actualHeight = widget.addedGuardians.length * itemHeight; + + double listViewHeight = actualHeight > maxHeight ? maxHeight : actualHeight; + + return SizedBox( + height: listViewHeight, // ReorderableListViewの高さを100に設定 + child: ReorderableListView( + onReorder: (int oldIndex, int newIndex) { + setState(() { + if (newIndex > oldIndex) { + newIndex -= 1; + } + final item = widget.addedGuardians.removeAt(oldIndex); + widget.addedGuardians.insert(newIndex, item); + }); + }, + children: widget.addedGuardians.asMap().entries.map((entry) { + int index = entry.key; + String item = entry.value; + return SelectedGuardianListElement( + key: ValueKey(item), // 一意のキーを指定 + title: item, // 保護者の名前 + subtitle: "サブタイトル $index", // サブタイトル(適宜変更可能) + order: index + 1, // 順序番号(1から始まるように+1をしている) + onButtonPressed: () { + // ボタンが押された時のアクション(必要に応じて実装) + }, + ); + }).toList(), + ), + ); +} + + Widget guardianListElement(BuildContext context, int index) { return GuardianListElement( title: widget.guardianNames[index], subtitle: widget.groupNames[index], - // imagePath: "assets/images/face_${widget.images[index]}.png", + onButtonPressed: () => addGuardians(index), ); } + + + //functions + void addGuardians(int index) { + setState(() { + widget.addedGuardians.add(widget.guardianNames[index]); + widget.groupNames.removeAt(index); + widget.guardianNames.removeAt(index); + }); + } + + void swap(List list, int index1, int index2) { + var temp = list[index1]; + list[index1] = list[index2]; + list[index2] = temp; + } } diff --git a/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/guardian_list_element.dart b/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/guardian_list_element.dart index c7cb632d..a1924fb2 100644 --- a/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/guardian_list_element.dart +++ b/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/guardian_list_element.dart @@ -1,20 +1,23 @@ - import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/util/number_icon.dart'; -class GuardianListElement extends StatelessWidget { +class GuardianListElement extends StatefulWidget { final String title; final String subtitle; - final VoidCallback? onTap; - final Widget? actionButton; + final VoidCallback? onButtonPressed; const GuardianListElement({ Key? key, required this.title, required this.subtitle, - this.onTap, - this.actionButton, + this.onButtonPressed, }) : super(key: key); + @override + _GuardianListElementState createState() => _GuardianListElementState(); +} + +class _GuardianListElementState extends State { @override Widget build(BuildContext context) { return listElementPadding( @@ -23,20 +26,13 @@ class GuardianListElement extends StatelessWidget { clipBehavior: Clip.antiAliasWithSaveLayer, child: Material( color: Colors.white, // Cardの背景色 - child: InkWell( - onTap: onTap, // タップ時のアクション - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - children: [ - // Image.asset(imagePath, width: 100, height: 100), - // const SizedBox(width: 16), - Expanded( - child: titleAndSubTitle(title, subtitle), - ), - if (actionButton != null) actionButton!, // アクションボタンを表示 - ], - ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + children: [ + titleAndSubTitle(widget.title, widget.subtitle), + addButton(), + ], ), ), ), @@ -44,21 +40,34 @@ class GuardianListElement extends StatelessWidget { ); } - Column titleAndSubTitle(String title, String subtitle) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - titleText(title), - subTitleText(subtitle), - ], + Widget addButton() { + return IconButton( + onPressed: widget.onButtonPressed, + icon: const Icon(Icons.add), + ); + } + + Widget orderIcon(int number) { + return NumberIcon(number: number); + } + + Widget titleAndSubTitle(String title, String subtitle) { + return Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + titleText(title), + subTitleText(subtitle), + ], + ), ); } Text titleText(String title) { return Text( title, - style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold) + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), ); } diff --git a/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/selected_guardian_list_element.dart b/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/selected_guardian_list_element.dart new file mode 100644 index 00000000..01f94f15 --- /dev/null +++ b/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/selected_guardian_list_element.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/util/number_icon.dart'; + +class SelectedGuardianListElement extends StatefulWidget { + final String title; + final String subtitle; + final int order; // 追加: リスト内の順序を表示するための順序番号 + final VoidCallback? onButtonPressed; + + const SelectedGuardianListElement({ + Key? key, + required this.title, + required this.subtitle, + required this.order, // 順序番号を必須引数として追加 + this.onButtonPressed, + }) : super(key: key); + + @override + _SelectedGuardianListElementState createState() => _SelectedGuardianListElementState(); +} + +class _SelectedGuardianListElementState extends State { + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 8), + child: Card( + elevation: 8, + clipBehavior: Clip.antiAliasWithSaveLayer, + child: InkWell( + onTap: widget.onButtonPressed, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Row( + children: [ + // 並び替え用のドラッグハンドルアイコンを追加 + ReorderableDragStartListener( + index: widget.order - 1, // orderは1ベースなので、0ベースのindexに変換 + child: const Padding( + padding: EdgeInsets.symmetric(horizontal: 8.0), + child: Icon(Icons.drag_handle), + ), + ), + NumberIcon(number: widget.order, color: Colors.indigo,), // 順序番号アイコン + SizedBox(width: 16), + titleText(widget.title,), + ], + ), + ), + ), + ), + ); + } + Widget addButton() { + // ボタンの表示をカスタマイズする場合はここで変更 + return IconButton( + onPressed: widget.onButtonPressed, + icon: const Icon(Icons.add), + ); + } + + Text titleText(String title) { + return Text( + title, + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ); + } + + Padding listElementPadding(Widget child) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: child, + ); + } +} diff --git a/frontend/where_child_bus/lib/components/util/number_icon.dart b/frontend/where_child_bus/lib/components/util/number_icon.dart index f082e4b4..6fff330b 100644 --- a/frontend/where_child_bus/lib/components/util/number_icon.dart +++ b/frontend/where_child_bus/lib/components/util/number_icon.dart @@ -2,51 +2,39 @@ import 'package:flutter/material.dart'; class NumberIcon extends StatelessWidget { final int number; // 表示する数字 - final IconData icon; // 使用するアイコン - final Color color; // アイコンの色 - final double size; // アイコンのサイズ + final Color color; // テキストの色 + final double size; // テキストのサイズ const NumberIcon({ Key? key, required this.number, - this.icon = Icons.circle, // デフォルトのアイコン this.color = Colors.blue, // デフォルトの色 this.size = 24.0, // デフォルトのサイズ }) : super(key: key); @override Widget build(BuildContext context) { - return Stack( - alignment: Alignment.center, - children: [ - Icon( - icon, - color: color, - size: size, - ), - Positioned( - right: 0, - child: Container( - padding: const EdgeInsets.all(1), - decoration: BoxDecoration( - color: Colors.red, - borderRadius: BorderRadius.circular(6), - ), - constraints: const BoxConstraints( - minWidth: 12, - minHeight: 12, - ), - child: Text( - '$number', - style: const TextStyle( - color: Colors.white, - fontSize: 8, - ), - textAlign: TextAlign.center, - ), + // 円形にするためにサイズを計算 + double circleDiameter = size + 16; // sizeに基づいて適切な直径を計算 + + return Container( + width: circleDiameter, // 幅と高さを同じにして正方形に + height: circleDiameter, + decoration: BoxDecoration( + color: color.withOpacity(0.2), // 背景色 + borderRadius: BorderRadius.circular(circleDiameter / 2), // 角を完全に丸くして円形に + ), + child: Center( // Textウィジェットを中央に配置 + child: Text( + '$number', + style: TextStyle( + color: color, + fontSize: size, + fontWeight: FontWeight.bold, ), + textAlign: TextAlign.center, ), - ], + ), ); } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart index e1c1909d..f1491a8d 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -9,8 +9,13 @@ class BusGuardianManagePage extends StatefulWidget { class _BusGuardianManagePageState extends State { // サンプルデータのリスト - final List guardianNames = ['保護者1', '保護者2', '保護者3']; - final List groupNames = ['グループA', 'グループB', 'グループC']; + final List morningGuardianNames = ['保護者1', '保護者2', '保護者3']; + final List eveningGuardianNames = ['保護者1', '保護者2', '保護者3']; + final List morningGroupNames = ['グループA', 'グループB', 'グループC']; + final List eveningGroupNames = ['グループA', 'グループB', 'グループC']; + List morningAddedGuardians = []; + List eveningAddedGuardians = []; + @override Widget build(BuildContext context) { @@ -45,16 +50,27 @@ class _BusGuardianManagePageState extends State { ], ), ), - ConfirmButton(buttonText: "保存"), + SizedBox( + height: 100, + child: ConfirmButton(buttonText: "保存") + ), ], ); } Widget morningGuardianList() { - return GuardianList(guardianNames: guardianNames, groupNames: groupNames); + return GuardianList( + guardianNames: morningGuardianNames, + groupNames: morningGroupNames, + addedGuardians: morningAddedGuardians + ); } Widget eveningGuardianList() { - return GuardianList(guardianNames: guardianNames, groupNames: groupNames); + return GuardianList( + guardianNames: eveningGuardianNames, + groupNames: eveningGroupNames, + addedGuardians: eveningAddedGuardians + ); } } \ No newline at end of file From b574e5e938057db986bd7a8c66f1317c9b83f3f8 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 21:45:34 +0900 Subject: [PATCH 290/771] =?UTF-8?q?feta:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=81=AE=E8=BF=BD=E5=8A=A0=E3=82=92=E3=82=AD=E3=83=A3=E3=83=B3?= =?UTF-8?q?=E3=82=BB=E3=83=AB=E3=81=99=E3=82=8B=E6=A9=9F=E8=83=BD=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guardian_list/guardian_list.dart | 29 ++++++++++-------- .../selected_guardian_list_element.dart | 30 +++++++++++++++---- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart index 0a3f158c..28e680e3 100644 --- a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart +++ b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart @@ -31,6 +31,7 @@ class _GuardiansListState extends State { return Column( children: [ addedGuardiansListView(), + const SizedBox(height: 15,), unSelectedGuardiansListView(), ], ); @@ -53,7 +54,7 @@ Widget addedGuardiansListView() { double screenHeight = MediaQuery.of(context).size.height; double maxHeight = screenHeight * 0.5; - double itemHeight = 100.0; + double itemHeight = 110.0; double actualHeight = widget.addedGuardians.length * itemHeight; double listViewHeight = actualHeight > maxHeight ? maxHeight : actualHeight; @@ -76,11 +77,9 @@ Widget addedGuardiansListView() { return SelectedGuardianListElement( key: ValueKey(item), // 一意のキーを指定 title: item, // 保護者の名前 - subtitle: "サブタイトル $index", // サブタイトル(適宜変更可能) + subtitle: "サブタイトル", order: index + 1, // 順序番号(1から始まるように+1をしている) - onButtonPressed: () { - // ボタンが押された時のアクション(必要に応じて実装) - }, + onButtonPressed: () => removeGuardians(index), ); }).toList(), ), @@ -95,9 +94,7 @@ Widget addedGuardiansListView() { onButtonPressed: () => addGuardians(index), ); } - - //functions void addGuardians(int index) { setState(() { widget.addedGuardians.add(widget.guardianNames[index]); @@ -106,9 +103,17 @@ Widget addedGuardiansListView() { }); } - void swap(List list, int index1, int index2) { - var temp = list[index1]; - list[index1] = list[index2]; - list[index2] = temp; - } + void removeGuardians(int index) { + setState(() { + // 追加された保護者リストから保護者を取得し削除 + String removedGuardian = widget.addedGuardians.removeAt(index); + + //戻すときは、先頭に配置 + widget.guardianNames.insert(0, removedGuardian); + + // groupNamesへの追加も必要ですが、どのグループに所属していたかの情報が必要 + widget.groupNames.add("ダミーグループ"); + }); +} + } diff --git a/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/selected_guardian_list_element.dart b/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/selected_guardian_list_element.dart index 01f94f15..91cdc5c6 100644 --- a/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/selected_guardian_list_element.dart +++ b/frontend/where_child_bus/lib/components/guardian_list/guardian_list_element/selected_guardian_list_element.dart @@ -30,7 +30,7 @@ class _SelectedGuardianListElementState extends State Date: Wed, 14 Feb 2024 21:49:24 +0900 Subject: [PATCH 291/771] =?UTF-8?q?chore:=E3=83=A2=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=92=E5=A2=97=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_guardian_manage_page.dart | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart index f1491a8d..ad1445ef 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -9,10 +9,34 @@ class BusGuardianManagePage extends StatefulWidget { class _BusGuardianManagePageState extends State { // サンプルデータのリスト - final List morningGuardianNames = ['保護者1', '保護者2', '保護者3']; - final List eveningGuardianNames = ['保護者1', '保護者2', '保護者3']; - final List morningGroupNames = ['グループA', 'グループB', 'グループC']; - final List eveningGroupNames = ['グループA', 'グループB', 'グループC']; + final List morningGuardianNames = [ + '保護者1', '保護者2', '保護者3', '保護者4', '保護者5', + '保護者6', '保護者7', '保護者8', '保護者9', '保護者10', + '保護者11', '保護者12', '保護者13', '保護者14', '保護者15', + '保護者16', '保護者17', '保護者18', '保護者19', '保護者20', + ]; + + final List eveningGuardianNames = [ + '保護者1', '保護者2', '保護者3', '保護者4', '保護者5', + '保護者6', '保護者7', '保護者8', '保護者9', '保護者10', + '保護者11', '保護者12', '保護者13', '保護者14', '保護者15', + '保護者16', '保護者17', '保護者18', '保護者19', '保護者20', + ]; + + final List morningGroupNames = [ + 'グループA', 'グループB', 'グループC', 'グループD', 'グループE', + 'グループF', 'グループG', 'グループH', 'グループI', 'グループJ', + 'グループK', 'グループL', 'グループM', 'グループN', 'グループO', + 'グループP', 'グループQ', 'グループR', 'グループS', 'グループT', + ]; + + final List eveningGroupNames = [ + 'グループA', 'グループB', 'グループC', 'グループD', 'グループE', + 'グループF', 'グループG', 'グループH', 'グループI', 'グループJ', + 'グループK', 'グループL', 'グループM', 'グループN', 'グループO', + 'グループP', 'グループQ', 'グループR', 'グループS', 'グループT', + ]; + List morningAddedGuardians = []; List eveningAddedGuardians = []; From fd778c3860f79ab8a31206465003c45fc8f53374 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 22:08:13 +0900 Subject: [PATCH 292/771] =?UTF-8?q?feat:=E3=83=AA=E3=82=B9=E3=83=88?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=AE=E3=82=B9=E3=82=AF=E3=83=AD=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=82=92=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guardian_list/guardian_list.dart | 66 +++++++++++++++++-- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart index 28e680e3..df964c8b 100644 --- a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart +++ b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart @@ -28,12 +28,66 @@ class _GuardiansListState extends State { } Widget body() { - return Column( - children: [ - addedGuardiansListView(), - const SizedBox(height: 15,), - unSelectedGuardiansListView(), - ], + return SingleChildScrollView( + child: Column( + children: [ + Container( + height: calculateAddedGuardiansHeight(), + child: ReorderableListView( + onReorder: (int oldIndex, int newIndex) => onReorder(oldIndex, newIndex), + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + children: widget.addedGuardians.map((item) { + int index = widget.addedGuardians.indexOf(item); + return SelectedGuardianListElement( + key: ValueKey(item), + title: item, + subtitle: "サブタイトル ${index + 1}", + order: index + 1, + onButtonPressed: () => removeGuardians(index), + ); + }).toList(), + ), + ), + const SizedBox(height: 15), + for (int index = 0; index < widget.guardianNames.length; index++) + guardianListElement(context, index), + ], + ), + ); + } + + void onReorder(int oldIndex, int newIndex) { + setState(() { + if (newIndex > oldIndex) { + newIndex -= 1; + } + final item = widget.addedGuardians.removeAt(oldIndex); + widget.addedGuardians.insert(newIndex, item); + }); + } + + + double calculateAddedGuardiansHeight() { + // 項目の高さ、項目間のスペース、その他のマージンなどを考慮して高さを計算 + double itemHeight = 110.0; + int itemCount = widget.addedGuardians.length; + return itemHeight * itemCount; + } + + Widget addedGuardiansListViewContent() { + return ListView.builder( + itemCount: widget.addedGuardians.length, + itemBuilder: (context, index) { + String item = widget.addedGuardians[index]; + // 追加された保護者リストの項目を構築 + return SelectedGuardianListElement( + title: item, + subtitle: "サブタイトル", + order: index + 1, + onButtonPressed: () => removeGuardians(index), + ); + }, ); } From 0e68b511d36b59af301286c7a258dee63c96fb79 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 22:46:01 +0900 Subject: [PATCH 293/771] =?UTF-8?q?feat(proto):=20bus=E4=BD=9C=E6=88=90?= =?UTF-8?q?=E3=81=AE=E3=83=AC=E3=82=B9=E3=83=9D=E3=83=B3=E3=82=B9=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 117 ++++++++---------- backend/proto/where_child_bus/v1/bus.proto | 1 - .../where_child_bus/v1/health_check.proto | 6 +- .../proto/where_child_bus/v1/station.proto | 2 +- .../proto-gen/where_child_bus/v1/bus.pb.dart | 8 -- .../where_child_bus/v1/bus.pbjson.dart | 4 +- .../proto-gen/where_child_bus/v1/bus_pb2.py | 16 +-- .../proto-gen/where_child_bus/v1/bus_pb2.pyi | 6 +- 8 files changed, 67 insertions(+), 93 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 914681ce..32658f7f 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -104,8 +104,7 @@ type CreateBusResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Bus *Bus `protobuf:"bytes,1,opt,name=bus,proto3" json:"bus,omitempty"` - Children []*Child `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` + Bus *Bus `protobuf:"bytes,1,opt,name=bus,proto3" json:"bus,omitempty"` } func (x *CreateBusResponse) Reset() { @@ -147,13 +146,6 @@ func (x *CreateBusResponse) GetBus() *Bus { return nil } -func (x *CreateBusResponse) GetChildren() []*Child { - if x != nil { - return x.Children - } - return nil -} - type GetBusListByNurseryIdRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -269,53 +261,50 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x75, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, + 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x3e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, - 0x52, 0x03, 0x62, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x3d, 0x0a, 0x1c, - 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, - 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, - 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x32, 0xe4, 0x01, 0x0a, 0x0a, - 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, - 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, + 0x75, 0x73, 0x65, 0x73, 0x32, 0xe4, 0x01, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, + 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xeb, 0x01, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, + 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, + 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, + 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -337,21 +326,19 @@ var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ (*GetBusListByNurseryIdRequest)(nil), // 2: where_child_bus.v1.GetBusListByNurseryIdRequest (*GetBusListByNurseryIdResponse)(nil), // 3: where_child_bus.v1.GetBusListByNurseryIdResponse (*Bus)(nil), // 4: where_child_bus.v1.Bus - (*Child)(nil), // 5: where_child_bus.v1.Child } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ 4, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus - 5, // 1: where_child_bus.v1.CreateBusResponse.children:type_name -> where_child_bus.v1.Child - 4, // 2: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus - 0, // 3: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest - 2, // 4: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 1, // 5: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 6: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 4, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus + 0, // 2: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 3: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 1, // 4: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 5: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } diff --git a/backend/proto/where_child_bus/v1/bus.proto b/backend/proto/where_child_bus/v1/bus.proto index 89c5406d..3e4d9a70 100644 --- a/backend/proto/where_child_bus/v1/bus.proto +++ b/backend/proto/where_child_bus/v1/bus.proto @@ -19,7 +19,6 @@ message CreateBusRequest { message CreateBusResponse { Bus bus = 1; - repeated Child children = 2; } message GetBusListByNurseryIdRequest { diff --git a/backend/proto/where_child_bus/v1/health_check.proto b/backend/proto/where_child_bus/v1/health_check.proto index 327e9727..e6b57bfa 100644 --- a/backend/proto/where_child_bus/v1/health_check.proto +++ b/backend/proto/where_child_bus/v1/health_check.proto @@ -3,13 +3,13 @@ syntax = "proto3"; package where_child_bus.v1; service HealthcheckService { - rpc Ping(PingRequest) returns (PingResponse); + rpc Ping(PingRequest) returns (PingResponse); } message PingRequest { - string name = 1; + string name = 1; } message PingResponse { - string message = 1; + string message = 1; } diff --git a/backend/proto/where_child_bus/v1/station.proto b/backend/proto/where_child_bus/v1/station.proto index 00c4499f..ec4b914c 100644 --- a/backend/proto/where_child_bus/v1/station.proto +++ b/backend/proto/where_child_bus/v1/station.proto @@ -16,7 +16,7 @@ message UpdateStationRequest { } message UpdateStationResponse { - Station station = 1; + Station station = 1; } message GetStationListByBusIdRequest { diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart index f746f704..2a41f8de 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -112,15 +112,11 @@ class CreateBusRequest extends $pb.GeneratedMessage { class CreateBusResponse extends $pb.GeneratedMessage { factory CreateBusResponse({ $8.Bus? bus, - $core.Iterable<$8.Child>? children, }) { final $result = create(); if (bus != null) { $result.bus = bus; } - if (children != null) { - $result.children.addAll(children); - } return $result; } CreateBusResponse._() : super(); @@ -129,7 +125,6 @@ class CreateBusResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateBusResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOM<$8.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $8.Bus.create) - ..pc<$8.Child>(2, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) ..hasRequiredFields = false ; @@ -164,9 +159,6 @@ class CreateBusResponse extends $pb.GeneratedMessage { void clearBus() => clearField(1); @$pb.TagNumber(1) $8.Bus ensureBus() => $_ensure(0); - - @$pb.TagNumber(2) - $core.List<$8.Child> get children => $_getList(1); } class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 9d4b4c89..e7cd29b6 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -37,15 +37,13 @@ const CreateBusResponse$json = { '1': 'CreateBusResponse', '2': [ {'1': 'bus', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Bus', '10': 'bus'}, - {'1': 'children', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, ], }; /// Descriptor for `CreateBusResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List createBusResponseDescriptor = $convert.base64Decode( 'ChFDcmVhdGVCdXNSZXNwb25zZRIpCgNidXMYASABKAsyFy53aGVyZV9jaGlsZF9idXMudjEuQn' - 'VzUgNidXMSNQoIY2hpbGRyZW4YAiADKAsyGS53aGVyZV9jaGlsZF9idXMudjEuQ2hpbGRSCGNo' - 'aWxkcmVu'); + 'VzUgNidXM='); @$core.Deprecated('Use getBusListByNurseryIdRequestDescriptor instead') const GetBusListByNurseryIdRequest$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py index e08d1e55..0a6f39e0 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\"u\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses2\xe4\x01\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponseB\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses2\xe4\x01\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponseB\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,11 +26,11 @@ _globals['_CREATEBUSREQUEST']._serialized_start=89 _globals['_CREATEBUSREQUEST']._serialized_end=293 _globals['_CREATEBUSRESPONSE']._serialized_start=295 - _globals['_CREATEBUSRESPONSE']._serialized_end=412 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=414 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=475 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=477 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=555 - _globals['_BUSSERVICE']._serialized_start=558 - _globals['_BUSSERVICE']._serialized_end=786 + _globals['_CREATEBUSRESPONSE']._serialized_end=357 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=359 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=420 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=422 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=500 + _globals['_BUSSERVICE']._serialized_start=503 + _globals['_BUSSERVICE']._serialized_end=731 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi index 747e1882..19508735 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi @@ -21,12 +21,10 @@ class CreateBusRequest(_message.Message): def __init__(self, nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., morning_guardian_ids: _Optional[_Iterable[str]] = ..., evening_guardian_ids: _Optional[_Iterable[str]] = ...) -> None: ... class CreateBusResponse(_message.Message): - __slots__ = ("bus", "children") + __slots__ = ("bus",) BUS_FIELD_NUMBER: _ClassVar[int] - CHILDREN_FIELD_NUMBER: _ClassVar[int] bus: _resources_pb2.Bus - children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] - def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... + def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... class GetBusListByNurseryIdRequest(_message.Message): __slots__ = ("nursery_id",) From ebd3725446a9e95ca86669bdcbda415651dd9d74 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 14 Feb 2024 22:59:31 +0900 Subject: [PATCH 294/771] =?UTF-8?q?refactor(ml):=20typo=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../face_detect_model/DetectFaceAndClip/detectFaceAndClip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index 0283e431..ae937f89 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -26,12 +26,12 @@ def load_image(args, blobs=None): """画像の読み込みを行うラッパー関数""" if args.env == "local": - return load_image_fromm_local(args.img_dir_path) + return load_image_from_local(args.img_dir_path) elif args.env == "remote": return load_image_from_remote(args.nursery_id, args.child_id, blobs) -def load_image_fromm_local(img_dir_path): +def load_image_from_local(img_dir_path): images = [] for image_path in os.listdir(img_dir_path): logger.info(f"loading: {image_path}") From 600f33b4f85490cb7f04d10f3d25f499e9ae82a5 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 14 Feb 2024 23:09:46 +0900 Subject: [PATCH 295/771] =?UTF-8?q?refactor(ml):=20=E8=A4=87=E6=95=B0?= =?UTF-8?q?=E3=81=AE=E6=8C=99=E5=8B=95=E3=82=92=E9=96=A2=E6=95=B0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectFaceAndClip/detectFaceAndClip.py | 53 +++++++++++-------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index ae937f89..89613925 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -83,6 +83,28 @@ def save_face_image_to_remote(face, save_blob_name, bucket): save_blob.upload_from_string(data=png_cliped_face_data, content_type="image/png") +def init_save_dir(save_dir_path): + os.makedirs(save_dir_path, exist_ok=True) + for file in os.listdir(save_dir_path): + file_path = os.path.join(save_dir_path, file) + if os.path.isfile(file_path): + os.remove(file_path) + + +def init_client(): + from google.oauth2 import service_account + import google.cloud.storage as gcs + + # TODO: GCP Cloud Functions でdeployする際の実装 + KEY_PATH = os.environ.get("CREDENTIALS_KEY_PATH") + credential = service_account.Credentials.from_service_account_file(KEY_PATH) + + PROJECT_ID = os.environ.get("PROJECT_ID") + + client = gcs.Client(PROJECT_ID, credentials=credential) + return client + + def main(args): logger.info(f"env: {args.env}") with open("src/face_detect_model/config.yaml", "r") as f: @@ -96,39 +118,28 @@ def main(args): # 保存先ディレクトリの作成,存在した場合は中身を削除 if args.env == "local": - save_dir_path = args.save_dir_path - os.makedirs(save_dir_path, exist_ok=True) - for file in os.listdir(save_dir_path): - file_path = os.path.join(save_dir_path, file) - if os.path.isfile(file_path): - os.remove(file_path) + init_save_dir(args.save_dir_path) # GCSとの接続 if args.env == "remote": - from google.oauth2 import service_account - import google.cloud.storage as gcs - - # TODO: GCP Cloud Functions でdeployする際の実装 - key_path = os.environ.get("CREDENTIALS_KEY_PATH") - credential = service_account.Credentials.from_service_account_file(key_path) + client = init_client() + if client is not None: + BUCKET_NAME = os.environ.get("BUCKET_NAME") + bucket = client.bucket(BUCKET_NAME) + else: + logger.error("Failed to connect to GCS") + exit(1) - PROJECT_ID = os.environ.get("PROJECT_ID") - BUCKET_NAME = os.environ.get("BUCKET_NAME") - - SOURCE_BLOB_NAME = f"{args.nursery_id}/{args.child_id}/row/" - - client = gcs.Client(PROJECT_ID, credentials=credential) - bucket = client.bucket(BUCKET_NAME) logger.info("get bucket success!") - blobs = bucket.list_blobs(prefix=SOURCE_BLOB_NAME, delimiter="/") - # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) if args.env == "local": images = load_image(args) elif args.env == "remote": + SOURCE_BLOB_NAME = f"{args.nursery_id}/{args.child_id}/row/" + blobs = bucket.list_blobs(prefix=SOURCE_BLOB_NAME, delimiter="/") images = load_image(args, blobs=blobs) logger.info("Detecting faces...") From 17b56785ed95ecbccb46d291a144593ebaf11cdf Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 23:20:47 +0900 Subject: [PATCH 296/771] =?UTF-8?q?chore:api=E3=82=92=E5=88=A5=E3=83=91?= =?UTF-8?q?=E3=83=83=E3=82=B1=E3=83=BC=E3=82=B8=E3=81=AB=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/login_request_test.dart | 3 + frontend/where_child_bus_api/.gitignore | 147 +++++++++ .../.idea/libraries/Dart_SDK.xml | 19 ++ .../where_child_bus_api/.idea/modules.xml | 8 + .../where_child_bus_api/.idea/workspace.xml | 36 +++ frontend/where_child_bus_api/.metadata | 10 + frontend/where_child_bus_api/CHANGELOG.md | 3 + frontend/where_child_bus_api/LICENSE | 1 + frontend/where_child_bus_api/README.md | 39 +++ .../where_child_bus_api/analysis_options.yaml | 4 + .../google/protobuf/timestamp.pb.dart | 0 .../google/protobuf/timestamp.pbenum.dart | 0 .../google/protobuf/timestamp.pbjson.dart | 0 .../google/protobuf/timestamp.pbserver.dart | 0 .../proto-gen/where_child_bus/v1/bus.pb.dart | 0 .../where_child_bus/v1/bus.pbenum.dart | 0 .../where_child_bus/v1/bus.pbgrpc.dart | 0 .../where_child_bus/v1/bus.pbjson.dart | 0 .../where_child_bus/v1/child.pb.dart | 0 .../where_child_bus/v1/child.pbenum.dart | 0 .../where_child_bus/v1/child.pbgrpc.dart | 0 .../where_child_bus/v1/child.pbjson.dart | 0 .../where_child_bus/v1/child_photo.pb.dart | 0 .../v1/child_photo.pbenum.dart | 0 .../v1/child_photo.pbgrpc.dart | 0 .../v1/child_photo.pbjson.dart | 0 .../where_child_bus/v1/guardian.pb.dart | 0 .../where_child_bus/v1/guardian.pbenum.dart | 0 .../where_child_bus/v1/guardian.pbgrpc.dart | 0 .../where_child_bus/v1/guardian.pbjson.dart | 0 .../where_child_bus/v1/health_check.pb.dart | 0 .../v1/health_check.pbenum.dart | 0 .../v1/health_check.pbgrpc.dart | 0 .../v1/health_check.pbjson.dart | 0 .../where_child_bus/v1/nursery.pb.dart | 0 .../where_child_bus/v1/nursery.pbenum.dart | 0 .../where_child_bus/v1/nursery.pbgrpc.dart | 0 .../where_child_bus/v1/nursery.pbjson.dart | 0 .../where_child_bus/v1/resources.pb.dart | 0 .../where_child_bus/v1/resources.pbenum.dart | 0 .../where_child_bus/v1/resources.pbjson.dart | 0 .../where_child_bus/v1/station.pb.dart | 0 .../where_child_bus/v1/station.pbenum.dart | 0 .../where_child_bus/v1/station.pbgrpc.dart | 0 .../where_child_bus/v1/station.pbjson.dart | 0 .../lib/where_child_bus_api.dart | 7 + frontend/where_child_bus_api/pubspec.lock | 293 ++++++++++++++++++ frontend/where_child_bus_api/pubspec.yaml | 56 ++++ .../test/where_child_bus_api_test.dart | 12 + .../where_child_bus_api.iml | 18 ++ 50 files changed, 656 insertions(+) create mode 100644 frontend/where_child_bus/test/login_request_test.dart create mode 100644 frontend/where_child_bus_api/.gitignore create mode 100644 frontend/where_child_bus_api/.idea/libraries/Dart_SDK.xml create mode 100644 frontend/where_child_bus_api/.idea/modules.xml create mode 100644 frontend/where_child_bus_api/.idea/workspace.xml create mode 100644 frontend/where_child_bus_api/.metadata create mode 100644 frontend/where_child_bus_api/CHANGELOG.md create mode 100644 frontend/where_child_bus_api/LICENSE create mode 100644 frontend/where_child_bus_api/README.md create mode 100644 frontend/where_child_bus_api/analysis_options.yaml rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/google/protobuf/timestamp.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/google/protobuf/timestamp.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/google/protobuf/timestamp.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/google/protobuf/timestamp.pbserver.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/bus.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/guardian.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/health_check.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/nursery.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/resources.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/station.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/station.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/station.pbjson.dart (100%) create mode 100644 frontend/where_child_bus_api/lib/where_child_bus_api.dart create mode 100644 frontend/where_child_bus_api/pubspec.lock create mode 100644 frontend/where_child_bus_api/pubspec.yaml create mode 100644 frontend/where_child_bus_api/test/where_child_bus_api_test.dart create mode 100644 frontend/where_child_bus_api/where_child_bus_api.iml diff --git a/frontend/where_child_bus/test/login_request_test.dart b/frontend/where_child_bus/test/login_request_test.dart new file mode 100644 index 00000000..d4c7b914 --- /dev/null +++ b/frontend/where_child_bus/test/login_request_test.dart @@ -0,0 +1,3 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:where_child_bus/util/api/nursery_login.dart'; + diff --git a/frontend/where_child_bus_api/.gitignore b/frontend/where_child_bus_api/.gitignore new file mode 100644 index 00000000..8919a098 --- /dev/null +++ b/frontend/where_child_bus_api/.gitignore @@ -0,0 +1,147 @@ +# Created by https://www.toptal.com/developers/gitignore/api/flutter,visualstudiocode,macos,windows +# Edit at https://www.toptal.com/developers/gitignore?templates=flutter,visualstudiocode,macos,windows + +### Flutter ### +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.fvm/flutter_sdk +.packages +.pub-cache/ +.pub/ +build/ +coverage/ +lib/generated_plugin_registrant.dart +.env +# For library packages, don’t commit the pubspec.lock file. +# Regenerating the pubspec.lock file lets you test your package against the latest compatible versions of its dependencies. +# See https://dart.dev/guides/libraries/private-files#pubspeclock +#pubspec.lock + +# Android related +**/android/**/gradle-wrapper.jar +**/android/.gradle +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/key.properties +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/.last_build_id +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Flutter.podspec +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/flutter,visualstudiocode,macos,windows \ No newline at end of file diff --git a/frontend/where_child_bus_api/.idea/libraries/Dart_SDK.xml b/frontend/where_child_bus_api/.idea/libraries/Dart_SDK.xml new file mode 100644 index 00000000..4914c6f6 --- /dev/null +++ b/frontend/where_child_bus_api/.idea/libraries/Dart_SDK.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/frontend/where_child_bus_api/.idea/modules.xml b/frontend/where_child_bus_api/.idea/modules.xml new file mode 100644 index 00000000..0b0b7c28 --- /dev/null +++ b/frontend/where_child_bus_api/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/frontend/where_child_bus_api/.idea/workspace.xml b/frontend/where_child_bus_api/.idea/workspace.xml new file mode 100644 index 00000000..5b3388cc --- /dev/null +++ b/frontend/where_child_bus_api/.idea/workspace.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/where_child_bus_api/.metadata b/frontend/where_child_bus_api/.metadata new file mode 100644 index 00000000..5c46f074 --- /dev/null +++ b/frontend/where_child_bus_api/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "41456452f29d64e8deb623a3c927524bcf9f111b" + channel: "stable" + +project_type: package diff --git a/frontend/where_child_bus_api/CHANGELOG.md b/frontend/where_child_bus_api/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/frontend/where_child_bus_api/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/frontend/where_child_bus_api/LICENSE b/frontend/where_child_bus_api/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/frontend/where_child_bus_api/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/frontend/where_child_bus_api/README.md b/frontend/where_child_bus_api/README.md new file mode 100644 index 00000000..02fe8eca --- /dev/null +++ b/frontend/where_child_bus_api/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/frontend/where_child_bus_api/analysis_options.yaml b/frontend/where_child_bus_api/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/frontend/where_child_bus_api/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbserver.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbserver.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbserver.dart rename to frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbserver.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart diff --git a/frontend/where_child_bus_api/lib/where_child_bus_api.dart b/frontend/where_child_bus_api/lib/where_child_bus_api.dart new file mode 100644 index 00000000..a9b9f778 --- /dev/null +++ b/frontend/where_child_bus_api/lib/where_child_bus_api.dart @@ -0,0 +1,7 @@ +library where_child_bus_api; + +/// A Calculator. +class Calculator { + /// Returns [value] plus 1. + int addOne(int value) => value + 1; +} diff --git a/frontend/where_child_bus_api/pubspec.lock b/frontend/where_child_bus_api/pubspec.lock new file mode 100644 index 00000000..124648c2 --- /dev/null +++ b/frontend/where_child_bus_api/pubspec.lock @@ -0,0 +1,293 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + archive: + dependency: transitive + description: + name: archive + sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" + url: "https://pub.dev" + source: hosted + version: "3.4.10" + args: + dependency: transitive + description: + name: args + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + googleapis_auth: + dependency: transitive + description: + name: googleapis_auth + sha256: af7c3a3edf9d0de2e1e0a77e994fae0a581c525fa7012af4fa0d4a52ed9484da + url: "https://pub.dev" + source: hosted + version: "1.4.1" + grpc: + dependency: "direct main" + description: + name: grpc + sha256: e93ee3bce45c134bf44e9728119102358c7cd69de7832d9a874e2e74eb8cab40 + url: "https://pub.dev" + source: hosted + version: "3.2.4" + http: + dependency: transitive + description: + name: http + sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + url: "https://pub.dev" + source: hosted + version: "1.2.0" + http2: + dependency: transitive + description: + name: http2 + sha256: "9ced024a160b77aba8fb8674e38f70875e321d319e6f303ec18e87bd5a4b0c1d" + url: "https://pub.dev" + source: hosted + version: "2.3.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" + source: hosted + version: "0.12.16" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" + source: hosted + version: "0.5.0" + meta: + dependency: transitive + description: + name: meta + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + url: "https://pub.dev" + source: hosted + version: "1.10.0" + path: + dependency: transitive + description: + name: path + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" + source: hosted + version: "1.8.3" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" + url: "https://pub.dev" + source: hosted + version: "3.7.4" + protobuf: + dependency: "direct main" + description: + name: protobuf + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" + source: hosted + version: "0.6.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + web: + dependency: transitive + description: + name: web + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + url: "https://pub.dev" + source: hosted + version: "0.3.0" +sdks: + dart: ">=3.2.6 <4.0.0" + flutter: ">=1.17.0" diff --git a/frontend/where_child_bus_api/pubspec.yaml b/frontend/where_child_bus_api/pubspec.yaml new file mode 100644 index 00000000..66471c48 --- /dev/null +++ b/frontend/where_child_bus_api/pubspec.yaml @@ -0,0 +1,56 @@ +name: where_child_bus_api +description: "A new Flutter package project." +version: 0.0.1 +homepage: + +environment: + sdk: '>=3.2.6 <4.0.0' + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + grpc: ^3.2.4 + protobuf: ^3.1.0 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/assets-and-images/#from-packages + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # To add custom fonts to your package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/custom-fonts/#from-packages diff --git a/frontend/where_child_bus_api/test/where_child_bus_api_test.dart b/frontend/where_child_bus_api/test/where_child_bus_api_test.dart new file mode 100644 index 00000000..ad3d2dd2 --- /dev/null +++ b/frontend/where_child_bus_api/test/where_child_bus_api_test.dart @@ -0,0 +1,12 @@ +import 'package:flutter_test/flutter_test.dart'; + +import 'package:where_child_bus_api/where_child_bus_api.dart'; + +void main() { + test('adds one to input values', () { + final calculator = Calculator(); + expect(calculator.addOne(2), 3); + expect(calculator.addOne(-7), -6); + expect(calculator.addOne(0), 1); + }); +} diff --git a/frontend/where_child_bus_api/where_child_bus_api.iml b/frontend/where_child_bus_api/where_child_bus_api.iml new file mode 100644 index 00000000..975ffec2 --- /dev/null +++ b/frontend/where_child_bus_api/where_child_bus_api.iml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + From e29eceb1007d9c21128a9266f1fac696b01872c7 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 23:23:27 +0900 Subject: [PATCH 297/771] =?UTF-8?q?chore:=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E5=81=B4=E3=81=AEpubspec=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/pubspec.lock | 7 +++++++ frontend/where_child_bus/pubspec.yaml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index 9a4ade02..5bfa06f2 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -437,6 +437,13 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.0" + where_child_bus_api: + dependency: "direct main" + description: + path: "../where_child_bus_api" + relative: true + source: path + version: "0.0.1" sdks: dart: ">=3.2.6 <4.0.0" flutter: ">=3.10.0" diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 250b6c59..c8f267ee 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -14,6 +14,8 @@ dependencies: protobuf: ^3.1.0 flutter_dotenv: ^5.1.0 image_picker: ^1.0.7 + where_child_bus_api: + path: ../where_child_bus_api cupertino_icons: ^1.0.2 From 21da5cc33f0ef4299f267c9c6e458c31bfaf9fa6 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 23:27:39 +0900 Subject: [PATCH 298/771] =?UTF-8?q?feat:=20=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=82=A2=E3=82=AB=E3=82=A6=E3=83=B3=E3=83=88=E4=BD=9C=E6=88=90?= =?UTF-8?q?=E6=99=82=E3=81=AB=E5=81=9C=E7=95=99=E6=89=80=E3=81=AE=E3=83=AC?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=82=82=E4=BD=9C=E6=88=90=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/guardian/guardian.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 037d9284..de14853b 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -55,6 +55,11 @@ func (i *Interactor) CreateGuardian(ctx context.Context, req *pb.CreateGuardianR SetNursery(nursery). Save(ctx) + // Stationを作成 + _, err = tx.Station.Create(). + SetGuardian(guardian). + Save(ctx) + if err != nil { return nil, fmt.Errorf("failed to create guardian: %w", err) } @@ -95,7 +100,7 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq // トランザクションをコミット if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w") + return nil, fmt.Errorf("failed to commit transaction: %v", err) } // レスポンスを返す From dd553dcbf806803794429ea41f7ddb1936121f2d Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 14 Feb 2024 23:28:17 +0900 Subject: [PATCH 299/771] =?UTF-8?q?chore:=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E5=81=B4=E3=81=AE=E4=BE=9D=E5=AD=98=E9=96=A2=E4=BF=82=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/pages/auth_page/auth_page.dart | 2 +- frontend/where_child_bus/lib/util/api/health_check.dart | 2 +- frontend/where_child_bus/lib/util/api/nursery_login.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index aac9fd9b..35f73350 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -1,8 +1,8 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; -import 'package:where_child_bus/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart'; import 'package:where_child_bus/util/api/nursery_login.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; enum NurseryLoginError { unknown, diff --git a/frontend/where_child_bus/lib/util/api/health_check.dart b/frontend/where_child_bus/lib/util/api/health_check.dart index 14873104..ffd6b091 100644 --- a/frontend/where_child_bus/lib/util/api/health_check.dart +++ b/frontend/where_child_bus/lib/util/api/health_check.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:developer' as developer; // エラーログに使用 import 'package:grpc/grpc.dart'; -import 'package:where_child_bus/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart'; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart"; import 'package:where_child_bus/config/config.dart'; diff --git a/frontend/where_child_bus/lib/util/api/nursery_login.dart b/frontend/where_child_bus/lib/util/api/nursery_login.dart index 973e903e..e19f2f3b 100644 --- a/frontend/where_child_bus/lib/util/api/nursery_login.dart +++ b/frontend/where_child_bus/lib/util/api/nursery_login.dart @@ -3,7 +3,7 @@ import 'dart:developer' as developer; import 'package:flutter/foundation.dart'; import 'package:grpc/grpc.dart'; import 'package:where_child_bus/config/config.dart'; -import 'package:where_child_bus/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart'; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart"; Future nurseryLogin(String email, String password) async { var channel = ClientChannel( From 5853220ea62049f9c24fa145c946c4385b2bfa5e Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 23:28:24 +0900 Subject: [PATCH 300/771] =?UTF-8?q?feat(api):=20=E3=83=90=E3=82=B9?= =?UTF-8?q?=E4=BD=9C=E6=88=90API=E3=81=AE=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/bus.go | 2 +- backend/usecases/bus/bus.go | 96 +++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) diff --git a/backend/interfaces/bus.go b/backend/interfaces/bus.go index 7d9cfc71..84e18dbf 100644 --- a/backend/interfaces/bus.go +++ b/backend/interfaces/bus.go @@ -17,7 +17,7 @@ func NewBusServiceServer(interactor *bus.Interactor) pb.BusServiceServer { // CreateBus implements where_child_busv1.BusServiceServer. func (s *busServiceServer) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (*pb.CreateBusResponse, error) { - panic("unimplemented") + return s.interactor.CreateBus(ctx, req) } // GetBusListByNurseryId implements where_child_busv1.BusServiceServer. diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 774eee85..8441102f 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -8,12 +8,15 @@ import ( "context" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" ) type Interactor struct { @@ -25,6 +28,62 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { return &Interactor{entClient, logger} } +func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (*pb.CreateBusResponse, error) { + nurseryID, err := uuid.Parse(req.NurseryId) + if err != nil { + return nil, fmt.Errorf("failed to parse nursery ID: %w", err) + } + + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + + var commit bool + defer func() { + if !commit { + tx.Rollback() + } + }() + + bus, err := tx.Bus.Create(). + SetNurseryID(nurseryID). + SetName(req.Name). + SetPlateNumber(req.PlateNumber). + Save(ctx) + if err != nil { + return nil, fmt.Errorf("failed to create bus: %w", err) + } + + err = setNextStation(ctx, tx, req.MorningGuardianIds, func(updateOp *ent.StationUpdateOne, nextStation *ent.Station) *ent.StationUpdateOne { + return updateOp.AddMorningNextStation(nextStation) + }) + if err != nil { + return nil, err // 朝のステーション設定中にエラーが発生しました + } + + err = setNextStation(ctx, tx, req.EveningGuardianIds, func(updateOp *ent.StationUpdateOne, nextStation *ent.Station) *ent.StationUpdateOne { + return updateOp.AddEveningNextStation(nextStation) + }) + if err != nil { + return nil, err // 夕方のステーション設定中にエラーが発生しました + } + + //TODO: CloudFunctionにバスの作成を通知 + cfg, _ := config.New() + utils.MakeCloudFunctionRequest(cfg.EndPointCreateBusNotification, "POST") + + // Make sure to commit the transaction since everything succeeded + commit = true + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + + return &pb.CreateBusResponse{ + Bus: utils.ToPbBus(bus), + }, nil +} + func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusListByNurseryIdRequest) (*pb.GetBusListByNurseryIdResponse, error) { nurseryID, err := uuid.Parse(req.NurseryId) if err != nil { @@ -70,3 +129,40 @@ func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*e return pbBuses, nil } + +func setNextStation(ctx context.Context, tx *ent.Tx, guardianIDs []string, setNextStationFunc func(*ent.StationUpdateOne, *ent.Station) *ent.StationUpdateOne) error { + for index, guardianID := range guardianIDs { + guardianIDParsed, err := uuid.Parse(guardianID) + if err != nil { + return fmt.Errorf("failed to parse guardian ID '%s': %w", guardianID, err) + } + + currentStation, err := tx.Station.Query(). + Where(station.HasGuardianWith(guardian.IDEQ(guardianIDParsed))). + Only(ctx) + if err != nil { + return fmt.Errorf("failed to find station for guardian ID '%s': %w", guardianID, err) + } + + if index < len(guardianIDs)-1 { + nextGuardianID := guardianIDs[index+1] + nextGuardianIDParsed, err := uuid.Parse(nextGuardianID) + if err != nil { + return fmt.Errorf("failed to parse next guardian ID '%s': %w", nextGuardianID, err) + } + + nextStation, err := tx.Station.Query(). + Where(station.HasGuardianWith(guardian.IDEQ(nextGuardianIDParsed))). + Only(ctx) + if err != nil { + return fmt.Errorf("failed to find next station for guardian ID '%s': %w", nextGuardianID, err) + } + + err = setNextStationFunc(tx.Station.UpdateOne(currentStation), nextStation).Exec(ctx) + if err != nil { + return fmt.Errorf("failed to set next station for station ID '%s': %w", currentStation.ID, err) + } + } + } + return nil +} From 5196c98359dfdb0e70c89ab21db50fca610cd224 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 23:29:49 +0900 Subject: [PATCH 301/771] =?UTF-8?q?feat:=20Station=E3=81=AE=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E5=8F=82=E7=85=A7=E3=82=A8=E3=83=83=E3=82=B8=E3=81=B8?= =?UTF-8?q?=E3=81=AE=E5=A4=89=E6=9B=B4=E3=82=92=E5=8F=8D=E6=98=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/station/station.go | 67 ++++++++++++++++++++++++++--- backend/usecases/utils/utils.go | 55 +++++++++++------------ 2 files changed, 88 insertions(+), 34 deletions(-) diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 60af67fc..e5882b85 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -23,7 +23,7 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { return &Interactor{entClient, logger} } -func (i *Interactor) CreateStation(ctx context.Context, req *pb.CreateStationRequest) (*pb.CreateStationResponse, error) { +func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { tx, err := i.entClient.Tx(ctx) if err != nil { return nil, fmt.Errorf("failed to start transaction: %w", err) @@ -32,20 +32,36 @@ func (i *Interactor) CreateStation(ctx context.Context, req *pb.CreateStationReq guardianID, err := uuid.Parse(req.GuardianId) if err != nil { - return nil, fmt.Errorf("failed to parse ID: %w", err) + return nil, fmt.Errorf("failed to parse guardian ID: %w", err) } + // ステーションを更新または作成します。 station, err := tx.Station.Create(). SetGuardianID(guardianID). SetLatitude(req.Latitude). - SetLongitude(req.longitude). + SetLongitude(req.Longitude). Save(ctx) if err != nil { - return nil, fmt.Errorf("failed to create station: %w", err) + return nil, fmt.Errorf("failed to create or update station: %w", err) } - return &pb.CreateStationResponse{ - Station: utils.ToPbStation(station), + morningNextStationID, eveningNextStationID, err := getNextStationIDs(ctx, station) + if err != nil { + return nil, err // エラーハンドリング + } + + if err != nil { + return nil, err // 夕方のステーション設定中にエラーが発生しました + } + + // トランザクションをコミットします。 + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + + // レスポンスを作成します。 + return &pb.UpdateStationResponse{ + Station: utils.ToPbStation(station, morningNextStationID, eveningNextStationID), }, nil } @@ -70,8 +86,13 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati uniqueChildren := make(map[string]*pb.Child) for _, station := range stations { + morningNextStationID, eveningNextStationID, err := getNextStationIDs(ctx, station) + if err != nil { + return nil, err // エラーハンドリング + } + // ステーションをプロトコルバッファ形式に変換 - pbStation := utils.ToPbStation(station) + pbStation := utils.ToPbStation(station, morningNextStationID, eveningNextStationID) pbStations = append(pbStations, pbStation) if station.Edges.Guardian != nil { @@ -105,3 +126,35 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati Children: pbChildren, }, nil } + +func getNextStationIDs(ctx context.Context, station *ent.Station) (morningNextStationID, eveningNextStationID string, err error) { + morningNextStation, err := station.QueryMorningNextStation().Only(ctx) + if err != nil && !ent.IsNotFound(err) { + return "", "", fmt.Errorf("failed to query morning next station: %w", err) + } + if morningNextStation != nil { + morningNextStationID = morningNextStation.ID.String() + } + + eveningNextStation, err := station.QueryEveningNextStation().Only(ctx) + if err != nil && !ent.IsNotFound(err) { + return "", "", fmt.Errorf("failed to query evening next station: %w", err) + } + if eveningNextStation != nil { + eveningNextStationID = eveningNextStation.ID.String() + } + + return morningNextStationID, eveningNextStationID, nil +} + +func getNextStationID(ctx context.Context, station *ent.Station, queryFunc func(*ent.Station) *ent.StationQuery) (string, error) { + nextStation, err := queryFunc(station).Only(ctx) + if err != nil { + if !ent.IsNotFound(err) { + return "", fmt.Errorf("failed to query next station: %w", err) + } + // 次のステーションが見つからない場合は空文字を返します。 + return "", nil + } + return nextStation.ID.String(), nil +} diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index a0c32717..e3b326c1 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -22,8 +22,6 @@ func ToPbChild(t *ent.Child) *pb.Child { Name: t.Name, Age: int32(t.Age), Sex: sex, - IsRideMorningBus: t.IsRideMorningBus, - IsRideEveningBus: t.IsRideEveningBus, CheckForMissingItems: t.CheckForMissingItems, HasBag: t.HasBag, HasLunchBox: t.HasLunchBox, @@ -51,15 +49,16 @@ func convertSexToPbSex(sex child.Sex) pb.Sex { func ToPbBus(t *ent.Bus) *pb.Bus { status := convertStatusToPbStatus(t.Status) return &pb.Bus{ - Id: t.ID.String(), - NurseryId: t.Edges.Nursery.ID.String(), - Name: t.Name, - PlateNumber: t.PlateNumber, - Latitude: t.Latitude, - Longitude: t.Longitude, - Status: status, - CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, - UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + Id: t.ID.String(), + NurseryId: t.Edges.Nursery.ID.String(), + Name: t.Name, + PlateNumber: t.PlateNumber, + Status: status, + Latitude: t.Latitude, + Longitude: t.Longitude, + EnableFaceRecognition: t.EnableFaceRecognition, + CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, + UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, } } @@ -93,13 +92,15 @@ func convertStatusToPbStatus(status bus.Status) pb.Status { func ToPbGuardianResponse(t *ent.Guardian) *pb.GuardianResponse { return &pb.GuardianResponse{ - Id: t.ID.String(), - NurseryId: t.Edges.Nursery.ID.String(), - Email: t.Email, - PhoneNumber: t.PhoneNumber, - Name: t.Name, - CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, - UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + Id: t.ID.String(), + NurseryId: t.Edges.Nursery.ID.String(), + Email: t.Email, + PhoneNumber: t.PhoneNumber, + Name: t.Name, + IsUseMorningBus: t.IsUseMorningBus, + IsUseEveningBus: t.IsUseEveningBus, + CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, + UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, } } @@ -116,16 +117,16 @@ func ToPbNurseryResponse(t *ent.Nursery) *pb.NurseryResponse { } } -func ToPbStation(t *ent.Station) *pb.Station { +func ToPbStation(t *ent.Station, morningNextStationID, eveningNextStationID string) *pb.Station { return &pb.Station{ - Id: t.ID.String(), - GuardianId: t.Edges.Guardian.ID.String(), - Latitude: t.Latitude, - Longitude: t.Longitude, - MorningOrder: int32(t.MorningOrder), - EveningOrder: int32(t.EveningOrder), - CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, - UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + Id: t.ID.String(), + GuardianId: t.Edges.Guardian.ID.String(), + MorningNextStationId: morningNextStationID, + EveningNextStationId: eveningNextStationID, + Latitude: t.Latitude, + Longitude: t.Longitude, + CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, + UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, } } From 60bda5d3d197000fe75c554ec5872fbfd6de5a10 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 23:30:09 +0900 Subject: [PATCH 302/771] =?UTF-8?q?fix:=20=E3=82=A4=E3=83=B3=E3=82=BF?= =?UTF-8?q?=E3=83=BC=E3=83=95=E3=82=A7=E3=83=BC=E3=82=B9=E5=B1=A4=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/station.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/interfaces/station.go b/backend/interfaces/station.go index 101399c2..e4a45856 100644 --- a/backend/interfaces/station.go +++ b/backend/interfaces/station.go @@ -16,8 +16,8 @@ func NewStationServiceServer(interactor *station.Interactor) pb.StationServiceSe } // CreateStation implements where_child_busv1.StationServiceServer. -func (s *stationServiceServer) CreateStation(ctx context.Context, req *pb.CreateStationRequest) (*pb.CreateStationResponse, error) { - return s.interactor.CreateStation(ctx, req) +func (s *stationServiceServer) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { + return s.interactor.UpdateStation(ctx, req) } // GetStationListByBusId implements where_child_busv1.StationServiceServer. From fc43f1544c366a4e98530dce619d8777819c9e0a Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 14 Feb 2024 23:30:34 +0900 Subject: [PATCH 303/771] =?UTF-8?q?feat:=E3=83=9E=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=83=93=E3=83=A5=E3=83=BC=E3=81=AE=E9=9B=9B=E5=9E=8B=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/daily_record_body.dart | 2 +- .../lib/pages/map_page/map_page.dart | 81 +++++++++++++++++-- .../pages/{daily_page => }/styles/styles.dart | 0 3 files changed, 76 insertions(+), 7 deletions(-) rename frontend/where_child_bus_guardian/lib/pages/{daily_page => }/styles/styles.dart (100%) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 9cc0dc53..038322ee 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import '../styles/styles.dart'; +import '../../styles/styles.dart'; class DailyRecordBody extends StatefulWidget { final String childName; diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index f3b62bb1..ceb720bb 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import '../styles/styles.dart'; class MapPage extends StatefulWidget { const MapPage({super.key}); @@ -8,17 +9,85 @@ class MapPage extends StatefulWidget { } class _MapPageState extends State { + var isRide = true; + @override Widget build(BuildContext context) { - return const Center( + return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - '地図', - ), - ], + children: [mapBody(), pageBottomBody()], + ), + ); + } + + Widget mapBody() { + return Container( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.5, + color: Colors.grey, + ); + } + + Widget pageBottomBody() { + return SizedBox( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.3, + child: Padding( + padding: EdgeInsets.all(MediaQuery.of(context).size.width * 0.1), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + arrivalTimeBody(), + isRideScheduled(), + ], + ), ), ); } + + Widget arrivalTimeBody() { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + fieldTitleAndTime("到着まで", "n分"), + fieldTitleAndTime("到着予定時刻", "HH:MM") + ]); + } + + Widget fieldTitleAndTime(String title, String time) { + return Column( + children: [ + Text(title), + Text( + time, + style: const TextStyle(fontSize: 30), + ) + ], + ); + } + + Widget isRideScheduled() { + return Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text("乗車予定: "), + SizedBox(width: MediaQuery.of(context).size.width * 0.05), + Container( + width: MediaQuery.of(context).size.width * 0.3, + decoration: statusFieldDecoration(isRide), + child: Padding( + padding: const EdgeInsets.all(5.0), + child: Text( + isRide ? "あり" : "なし", + style: statusFieldTextStyle(isRide), + textAlign: TextAlign.center, + )), + ) + ], + ); + } } diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/styles/styles.dart b/frontend/where_child_bus_guardian/lib/pages/styles/styles.dart similarity index 100% rename from frontend/where_child_bus_guardian/lib/pages/daily_page/styles/styles.dart rename to frontend/where_child_bus_guardian/lib/pages/styles/styles.dart From 98451d747dcd85141e4a609779861b9e2cfeb83e Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 23:47:54 +0900 Subject: [PATCH 304/771] =?UTF-8?q?chore:=20dart=E3=81=AEproto=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/proto/buf.gen.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/proto/buf.gen.yaml b/backend/proto/buf.gen.yaml index 609ff65c..ea1e998f 100644 --- a/backend/proto/buf.gen.yaml +++ b/backend/proto/buf.gen.yaml @@ -27,6 +27,6 @@ plugins: # Dart用の設定 (クライアント側) - name: dart - out: ../../frontend/where_child_bus/lib/proto-gen/ + out: ../../frontend/where_child_bus_api/lib/proto-gen/ opt: - grpc From 03da0620805705fed1c7fec730819afd46e8dd2b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 14 Feb 2024 23:48:19 +0900 Subject: [PATCH 305/771] =?UTF-8?q?chore:=20proto-gen=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../google/protobuf/timestamp.pb.dart | 0 .../google/protobuf/timestamp.pbenum.dart | 0 .../google/protobuf/timestamp.pbjson.dart | 0 .../google/protobuf/timestamp.pbserver.dart | 0 .../proto-gen/where_child_bus/v1/bus.pb.dart | 0 .../where_child_bus/v1/bus.pbenum.dart | 0 .../where_child_bus/v1/bus.pbgrpc.dart | 0 .../where_child_bus/v1/bus.pbjson.dart | 0 .../where_child_bus/v1/child.pb.dart | 0 .../where_child_bus/v1/child.pbenum.dart | 0 .../where_child_bus/v1/child.pbgrpc.dart | 0 .../where_child_bus/v1/child.pbjson.dart | 0 .../where_child_bus/v1/child_photo.pb.dart | 0 .../v1/child_photo.pbenum.dart | 0 .../v1/child_photo.pbgrpc.dart | 0 .../v1/child_photo.pbjson.dart | 0 .../where_child_bus/v1/guardian.pb.dart | 0 .../where_child_bus/v1/guardian.pbenum.dart | 0 .../where_child_bus/v1/guardian.pbgrpc.dart | 0 .../where_child_bus/v1/guardian.pbjson.dart | 0 .../where_child_bus/v1/health_check.pb.dart | 0 .../v1/health_check.pbenum.dart | 0 .../v1/health_check.pbgrpc.dart | 0 .../v1/health_check.pbjson.dart | 0 .../where_child_bus/v1/nursery.pb.dart | 0 .../where_child_bus/v1/nursery.pbenum.dart | 0 .../where_child_bus/v1/nursery.pbgrpc.dart | 0 .../where_child_bus/v1/nursery.pbjson.dart | 0 .../where_child_bus/v1/resources.pb.dart | 172 +++++++++--------- .../where_child_bus/v1/resources.pbenum.dart | 0 .../where_child_bus/v1/resources.pbjson.dart | 0 .../v1/resources.pbserver.dart | 14 ++ .../where_child_bus/v1/station.pb.dart | 0 .../where_child_bus/v1/station.pbenum.dart | 0 .../where_child_bus/v1/station.pbgrpc.dart | 0 .../where_child_bus/v1/station.pbjson.dart | 0 36 files changed, 100 insertions(+), 86 deletions(-) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/google/protobuf/timestamp.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/google/protobuf/timestamp.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/google/protobuf/timestamp.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/google/protobuf/timestamp.pbserver.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/bus.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/guardian.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/health_check.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/nursery.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/resources.pb.dart (91%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart (100%) create mode 100644 frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbserver.dart rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/station.pb.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/station.pbenum.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart (100%) rename frontend/{where_child_bus => where_child_bus_api}/lib/proto-gen/where_child_bus/v1/station.pbjson.dart (100%) diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbserver.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbserver.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/google/protobuf/timestamp.pbserver.dart rename to frontend/where_child_bus_api/lib/proto-gen/google/protobuf/timestamp.pbserver.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart similarity index 91% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 7bf27f42..114ddf8d 100644 --- a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -13,7 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/timestamp.pb.dart' as $7; +import '../../google/protobuf/timestamp.pb.dart' as $0; import 'resources.pbenum.dart'; export 'resources.pbenum.dart'; @@ -27,8 +27,8 @@ class Nursery extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.String? email, $core.String? hashedPassword, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -72,8 +72,8 @@ class Nursery extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') ..aOS(7, _omitFieldNames ? '' : 'hashedPassword') - ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -162,26 +162,26 @@ class Nursery extends $pb.GeneratedMessage { void clearHashedPassword() => clearField(7); @$pb.TagNumber(8) - $7.Timestamp get createdAt => $_getN(7); + $0.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($7.Timestamp v) { setField(8, v); } + set createdAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $7.Timestamp ensureCreatedAt() => $_ensure(7); + $0.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $7.Timestamp get updatedAt => $_getN(8); + $0.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($7.Timestamp v) { setField(9, v); } + set updatedAt($0.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $7.Timestamp ensureUpdatedAt() => $_ensure(8); + $0.Timestamp ensureUpdatedAt() => $_ensure(8); } class NurseryResponse extends $pb.GeneratedMessage { @@ -192,8 +192,8 @@ class NurseryResponse extends $pb.GeneratedMessage { $core.String? address, $core.String? phoneNumber, $core.String? email, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -233,8 +233,8 @@ class NurseryResponse extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'address') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') - ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -315,26 +315,26 @@ class NurseryResponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(7) - $7.Timestamp get createdAt => $_getN(6); + $0.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($7.Timestamp v) { setField(7, v); } + set createdAt($0.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $7.Timestamp ensureCreatedAt() => $_ensure(6); + $0.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $7.Timestamp get updatedAt => $_getN(7); + $0.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($7.Timestamp v) { setField(8, v); } + set updatedAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $7.Timestamp ensureUpdatedAt() => $_ensure(7); + $0.Timestamp ensureUpdatedAt() => $_ensure(7); } class Guardian extends $pb.GeneratedMessage { @@ -347,8 +347,8 @@ class Guardian extends $pb.GeneratedMessage { $core.String? hashedPassword, $core.bool? isUseMorningBus, $core.bool? isUseEveningBus, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -396,8 +396,8 @@ class Guardian extends $pb.GeneratedMessage { ..aOS(6, _omitFieldNames ? '' : 'hashedPassword') ..aOB(7, _omitFieldNames ? '' : 'isUseMorningBus') ..aOB(8, _omitFieldNames ? '' : 'isUseEveningBus') - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -495,26 +495,26 @@ class Guardian extends $pb.GeneratedMessage { void clearIsUseEveningBus() => clearField(8); @$pb.TagNumber(9) - $7.Timestamp get createdAt => $_getN(8); + $0.Timestamp get createdAt => $_getN(8); @$pb.TagNumber(9) - set createdAt($7.Timestamp v) { setField(9, v); } + set createdAt($0.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasCreatedAt() => $_has(8); @$pb.TagNumber(9) void clearCreatedAt() => clearField(9); @$pb.TagNumber(9) - $7.Timestamp ensureCreatedAt() => $_ensure(8); + $0.Timestamp ensureCreatedAt() => $_ensure(8); @$pb.TagNumber(10) - $7.Timestamp get updatedAt => $_getN(9); + $0.Timestamp get updatedAt => $_getN(9); @$pb.TagNumber(10) - set updatedAt($7.Timestamp v) { setField(10, v); } + set updatedAt($0.Timestamp v) { setField(10, v); } @$pb.TagNumber(10) $core.bool hasUpdatedAt() => $_has(9); @$pb.TagNumber(10) void clearUpdatedAt() => clearField(10); @$pb.TagNumber(10) - $7.Timestamp ensureUpdatedAt() => $_ensure(9); + $0.Timestamp ensureUpdatedAt() => $_ensure(9); } class GuardianResponse extends $pb.GeneratedMessage { @@ -526,8 +526,8 @@ class GuardianResponse extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.bool? isUseMorningBus, $core.bool? isUseEveningBus, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -571,8 +571,8 @@ class GuardianResponse extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOB(6, _omitFieldNames ? '' : 'isUseMorningBus') ..aOB(7, _omitFieldNames ? '' : 'isUseEveningBus') - ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -662,26 +662,26 @@ class GuardianResponse extends $pb.GeneratedMessage { void clearIsUseEveningBus() => clearField(7); @$pb.TagNumber(8) - $7.Timestamp get createdAt => $_getN(7); + $0.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($7.Timestamp v) { setField(8, v); } + set createdAt($0.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $7.Timestamp ensureCreatedAt() => $_ensure(7); + $0.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $7.Timestamp get updatedAt => $_getN(8); + $0.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($7.Timestamp v) { setField(9, v); } + set updatedAt($0.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $7.Timestamp ensureUpdatedAt() => $_ensure(8); + $0.Timestamp ensureUpdatedAt() => $_ensure(8); } class Bus extends $pb.GeneratedMessage { @@ -694,8 +694,8 @@ class Bus extends $pb.GeneratedMessage { $core.double? latitude, $core.double? longitude, $core.bool? enableFaceRecognition, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -743,8 +743,8 @@ class Bus extends $pb.GeneratedMessage { ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..aOB(8, _omitFieldNames ? '' : 'enableFaceRecognition') - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -843,26 +843,26 @@ class Bus extends $pb.GeneratedMessage { void clearEnableFaceRecognition() => clearField(8); @$pb.TagNumber(9) - $7.Timestamp get createdAt => $_getN(8); + $0.Timestamp get createdAt => $_getN(8); @$pb.TagNumber(9) - set createdAt($7.Timestamp v) { setField(9, v); } + set createdAt($0.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasCreatedAt() => $_has(8); @$pb.TagNumber(9) void clearCreatedAt() => clearField(9); @$pb.TagNumber(9) - $7.Timestamp ensureCreatedAt() => $_ensure(8); + $0.Timestamp ensureCreatedAt() => $_ensure(8); @$pb.TagNumber(10) - $7.Timestamp get updatedAt => $_getN(9); + $0.Timestamp get updatedAt => $_getN(9); @$pb.TagNumber(10) - set updatedAt($7.Timestamp v) { setField(10, v); } + set updatedAt($0.Timestamp v) { setField(10, v); } @$pb.TagNumber(10) $core.bool hasUpdatedAt() => $_has(9); @$pb.TagNumber(10) void clearUpdatedAt() => clearField(10); @$pb.TagNumber(10) - $7.Timestamp ensureUpdatedAt() => $_ensure(9); + $0.Timestamp ensureUpdatedAt() => $_ensure(9); } class Child extends $pb.GeneratedMessage { @@ -879,8 +879,8 @@ class Child extends $pb.GeneratedMessage { $core.bool? hasWaterBottle, $core.bool? hasUmbrella, $core.bool? hasOther, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -944,8 +944,8 @@ class Child extends $pb.GeneratedMessage { ..aOB(10, _omitFieldNames ? '' : 'hasWaterBottle') ..aOB(11, _omitFieldNames ? '' : 'hasUmbrella') ..aOB(12, _omitFieldNames ? '' : 'hasOther') - ..aOM<$7.Timestamp>(13, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(14, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$0.Timestamp>(13, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(14, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -1079,26 +1079,26 @@ class Child extends $pb.GeneratedMessage { void clearHasOther() => clearField(12); @$pb.TagNumber(13) - $7.Timestamp get createdAt => $_getN(12); + $0.Timestamp get createdAt => $_getN(12); @$pb.TagNumber(13) - set createdAt($7.Timestamp v) { setField(13, v); } + set createdAt($0.Timestamp v) { setField(13, v); } @$pb.TagNumber(13) $core.bool hasCreatedAt() => $_has(12); @$pb.TagNumber(13) void clearCreatedAt() => clearField(13); @$pb.TagNumber(13) - $7.Timestamp ensureCreatedAt() => $_ensure(12); + $0.Timestamp ensureCreatedAt() => $_ensure(12); @$pb.TagNumber(14) - $7.Timestamp get updatedAt => $_getN(13); + $0.Timestamp get updatedAt => $_getN(13); @$pb.TagNumber(14) - set updatedAt($7.Timestamp v) { setField(14, v); } + set updatedAt($0.Timestamp v) { setField(14, v); } @$pb.TagNumber(14) $core.bool hasUpdatedAt() => $_has(13); @$pb.TagNumber(14) void clearUpdatedAt() => clearField(14); @$pb.TagNumber(14) - $7.Timestamp ensureUpdatedAt() => $_ensure(13); + $0.Timestamp ensureUpdatedAt() => $_ensure(13); } class Station extends $pb.GeneratedMessage { @@ -1111,8 +1111,8 @@ class Station extends $pb.GeneratedMessage { $core.double? longitude, $core.int? morningOrder, $core.int? eveningOrder, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1160,8 +1160,8 @@ class Station extends $pb.GeneratedMessage { ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.int>(7, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) ..a<$core.int>(8, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -1259,26 +1259,26 @@ class Station extends $pb.GeneratedMessage { void clearEveningOrder() => clearField(8); @$pb.TagNumber(9) - $7.Timestamp get createdAt => $_getN(8); + $0.Timestamp get createdAt => $_getN(8); @$pb.TagNumber(9) - set createdAt($7.Timestamp v) { setField(9, v); } + set createdAt($0.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasCreatedAt() => $_has(8); @$pb.TagNumber(9) void clearCreatedAt() => clearField(9); @$pb.TagNumber(9) - $7.Timestamp ensureCreatedAt() => $_ensure(8); + $0.Timestamp ensureCreatedAt() => $_ensure(8); @$pb.TagNumber(10) - $7.Timestamp get updatedAt => $_getN(9); + $0.Timestamp get updatedAt => $_getN(9); @$pb.TagNumber(10) - set updatedAt($7.Timestamp v) { setField(10, v); } + set updatedAt($0.Timestamp v) { setField(10, v); } @$pb.TagNumber(10) $core.bool hasUpdatedAt() => $_has(9); @$pb.TagNumber(10) void clearUpdatedAt() => clearField(10); @$pb.TagNumber(10) - $7.Timestamp ensureUpdatedAt() => $_ensure(9); + $0.Timestamp ensureUpdatedAt() => $_ensure(9); } class ChildBusAssociation extends $pb.GeneratedMessage { @@ -1441,8 +1441,8 @@ class ChildPhoto extends $pb.GeneratedMessage { factory ChildPhoto({ $core.String? id, $core.String? childId, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $0.Timestamp? createdAt, + $0.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1466,8 +1466,8 @@ class ChildPhoto extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildPhoto', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'childId') - ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) + ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -1511,26 +1511,26 @@ class ChildPhoto extends $pb.GeneratedMessage { void clearChildId() => clearField(2); @$pb.TagNumber(5) - $7.Timestamp get createdAt => $_getN(2); + $0.Timestamp get createdAt => $_getN(2); @$pb.TagNumber(5) - set createdAt($7.Timestamp v) { setField(5, v); } + set createdAt($0.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasCreatedAt() => $_has(2); @$pb.TagNumber(5) void clearCreatedAt() => clearField(5); @$pb.TagNumber(5) - $7.Timestamp ensureCreatedAt() => $_ensure(2); + $0.Timestamp ensureCreatedAt() => $_ensure(2); @$pb.TagNumber(6) - $7.Timestamp get updatedAt => $_getN(3); + $0.Timestamp get updatedAt => $_getN(3); @$pb.TagNumber(6) - set updatedAt($7.Timestamp v) { setField(6, v); } + set updatedAt($0.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasUpdatedAt() => $_has(3); @$pb.TagNumber(6) void clearUpdatedAt() => clearField(6); @$pb.TagNumber(6) - $7.Timestamp ensureUpdatedAt() => $_ensure(3); + $0.Timestamp ensureUpdatedAt() => $_ensure(3); } class BoardingRecord extends $pb.GeneratedMessage { @@ -1539,7 +1539,7 @@ class BoardingRecord extends $pb.GeneratedMessage { $core.String? childId, $core.String? busId, $core.bool? isBoarding, - $7.Timestamp? timestamp, + $0.Timestamp? timestamp, }) { final $result = create(); if (id != null) { @@ -1568,7 +1568,7 @@ class BoardingRecord extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 'busId') ..aOB(4, _omitFieldNames ? '' : 'isBoarding') - ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $7.Timestamp.create) + ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $0.Timestamp.create) ..hasRequiredFields = false ; @@ -1630,15 +1630,15 @@ class BoardingRecord extends $pb.GeneratedMessage { void clearIsBoarding() => clearField(4); @$pb.TagNumber(5) - $7.Timestamp get timestamp => $_getN(4); + $0.Timestamp get timestamp => $_getN(4); @$pb.TagNumber(5) - set timestamp($7.Timestamp v) { setField(5, v); } + set timestamp($0.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasTimestamp() => $_has(4); @$pb.TagNumber(5) void clearTimestamp() => clearField(5); @$pb.TagNumber(5) - $7.Timestamp ensureTimestamp() => $_ensure(4); + $0.Timestamp ensureTimestamp() => $_ensure(4); } diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbserver.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbserver.dart new file mode 100644 index 00000000..39e55a87 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/resources.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'resources.pb.dart'; + diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pb.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbenum.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbenum.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbenum.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart diff --git a/frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart similarity index 100% rename from frontend/where_child_bus/lib/proto-gen/where_child_bus/v1/station.pbjson.dart rename to frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart From 11a7f47af8f966978e861923808be11b7230fc3e Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 15 Feb 2024 12:05:52 +0900 Subject: [PATCH 306/771] =?UTF-8?q?chore:=20proto=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=81=AE=E4=B8=80=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/v1/resources.pb.dart | 172 +++++++++--------- {backend/proto => proto}/buf.gen.yaml | 12 +- {backend/proto => proto}/buf.yaml | 0 .../where_child_bus/v1/bus.proto | 0 .../where_child_bus/v1/child.proto | 0 .../where_child_bus/v1/child_photo.proto | 0 .../where_child_bus/v1/guardian.proto | 0 .../where_child_bus/v1/health_check.proto | 0 .../where_child_bus/v1/nursery.proto | 0 .../where_child_bus/v1/resources.proto | 0 .../where_child_bus/v1/station.proto | 0 11 files changed, 92 insertions(+), 92 deletions(-) rename {backend/proto => proto}/buf.gen.yaml (72%) rename {backend/proto => proto}/buf.yaml (100%) rename {backend/proto => proto}/where_child_bus/v1/bus.proto (100%) rename {backend/proto => proto}/where_child_bus/v1/child.proto (100%) rename {backend/proto => proto}/where_child_bus/v1/child_photo.proto (100%) rename {backend/proto => proto}/where_child_bus/v1/guardian.proto (100%) rename {backend/proto => proto}/where_child_bus/v1/health_check.proto (100%) rename {backend/proto => proto}/where_child_bus/v1/nursery.proto (100%) rename {backend/proto => proto}/where_child_bus/v1/resources.proto (100%) rename {backend/proto => proto}/where_child_bus/v1/station.proto (100%) diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 114ddf8d..7bf27f42 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -13,7 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/timestamp.pb.dart' as $0; +import '../../google/protobuf/timestamp.pb.dart' as $7; import 'resources.pbenum.dart'; export 'resources.pbenum.dart'; @@ -27,8 +27,8 @@ class Nursery extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.String? email, $core.String? hashedPassword, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -72,8 +72,8 @@ class Nursery extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') ..aOS(7, _omitFieldNames ? '' : 'hashedPassword') - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -162,26 +162,26 @@ class Nursery extends $pb.GeneratedMessage { void clearHashedPassword() => clearField(7); @$pb.TagNumber(8) - $0.Timestamp get createdAt => $_getN(7); + $7.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($0.Timestamp v) { setField(8, v); } + set createdAt($7.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureCreatedAt() => $_ensure(7); + $7.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $0.Timestamp get updatedAt => $_getN(8); + $7.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($0.Timestamp v) { setField(9, v); } + set updatedAt($7.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $0.Timestamp ensureUpdatedAt() => $_ensure(8); + $7.Timestamp ensureUpdatedAt() => $_ensure(8); } class NurseryResponse extends $pb.GeneratedMessage { @@ -192,8 +192,8 @@ class NurseryResponse extends $pb.GeneratedMessage { $core.String? address, $core.String? phoneNumber, $core.String? email, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -233,8 +233,8 @@ class NurseryResponse extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'address') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') - ..aOM<$0.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -315,26 +315,26 @@ class NurseryResponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(7) - $0.Timestamp get createdAt => $_getN(6); + $7.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($0.Timestamp v) { setField(7, v); } + set createdAt($7.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $0.Timestamp ensureCreatedAt() => $_ensure(6); + $7.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $0.Timestamp get updatedAt => $_getN(7); + $7.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($0.Timestamp v) { setField(8, v); } + set updatedAt($7.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureUpdatedAt() => $_ensure(7); + $7.Timestamp ensureUpdatedAt() => $_ensure(7); } class Guardian extends $pb.GeneratedMessage { @@ -347,8 +347,8 @@ class Guardian extends $pb.GeneratedMessage { $core.String? hashedPassword, $core.bool? isUseMorningBus, $core.bool? isUseEveningBus, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -396,8 +396,8 @@ class Guardian extends $pb.GeneratedMessage { ..aOS(6, _omitFieldNames ? '' : 'hashedPassword') ..aOB(7, _omitFieldNames ? '' : 'isUseMorningBus') ..aOB(8, _omitFieldNames ? '' : 'isUseEveningBus') - ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -495,26 +495,26 @@ class Guardian extends $pb.GeneratedMessage { void clearIsUseEveningBus() => clearField(8); @$pb.TagNumber(9) - $0.Timestamp get createdAt => $_getN(8); + $7.Timestamp get createdAt => $_getN(8); @$pb.TagNumber(9) - set createdAt($0.Timestamp v) { setField(9, v); } + set createdAt($7.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasCreatedAt() => $_has(8); @$pb.TagNumber(9) void clearCreatedAt() => clearField(9); @$pb.TagNumber(9) - $0.Timestamp ensureCreatedAt() => $_ensure(8); + $7.Timestamp ensureCreatedAt() => $_ensure(8); @$pb.TagNumber(10) - $0.Timestamp get updatedAt => $_getN(9); + $7.Timestamp get updatedAt => $_getN(9); @$pb.TagNumber(10) - set updatedAt($0.Timestamp v) { setField(10, v); } + set updatedAt($7.Timestamp v) { setField(10, v); } @$pb.TagNumber(10) $core.bool hasUpdatedAt() => $_has(9); @$pb.TagNumber(10) void clearUpdatedAt() => clearField(10); @$pb.TagNumber(10) - $0.Timestamp ensureUpdatedAt() => $_ensure(9); + $7.Timestamp ensureUpdatedAt() => $_ensure(9); } class GuardianResponse extends $pb.GeneratedMessage { @@ -526,8 +526,8 @@ class GuardianResponse extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.bool? isUseMorningBus, $core.bool? isUseEveningBus, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -571,8 +571,8 @@ class GuardianResponse extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOB(6, _omitFieldNames ? '' : 'isUseMorningBus') ..aOB(7, _omitFieldNames ? '' : 'isUseEveningBus') - ..aOM<$0.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -662,26 +662,26 @@ class GuardianResponse extends $pb.GeneratedMessage { void clearIsUseEveningBus() => clearField(7); @$pb.TagNumber(8) - $0.Timestamp get createdAt => $_getN(7); + $7.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($0.Timestamp v) { setField(8, v); } + set createdAt($7.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $0.Timestamp ensureCreatedAt() => $_ensure(7); + $7.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $0.Timestamp get updatedAt => $_getN(8); + $7.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($0.Timestamp v) { setField(9, v); } + set updatedAt($7.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $0.Timestamp ensureUpdatedAt() => $_ensure(8); + $7.Timestamp ensureUpdatedAt() => $_ensure(8); } class Bus extends $pb.GeneratedMessage { @@ -694,8 +694,8 @@ class Bus extends $pb.GeneratedMessage { $core.double? latitude, $core.double? longitude, $core.bool? enableFaceRecognition, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -743,8 +743,8 @@ class Bus extends $pb.GeneratedMessage { ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..aOB(8, _omitFieldNames ? '' : 'enableFaceRecognition') - ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -843,26 +843,26 @@ class Bus extends $pb.GeneratedMessage { void clearEnableFaceRecognition() => clearField(8); @$pb.TagNumber(9) - $0.Timestamp get createdAt => $_getN(8); + $7.Timestamp get createdAt => $_getN(8); @$pb.TagNumber(9) - set createdAt($0.Timestamp v) { setField(9, v); } + set createdAt($7.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasCreatedAt() => $_has(8); @$pb.TagNumber(9) void clearCreatedAt() => clearField(9); @$pb.TagNumber(9) - $0.Timestamp ensureCreatedAt() => $_ensure(8); + $7.Timestamp ensureCreatedAt() => $_ensure(8); @$pb.TagNumber(10) - $0.Timestamp get updatedAt => $_getN(9); + $7.Timestamp get updatedAt => $_getN(9); @$pb.TagNumber(10) - set updatedAt($0.Timestamp v) { setField(10, v); } + set updatedAt($7.Timestamp v) { setField(10, v); } @$pb.TagNumber(10) $core.bool hasUpdatedAt() => $_has(9); @$pb.TagNumber(10) void clearUpdatedAt() => clearField(10); @$pb.TagNumber(10) - $0.Timestamp ensureUpdatedAt() => $_ensure(9); + $7.Timestamp ensureUpdatedAt() => $_ensure(9); } class Child extends $pb.GeneratedMessage { @@ -879,8 +879,8 @@ class Child extends $pb.GeneratedMessage { $core.bool? hasWaterBottle, $core.bool? hasUmbrella, $core.bool? hasOther, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -944,8 +944,8 @@ class Child extends $pb.GeneratedMessage { ..aOB(10, _omitFieldNames ? '' : 'hasWaterBottle') ..aOB(11, _omitFieldNames ? '' : 'hasUmbrella') ..aOB(12, _omitFieldNames ? '' : 'hasOther') - ..aOM<$0.Timestamp>(13, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(14, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$7.Timestamp>(13, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(14, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1079,26 +1079,26 @@ class Child extends $pb.GeneratedMessage { void clearHasOther() => clearField(12); @$pb.TagNumber(13) - $0.Timestamp get createdAt => $_getN(12); + $7.Timestamp get createdAt => $_getN(12); @$pb.TagNumber(13) - set createdAt($0.Timestamp v) { setField(13, v); } + set createdAt($7.Timestamp v) { setField(13, v); } @$pb.TagNumber(13) $core.bool hasCreatedAt() => $_has(12); @$pb.TagNumber(13) void clearCreatedAt() => clearField(13); @$pb.TagNumber(13) - $0.Timestamp ensureCreatedAt() => $_ensure(12); + $7.Timestamp ensureCreatedAt() => $_ensure(12); @$pb.TagNumber(14) - $0.Timestamp get updatedAt => $_getN(13); + $7.Timestamp get updatedAt => $_getN(13); @$pb.TagNumber(14) - set updatedAt($0.Timestamp v) { setField(14, v); } + set updatedAt($7.Timestamp v) { setField(14, v); } @$pb.TagNumber(14) $core.bool hasUpdatedAt() => $_has(13); @$pb.TagNumber(14) void clearUpdatedAt() => clearField(14); @$pb.TagNumber(14) - $0.Timestamp ensureUpdatedAt() => $_ensure(13); + $7.Timestamp ensureUpdatedAt() => $_ensure(13); } class Station extends $pb.GeneratedMessage { @@ -1111,8 +1111,8 @@ class Station extends $pb.GeneratedMessage { $core.double? longitude, $core.int? morningOrder, $core.int? eveningOrder, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1160,8 +1160,8 @@ class Station extends $pb.GeneratedMessage { ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.int>(7, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) ..a<$core.int>(8, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) - ..aOM<$0.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1259,26 +1259,26 @@ class Station extends $pb.GeneratedMessage { void clearEveningOrder() => clearField(8); @$pb.TagNumber(9) - $0.Timestamp get createdAt => $_getN(8); + $7.Timestamp get createdAt => $_getN(8); @$pb.TagNumber(9) - set createdAt($0.Timestamp v) { setField(9, v); } + set createdAt($7.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasCreatedAt() => $_has(8); @$pb.TagNumber(9) void clearCreatedAt() => clearField(9); @$pb.TagNumber(9) - $0.Timestamp ensureCreatedAt() => $_ensure(8); + $7.Timestamp ensureCreatedAt() => $_ensure(8); @$pb.TagNumber(10) - $0.Timestamp get updatedAt => $_getN(9); + $7.Timestamp get updatedAt => $_getN(9); @$pb.TagNumber(10) - set updatedAt($0.Timestamp v) { setField(10, v); } + set updatedAt($7.Timestamp v) { setField(10, v); } @$pb.TagNumber(10) $core.bool hasUpdatedAt() => $_has(9); @$pb.TagNumber(10) void clearUpdatedAt() => clearField(10); @$pb.TagNumber(10) - $0.Timestamp ensureUpdatedAt() => $_ensure(9); + $7.Timestamp ensureUpdatedAt() => $_ensure(9); } class ChildBusAssociation extends $pb.GeneratedMessage { @@ -1441,8 +1441,8 @@ class ChildPhoto extends $pb.GeneratedMessage { factory ChildPhoto({ $core.String? id, $core.String? childId, - $0.Timestamp? createdAt, - $0.Timestamp? updatedAt, + $7.Timestamp? createdAt, + $7.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1466,8 +1466,8 @@ class ChildPhoto extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildPhoto', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'childId') - ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $0.Timestamp.create) - ..aOM<$0.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $0.Timestamp.create) + ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1511,26 +1511,26 @@ class ChildPhoto extends $pb.GeneratedMessage { void clearChildId() => clearField(2); @$pb.TagNumber(5) - $0.Timestamp get createdAt => $_getN(2); + $7.Timestamp get createdAt => $_getN(2); @$pb.TagNumber(5) - set createdAt($0.Timestamp v) { setField(5, v); } + set createdAt($7.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasCreatedAt() => $_has(2); @$pb.TagNumber(5) void clearCreatedAt() => clearField(5); @$pb.TagNumber(5) - $0.Timestamp ensureCreatedAt() => $_ensure(2); + $7.Timestamp ensureCreatedAt() => $_ensure(2); @$pb.TagNumber(6) - $0.Timestamp get updatedAt => $_getN(3); + $7.Timestamp get updatedAt => $_getN(3); @$pb.TagNumber(6) - set updatedAt($0.Timestamp v) { setField(6, v); } + set updatedAt($7.Timestamp v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasUpdatedAt() => $_has(3); @$pb.TagNumber(6) void clearUpdatedAt() => clearField(6); @$pb.TagNumber(6) - $0.Timestamp ensureUpdatedAt() => $_ensure(3); + $7.Timestamp ensureUpdatedAt() => $_ensure(3); } class BoardingRecord extends $pb.GeneratedMessage { @@ -1539,7 +1539,7 @@ class BoardingRecord extends $pb.GeneratedMessage { $core.String? childId, $core.String? busId, $core.bool? isBoarding, - $0.Timestamp? timestamp, + $7.Timestamp? timestamp, }) { final $result = create(); if (id != null) { @@ -1568,7 +1568,7 @@ class BoardingRecord extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 'busId') ..aOB(4, _omitFieldNames ? '' : 'isBoarding') - ..aOM<$0.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $0.Timestamp.create) + ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1630,15 +1630,15 @@ class BoardingRecord extends $pb.GeneratedMessage { void clearIsBoarding() => clearField(4); @$pb.TagNumber(5) - $0.Timestamp get timestamp => $_getN(4); + $7.Timestamp get timestamp => $_getN(4); @$pb.TagNumber(5) - set timestamp($0.Timestamp v) { setField(5, v); } + set timestamp($7.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasTimestamp() => $_has(4); @$pb.TagNumber(5) void clearTimestamp() => clearField(5); @$pb.TagNumber(5) - $0.Timestamp ensureTimestamp() => $_ensure(4); + $7.Timestamp ensureTimestamp() => $_ensure(4); } diff --git a/backend/proto/buf.gen.yaml b/proto/buf.gen.yaml similarity index 72% rename from backend/proto/buf.gen.yaml rename to proto/buf.gen.yaml index ea1e998f..c53551c5 100644 --- a/backend/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -6,11 +6,11 @@ managed: plugins: # Go用の設定 (サーバー側) - plugin: buf.build/protocolbuffers/go - out: ../proto-gen/go + out: ../backend/proto-gen/go opt: - paths=source_relative - plugin: buf.build/grpc/go - out: ../proto-gen/go + out: ../backend/proto-gen/go opt: - paths=source_relative - require_unimplemented_servers=false @@ -18,15 +18,15 @@ plugins: # Python用の設定 (クライアント側) - plugin: buf.build/grpc/python:v1.61.0 out: - ../../machine_learning/src/proto-gen/ + ../machine_learning/src/proto-gen/ # dependencies - plugin: buf.build/protocolbuffers/python:v25.2 - out: ../../machine_learning/src/proto-gen/ + out: ../machine_learning/src/proto-gen/ - plugin: buf.build/protocolbuffers/pyi:v25.2 - out: ../../machine_learning/src/proto-gen/ + out: ../machine_learning/src/proto-gen/ # Dart用の設定 (クライアント側) - name: dart - out: ../../frontend/where_child_bus_api/lib/proto-gen/ + out: ../frontend/where_child_bus_api/lib/proto-gen/ opt: - grpc diff --git a/backend/proto/buf.yaml b/proto/buf.yaml similarity index 100% rename from backend/proto/buf.yaml rename to proto/buf.yaml diff --git a/backend/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto similarity index 100% rename from backend/proto/where_child_bus/v1/bus.proto rename to proto/where_child_bus/v1/bus.proto diff --git a/backend/proto/where_child_bus/v1/child.proto b/proto/where_child_bus/v1/child.proto similarity index 100% rename from backend/proto/where_child_bus/v1/child.proto rename to proto/where_child_bus/v1/child.proto diff --git a/backend/proto/where_child_bus/v1/child_photo.proto b/proto/where_child_bus/v1/child_photo.proto similarity index 100% rename from backend/proto/where_child_bus/v1/child_photo.proto rename to proto/where_child_bus/v1/child_photo.proto diff --git a/backend/proto/where_child_bus/v1/guardian.proto b/proto/where_child_bus/v1/guardian.proto similarity index 100% rename from backend/proto/where_child_bus/v1/guardian.proto rename to proto/where_child_bus/v1/guardian.proto diff --git a/backend/proto/where_child_bus/v1/health_check.proto b/proto/where_child_bus/v1/health_check.proto similarity index 100% rename from backend/proto/where_child_bus/v1/health_check.proto rename to proto/where_child_bus/v1/health_check.proto diff --git a/backend/proto/where_child_bus/v1/nursery.proto b/proto/where_child_bus/v1/nursery.proto similarity index 100% rename from backend/proto/where_child_bus/v1/nursery.proto rename to proto/where_child_bus/v1/nursery.proto diff --git a/backend/proto/where_child_bus/v1/resources.proto b/proto/where_child_bus/v1/resources.proto similarity index 100% rename from backend/proto/where_child_bus/v1/resources.proto rename to proto/where_child_bus/v1/resources.proto diff --git a/backend/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto similarity index 100% rename from backend/proto/where_child_bus/v1/station.proto rename to proto/where_child_bus/v1/station.proto From cb3148551cef86dc918e77845cb252df4482d2bf Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 15 Feb 2024 12:32:23 +0900 Subject: [PATCH 307/771] =?UTF-8?q?feat:=20machine=5Flearning.proto?= =?UTF-8?q?=E3=81=A8=E9=96=A2=E9=80=A3=E3=81=99=E3=82=8B=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 231 ++++++++++++++++++ .../v1/machine_learning_grpc.pb.go | 107 ++++++++ .../v1/machine_learning.pb.dart | 118 +++++++++ .../v1/machine_learning.pbenum.dart | 11 + .../v1/machine_learning.pbgrpc.dart | 59 +++++ .../v1/machine_learning.pbjson.dart | 39 +++ .../v1/machine_learning_pb2.py | 31 +++ .../v1/machine_learning_pb2.pyi | 17 ++ .../v1/machine_learning_pb2_grpc.py | 67 +++++ .../v1/machine_learning.proto | 15 ++ 10 files changed, 695 insertions(+) create mode 100644 backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go create mode 100644 backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go create mode 100644 frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart create mode 100644 machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py create mode 100644 machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi create mode 100644 machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py create mode 100644 proto/machine_learning/v1/machine_learning.proto diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go new file mode 100644 index 00000000..b7715be2 --- /dev/null +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -0,0 +1,231 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: machine_learning/v1/machine_learning.proto + +package machine_learningv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *PingRequest) Reset() { + *x = PingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingRequest) ProtoMessage() {} + +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{0} +} + +func (x *PingRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type PingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *PingResponse) Reset() { + *x = PingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingResponse) ProtoMessage() {} + +func (x *PingResponse) ProtoReflect() protoreflect.Message { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. +func (*PingResponse) Descriptor() ([]byte, []int) { + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{1} +} + +func (x *PingResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_machine_learning_v1_machine_learning_proto protoreflect.FileDescriptor + +var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x22, 0x27, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x32, 0x65, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, + 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, + 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, + 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, + 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, + 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, + 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_machine_learning_v1_machine_learning_proto_rawDescOnce sync.Once + file_machine_learning_v1_machine_learning_proto_rawDescData = file_machine_learning_v1_machine_learning_proto_rawDesc +) + +func file_machine_learning_v1_machine_learning_proto_rawDescGZIP() []byte { + file_machine_learning_v1_machine_learning_proto_rawDescOnce.Do(func() { + file_machine_learning_v1_machine_learning_proto_rawDescData = protoimpl.X.CompressGZIP(file_machine_learning_v1_machine_learning_proto_rawDescData) + }) + return file_machine_learning_v1_machine_learning_proto_rawDescData +} + +var file_machine_learning_v1_machine_learning_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ + (*PingRequest)(nil), // 0: machine_learning.v1.PingRequest + (*PingResponse)(nil), // 1: machine_learning.v1.PingResponse +} +var file_machine_learning_v1_machine_learning_proto_depIdxs = []int32{ + 0, // 0: machine_learning.v1.MachineLearningService.Ping:input_type -> machine_learning.v1.PingRequest + 1, // 1: machine_learning.v1.MachineLearningService.Ping:output_type -> machine_learning.v1.PingResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_machine_learning_v1_machine_learning_proto_init() } +func file_machine_learning_v1_machine_learning_proto_init() { + if File_machine_learning_v1_machine_learning_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_machine_learning_v1_machine_learning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_machine_learning_v1_machine_learning_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_machine_learning_v1_machine_learning_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_machine_learning_v1_machine_learning_proto_goTypes, + DependencyIndexes: file_machine_learning_v1_machine_learning_proto_depIdxs, + MessageInfos: file_machine_learning_v1_machine_learning_proto_msgTypes, + }.Build() + File_machine_learning_v1_machine_learning_proto = out.File + file_machine_learning_v1_machine_learning_proto_rawDesc = nil + file_machine_learning_v1_machine_learning_proto_goTypes = nil + file_machine_learning_v1_machine_learning_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go new file mode 100644 index 00000000..6c6799d2 --- /dev/null +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: machine_learning/v1/machine_learning.proto + +package machine_learningv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + MachineLearningService_Ping_FullMethodName = "/machine_learning.v1.MachineLearningService/Ping" +) + +// MachineLearningServiceClient is the client API for MachineLearningService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MachineLearningServiceClient interface { + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) +} + +type machineLearningServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMachineLearningServiceClient(cc grpc.ClientConnInterface) MachineLearningServiceClient { + return &machineLearningServiceClient{cc} +} + +func (c *machineLearningServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { + out := new(PingResponse) + err := c.cc.Invoke(ctx, MachineLearningService_Ping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MachineLearningServiceServer is the server API for MachineLearningService service. +// All implementations should embed UnimplementedMachineLearningServiceServer +// for forward compatibility +type MachineLearningServiceServer interface { + Ping(context.Context, *PingRequest) (*PingResponse, error) +} + +// UnimplementedMachineLearningServiceServer should be embedded to have forward compatible implementations. +type UnimplementedMachineLearningServiceServer struct { +} + +func (UnimplementedMachineLearningServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} + +// UnsafeMachineLearningServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MachineLearningServiceServer will +// result in compilation errors. +type UnsafeMachineLearningServiceServer interface { + mustEmbedUnimplementedMachineLearningServiceServer() +} + +func RegisterMachineLearningServiceServer(s grpc.ServiceRegistrar, srv MachineLearningServiceServer) { + s.RegisterService(&MachineLearningService_ServiceDesc, srv) +} + +func _MachineLearningService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MachineLearningServiceServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MachineLearningService_Ping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MachineLearningServiceServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MachineLearningService_ServiceDesc is the grpc.ServiceDesc for MachineLearningService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MachineLearningService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "machine_learning.v1.MachineLearningService", + HandlerType: (*MachineLearningServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Ping", + Handler: _MachineLearningService_Ping_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "machine_learning/v1/machine_learning.proto", +} diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart new file mode 100644 index 00000000..b84ba5d1 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -0,0 +1,118 @@ +// +// Generated code. Do not modify. +// source: machine_learning/v1/machine_learning.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class PingRequest extends $pb.GeneratedMessage { + factory PingRequest({ + $core.String? message, + }) { + final $result = create(); + if (message != null) { + $result.message = message; + } + return $result; + } + PingRequest._() : super(); + factory PingRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PingRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'message') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PingRequest clone() => PingRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PingRequest copyWith(void Function(PingRequest) updates) => super.copyWith((message) => updates(message as PingRequest)) as PingRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PingRequest create() => PingRequest._(); + PingRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PingRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PingRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get message => $_getSZ(0); + @$pb.TagNumber(1) + set message($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasMessage() => $_has(0); + @$pb.TagNumber(1) + void clearMessage() => clearField(1); +} + +class PingResponse extends $pb.GeneratedMessage { + factory PingResponse({ + $core.String? message, + }) { + final $result = create(); + if (message != null) { + $result.message = message; + } + return $result; + } + PingResponse._() : super(); + factory PingResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PingResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'message') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PingResponse clone() => PingResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PingResponse copyWith(void Function(PingResponse) updates) => super.copyWith((message) => updates(message as PingResponse)) as PingResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PingResponse create() => PingResponse._(); + PingResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PingResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PingResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get message => $_getSZ(0); + @$pb.TagNumber(1) + set message($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasMessage() => $_has(0); + @$pb.TagNumber(1) + void clearMessage() => clearField(1); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart new file mode 100644 index 00000000..2e7d3a99 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: machine_learning/v1/machine_learning.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart new file mode 100644 index 00000000..0ff0e48d --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: machine_learning/v1/machine_learning.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'machine_learning.pb.dart' as $0; + +export 'machine_learning.pb.dart'; + +@$pb.GrpcServiceName('machine_learning.v1.MachineLearningService') +class MachineLearningServiceClient extends $grpc.Client { + static final _$ping = $grpc.ClientMethod<$0.PingRequest, $0.PingResponse>( + '/machine_learning.v1.MachineLearningService/Ping', + ($0.PingRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.PingResponse.fromBuffer(value)); + + MachineLearningServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$0.PingResponse> ping($0.PingRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$ping, request, options: options); + } +} + +@$pb.GrpcServiceName('machine_learning.v1.MachineLearningService') +abstract class MachineLearningServiceBase extends $grpc.Service { + $core.String get $name => 'machine_learning.v1.MachineLearningService'; + + MachineLearningServiceBase() { + $addMethod($grpc.ServiceMethod<$0.PingRequest, $0.PingResponse>( + 'Ping', + ping_Pre, + false, + false, + ($core.List<$core.int> value) => $0.PingRequest.fromBuffer(value), + ($0.PingResponse value) => value.writeToBuffer())); + } + + $async.Future<$0.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$0.PingRequest> request) async { + return ping(call, await request); + } + + $async.Future<$0.PingResponse> ping($grpc.ServiceCall call, $0.PingRequest request); +} diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart new file mode 100644 index 00000000..808072d0 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -0,0 +1,39 @@ +// +// Generated code. Do not modify. +// source: machine_learning/v1/machine_learning.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use pingRequestDescriptor instead') +const PingRequest$json = { + '1': 'PingRequest', + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + ], +}; + +/// Descriptor for `PingRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List pingRequestDescriptor = $convert.base64Decode( + 'CgtQaW5nUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdl'); + +@$core.Deprecated('Use pingResponseDescriptor instead') +const PingResponse$json = { + '1': 'PingResponse', + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + ], +}; + +/// Descriptor for `PingResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( + 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); + diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py new file mode 100644 index 00000000..838ce743 --- /dev/null +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: machine_learning/v1/machine_learning.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"\'\n\x0bPingRequest\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2e\n\x16MachineLearningService\x12K\n\x04Ping\x12 .machine_learning.v1.PingRequest\x1a!.machine_learning.v1.PingResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'machine_learning.v1.machine_learning_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' + _globals['_PINGREQUEST']._serialized_start=67 + _globals['_PINGREQUEST']._serialized_end=106 + _globals['_PINGRESPONSE']._serialized_start=108 + _globals['_PINGRESPONSE']._serialized_end=148 + _globals['_MACHINELEARNINGSERVICE']._serialized_start=150 + _globals['_MACHINELEARNINGSERVICE']._serialized_end=251 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi new file mode 100644 index 00000000..da0f3584 --- /dev/null +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi @@ -0,0 +1,17 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class PingRequest(_message.Message): + __slots__ = ("message",) + MESSAGE_FIELD_NUMBER: _ClassVar[int] + message: str + def __init__(self, message: _Optional[str] = ...) -> None: ... + +class PingResponse(_message.Message): + __slots__ = ("message",) + MESSAGE_FIELD_NUMBER: _ClassVar[int] + message: str + def __init__(self, message: _Optional[str] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py new file mode 100644 index 00000000..ea8f95c3 --- /dev/null +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py @@ -0,0 +1,67 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import grpc.experimental + +from machine_learning.v1 import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 + + +class MachineLearningServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Ping = channel.unary_unary( + '/machine_learning.v1.MachineLearningService/Ping', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PingRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PingResponse.FromString, + ) + + +class MachineLearningServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Ping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_MachineLearningServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Ping': grpc.unary_unary_rpc_method_handler( + servicer.Ping, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PingRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'machine_learning.v1.MachineLearningService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class MachineLearningService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Ping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/Ping', + machine__learning_dot_v1_dot_machine__learning__pb2.PingRequest.SerializeToString, + machine__learning_dot_v1_dot_machine__learning__pb2.PingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto new file mode 100644 index 00000000..72c6c2b7 --- /dev/null +++ b/proto/machine_learning/v1/machine_learning.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package machine_learning.v1; + +service MachineLearningService { + rpc Ping(PingRequest) returns (PingResponse); +} + +message PingRequest { + string message = 1; +} + +message PingResponse { + string message = 1; +} \ No newline at end of file From 81321b1f6ef983c4b2a4b7ebc22ce3b1eb1df068 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 15 Feb 2024 14:47:45 +0900 Subject: [PATCH 308/771] =?UTF-8?q?chore:=20=E3=82=B5=E3=83=BC=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=81=AE=E3=83=87=E3=83=A2=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/machine_learning/v1/server.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 machine_learning/src/proto-gen/machine_learning/v1/server.py diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py new file mode 100644 index 00000000..7df1ac68 --- /dev/null +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -0,0 +1,21 @@ +from concurrent import futures +import grpc +import machine_learning_pb2 +import machine_learning_pb2_grpc + +class HelloWorld(machine_learning_pb2_grpc.MachineLearningServiceServicer): + def SayHello(self, request, context): + print("RECV: %s" % request.name) + message = "Hello, %s!" % request.name + print("SEND: %s" % message) + return machine_learning_pb2.PingResponse(message=message) + +def serve(): + server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) + machine_learning_pb2_grpc.add_MachineLearningServiceServicer_to_server(HelloWorld(), server) + server.add_insecure_port('[::]:8080') + server.start() + server.wait_for_termination() + +if __name__ == '__main__': + serve() \ No newline at end of file From 183ed7273722a898f08a7a7b08c46bac884453b4 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 15:09:29 +0900 Subject: [PATCH 309/771] =?UTF-8?q?feat:=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E7=99=BB=E9=8C=B2=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E8=A6=8B?= =?UTF-8?q?=E3=81=9F=E7=9B=AE=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/register_page/register_page.dart | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 frontend/where_child_bus/lib/pages/register_page/register_page.dart diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart new file mode 100644 index 00000000..1676d934 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; + +class RegisterPage extends StatefulWidget { + const RegisterPage({super.key}); + + @override + State createState() => _RegisterPageState(); +} + +class _RegisterPageState extends State { + final _emailController = TextEditingController(); + final _passwordController = TextEditingController(); + final _confirmPasswordController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( + body: pageBody(), + ), + ); + } + + void register() {} + + Widget pageBody() { + return Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + titleText(), + mailInputField(), + passwordInputField(), + confirmPasswordInputField(), + const SizedBox( + height: 32, + ), + registerButton(), + ], + ), + ); + } + + Widget titleText() { + return const Padding( + padding: EdgeInsets.only(bottom: 32), + child: Text( + 'WhereChildBus', + style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold), + ), + ); + } + + Widget mailInputField() { + return Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'メールアドレス', + ), + controller: _emailController, + keyboardType: TextInputType.emailAddress, + ), + ); + } + + Widget passwordInputField() { + return Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'パスワード', + ), + controller: _passwordController, + obscureText: true, + keyboardType: TextInputType.visiblePassword, + ), + ); + } + + Widget confirmPasswordInputField() { + return Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'パスワードの確認', + ), + controller: _confirmPasswordController, + obscureText: true, + keyboardType: TextInputType.visiblePassword, + ), + ); + } + + Widget registerButton() { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + child: ElevatedButton( + onPressed: () => (), + child: const Text('登録'), + ), + ); + } +} From 85b1cf0e755acdfb960c2951e99c48f46c34b69a Mon Sep 17 00:00:00 2001 From: koto623 Date: Thu, 15 Feb 2024 15:17:33 +0900 Subject: [PATCH 310/771] =?UTF-8?q?feat:GoogleMap=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../android/app/build.gradle | 2 +- .../android/app/src/main/AndroidManifest.xml | 1 + .../where_child_bus_guardian/lib/app.dart | 9 +- .../lib/components/utils/google_map_view.dart | 29 +++++ .../where_child_bus_guardian/lib/main.dart | 5 +- .../lib/pages/map_page/map_page.dart | 14 +-- .../where_child_bus_guardian/pubspec.lock | 111 +++++++++++++++++- .../where_child_bus_guardian/pubspec.yaml | 1 + 8 files changed, 155 insertions(+), 17 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart diff --git a/frontend/where_child_bus_guardian/android/app/build.gradle b/frontend/where_child_bus_guardian/android/app/build.gradle index ed752966..2839fdc8 100644 --- a/frontend/where_child_bus_guardian/android/app/build.gradle +++ b/frontend/where_child_bus_guardian/android/app/build.gradle @@ -45,7 +45,7 @@ android { applicationId "com.example.where_child_bus_guardian" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion + minSdkVersion 20 //flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml b/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml index 0fefc09c..97c788b3 100644 --- a/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml +++ b/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ android:label="where_child_bus_guardian" android:name="${applicationName}" android:icon="@mipmap/ic_launcher"> + createState() => _AppState(); @@ -19,11 +20,11 @@ class _AppState extends State { appBar: AppBar( title: Text(['日々の記録', '地図', '乗車確認'][_selectedIndex]), ), - body: [ + body: IndexedStack(index: _selectedIndex, children: [ const DailyPage(), - const MapPage(), + MapPage(googleMap: widget.googleMap), const CheckPage() - ][_selectedIndex], + ]), bottomNavigationBar: BottomNavigationBar( currentIndex: _selectedIndex, onTap: (int index) => setState(() => _selectedIndex = index), diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart new file mode 100644 index 00000000..f3a9425c --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; + +class GoogleMapView extends StatefulWidget { + const GoogleMapView({super.key}); + + @override + State createState() => _GoogleMapView(); +} + +class _GoogleMapView extends State { + CameraPosition _initialLocation = CameraPosition(target: LatLng(0.0, 0.0)); + + late GoogleMapController mapController; + + @override + Widget build(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.5, + child: GoogleMap( + initialCameraPosition: _initialLocation, + mapType: MapType.normal, + onMapCreated: (GoogleMapController controller) { + mapController = controller; + }, + )); + } +} diff --git a/frontend/where_child_bus_guardian/lib/main.dart b/frontend/where_child_bus_guardian/lib/main.dart index 5c127a65..57596aae 100644 --- a/frontend/where_child_bus_guardian/lib/main.dart +++ b/frontend/where_child_bus_guardian/lib/main.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus_guardian/app.dart'; +import './components/utils/google_map_view.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); @@ -15,6 +16,8 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State { + Widget googleMap = const GoogleMapView(); + @override Widget build(BuildContext context) { return MaterialApp( @@ -23,7 +26,7 @@ class _MyAppState extends State { colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), - home: const App(), + home: App(googleMap: googleMap), ); } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index ceb720bb..294e49a3 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -2,7 +2,9 @@ import 'package:flutter/material.dart'; import '../styles/styles.dart'; class MapPage extends StatefulWidget { - const MapPage({super.key}); + final Widget googleMap; + + const MapPage({super.key, required this.googleMap}); @override State createState() => _MapPageState(); @@ -16,19 +18,11 @@ class _MapPageState extends State { return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: [mapBody(), pageBottomBody()], + children: [widget.googleMap, pageBottomBody()], ), ); } - Widget mapBody() { - return Container( - width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height * 0.5, - color: Colors.grey, - ); - } - Widget pageBottomBody() { return SizedBox( width: MediaQuery.of(context).size.width, diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index 2e418455..721cd3f4 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -81,6 +81,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" cupertino_icons: dependency: "direct main" description: @@ -126,6 +134,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da + url: "https://pub.dev" + source: hosted + version: "2.0.17" flutter_state_notifier: dependency: "direct main" description: @@ -147,6 +163,59 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.1" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + google_maps: + dependency: transitive + description: + name: google_maps + sha256: "555d5d736339b0478e821167ac521c810d7b51c3b2734e6802a9f046b64ea37a" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + google_maps_flutter: + dependency: "direct main" + description: + name: google_maps_flutter + sha256: ae66fef3e71261d7df2eff29b2a119e190b2884325ecaa55321b1e17b5504066 + url: "https://pub.dev" + source: hosted + version: "2.5.3" + google_maps_flutter_android: + dependency: transitive + description: + name: google_maps_flutter_android + sha256: "714530f865f13bb3b9505c58821c3baed5d247a871724acf5d2ea5808fbed02c" + url: "https://pub.dev" + source: hosted + version: "2.6.2" + google_maps_flutter_ios: + dependency: transitive + description: + name: google_maps_flutter_ios + sha256: "29503b5159da2308a66212c3827963998bfb943ba073e2114fb2d486b47fd2c8" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + google_maps_flutter_platform_interface: + dependency: transitive + description: + name: google_maps_flutter_platform_interface + sha256: "6060779f020638a8eedeb0fb14234818e5fa32ec45a4653d6428ab436e2bbc64" + url: "https://pub.dev" + source: hosted + version: "2.4.3" + google_maps_flutter_web: + dependency: transitive + description: + name: google_maps_flutter_web + sha256: "6245721c160d6f531c1ef568cf9bef8d660cd585a982aa75121269030163785a" + url: "https://pub.dev" + source: hosted + version: "0.5.4+3" googleapis_auth: dependency: transitive description: @@ -163,6 +232,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.4" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" http: dependency: transitive description: @@ -195,6 +272,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.7" + js_wrapping: + dependency: transitive + description: + name: js_wrapping + sha256: e385980f7c76a8c1c9a560dfb623b890975841542471eade630b2871d243851c + url: "https://pub.dev" + source: hosted + version: "0.7.4" lints: dependency: transitive description: @@ -243,6 +328,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" pointycastle: dependency: transitive description: @@ -267,6 +360,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.1" + sanitize_html: + dependency: transitive + description: + name: sanitize_html + sha256: "12669c4a913688a26555323fb9cec373d8f9fbe091f2d01c40c723b33caa8989" + url: "https://pub.dev" + source: hosted + version: "2.1.0" sky_engine: dependency: transitive description: flutter @@ -304,6 +405,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" string_scanner: dependency: transitive description: @@ -354,4 +463,4 @@ packages: version: "0.3.0" sdks: dart: ">=3.2.6 <4.0.0" - flutter: ">=1.17.0" + flutter: ">=3.16.6" diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index 58fa9e6c..4b6e0b52 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -18,6 +18,7 @@ dependencies: flutter_toggle_tab: ^1.4.1 carousel_slider: ^4.2.1 flutter_state_notifier: ^1.0.0 + google_maps_flutter: ^2.5.3 dev_dependencies: flutter_test: From f0cb326f3d7694923b532dce228be7f693c590c7 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 15 Feb 2024 15:23:23 +0900 Subject: [PATCH 311/771] =?UTF-8?q?fix:=20demo=E3=82=B5=E3=83=BC=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=81=8C=E6=AD=A3=E3=81=97=E3=81=8F=E5=8B=95=E4=BD=9C?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning_pb2_grpc.py | 2 +- .../proto-gen/machine_learning/v1/server.py | 21 +++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py index ea8f95c3..7bc916f1 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py @@ -3,7 +3,7 @@ import grpc import grpc.experimental -from machine_learning.v1 import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 +import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 class MachineLearningServiceStub(object): diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 7df1ac68..52c2e476 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -2,20 +2,29 @@ import grpc import machine_learning_pb2 import machine_learning_pb2_grpc +from grpc_reflection.v1alpha import reflection -class HelloWorld(machine_learning_pb2_grpc.MachineLearningServiceServicer): - def SayHello(self, request, context): - print("RECV: %s" % request.name) - message = "Hello, %s!" % request.name +class HealthCheck(machine_learning_pb2_grpc.MachineLearningServiceServicer): + def Ping(self, request, context): + print("RECV: %s" % request.message) + message = "Hello, %s!" % request.message print("SEND: %s" % message) return machine_learning_pb2.PingResponse(message=message) def serve(): server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) - machine_learning_pb2_grpc.add_MachineLearningServiceServicer_to_server(HelloWorld(), server) + machine_learning_pb2_grpc.add_MachineLearningServiceServicer_to_server(HealthCheck(), server) + + # Reflection APIの設定 + SERVICE_NAMES = ( + machine_learning_pb2.DESCRIPTOR.services_by_name['MachineLearningService'].full_name, + reflection.SERVICE_NAME, + ) + reflection.enable_server_reflection(SERVICE_NAMES, server) + server.add_insecure_port('[::]:8080') server.start() server.wait_for_termination() if __name__ == '__main__': - serve() \ No newline at end of file + serve() From bc80acdce7eab6e4be3eae37678e2dd3f2ab852d Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 16:07:17 +0900 Subject: [PATCH 312/771] =?UTF-8?q?feat:=E9=9B=BB=E8=A9=B1=E7=95=AA?= =?UTF-8?q?=E5=8F=B7=E3=81=A8=E4=BD=8F=E6=89=80=E3=81=AE=E3=83=95=E3=82=A3?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/register_page/register_page.dart | 96 ++++++++++++++++--- .../lib/util/api/nursery_register.dart | 36 +++++++ 2 files changed, 119 insertions(+), 13 deletions(-) create mode 100644 frontend/where_child_bus/lib/util/api/nursery_register.dart diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index 1676d934..9961a028 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -1,4 +1,15 @@ import 'package:flutter/material.dart'; +import "dart:developer" as developer; +import 'package:where_child_bus/util/api/nursery_register.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; + +enum CreateNurseryError { + unknown, + invalidEmail, + emailAlreadyExist, + networkError, + passwordsDoNotMatch +} class RegisterPage extends StatefulWidget { const RegisterPage({super.key}); @@ -9,35 +20,68 @@ class RegisterPage extends StatefulWidget { class _RegisterPageState extends State { final _emailController = TextEditingController(); + final _phoneNumberController = TextEditingController(); + final _addressController = TextEditingController(); final _passwordController = TextEditingController(); final _confirmPasswordController = TextEditingController(); + CreateNurseryError? _createError; + @override Widget build(BuildContext context) { return GestureDetector( onTap: () => FocusScope.of(context).unfocus(), child: Scaffold( + resizeToAvoidBottomInset: true, body: pageBody(), ), ); } - void register() {} + void register() async { + if (_passwordController.text != _confirmPasswordController.text) { + setState(() { + _createError = CreateNurseryError.passwordsDoNotMatch; + }); + return; + } + + try { + CreateNurseryResponse res = await createNursery( + _emailController.text, + _passwordController.text, + _phoneNumberController.text, + _addressController.text, + ); + } catch (err) { + developer.log("Caught error", error: err); + } + } Widget pageBody() { - return Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - titleText(), - mailInputField(), - passwordInputField(), - confirmPasswordInputField(), - const SizedBox( - height: 32, + return SingleChildScrollView( + child: Center( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const SizedBox( + height: 32, + ), + titleText(), + mailInputField(), + phoneNumberInputField(), + addressInputField(), + passwordInputField(), + confirmPasswordInputField(), + const SizedBox( + height: 32, + ), + registerButton(), + ], ), - registerButton(), - ], + ), ), ); } @@ -66,6 +110,32 @@ class _RegisterPageState extends State { ); } + Widget phoneNumberInputField() { + return Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: '電話番号', + ), + controller: _phoneNumberController, + keyboardType: const TextInputType.numberWithOptions( + signed: false, decimal: false)), + ); + } + + Widget addressInputField() { + return Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: '住所', + ), + controller: _addressController, + )); + } + Widget passwordInputField() { return Padding( padding: const EdgeInsets.all(8.0), diff --git a/frontend/where_child_bus/lib/util/api/nursery_register.dart b/frontend/where_child_bus/lib/util/api/nursery_register.dart new file mode 100644 index 00000000..f3087ad0 --- /dev/null +++ b/frontend/where_child_bus/lib/util/api/nursery_register.dart @@ -0,0 +1,36 @@ +import "dart:async"; +import "dart:developer" as developer; +import "package:flutter/foundation.dart"; +import "package:grpc/grpc.dart"; +import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart"; + +Future createNursery( + String email, String password, String phoneNumber, String address) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + + final grpcClient = NurseryServiceClient(channel); + + try { + var req = CreateNurseryRequest( + email: email, + password: password, + phoneNumber: phoneNumber, + address: address, + ); + + if (kDebugMode) { + developer.log("リクエスト: $req"); + } + + var res = await grpcClient.createNursery(req); + return res; + } catch (err) { + developer.log("Caught error", error: err); + await channel.shutdown(); + return Future.error(err); + } +} From 5f0259baa2c628bc4ede3179f72816f7967e76b7 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 16:34:44 +0900 Subject: [PATCH 313/771] =?UTF-8?q?feat:=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=8F=E3=83=B3=E3=83=89=E3=83=AA=E3=83=B3=E3=82=B0=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/register_page/register_page.dart | 90 +++++++++++++++++-- 1 file changed, 84 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index 9961a028..0d83dc84 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/app.dart'; import "dart:developer" as developer; import 'package:where_child_bus/util/api/nursery_register.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; @@ -8,7 +9,8 @@ enum CreateNurseryError { invalidEmail, emailAlreadyExist, networkError, - passwordsDoNotMatch + passwordsDoNotMatch, + fieldsDoNotFilled, } class RegisterPage extends StatefulWidget { @@ -39,10 +41,24 @@ class _RegisterPageState extends State { } void register() async { - if (_passwordController.text != _confirmPasswordController.text) { - setState(() { - _createError = CreateNurseryError.passwordsDoNotMatch; - }); + //フィールドが全て埋まっているか確認 + if (!validateFields( + _emailController.text, + _phoneNumberController.text, + _addressController.text, + _passwordController.text, + _confirmPasswordController.text)) { + return; + } + + //メールアドレスが有効な形式かどうか確認 + if (!validateEmailFormat(_emailController.text)) { + return; + } + + //パスワードが一致しているかどうか確認 + if (!validatePasswordsMatch( + _passwordController.text, _confirmPasswordController.text)) { return; } @@ -53,11 +69,54 @@ class _RegisterPageState extends State { _phoneNumberController.text, _addressController.text, ); + + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (BuildContext context) => const App(res.nursery), + ), + ); } catch (err) { developer.log("Caught error", error: err); } } + bool validateFields(String email, String phoneNumber, String address, + String password, String confirmPassword) { + if (email.isEmpty || + phoneNumber.isEmpty || + address.isEmpty || + password.isEmpty || + confirmPassword.isEmpty) { + setState(() { + _createError = CreateNurseryError.fieldsDoNotFilled; + }); + return false; + } + return true; + } + + bool validateEmailFormat(String email) { + RegExp emailValidator = RegExp(r'^[a-zA-Z0-9.]+@[a-zA-Z0-9]+\.[a-zA-Z]+'); + if (!emailValidator.hasMatch(email)) { + setState(() { + _createError = CreateNurseryError.invalidEmail; + }); + return false; + } + return true; + } + + bool validatePasswordsMatch(String password, String confirmPassword) { + if (password != confirmPassword) { + setState(() { + _createError = CreateNurseryError.passwordsDoNotMatch; + }); + return false; + } + return true; + } + Widget pageBody() { return SingleChildScrollView( child: Center( @@ -78,6 +137,7 @@ class _RegisterPageState extends State { const SizedBox( height: 32, ), + if (_createError != null) errorMessage(_createError!), registerButton(), ], ), @@ -86,6 +146,24 @@ class _RegisterPageState extends State { ); } + Widget errorMessage(CreateNurseryError createError) { + late String errorMessageText; + if (createError == CreateNurseryError.passwordsDoNotMatch) { + errorMessageText = "パスワードが一致していません"; + } else if (createError == CreateNurseryError.fieldsDoNotFilled) { + errorMessageText = "全てのフィールドを入力してください"; + } else if (createError == CreateNurseryError.invalidEmail) { + errorMessageText = "メールアドレスが有効な形式ではありません"; + } else { + errorMessageText = "不明なエラーです"; + } + + return Text(errorMessageText, + style: const TextStyle( + color: Colors.red, + )); + } + Widget titleText() { return const Padding( padding: EdgeInsets.only(bottom: 32), @@ -170,7 +248,7 @@ class _RegisterPageState extends State { return SizedBox( width: MediaQuery.of(context).size.width * 0.6, child: ElevatedButton( - onPressed: () => (), + onPressed: () => register(), child: const Text('登録'), ), ); From ddad631b09c9024abff24b515d1dcd7d82e71f4d Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 16:41:04 +0900 Subject: [PATCH 314/771] =?UTF-8?q?feat:=E3=83=A1=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AB=E3=83=AC=E3=82=B9=E3=83=9D?= =?UTF-8?q?=E3=83=B3=E3=82=B9=E3=82=92=E6=B8=A1=E3=81=99=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/app.dart | 5 +++- .../lib/pages/auth_page/auth_page.dart | 24 ++++++++++--------- .../pages/register_page/register_page.dart | 18 ++++++++++---- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index 0d09429c..2e880b2b 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -2,9 +2,12 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_list_page.dart'; import 'package:where_child_bus/pages/notification_page/notification_page.dart'; import 'package:where_child_bus/pages/student_list_page/student_list_page.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class App extends StatefulWidget { - const App({super.key}); + NurseryResponse nursery; + + App({super.key, required this.nursery}); @override State createState() => _AppState(); diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index 0b6088c5..e60e3408 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -12,6 +12,7 @@ enum NurseryLoginError { databaseError, // 他のエラータイプをここに追加 } + class AuthPage extends StatefulWidget { const AuthPage({super.key}); @@ -41,7 +42,8 @@ class _AuthPageState extends State { mailInputField(), passwordInputField(), spacer32(), - if (_loginError != null && _loginError == NurseryLoginError.invalidCredentials) + if (_loginError != null && + _loginError == NurseryLoginError.invalidCredentials) emailOrPasswordNotFound(), loginButton(), ]; @@ -108,12 +110,12 @@ class _AuthPageState extends State { Widget emailOrPasswordNotFound() { return const Padding( - padding: EdgeInsets.all(8.0), - child: Text( + padding: EdgeInsets.all(8.0), + child: Text( "メールアドレスかパスワードが間違っています", style: TextStyle( color: Colors.red, - fontSize: 13, + fontSize: 13, ), ), ); @@ -123,22 +125,22 @@ class _AuthPageState extends State { BuildContext currentContext = context; NurseryLoginResponse res; try { - if(kDebugMode) { - res = await nurseryLogin( - "demo@example.com", "password"); + if (kDebugMode) { + res = await nurseryLogin("demo@example.com", "password"); } else { - res = await nurseryLogin( - _emailController.text, _passwordController.text); + res = + await nurseryLogin(_emailController.text, _passwordController.text); } - if (res.success) { print(res.success); print(res.nursery.name); Navigator.pushReplacement( currentContext, MaterialPageRoute( - builder: (BuildContext context) => const App(), + builder: (BuildContext context) => App( + nursery: res.nursery, + ), ), ); } else { diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index 0d83dc84..c75c8e8a 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -73,11 +73,16 @@ class _RegisterPageState extends State { Navigator.pushReplacement( context, MaterialPageRoute( - builder: (BuildContext context) => const App(res.nursery), + builder: (BuildContext context) => App( + nursery: res.nursery, + ), ), ); } catch (err) { developer.log("Caught error", error: err); + setState(() { + _createError = CreateNurseryError.unknown; + }); } } @@ -158,10 +163,13 @@ class _RegisterPageState extends State { errorMessageText = "不明なエラーです"; } - return Text(errorMessageText, - style: const TextStyle( - color: Colors.red, - )); + return Padding( + padding: const EdgeInsets.only(bottom: 16.0), + child: Text(errorMessageText, + style: const TextStyle( + color: Colors.red, + )), + ); } Widget titleText() { From 2b30dbbec5f3d8e300c2e4e0afbc223576b229b9 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 16:45:39 +0900 Subject: [PATCH 315/771] =?UTF-8?q?refactor:=E3=83=A2=E3=83=87=E3=83=AB?= =?UTF-8?q?=E3=82=92=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/models/create_nursery_error.dart | 8 ++++++++ .../lib/pages/register_page/register_page.dart | 10 +--------- 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 frontend/where_child_bus/lib/models/create_nursery_error.dart diff --git a/frontend/where_child_bus/lib/models/create_nursery_error.dart b/frontend/where_child_bus/lib/models/create_nursery_error.dart new file mode 100644 index 00000000..2c63a6e6 --- /dev/null +++ b/frontend/where_child_bus/lib/models/create_nursery_error.dart @@ -0,0 +1,8 @@ +enum CreateNurseryError { + unknown, + invalidEmail, + emailAlreadyExist, + networkError, + passwordsDoNotMatch, + fieldsDoNotFilled, +} diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index c75c8e8a..c0ddecc9 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -3,15 +3,7 @@ import 'package:where_child_bus/app.dart'; import "dart:developer" as developer; import 'package:where_child_bus/util/api/nursery_register.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; - -enum CreateNurseryError { - unknown, - invalidEmail, - emailAlreadyExist, - networkError, - passwordsDoNotMatch, - fieldsDoNotFilled, -} +import "package:where_child_bus/models/create_nursery_error.dart"; class RegisterPage extends StatefulWidget { const RegisterPage({super.key}); From e0e6466fea486d8b523da0015ec02a5db0ab18ff Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 16:55:24 +0900 Subject: [PATCH 316/771] =?UTF-8?q?refactor:=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=8F=E3=83=B3=E3=83=89=E3=83=AA=E3=83=B3=E3=82=B0=E3=82=92?= =?UTF-8?q?=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/util/api/nursery_create.dart | 55 +++++++++++++++++++ .../lib/util/api/nursery_register.dart | 36 ------------ 2 files changed, 55 insertions(+), 36 deletions(-) create mode 100644 frontend/where_child_bus/lib/util/api/nursery_create.dart delete mode 100644 frontend/where_child_bus/lib/util/api/nursery_register.dart diff --git a/frontend/where_child_bus/lib/util/api/nursery_create.dart b/frontend/where_child_bus/lib/util/api/nursery_create.dart new file mode 100644 index 00000000..70c1d0d6 --- /dev/null +++ b/frontend/where_child_bus/lib/util/api/nursery_create.dart @@ -0,0 +1,55 @@ +import "dart:async"; +import "dart:developer" as developer; +import "package:flutter/foundation.dart"; +import "package:grpc/grpc.dart"; +import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart"; + +Future createNursery( + String email, String password, String phoneNumber, String address) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + options: const ChannelOptions(credentials: ChannelCredentials.insecure()), + ); + + final grpcClient = NurseryServiceClient(channel); + + try { + var req = CreateNurseryRequest( + email: email, + password: password, + phoneNumber: phoneNumber, + address: address, + ); + + if (kDebugMode) { + developer.log("リクエスト: $req"); + } + + var res = await grpcClient.createNursery(req); + if (kDebugMode) { + developer.log("レスポンス: $res"); + } + return res; + } catch (e) { + if (e is GrpcError) { + // 特定のGrpcErrorに対してカスタマイズされた処理を行う + developer.log("gRPCエラー: ${e.message}", error: e); + switch (e.code) { + case StatusCode.unavailable: + return Future.error('サーバーが利用不可です。'); + case StatusCode.alreadyExists: + return Future.error('メールアドレスは既に登録されています。'); + default: + return Future.error('登録中にエラーが発生しました。'); + } + } else { + // 予期せぬエラー + developer.log("予期せぬエラー", error: e); + return Future.error('不明なエラーが発生しました。'); + } + } finally { + await channel.shutdown(); + } +} diff --git a/frontend/where_child_bus/lib/util/api/nursery_register.dart b/frontend/where_child_bus/lib/util/api/nursery_register.dart deleted file mode 100644 index f3087ad0..00000000 --- a/frontend/where_child_bus/lib/util/api/nursery_register.dart +++ /dev/null @@ -1,36 +0,0 @@ -import "dart:async"; -import "dart:developer" as developer; -import "package:flutter/foundation.dart"; -import "package:grpc/grpc.dart"; -import "package:where_child_bus/config/config.dart"; -import "package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart"; - -Future createNursery( - String email, String password, String phoneNumber, String address) async { - final channel = ClientChannel( - appConfig.grpcEndpoint, - port: appConfig.grpcPort, - ); - - final grpcClient = NurseryServiceClient(channel); - - try { - var req = CreateNurseryRequest( - email: email, - password: password, - phoneNumber: phoneNumber, - address: address, - ); - - if (kDebugMode) { - developer.log("リクエスト: $req"); - } - - var res = await grpcClient.createNursery(req); - return res; - } catch (err) { - developer.log("Caught error", error: err); - await channel.shutdown(); - return Future.error(err); - } -} From 5705fb5c330bbf2cddd936db503d7b3f8834ec0c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 17:00:08 +0900 Subject: [PATCH 317/771] =?UTF-8?q?chore:=E4=BE=9D=E5=AD=98=E9=96=A2?= =?UTF-8?q?=E4=BF=82=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/pages/register_page/register_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index c0ddecc9..ad75aebf 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; import "dart:developer" as developer; -import 'package:where_child_bus/util/api/nursery_register.dart'; +import 'package:where_child_bus/util/api/nursery_create.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; import "package:where_child_bus/models/create_nursery_error.dart"; From 5650ed2fef1125c81e2af195a172ab09c0d1f335 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 17:30:16 +0900 Subject: [PATCH 318/771] =?UTF-8?q?refactor:=E3=83=90=E3=83=AA=E3=83=87?= =?UTF-8?q?=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/register_page/register_page.dart | 49 ++++--------------- .../validation/create_nursery_validation.dart | 17 +++++++ 2 files changed, 26 insertions(+), 40 deletions(-) create mode 100644 frontend/where_child_bus/lib/util/validation/create_nursery_validation.dart diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index ad75aebf..7596f232 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -2,8 +2,9 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; import "dart:developer" as developer; import 'package:where_child_bus/util/api/nursery_create.dart'; +import 'package:where_child_bus/util/validation/create_nursery_validation.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; -import "package:where_child_bus/models/create_nursery_error.dart"; +import '../../models/create_nursery_error.dart'; class RegisterPage extends StatefulWidget { const RegisterPage({super.key}); @@ -33,24 +34,27 @@ class _RegisterPageState extends State { } void register() async { - //フィールドが全て埋まっているか確認 + // フィールドが全て埋まっているか確認 if (!validateFields( _emailController.text, _phoneNumberController.text, _addressController.text, _passwordController.text, _confirmPasswordController.text)) { + setState(() => _createError = CreateNurseryError.fieldsDoNotFilled); return; } - //メールアドレスが有効な形式かどうか確認 + // メールアドレスが有効な形式かどうか確認 if (!validateEmailFormat(_emailController.text)) { + setState(() => _createError = CreateNurseryError.invalidEmail); return; } - //パスワードが一致しているかどうか確認 + // パスワードが一致しているかどうか確認 if (!validatePasswordsMatch( _passwordController.text, _confirmPasswordController.text)) { + setState(() => _createError = CreateNurseryError.passwordsDoNotMatch); return; } @@ -78,42 +82,6 @@ class _RegisterPageState extends State { } } - bool validateFields(String email, String phoneNumber, String address, - String password, String confirmPassword) { - if (email.isEmpty || - phoneNumber.isEmpty || - address.isEmpty || - password.isEmpty || - confirmPassword.isEmpty) { - setState(() { - _createError = CreateNurseryError.fieldsDoNotFilled; - }); - return false; - } - return true; - } - - bool validateEmailFormat(String email) { - RegExp emailValidator = RegExp(r'^[a-zA-Z0-9.]+@[a-zA-Z0-9]+\.[a-zA-Z]+'); - if (!emailValidator.hasMatch(email)) { - setState(() { - _createError = CreateNurseryError.invalidEmail; - }); - return false; - } - return true; - } - - bool validatePasswordsMatch(String password, String confirmPassword) { - if (password != confirmPassword) { - setState(() { - _createError = CreateNurseryError.passwordsDoNotMatch; - }); - return false; - } - return true; - } - Widget pageBody() { return SingleChildScrollView( child: Center( @@ -211,6 +179,7 @@ class _RegisterPageState extends State { labelText: '住所', ), controller: _addressController, + keyboardType: TextInputType.streetAddress, )); } diff --git a/frontend/where_child_bus/lib/util/validation/create_nursery_validation.dart b/frontend/where_child_bus/lib/util/validation/create_nursery_validation.dart new file mode 100644 index 00000000..c762c748 --- /dev/null +++ b/frontend/where_child_bus/lib/util/validation/create_nursery_validation.dart @@ -0,0 +1,17 @@ +bool validateFields(String email, String phoneNumber, String address, + String password, String confirmPassword) { + return email.isNotEmpty && + phoneNumber.isNotEmpty && + address.isNotEmpty && + password.isNotEmpty && + confirmPassword.isNotEmpty; +} + +bool validateEmailFormat(String email) { + RegExp emailValidator = RegExp(r'^[a-zA-Z0-9.]+@[a-zA-Z0-9]+\.[a-zA-Z]+'); + return emailValidator.hasMatch(email); +} + +bool validatePasswordsMatch(String password, String confirmPassword) { + return password == confirmPassword; +} From 8eccd65cba69b226de26e866e9e7c0930bc1785c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 18:54:07 +0900 Subject: [PATCH 319/771] =?UTF-8?q?chore:=E4=BE=9D=E5=AD=98=E9=96=A2?= =?UTF-8?q?=E4=BF=82=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/pubspec.lock | 7 +++++++ frontend/where_child_bus_guardian/pubspec.yaml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index 2e418455..5a4973a1 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -352,6 +352,13 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.0" + where_child_bus_api: + dependency: "direct main" + description: + path: "../where_child_bus_api" + relative: true + source: path + version: "0.0.1" sdks: dart: ">=3.2.6 <4.0.0" flutter: ">=1.17.0" diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index 58fa9e6c..470694c3 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -18,6 +18,8 @@ dependencies: flutter_toggle_tab: ^1.4.1 carousel_slider: ^4.2.1 flutter_state_notifier: ^1.0.0 + where_child_bus_api: + path: ../where_child_bus_api dev_dependencies: flutter_test: From 76d32a74c87d443310c4d2f658530e5807ec98c6 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 18:54:37 +0900 Subject: [PATCH 320/771] =?UTF-8?q?refactor:AuthPage=E3=82=92=E3=83=AA?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF=E3=83=AA=E3=83=B3=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/models/guardian_login_error.dart | 8 ++ .../lib/pages/auth_page/auth_page.dart | 116 ++++++++++-------- 2 files changed, 74 insertions(+), 50 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/models/guardian_login_error.dart diff --git a/frontend/where_child_bus_guardian/lib/models/guardian_login_error.dart b/frontend/where_child_bus_guardian/lib/models/guardian_login_error.dart new file mode 100644 index 00000000..b7b4106a --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/models/guardian_login_error.dart @@ -0,0 +1,8 @@ +enum GuardianLoginError { + unknown, + invalidCredentials, + serverError, + networkError, + databaseError, + // 他のエラータイプをここに追加 +} diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index 171c0937..4393eacf 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:where_child_bus_guardian/models/guardian_login_error.dart'; class AuthPage extends StatefulWidget { const AuthPage({super.key}); @@ -12,63 +13,78 @@ class _AuthPageState extends State { final _emailController = TextEditingController(); final _passwordController = TextEditingController(); + GuardianLoginError? _loginError; + @override Widget build(BuildContext context) { return GestureDetector( onTap: () => FocusScope.of(context).unfocus(), child: Scaffold( - body: Center( - child: Padding( - padding: const EdgeInsets.all(32), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - 'WhereChildBus', - style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold), - ), - const SizedBox(height: 32), - Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: 'メールアドレス', - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - ), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: 'パスワード', - ), - controller: _passwordController, - obscureText: true, - keyboardType: TextInputType.visiblePassword, - ), - ), - const SizedBox(height: 32), - SizedBox( - width: MediaQuery.of(context).size.width * 0.6, - child: ElevatedButton( - onPressed: () { - if (kDebugMode) { - debugPrint("email: ${_emailController.text}"); - debugPrint("password: ${_passwordController.text}"); - } - }, - child: const Text('ログイン'), - ), - ) - ], - ), - ), + body: pageBody(), + ), + ); + } + + Widget pageBody() { + return Center( + child: Padding( + padding: const EdgeInsets.all(32), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + titleText(), + mailInputField(), + passwordInputField(), + spacer32(), + if (_loginError != null && + _loginError == GuardianLoginError.invalidCredentials) + emailOrPasswordNotFound(), + loginButton(), + ], ), ), ); } + + Widget titleText() => const Padding( + padding: EdgeInsets.only(bottom: 32), + child: Text('WhereChildBus', + style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold)), + ); + + Widget mailInputField() => Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), labelText: 'メールアドレス'), + controller: _emailController, + keyboardType: TextInputType.emailAddress, + ), + ); + + Widget passwordInputField() => Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), labelText: 'パスワード'), + controller: _passwordController, + obscureText: true, + keyboardType: TextInputType.visiblePassword, + ), + ); + + Widget spacer32() => const SizedBox(height: 32); + + Widget emailOrPasswordNotFound() => const Padding( + padding: EdgeInsets.all(8.0), + child: Text( + "メールアドレスかパスワードが間違っています", + style: TextStyle(color: Colors.red, fontSize: 13), + ), + ); + + Widget loginButton() => SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + child: ElevatedButton(onPressed: () {}, child: const Text('ログイン')), + ); } From 8bc6ca77a37012e9dec21779d3ce400cb3ebfce9 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 19:01:08 +0900 Subject: [PATCH 321/771] =?UTF-8?q?feat:config=E3=81=AE=E8=AA=AD=E3=81=BF?= =?UTF-8?q?=E8=BE=BC=E3=81=BF=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/config/config.dart | 28 +++++++++++++++++++ .../where_child_bus_guardian/pubspec.yaml | 1 + 2 files changed, 29 insertions(+) create mode 100644 frontend/where_child_bus_guardian/lib/config/config.dart diff --git a/frontend/where_child_bus_guardian/lib/config/config.dart b/frontend/where_child_bus_guardian/lib/config/config.dart new file mode 100644 index 00000000..815a8ffa --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/config/config.dart @@ -0,0 +1,28 @@ +import "dart:developer" as developer; +import 'package:flutter_dotenv/flutter_dotenv.dart'; + +class AppConfig { + static final AppConfig _instance = AppConfig._internal(); + + factory AppConfig() { + return _instance; + } + + AppConfig._internal(); + + late String grpcEndpoint; + late int grpcPort; + + Future loadConfig() async { + await dotenv.load(); + + try { + grpcEndpoint = dotenv.get("GRPC_ENDPOINT"); + grpcPort = int.tryParse(dotenv.get("GRPC_PORT")) ?? 0; + } catch (e) { + developer.log("設定の読み込みにエラーが発生しました", error: e); + } + } +} + +final appConfig = AppConfig(); diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index 470694c3..6b34a0ee 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -18,6 +18,7 @@ dependencies: flutter_toggle_tab: ^1.4.1 carousel_slider: ^4.2.1 flutter_state_notifier: ^1.0.0 + flutter_dotenv: ^5.1.0 where_child_bus_api: path: ../where_child_bus_api From 2637fda38bdcededd35ce865c664c2be469a7d3e Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 19:05:09 +0900 Subject: [PATCH 322/771] =?UTF-8?q?feat:main=E3=81=A7=E3=82=B3=E3=83=B3?= =?UTF-8?q?=E3=83=95=E3=82=A3=E3=82=B0=E3=82=92=E8=AA=AD=E3=81=BF=E8=BE=BC?= =?UTF-8?q?=E3=82=80=E3=82=88=E3=81=86=E3=81=AB=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/lib/main.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/main.dart b/frontend/where_child_bus_guardian/lib/main.dart index 5c127a65..86cee259 100644 --- a/frontend/where_child_bus_guardian/lib/main.dart +++ b/frontend/where_child_bus_guardian/lib/main.dart @@ -1,9 +1,18 @@ +import "dart:developer" as developer; import 'package:flutter/material.dart'; import 'package:where_child_bus_guardian/app.dart'; +import 'package:where_child_bus_guardian/config/config.dart'; +import 'package:where_child_bus_guardian/pages/auth_page/auth_page.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); + try { + await appConfig.loadConfig(); + } catch (error) { + developer.log("アプリの立ち上げに失敗しました", error: error); + } + runApp(const MyApp()); } @@ -23,7 +32,7 @@ class _MyAppState extends State { colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), - home: const App(), + home: const AuthPage(), ); } } From 73a8cb7ee41fddb53793c766bc034a13468934c4 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 19:13:22 +0900 Subject: [PATCH 323/771] =?UTF-8?q?feat:GuardianLogin=E3=82=92=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../util/api/guardian.dart | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 frontend/where_child_bus_guardian/util/api/guardian.dart diff --git a/frontend/where_child_bus_guardian/util/api/guardian.dart b/frontend/where_child_bus_guardian/util/api/guardian.dart new file mode 100644 index 00000000..922ee2cd --- /dev/null +++ b/frontend/where_child_bus_guardian/util/api/guardian.dart @@ -0,0 +1,33 @@ +import "dart:developer" as developer; +import "package:flutter/foundation.dart"; +import 'package:grpc/grpc.dart'; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart"; +import "package:where_child_bus_guardian/config/config.dart"; + +Future guardianLogin( + String email, String password) async { + var channel = ClientChannel(appConfig.grpcEndpoint, port: appConfig.grpcPort); + + var grpcClient = GuardianServiceClient(channel); + + try { + var req = GuardianLoginRequest(email: email, password: password); + + //デバッグ時のみリクエストを表示 + if (kDebugMode) { + developer.log("リクエスト: $req"); + } + + var res = await grpcClient.guardianLogin(req); + if (kDebugMode) { + developer.log("レスポンス $res"); + } + + await channel.shutdown(); + return res; + } catch (error) { + developer.log("Caught Error", error: error); + await channel.shutdown(); + return Future.error(error); + } +} From f0d149afd2e25b1dacc69da6e184f9466ea8adf8 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 19:23:40 +0900 Subject: [PATCH 324/771] =?UTF-8?q?chore:=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E9=85=8D=E7=BD=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{util => lib}/api/guardian.dart | 0 .../lib/api/health_check.dart | 28 +++++++++++++++++++ 2 files changed, 28 insertions(+) rename frontend/where_child_bus_guardian/{util => lib}/api/guardian.dart (100%) create mode 100644 frontend/where_child_bus_guardian/lib/api/health_check.dart diff --git a/frontend/where_child_bus_guardian/util/api/guardian.dart b/frontend/where_child_bus_guardian/lib/api/guardian.dart similarity index 100% rename from frontend/where_child_bus_guardian/util/api/guardian.dart rename to frontend/where_child_bus_guardian/lib/api/guardian.dart diff --git a/frontend/where_child_bus_guardian/lib/api/health_check.dart b/frontend/where_child_bus_guardian/lib/api/health_check.dart new file mode 100644 index 00000000..ba495f49 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/api/health_check.dart @@ -0,0 +1,28 @@ +import 'dart:async'; +import 'dart:developer' as developer; // エラーログに使用 +import 'package:grpc/grpc.dart'; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart"; +import 'package:where_child_bus_guardian/config/config.dart'; + +Future serviceHealthCheck() async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + + final grpcClient = HealthcheckServiceClient(channel, + options: CallOptions(timeout: const Duration(seconds: 60))); + + try { + var rqst = PingRequest(); + rqst.name = "ping"; + PingResponse res = await grpcClient.ping(rqst); + print(res.message); + await channel.shutdown(); + return res; + } catch (error) { + developer.log('Caught error: $error'); + await channel.shutdown(); + return Future.error(error); + } +} From 9d9ba5470f796cd85f90634c4506d7f1680d7e28 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 19:25:09 +0900 Subject: [PATCH 325/771] =?UTF-8?q?feat:=E3=83=98=E3=83=AB=E3=82=B9?= =?UTF-8?q?=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/lib/main.dart | 2 ++ .../where_child_bus_guardian/lib/{ => util}/api/guardian.dart | 0 .../lib/{ => util}/api/health_check.dart | 0 3 files changed, 2 insertions(+) rename frontend/where_child_bus_guardian/lib/{ => util}/api/guardian.dart (100%) rename frontend/where_child_bus_guardian/lib/{ => util}/api/health_check.dart (100%) diff --git a/frontend/where_child_bus_guardian/lib/main.dart b/frontend/where_child_bus_guardian/lib/main.dart index 86cee259..94def35b 100644 --- a/frontend/where_child_bus_guardian/lib/main.dart +++ b/frontend/where_child_bus_guardian/lib/main.dart @@ -2,6 +2,7 @@ import "dart:developer" as developer; import 'package:flutter/material.dart'; import 'package:where_child_bus_guardian/app.dart'; import 'package:where_child_bus_guardian/config/config.dart'; +import 'package:where_child_bus_guardian/util/api/health_check.dart'; import 'package:where_child_bus_guardian/pages/auth_page/auth_page.dart'; void main() async { @@ -9,6 +10,7 @@ void main() async { try { await appConfig.loadConfig(); + await serviceHealthCheck(); } catch (error) { developer.log("アプリの立ち上げに失敗しました", error: error); } diff --git a/frontend/where_child_bus_guardian/lib/api/guardian.dart b/frontend/where_child_bus_guardian/lib/util/api/guardian.dart similarity index 100% rename from frontend/where_child_bus_guardian/lib/api/guardian.dart rename to frontend/where_child_bus_guardian/lib/util/api/guardian.dart diff --git a/frontend/where_child_bus_guardian/lib/api/health_check.dart b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart similarity index 100% rename from frontend/where_child_bus_guardian/lib/api/health_check.dart rename to frontend/where_child_bus_guardian/lib/util/api/health_check.dart From c1d30fd9ffa52a604a20dc2490a9b5b0f804fd0a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 19:28:13 +0900 Subject: [PATCH 326/771] =?UTF-8?q?chore:.env=E3=82=92gitignore=E3=81=AB?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/.gitignore | 3 +++ frontend/where_child_bus_guardian/pubspec.yaml | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/.gitignore b/frontend/where_child_bus_guardian/.gitignore index 29a3a501..86d25ff9 100644 --- a/frontend/where_child_bus_guardian/.gitignore +++ b/frontend/where_child_bus_guardian/.gitignore @@ -10,6 +10,9 @@ .svn/ migrate_working_dir/ +#.env +.env + # IntelliJ related *.iml *.ipr diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index 6b34a0ee..1d61d34d 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -18,7 +18,6 @@ dependencies: flutter_toggle_tab: ^1.4.1 carousel_slider: ^4.2.1 flutter_state_notifier: ^1.0.0 - flutter_dotenv: ^5.1.0 where_child_bus_api: path: ../where_child_bus_api @@ -32,4 +31,4 @@ flutter: uses-material-design: true assets: - assets/images/ - # - .env + - .env From 2c1fc2d49ee4a1a597a2c03c1270cf54ac162605 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 19:36:30 +0900 Subject: [PATCH 327/771] =?UTF-8?q?chore:channel=E3=81=AE=E3=82=AA?= =?UTF-8?q?=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/util/api/nursery_create.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/util/api/nursery_create.dart b/frontend/where_child_bus/lib/util/api/nursery_create.dart index 70c1d0d6..1af3b4c6 100644 --- a/frontend/where_child_bus/lib/util/api/nursery_create.dart +++ b/frontend/where_child_bus/lib/util/api/nursery_create.dart @@ -10,7 +10,7 @@ Future createNursery( final channel = ClientChannel( appConfig.grpcEndpoint, port: appConfig.grpcPort, - options: const ChannelOptions(credentials: ChannelCredentials.insecure()), + options: const ChannelOptions(), ); final grpcClient = NurseryServiceClient(channel); From aba1d34bdd8b29b4848c06ae42f1dbec2034f17a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 20:17:37 +0900 Subject: [PATCH 328/771] =?UTF-8?q?feat:=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E6=99=82=E3=81=AE=E9=81=B7=E7=A7=BB=E3=82=92=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/models/guardian_login_error.dart | 1 + .../lib/pages/auth_page/auth_page.dart | 95 +++++++++++++------ 2 files changed, 68 insertions(+), 28 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/models/guardian_login_error.dart b/frontend/where_child_bus_guardian/lib/models/guardian_login_error.dart index b7b4106a..cfb05681 100644 --- a/frontend/where_child_bus_guardian/lib/models/guardian_login_error.dart +++ b/frontend/where_child_bus_guardian/lib/models/guardian_login_error.dart @@ -4,5 +4,6 @@ enum GuardianLoginError { serverError, networkError, databaseError, + fieldsDoNotFilled, // 他のエラータイプをここに追加 } diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index 4393eacf..2dab5fdf 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -1,6 +1,9 @@ -import 'package:flutter/foundation.dart'; +import 'dart:developer' as developer; import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart'; +import 'package:where_child_bus_guardian/app.dart'; import 'package:where_child_bus_guardian/models/guardian_login_error.dart'; +import 'package:where_child_bus_guardian/util/api/guardian.dart'; class AuthPage extends StatefulWidget { const AuthPage({super.key}); @@ -25,20 +28,39 @@ class _AuthPageState extends State { ); } + void login(String email, String password) async { + if (email.isEmpty || password.isEmpty) { + setState(() => _loginError = GuardianLoginError.fieldsDoNotFilled); + return; + } + + try { + final res = await guardianLogin(email, password); + if (res.success) { + developer.log("$res"); + Navigator.pushReplacement( + context, MaterialPageRoute(builder: (context) => App())); + } else { + setState(() => _loginError = GuardianLoginError.invalidCredentials); + } + } catch (error) { + developer.log("Login Failed for error: ", error: error); + setState(() => _loginError = GuardianLoginError.invalidCredentials); + } + } + Widget pageBody() { return Center( child: Padding( padding: const EdgeInsets.all(32), child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ titleText(), mailInputField(), passwordInputField(), spacer32(), - if (_loginError != null && - _loginError == GuardianLoginError.invalidCredentials) - emailOrPasswordNotFound(), + errorTextWidget(), loginButton(), ], ), @@ -52,39 +74,56 @@ class _AuthPageState extends State { style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold)), ); - Widget mailInputField() => Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), labelText: 'メールアドレス'), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - ), - ); + Widget mailInputField() => + textFieldWidget(_emailController, 'メールアドレス', TextInputType.emailAddress); + + Widget passwordInputField() => textFieldWidget( + _passwordController, 'パスワード', TextInputType.visiblePassword, + obscureText: true); - Widget passwordInputField() => Padding( + Widget textFieldWidget(TextEditingController controller, String label, + TextInputType keyboardType, + {bool obscureText = false}) => + Padding( padding: const EdgeInsets.all(8.0), child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), labelText: 'パスワード'), - controller: _passwordController, - obscureText: true, - keyboardType: TextInputType.visiblePassword, + decoration: + InputDecoration(border: OutlineInputBorder(), labelText: label), + controller: controller, + obscureText: obscureText, + keyboardType: keyboardType, ), ); Widget spacer32() => const SizedBox(height: 32); - Widget emailOrPasswordNotFound() => const Padding( - padding: EdgeInsets.all(8.0), - child: Text( - "メールアドレスかパスワードが間違っています", - style: TextStyle(color: Colors.red, fontSize: 13), - ), - ); + Widget errorTextWidget() { + String errorText; + switch (_loginError) { + case GuardianLoginError.invalidCredentials: + errorText = "メールアドレスかパスワードが間違っています"; + break; + case GuardianLoginError.unknown: + errorText = "不明なエラーです"; + break; + case GuardianLoginError.fieldsDoNotFilled: + errorText = "パスワードとメールアドレスを入力してください"; + break; + default: + return Container(); + } + return Padding( + padding: const EdgeInsets.only(bottom: 8.0), + child: Text(errorText, + style: const TextStyle(color: Colors.red, fontSize: 13)), + ); + } Widget loginButton() => SizedBox( width: MediaQuery.of(context).size.width * 0.6, - child: ElevatedButton(onPressed: () {}, child: const Text('ログイン')), + child: ElevatedButton( + onPressed: () => + login(_emailController.text, _passwordController.text), + child: const Text('ログイン')), ); } From fd40131d174e606ba43ef24ad6140193a5e14950 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 20:21:05 +0900 Subject: [PATCH 329/771] =?UTF-8?q?feat:=E7=94=BB=E9=9D=A2=E9=81=B7?= =?UTF-8?q?=E7=A7=BB=E6=99=82=E3=81=AEGuardian=E3=81=AE=E5=8F=97=E3=81=91?= =?UTF-8?q?=E6=B8=A1=E3=81=97=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/lib/app.dart | 5 ++++- .../lib/pages/auth_page/auth_page.dart | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index 80ed40fb..a3cc11e5 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -1,10 +1,13 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'package:where_child_bus_guardian/pages/check_page/check_page.dart'; import 'package:where_child_bus_guardian/pages/daily_page/daily_page.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; class App extends StatefulWidget { - const App({super.key}); + GuardianResponse guardian; + + App({super.key, required this.guardian}); @override State createState() => _AppState(); diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index 2dab5fdf..b6c68ac6 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -39,7 +39,11 @@ class _AuthPageState extends State { if (res.success) { developer.log("$res"); Navigator.pushReplacement( - context, MaterialPageRoute(builder: (context) => App())); + context, + MaterialPageRoute( + builder: (context) => App( + guardian: res.guardian, + ))); } else { setState(() => _loginError = GuardianLoginError.invalidCredentials); } From a05c0d58a9a6e015e221056905c6414efebef6c2 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 20:26:53 +0900 Subject: [PATCH 330/771] =?UTF-8?q?chore:=E3=82=BF=E3=82=A4=E3=83=9D?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=E3=80=81=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E4=BE=9D=E5=AD=98=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/util/api/health_check.dart | 3 +-- .../where_child_bus/v1/health_check.pbgrpc.dart | 16 +++++++++------- frontend/where_child_bus_guardian/lib/main.dart | 1 - .../lib/pages/auth_page/auth_page.dart | 5 ++--- .../lib/util/api/health_check.dart | 2 +- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/frontend/where_child_bus/lib/util/api/health_check.dart b/frontend/where_child_bus/lib/util/api/health_check.dart index ffd6b091..dd5e2f26 100644 --- a/frontend/where_child_bus/lib/util/api/health_check.dart +++ b/frontend/where_child_bus/lib/util/api/health_check.dart @@ -4,14 +4,13 @@ import 'package:grpc/grpc.dart'; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart"; import 'package:where_child_bus/config/config.dart'; - Future serviceHealthCheck() async { final channel = ClientChannel( appConfig.grpcEndpoint, port: appConfig.grpcPort, ); - final grpcClient = HealthcheckServiceClient(channel, + final grpcClient = HealthCheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 60))); try { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart index 3aec87de..b1f241ff 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart @@ -20,19 +20,19 @@ import 'health_check.pb.dart' as $4; export 'health_check.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.HealthcheckService') -class HealthcheckServiceClient extends $grpc.Client { +class HealthCheckServiceClient extends $grpc.Client { static final _$ping = $grpc.ClientMethod<$4.PingRequest, $4.PingResponse>( '/where_child_bus.v1.HealthcheckService/Ping', ($4.PingRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $4.PingResponse.fromBuffer(value)); - HealthcheckServiceClient($grpc.ClientChannel channel, + HealthCheckServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, - interceptors: interceptors); + : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$4.PingResponse> ping($4.PingRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$4.PingResponse> ping($4.PingRequest request, + {$grpc.CallOptions? options}) { return $createUnaryCall(_$ping, request, options: options); } } @@ -51,9 +51,11 @@ abstract class HealthcheckServiceBase extends $grpc.Service { ($4.PingResponse value) => value.writeToBuffer())); } - $async.Future<$4.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$4.PingRequest> request) async { + $async.Future<$4.PingResponse> ping_Pre( + $grpc.ServiceCall call, $async.Future<$4.PingRequest> request) async { return ping(call, await request); } - $async.Future<$4.PingResponse> ping($grpc.ServiceCall call, $4.PingRequest request); + $async.Future<$4.PingResponse> ping( + $grpc.ServiceCall call, $4.PingRequest request); } diff --git a/frontend/where_child_bus_guardian/lib/main.dart b/frontend/where_child_bus_guardian/lib/main.dart index 94def35b..537ffe41 100644 --- a/frontend/where_child_bus_guardian/lib/main.dart +++ b/frontend/where_child_bus_guardian/lib/main.dart @@ -1,6 +1,5 @@ import "dart:developer" as developer; import 'package:flutter/material.dart'; -import 'package:where_child_bus_guardian/app.dart'; import 'package:where_child_bus_guardian/config/config.dart'; import 'package:where_child_bus_guardian/util/api/health_check.dart'; import 'package:where_child_bus_guardian/pages/auth_page/auth_page.dart'; diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index b6c68ac6..89a5031e 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -1,6 +1,5 @@ import 'dart:developer' as developer; import 'package:flutter/material.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart'; import 'package:where_child_bus_guardian/app.dart'; import 'package:where_child_bus_guardian/models/guardian_login_error.dart'; import 'package:where_child_bus_guardian/util/api/guardian.dart'; @@ -91,8 +90,8 @@ class _AuthPageState extends State { Padding( padding: const EdgeInsets.all(8.0), child: TextField( - decoration: - InputDecoration(border: OutlineInputBorder(), labelText: label), + decoration: InputDecoration( + border: const OutlineInputBorder(), labelText: label), controller: controller, obscureText: obscureText, keyboardType: keyboardType, diff --git a/frontend/where_child_bus_guardian/lib/util/api/health_check.dart b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart index ba495f49..8e1f14d0 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/health_check.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart @@ -10,7 +10,7 @@ Future serviceHealthCheck() async { port: appConfig.grpcPort, ); - final grpcClient = HealthcheckServiceClient(channel, + final grpcClient = HealthCheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 60))); try { From ca0916630282ca88f7cecf265aa8d1aaa555ddd3 Mon Sep 17 00:00:00 2001 From: koto623 Date: Thu, 15 Feb 2024 20:31:27 +0900 Subject: [PATCH 331/771] =?UTF-8?q?feat:=E3=83=AB=E3=83=BC=E3=83=88?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/google_map_view.dart | 86 ++++++++++++++++++- .../where_child_bus_guardian/pubspec.lock | 8 ++ .../where_child_bus_guardian/pubspec.yaml | 1 + 3 files changed, 94 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index f3a9425c..da3231c1 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -1,5 +1,21 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:flutter_polyline_points/flutter_polyline_points.dart'; + +class Waypoint { + final double latitude; + final double longitude; + final String name; + + Waypoint( + {required this.latitude, required this.longitude, required this.name}); +} + +//TODO: 将来的に停留所のデータを受け取る +final List waypoints = [ + Waypoint(latitude: 34.7159, longitude: 137.7368, name: "停留所1"), + Waypoint(latitude: 34.7108, longitude: 137.7261, name: "停留所2"), +]; class GoogleMapView extends StatefulWidget { const GoogleMapView({super.key}); @@ -9,10 +25,34 @@ class GoogleMapView extends StatefulWidget { } class _GoogleMapView extends State { - CameraPosition _initialLocation = CameraPosition(target: LatLng(0.0, 0.0)); + final CameraPosition _initialLocation = + const CameraPosition(target: LatLng(34.7104, 137.7263), zoom: 14); late GoogleMapController mapController; + //TODO: 将来的に保育園の緯度経度を受け取る + double nurseryLatitude = 34.7056, nurseryLongitude = 137.7343; + + Map markers = {}; + Map polylines = {}; + List polylineCoordinates = []; + PolylinePoints polylinePoints = PolylinePoints(); + String googleApiKey = "AIzaSyBC2_JlaB3eKncYG6meIQsqlzqgAqfhVLI"; + + @override + void initState() { + super.initState(); + _addMarker(LatLng(nurseryLatitude, nurseryLongitude), "保育園", + BitmapDescriptor.defaultMarker); + + waypoints.forEach((Waypoint waypoint) { + _addMarker(LatLng(waypoint.latitude, waypoint.longitude), waypoint.name, + BitmapDescriptor.defaultMarkerWithHue(90)); + }); + + _getPolyline(waypoints); + } + @override Widget build(BuildContext context) { return SizedBox( @@ -24,6 +64,50 @@ class _GoogleMapView extends State { onMapCreated: (GoogleMapController controller) { mapController = controller; }, + markers: Set.of(markers.values), + polylines: Set.of(polylines.values), )); } + + _addMarker(LatLng position, String id, BitmapDescriptor descriptor) { + MarkerId markerId = MarkerId(id); + Marker marker = + Marker(markerId: markerId, icon: descriptor, position: position); + markers[markerId] = marker; + } + + _addPolyline() { + PolylineId id = const PolylineId('poly'); + Polyline polyline = Polyline( + polylineId: id, + color: Colors.blue, + points: polylineCoordinates, + width: 5); + polylines[id] = polyline; + setState(() {}); + } + + _getPolyline(List waypoints) async { + List polylineWayPoints = waypoints + .map((waypoint) => PolylineWayPoint( + location: "${waypoint.latitude},${waypoint.longitude}")) + .toList(); + try { + PolylineResult result = await polylinePoints.getRouteBetweenCoordinates( + googleApiKey, + PointLatLng(nurseryLatitude, nurseryLongitude), + PointLatLng(nurseryLatitude, nurseryLongitude), + travelMode: TravelMode.walking, + wayPoints: polylineWayPoints, + ); + if (result.points.isNotEmpty) { + result.points.forEach((PointLatLng point) { + polylineCoordinates.add(LatLng(point.latitude, point.longitude)); + }); + } + _addPolyline(); + } catch (e) { + print(e); + } + } } diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index 721cd3f4..df43f8e7 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -142,6 +142,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.17" + flutter_polyline_points: + dependency: "direct main" + description: + name: flutter_polyline_points + sha256: "0e07862139cb65a88789cd6efbe284c0b6f1fcb5ed5ec87781759c48190d84b9" + url: "https://pub.dev" + source: hosted + version: "2.0.0" flutter_state_notifier: dependency: "direct main" description: diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index 4b6e0b52..53368afb 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -19,6 +19,7 @@ dependencies: carousel_slider: ^4.2.1 flutter_state_notifier: ^1.0.0 google_maps_flutter: ^2.5.3 + flutter_polyline_points: ^2.0.0 dev_dependencies: flutter_test: From 41d441b29a35af6c21a0b1bdc40d8b03897905c0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 21:25:12 +0900 Subject: [PATCH 332/771] =?UTF-8?q?feat:=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E5=90=8D=E5=85=A5=E5=8A=9B=E6=AC=84=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/register_page/register_page.dart | 18 ++++++++++++++++++ .../lib/util/api/nursery_create.dart | 5 +++-- .../validation/create_nursery_validation.dart | 7 ++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index 7596f232..755cec26 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -14,6 +14,7 @@ class RegisterPage extends StatefulWidget { } class _RegisterPageState extends State { + final _nameController = TextEditingController(); final _emailController = TextEditingController(); final _phoneNumberController = TextEditingController(); final _addressController = TextEditingController(); @@ -36,6 +37,7 @@ class _RegisterPageState extends State { void register() async { // フィールドが全て埋まっているか確認 if (!validateFields( + _nameController.text, _emailController.text, _phoneNumberController.text, _addressController.text, @@ -60,6 +62,7 @@ class _RegisterPageState extends State { try { CreateNurseryResponse res = await createNursery( + _nameController.text, _emailController.text, _passwordController.text, _phoneNumberController.text, @@ -94,6 +97,7 @@ class _RegisterPageState extends State { height: 32, ), titleText(), + nameInputField(), mailInputField(), phoneNumberInputField(), addressInputField(), @@ -142,6 +146,20 @@ class _RegisterPageState extends State { ); } + Widget nameInputField() { + return Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: '保育園名', + ), + controller: _nameController, + keyboardType: TextInputType.emailAddress, + ), + ); + } + Widget mailInputField() { return Padding( padding: const EdgeInsets.all(8.0), diff --git a/frontend/where_child_bus/lib/util/api/nursery_create.dart b/frontend/where_child_bus/lib/util/api/nursery_create.dart index 1af3b4c6..13de605f 100644 --- a/frontend/where_child_bus/lib/util/api/nursery_create.dart +++ b/frontend/where_child_bus/lib/util/api/nursery_create.dart @@ -5,8 +5,8 @@ import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart"; -Future createNursery( - String email, String password, String phoneNumber, String address) async { +Future createNursery(String email, String password, + String phoneNumber, String address, String name) async { final channel = ClientChannel( appConfig.grpcEndpoint, port: appConfig.grpcPort, @@ -21,6 +21,7 @@ Future createNursery( password: password, phoneNumber: phoneNumber, address: address, + name: name, ); if (kDebugMode) { diff --git a/frontend/where_child_bus/lib/util/validation/create_nursery_validation.dart b/frontend/where_child_bus/lib/util/validation/create_nursery_validation.dart index c762c748..d960c799 100644 --- a/frontend/where_child_bus/lib/util/validation/create_nursery_validation.dart +++ b/frontend/where_child_bus/lib/util/validation/create_nursery_validation.dart @@ -1,10 +1,11 @@ -bool validateFields(String email, String phoneNumber, String address, - String password, String confirmPassword) { +bool validateFields(String name, String email, String phoneNumber, + String address, String password, String confirmPassword) { return email.isNotEmpty && phoneNumber.isNotEmpty && address.isNotEmpty && password.isNotEmpty && - confirmPassword.isNotEmpty; + confirmPassword.isNotEmpty && + name.isNotEmpty; } bool validateEmailFormat(String email) { From f39cf9aee9d3f17796e8f854dedb211a9bbdf00a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Thu, 15 Feb 2024 21:29:09 +0900 Subject: [PATCH 333/771] =?UTF-8?q?refactor:=E3=82=A6=E3=82=A3=E3=82=B8?= =?UTF-8?q?=E3=82=A7=E3=83=83=E3=83=88=E3=82=92=E5=86=8D=E5=88=A9=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/register_page/register_page.dart | 177 +++++------------- 1 file changed, 48 insertions(+), 129 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index 755cec26..83e67640 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -93,19 +93,18 @@ class _RegisterPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const SizedBox( - height: 32, - ), + const SizedBox(height: 32), titleText(), - nameInputField(), - mailInputField(), - phoneNumberInputField(), - addressInputField(), - passwordInputField(), - confirmPasswordInputField(), - const SizedBox( - height: 32, - ), + inputField(_nameController, '保育園名'), + inputField(_emailController, 'メールアドレス', + keyboardType: TextInputType.emailAddress), + inputField(_phoneNumberController, '電話番号', + keyboardType: TextInputType.phone), + inputField(_addressController, '住所'), + inputField(_passwordController, 'パスワード', isObscure: true), + inputField(_confirmPasswordController, 'パスワードの確認', + isObscure: true), + const SizedBox(height: 32), if (_createError != null) errorMessage(_createError!), registerButton(), ], @@ -115,129 +114,49 @@ class _RegisterPageState extends State { ); } - Widget errorMessage(CreateNurseryError createError) { - late String errorMessageText; - if (createError == CreateNurseryError.passwordsDoNotMatch) { - errorMessageText = "パスワードが一致していません"; - } else if (createError == CreateNurseryError.fieldsDoNotFilled) { - errorMessageText = "全てのフィールドを入力してください"; - } else if (createError == CreateNurseryError.invalidEmail) { - errorMessageText = "メールアドレスが有効な形式ではありません"; - } else { - errorMessageText = "不明なエラーです"; - } - - return Padding( - padding: const EdgeInsets.only(bottom: 16.0), - child: Text(errorMessageText, - style: const TextStyle( - color: Colors.red, - )), - ); - } - - Widget titleText() { - return const Padding( - padding: EdgeInsets.only(bottom: 32), - child: Text( - 'WhereChildBus', - style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold), - ), - ); - } - - Widget nameInputField() { - return Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: '保育園名', - ), - controller: _nameController, - keyboardType: TextInputType.emailAddress, - ), - ); - } - - Widget mailInputField() { - return Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: 'メールアドレス', - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - ), - ); - } - - Widget phoneNumberInputField() { - return Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: '電話番号', - ), - controller: _phoneNumberController, - keyboardType: const TextInputType.numberWithOptions( - signed: false, decimal: false)), - ); - } + Widget titleText() => const Padding( + padding: EdgeInsets.only(bottom: 32), + child: Text('WhereChildBus', + style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold)), + ); - Widget addressInputField() { - return Padding( + Widget inputField(TextEditingController controller, String label, + {TextInputType keyboardType = TextInputType.text, + bool isObscure = false}) => + Padding( padding: const EdgeInsets.all(8.0), child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: '住所', - ), - controller: _addressController, - keyboardType: TextInputType.streetAddress, - )); - } - - Widget passwordInputField() { - return Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: 'パスワード', + controller: controller, + decoration: + InputDecoration(border: OutlineInputBorder(), labelText: label), + keyboardType: keyboardType, + obscureText: isObscure, ), - controller: _passwordController, - obscureText: true, - keyboardType: TextInputType.visiblePassword, - ), - ); - } + ); - Widget confirmPasswordInputField() { - return Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: 'パスワードの確認', + Widget errorMessage(CreateNurseryError error) => Padding( + padding: const EdgeInsets.only(bottom: 16.0), + child: Text( + createNurseryErrorMessage(error), + style: const TextStyle(color: Colors.red), ), - controller: _confirmPasswordController, - obscureText: true, - keyboardType: TextInputType.visiblePassword, - ), - ); - } + ); - Widget registerButton() { - return SizedBox( - width: MediaQuery.of(context).size.width * 0.6, - child: ElevatedButton( - onPressed: () => register(), - child: const Text('登録'), - ), - ); + Widget registerButton() => SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + child: ElevatedButton(onPressed: register, child: const Text('登録')), + ); +} + +String createNurseryErrorMessage(CreateNurseryError error) { + switch (error) { + case CreateNurseryError.passwordsDoNotMatch: + return "パスワードが一致していません"; + case CreateNurseryError.fieldsDoNotFilled: + return "全てのフィールドを入力してください"; + case CreateNurseryError.invalidEmail: + return "メールアドレスが有効な形式ではありません"; + default: + return "不明なエラーです"; } } From 8c7b415edf9ad19d31e298fb67102a80decc79a8 Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Thu, 15 Feb 2024 23:02:28 +0900 Subject: [PATCH 334/771] refactor: changed init methods --- machine_learning/requirements-dev.lock | 14 ++++++++++++++ machine_learning/requirements.lock | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/machine_learning/requirements-dev.lock b/machine_learning/requirements-dev.lock index 22dbfcff..aeddf96d 100644 --- a/machine_learning/requirements-dev.lock +++ b/machine_learning/requirements-dev.lock @@ -5,6 +5,7 @@ # pre: false # features: [] # all-features: false +# with-sources: false -e file:. certifi==2024.2.2 @@ -17,6 +18,18 @@ markupsafe==2.1.5 mpmath==1.3.0 networkx==3.2.1 numpy==1.26.4 +nvidia-cublas-cu12==12.1.3.1 +nvidia-cuda-cupti-cu12==12.1.105 +nvidia-cuda-nvrtc-cu12==12.1.105 +nvidia-cuda-runtime-cu12==12.1.105 +nvidia-cudnn-cu12==8.9.2.26 +nvidia-cufft-cu12==11.0.2.54 +nvidia-curand-cu12==10.3.2.106 +nvidia-cusolver-cu12==11.4.5.107 +nvidia-cusparse-cu12==12.1.0.106 +nvidia-nccl-cu12==2.19.3 +nvidia-nvjitlink-cu12==12.3.101 +nvidia-nvtx-cu12==12.1.105 opencv-python==4.9.0.80 pillow==10.2.0 pyyaml==6.0.1 @@ -24,5 +37,6 @@ requests==2.31.0 sympy==1.12 torch==2.2.0 torchvision==0.17.0 +triton==2.2.0 typing-extensions==4.9.0 urllib3==2.2.0 diff --git a/machine_learning/requirements.lock b/machine_learning/requirements.lock index 22dbfcff..aeddf96d 100644 --- a/machine_learning/requirements.lock +++ b/machine_learning/requirements.lock @@ -5,6 +5,7 @@ # pre: false # features: [] # all-features: false +# with-sources: false -e file:. certifi==2024.2.2 @@ -17,6 +18,18 @@ markupsafe==2.1.5 mpmath==1.3.0 networkx==3.2.1 numpy==1.26.4 +nvidia-cublas-cu12==12.1.3.1 +nvidia-cuda-cupti-cu12==12.1.105 +nvidia-cuda-nvrtc-cu12==12.1.105 +nvidia-cuda-runtime-cu12==12.1.105 +nvidia-cudnn-cu12==8.9.2.26 +nvidia-cufft-cu12==11.0.2.54 +nvidia-curand-cu12==10.3.2.106 +nvidia-cusolver-cu12==11.4.5.107 +nvidia-cusparse-cu12==12.1.0.106 +nvidia-nccl-cu12==2.19.3 +nvidia-nvjitlink-cu12==12.3.101 +nvidia-nvtx-cu12==12.1.105 opencv-python==4.9.0.80 pillow==10.2.0 pyyaml==6.0.1 @@ -24,5 +37,6 @@ requests==2.31.0 sympy==1.12 torch==2.2.0 torchvision==0.17.0 +triton==2.2.0 typing-extensions==4.9.0 urllib3==2.2.0 From eb7707f13020b66e0d0708ad5a3e1478e36a4f07 Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Thu, 15 Feb 2024 23:02:43 +0900 Subject: [PATCH 335/771] refactor: changed init methods --- .../data/faceDetectDataset.py | 55 +++++++++---------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index 3f65d372..b1c7d9b2 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -2,10 +2,10 @@ from torchvision import transforms import os import cv2 -from PIL import Image # PILライブラリからImageクラスをインポート +from PIL import Image class FaceDetectDataset(torch.utils.data.Dataset): - VALID_EXTENSIONS = {".png"} # 変更しない + VALID_EXTENSIONS = {".png"} def __init__(self, config, transform=None): self.data_dir = config["dataset"]["root_path"] @@ -27,36 +27,47 @@ def __init__(self, config, transform=None): continue image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # BGRからRGBに変換 - if name_label_dict.get(people_name) is None: + if people_name not in name_label_dict: self.label_name_dict[self.label_num] = people_name name_label_dict[people_name] = self.label_num self.label_num += 1 + + label = torch.tensor(name_label_dict[people_name], dtype=torch.int64) + image_pil = Image.fromarray(image) - self.face_data.append(( - torch.tensor(name_label_dict[people_name], dtype=torch.int64), - image, # ここではNumPy配列として格納 - )) + self.face_data.append((label, self.transform(image_pil))) + + augmented_images = self.augment_image(image_pil, num_variations=5) + for aug_img in augmented_images: + self.face_data.append((label, aug_img)) @staticmethod def default_transforms(): return transforms.Compose([ - transforms.ToPILImage(), # NumPy配列をPIL Imageに変換 transforms.Resize((224, 224)), - transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), ]) def augment_image(self, image, num_variations=5): - transformations = self.default_transforms() # デフォルトの変換を使用 + # ランダムな変換を適用するための拡張設定を強化 + transformations = transforms.Compose([ + transforms.RandomApply([transforms.Resize((256, 256)), + transforms.RandomCrop((224, 224))], p=0.5), + transforms.RandomHorizontalFlip(p=0.5), + transforms.RandomVerticalFlip(p=0.5), + transforms.RandomApply([transforms.RandomRotation(degrees=15)], p=0.5), + transforms.RandomApply([transforms.RandomAffine(degrees=0, translate=(0.1, 0.1), scale=(0.8, 1.2))], p=0.5), + transforms.RandomApply([transforms.ColorJitter(brightness=0.2, contrast=0.2, saturation=0.2, hue=0.1)], p=0.5), + transforms.ToTensor(), + transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), + ]) augmented_images = [] - for _ in range(num_variations): - # ここでランダムな変換を適用する augmented_image = transformations(image) augmented_images.append(augmented_image) - return torch.stack(augmented_images) # テンソルのリストをスタックして返す + return augmented_images def _is_valid_file(self, file_name): return os.path.splitext(file_name)[1].lower() in self.VALID_EXTENSIONS @@ -65,26 +76,10 @@ def __len__(self): return len(self.face_data) def __getitem__(self, idx): - label, image_np = self.face_data[idx] - image = Image.fromarray(image_np) # NumPy配列をPIL Imageに変換 - - # ここでaugment_imageメソッドを使用して画像のバリエーションを生成 - augmented_images = self.augment_image(image) - - # ラベルと拡張された画像のリストを紐付けて返す - return [(label, augmented_image) for augmented_image in augmented_images] + return self.face_data[idx] def get_label_name_dict(self): return self.label_name_dict def get_label_num(self): return self.label_num - - def get_image_shape(self): - if len(self.face_data) > 0: - _, sample_image = self.face_data[0] - if self.transform: - sample_image = self.transform(sample_image) - return sample_image.shape - else: - return None \ No newline at end of file From 7326cce8f8598c8d9045c46496883083489e45f0 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 15 Feb 2024 23:16:46 +0900 Subject: [PATCH 336/771] =?UTF-8?q?fix:=20=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E7=99=BB=E9=8C=B2=E6=99=82=E3=81=AB=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=81=8C=E7=94=9F=E6=88=90=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/nursery/nursery.go | 39 ++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index ccae67bb..4dae5c8f 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -2,6 +2,8 @@ package nursery import ( "fmt" + "math/rand" + "time" "golang.org/x/exp/slog" @@ -30,11 +32,29 @@ func (i *Interactor) CreateNursery(ctx context.Context, req *pb.CreateNurseryReq return nil, fmt.Errorf("failed to hash password: %w", err) } + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + defer tx.Rollback() + + // nurseryコード(レコードに存在しない) + // 生成したコードが既存のコードと重複していないか確認 + var code string + for { + code = generateCode() + _, err := tx.Nursery.Query().Where(nurseryRepo.NurseryCode(code)).Only(ctx) + if err != nil { + break + } + } + //Nurseryを作成 - nursery, err := i.entClient.Nursery.Create(). + nursery, err := tx.Nursery.Create(). SetName(req.Name). SetEmail(req.Email). SetHashedPassword(string(hashedPassword)). + SetNurseryCode(code). SetPhoneNumber(req.PhoneNumber). SetAddress(req.Address). Save(ctx) @@ -44,6 +64,10 @@ func (i *Interactor) CreateNursery(ctx context.Context, req *pb.CreateNurseryReq return nil, fmt.Errorf("failed to create nursery: %w", err) } + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + return &pb.CreateNurseryResponse{ Nursery: utils.ToPbNurseryResponse(nursery), }, nil @@ -81,3 +105,16 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque Nursery: utils.ToPbNurseryResponse(nursery), }, nil } + +// コード生成 +func generateCode() string { + rand.Seed(time.Now().UnixNano()) // 現在時刻をシード値として乱数生成器を初期化 + + code := "" // 空の文字列でコードを初期化 + for i := 0; i < 7; i++ { // 7桁のコードを生成 + digit := rand.Intn(10) // 0から9までの乱数を生成 + code += fmt.Sprintf("%d", digit) // 数字を文字列に変換してコードに追加 + } + + return code +} From 1ea8fd844a8b3d0d4c8474b217c4b55209bdf475 Mon Sep 17 00:00:00 2001 From: koto623 Date: Thu, 15 Feb 2024 23:27:03 +0900 Subject: [PATCH 337/771] =?UTF-8?q?feat:=E3=83=AB=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=AE=E6=9C=80=E9=81=A9=E5=8C=96=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/google_map_view.dart | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index da3231c1..e0013e08 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -15,6 +15,7 @@ class Waypoint { final List waypoints = [ Waypoint(latitude: 34.7159, longitude: 137.7368, name: "停留所1"), Waypoint(latitude: 34.7108, longitude: 137.7261, name: "停留所2"), + Waypoint(latitude: 34.7169, longitude: 137.7285, name: "停留所3"), ]; class GoogleMapView extends StatefulWidget { @@ -26,7 +27,7 @@ class GoogleMapView extends StatefulWidget { class _GoogleMapView extends State { final CameraPosition _initialLocation = - const CameraPosition(target: LatLng(34.7104, 137.7263), zoom: 14); + const CameraPosition(target: LatLng(0.0, 0.0), zoom: 14); late GoogleMapController mapController; @@ -97,9 +98,14 @@ class _GoogleMapView extends State { googleApiKey, PointLatLng(nurseryLatitude, nurseryLongitude), PointLatLng(nurseryLatitude, nurseryLongitude), - travelMode: TravelMode.walking, + travelMode: TravelMode.driving, + avoidTolls: true, + avoidHighways: false, + avoidFerries: false, wayPoints: polylineWayPoints, + optimizeWaypoints: true, ); + if (result.points.isNotEmpty) { result.points.forEach((PointLatLng point) { polylineCoordinates.add(LatLng(point.latitude, point.longitude)); @@ -109,5 +115,25 @@ class _GoogleMapView extends State { } catch (e) { print(e); } + + if (polylineCoordinates.isNotEmpty) { + double minLat = polylineCoordinates.first.latitude; + double maxLat = polylineCoordinates.first.latitude; + double minLng = polylineCoordinates.first.longitude; + double maxLng = polylineCoordinates.first.longitude; + + for (LatLng point in polylineCoordinates) { + if (point.latitude < minLat) minLat = point.latitude; + if (point.latitude > maxLat) maxLat = point.latitude; + if (point.longitude < minLng) minLng = point.longitude; + if (point.longitude > maxLng) maxLng = point.longitude; + } + + LatLngBounds bounds = LatLngBounds( + southwest: LatLng(minLat, minLng), + northeast: LatLng(maxLat, maxLng), + ); + mapController.animateCamera(CameraUpdate.newLatLngBounds(bounds, 100)); + } } } From 655730cc83412c82adedc8afddbfc3d879b55b53 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 16 Feb 2024 14:31:12 +0900 Subject: [PATCH 338/771] =?UTF-8?q?fix:API=E3=82=AD=E3=83=BC=E3=82=92?= =?UTF-8?q?=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0=E3=81=8B=E3=82=89=E5=8F=96?= =?UTF-8?q?=E5=BE=97=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/.gitignore | 1 + .../where_child_bus_guardian/android/.gitignore | 1 + .../android/app/build.gradle | 17 ++++++++++++++--- .../android/app/src/main/AndroidManifest.xml | 5 +++-- .../lib/components/utils/google_map_view.dart | 6 +++--- frontend/where_child_bus_guardian/lib/main.dart | 4 +++- frontend/where_child_bus_guardian/pubspec.yaml | 2 +- 7 files changed, 26 insertions(+), 10 deletions(-) diff --git a/frontend/where_child_bus_guardian/.gitignore b/frontend/where_child_bus_guardian/.gitignore index 29a3a501..c5506da5 100644 --- a/frontend/where_child_bus_guardian/.gitignore +++ b/frontend/where_child_bus_guardian/.gitignore @@ -30,6 +30,7 @@ migrate_working_dir/ .pub-cache/ .pub/ /build/ +.env # Symbolication related app.*.symbols diff --git a/frontend/where_child_bus_guardian/android/.gitignore b/frontend/where_child_bus_guardian/android/.gitignore index 6f568019..2d6a2de9 100644 --- a/frontend/where_child_bus_guardian/android/.gitignore +++ b/frontend/where_child_bus_guardian/android/.gitignore @@ -4,6 +4,7 @@ gradle-wrapper.jar /gradlew /gradlew.bat /local.properties +/secret.properties GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. diff --git a/frontend/where_child_bus_guardian/android/app/build.gradle b/frontend/where_child_bus_guardian/android/app/build.gradle index 2839fdc8..b38c2415 100644 --- a/frontend/where_child_bus_guardian/android/app/build.gradle +++ b/frontend/where_child_bus_guardian/android/app/build.gradle @@ -12,6 +12,14 @@ if (localPropertiesFile.exists()) { } } +def secretProperties = new Properties() +def secretPropertiesFile = rootProject.file('secret.properties') +if (secretPropertiesFile.exists()) { + secretPropertiesFile.withReader('UTF-8') { reader -> + secretProperties.load(reader) + } +} + def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -24,7 +32,7 @@ if (flutterVersionName == null) { android { namespace "com.example.where_child_bus_guardian" - compileSdkVersion flutter.compileSdkVersion + compileSdkVersion 33 //flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { @@ -45,10 +53,13 @@ android { applicationId "com.example.where_child_bus_guardian" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion 20 //flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion + minSdkVersion 21 //flutter.minSdkVersion + targetSdkVersion 33 //flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName + manifestPlaceholders = [ + googleMapApiKey: secretProperties.getProperty('googleMap.apiKey'), + ] } buildTypes { diff --git a/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml b/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml index 97c788b3..d1fe40fa 100644 --- a/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml +++ b/frontend/where_child_bus_guardian/android/app/src/main/AndroidManifest.xml @@ -1,9 +1,10 @@ + + - + { Map polylines = {}; List polylineCoordinates = []; PolylinePoints polylinePoints = PolylinePoints(); - String googleApiKey = "AIzaSyBC2_JlaB3eKncYG6meIQsqlzqgAqfhVLI"; + String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); @override void initState() { @@ -50,8 +51,6 @@ class _GoogleMapView extends State { _addMarker(LatLng(waypoint.latitude, waypoint.longitude), waypoint.name, BitmapDescriptor.defaultMarkerWithHue(90)); }); - - _getPolyline(waypoints); } @override @@ -64,6 +63,7 @@ class _GoogleMapView extends State { mapType: MapType.normal, onMapCreated: (GoogleMapController controller) { mapController = controller; + _getPolyline(waypoints); }, markers: Set.of(markers.values), polylines: Set.of(polylines.values), diff --git a/frontend/where_child_bus_guardian/lib/main.dart b/frontend/where_child_bus_guardian/lib/main.dart index 57596aae..ec16f894 100644 --- a/frontend/where_child_bus_guardian/lib/main.dart +++ b/frontend/where_child_bus_guardian/lib/main.dart @@ -1,8 +1,10 @@ import 'package:flutter/material.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:where_child_bus_guardian/app.dart'; import './components/utils/google_map_view.dart'; -void main() async { +Future main() async { + await dotenv.load(fileName: '.env'); WidgetsFlutterBinding.ensureInitialized(); runApp(const MyApp()); diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index 53368afb..e7235931 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -31,4 +31,4 @@ flutter: uses-material-design: true assets: - assets/images/ - # - .env + - .env From e9f3f1581948b90d480dd7530135f645f875caea Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 16 Feb 2024 14:51:39 +0900 Subject: [PATCH 339/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E7=8F=BE=E5=9C=A8=E4=BD=8D=E7=BD=AE=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/google_map_view.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index 656ff619..d6c6909b 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -35,6 +35,9 @@ class _GoogleMapView extends State { //TODO: 将来的に保育園の緯度経度を受け取る double nurseryLatitude = 34.7056, nurseryLongitude = 137.7343; + //TODO: 将来的にバスの現在位置を受け取る + double busLatitude = 34.7057, busLongitude = 137.7317; + Map markers = {}; Map polylines = {}; List polylineCoordinates = []; @@ -47,6 +50,9 @@ class _GoogleMapView extends State { _addMarker(LatLng(nurseryLatitude, nurseryLongitude), "保育園", BitmapDescriptor.defaultMarker); + _addMarker(LatLng(busLatitude, busLongitude), "バス", + BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueBlue)); + waypoints.forEach((Waypoint waypoint) { _addMarker(LatLng(waypoint.latitude, waypoint.longitude), waypoint.name, BitmapDescriptor.defaultMarkerWithHue(90)); From 0e3a47169381ada14637e1ce5188752d259895fb Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 15:27:20 +0900 Subject: [PATCH 340/771] =?UTF-8?q?fix:=20=E3=83=A6=E3=83=8B=E3=83=BC?= =?UTF-8?q?=E3=82=AF=E5=88=B6=E7=B4=84=E3=81=A8=E3=82=A8=E3=83=83=E3=82=B8?= =?UTF-8?q?=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/child.go | 39 +---- backend/domain/repository/ent/child/child.go | 24 --- backend/domain/repository/ent/child/where.go | 23 --- backend/domain/repository/ent/child_create.go | 37 ---- backend/domain/repository/ent/child_query.go | 79 +-------- backend/domain/repository/ent/child_update.go | 109 ------------ backend/domain/repository/ent/client.go | 32 ---- .../domain/repository/ent/migrate/schema.go | 16 +- backend/domain/repository/ent/mutation.go | 154 +---------------- backend/domain/repository/ent/nursery.go | 22 +-- .../domain/repository/ent/nursery/nursery.go | 30 ---- .../domain/repository/ent/nursery/where.go | 23 --- .../domain/repository/ent/nursery_create.go | 32 ---- .../domain/repository/ent/nursery_query.go | 77 +-------- .../domain/repository/ent/nursery_update.go | 163 ------------------ backend/domain/repository/ent/schema/child.go | 2 - .../domain/repository/ent/schema/guardian.go | 2 +- .../domain/repository/ent/schema/nursery.go | 8 +- 18 files changed, 22 insertions(+), 850 deletions(-) diff --git a/backend/domain/repository/ent/child.go b/backend/domain/repository/ent/child.go index 122fd6a6..b61b7662 100644 --- a/backend/domain/repository/ent/child.go +++ b/backend/domain/repository/ent/child.go @@ -11,7 +11,6 @@ import ( "entgo.io/ent/dialect/sql" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/google/uuid" ) @@ -45,7 +44,6 @@ type Child struct { // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ChildQuery when eager-loading is set. Edges ChildEdges `json:"edges"` - child_nursery *uuid.UUID guardian_children *uuid.UUID selectValues sql.SelectValues } @@ -56,15 +54,13 @@ type ChildEdges struct { Guardian *Guardian `json:"guardian,omitempty"` // ChildBusAssociations holds the value of the childBusAssociations edge. ChildBusAssociations []*ChildBusAssociation `json:"childBusAssociations,omitempty"` - // Nursery holds the value of the nursery edge. - Nursery *Nursery `json:"nursery,omitempty"` // BoardingRecord holds the value of the boarding_record edge. BoardingRecord []*BoardingRecord `json:"boarding_record,omitempty"` // Photos holds the value of the photos edge. Photos []*ChildPhoto `json:"photos,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. - loadedTypes [5]bool + loadedTypes [4]bool } // GuardianOrErr returns the Guardian value or an error if the edge @@ -89,23 +85,10 @@ func (e ChildEdges) ChildBusAssociationsOrErr() ([]*ChildBusAssociation, error) return nil, &NotLoadedError{edge: "childBusAssociations"} } -// NurseryOrErr returns the Nursery value or an error if the edge -// was not loaded in eager-loading, or loaded but was not found. -func (e ChildEdges) NurseryOrErr() (*Nursery, error) { - if e.loadedTypes[2] { - if e.Nursery == nil { - // Edge was loaded but was not found. - return nil, &NotFoundError{label: nursery.Label} - } - return e.Nursery, nil - } - return nil, &NotLoadedError{edge: "nursery"} -} - // BoardingRecordOrErr returns the BoardingRecord value or an error if the edge // was not loaded in eager-loading. func (e ChildEdges) BoardingRecordOrErr() ([]*BoardingRecord, error) { - if e.loadedTypes[3] { + if e.loadedTypes[2] { return e.BoardingRecord, nil } return nil, &NotLoadedError{edge: "boarding_record"} @@ -114,7 +97,7 @@ func (e ChildEdges) BoardingRecordOrErr() ([]*BoardingRecord, error) { // PhotosOrErr returns the Photos value or an error if the edge // was not loaded in eager-loading. func (e ChildEdges) PhotosOrErr() ([]*ChildPhoto, error) { - if e.loadedTypes[4] { + if e.loadedTypes[3] { return e.Photos, nil } return nil, &NotLoadedError{edge: "photos"} @@ -135,9 +118,7 @@ func (*Child) scanValues(columns []string) ([]any, error) { values[i] = new(sql.NullTime) case child.FieldID: values[i] = new(uuid.UUID) - case child.ForeignKeys[0]: // child_nursery - values[i] = &sql.NullScanner{S: new(uuid.UUID)} - case child.ForeignKeys[1]: // guardian_children + case child.ForeignKeys[0]: // guardian_children values[i] = &sql.NullScanner{S: new(uuid.UUID)} default: values[i] = new(sql.UnknownType) @@ -227,13 +208,6 @@ func (c *Child) assignValues(columns []string, values []any) error { c.UpdatedAt = value.Time } case child.ForeignKeys[0]: - if value, ok := values[i].(*sql.NullScanner); !ok { - return fmt.Errorf("unexpected type %T for field child_nursery", values[i]) - } else if value.Valid { - c.child_nursery = new(uuid.UUID) - *c.child_nursery = *value.S.(*uuid.UUID) - } - case child.ForeignKeys[1]: if value, ok := values[i].(*sql.NullScanner); !ok { return fmt.Errorf("unexpected type %T for field guardian_children", values[i]) } else if value.Valid { @@ -263,11 +237,6 @@ func (c *Child) QueryChildBusAssociations() *ChildBusAssociationQuery { return NewChildClient(c.config).QueryChildBusAssociations(c) } -// QueryNursery queries the "nursery" edge of the Child entity. -func (c *Child) QueryNursery() *NurseryQuery { - return NewChildClient(c.config).QueryNursery(c) -} - // QueryBoardingRecord queries the "boarding_record" edge of the Child entity. func (c *Child) QueryBoardingRecord() *BoardingRecordQuery { return NewChildClient(c.config).QueryBoardingRecord(c) diff --git a/backend/domain/repository/ent/child/child.go b/backend/domain/repository/ent/child/child.go index 753fd161..d5c72df2 100644 --- a/backend/domain/repository/ent/child/child.go +++ b/backend/domain/repository/ent/child/child.go @@ -42,8 +42,6 @@ const ( EdgeGuardian = "guardian" // EdgeChildBusAssociations holds the string denoting the childbusassociations edge name in mutations. EdgeChildBusAssociations = "childBusAssociations" - // EdgeNursery holds the string denoting the nursery edge name in mutations. - EdgeNursery = "nursery" // EdgeBoardingRecord holds the string denoting the boarding_record edge name in mutations. EdgeBoardingRecord = "boarding_record" // EdgePhotos holds the string denoting the photos edge name in mutations. @@ -64,13 +62,6 @@ const ( ChildBusAssociationsInverseTable = "child_bus_associations" // ChildBusAssociationsColumn is the table column denoting the childBusAssociations relation/edge. ChildBusAssociationsColumn = "child_id" - // NurseryTable is the table that holds the nursery relation/edge. - NurseryTable = "childs" - // NurseryInverseTable is the table name for the Nursery entity. - // It exists in this package in order to avoid circular dependency with the "nursery" package. - NurseryInverseTable = "nurseries" - // NurseryColumn is the table column denoting the nursery relation/edge. - NurseryColumn = "child_nursery" // BoardingRecordTable is the table that holds the boarding_record relation/edge. BoardingRecordTable = "boarding_records" // BoardingRecordInverseTable is the table name for the BoardingRecord entity. @@ -106,7 +97,6 @@ var Columns = []string{ // ForeignKeys holds the SQL foreign-keys that are owned by the "childs" // table and are not defined as standalone fields in the schema. var ForeignKeys = []string{ - "child_nursery", "guardian_children", } @@ -256,13 +246,6 @@ func ByChildBusAssociations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOpt } } -// ByNurseryField orders the results by nursery field. -func ByNurseryField(field string, opts ...sql.OrderTermOption) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newNurseryStep(), sql.OrderByField(field, opts...)) - } -} - // ByBoardingRecordCount orders the results by boarding_record count. func ByBoardingRecordCount(opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { @@ -304,13 +287,6 @@ func newChildBusAssociationsStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), ) } -func newNurseryStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(NurseryInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, NurseryTable, NurseryColumn), - ) -} func newBoardingRecordStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), diff --git a/backend/domain/repository/ent/child/where.go b/backend/domain/repository/ent/child/where.go index 9e17bca5..4c900e83 100644 --- a/backend/domain/repository/ent/child/where.go +++ b/backend/domain/repository/ent/child/where.go @@ -417,29 +417,6 @@ func HasChildBusAssociationsWith(preds ...predicate.ChildBusAssociation) predica }) } -// HasNursery applies the HasEdge predicate on the "nursery" edge. -func HasNursery() predicate.Child { - return predicate.Child(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, NurseryTable, NurseryColumn), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasNurseryWith applies the HasEdge predicate on the "nursery" edge with a given conditions (other predicates). -func HasNurseryWith(preds ...predicate.Nursery) predicate.Child { - return predicate.Child(func(s *sql.Selector) { - step := newNurseryStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - // HasBoardingRecord applies the HasEdge predicate on the "boarding_record" edge. func HasBoardingRecord() predicate.Child { return predicate.Child(func(s *sql.Selector) { diff --git a/backend/domain/repository/ent/child_create.go b/backend/domain/repository/ent/child_create.go index ed256ed4..e3be439b 100644 --- a/backend/domain/repository/ent/child_create.go +++ b/backend/domain/repository/ent/child_create.go @@ -15,7 +15,6 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/google/uuid" ) @@ -204,25 +203,6 @@ func (cc *ChildCreate) AddChildBusAssociations(c ...*ChildBusAssociation) *Child return cc.AddChildBusAssociationIDs(ids...) } -// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. -func (cc *ChildCreate) SetNurseryID(id uuid.UUID) *ChildCreate { - cc.mutation.SetNurseryID(id) - return cc -} - -// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. -func (cc *ChildCreate) SetNillableNurseryID(id *uuid.UUID) *ChildCreate { - if id != nil { - cc = cc.SetNurseryID(*id) - } - return cc -} - -// SetNursery sets the "nursery" edge to the Nursery entity. -func (cc *ChildCreate) SetNursery(n *Nursery) *ChildCreate { - return cc.SetNurseryID(n.ID) -} - // AddBoardingRecordIDs adds the "boarding_record" edge to the BoardingRecord entity by IDs. func (cc *ChildCreate) AddBoardingRecordIDs(ids ...uuid.UUID) *ChildCreate { cc.mutation.AddBoardingRecordIDs(ids...) @@ -478,23 +458,6 @@ func (cc *ChildCreate) createSpec() (*Child, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } - if nodes := cc.mutation.NurseryIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: child.NurseryTable, - Columns: []string{child.NurseryColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _node.child_nursery = &nodes[0] - _spec.Edges = append(_spec.Edges, edge) - } if nodes := cc.mutation.BoardingRecordIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, diff --git a/backend/domain/repository/ent/child_query.go b/backend/domain/repository/ent/child_query.go index 1b49dbe7..da7877d2 100644 --- a/backend/domain/repository/ent/child_query.go +++ b/backend/domain/repository/ent/child_query.go @@ -16,7 +16,6 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" "github.com/google/uuid" ) @@ -30,7 +29,6 @@ type ChildQuery struct { predicates []predicate.Child withGuardian *GuardianQuery withChildBusAssociations *ChildBusAssociationQuery - withNursery *NurseryQuery withBoardingRecord *BoardingRecordQuery withPhotos *ChildPhotoQuery withFKs bool @@ -114,28 +112,6 @@ func (cq *ChildQuery) QueryChildBusAssociations() *ChildBusAssociationQuery { return query } -// QueryNursery chains the current query on the "nursery" edge. -func (cq *ChildQuery) QueryNursery() *NurseryQuery { - query := (&NurseryClient{config: cq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := cq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := cq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(child.Table, child.FieldID, selector), - sqlgraph.To(nursery.Table, nursery.FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, child.NurseryTable, child.NurseryColumn), - ) - fromU = sqlgraph.SetNeighbors(cq.driver.Dialect(), step) - return fromU, nil - } - return query -} - // QueryBoardingRecord chains the current query on the "boarding_record" edge. func (cq *ChildQuery) QueryBoardingRecord() *BoardingRecordQuery { query := (&BoardingRecordClient{config: cq.config}).Query() @@ -374,7 +350,6 @@ func (cq *ChildQuery) Clone() *ChildQuery { predicates: append([]predicate.Child{}, cq.predicates...), withGuardian: cq.withGuardian.Clone(), withChildBusAssociations: cq.withChildBusAssociations.Clone(), - withNursery: cq.withNursery.Clone(), withBoardingRecord: cq.withBoardingRecord.Clone(), withPhotos: cq.withPhotos.Clone(), // clone intermediate query. @@ -405,17 +380,6 @@ func (cq *ChildQuery) WithChildBusAssociations(opts ...func(*ChildBusAssociation return cq } -// WithNursery tells the query-builder to eager-load the nodes that are connected to -// the "nursery" edge. The optional arguments are used to configure the query builder of the edge. -func (cq *ChildQuery) WithNursery(opts ...func(*NurseryQuery)) *ChildQuery { - query := (&NurseryClient{config: cq.config}).Query() - for _, opt := range opts { - opt(query) - } - cq.withNursery = query - return cq -} - // WithBoardingRecord tells the query-builder to eager-load the nodes that are connected to // the "boarding_record" edge. The optional arguments are used to configure the query builder of the edge. func (cq *ChildQuery) WithBoardingRecord(opts ...func(*BoardingRecordQuery)) *ChildQuery { @@ -517,15 +481,14 @@ func (cq *ChildQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Child, nodes = []*Child{} withFKs = cq.withFKs _spec = cq.querySpec() - loadedTypes = [5]bool{ + loadedTypes = [4]bool{ cq.withGuardian != nil, cq.withChildBusAssociations != nil, - cq.withNursery != nil, cq.withBoardingRecord != nil, cq.withPhotos != nil, } ) - if cq.withGuardian != nil || cq.withNursery != nil { + if cq.withGuardian != nil { withFKs = true } if withFKs { @@ -564,12 +527,6 @@ func (cq *ChildQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Child, return nil, err } } - if query := cq.withNursery; query != nil { - if err := cq.loadNursery(ctx, query, nodes, nil, - func(n *Child, e *Nursery) { n.Edges.Nursery = e }); err != nil { - return nil, err - } - } if query := cq.withBoardingRecord; query != nil { if err := cq.loadBoardingRecord(ctx, query, nodes, func(n *Child) { n.Edges.BoardingRecord = []*BoardingRecord{} }, @@ -649,38 +606,6 @@ func (cq *ChildQuery) loadChildBusAssociations(ctx context.Context, query *Child } return nil } -func (cq *ChildQuery) loadNursery(ctx context.Context, query *NurseryQuery, nodes []*Child, init func(*Child), assign func(*Child, *Nursery)) error { - ids := make([]uuid.UUID, 0, len(nodes)) - nodeids := make(map[uuid.UUID][]*Child) - for i := range nodes { - if nodes[i].child_nursery == nil { - continue - } - fk := *nodes[i].child_nursery - if _, ok := nodeids[fk]; !ok { - ids = append(ids, fk) - } - nodeids[fk] = append(nodeids[fk], nodes[i]) - } - if len(ids) == 0 { - return nil - } - query.Where(nursery.IDIn(ids...)) - neighbors, err := query.All(ctx) - if err != nil { - return err - } - for _, n := range neighbors { - nodes, ok := nodeids[n.ID] - if !ok { - return fmt.Errorf(`unexpected foreign-key "child_nursery" returned %v`, n.ID) - } - for i := range nodes { - assign(nodes[i], n) - } - } - return nil -} func (cq *ChildQuery) loadBoardingRecord(ctx context.Context, query *BoardingRecordQuery, nodes []*Child, init func(*Child), assign func(*Child, *BoardingRecord)) error { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[uuid.UUID]*Child) diff --git a/backend/domain/repository/ent/child_update.go b/backend/domain/repository/ent/child_update.go index 43463e86..086fd7ea 100644 --- a/backend/domain/repository/ent/child_update.go +++ b/backend/domain/repository/ent/child_update.go @@ -16,7 +16,6 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" "github.com/google/uuid" ) @@ -221,25 +220,6 @@ func (cu *ChildUpdate) AddChildBusAssociations(c ...*ChildBusAssociation) *Child return cu.AddChildBusAssociationIDs(ids...) } -// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. -func (cu *ChildUpdate) SetNurseryID(id uuid.UUID) *ChildUpdate { - cu.mutation.SetNurseryID(id) - return cu -} - -// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. -func (cu *ChildUpdate) SetNillableNurseryID(id *uuid.UUID) *ChildUpdate { - if id != nil { - cu = cu.SetNurseryID(*id) - } - return cu -} - -// SetNursery sets the "nursery" edge to the Nursery entity. -func (cu *ChildUpdate) SetNursery(n *Nursery) *ChildUpdate { - return cu.SetNurseryID(n.ID) -} - // AddBoardingRecordIDs adds the "boarding_record" edge to the BoardingRecord entity by IDs. func (cu *ChildUpdate) AddBoardingRecordIDs(ids ...uuid.UUID) *ChildUpdate { cu.mutation.AddBoardingRecordIDs(ids...) @@ -302,12 +282,6 @@ func (cu *ChildUpdate) RemoveChildBusAssociations(c ...*ChildBusAssociation) *Ch return cu.RemoveChildBusAssociationIDs(ids...) } -// ClearNursery clears the "nursery" edge to the Nursery entity. -func (cu *ChildUpdate) ClearNursery() *ChildUpdate { - cu.mutation.ClearNursery() - return cu -} - // ClearBoardingRecord clears all "boarding_record" edges to the BoardingRecord entity. func (cu *ChildUpdate) ClearBoardingRecord() *ChildUpdate { cu.mutation.ClearBoardingRecord() @@ -518,35 +492,6 @@ func (cu *ChildUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if cu.mutation.NurseryCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: child.NurseryTable, - Columns: []string{child.NurseryColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := cu.mutation.NurseryIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: child.NurseryTable, - Columns: []string{child.NurseryColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } if cu.mutation.BoardingRecordCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, @@ -844,25 +789,6 @@ func (cuo *ChildUpdateOne) AddChildBusAssociations(c ...*ChildBusAssociation) *C return cuo.AddChildBusAssociationIDs(ids...) } -// SetNurseryID sets the "nursery" edge to the Nursery entity by ID. -func (cuo *ChildUpdateOne) SetNurseryID(id uuid.UUID) *ChildUpdateOne { - cuo.mutation.SetNurseryID(id) - return cuo -} - -// SetNillableNurseryID sets the "nursery" edge to the Nursery entity by ID if the given value is not nil. -func (cuo *ChildUpdateOne) SetNillableNurseryID(id *uuid.UUID) *ChildUpdateOne { - if id != nil { - cuo = cuo.SetNurseryID(*id) - } - return cuo -} - -// SetNursery sets the "nursery" edge to the Nursery entity. -func (cuo *ChildUpdateOne) SetNursery(n *Nursery) *ChildUpdateOne { - return cuo.SetNurseryID(n.ID) -} - // AddBoardingRecordIDs adds the "boarding_record" edge to the BoardingRecord entity by IDs. func (cuo *ChildUpdateOne) AddBoardingRecordIDs(ids ...uuid.UUID) *ChildUpdateOne { cuo.mutation.AddBoardingRecordIDs(ids...) @@ -925,12 +851,6 @@ func (cuo *ChildUpdateOne) RemoveChildBusAssociations(c ...*ChildBusAssociation) return cuo.RemoveChildBusAssociationIDs(ids...) } -// ClearNursery clears the "nursery" edge to the Nursery entity. -func (cuo *ChildUpdateOne) ClearNursery() *ChildUpdateOne { - cuo.mutation.ClearNursery() - return cuo -} - // ClearBoardingRecord clears all "boarding_record" edges to the BoardingRecord entity. func (cuo *ChildUpdateOne) ClearBoardingRecord() *ChildUpdateOne { cuo.mutation.ClearBoardingRecord() @@ -1171,35 +1091,6 @@ func (cuo *ChildUpdateOne) sqlSave(ctx context.Context) (_node *Child, err error } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if cuo.mutation.NurseryCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: child.NurseryTable, - Columns: []string{child.NurseryColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := cuo.mutation.NurseryIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: child.NurseryTable, - Columns: []string{child.NurseryColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(nursery.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } if cuo.mutation.BoardingRecordCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, diff --git a/backend/domain/repository/ent/client.go b/backend/domain/repository/ent/client.go index 7ce2d91d..ce41c94a 100644 --- a/backend/domain/repository/ent/client.go +++ b/backend/domain/repository/ent/client.go @@ -766,22 +766,6 @@ func (c *ChildClient) QueryChildBusAssociations(ch *Child) *ChildBusAssociationQ return query } -// QueryNursery queries the nursery edge of a Child. -func (c *ChildClient) QueryNursery(ch *Child) *NurseryQuery { - query := (&NurseryClient{config: c.config}).Query() - query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := ch.ID - step := sqlgraph.NewStep( - sqlgraph.From(child.Table, child.FieldID, id), - sqlgraph.To(nursery.Table, nursery.FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, child.NurseryTable, child.NurseryColumn), - ) - fromV = sqlgraph.Neighbors(ch.driver.Dialect(), step) - return fromV, nil - } - return query -} - // QueryBoardingRecord queries the boarding_record edge of a Child. func (c *ChildClient) QueryBoardingRecord(ch *Child) *BoardingRecordQuery { query := (&BoardingRecordClient{config: c.config}).Query() @@ -1442,22 +1426,6 @@ func (c *NurseryClient) GetX(ctx context.Context, id uuid.UUID) *Nursery { return obj } -// QueryChildren queries the children edge of a Nursery. -func (c *NurseryClient) QueryChildren(n *Nursery) *ChildQuery { - query := (&ChildClient{config: c.config}).Query() - query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := n.ID - step := sqlgraph.NewStep( - sqlgraph.From(nursery.Table, nursery.FieldID, id), - sqlgraph.To(child.Table, child.FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, nursery.ChildrenTable, nursery.ChildrenColumn), - ) - fromV = sqlgraph.Neighbors(n.driver.Dialect(), step) - return fromV, nil - } - return query -} - // QueryGuardians queries the guardians edge of a Nursery. func (c *NurseryClient) QueryGuardians(n *Nursery) *GuardianQuery { query := (&GuardianClient{config: c.config}).Query() diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 7529e26c..9bfc4f3b 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -77,7 +77,6 @@ var ( {Name: "has_other", Type: field.TypeBool, Default: true}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, - {Name: "child_nursery", Type: field.TypeUUID, Nullable: true}, {Name: "guardian_children", Type: field.TypeUUID, Nullable: true}, } // ChildsTable holds the schema information for the "childs" table. @@ -86,15 +85,9 @@ var ( Columns: ChildsColumns, PrimaryKey: []*schema.Column{ChildsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ - { - Symbol: "childs_nurseries_nursery", - Columns: []*schema.Column{ChildsColumns[12]}, - RefColumns: []*schema.Column{NurseriesColumns[0]}, - OnDelete: schema.SetNull, - }, { Symbol: "childs_guardians_children", - Columns: []*schema.Column{ChildsColumns[13]}, + Columns: []*schema.Column{ChildsColumns[12]}, RefColumns: []*schema.Column{GuardiansColumns[0]}, OnDelete: schema.SetNull, }, @@ -151,7 +144,7 @@ var ( // GuardiansColumns holds the columns for the "guardians" table. GuardiansColumns = []*schema.Column{ {Name: "id", Type: field.TypeUUID, Unique: true}, - {Name: "email", Type: field.TypeString}, + {Name: "email", Type: field.TypeString, Unique: true}, {Name: "hashed_password", Type: field.TypeString}, {Name: "name", Type: field.TypeString}, {Name: "phone_number", Type: field.TypeString, Nullable: true}, @@ -179,7 +172,7 @@ var ( NurseriesColumns = []*schema.Column{ {Name: "id", Type: field.TypeUUID, Unique: true}, {Name: "nursery_code", Type: field.TypeString, Unique: true}, - {Name: "email", Type: field.TypeString}, + {Name: "email", Type: field.TypeString, Unique: true}, {Name: "hashed_password", Type: field.TypeString}, {Name: "name", Type: field.TypeString}, {Name: "address", Type: field.TypeString, Nullable: true}, @@ -273,8 +266,7 @@ func init() { BoardingRecordsTable.ForeignKeys[0].RefTable = BusTable BoardingRecordsTable.ForeignKeys[1].RefTable = ChildsTable BusTable.ForeignKeys[0].RefTable = NurseriesTable - ChildsTable.ForeignKeys[0].RefTable = NurseriesTable - ChildsTable.ForeignKeys[1].RefTable = GuardiansTable + ChildsTable.ForeignKeys[0].RefTable = GuardiansTable ChildBusAssociationsTable.ForeignKeys[0].RefTable = BusTable ChildBusAssociationsTable.ForeignKeys[1].RefTable = ChildsTable ChildPhotosTable.ForeignKeys[0].RefTable = ChildsTable diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index ee935c6d..7c378240 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -1737,8 +1737,6 @@ type ChildMutation struct { childBusAssociations map[int]struct{} removedchildBusAssociations map[int]struct{} clearedchildBusAssociations bool - nursery *uuid.UUID - clearednursery bool boarding_record map[uuid.UUID]struct{} removedboarding_record map[uuid.UUID]struct{} clearedboarding_record bool @@ -2363,45 +2361,6 @@ func (m *ChildMutation) ResetChildBusAssociations() { m.removedchildBusAssociations = nil } -// SetNurseryID sets the "nursery" edge to the Nursery entity by id. -func (m *ChildMutation) SetNurseryID(id uuid.UUID) { - m.nursery = &id -} - -// ClearNursery clears the "nursery" edge to the Nursery entity. -func (m *ChildMutation) ClearNursery() { - m.clearednursery = true -} - -// NurseryCleared reports if the "nursery" edge to the Nursery entity was cleared. -func (m *ChildMutation) NurseryCleared() bool { - return m.clearednursery -} - -// NurseryID returns the "nursery" edge ID in the mutation. -func (m *ChildMutation) NurseryID() (id uuid.UUID, exists bool) { - if m.nursery != nil { - return *m.nursery, true - } - return -} - -// NurseryIDs returns the "nursery" edge IDs in the mutation. -// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use -// NurseryID instead. It exists only for internal usage by the builders. -func (m *ChildMutation) NurseryIDs() (ids []uuid.UUID) { - if id := m.nursery; id != nil { - ids = append(ids, *id) - } - return -} - -// ResetNursery resets all changes to the "nursery" edge. -func (m *ChildMutation) ResetNursery() { - m.nursery = nil - m.clearednursery = false -} - // AddBoardingRecordIDs adds the "boarding_record" edge to the BoardingRecord entity by ids. func (m *ChildMutation) AddBoardingRecordIDs(ids ...uuid.UUID) { if m.boarding_record == nil { @@ -2828,16 +2787,13 @@ func (m *ChildMutation) ResetField(name string) error { // AddedEdges returns all edge names that were set/added in this mutation. func (m *ChildMutation) AddedEdges() []string { - edges := make([]string, 0, 5) + edges := make([]string, 0, 4) if m.guardian != nil { edges = append(edges, child.EdgeGuardian) } if m.childBusAssociations != nil { edges = append(edges, child.EdgeChildBusAssociations) } - if m.nursery != nil { - edges = append(edges, child.EdgeNursery) - } if m.boarding_record != nil { edges = append(edges, child.EdgeBoardingRecord) } @@ -2861,10 +2817,6 @@ func (m *ChildMutation) AddedIDs(name string) []ent.Value { ids = append(ids, id) } return ids - case child.EdgeNursery: - if id := m.nursery; id != nil { - return []ent.Value{*id} - } case child.EdgeBoardingRecord: ids := make([]ent.Value, 0, len(m.boarding_record)) for id := range m.boarding_record { @@ -2883,7 +2835,7 @@ func (m *ChildMutation) AddedIDs(name string) []ent.Value { // RemovedEdges returns all edge names that were removed in this mutation. func (m *ChildMutation) RemovedEdges() []string { - edges := make([]string, 0, 5) + edges := make([]string, 0, 4) if m.removedchildBusAssociations != nil { edges = append(edges, child.EdgeChildBusAssociations) } @@ -2924,16 +2876,13 @@ func (m *ChildMutation) RemovedIDs(name string) []ent.Value { // ClearedEdges returns all edge names that were cleared in this mutation. func (m *ChildMutation) ClearedEdges() []string { - edges := make([]string, 0, 5) + edges := make([]string, 0, 4) if m.clearedguardian { edges = append(edges, child.EdgeGuardian) } if m.clearedchildBusAssociations { edges = append(edges, child.EdgeChildBusAssociations) } - if m.clearednursery { - edges = append(edges, child.EdgeNursery) - } if m.clearedboarding_record { edges = append(edges, child.EdgeBoardingRecord) } @@ -2951,8 +2900,6 @@ func (m *ChildMutation) EdgeCleared(name string) bool { return m.clearedguardian case child.EdgeChildBusAssociations: return m.clearedchildBusAssociations - case child.EdgeNursery: - return m.clearednursery case child.EdgeBoardingRecord: return m.clearedboarding_record case child.EdgePhotos: @@ -2968,9 +2915,6 @@ func (m *ChildMutation) ClearEdge(name string) error { case child.EdgeGuardian: m.ClearGuardian() return nil - case child.EdgeNursery: - m.ClearNursery() - return nil } return fmt.Errorf("unknown Child unique edge %s", name) } @@ -2985,9 +2929,6 @@ func (m *ChildMutation) ResetEdge(name string) error { case child.EdgeChildBusAssociations: m.ResetChildBusAssociations() return nil - case child.EdgeNursery: - m.ResetNursery() - return nil case child.EdgeBoardingRecord: m.ResetBoardingRecord() return nil @@ -4943,9 +4884,6 @@ type NurseryMutation struct { created_at *time.Time updated_at *time.Time clearedFields map[string]struct{} - children map[uuid.UUID]struct{} - removedchildren map[uuid.UUID]struct{} - clearedchildren bool guardians map[uuid.UUID]struct{} removedguardians map[uuid.UUID]struct{} clearedguardians bool @@ -5375,60 +5313,6 @@ func (m *NurseryMutation) ResetUpdatedAt() { m.updated_at = nil } -// AddChildIDs adds the "children" edge to the Child entity by ids. -func (m *NurseryMutation) AddChildIDs(ids ...uuid.UUID) { - if m.children == nil { - m.children = make(map[uuid.UUID]struct{}) - } - for i := range ids { - m.children[ids[i]] = struct{}{} - } -} - -// ClearChildren clears the "children" edge to the Child entity. -func (m *NurseryMutation) ClearChildren() { - m.clearedchildren = true -} - -// ChildrenCleared reports if the "children" edge to the Child entity was cleared. -func (m *NurseryMutation) ChildrenCleared() bool { - return m.clearedchildren -} - -// RemoveChildIDs removes the "children" edge to the Child entity by IDs. -func (m *NurseryMutation) RemoveChildIDs(ids ...uuid.UUID) { - if m.removedchildren == nil { - m.removedchildren = make(map[uuid.UUID]struct{}) - } - for i := range ids { - delete(m.children, ids[i]) - m.removedchildren[ids[i]] = struct{}{} - } -} - -// RemovedChildren returns the removed IDs of the "children" edge to the Child entity. -func (m *NurseryMutation) RemovedChildrenIDs() (ids []uuid.UUID) { - for id := range m.removedchildren { - ids = append(ids, id) - } - return -} - -// ChildrenIDs returns the "children" edge IDs in the mutation. -func (m *NurseryMutation) ChildrenIDs() (ids []uuid.UUID) { - for id := range m.children { - ids = append(ids, id) - } - return -} - -// ResetChildren resets all changes to the "children" edge. -func (m *NurseryMutation) ResetChildren() { - m.children = nil - m.clearedchildren = false - m.removedchildren = nil -} - // AddGuardianIDs adds the "guardians" edge to the Guardian entity by ids. func (m *NurseryMutation) AddGuardianIDs(ids ...uuid.UUID) { if m.guardians == nil { @@ -5804,10 +5688,7 @@ func (m *NurseryMutation) ResetField(name string) error { // AddedEdges returns all edge names that were set/added in this mutation. func (m *NurseryMutation) AddedEdges() []string { - edges := make([]string, 0, 3) - if m.children != nil { - edges = append(edges, nursery.EdgeChildren) - } + edges := make([]string, 0, 2) if m.guardians != nil { edges = append(edges, nursery.EdgeGuardians) } @@ -5821,12 +5702,6 @@ func (m *NurseryMutation) AddedEdges() []string { // name in this mutation. func (m *NurseryMutation) AddedIDs(name string) []ent.Value { switch name { - case nursery.EdgeChildren: - ids := make([]ent.Value, 0, len(m.children)) - for id := range m.children { - ids = append(ids, id) - } - return ids case nursery.EdgeGuardians: ids := make([]ent.Value, 0, len(m.guardians)) for id := range m.guardians { @@ -5845,10 +5720,7 @@ func (m *NurseryMutation) AddedIDs(name string) []ent.Value { // RemovedEdges returns all edge names that were removed in this mutation. func (m *NurseryMutation) RemovedEdges() []string { - edges := make([]string, 0, 3) - if m.removedchildren != nil { - edges = append(edges, nursery.EdgeChildren) - } + edges := make([]string, 0, 2) if m.removedguardians != nil { edges = append(edges, nursery.EdgeGuardians) } @@ -5862,12 +5734,6 @@ func (m *NurseryMutation) RemovedEdges() []string { // the given name in this mutation. func (m *NurseryMutation) RemovedIDs(name string) []ent.Value { switch name { - case nursery.EdgeChildren: - ids := make([]ent.Value, 0, len(m.removedchildren)) - for id := range m.removedchildren { - ids = append(ids, id) - } - return ids case nursery.EdgeGuardians: ids := make([]ent.Value, 0, len(m.removedguardians)) for id := range m.removedguardians { @@ -5886,10 +5752,7 @@ func (m *NurseryMutation) RemovedIDs(name string) []ent.Value { // ClearedEdges returns all edge names that were cleared in this mutation. func (m *NurseryMutation) ClearedEdges() []string { - edges := make([]string, 0, 3) - if m.clearedchildren { - edges = append(edges, nursery.EdgeChildren) - } + edges := make([]string, 0, 2) if m.clearedguardians { edges = append(edges, nursery.EdgeGuardians) } @@ -5903,8 +5766,6 @@ func (m *NurseryMutation) ClearedEdges() []string { // was cleared in this mutation. func (m *NurseryMutation) EdgeCleared(name string) bool { switch name { - case nursery.EdgeChildren: - return m.clearedchildren case nursery.EdgeGuardians: return m.clearedguardians case nursery.EdgeBuses: @@ -5925,9 +5786,6 @@ func (m *NurseryMutation) ClearEdge(name string) error { // It returns an error if the edge is not defined in the schema. func (m *NurseryMutation) ResetEdge(name string) error { switch name { - case nursery.EdgeChildren: - m.ResetChildren() - return nil case nursery.EdgeGuardians: m.ResetGuardians() return nil diff --git a/backend/domain/repository/ent/nursery.go b/backend/domain/repository/ent/nursery.go index 3c1ca5ae..ac4cbe5f 100644 --- a/backend/domain/repository/ent/nursery.go +++ b/backend/domain/repository/ent/nursery.go @@ -42,30 +42,19 @@ type Nursery struct { // NurseryEdges holds the relations/edges for other nodes in the graph. type NurseryEdges struct { - // Children holds the value of the children edge. - Children []*Child `json:"children,omitempty"` // Guardians holds the value of the guardians edge. Guardians []*Guardian `json:"guardians,omitempty"` // Buses holds the value of the buses edge. Buses []*Bus `json:"buses,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. - loadedTypes [3]bool -} - -// ChildrenOrErr returns the Children value or an error if the edge -// was not loaded in eager-loading. -func (e NurseryEdges) ChildrenOrErr() ([]*Child, error) { - if e.loadedTypes[0] { - return e.Children, nil - } - return nil, &NotLoadedError{edge: "children"} + loadedTypes [2]bool } // GuardiansOrErr returns the Guardians value or an error if the edge // was not loaded in eager-loading. func (e NurseryEdges) GuardiansOrErr() ([]*Guardian, error) { - if e.loadedTypes[1] { + if e.loadedTypes[0] { return e.Guardians, nil } return nil, &NotLoadedError{edge: "guardians"} @@ -74,7 +63,7 @@ func (e NurseryEdges) GuardiansOrErr() ([]*Guardian, error) { // BusesOrErr returns the Buses value or an error if the edge // was not loaded in eager-loading. func (e NurseryEdges) BusesOrErr() ([]*Bus, error) { - if e.loadedTypes[2] { + if e.loadedTypes[1] { return e.Buses, nil } return nil, &NotLoadedError{edge: "buses"} @@ -173,11 +162,6 @@ func (n *Nursery) Value(name string) (ent.Value, error) { return n.selectValues.Get(name) } -// QueryChildren queries the "children" edge of the Nursery entity. -func (n *Nursery) QueryChildren() *ChildQuery { - return NewNurseryClient(n.config).QueryChildren(n) -} - // QueryGuardians queries the "guardians" edge of the Nursery entity. func (n *Nursery) QueryGuardians() *GuardianQuery { return NewNurseryClient(n.config).QueryGuardians(n) diff --git a/backend/domain/repository/ent/nursery/nursery.go b/backend/domain/repository/ent/nursery/nursery.go index fc40cef2..ad7609b6 100644 --- a/backend/domain/repository/ent/nursery/nursery.go +++ b/backend/domain/repository/ent/nursery/nursery.go @@ -31,21 +31,12 @@ const ( FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" - // EdgeChildren holds the string denoting the children edge name in mutations. - EdgeChildren = "children" // EdgeGuardians holds the string denoting the guardians edge name in mutations. EdgeGuardians = "guardians" // EdgeBuses holds the string denoting the buses edge name in mutations. EdgeBuses = "buses" // Table holds the table name of the nursery in the database. Table = "nurseries" - // ChildrenTable is the table that holds the children relation/edge. - ChildrenTable = "childs" - // ChildrenInverseTable is the table name for the Child entity. - // It exists in this package in order to avoid circular dependency with the "child" package. - ChildrenInverseTable = "childs" - // ChildrenColumn is the table column denoting the children relation/edge. - ChildrenColumn = "child_nursery" // GuardiansTable is the table that holds the guardians relation/edge. GuardiansTable = "guardians" // GuardiansInverseTable is the table name for the Guardian entity. @@ -144,20 +135,6 @@ func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() } -// ByChildrenCount orders the results by children count. -func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborsCount(s, newChildrenStep(), opts...) - } -} - -// ByChildren orders the results by children terms. -func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newChildrenStep(), append([]sql.OrderTerm{term}, terms...)...) - } -} - // ByGuardiansCount orders the results by guardians count. func ByGuardiansCount(opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { @@ -185,13 +162,6 @@ func ByBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { sqlgraph.OrderByNeighborTerms(s, newBusesStep(), append([]sql.OrderTerm{term}, terms...)...) } } -func newChildrenStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, ChildrenTable, ChildrenColumn), - ) -} func newGuardiansStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), diff --git a/backend/domain/repository/ent/nursery/where.go b/backend/domain/repository/ent/nursery/where.go index 6f5b404f..5e1421cb 100644 --- a/backend/domain/repository/ent/nursery/where.go +++ b/backend/domain/repository/ent/nursery/where.go @@ -586,29 +586,6 @@ func UpdatedAtLTE(v time.Time) predicate.Nursery { return predicate.Nursery(sql.FieldLTE(FieldUpdatedAt, v)) } -// HasChildren applies the HasEdge predicate on the "children" edge. -func HasChildren() predicate.Nursery { - return predicate.Nursery(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, ChildrenTable, ChildrenColumn), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates). -func HasChildrenWith(preds ...predicate.Child) predicate.Nursery { - return predicate.Nursery(func(s *sql.Selector) { - step := newChildrenStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - // HasGuardians applies the HasEdge predicate on the "guardians" edge. func HasGuardians() predicate.Nursery { return predicate.Nursery(func(s *sql.Selector) { diff --git a/backend/domain/repository/ent/nursery_create.go b/backend/domain/repository/ent/nursery_create.go index 04be10a9..24110879 100644 --- a/backend/domain/repository/ent/nursery_create.go +++ b/backend/domain/repository/ent/nursery_create.go @@ -11,7 +11,6 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/google/uuid" @@ -118,21 +117,6 @@ func (nc *NurseryCreate) SetNillableID(u *uuid.UUID) *NurseryCreate { return nc } -// AddChildIDs adds the "children" edge to the Child entity by IDs. -func (nc *NurseryCreate) AddChildIDs(ids ...uuid.UUID) *NurseryCreate { - nc.mutation.AddChildIDs(ids...) - return nc -} - -// AddChildren adds the "children" edges to the Child entity. -func (nc *NurseryCreate) AddChildren(c ...*Child) *NurseryCreate { - ids := make([]uuid.UUID, len(c)) - for i := range c { - ids[i] = c[i].ID - } - return nc.AddChildIDs(ids...) -} - // AddGuardianIDs adds the "guardians" edge to the Guardian entity by IDs. func (nc *NurseryCreate) AddGuardianIDs(ids ...uuid.UUID) *NurseryCreate { nc.mutation.AddGuardianIDs(ids...) @@ -299,22 +283,6 @@ func (nc *NurseryCreate) createSpec() (*Nursery, *sqlgraph.CreateSpec) { _spec.SetField(nursery.FieldUpdatedAt, field.TypeTime, value) _node.UpdatedAt = value } - if nodes := nc.mutation.ChildrenIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: nursery.ChildrenTable, - Columns: []string{nursery.ChildrenColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges = append(_spec.Edges, edge) - } if nodes := nc.mutation.GuardiansIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, diff --git a/backend/domain/repository/ent/nursery_query.go b/backend/domain/repository/ent/nursery_query.go index b83b97cf..33fe562b 100644 --- a/backend/domain/repository/ent/nursery_query.go +++ b/backend/domain/repository/ent/nursery_query.go @@ -12,7 +12,6 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" @@ -26,7 +25,6 @@ type NurseryQuery struct { order []nursery.OrderOption inters []Interceptor predicates []predicate.Nursery - withChildren *ChildQuery withGuardians *GuardianQuery withBuses *BusQuery // intermediate query (i.e. traversal path). @@ -65,28 +63,6 @@ func (nq *NurseryQuery) Order(o ...nursery.OrderOption) *NurseryQuery { return nq } -// QueryChildren chains the current query on the "children" edge. -func (nq *NurseryQuery) QueryChildren() *ChildQuery { - query := (&ChildClient{config: nq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := nq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := nq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(nursery.Table, nursery.FieldID, selector), - sqlgraph.To(child.Table, child.FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, nursery.ChildrenTable, nursery.ChildrenColumn), - ) - fromU = sqlgraph.SetNeighbors(nq.driver.Dialect(), step) - return fromU, nil - } - return query -} - // QueryGuardians chains the current query on the "guardians" edge. func (nq *NurseryQuery) QueryGuardians() *GuardianQuery { query := (&GuardianClient{config: nq.config}).Query() @@ -323,7 +299,6 @@ func (nq *NurseryQuery) Clone() *NurseryQuery { order: append([]nursery.OrderOption{}, nq.order...), inters: append([]Interceptor{}, nq.inters...), predicates: append([]predicate.Nursery{}, nq.predicates...), - withChildren: nq.withChildren.Clone(), withGuardians: nq.withGuardians.Clone(), withBuses: nq.withBuses.Clone(), // clone intermediate query. @@ -332,17 +307,6 @@ func (nq *NurseryQuery) Clone() *NurseryQuery { } } -// WithChildren tells the query-builder to eager-load the nodes that are connected to -// the "children" edge. The optional arguments are used to configure the query builder of the edge. -func (nq *NurseryQuery) WithChildren(opts ...func(*ChildQuery)) *NurseryQuery { - query := (&ChildClient{config: nq.config}).Query() - for _, opt := range opts { - opt(query) - } - nq.withChildren = query - return nq -} - // WithGuardians tells the query-builder to eager-load the nodes that are connected to // the "guardians" edge. The optional arguments are used to configure the query builder of the edge. func (nq *NurseryQuery) WithGuardians(opts ...func(*GuardianQuery)) *NurseryQuery { @@ -443,8 +407,7 @@ func (nq *NurseryQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Nurs var ( nodes = []*Nursery{} _spec = nq.querySpec() - loadedTypes = [3]bool{ - nq.withChildren != nil, + loadedTypes = [2]bool{ nq.withGuardians != nil, nq.withBuses != nil, } @@ -467,13 +430,6 @@ func (nq *NurseryQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Nurs if len(nodes) == 0 { return nodes, nil } - if query := nq.withChildren; query != nil { - if err := nq.loadChildren(ctx, query, nodes, - func(n *Nursery) { n.Edges.Children = []*Child{} }, - func(n *Nursery, e *Child) { n.Edges.Children = append(n.Edges.Children, e) }); err != nil { - return nil, err - } - } if query := nq.withGuardians; query != nil { if err := nq.loadGuardians(ctx, query, nodes, func(n *Nursery) { n.Edges.Guardians = []*Guardian{} }, @@ -491,37 +447,6 @@ func (nq *NurseryQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Nurs return nodes, nil } -func (nq *NurseryQuery) loadChildren(ctx context.Context, query *ChildQuery, nodes []*Nursery, init func(*Nursery), assign func(*Nursery, *Child)) error { - fks := make([]driver.Value, 0, len(nodes)) - nodeids := make(map[uuid.UUID]*Nursery) - for i := range nodes { - fks = append(fks, nodes[i].ID) - nodeids[nodes[i].ID] = nodes[i] - if init != nil { - init(nodes[i]) - } - } - query.withFKs = true - query.Where(predicate.Child(func(s *sql.Selector) { - s.Where(sql.InValues(s.C(nursery.ChildrenColumn), fks...)) - })) - neighbors, err := query.All(ctx) - if err != nil { - return err - } - for _, n := range neighbors { - fk := n.child_nursery - if fk == nil { - return fmt.Errorf(`foreign-key "child_nursery" is nil for node %v`, n.ID) - } - node, ok := nodeids[*fk] - if !ok { - return fmt.Errorf(`unexpected referenced foreign-key "child_nursery" returned %v for node %v`, *fk, n.ID) - } - assign(node, n) - } - return nil -} func (nq *NurseryQuery) loadGuardians(ctx context.Context, query *GuardianQuery, nodes []*Nursery, init func(*Nursery), assign func(*Nursery, *Guardian)) error { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[uuid.UUID]*Nursery) diff --git a/backend/domain/repository/ent/nursery_update.go b/backend/domain/repository/ent/nursery_update.go index c1186087..57e4515a 100644 --- a/backend/domain/repository/ent/nursery_update.go +++ b/backend/domain/repository/ent/nursery_update.go @@ -12,7 +12,6 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" @@ -148,21 +147,6 @@ func (nu *NurseryUpdate) SetUpdatedAt(t time.Time) *NurseryUpdate { return nu } -// AddChildIDs adds the "children" edge to the Child entity by IDs. -func (nu *NurseryUpdate) AddChildIDs(ids ...uuid.UUID) *NurseryUpdate { - nu.mutation.AddChildIDs(ids...) - return nu -} - -// AddChildren adds the "children" edges to the Child entity. -func (nu *NurseryUpdate) AddChildren(c ...*Child) *NurseryUpdate { - ids := make([]uuid.UUID, len(c)) - for i := range c { - ids[i] = c[i].ID - } - return nu.AddChildIDs(ids...) -} - // AddGuardianIDs adds the "guardians" edge to the Guardian entity by IDs. func (nu *NurseryUpdate) AddGuardianIDs(ids ...uuid.UUID) *NurseryUpdate { nu.mutation.AddGuardianIDs(ids...) @@ -198,27 +182,6 @@ func (nu *NurseryUpdate) Mutation() *NurseryMutation { return nu.mutation } -// ClearChildren clears all "children" edges to the Child entity. -func (nu *NurseryUpdate) ClearChildren() *NurseryUpdate { - nu.mutation.ClearChildren() - return nu -} - -// RemoveChildIDs removes the "children" edge to Child entities by IDs. -func (nu *NurseryUpdate) RemoveChildIDs(ids ...uuid.UUID) *NurseryUpdate { - nu.mutation.RemoveChildIDs(ids...) - return nu -} - -// RemoveChildren removes "children" edges to Child entities. -func (nu *NurseryUpdate) RemoveChildren(c ...*Child) *NurseryUpdate { - ids := make([]uuid.UUID, len(c)) - for i := range c { - ids[i] = c[i].ID - } - return nu.RemoveChildIDs(ids...) -} - // ClearGuardians clears all "guardians" edges to the Guardian entity. func (nu *NurseryUpdate) ClearGuardians() *NurseryUpdate { nu.mutation.ClearGuardians() @@ -336,51 +299,6 @@ func (nu *NurseryUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := nu.mutation.UpdatedAt(); ok { _spec.SetField(nursery.FieldUpdatedAt, field.TypeTime, value) } - if nu.mutation.ChildrenCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: nursery.ChildrenTable, - Columns: []string{nursery.ChildrenColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := nu.mutation.RemovedChildrenIDs(); len(nodes) > 0 && !nu.mutation.ChildrenCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: nursery.ChildrenTable, - Columns: []string{nursery.ChildrenColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := nu.mutation.ChildrenIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: nursery.ChildrenTable, - Columns: []string{nursery.ChildrenColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } if nu.mutation.GuardiansCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, @@ -607,21 +525,6 @@ func (nuo *NurseryUpdateOne) SetUpdatedAt(t time.Time) *NurseryUpdateOne { return nuo } -// AddChildIDs adds the "children" edge to the Child entity by IDs. -func (nuo *NurseryUpdateOne) AddChildIDs(ids ...uuid.UUID) *NurseryUpdateOne { - nuo.mutation.AddChildIDs(ids...) - return nuo -} - -// AddChildren adds the "children" edges to the Child entity. -func (nuo *NurseryUpdateOne) AddChildren(c ...*Child) *NurseryUpdateOne { - ids := make([]uuid.UUID, len(c)) - for i := range c { - ids[i] = c[i].ID - } - return nuo.AddChildIDs(ids...) -} - // AddGuardianIDs adds the "guardians" edge to the Guardian entity by IDs. func (nuo *NurseryUpdateOne) AddGuardianIDs(ids ...uuid.UUID) *NurseryUpdateOne { nuo.mutation.AddGuardianIDs(ids...) @@ -657,27 +560,6 @@ func (nuo *NurseryUpdateOne) Mutation() *NurseryMutation { return nuo.mutation } -// ClearChildren clears all "children" edges to the Child entity. -func (nuo *NurseryUpdateOne) ClearChildren() *NurseryUpdateOne { - nuo.mutation.ClearChildren() - return nuo -} - -// RemoveChildIDs removes the "children" edge to Child entities by IDs. -func (nuo *NurseryUpdateOne) RemoveChildIDs(ids ...uuid.UUID) *NurseryUpdateOne { - nuo.mutation.RemoveChildIDs(ids...) - return nuo -} - -// RemoveChildren removes "children" edges to Child entities. -func (nuo *NurseryUpdateOne) RemoveChildren(c ...*Child) *NurseryUpdateOne { - ids := make([]uuid.UUID, len(c)) - for i := range c { - ids[i] = c[i].ID - } - return nuo.RemoveChildIDs(ids...) -} - // ClearGuardians clears all "guardians" edges to the Guardian entity. func (nuo *NurseryUpdateOne) ClearGuardians() *NurseryUpdateOne { nuo.mutation.ClearGuardians() @@ -825,51 +707,6 @@ func (nuo *NurseryUpdateOne) sqlSave(ctx context.Context) (_node *Nursery, err e if value, ok := nuo.mutation.UpdatedAt(); ok { _spec.SetField(nursery.FieldUpdatedAt, field.TypeTime, value) } - if nuo.mutation.ChildrenCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: nursery.ChildrenTable, - Columns: []string{nursery.ChildrenColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := nuo.mutation.RemovedChildrenIDs(); len(nodes) > 0 && !nuo.mutation.ChildrenCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: nursery.ChildrenTable, - Columns: []string{nursery.ChildrenColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := nuo.mutation.ChildrenIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: nursery.ChildrenTable, - Columns: []string{nursery.ChildrenColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(child.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } if nuo.mutation.GuardiansCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, diff --git a/backend/domain/repository/ent/schema/child.go b/backend/domain/repository/ent/schema/child.go index 1b21472c..45ea8ea4 100644 --- a/backend/domain/repository/ent/schema/child.go +++ b/backend/domain/repository/ent/schema/child.go @@ -41,8 +41,6 @@ func (Child) Edges() []ent.Edge { Ref("children"). Unique(), edge.To("childBusAssociations", ChildBusAssociation.Type), - edge.To("nursery", Nursery.Type). - Unique(), edge.To("boarding_record", BoardingRecord.Type), edge.To("photos", ChildPhoto.Type), } diff --git a/backend/domain/repository/ent/schema/guardian.go b/backend/domain/repository/ent/schema/guardian.go index 009083c2..778004ee 100644 --- a/backend/domain/repository/ent/schema/guardian.go +++ b/backend/domain/repository/ent/schema/guardian.go @@ -18,7 +18,7 @@ type Guardian struct { func (Guardian) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), - field.String("email"), + field.String("email").Unique(), field.String("hashed_password"), field.String("name"), field.String("phone_number").Optional(), diff --git a/backend/domain/repository/ent/schema/nursery.go b/backend/domain/repository/ent/schema/nursery.go index c01eb375..385c0321 100644 --- a/backend/domain/repository/ent/schema/nursery.go +++ b/backend/domain/repository/ent/schema/nursery.go @@ -1,7 +1,6 @@ package schema import ( - "math/rand" "time" "entgo.io/ent" @@ -16,16 +15,12 @@ type Nursery struct { ent.Schema } -func init() { - rand.Seed(time.Now().UnixNano()) // 乱数生成器のシードを設定 -} - // Fields of the Nursery. func (Nursery) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), field.String("nursery_code").Unique().Comment("ユニークな数字(文字列)のコード"), - field.String("email"), + field.String("email").Unique(), field.String("hashed_password"), field.String("name"), field.String("address").Optional(), @@ -38,7 +33,6 @@ func (Nursery) Fields() []ent.Field { // Edges of the Nursery. func (Nursery) Edges() []ent.Edge { return []ent.Edge{ - edge.From("children", Child.Type).Ref("nursery"), edge.From("guardians", Guardian.Type).Ref("nursery"), edge.From("buses", Bus.Type).Ref("nursery"), } From 24b42da3d7fa3ec6222a317e662d15b199fb862e Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 15:44:44 +0900 Subject: [PATCH 341/771] =?UTF-8?q?feat:=20gRPC=E3=82=B5=E3=83=BC=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=81=AE=E9=80=81=E5=8F=97=E4=BF=A1=E3=81=99=E3=82=8B?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E3=83=87=E3=83=BC=E3=82=BF=E3=82=B5=E3=82=A4?= =?UTF-8?q?=E3=82=BA=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/gprc_server/grpc_server.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/gprc_server/grpc_server.go b/backend/gprc_server/grpc_server.go index e9bf18a6..6f45f09f 100644 --- a/backend/gprc_server/grpc_server.go +++ b/backend/gprc_server/grpc_server.go @@ -9,6 +9,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/guardian" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/station" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "golang.org/x/exp/slog" "google.golang.org/grpc" @@ -22,12 +23,17 @@ func New(opts ...optionFunc) *grpc.Server { } serverOptions := make([]grpc.ServerOption, 0) + // set logging interceptor serverOptions = append(serverOptions, grpc.ChainUnaryInterceptor(logging.UnaryServerInterceptor(interceptorLogger(opt.logger))), grpc.ChainStreamInterceptor(logging.StreamServerInterceptor(interceptorLogger(opt.logger))), ) + // set maximum message sizes + maxMsgSize := 100 * 1024 * 1024 // 100MB + serverOptions = append(serverOptions, grpc.MaxRecvMsgSize(maxMsgSize), grpc.MaxSendMsgSize(maxMsgSize)) + srv := grpc.NewServer(serverOptions...) if opt.useReflection { reflection.Register(srv) @@ -52,6 +58,10 @@ func New(opts ...optionFunc) *grpc.Server { nurserySrv := grpc_interfaces.NewNurseryServiceServer(nurseryInteractor) pb.RegisterNurseryServiceServer(srv, nurserySrv) + stationInteractor := station.NewInteractor(opt.entClient, opt.logger) + stationSrv := grpc_interfaces.NewStationServiceServer(stationInteractor) + pb.RegisterStationServiceServer(srv, stationSrv) + return srv } From 85f7614d95f9efd5ba959e875801400047a469b5 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 16:26:32 +0900 Subject: [PATCH 342/771] =?UTF-8?q?feat:GetBusListByNurseryId=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/util/api/bus.dart | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 frontend/where_child_bus/lib/util/api/bus.dart diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart new file mode 100644 index 00000000..29640db4 --- /dev/null +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -0,0 +1,33 @@ +import "dart:developer" as developer; +import "package:flutter/foundation.dart"; +import "package:grpc/grpc.dart"; +import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart"; + +Future getBusListByNurseryId( + String nurseryId) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + + final grpcClient = BusServiceClient(channel); + + try { + var req = GetBusListByNurseryIdRequest(nurseryId: nurseryId); + + if (kDebugMode) { + developer.log("リクエスト: $req"); + } + + var res = await grpcClient.getBusListByNurseryId(req); + if (kDebugMode) { + developer.log("レスポンス: $res"); + } + + return res; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } +} From c39419fef126df1dd777d7dc39d9e6dc290ed490 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 16:39:23 +0900 Subject: [PATCH 343/771] =?UTF-8?q?fix:=20=E3=82=A8=E3=83=83=E3=82=B8?= =?UTF-8?q?=E3=81=AE=E5=8F=82=E7=85=A7=E3=81=8CNULL=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 14 +++++++++++- backend/usecases/child/child.go | 5 ++++ backend/usecases/guardian/guardian.go | 15 +++++++++++- backend/usecases/station/station.go | 33 ++++++++++++--------------- backend/usecases/utils/utils.go | 1 - 5 files changed, 46 insertions(+), 22 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 8441102f..e5f35213 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -55,6 +55,16 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* return nil, fmt.Errorf("failed to create bus: %w", err) } + // Nurseryエッジを持つBusを取得 + bus, err = tx.Bus.Query(). + Where(busRepo.IDEQ(bus.ID)). + WithNursery(). + Only(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to get bus: %w", err) + } + err = setNextStation(ctx, tx, req.MorningGuardianIds, func(updateOp *ent.StationUpdateOne, nextStation *ent.Station) *ent.StationUpdateOne { return updateOp.AddMorningNextStation(nextStation) }) @@ -91,7 +101,9 @@ func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusLi } buses, err := i.getBusList(ctx, func(tx *ent.Tx) (*ent.BusQuery, error) { - return tx.Bus.Query().Where(busRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID))), nil + return tx.Bus.Query(). + Where(busRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID))). + WithNursery(), nil }) if err != nil { diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index 869266e6..c710c129 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -76,6 +76,11 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest return nil, fmt.Errorf("failed to create child: %w", err) } + child, err = tx.Child.Query(). + Where(childRepo.IDEQ(child.ID)). + WithGuardian(). + Only(ctx) + // アップロードされた写真のIDを追跡するスライス var uploadedPhotoIDs []uuid.UUID diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index de14853b..6fb684b1 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -55,6 +55,19 @@ func (i *Interactor) CreateGuardian(ctx context.Context, req *pb.CreateGuardianR SetNursery(nursery). Save(ctx) + if err != nil { + return nil, fmt.Errorf("failed to create guardian: %w", err) + } + + guardian, err = tx.Guardian.Query(). + Where(guardianRepo.IDEQ(guardian.ID)). + WithNursery(). + Only(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to get guardian: %w", err) + } + // Stationを作成 _, err = tx.Station.Create(). SetGuardian(guardian). @@ -106,7 +119,7 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq // レスポンスを返す return &pb.GuardianLoginResponse{ Success: true, - Guardian: utils.ToPbGuardianResponse(guardian), + Guardian: utils.ToPbGuardianResponse(guardian), // NurseryID を引数として渡す Nursery: utils.ToPbNurseryResponse(guardian.Edges.Nursery), }, nil } diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index e5882b85..1618ce3c 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -41,6 +41,7 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq SetLatitude(req.Latitude). SetLongitude(req.Longitude). Save(ctx) + if err != nil { return nil, fmt.Errorf("failed to create or update station: %w", err) } @@ -74,9 +75,11 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati stations, err := i.entClient.Station.Query(). Where(stationRepo.HasBusWith(busRepo.ID(busID))). WithGuardian(func(q *ent.GuardianQuery) { - q.WithChildren() // Guardian に紐づく Children も取得 + // Guardian に紐づく Children と Nursery も取得 + q.WithChildren() }). All(ctx) + if err != nil { return nil, fmt.Errorf("failed to get stations with guardians and children: %w", err) } @@ -88,23 +91,27 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati for _, station := range stations { morningNextStationID, eveningNextStationID, err := getNextStationIDs(ctx, station) if err != nil { - return nil, err // エラーハンドリング + // エラーメッセージにステーションIDを追加して明確にする + return nil, fmt.Errorf("error getting next station IDs for station %v: %w", station.ID, err) } - // ステーションをプロトコルバッファ形式に変換 pbStation := utils.ToPbStation(station, morningNextStationID, eveningNextStationID) pbStations = append(pbStations, pbStation) if station.Edges.Guardian != nil { guardian := station.Edges.Guardian - pbGuardian := utils.ToPbGuardianResponse(guardian) + if err != nil { + // 適切なエラーハンドリング + return nil, fmt.Errorf("error querying nursery for guardian with ID %v: %w", guardian.ID, err) + } guardianID := guardian.ID.String() - uniqueGuardians[guardianID] = pbGuardian // ガーディアンを一意に保持 + pbGuardian := utils.ToPbGuardianResponse(guardian) + uniqueGuardians[guardianID] = pbGuardian for _, child := range guardian.Edges.Children { - pbChild := utils.ToPbChild(child) childID := child.ID.String() - uniqueChildren[childID] = pbChild // 子供を一意に保持 + pbChild := utils.ToPbChild(child) + uniqueChildren[childID] = pbChild } } } @@ -146,15 +153,3 @@ func getNextStationIDs(ctx context.Context, station *ent.Station) (morningNextSt return morningNextStationID, eveningNextStationID, nil } - -func getNextStationID(ctx context.Context, station *ent.Station, queryFunc func(*ent.Station) *ent.StationQuery) (string, error) { - nextStation, err := queryFunc(station).Only(ctx) - if err != nil { - if !ent.IsNotFound(err) { - return "", fmt.Errorf("failed to query next station: %w", err) - } - // 次のステーションが見つからない場合は空文字を返します。 - return "", nil - } - return nextStation.ID.String(), nil -} diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index e3b326c1..a676c5d0 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -17,7 +17,6 @@ func ToPbChild(t *ent.Child) *pb.Child { sex := convertSexToPbSex(t.Sex) return &pb.Child{ Id: t.ID.String(), - NurseryId: t.Edges.Nursery.ID.String(), GuardianId: t.Edges.Guardian.ID.String(), Name: t.Name, Age: int32(t.Age), From 890a83fab1bbb27ead339eb89f68517ee17a9346 Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Fri, 16 Feb 2024 17:07:10 +0900 Subject: [PATCH 344/771] refator: augmentation change --- .../data/faceDetectDataset.py | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index b1c7d9b2..8077f333 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -9,7 +9,7 @@ class FaceDetectDataset(torch.utils.data.Dataset): def __init__(self, config, transform=None): self.data_dir = config["dataset"]["root_path"] - self.transform = transform if transform is not None else self.default_transforms() + default_transform = self.get_default_transforms() self.face_data = [] self.label_name_dict = {} name_label_dict = {} @@ -35,38 +35,40 @@ def __init__(self, config, transform=None): label = torch.tensor(name_label_dict[people_name], dtype=torch.int64) image_pil = Image.fromarray(image) - self.face_data.append((label, self.transform(image_pil))) + self.face_data.append((label, default_transform(image_pil))) augmented_images = self.augment_image(image_pil, num_variations=5) for aug_img in augmented_images: self.face_data.append((label, aug_img)) - @staticmethod - def default_transforms(): + def get_default_transforms(self): return transforms.Compose([ transforms.Resize((224, 224)), transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), ]) - - def augment_image(self, image, num_variations=5): - # ランダムな変換を適用するための拡張設定を強化 - transformations = transforms.Compose([ - transforms.RandomApply([transforms.Resize((256, 256)), - transforms.RandomCrop((224, 224))], p=0.5), + + def get_augment_transform(self): + return transforms.Compose([ + transforms.RandomApply([transforms.Resize((256, 256))], p=0.5), + transforms.RandomCrop((224, 224), p=0.5), transforms.RandomHorizontalFlip(p=0.5), transforms.RandomVerticalFlip(p=0.5), - transforms.RandomApply([transforms.RandomRotation(degrees=15)], p=0.5), + transforms.RandomApply([transforms.RandomRotation(degrees=180)], p=0.5), transforms.RandomApply([transforms.RandomAffine(degrees=0, translate=(0.1, 0.1), scale=(0.8, 1.2))], p=0.5), transforms.RandomApply([transforms.ColorJitter(brightness=0.2, contrast=0.2, saturation=0.2, hue=0.1)], p=0.5), transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), ]) + + + def augment_image(self, image, num_variations=100): + # ランダムな変換を適用するための拡張設定を強化 + transformations = self.get_augment_transform() augmented_images = [] for _ in range(num_variations): augmented_image = transformations(image) augmented_images.append(augmented_image) - return augmented_images def _is_valid_file(self, file_name): From 4d8360f619a941d934731798459ccbebdfd4df11 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 17:16:51 +0900 Subject: [PATCH 345/771] =?UTF-8?q?fix:=20child=E3=81=AEusecase=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/child/child.go | 37 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index c710c129..227bd7b7 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -66,12 +66,12 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest // 子供のレコードを作成 child, err := tx.Child. Create(). - SetNurseryID(nurseryID). SetGuardianID(guardianID). SetName(req.Name). SetAge(age). SetSex(*sex). Save(ctx) + if err != nil { return nil, fmt.Errorf("failed to create child: %w", err) } @@ -143,7 +143,9 @@ func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetCh } children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { - return tx.Child.Query().Where(childRepo.HasGuardianWith(guardianRepo.IDEQ(guardianID))), nil + return tx.Child.Query(). + Where(childRepo.HasGuardianWith(guardianRepo.IDEQ(guardianID))). + WithGuardian(), nil }) if err != nil { @@ -159,8 +161,12 @@ func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChi return nil, fmt.Errorf("failed to parse nursery ID '%s': %w", req.NurseryId, err) } + // 子供と保育園の間に親を介在させるためのクエリを修正 children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { - return tx.Child.Query().Where(childRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID))), nil + // 子供のクエリを作成する際に、親を介した保育園の条件を追加 + return tx.Child.Query(). + Where(childRepo.HasGuardianWith(guardianRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID)))). + WithGuardian(), nil }) if err != nil { @@ -176,25 +182,22 @@ func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildLi return nil, fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) } - // childBusAssociationテーブルからバスIDに紐づく子供のIDを取得 - associations, err := i.entClient.ChildBusAssociation.Query().Where(childBusAssociationRepo.BusIDEQ(busID)).All(ctx) + // バスIDに紐づく子供のIDを中間テーブルを通じて取得 + children, err := i.entClient.Child.Query(). + Where(childRepo.HasChildBusAssociationsWith(childBusAssociationRepo.BusIDEQ(busID))). + WithGuardian(). + All(ctx) if err != nil { - return nil, fmt.Errorf("failed to get child associations: %w", err) + return nil, fmt.Errorf("failed to get children by bus ID: %w", err) } - var children []*pb.Child - for _, association := range associations { - child, err := i.entClient.Child.Get(ctx, association.ChildID) - if err != nil { - i.logger.Error("failed to get child details", "childID", association.ChildID, "error", err) - continue // エラーがあった場合はその子供をスキップ - } - - pbChild := utils.ToPbChild(child) - children = append(children, pbChild) + // 子供の情報をプロトコルバッファ形式に変換 + pbChildren := make([]*pb.Child, 0, len(children)) + for _, child := range children { + pbChildren = append(pbChildren, utils.ToPbChild(child)) } - return &pb.GetChildListByBusIDResponse{Children: children}, nil + return &pb.GetChildListByBusIDResponse{Children: pbChildren}, nil } // getChildList abstracts the common logic for fetching child lists. From 96b5c037fd35fecd0d451daf7f5516ab9422029d Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Fri, 16 Feb 2024 17:17:22 +0900 Subject: [PATCH 346/771] fixed bug --- machine_learning/src/face_detect_model/data/faceDetectDataset.py | 1 - 1 file changed, 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index 8077f333..1a15f0ff 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -43,7 +43,6 @@ def __init__(self, config, transform=None): def get_default_transforms(self): return transforms.Compose([ - transforms.Resize((224, 224)), transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), ]) From 57a37a61bbc4ebc23c86288966b2a8861f77b8c5 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 17:21:58 +0900 Subject: [PATCH 347/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/app.dart | 4 +- .../pages/bus_list_page/bus_list_page.dart | 80 +++++++++++++------ .../service/get_bus_list_by_nursery_id.dart | 13 +++ 3 files changed, 71 insertions(+), 26 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/service/get_bus_list_by_nursery_id.dart diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index 2e880b2b..2d3244fd 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -24,7 +24,9 @@ class _AppState extends State { ), body: [ const StudentListPage(), - const BusListPage(), + BusListPage( + nursery: widget.nursery, + ), const NotificationPage() ][_selectedIndex], bottomNavigationBar: BottomNavigationBar( diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 3f8fddac..353b8b5b 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -1,20 +1,54 @@ +import "dart:developer" as developer; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; +import 'package:where_child_bus/pages/bus_list_page/service/get_bus_list_by_nursery_id.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BusListPage extends StatefulWidget { - const BusListPage({super.key}); + final NurseryResponse nursery; + + const BusListPage({super.key, required this.nursery}); @override State createState() => _BusListPageState(); } - class _BusListPageState extends State { //TODO: 将来的には動的にデータを受け取る。そのためのメソッドが増える final items = ["バス1", "バス2", "バス3", "バス4", "バス5", "バス5", "バス5", "バス5", "バス5"]; - final busesOperatingState = [true, false, true, false, false, false, false, false, false]; + final busesOperatingState = [ + true, + false, + true, + false, + false, + false, + false, + false, + false + ]; + + List buses = []; + @override + void initState() { + super.initState(); + _loadBusList(); + } + + Future _loadBusList() async { + String nurseryId = widget.nursery.id; + List busList = await getBusList(nurseryId); + setState(() { + buses = busList; + }); + + if (kDebugMode) { + developer.log("バス:$buses"); + } + } @override Widget build(BuildContext context) { @@ -39,10 +73,9 @@ class _BusListPageState extends State { Widget addBusButton() { return FloatingActionButton( - onPressed: (){ + onPressed: () { Navigator.push( - context,MaterialPageRoute(builder: (context) => BusEditPage()) - ); + context, MaterialPageRoute(builder: (context) => BusEditPage())); }, child: const Icon(Icons.add), ); @@ -78,7 +111,9 @@ class _BusListPageState extends State { isDismissible: true, barrierColor: Colors.black.withOpacity(0.5), builder: (context) { - return BottomSheetWidget(busName: name,); + return BottomSheetWidget( + busName: name, + ); }); }, child: Row( @@ -95,20 +130,19 @@ class _BusListPageState extends State { Widget busPhoto(bool isBusOperating) { String imagePath = isBusOperating - ? "assets/images/bus_operating.png" - : "assets/images/bus_not_operating.png"; + ? "assets/images/bus_operating.png" + : "assets/images/bus_not_operating.png"; return SizedBox( - width: 100, - height: 100, - child: Padding( - padding: const EdgeInsets.all(12.0), - child: Image.asset( - imagePath, - fit:BoxFit.cover, - ), - ) - ); + width: 100, + height: 100, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Image.asset( + imagePath, + fit: BoxFit.cover, + ), + )); } Widget busName(name) { @@ -139,14 +173,10 @@ class _BusListPageState extends State { return Padding( padding: const EdgeInsets.all(10), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, //TODO:動的になる - children: [ - busName(name), - busDescription("テストの説明文") - ], + children: [busName(name), busDescription("テストの説明文")], ), ); } } - diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/service/get_bus_list_by_nursery_id.dart b/frontend/where_child_bus/lib/pages/bus_list_page/service/get_bus_list_by_nursery_id.dart new file mode 100644 index 00000000..a31988f8 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/service/get_bus_list_by_nursery_id.dart @@ -0,0 +1,13 @@ +import 'package:where_child_bus/util/api/bus.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pb.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +Future> getBusList(String nurseryId) async { + try { + GetBusListByNurseryIdResponse busListResponse = + await getBusListByNurseryId(nurseryId); + return busListResponse.buses; + } catch (error) { + return Future.error(error); + } +} From efadb6370d263fde1c8c0a159a5ce599e71dd6a6 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 18:42:24 +0900 Subject: [PATCH 348/771] =?UTF-8?q?feat:=E9=81=8B=E8=A1=8C=E7=8A=B6?= =?UTF-8?q?=E6=B3=81=E3=82=92=E5=8B=95=E7=9A=84=E3=81=AB=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_list_page.dart | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 353b8b5b..1ed6cec3 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -16,8 +16,6 @@ class BusListPage extends StatefulWidget { } class _BusListPageState extends State { - //TODO: 将来的には動的にデータを受け取る。そのためのメソッドが増える - final items = ["バス1", "バス2", "バス3", "バス4", "バス5", "バス5", "バス5", "バス5", "バス5"]; final busesOperatingState = [ true, false, @@ -84,15 +82,15 @@ class _BusListPageState extends State { Widget listViewBuilder() { return ListView.builder( //TODO: 実際にはAPIからデータを取得 - itemCount: items.length, + itemCount: buses.length, itemBuilder: (BuildContext context, int index) { - return busListCard(items[index], busesOperatingState[index]); + return busListCard(buses[index].name, buses[index].status); }, ); } //TODO: 将来的にBus型を受け取る, 将来的にモーダルにバスを渡す - Widget busListCard(String name, bool isBusOperating) { + Widget busListCard(String name, Status busStatus) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: Card( @@ -118,8 +116,8 @@ class _BusListPageState extends State { }, child: Row( children: [ - busPhoto(isBusOperating), - busNameAndDescription(name), + busPhoto(busStatus), + busNameAndDescription(name, busStatus), ], ), ), @@ -128,10 +126,13 @@ class _BusListPageState extends State { ); } - Widget busPhoto(bool isBusOperating) { - String imagePath = isBusOperating - ? "assets/images/bus_operating.png" - : "assets/images/bus_not_operating.png"; + Widget busPhoto(Status busStatus) { + late String imagePath; + if (busStatus == Status.STATUS_RUNNING) { + imagePath = "assets/images/bus_operating.png"; + } else { + imagePath = "assets/images/bus_not_operating.png"; + } return SizedBox( width: 100, @@ -156,7 +157,15 @@ class _BusListPageState extends State { ); } - Widget busDescription(String description) { + Widget busDescription(Status busStatus) { + late String description; + if (busStatus == Status.STATUS_RUNNING) { + description = "運行中"; + } else if (busStatus == Status.STATUS_MAINTEINANCE) { + description = "メンテナンス中"; + } else { + description = "停止中"; + } return Text( description, style: const TextStyle( @@ -169,13 +178,13 @@ class _BusListPageState extends State { } //TODO: 将来的には説明文も引数として受け取る - Widget busNameAndDescription(String name) { + Widget busNameAndDescription(String name, Status busStatus) { return Padding( padding: const EdgeInsets.all(10), child: Column( crossAxisAlignment: CrossAxisAlignment.start, //TODO:動的になる - children: [busName(name), busDescription("テストの説明文")], + children: [busName(name), busDescription(busStatus)], ), ); } From 7f2c87466b7545f48573f484cf52a73c35bd4433 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 16 Feb 2024 18:43:29 +0900 Subject: [PATCH 349/771] =?UTF-8?q?feat(ml):=20machine-learning=20grpc=20s?= =?UTF-8?q?erver=E3=81=AB=E5=AF=BE=E3=81=99=E3=82=8BHealth=20check?= =?UTF-8?q?=E7=94=A8=E3=81=AEproto=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.proto | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index 72c6c2b7..91d99bcb 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -3,13 +3,36 @@ syntax = "proto3"; package machine_learning.v1; service MachineLearningService { - rpc Ping(PingRequest) returns (PingResponse); + rpc Train(TrainRequest) returns (TrainResponse); + rpc Eval(EvalRequest) returns (EvalResponse); + rpc FaceDetectAndClip(FaceAndClipRequest) returns (FaceDetectAndClipResponse); } -message PingRequest { - string message = 1; +message TrainRequest { + string nursery_id = 1; + repeated string child_id = 2; + string bus_id = 3; +} + +message TrainResponse { + bool is_started = 1; +} + +message EvalRequest { + string bus_id = 1; + // TODO: add video data +} + +message EvalResponse { + repeated string child_id = 1; +} + +message FaceDetectAndClipResponse { + string nursery_id = 1; + string child_id = 2; +} + +message FaceAndClipRequest { + bool is_started = 1; } -message PingResponse { - string message = 1; -} \ No newline at end of file From fc05d5037b4071de8cb2eac3ab7ff760e2b935e6 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 16 Feb 2024 18:44:30 +0900 Subject: [PATCH 350/771] =?UTF-8?q?feat(ml):=20machine-learning=20grpc=20s?= =?UTF-8?q?erver=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E3=82=B5=E3=83=BC?= =?UTF-8?q?=E3=83=93=E3=82=B9=E3=81=AEproto=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proto/machine_learning/v1/health_check.proto | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 proto/machine_learning/v1/health_check.proto diff --git a/proto/machine_learning/v1/health_check.proto b/proto/machine_learning/v1/health_check.proto new file mode 100644 index 00000000..a8aae4c1 --- /dev/null +++ b/proto/machine_learning/v1/health_check.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package machine_learning.v1; + +service HealthcheckService { + rpc Ping(PingRequest) returns (PingResponse); +} + +message PingRequest { + string name = 1; +} + +message PingResponse { + string message = 1; +} From 5cd4e59b172f419a0b91d714931bb950f194d98c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 18:50:08 +0900 Subject: [PATCH 351/771] =?UTF-8?q?feat:=E3=83=AD=E3=83=BC=E3=83=87?= =?UTF-8?q?=E3=82=A3=E3=83=B3=E3=82=B0=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_list_page.dart | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 1ed6cec3..a93ae9ab 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -29,6 +29,7 @@ class _BusListPageState extends State { ]; List buses = []; + bool _isLoading = true; @override void initState() { @@ -39,12 +40,18 @@ class _BusListPageState extends State { Future _loadBusList() async { String nurseryId = widget.nursery.id; List busList = await getBusList(nurseryId); - setState(() { - buses = busList; - }); - - if (kDebugMode) { - developer.log("バス:$buses"); + try { + if (mounted) { + setState(() { + buses = busList; + _isLoading = false; + }); + } + } catch (e) { + if (kDebugMode) { + developer.log("バスリストのロード中にエラーが発生しました: $e"); + } + setState(() => _isLoading = false); } } @@ -57,16 +64,20 @@ class _BusListPageState extends State { } Widget pageBody() { - return Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: listViewBuilder(), + return _isLoading + ? const Center( + child: CircularProgressIndicator(), ) - ], - ), - ); + : Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: listViewBuilder(), + ) + ], + ), + ); } Widget addBusButton() { From f722885021cb921fb7ebb776f1a3a72a7096fd0b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 18:57:32 +0900 Subject: [PATCH 352/771] =?UTF-8?q?chore:=E3=82=B3=E3=83=B3=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=83=A9=E3=82=AF=E3=82=BF=E3=81=A7=E3=83=90=E3=82=B9?= =?UTF-8?q?=E5=9E=8B=E3=82=92=E6=B8=A1=E3=81=99=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 116 ++++++++++-------- .../pages/bus_list_page/bus_list_page.dart | 11 +- 2 files changed, 69 insertions(+), 58 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 3af018ae..dd3a688a 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -4,13 +4,24 @@ import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/con import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BottomSheetWidget extends StatelessWidget { - final busStations = ["station1", "station2", "station3","station4","station5","station6", "station7", "station8", "station7", "station7"]; - final String busName; + final busStations = [ + "station1", + "station2", + "station3", + "station4", + "station5", + "station6", + "station7", + "station8", + "station7", + "station7" + ]; + final Bus bus; - //将来的にはコンストラクタでバス型を受け取る - BottomSheetWidget({required this.busName}); + BottomSheetWidget({super.key, required this.bus}); @override Widget build(BuildContext context) { @@ -23,36 +34,32 @@ class BottomSheetWidget extends StatelessWidget { topRight: Radius.circular(10), ), ), - child: Stack( - children: [ - modalBody(context), - editButton(context), - ] - ), + child: Stack(children: [ + modalBody(context), + editButton(context), + ]), ); } Widget modalBody(BuildContext context) { return Center( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // titleText(), - modalHeader(busName, "test"), - StationsList(busStationsList: busStations), - ConfirmButton( - buttonText: "乗客情報", - onTap: () => moveToBusPassengerPage(context), - ), - ], - ) - ); + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // titleText(), + modalHeader(bus.name, "test"), + StationsList(busStationsList: busStations), + ConfirmButton( + buttonText: "乗客情報", + onTap: () => moveToBusPassengerPage(context), + ), + ], + )); } moveToBusPassengerPage(BuildContext context) { Navigator.push( - context,MaterialPageRoute(builder: (context) => BusPassengerPage()) - ); + context, MaterialPageRoute(builder: (context) => BusPassengerPage())); } Widget editButton(BuildContext context) { @@ -63,17 +70,17 @@ class BottomSheetWidget extends StatelessWidget { child: ElevatedButton( onPressed: () { Navigator.push( - context,MaterialPageRoute(builder: (context) => BusEditPage(busStations: busStations)) - ); + context, + MaterialPageRoute( + builder: (context) => + BusEditPage(busStations: busStations))); }, style: editButtonStyle(), - child: const Text( - "Edit", - style: TextStyle( - color: Colors.black, - fontSize: 15, - ) - ), + child: const Text("Edit", + style: TextStyle( + color: Colors.black, + fontSize: 15, + )), ), ), ); @@ -85,7 +92,7 @@ class BottomSheetWidget extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - busThumbnail(), + busThumbnail(bus.status), courseAndOperator(busCourseName, busOperatorName), ], ), @@ -98,7 +105,7 @@ class BottomSheetWidget extends StatelessWidget { itemCount: busStationsList.length, itemBuilder: (context, index) { return Padding( - padding: const EdgeInsets.fromLTRB(50, 10, 0, 0), + padding: const EdgeInsets.fromLTRB(50, 10, 0, 0), child: stationsListElement(busStationsList[index]), ); }, @@ -110,14 +117,14 @@ class BottomSheetWidget extends StatelessWidget { stationName, textAlign: TextAlign.left, style: const TextStyle( - fontSize: 18, + fontSize: 18, ), ); } Widget courseAndOperator(String courseName, String operatorName) { return Padding( - padding: const EdgeInsets.only(left:30), + padding: const EdgeInsets.only(left: 30), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -145,24 +152,29 @@ class BottomSheetWidget extends StatelessWidget { } Widget operatorNameText(String name) { - return Text( - "担当:$name", - style: const TextStyle( - color: Colors.grey, - ) - ); + return Text("担当:$name", + style: const TextStyle( + color: Colors.grey, + )); } - //TODO:本来は画像を受蹴取って表示する - Widget busThumbnail() { - return const SizedBox( + Widget busThumbnail(Status busStatus) { + late String imagePath; + if (busStatus == Status.STATUS_RUNNING) { + imagePath = "assets/images/bus_operating.png"; + } else { + imagePath = "assets/images/bus_not_operating.png"; + } + + return SizedBox( width: 100, height: 100, - child: Card( - child: Text( - "ここにサムネイル", + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Image.asset( + imagePath, + fit: BoxFit.cover, ), - ), - ); + )); } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index a93ae9ab..f32c9ea3 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -92,16 +92,15 @@ class _BusListPageState extends State { Widget listViewBuilder() { return ListView.builder( - //TODO: 実際にはAPIからデータを取得 itemCount: buses.length, itemBuilder: (BuildContext context, int index) { - return busListCard(buses[index].name, buses[index].status); + return busListCard(buses[index]); }, ); } //TODO: 将来的にBus型を受け取る, 将来的にモーダルにバスを渡す - Widget busListCard(String name, Status busStatus) { + Widget busListCard(Bus bus) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: Card( @@ -121,14 +120,14 @@ class _BusListPageState extends State { barrierColor: Colors.black.withOpacity(0.5), builder: (context) { return BottomSheetWidget( - busName: name, + bus: bus, ); }); }, child: Row( children: [ - busPhoto(busStatus), - busNameAndDescription(name, busStatus), + busPhoto(bus.status), + busNameAndDescription(bus.name, bus.status), ], ), ), From b881105dea39f49820520c04e3d4c4f5eb92f724 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 16 Feb 2024 18:59:38 +0900 Subject: [PATCH 353/771] =?UTF-8?q?fix(ml):=20Eval=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E3=81=99=E3=82=8BRequest=E3=81=A8Response=E3=81=8CStream?= =?UTF-8?q?=E3=81=AB=E3=81=AA=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proto/machine_learning/v1/machine_learning.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index 91d99bcb..52127c83 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -4,7 +4,7 @@ package machine_learning.v1; service MachineLearningService { rpc Train(TrainRequest) returns (TrainResponse); - rpc Eval(EvalRequest) returns (EvalResponse); + rpc Eval(stream EvalRequest) returns (stream EvalResponse); rpc FaceDetectAndClip(FaceAndClipRequest) returns (FaceDetectAndClipResponse); } From c510fed4f4b88d964093a3243663994a55fa7818 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 19:04:02 +0900 Subject: [PATCH 354/771] =?UTF-8?q?feat:=E3=83=AD=E3=83=BC=E3=83=89?= =?UTF-8?q?=E5=A4=B1=E6=95=97=E6=99=82=E3=81=AE=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=8F=E3=83=B3=E3=83=89=E3=83=AA=E3=83=B3=E3=82=B0=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_list_page.dart | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index f32c9ea3..02beb8b6 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -16,20 +16,9 @@ class BusListPage extends StatefulWidget { } class _BusListPageState extends State { - final busesOperatingState = [ - true, - false, - true, - false, - false, - false, - false, - false, - false - ]; - List buses = []; bool _isLoading = true; + bool _isFailLoading = false; @override void initState() { @@ -51,7 +40,7 @@ class _BusListPageState extends State { if (kDebugMode) { developer.log("バスリストのロード中にエラーが発生しました: $e"); } - setState(() => _isLoading = false); + setState(() => {_isLoading = false, _isFailLoading = true}); } } @@ -72,6 +61,7 @@ class _BusListPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ + if (_isFailLoading) loadFailText(), Expanded( child: listViewBuilder(), ) @@ -99,7 +89,6 @@ class _BusListPageState extends State { ); } - //TODO: 将来的にBus型を受け取る, 将来的にモーダルにバスを渡す Widget busListCard(Bus bus) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), @@ -187,15 +176,20 @@ class _BusListPageState extends State { ); } - //TODO: 将来的には説明文も引数として受け取る Widget busNameAndDescription(String name, Status busStatus) { return Padding( padding: const EdgeInsets.all(10), child: Column( crossAxisAlignment: CrossAxisAlignment.start, - //TODO:動的になる children: [busName(name), busDescription(busStatus)], ), ); } + + Widget loadFailText() { + return const Text( + "バスのロードに失敗しました", + style: TextStyle(color: Colors.red, fontSize: 16), + ); + } } From db8d1dcdfd529d47b0dbd0fb5bda692f36c1270e Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 19:10:19 +0900 Subject: [PATCH 355/771] =?UTF-8?q?chore:BottomSheet=E3=82=92StatefulWidge?= =?UTF-8?q?t=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index dd3a688a..8f695fce 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -6,7 +6,16 @@ import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles. import 'package:where_child_bus/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; -class BottomSheetWidget extends StatelessWidget { +class BottomSheetWidget extends StatefulWidget { + final Bus bus; + + const BottomSheetWidget({super.key, required this.bus}); + + @override + _BottomSheetWidgetState createState() => _BottomSheetWidgetState(); +} + +class _BottomSheetWidgetState extends State { final busStations = [ "station1", "station2", @@ -19,9 +28,6 @@ class BottomSheetWidget extends StatelessWidget { "station7", "station7" ]; - final Bus bus; - - BottomSheetWidget({super.key, required this.bus}); @override Widget build(BuildContext context) { @@ -47,7 +53,7 @@ class BottomSheetWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ // titleText(), - modalHeader(bus.name, "test"), + modalHeader(widget.bus.name, "test"), StationsList(busStationsList: busStations), ConfirmButton( buttonText: "乗客情報", @@ -92,7 +98,7 @@ class BottomSheetWidget extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - busThumbnail(bus.status), + busThumbnail(widget.bus.status), courseAndOperator(busCourseName, busOperatorName), ], ), From 9c1c4bf4c233f741695632ee88375ee67fcd6b4c Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 19:12:07 +0900 Subject: [PATCH 356/771] chore: buf generate --- .../go/machine_learning/v1/health_check.pb.go | 230 ++++++++++ .../v1/health_check_grpc.pb.go | 107 +++++ .../v1/machine_learning.pb.go | 420 +++++++++++++++--- .../v1/machine_learning_grpc.pb.go | 139 +++++- .../machine_learning/v1/health_check.pb.dart | 118 +++++ .../v1/health_check.pbenum.dart | 11 + .../v1/health_check.pbgrpc.dart | 59 +++ .../v1/health_check.pbjson.dart | 39 ++ .../v1/machine_learning.pb.dart | 314 +++++++++++-- .../v1/machine_learning.pbgrpc.dart | 66 ++- .../v1/machine_learning.pbjson.dart | 81 +++- .../machine_learning/v1/health_check_pb2.py | 31 ++ .../machine_learning/v1/health_check_pb2.pyi | 17 + .../v1/health_check_pb2_grpc.py | 67 +++ .../v1/machine_learning_pb2.py | 22 +- .../v1/machine_learning_pb2.pyi | 53 ++- .../v1/machine_learning_pb2_grpc.py | 92 +++- 17 files changed, 1687 insertions(+), 179 deletions(-) create mode 100644 backend/proto-gen/go/machine_learning/v1/health_check.pb.go create mode 100644 backend/proto-gen/go/machine_learning/v1/health_check_grpc.pb.go create mode 100644 frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pb.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbenum.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbgrpc.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbjson.dart create mode 100644 machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.py create mode 100644 machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.pyi create mode 100644 machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2_grpc.py diff --git a/backend/proto-gen/go/machine_learning/v1/health_check.pb.go b/backend/proto-gen/go/machine_learning/v1/health_check.pb.go new file mode 100644 index 00000000..7bc89c15 --- /dev/null +++ b/backend/proto-gen/go/machine_learning/v1/health_check.pb.go @@ -0,0 +1,230 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: machine_learning/v1/health_check.proto + +package machine_learningv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *PingRequest) Reset() { + *x = PingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_machine_learning_v1_health_check_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingRequest) ProtoMessage() {} + +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_machine_learning_v1_health_check_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_machine_learning_v1_health_check_proto_rawDescGZIP(), []int{0} +} + +func (x *PingRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type PingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *PingResponse) Reset() { + *x = PingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_machine_learning_v1_health_check_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingResponse) ProtoMessage() {} + +func (x *PingResponse) ProtoReflect() protoreflect.Message { + mi := &file_machine_learning_v1_health_check_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. +func (*PingResponse) Descriptor() ([]byte, []int) { + return file_machine_learning_v1_health_check_proto_rawDescGZIP(), []int{1} +} + +func (x *PingResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_machine_learning_v1_health_check_proto protoreflect.FileDescriptor + +var file_machine_learning_v1_health_check_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x22, 0x21, 0x0a, + 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x61, 0x0a, 0x12, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x4b, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xfe, 0x01, + 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, + 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, + 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_machine_learning_v1_health_check_proto_rawDescOnce sync.Once + file_machine_learning_v1_health_check_proto_rawDescData = file_machine_learning_v1_health_check_proto_rawDesc +) + +func file_machine_learning_v1_health_check_proto_rawDescGZIP() []byte { + file_machine_learning_v1_health_check_proto_rawDescOnce.Do(func() { + file_machine_learning_v1_health_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_machine_learning_v1_health_check_proto_rawDescData) + }) + return file_machine_learning_v1_health_check_proto_rawDescData +} + +var file_machine_learning_v1_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_machine_learning_v1_health_check_proto_goTypes = []interface{}{ + (*PingRequest)(nil), // 0: machine_learning.v1.PingRequest + (*PingResponse)(nil), // 1: machine_learning.v1.PingResponse +} +var file_machine_learning_v1_health_check_proto_depIdxs = []int32{ + 0, // 0: machine_learning.v1.HealthcheckService.Ping:input_type -> machine_learning.v1.PingRequest + 1, // 1: machine_learning.v1.HealthcheckService.Ping:output_type -> machine_learning.v1.PingResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_machine_learning_v1_health_check_proto_init() } +func file_machine_learning_v1_health_check_proto_init() { + if File_machine_learning_v1_health_check_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_machine_learning_v1_health_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_machine_learning_v1_health_check_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_machine_learning_v1_health_check_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_machine_learning_v1_health_check_proto_goTypes, + DependencyIndexes: file_machine_learning_v1_health_check_proto_depIdxs, + MessageInfos: file_machine_learning_v1_health_check_proto_msgTypes, + }.Build() + File_machine_learning_v1_health_check_proto = out.File + file_machine_learning_v1_health_check_proto_rawDesc = nil + file_machine_learning_v1_health_check_proto_goTypes = nil + file_machine_learning_v1_health_check_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/machine_learning/v1/health_check_grpc.pb.go b/backend/proto-gen/go/machine_learning/v1/health_check_grpc.pb.go new file mode 100644 index 00000000..badb00cc --- /dev/null +++ b/backend/proto-gen/go/machine_learning/v1/health_check_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: machine_learning/v1/health_check.proto + +package machine_learningv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + HealthcheckService_Ping_FullMethodName = "/machine_learning.v1.HealthcheckService/Ping" +) + +// HealthcheckServiceClient is the client API for HealthcheckService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type HealthcheckServiceClient interface { + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) +} + +type healthcheckServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHealthcheckServiceClient(cc grpc.ClientConnInterface) HealthcheckServiceClient { + return &healthcheckServiceClient{cc} +} + +func (c *healthcheckServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { + out := new(PingResponse) + err := c.cc.Invoke(ctx, HealthcheckService_Ping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HealthcheckServiceServer is the server API for HealthcheckService service. +// All implementations should embed UnimplementedHealthcheckServiceServer +// for forward compatibility +type HealthcheckServiceServer interface { + Ping(context.Context, *PingRequest) (*PingResponse, error) +} + +// UnimplementedHealthcheckServiceServer should be embedded to have forward compatible implementations. +type UnimplementedHealthcheckServiceServer struct { +} + +func (UnimplementedHealthcheckServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} + +// UnsafeHealthcheckServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HealthcheckServiceServer will +// result in compilation errors. +type UnsafeHealthcheckServiceServer interface { + mustEmbedUnimplementedHealthcheckServiceServer() +} + +func RegisterHealthcheckServiceServer(s grpc.ServiceRegistrar, srv HealthcheckServiceServer) { + s.RegisterService(&HealthcheckService_ServiceDesc, srv) +} + +func _HealthcheckService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealthcheckServiceServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HealthcheckService_Ping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealthcheckServiceServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// HealthcheckService_ServiceDesc is the grpc.ServiceDesc for HealthcheckService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HealthcheckService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "machine_learning.v1.HealthcheckService", + HandlerType: (*HealthcheckServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Ping", + Handler: _HealthcheckService_Ping_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "machine_learning/v1/health_check.proto", +} diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index b7715be2..38b08767 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -20,16 +20,18 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type PingRequest struct { +type TrainRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + ChildId []string `protobuf:"bytes,2,rep,name=child_id,json=childId,proto3" json:"child_id,omitempty"` + BusId string `protobuf:"bytes,3,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` } -func (x *PingRequest) Reset() { - *x = PingRequest{} +func (x *TrainRequest) Reset() { + *x = TrainRequest{} if protoimpl.UnsafeEnabled { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -37,13 +39,13 @@ func (x *PingRequest) Reset() { } } -func (x *PingRequest) String() string { +func (x *TrainRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PingRequest) ProtoMessage() {} +func (*TrainRequest) ProtoMessage() {} -func (x *PingRequest) ProtoReflect() protoreflect.Message { +func (x *TrainRequest) ProtoReflect() protoreflect.Message { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -55,28 +57,42 @@ func (x *PingRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. -func (*PingRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use TrainRequest.ProtoReflect.Descriptor instead. +func (*TrainRequest) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{0} } -func (x *PingRequest) GetMessage() string { +func (x *TrainRequest) GetNurseryId() string { if x != nil { - return x.Message + return x.NurseryId } return "" } -type PingResponse struct { +func (x *TrainRequest) GetChildId() []string { + if x != nil { + return x.ChildId + } + return nil +} + +func (x *TrainRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +type TrainResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + IsStarted bool `protobuf:"varint,1,opt,name=is_started,json=isStarted,proto3" json:"is_started,omitempty"` } -func (x *PingResponse) Reset() { - *x = PingResponse{} +func (x *TrainResponse) Reset() { + *x = TrainResponse{} if protoimpl.UnsafeEnabled { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -84,13 +100,13 @@ func (x *PingResponse) Reset() { } } -func (x *PingResponse) String() string { +func (x *TrainResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PingResponse) ProtoMessage() {} +func (*TrainResponse) ProtoMessage() {} -func (x *PingResponse) ProtoReflect() protoreflect.Message { +func (x *TrainResponse) ProtoReflect() protoreflect.Message { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -102,18 +118,214 @@ func (x *PingResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. -func (*PingResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use TrainResponse.ProtoReflect.Descriptor instead. +func (*TrainResponse) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{1} } -func (x *PingResponse) GetMessage() string { +func (x *TrainResponse) GetIsStarted() bool { + if x != nil { + return x.IsStarted + } + return false +} + +type EvalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` // TODO: add video data +} + +func (x *EvalRequest) Reset() { + *x = EvalRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvalRequest) ProtoMessage() {} + +func (x *EvalRequest) ProtoReflect() protoreflect.Message { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvalRequest.ProtoReflect.Descriptor instead. +func (*EvalRequest) Descriptor() ([]byte, []int) { + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{2} +} + +func (x *EvalRequest) GetBusId() string { if x != nil { - return x.Message + return x.BusId } return "" } +type EvalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChildId []string `protobuf:"bytes,1,rep,name=child_id,json=childId,proto3" json:"child_id,omitempty"` +} + +func (x *EvalResponse) Reset() { + *x = EvalResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvalResponse) ProtoMessage() {} + +func (x *EvalResponse) ProtoReflect() protoreflect.Message { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvalResponse.ProtoReflect.Descriptor instead. +func (*EvalResponse) Descriptor() ([]byte, []int) { + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{3} +} + +func (x *EvalResponse) GetChildId() []string { + if x != nil { + return x.ChildId + } + return nil +} + +type FaceDetectAndClipResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` +} + +func (x *FaceDetectAndClipResponse) Reset() { + *x = FaceDetectAndClipResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FaceDetectAndClipResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FaceDetectAndClipResponse) ProtoMessage() {} + +func (x *FaceDetectAndClipResponse) ProtoReflect() protoreflect.Message { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FaceDetectAndClipResponse.ProtoReflect.Descriptor instead. +func (*FaceDetectAndClipResponse) Descriptor() ([]byte, []int) { + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{4} +} + +func (x *FaceDetectAndClipResponse) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +func (x *FaceDetectAndClipResponse) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +type FaceAndClipRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsStarted bool `protobuf:"varint,1,opt,name=is_started,json=isStarted,proto3" json:"is_started,omitempty"` +} + +func (x *FaceAndClipRequest) Reset() { + *x = FaceAndClipRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FaceAndClipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FaceAndClipRequest) ProtoMessage() {} + +func (x *FaceAndClipRequest) ProtoReflect() protoreflect.Message { + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FaceAndClipRequest.ProtoReflect.Descriptor instead. +func (*FaceAndClipRequest) Descriptor() ([]byte, []int) { + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{5} +} + +func (x *FaceAndClipRequest) GetIsStarted() bool { + if x != nil { + return x.IsStarted + } + return false +} + var File_machine_learning_v1_machine_learning_proto protoreflect.FileDescriptor var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ @@ -121,35 +333,65 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x22, 0x27, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x32, 0x65, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, - 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, - 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, - 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, - 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, - 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, - 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x22, 0x5f, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, + 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x64, 0x22, 0x24, 0x0a, 0x0b, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0c, 0x45, 0x76, 0x61, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x49, 0x64, 0x22, 0x55, 0x0a, 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x12, 0x46, 0x61, + 0x63, 0x65, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x32, + 0xa7, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x05, 0x54, 0x72, + 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x45, 0x76, + 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, + 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6c, 0x0a, 0x11, 0x46, + 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, + 0x12, 0x27, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x41, 0x6e, 0x64, 0x43, 0x6c, + 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, + 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, + 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, + 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -164,16 +406,24 @@ func file_machine_learning_v1_machine_learning_proto_rawDescGZIP() []byte { return file_machine_learning_v1_machine_learning_proto_rawDescData } -var file_machine_learning_v1_machine_learning_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_machine_learning_v1_machine_learning_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ - (*PingRequest)(nil), // 0: machine_learning.v1.PingRequest - (*PingResponse)(nil), // 1: machine_learning.v1.PingResponse + (*TrainRequest)(nil), // 0: machine_learning.v1.TrainRequest + (*TrainResponse)(nil), // 1: machine_learning.v1.TrainResponse + (*EvalRequest)(nil), // 2: machine_learning.v1.EvalRequest + (*EvalResponse)(nil), // 3: machine_learning.v1.EvalResponse + (*FaceDetectAndClipResponse)(nil), // 4: machine_learning.v1.FaceDetectAndClipResponse + (*FaceAndClipRequest)(nil), // 5: machine_learning.v1.FaceAndClipRequest } var file_machine_learning_v1_machine_learning_proto_depIdxs = []int32{ - 0, // 0: machine_learning.v1.MachineLearningService.Ping:input_type -> machine_learning.v1.PingRequest - 1, // 1: machine_learning.v1.MachineLearningService.Ping:output_type -> machine_learning.v1.PingResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type + 0, // 0: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest + 2, // 1: machine_learning.v1.MachineLearningService.Eval:input_type -> machine_learning.v1.EvalRequest + 5, // 2: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceAndClipRequest + 1, // 3: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse + 3, // 4: machine_learning.v1.MachineLearningService.Eval:output_type -> machine_learning.v1.EvalResponse + 4, // 5: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -186,7 +436,7 @@ func file_machine_learning_v1_machine_learning_proto_init() { } if !protoimpl.UnsafeEnabled { file_machine_learning_v1_machine_learning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest); i { + switch v := v.(*TrainRequest); i { case 0: return &v.state case 1: @@ -198,7 +448,55 @@ func file_machine_learning_v1_machine_learning_proto_init() { } } file_machine_learning_v1_machine_learning_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingResponse); i { + switch v := v.(*TrainResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_machine_learning_v1_machine_learning_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvalRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_machine_learning_v1_machine_learning_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvalResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_machine_learning_v1_machine_learning_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FaceDetectAndClipResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_machine_learning_v1_machine_learning_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FaceAndClipRequest); i { case 0: return &v.state case 1: @@ -216,7 +514,7 @@ func file_machine_learning_v1_machine_learning_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_machine_learning_v1_machine_learning_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go index 6c6799d2..0d116da6 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go @@ -19,14 +19,18 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - MachineLearningService_Ping_FullMethodName = "/machine_learning.v1.MachineLearningService/Ping" + MachineLearningService_Train_FullMethodName = "/machine_learning.v1.MachineLearningService/Train" + MachineLearningService_Eval_FullMethodName = "/machine_learning.v1.MachineLearningService/Eval" + MachineLearningService_FaceDetectAndClip_FullMethodName = "/machine_learning.v1.MachineLearningService/FaceDetectAndClip" ) // MachineLearningServiceClient is the client API for MachineLearningService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MachineLearningServiceClient interface { - Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) + Train(ctx context.Context, in *TrainRequest, opts ...grpc.CallOption) (*TrainResponse, error) + Eval(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_EvalClient, error) + FaceDetectAndClip(ctx context.Context, in *FaceAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) } type machineLearningServiceClient struct { @@ -37,9 +41,49 @@ func NewMachineLearningServiceClient(cc grpc.ClientConnInterface) MachineLearnin return &machineLearningServiceClient{cc} } -func (c *machineLearningServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { - out := new(PingResponse) - err := c.cc.Invoke(ctx, MachineLearningService_Ping_FullMethodName, in, out, opts...) +func (c *machineLearningServiceClient) Train(ctx context.Context, in *TrainRequest, opts ...grpc.CallOption) (*TrainResponse, error) { + out := new(TrainResponse) + err := c.cc.Invoke(ctx, MachineLearningService_Train_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *machineLearningServiceClient) Eval(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_EvalClient, error) { + stream, err := c.cc.NewStream(ctx, &MachineLearningService_ServiceDesc.Streams[0], MachineLearningService_Eval_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &machineLearningServiceEvalClient{stream} + return x, nil +} + +type MachineLearningService_EvalClient interface { + Send(*EvalRequest) error + Recv() (*EvalResponse, error) + grpc.ClientStream +} + +type machineLearningServiceEvalClient struct { + grpc.ClientStream +} + +func (x *machineLearningServiceEvalClient) Send(m *EvalRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *machineLearningServiceEvalClient) Recv() (*EvalResponse, error) { + m := new(EvalResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, in *FaceAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) { + out := new(FaceDetectAndClipResponse) + err := c.cc.Invoke(ctx, MachineLearningService_FaceDetectAndClip_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -50,15 +94,23 @@ func (c *machineLearningServiceClient) Ping(ctx context.Context, in *PingRequest // All implementations should embed UnimplementedMachineLearningServiceServer // for forward compatibility type MachineLearningServiceServer interface { - Ping(context.Context, *PingRequest) (*PingResponse, error) + Train(context.Context, *TrainRequest) (*TrainResponse, error) + Eval(MachineLearningService_EvalServer) error + FaceDetectAndClip(context.Context, *FaceAndClipRequest) (*FaceDetectAndClipResponse, error) } // UnimplementedMachineLearningServiceServer should be embedded to have forward compatible implementations. type UnimplementedMachineLearningServiceServer struct { } -func (UnimplementedMachineLearningServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +func (UnimplementedMachineLearningServiceServer) Train(context.Context, *TrainRequest) (*TrainResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Train not implemented") +} +func (UnimplementedMachineLearningServiceServer) Eval(MachineLearningService_EvalServer) error { + return status.Errorf(codes.Unimplemented, "method Eval not implemented") +} +func (UnimplementedMachineLearningServiceServer) FaceDetectAndClip(context.Context, *FaceAndClipRequest) (*FaceDetectAndClipResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FaceDetectAndClip not implemented") } // UnsafeMachineLearningServiceServer may be embedded to opt out of forward compatibility for this service. @@ -72,20 +124,64 @@ func RegisterMachineLearningServiceServer(s grpc.ServiceRegistrar, srv MachineLe s.RegisterService(&MachineLearningService_ServiceDesc, srv) } -func _MachineLearningService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PingRequest) +func _MachineLearningService_Train_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TrainRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MachineLearningServiceServer).Ping(ctx, in) + return srv.(MachineLearningServiceServer).Train(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: MachineLearningService_Ping_FullMethodName, + FullMethod: MachineLearningService_Train_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MachineLearningServiceServer).Ping(ctx, req.(*PingRequest)) + return srv.(MachineLearningServiceServer).Train(ctx, req.(*TrainRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MachineLearningService_Eval_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(MachineLearningServiceServer).Eval(&machineLearningServiceEvalServer{stream}) +} + +type MachineLearningService_EvalServer interface { + Send(*EvalResponse) error + Recv() (*EvalRequest, error) + grpc.ServerStream +} + +type machineLearningServiceEvalServer struct { + grpc.ServerStream +} + +func (x *machineLearningServiceEvalServer) Send(m *EvalResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *machineLearningServiceEvalServer) Recv() (*EvalRequest, error) { + m := new(EvalRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _MachineLearningService_FaceDetectAndClip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FaceAndClipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MachineLearningServiceServer).FaceDetectAndClip(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MachineLearningService_FaceDetectAndClip_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MachineLearningServiceServer).FaceDetectAndClip(ctx, req.(*FaceAndClipRequest)) } return interceptor(ctx, in, info, handler) } @@ -98,10 +194,21 @@ var MachineLearningService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*MachineLearningServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Ping", - Handler: _MachineLearningService_Ping_Handler, + MethodName: "Train", + Handler: _MachineLearningService_Train_Handler, + }, + { + MethodName: "FaceDetectAndClip", + Handler: _MachineLearningService_FaceDetectAndClip_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Eval", + Handler: _MachineLearningService_Eval_Handler, + ServerStreams: true, + ClientStreams: true, }, }, - Streams: []grpc.StreamDesc{}, Metadata: "machine_learning/v1/machine_learning.proto", } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pb.dart new file mode 100644 index 00000000..a00a2fc7 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pb.dart @@ -0,0 +1,118 @@ +// +// Generated code. Do not modify. +// source: machine_learning/v1/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class PingRequest extends $pb.GeneratedMessage { + factory PingRequest({ + $core.String? name, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + return $result; + } + PingRequest._() : super(); + factory PingRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PingRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PingRequest clone() => PingRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PingRequest copyWith(void Function(PingRequest) updates) => super.copyWith((message) => updates(message as PingRequest)) as PingRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PingRequest create() => PingRequest._(); + PingRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PingRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PingRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); +} + +class PingResponse extends $pb.GeneratedMessage { + factory PingResponse({ + $core.String? message, + }) { + final $result = create(); + if (message != null) { + $result.message = message; + } + return $result; + } + PingResponse._() : super(); + factory PingResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PingResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'message') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PingResponse clone() => PingResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PingResponse copyWith(void Function(PingResponse) updates) => super.copyWith((message) => updates(message as PingResponse)) as PingResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PingResponse create() => PingResponse._(); + PingResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PingResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PingResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get message => $_getSZ(0); + @$pb.TagNumber(1) + set message($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasMessage() => $_has(0); + @$pb.TagNumber(1) + void clearMessage() => clearField(1); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbenum.dart new file mode 100644 index 00000000..e066cff3 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: machine_learning/v1/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbgrpc.dart new file mode 100644 index 00000000..ca5c3ca6 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbgrpc.dart @@ -0,0 +1,59 @@ +// +// Generated code. Do not modify. +// source: machine_learning/v1/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'health_check.pb.dart' as $0; + +export 'health_check.pb.dart'; + +@$pb.GrpcServiceName('machine_learning.v1.HealthcheckService') +class HealthcheckServiceClient extends $grpc.Client { + static final _$ping = $grpc.ClientMethod<$0.PingRequest, $0.PingResponse>( + '/machine_learning.v1.HealthcheckService/Ping', + ($0.PingRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.PingResponse.fromBuffer(value)); + + HealthcheckServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$0.PingResponse> ping($0.PingRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$ping, request, options: options); + } +} + +@$pb.GrpcServiceName('machine_learning.v1.HealthcheckService') +abstract class HealthcheckServiceBase extends $grpc.Service { + $core.String get $name => 'machine_learning.v1.HealthcheckService'; + + HealthcheckServiceBase() { + $addMethod($grpc.ServiceMethod<$0.PingRequest, $0.PingResponse>( + 'Ping', + ping_Pre, + false, + false, + ($core.List<$core.int> value) => $0.PingRequest.fromBuffer(value), + ($0.PingResponse value) => value.writeToBuffer())); + } + + $async.Future<$0.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$0.PingRequest> request) async { + return ping(call, await request); + } + + $async.Future<$0.PingResponse> ping($grpc.ServiceCall call, $0.PingRequest request); +} diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbjson.dart new file mode 100644 index 00000000..8be154bc --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/health_check.pbjson.dart @@ -0,0 +1,39 @@ +// +// Generated code. Do not modify. +// source: machine_learning/v1/health_check.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use pingRequestDescriptor instead') +const PingRequest$json = { + '1': 'PingRequest', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + ], +}; + +/// Descriptor for `PingRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List pingRequestDescriptor = $convert.base64Decode( + 'CgtQaW5nUmVxdWVzdBISCgRuYW1lGAEgASgJUgRuYW1l'); + +@$core.Deprecated('Use pingResponseDescriptor instead') +const PingResponse$json = { + '1': 'PingResponse', + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + ], +}; + +/// Descriptor for `PingResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( + 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); + diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index b84ba5d1..8159f4df 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -13,22 +13,94 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -class PingRequest extends $pb.GeneratedMessage { - factory PingRequest({ - $core.String? message, +class TrainRequest extends $pb.GeneratedMessage { + factory TrainRequest({ + $core.String? nurseryId, + $core.Iterable<$core.String>? childId, + $core.String? busId, }) { final $result = create(); - if (message != null) { - $result.message = message; + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (childId != null) { + $result.childId.addAll(childId); + } + if (busId != null) { + $result.busId = busId; + } + return $result; + } + TrainRequest._() : super(); + factory TrainRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TrainRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TrainRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'nurseryId') + ..pPS(2, _omitFieldNames ? '' : 'childId') + ..aOS(3, _omitFieldNames ? '' : 'busId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + TrainRequest clone() => TrainRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + TrainRequest copyWith(void Function(TrainRequest) updates) => super.copyWith((message) => updates(message as TrainRequest)) as TrainRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TrainRequest create() => TrainRequest._(); + TrainRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static TrainRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TrainRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get nurseryId => $_getSZ(0); + @$pb.TagNumber(1) + set nurseryId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNurseryId() => $_has(0); + @$pb.TagNumber(1) + void clearNurseryId() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.String> get childId => $_getList(1); + + @$pb.TagNumber(3) + $core.String get busId => $_getSZ(2); + @$pb.TagNumber(3) + set busId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasBusId() => $_has(2); + @$pb.TagNumber(3) + void clearBusId() => clearField(3); +} + +class TrainResponse extends $pb.GeneratedMessage { + factory TrainResponse({ + $core.bool? isStarted, + }) { + final $result = create(); + if (isStarted != null) { + $result.isStarted = isStarted; } return $result; } - PingRequest._() : super(); - factory PingRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PingRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + TrainResponse._() : super(); + factory TrainResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TrainResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'message') + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TrainResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'isStarted') ..hasRequiredFields = false ; @@ -36,49 +108,207 @@ class PingRequest extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - PingRequest clone() => PingRequest()..mergeFromMessage(this); + TrainResponse clone() => TrainResponse()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - PingRequest copyWith(void Function(PingRequest) updates) => super.copyWith((message) => updates(message as PingRequest)) as PingRequest; + TrainResponse copyWith(void Function(TrainResponse) updates) => super.copyWith((message) => updates(message as TrainResponse)) as TrainResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static PingRequest create() => PingRequest._(); - PingRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static TrainResponse create() => TrainResponse._(); + TrainResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static PingRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PingRequest? _defaultInstance; + static TrainResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TrainResponse? _defaultInstance; @$pb.TagNumber(1) - $core.String get message => $_getSZ(0); + $core.bool get isStarted => $_getBF(0); + @$pb.TagNumber(1) + set isStarted($core.bool v) { $_setBool(0, v); } @$pb.TagNumber(1) - set message($core.String v) { $_setString(0, v); } + $core.bool hasIsStarted() => $_has(0); + @$pb.TagNumber(1) + void clearIsStarted() => clearField(1); +} + +class EvalRequest extends $pb.GeneratedMessage { + factory EvalRequest({ + $core.String? busId, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + return $result; + } + EvalRequest._() : super(); + factory EvalRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EvalRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EvalRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EvalRequest clone() => EvalRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EvalRequest copyWith(void Function(EvalRequest) updates) => super.copyWith((message) => updates(message as EvalRequest)) as EvalRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EvalRequest create() => EvalRequest._(); + EvalRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EvalRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EvalRequest? _defaultInstance; + @$pb.TagNumber(1) - $core.bool hasMessage() => $_has(0); + $core.String get busId => $_getSZ(0); @$pb.TagNumber(1) - void clearMessage() => clearField(1); + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); +} + +class EvalResponse extends $pb.GeneratedMessage { + factory EvalResponse({ + $core.Iterable<$core.String>? childId, + }) { + final $result = create(); + if (childId != null) { + $result.childId.addAll(childId); + } + return $result; + } + EvalResponse._() : super(); + factory EvalResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EvalResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EvalResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'childId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EvalResponse clone() => EvalResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EvalResponse copyWith(void Function(EvalResponse) updates) => super.copyWith((message) => updates(message as EvalResponse)) as EvalResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EvalResponse create() => EvalResponse._(); + EvalResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EvalResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EvalResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.String> get childId => $_getList(0); +} + +class FaceDetectAndClipResponse extends $pb.GeneratedMessage { + factory FaceDetectAndClipResponse({ + $core.String? nurseryId, + $core.String? childId, + }) { + final $result = create(); + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + if (childId != null) { + $result.childId = childId; + } + return $result; + } + FaceDetectAndClipResponse._() : super(); + factory FaceDetectAndClipResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FaceDetectAndClipResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FaceDetectAndClipResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'nurseryId') + ..aOS(2, _omitFieldNames ? '' : 'childId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FaceDetectAndClipResponse clone() => FaceDetectAndClipResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FaceDetectAndClipResponse copyWith(void Function(FaceDetectAndClipResponse) updates) => super.copyWith((message) => updates(message as FaceDetectAndClipResponse)) as FaceDetectAndClipResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FaceDetectAndClipResponse create() => FaceDetectAndClipResponse._(); + FaceDetectAndClipResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FaceDetectAndClipResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FaceDetectAndClipResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get nurseryId => $_getSZ(0); + @$pb.TagNumber(1) + set nurseryId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNurseryId() => $_has(0); + @$pb.TagNumber(1) + void clearNurseryId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get childId => $_getSZ(1); + @$pb.TagNumber(2) + set childId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasChildId() => $_has(1); + @$pb.TagNumber(2) + void clearChildId() => clearField(2); } -class PingResponse extends $pb.GeneratedMessage { - factory PingResponse({ - $core.String? message, +class FaceAndClipRequest extends $pb.GeneratedMessage { + factory FaceAndClipRequest({ + $core.bool? isStarted, }) { final $result = create(); - if (message != null) { - $result.message = message; + if (isStarted != null) { + $result.isStarted = isStarted; } return $result; } - PingResponse._() : super(); - factory PingResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PingResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + FaceAndClipRequest._() : super(); + factory FaceAndClipRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FaceAndClipRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PingResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'message') + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FaceAndClipRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'isStarted') ..hasRequiredFields = false ; @@ -86,31 +316,31 @@ class PingResponse extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - PingResponse clone() => PingResponse()..mergeFromMessage(this); + FaceAndClipRequest clone() => FaceAndClipRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - PingResponse copyWith(void Function(PingResponse) updates) => super.copyWith((message) => updates(message as PingResponse)) as PingResponse; + FaceAndClipRequest copyWith(void Function(FaceAndClipRequest) updates) => super.copyWith((message) => updates(message as FaceAndClipRequest)) as FaceAndClipRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static PingResponse create() => PingResponse._(); - PingResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static FaceAndClipRequest create() => FaceAndClipRequest._(); + FaceAndClipRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static PingResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PingResponse? _defaultInstance; + static FaceAndClipRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FaceAndClipRequest? _defaultInstance; @$pb.TagNumber(1) - $core.String get message => $_getSZ(0); + $core.bool get isStarted => $_getBF(0); @$pb.TagNumber(1) - set message($core.String v) { $_setString(0, v); } + set isStarted($core.bool v) { $_setBool(0, v); } @$pb.TagNumber(1) - $core.bool hasMessage() => $_has(0); + $core.bool hasIsStarted() => $_has(0); @$pb.TagNumber(1) - void clearMessage() => clearField(1); + void clearIsStarted() => clearField(1); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart index 0ff0e48d..f52bf846 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart @@ -15,16 +15,24 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'machine_learning.pb.dart' as $0; +import 'machine_learning.pb.dart' as $1; export 'machine_learning.pb.dart'; @$pb.GrpcServiceName('machine_learning.v1.MachineLearningService') class MachineLearningServiceClient extends $grpc.Client { - static final _$ping = $grpc.ClientMethod<$0.PingRequest, $0.PingResponse>( - '/machine_learning.v1.MachineLearningService/Ping', - ($0.PingRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $0.PingResponse.fromBuffer(value)); + static final _$train = $grpc.ClientMethod<$1.TrainRequest, $1.TrainResponse>( + '/machine_learning.v1.MachineLearningService/Train', + ($1.TrainRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.TrainResponse.fromBuffer(value)); + static final _$eval = $grpc.ClientMethod<$1.EvalRequest, $1.EvalResponse>( + '/machine_learning.v1.MachineLearningService/Eval', + ($1.EvalRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.EvalResponse.fromBuffer(value)); + static final _$faceDetectAndClip = $grpc.ClientMethod<$1.FaceAndClipRequest, $1.FaceDetectAndClipResponse>( + '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', + ($1.FaceAndClipRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.FaceDetectAndClipResponse.fromBuffer(value)); MachineLearningServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -32,8 +40,16 @@ class MachineLearningServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$0.PingResponse> ping($0.PingRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$ping, request, options: options); + $grpc.ResponseFuture<$1.TrainResponse> train($1.TrainRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$train, request, options: options); + } + + $grpc.ResponseStream<$1.EvalResponse> eval($async.Stream<$1.EvalRequest> request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$eval, request, options: options); + } + + $grpc.ResponseFuture<$1.FaceDetectAndClipResponse> faceDetectAndClip($1.FaceAndClipRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$faceDetectAndClip, request, options: options); } } @@ -42,18 +58,38 @@ abstract class MachineLearningServiceBase extends $grpc.Service { $core.String get $name => 'machine_learning.v1.MachineLearningService'; MachineLearningServiceBase() { - $addMethod($grpc.ServiceMethod<$0.PingRequest, $0.PingResponse>( - 'Ping', - ping_Pre, + $addMethod($grpc.ServiceMethod<$1.TrainRequest, $1.TrainResponse>( + 'Train', + train_Pre, false, false, - ($core.List<$core.int> value) => $0.PingRequest.fromBuffer(value), - ($0.PingResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $1.TrainRequest.fromBuffer(value), + ($1.TrainResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.EvalRequest, $1.EvalResponse>( + 'Eval', + eval, + true, + true, + ($core.List<$core.int> value) => $1.EvalRequest.fromBuffer(value), + ($1.EvalResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.FaceAndClipRequest, $1.FaceDetectAndClipResponse>( + 'FaceDetectAndClip', + faceDetectAndClip_Pre, + false, + false, + ($core.List<$core.int> value) => $1.FaceAndClipRequest.fromBuffer(value), + ($1.FaceDetectAndClipResponse value) => value.writeToBuffer())); + } + + $async.Future<$1.TrainResponse> train_Pre($grpc.ServiceCall call, $async.Future<$1.TrainRequest> request) async { + return train(call, await request); } - $async.Future<$0.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$0.PingRequest> request) async { - return ping(call, await request); + $async.Future<$1.FaceDetectAndClipResponse> faceDetectAndClip_Pre($grpc.ServiceCall call, $async.Future<$1.FaceAndClipRequest> request) async { + return faceDetectAndClip(call, await request); } - $async.Future<$0.PingResponse> ping($grpc.ServiceCall call, $0.PingRequest request); + $async.Future<$1.TrainResponse> train($grpc.ServiceCall call, $1.TrainRequest request); + $async.Stream<$1.EvalResponse> eval($grpc.ServiceCall call, $async.Stream<$1.EvalRequest> request); + $async.Future<$1.FaceDetectAndClipResponse> faceDetectAndClip($grpc.ServiceCall call, $1.FaceAndClipRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index 808072d0..9e78cf3e 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -13,27 +13,80 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use pingRequestDescriptor instead') -const PingRequest$json = { - '1': 'PingRequest', +@$core.Deprecated('Use trainRequestDescriptor instead') +const TrainRequest$json = { + '1': 'TrainRequest', '2': [ - {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'child_id', '3': 2, '4': 3, '5': 9, '10': 'childId'}, + {'1': 'bus_id', '3': 3, '4': 1, '5': 9, '10': 'busId'}, ], }; -/// Descriptor for `PingRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List pingRequestDescriptor = $convert.base64Decode( - 'CgtQaW5nUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdl'); +/// Descriptor for `TrainRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List trainRequestDescriptor = $convert.base64Decode( + 'CgxUcmFpblJlcXVlc3QSHQoKbnVyc2VyeV9pZBgBIAEoCVIJbnVyc2VyeUlkEhkKCGNoaWxkX2' + 'lkGAIgAygJUgdjaGlsZElkEhUKBmJ1c19pZBgDIAEoCVIFYnVzSWQ='); -@$core.Deprecated('Use pingResponseDescriptor instead') -const PingResponse$json = { - '1': 'PingResponse', +@$core.Deprecated('Use trainResponseDescriptor instead') +const TrainResponse$json = { + '1': 'TrainResponse', '2': [ - {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + {'1': 'is_started', '3': 1, '4': 1, '5': 8, '10': 'isStarted'}, ], }; -/// Descriptor for `PingResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List pingResponseDescriptor = $convert.base64Decode( - 'CgxQaW5nUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); +/// Descriptor for `TrainResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List trainResponseDescriptor = $convert.base64Decode( + 'Cg1UcmFpblJlc3BvbnNlEh0KCmlzX3N0YXJ0ZWQYASABKAhSCWlzU3RhcnRlZA=='); + +@$core.Deprecated('Use evalRequestDescriptor instead') +const EvalRequest$json = { + '1': 'EvalRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + ], +}; + +/// Descriptor for `EvalRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List evalRequestDescriptor = $convert.base64Decode( + 'CgtFdmFsUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lk'); + +@$core.Deprecated('Use evalResponseDescriptor instead') +const EvalResponse$json = { + '1': 'EvalResponse', + '2': [ + {'1': 'child_id', '3': 1, '4': 3, '5': 9, '10': 'childId'}, + ], +}; + +/// Descriptor for `EvalResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List evalResponseDescriptor = $convert.base64Decode( + 'CgxFdmFsUmVzcG9uc2USGQoIY2hpbGRfaWQYASADKAlSB2NoaWxkSWQ='); + +@$core.Deprecated('Use faceDetectAndClipResponseDescriptor instead') +const FaceDetectAndClipResponse$json = { + '1': 'FaceDetectAndClipResponse', + '2': [ + {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, + ], +}; + +/// Descriptor for `FaceDetectAndClipResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List faceDetectAndClipResponseDescriptor = $convert.base64Decode( + 'ChlGYWNlRGV0ZWN0QW5kQ2xpcFJlc3BvbnNlEh0KCm51cnNlcnlfaWQYASABKAlSCW51cnNlcn' + 'lJZBIZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZA=='); + +@$core.Deprecated('Use faceAndClipRequestDescriptor instead') +const FaceAndClipRequest$json = { + '1': 'FaceAndClipRequest', + '2': [ + {'1': 'is_started', '3': 1, '4': 1, '5': 8, '10': 'isStarted'}, + ], +}; + +/// Descriptor for `FaceAndClipRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List faceAndClipRequestDescriptor = $convert.base64Decode( + 'ChJGYWNlQW5kQ2xpcFJlcXVlc3QSHQoKaXNfc3RhcnRlZBgBIAEoCFIJaXNTdGFydGVk'); diff --git a/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.py b/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.py new file mode 100644 index 00000000..a6997700 --- /dev/null +++ b/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: machine_learning/v1/health_check.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&machine_learning/v1/health_check.proto\x12\x13machine_learning.v1\"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2a\n\x12HealthcheckService\x12K\n\x04Ping\x12 .machine_learning.v1.PingRequest\x1a!.machine_learning.v1.PingResponseB\xfe\x01\n\x17\x63om.machine_learning.v1B\x10HealthCheckProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'machine_learning.v1.health_check_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\020HealthCheckProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' + _globals['_PINGREQUEST']._serialized_start=63 + _globals['_PINGREQUEST']._serialized_end=96 + _globals['_PINGRESPONSE']._serialized_start=98 + _globals['_PINGRESPONSE']._serialized_end=138 + _globals['_HEALTHCHECKSERVICE']._serialized_start=140 + _globals['_HEALTHCHECKSERVICE']._serialized_end=237 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.pyi b/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.pyi new file mode 100644 index 00000000..fb2e805c --- /dev/null +++ b/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.pyi @@ -0,0 +1,17 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class PingRequest(_message.Message): + __slots__ = ("name",) + NAME_FIELD_NUMBER: _ClassVar[int] + name: str + def __init__(self, name: _Optional[str] = ...) -> None: ... + +class PingResponse(_message.Message): + __slots__ = ("message",) + MESSAGE_FIELD_NUMBER: _ClassVar[int] + message: str + def __init__(self, message: _Optional[str] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2_grpc.py new file mode 100644 index 00000000..6b58704d --- /dev/null +++ b/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2_grpc.py @@ -0,0 +1,67 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import grpc.experimental + +import health_check_pb2 as machine__learning_dot_v1_dot_health__check__pb2 + + +class HealthcheckServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Ping = channel.unary_unary( + '/machine_learning.v1.HealthcheckService/Ping', + request_serializer=machine__learning_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_health__check__pb2.PingResponse.FromString, + ) + + +class HealthcheckServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Ping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_HealthcheckServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Ping': grpc.unary_unary_rpc_method_handler( + servicer.Ping, + request_deserializer=machine__learning_dot_v1_dot_health__check__pb2.PingRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_health__check__pb2.PingResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'machine_learning.v1.HealthcheckService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class HealthcheckService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Ping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.HealthcheckService/Ping', + machine__learning_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, + machine__learning_dot_v1_dot_health__check__pb2.PingResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py index 838ce743..f3975123 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"\'\n\x0bPingRequest\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2e\n\x16MachineLearningService\x12K\n\x04Ping\x12 .machine_learning.v1.PingRequest\x1a!.machine_learning.v1.PingResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"_\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x03(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"$\n\x0b\x45valRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\")\n\x0c\x45valResponse\x12\x19\n\x08\x63hild_id\x18\x01 \x03(\tR\x07\x63hildId\"U\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\"3\n\x12\x46\x61\x63\x65\x41ndClipRequest\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xa7\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04\x45val\x12 .machine_learning.v1.EvalRequest\x1a!.machine_learning.v1.EvalResponse(\x01\x30\x01\x12l\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12\'.machine_learning.v1.FaceAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -22,10 +22,18 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' - _globals['_PINGREQUEST']._serialized_start=67 - _globals['_PINGREQUEST']._serialized_end=106 - _globals['_PINGRESPONSE']._serialized_start=108 - _globals['_PINGRESPONSE']._serialized_end=148 - _globals['_MACHINELEARNINGSERVICE']._serialized_start=150 - _globals['_MACHINELEARNINGSERVICE']._serialized_end=251 + _globals['_TRAINREQUEST']._serialized_start=67 + _globals['_TRAINREQUEST']._serialized_end=162 + _globals['_TRAINRESPONSE']._serialized_start=164 + _globals['_TRAINRESPONSE']._serialized_end=210 + _globals['_EVALREQUEST']._serialized_start=212 + _globals['_EVALREQUEST']._serialized_end=248 + _globals['_EVALRESPONSE']._serialized_start=250 + _globals['_EVALRESPONSE']._serialized_end=291 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=293 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=378 + _globals['_FACEANDCLIPREQUEST']._serialized_start=380 + _globals['_FACEANDCLIPREQUEST']._serialized_end=431 + _globals['_MACHINELEARNINGSERVICE']._serialized_start=434 + _globals['_MACHINELEARNINGSERVICE']._serialized_end=729 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi index da0f3584..71309701 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi @@ -1,17 +1,48 @@ +from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Optional as _Optional +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional DESCRIPTOR: _descriptor.FileDescriptor -class PingRequest(_message.Message): - __slots__ = ("message",) - MESSAGE_FIELD_NUMBER: _ClassVar[int] - message: str - def __init__(self, message: _Optional[str] = ...) -> None: ... +class TrainRequest(_message.Message): + __slots__ = ("nursery_id", "child_id", "bus_id") + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + CHILD_ID_FIELD_NUMBER: _ClassVar[int] + BUS_ID_FIELD_NUMBER: _ClassVar[int] + nursery_id: str + child_id: _containers.RepeatedScalarFieldContainer[str] + bus_id: str + def __init__(self, nursery_id: _Optional[str] = ..., child_id: _Optional[_Iterable[str]] = ..., bus_id: _Optional[str] = ...) -> None: ... -class PingResponse(_message.Message): - __slots__ = ("message",) - MESSAGE_FIELD_NUMBER: _ClassVar[int] - message: str - def __init__(self, message: _Optional[str] = ...) -> None: ... +class TrainResponse(_message.Message): + __slots__ = ("is_started",) + IS_STARTED_FIELD_NUMBER: _ClassVar[int] + is_started: bool + def __init__(self, is_started: bool = ...) -> None: ... + +class EvalRequest(_message.Message): + __slots__ = ("bus_id",) + BUS_ID_FIELD_NUMBER: _ClassVar[int] + bus_id: str + def __init__(self, bus_id: _Optional[str] = ...) -> None: ... + +class EvalResponse(_message.Message): + __slots__ = ("child_id",) + CHILD_ID_FIELD_NUMBER: _ClassVar[int] + child_id: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, child_id: _Optional[_Iterable[str]] = ...) -> None: ... + +class FaceDetectAndClipResponse(_message.Message): + __slots__ = ("nursery_id", "child_id") + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + CHILD_ID_FIELD_NUMBER: _ClassVar[int] + nursery_id: str + child_id: str + def __init__(self, nursery_id: _Optional[str] = ..., child_id: _Optional[str] = ...) -> None: ... + +class FaceAndClipRequest(_message.Message): + __slots__ = ("is_started",) + IS_STARTED_FIELD_NUMBER: _ClassVar[int] + is_started: bool + def __init__(self, is_started: bool = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py index 7bc916f1..92b94b55 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py @@ -15,17 +15,39 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ - self.Ping = channel.unary_unary( - '/machine_learning.v1.MachineLearningService/Ping', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PingRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PingResponse.FromString, + self.Train = channel.unary_unary( + '/machine_learning.v1.MachineLearningService/Train', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, + ) + self.Eval = channel.stream_stream( + '/machine_learning.v1.MachineLearningService/Eval', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.FromString, + ) + self.FaceDetectAndClip = channel.unary_unary( + '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceAndClipRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, ) class MachineLearningServiceServicer(object): """Missing associated documentation comment in .proto file.""" - def Ping(self, request, context): + def Train(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Eval(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def FaceDetectAndClip(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -34,10 +56,20 @@ def Ping(self, request, context): def add_MachineLearningServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'Ping': grpc.unary_unary_rpc_method_handler( - servicer.Ping, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PingRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PingResponse.SerializeToString, + 'Train': grpc.unary_unary_rpc_method_handler( + servicer.Train, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, + ), + 'Eval': grpc.stream_stream_rpc_method_handler( + servicer.Eval, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.SerializeToString, + ), + 'FaceDetectAndClip': grpc.unary_unary_rpc_method_handler( + servicer.FaceDetectAndClip, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceAndClipRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( @@ -50,7 +82,41 @@ class MachineLearningService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Ping(request, + def Train(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/Train', + machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, + machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Eval(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/machine_learning.v1.MachineLearningService/Eval', + machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.SerializeToString, + machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def FaceDetectAndClip(request, target, options=(), channel_credentials=None, @@ -60,8 +126,8 @@ def Ping(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/Ping', - machine__learning_dot_v1_dot_machine__learning__pb2.PingRequest.SerializeToString, - machine__learning_dot_v1_dot_machine__learning__pb2.PingResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', + machine__learning_dot_v1_dot_machine__learning__pb2.FaceAndClipRequest.SerializeToString, + machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) From b4e9165c18500faf6069bb6673445b971e04abf0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 19:15:59 +0900 Subject: [PATCH 357/771] =?UTF-8?q?feat:StationApi=E5=91=BC=E3=81=B3?= =?UTF-8?q?=E5=87=BA=E3=81=97=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/util/api/bus.dart | 2 ++ .../where_child_bus/lib/util/api/station.dart | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 frontend/where_child_bus/lib/util/api/station.dart diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index 29640db4..940c8cfd 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -25,8 +25,10 @@ Future getBusListByNurseryId( developer.log("レスポンス: $res"); } + await channel.shutdown(); return res; } catch (error) { + await channel.shutdown(); developer.log("Caught Error:", error: error); return Future.error(error); } diff --git a/frontend/where_child_bus/lib/util/api/station.dart b/frontend/where_child_bus/lib/util/api/station.dart new file mode 100644 index 00000000..2f39a668 --- /dev/null +++ b/frontend/where_child_bus/lib/util/api/station.dart @@ -0,0 +1,36 @@ +import "dart:developer" as developer; + +import "package:flutter/foundation.dart"; +import "package:grpc/grpc.dart"; +import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/station.pbgrpc.dart"; + +Future getStationListByBusId( + String busId) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + + final grpcClient = StationServiceClient(channel); + + try { + var req = GetStationListByBusIdRequest(busId: busId); + + if (kDebugMode) { + developer.log("リクエスト: $req"); + } + + var res = await grpcClient.getStationListByBusId(req); + if (kDebugMode) { + developer.log("レスポンス: $res"); + } + + await channel.shutdown(); + return res; + } catch (error) { + await channel.shutdown(); + developer.log("Caught Error:", error: error); + return Future.error(error); + } +} From 233a5299411db08becc44d77dfd25fe6ccffde82 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 19:45:16 +0900 Subject: [PATCH 358/771] =?UTF-8?q?feat:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E3=81=A7=E4=BF=9D=E8=AD=B7=E8=80=85=E3=83=AA=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=82=92=E5=8F=96=E5=BE=97=E3=81=97=E3=81=A6=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 44 ++++----- .../bus_edit_page/bus_edit_page.dart | 95 ++++++++++--------- .../components/guardians_list.dart | 38 ++++++++ .../components/stations_list.dart | 35 ------- .../service/get_stations_list_by_bus_id.dart | 13 +++ 5 files changed, 119 insertions(+), 106 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart delete mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/service/get_stations_list_by_bus_id.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 8f695fce..a3bceecf 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -1,9 +1,10 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; -import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/guardians_list.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart'; +import 'package:where_child_bus/pages/bus_list_page/service/get_stations_list_by_bus_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BottomSheetWidget extends StatefulWidget { @@ -16,6 +17,7 @@ class BottomSheetWidget extends StatefulWidget { } class _BottomSheetWidgetState extends State { + List guardians = []; final busStations = [ "station1", "station2", @@ -29,6 +31,19 @@ class _BottomSheetWidgetState extends State { "station7" ]; + @override + void initState() { + super.initState(); + _loadGuardians(); + } + + Future _loadGuardians() async { + var res = await getGuardiansByBusId(widget.bus.id); + setState(() { + guardians = res; + }); + } + @override Widget build(BuildContext context) { return Container( @@ -54,7 +69,9 @@ class _BottomSheetWidgetState extends State { children: [ // titleText(), modalHeader(widget.bus.name, "test"), - StationsList(busStationsList: busStations), + GuardiansList( + guardiansList: [], + ), ConfirmButton( buttonText: "乗客情報", onTap: () => moveToBusPassengerPage(context), @@ -105,29 +122,6 @@ class _BottomSheetWidgetState extends State { ); } - //将来的にはStationのListを参照 - Widget stationsList(BuildContext context, List busStationsList) { - return ListView.builder( - itemCount: busStationsList.length, - itemBuilder: (context, index) { - return Padding( - padding: const EdgeInsets.fromLTRB(50, 10, 0, 0), - child: stationsListElement(busStationsList[index]), - ); - }, - ); - } - - Widget stationsListElement(String stationName) { - return Text( - stationName, - textAlign: TextAlign.left, - style: const TextStyle( - fontSize: 18, - ), - ); - } - Widget courseAndOperator(String courseName, String operatorName) { return Padding( padding: const EdgeInsets.only(left: 30), diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 154e0114..70ff038c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -1,17 +1,17 @@ -import 'dart:io'; +import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; -import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/stations_list.dart'; +import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/guardians_list.dart'; class BusEditPage extends StatefulWidget { final List busStations; static const defaultBusStations = ["バス停が登録されていません"]; - BusEditPage({ this.busStations = defaultBusStations}); + BusEditPage({this.busStations = defaultBusStations}); @override _BusEditPage createState() => _BusEditPage(busStations: busStations); @@ -29,10 +29,7 @@ class _BusEditPage extends State { Widget build(BuildContext context) { return GestureDetector( onTap: () => primaryFocus?.unfocus(), - child: Scaffold( - appBar: AppBar(), - body: pageBody(context) - ), + child: Scaffold(appBar: AppBar(), body: pageBody(context)), ); } @@ -50,54 +47,60 @@ class _BusEditPage extends State { } Widget inputFieldsAndThumbnail(BuildContext context) { - return Padding( - padding: EdgeInsets.symmetric(horizontal: MediaQuery.of(context).size.width*0.08), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - busThumbnail(context), - inputFields(), - ], - ), - ); + return Padding( + padding: EdgeInsets.symmetric( + horizontal: MediaQuery.of(context).size.width * 0.08), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + busThumbnail(context), + inputFields(), + ], + ), + ); } Widget inputFields() { return const Column( children: [ - InputElement(inputFieldTitle: "バス名", labelText: "バス名を入力してください", hintText: "バス名を入力してください"), - InputElement(inputFieldTitle: "ナンバー", labelText: "ナンバーを入力してください", hintText: "ナンバーを入力してください"), + InputElement( + inputFieldTitle: "バス名", + labelText: "バス名を入力してください", + hintText: "バス名を入力してください"), + InputElement( + inputFieldTitle: "ナンバー", + labelText: "ナンバーを入力してください", + hintText: "ナンバーを入力してください"), ], ); } Widget busThumbnail(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Padding( - padding: EdgeInsets.all(8), - child: Text("サムネイル"), - ), - GestureDetector( - onTap: () => pickImage(), - child: _selectedImagePath != null ? SizedBox( - width: MediaQuery.of(context).size.width * 0.3, - height: MediaQuery.of(context).size.width * 0.3, - child: Image.file(File(_selectedImagePath!)), - ) : Center( - child: unselectedImageButton(), - ), - ), - ] - ); + return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + const Padding( + padding: EdgeInsets.all(8), + child: Text("サムネイル"), + ), + GestureDetector( + onTap: () => pickImage(), + child: _selectedImagePath != null + ? SizedBox( + width: MediaQuery.of(context).size.width * 0.3, + height: MediaQuery.of(context).size.width * 0.3, + child: Image.file(File(_selectedImagePath!)), + ) + : Center( + child: unselectedImageButton(), + ), + ), + ]); } Widget unselectedImageButton() { return ElevatedButton( onPressed: () => pickImage(), - child: const Text ( + child: const Text( "画像が選択されていません", ), ); @@ -110,9 +113,10 @@ class _BusEditPage extends State { child: ElevatedButton( onPressed: () { Navigator.push( - context,MaterialPageRoute(builder: (context) => BusGuardianManagePage()) - ); - }, + context, + MaterialPageRoute( + builder: (context) => BusGuardianManagePage())); + }, child: const Text("バスを利用する保護者を変更"), ), ), @@ -126,13 +130,12 @@ class _BusEditPage extends State { } setState(() { - _isPickingImage= true; + _isPickingImage = true; }); try { final XFile? image = await _picker.pickImage(source: ImageSource.gallery); - if (image != null) { setState(() { _selectedImagePath = image.path; @@ -148,4 +151,4 @@ class _BusEditPage extends State { }); } } -} \ No newline at end of file +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart new file mode 100644 index 00000000..d7070d53 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart @@ -0,0 +1,38 @@ +import "package:flutter/material.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; + +class GuardiansList extends StatelessWidget { + final List guardiansList; + + GuardiansList({required this.guardiansList}); + + @override + Widget build(BuildContext context) { + return Expanded(child: guardiansListView(context, guardiansList)); + } + + //将来的にはStationのListを参照 + Widget guardiansListView( + BuildContext context, List guardiansList) { + return ListView.builder( + itemCount: guardiansList.length, + itemBuilder: (context, index) { + return Padding( + padding: EdgeInsets.fromLTRB( + MediaQuery.of(context).size.width * 0.1, 10, 0, 0), + child: stationsListElement(guardiansList[index].name), + ); + }, + ); + } + + Widget stationsListElement(String guardianName) { + return Text( + "$guardianNameさん", + textAlign: TextAlign.left, + style: const TextStyle( + fontSize: 18, + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart deleted file mode 100644 index 9494dd1f..00000000 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/stations_list.dart +++ /dev/null @@ -1,35 +0,0 @@ -import "package:flutter/material.dart"; - -class StationsList extends StatelessWidget { - final List busStationsList; - - StationsList({required this.busStationsList}); - - @override - Widget build(BuildContext context) { - return Expanded(child: stationsList(context, busStationsList)); - } - - //将来的にはStationのListを参照 - Widget stationsList(BuildContext context, List busStationsList) { - return ListView.builder( - itemCount: busStationsList.length, - itemBuilder: (context, index) { - return Padding( - padding: EdgeInsets.fromLTRB(MediaQuery.of(context).size.width*0.1, 10, 0, 0), - child: stationsListElement(busStationsList[index]), - ); - }, - ); - } - - Widget stationsListElement(String stationName) { - return Text( - stationName, - textAlign: TextAlign.left, - style: const TextStyle( - fontSize: 18, - ), - ); - } -} \ No newline at end of file diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/service/get_stations_list_by_bus_id.dart b/frontend/where_child_bus/lib/pages/bus_list_page/service/get_stations_list_by_bus_id.dart new file mode 100644 index 00000000..e0f49673 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/service/get_stations_list_by_bus_id.dart @@ -0,0 +1,13 @@ +import "dart:developer" as developer; +import 'package:where_child_bus/util/api/station.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +Future> getGuardiansByBusId(String busId) async { + try { + var res = await getStationListByBusId(busId); + return res.guardians; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } +} From 0c6d2f1447831e088a1e52ad03817b50cf1d2d12 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 19:52:15 +0900 Subject: [PATCH 359/771] =?UTF-8?q?feat:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=81=AE=E8=AA=AD=E3=81=BF=E8=BE=BC?= =?UTF-8?q?=E3=81=BF=E3=81=AB=E3=83=AD=E3=83=BC=E3=83=87=E3=82=A3=E3=83=B3?= =?UTF-8?q?=E3=82=B0=E8=A1=A8=E7=A4=BA=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 37 +++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index a3bceecf..7bb8024c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -1,3 +1,5 @@ +import "dart:developer" as developer; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; @@ -18,6 +20,10 @@ class BottomSheetWidget extends StatefulWidget { class _BottomSheetWidgetState extends State { List guardians = []; + bool _isLoading = true; + bool _isFailLoading = false; + + //削除する final busStations = [ "station1", "station2", @@ -39,9 +45,19 @@ class _BottomSheetWidgetState extends State { Future _loadGuardians() async { var res = await getGuardiansByBusId(widget.bus.id); - setState(() { - guardians = res; - }); + try { + if (mounted) { + setState(() { + guardians = res; + _isLoading = false; + }); + } + } catch (e) { + if (kDebugMode) { + developer.log("バスリストのロード中にエラーが発生しました: $e"); + } + setState(() => {_isLoading = false, _isFailLoading = true}); + } } @override @@ -69,9 +85,16 @@ class _BottomSheetWidgetState extends State { children: [ // titleText(), modalHeader(widget.bus.name, "test"), - GuardiansList( - guardiansList: [], - ), + _isLoading + ? const Padding( + padding: EdgeInsets.all(20), + child: Center( + child: CircularProgressIndicator(), + ), + ) + : GuardiansList( + guardiansList: [], + ), ConfirmButton( buttonText: "乗客情報", onTap: () => moveToBusPassengerPage(context), @@ -111,7 +134,7 @@ class _BottomSheetWidgetState extends State { Widget modalHeader(String busCourseName, String busOperatorName) { return Padding( - padding: const EdgeInsets.fromLTRB(40, 50, 0, 10), + padding: const EdgeInsets.fromLTRB(20, 50, 0, 10), child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ From a31b1c00f685ffecf8ddc75c3532b18ee843e937 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 19:54:03 +0900 Subject: [PATCH 360/771] =?UTF-8?q?refactor:r=E3=83=AA=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=82=A6=E3=82=A3=E3=82=B8=E3=82=A7=E3=83=83=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 7bb8024c..886c212d 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -85,16 +85,7 @@ class _BottomSheetWidgetState extends State { children: [ // titleText(), modalHeader(widget.bus.name, "test"), - _isLoading - ? const Padding( - padding: EdgeInsets.all(20), - child: Center( - child: CircularProgressIndicator(), - ), - ) - : GuardiansList( - guardiansList: [], - ), + guardiansListView(), ConfirmButton( buttonText: "乗客情報", onTap: () => moveToBusPassengerPage(context), @@ -103,6 +94,19 @@ class _BottomSheetWidgetState extends State { )); } + Widget guardiansListView() { + return _isLoading + ? const Padding( + padding: EdgeInsets.all(20), + child: Center( + child: CircularProgressIndicator(), + ), + ) + : GuardiansList( + guardiansList: [], + ); + } + moveToBusPassengerPage(BuildContext context) { Navigator.push( context, MaterialPageRoute(builder: (context) => BusPassengerPage())); From bbbbcfa134007450a9d906751a43518b6d113c85 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 16 Feb 2024 20:15:37 +0900 Subject: [PATCH 361/771] =?UTF-8?q?chore(ml):=20clip=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=81=AE=E5=87=BA=E5=8A=9B=E7=94=A8=E3=83=87=E3=82=A3=E3=83=AC?= =?UTF-8?q?=E3=82=AF=E3=83=88=E3=83=AA=E3=82=92gitignore=E3=81=AB=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machine_learning/.gitignore b/machine_learning/.gitignore index a08b5ca8..c7a4b1ee 100644 --- a/machine_learning/.gitignore +++ b/machine_learning/.gitignore @@ -6,6 +6,8 @@ secrets/ src/face_detect_model/pickle/* src/face_detect_model/DetectFaceAndClip/img +src/face_detect_model/DetectFaceAndClip/detce_img + ### macOS ### # General .DS_Store From fe22615541a5145495316b5505c686952198f671 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 16 Feb 2024 20:17:20 +0900 Subject: [PATCH 362/771] =?UTF-8?q?refactor(ml):=20=20main=E9=96=A2?= =?UTF-8?q?=E6=95=B0=E3=81=AE=E8=B2=AC=E5=8B=99=E3=82=92=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectFaceAndClip/detectFaceAndClip.py | 105 +++++++++++------- 1 file changed, 67 insertions(+), 38 deletions(-) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index 89613925..47d2b0d4 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -64,6 +64,57 @@ def load_image_from_remote(nursery_id, child_id, blobs): return images +def init_save_dir(save_dir_path): + os.makedirs(save_dir_path, exist_ok=True) + for file in os.listdir(save_dir_path): + file_path = os.path.join(save_dir_path, file) + if os.path.isfile(file_path): + os.remove(file_path) + + +def init_client(): + from google.oauth2 import service_account + import google.cloud.storage as gcs + + # NOTE: gcloud auth application-default loginにて事前に認証 + credential = os.environ.get("GOOGLE_APPLICATION_CREDENTIALS") + PROJECT_ID = os.environ.get("PROJECT_ID") + + client = gcs.Client(PROJECT_ID, credentials=credential) + if client is None: + logger.error("Failed to initialize client.") + exit(1) + else: + return client + + +def get_bucket(client): + # NOTE: 環境変数からバケット名を取得 + BUCKET_NAME = os.environ.get("BUCKET_NAME") + bucket = client.bucket(BUCKET_NAME) + + if bucket.exists(): + return bucket + else: + logger.error("Failed to " + BUCKET_NAME + " does not exist.") + exit(1) + + +def get_blobs(bucket, blob_name): + blobs = list(bucket.list_blobs(prefix=blob_name)) + + # blobsの中身に対するエラーハンドリング + try: + if len(blobs) == 0: # 最初の要素がない場合、イテレータは空 + logger.error(f"No blobs found with prefix '{blob_name}' in the bucket.") + exit(1) + else: + return blobs + except Exception as e: + logger.error(f"Failed to get blobs from '{blob_name}' due to an error: {e}") + exit(1) + + def save_face_image_to_local(face, save_dir, save_file_name): """クリップされた顔画像を保存する""" os.makedirs(save_dir, exist_ok=True) @@ -83,33 +134,7 @@ def save_face_image_to_remote(face, save_blob_name, bucket): save_blob.upload_from_string(data=png_cliped_face_data, content_type="image/png") -def init_save_dir(save_dir_path): - os.makedirs(save_dir_path, exist_ok=True) - for file in os.listdir(save_dir_path): - file_path = os.path.join(save_dir_path, file) - if os.path.isfile(file_path): - os.remove(file_path) - - -def init_client(): - from google.oauth2 import service_account - import google.cloud.storage as gcs - - # TODO: GCP Cloud Functions でdeployする際の実装 - KEY_PATH = os.environ.get("CREDENTIALS_KEY_PATH") - credential = service_account.Credentials.from_service_account_file(KEY_PATH) - - PROJECT_ID = os.environ.get("PROJECT_ID") - - client = gcs.Client(PROJECT_ID, credentials=credential) - return client - - -def main(args): - logger.info(f"env: {args.env}") - with open("src/face_detect_model/config.yaml", "r") as f: - config = yaml.safe_load(f) - +def detect_face_and_clip(args, config): face_cascade_path = config["face_detect"]["cascade_path"] image_size = ( config["face_detect"]["clip_size"]["height"], @@ -123,14 +148,7 @@ def main(args): # GCSとの接続 if args.env == "remote": client = init_client() - if client is not None: - BUCKET_NAME = os.environ.get("BUCKET_NAME") - bucket = client.bucket(BUCKET_NAME) - else: - logger.error("Failed to connect to GCS") - exit(1) - - logger.info("get bucket success!") + bucket = get_bucket(client) # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) @@ -138,8 +156,8 @@ def main(args): if args.env == "local": images = load_image(args) elif args.env == "remote": - SOURCE_BLOB_NAME = f"{args.nursery_id}/{args.child_id}/row/" - blobs = bucket.list_blobs(prefix=SOURCE_BLOB_NAME, delimiter="/") + SOURCE_BLOB_NAME = f"{args.nursery_id}/{args.child_id}/raw/" + blobs = get_blobs(bucket, SOURCE_BLOB_NAME) images = load_image(args, blobs=blobs) logger.info("Detecting faces...") @@ -162,12 +180,23 @@ def main(args): if args.env == "local": save_file_name = f"{detect_face_num}.png" logger.info(f"save: {save_file_name}") - save_face_image_to_local(clipped_face, save_dir_path, save_file_name) + save_face_image_to_local( + clipped_face, args.save_dir_path, save_file_name + ) elif args.env == "remote": save_blob_name = f"{args.nursery_id}/{args.child_id}/clipped/{args.child_id}-{detect_face_num}.png" logger.info(f"save: {save_blob_name}") save_face_image_to_remote(clipped_face, save_blob_name, bucket) detect_face_num += 1 + + +def main(args): + logger.info(f"env: {args.env}") + with open("src/face_detect_model/config.yaml", "r") as f: + config = yaml.safe_load(f) + + detect_face_and_clip(args, config) + logger.info("Done") From e9d43568f53f1ebd9dcf14ee2e6694835a331fed Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 20:31:58 +0900 Subject: [PATCH 363/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E7=B7=A8?= =?UTF-8?q?=E9=9B=86=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AB=E5=AF=BE=E3=81=97?= =?UTF-8?q?=E3=81=A6=E5=80=A4=E3=81=AE=E5=BC=95=E3=81=8D=E6=B8=A1=E3=81=97?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 5 +- .../bus_edit_page/bus_edit_page.dart | 49 ++++++++++++------- .../components/input_element.dart | 16 ++++-- .../bus_edit_page/components/input_field.dart | 13 +++-- 4 files changed, 57 insertions(+), 26 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 886c212d..e35d54ec 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -122,8 +122,9 @@ class _BottomSheetWidgetState extends State { Navigator.push( context, MaterialPageRoute( - builder: (context) => - BusEditPage(busStations: busStations))); + builder: (context) => BusEditPage( + bus: widget.bus, + ))); }, style: editButtonStyle(), child: const Text("Edit", diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 70ff038c..85d663ac 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -1,29 +1,38 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; -import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; -import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/guardians_list.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BusEditPage extends StatefulWidget { - final List busStations; - static const defaultBusStations = ["バス停が登録されていません"]; + Bus? bus; - BusEditPage({this.busStations = defaultBusStations}); + BusEditPage({super.key, this.bus}); @override - _BusEditPage createState() => _BusEditPage(busStations: busStations); + _BusEditPage createState() => _BusEditPage(); } class _BusEditPage extends State { - final List busStations; final ImagePicker _picker = ImagePicker(); + final TextEditingController _busNameController = TextEditingController(); + final TextEditingController _busNumberController = TextEditingController(); + String? _selectedImagePath; bool _isPickingImage = false; - _BusEditPage({required this.busStations}); + @override + void initState() { + super.initState(); + if (widget.bus != null) { + setState(() { + _busNameController.text = widget.bus!.name; + _busNumberController.text = widget.bus!.plateNumber; + }); + } + } @override Widget build(BuildContext context) { @@ -36,9 +45,10 @@ class _BusEditPage extends State { Widget pageBody(BuildContext context) { return Center( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - inputFieldsAndThumbnail(context), + // inputFieldsAndThumbnail(context), + inputFields(), manageChildrenButton(), ConfirmButton(buttonText: "保存"), ], @@ -62,16 +72,21 @@ class _BusEditPage extends State { } Widget inputFields() { - return const Column( + return Column( + crossAxisAlignment: CrossAxisAlignment.center, children: [ InputElement( - inputFieldTitle: "バス名", - labelText: "バス名を入力してください", - hintText: "バス名を入力してください"), + inputFieldTitle: "バス名", + labelText: "バス名を入力してください", + hintText: "バス名を入力してください", + controller: _busNameController, + ), InputElement( - inputFieldTitle: "ナンバー", - labelText: "ナンバーを入力してください", - hintText: "ナンバーを入力してください"), + inputFieldTitle: "ナンバー", + labelText: "ナンバーを入力してください", + hintText: "ナンバーを入力してください", + controller: _busNumberController, + ), ], ); } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_element.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_element.dart index 8bb954cd..65f02be4 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_element.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_element.dart @@ -6,8 +6,14 @@ class InputElement extends StatelessWidget { final String inputFieldTitle; final String labelText; final String hintText; + final TextEditingController controller; - const InputElement({super.key, required this.inputFieldTitle, required this.labelText, required this.hintText}); + const InputElement( + {super.key, + required this.inputFieldTitle, + required this.labelText, + required this.hintText, + required this.controller}); @override Widget build(BuildContext context) { @@ -17,9 +23,13 @@ class InputElement extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ InputFieldTitle(title: inputFieldTitle), - InputField(labelText: labelText, hintText: hintText), + InputField( + labelText: labelText, + hintText: hintText, + controller: controller, + ), ], ), ); } -} \ No newline at end of file +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart index 61dff552..1e6f1353 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field.dart @@ -1,21 +1,26 @@ - import "package:flutter/material.dart"; import "package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart"; class InputField extends StatelessWidget { final String labelText; final String hintText; + final TextEditingController controller; - const InputField({super.key, required this.labelText, required this.hintText}); + const InputField( + {super.key, + required this.labelText, + required this.hintText, + required this.controller}); @override Widget build(BuildContext context) { return SizedBox( width: MediaQuery.of(context).size.width * 0.8, - height: 30, + height: 40, child: TextField( decoration: editPageInputDecoration(labelText, hintText), + controller: controller, ), ); } -} \ No newline at end of file +} From e466d2811d359e8fb0ec80a4a61f7b4e7be80720 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 16 Feb 2024 20:33:32 +0900 Subject: [PATCH 364/771] =?UTF-8?q?refactor(ml):=20=E4=B8=80=E9=83=A8?= =?UTF-8?q?=E9=96=A2=E6=95=B0=E5=8C=96=E3=81=A8=E5=A4=89=E6=95=B0=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E3=81=AE=E7=B5=B1=E4=B8=80=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectFaceAndClip/detectFaceAndClip.py | 47 +++++++++++-------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index 47d2b0d4..15518b38 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -5,6 +5,9 @@ import argparse import logging from dotenv import load_dotenv +from google.oauth2 import service_account +import google.cloud.storage as gcs +from google.cloud.storage import Blob, Bucket from detectFaceUtil import ( @@ -23,19 +26,19 @@ logger = logging.getLogger(__name__) -def load_image(args, blobs=None): +def load_image(args: argparse.Namespace, blobs=None): """画像の読み込みを行うラッパー関数""" if args.env == "local": - return load_image_from_local(args.img_dir_path) + return load_image_from_local(args.image_dir_path) elif args.env == "remote": return load_image_from_remote(args.nursery_id, args.child_id, blobs) -def load_image_from_local(img_dir_path): +def load_image_from_local(image_dir_path: str): images = [] - for image_path in os.listdir(img_dir_path): + for image_path in os.listdir(image_dir_path): logger.info(f"loading: {image_path}") - image = cv2.imread(img_dir_path + image_path) + image = cv2.imread(image_dir_path + image_path) if image is None: logger.error(f"Can not find or load : {image_path}") continue @@ -43,7 +46,7 @@ def load_image_from_local(img_dir_path): return images -def load_image_from_remote(nursery_id, child_id, blobs): +def load_image_from_remote(nursery_id: str, child_id: str, blobs: list): images = [] for blob in blobs: logger.info(f"loading: {blob.name}") @@ -64,7 +67,7 @@ def load_image_from_remote(nursery_id, child_id, blobs): return images -def init_save_dir(save_dir_path): +def init_save_dir(save_dir_path: str): os.makedirs(save_dir_path, exist_ok=True) for file in os.listdir(save_dir_path): file_path = os.path.join(save_dir_path, file) @@ -73,9 +76,6 @@ def init_save_dir(save_dir_path): def init_client(): - from google.oauth2 import service_account - import google.cloud.storage as gcs - # NOTE: gcloud auth application-default loginにて事前に認証 credential = os.environ.get("GOOGLE_APPLICATION_CREDENTIALS") PROJECT_ID = os.environ.get("PROJECT_ID") @@ -88,7 +88,7 @@ def init_client(): return client -def get_bucket(client): +def get_bucket(client: gcs.Client): # NOTE: 環境変数からバケット名を取得 BUCKET_NAME = os.environ.get("BUCKET_NAME") bucket = client.bucket(BUCKET_NAME) @@ -100,7 +100,7 @@ def get_bucket(client): exit(1) -def get_blobs(bucket, blob_name): +def get_blobs(bucket: Bucket, blob_name: str): blobs = list(bucket.list_blobs(prefix=blob_name)) # blobsの中身に対するエラーハンドリング @@ -115,7 +115,7 @@ def get_blobs(bucket, blob_name): exit(1) -def save_face_image_to_local(face, save_dir, save_file_name): +def save_face_image_to_local(face: np.ndarray, save_dir: str, save_file_name: str): """クリップされた顔画像を保存する""" os.makedirs(save_dir, exist_ok=True) @@ -123,18 +123,25 @@ def save_face_image_to_local(face, save_dir, save_file_name): cv2.imwrite(save_path, face) -def save_face_image_to_remote(face, save_blob_name, bucket): - from google.cloud.storage import Blob +def decode_face_image_from_ndaarray(face_image: np.ndarray): + _, encoded_image = cv2.imencode(".png", face_image) + png_cliped_face_data = encoded_image.tobytes() + return png_cliped_face_data + +def save_face_image_to_remote( + face_image: np.ndarray, + save_blob_name: str, + bucket: Bucket, +): """クリップされた顔画像をGCSに保存する""" - _, encoded_image = cv2.imencode(".png", face) - png_cliped_face_data = encoded_image.tobytes() + png_cliped_face_data = decode_face_image_from_ndaarray(face_image) save_blob = Blob(save_blob_name, bucket) save_blob.upload_from_string(data=png_cliped_face_data, content_type="image/png") -def detect_face_and_clip(args, config): +def detect_face_and_clip(args: argparse.Namespace, config: dict): face_cascade_path = config["face_detect"]["cascade_path"] image_size = ( config["face_detect"]["clip_size"]["height"], @@ -190,7 +197,7 @@ def detect_face_and_clip(args, config): detect_face_num += 1 -def main(args): +def main(args: argparse.Namespace): logger.info(f"env: {args.env}") with open("src/face_detect_model/config.yaml", "r") as f: config = yaml.safe_load(f) @@ -206,7 +213,7 @@ def main(args): local_parser = env_subparsers.add_parser("local") local_parser.add_argument( - "--img_dir_path", + "--image_dir_path", type=str, help="画像のディレクトリパス", required=True, From e8fe60c359878c77b98a582304f1bd2923aca027 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 20:53:45 +0900 Subject: [PATCH 365/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E3=81=8C?= =?UTF-8?q?=E7=99=BB=E9=8C=B2=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA?= =?UTF-8?q?=E3=81=84=E9=9A=9B=E3=81=AE=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bus_list_page.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 02beb8b6..c1054910 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -62,6 +62,7 @@ class _BusListPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ if (_isFailLoading) loadFailText(), + if (buses.isEmpty) busNotRegisteredText(), Expanded( child: listViewBuilder(), ) @@ -70,6 +71,13 @@ class _BusListPageState extends State { ); } + Widget busNotRegisteredText() { + return const Padding( + padding: EdgeInsets.all(20), + child: Text("バスが登録されていません"), + ); + } + Widget addBusButton() { return FloatingActionButton( onPressed: () { From df66d42aae73b8581eb44db6dfe117cb82986767 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 21:06:16 +0900 Subject: [PATCH 366/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E3=81=8C?= =?UTF-8?q?=E6=AD=A3=E3=81=97=E3=81=8F=E7=99=BB=E9=8C=B2=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 93 +++++++++++++++++++++++++++++++++++-- 1 file changed, 89 insertions(+), 4 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index e5f35213..fdf985cf 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -14,9 +14,11 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + childbusassociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + stationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" ) type Interactor struct { @@ -51,6 +53,7 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* SetName(req.Name). SetPlateNumber(req.PlateNumber). Save(ctx) + if err != nil { return nil, fmt.Errorf("failed to create bus: %w", err) } @@ -78,6 +81,49 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* if err != nil { return nil, err // 夕方のステーション設定中にエラーが発生しました } + // 以下のコードはリファクタリング後のメインの処理フローです。 + + morningGuardianIDs, err := parseGuardianIDs(req.MorningGuardianIds) + if err != nil { + return nil, err // エラーハンドリングは簡潔に + } + + eveningGuardianIDs, err := parseGuardianIDs(req.EveningGuardianIds) + if err != nil { + return nil, err // エラーハンドリングは簡潔に + } + + // ステーションの取得処理は変更なし + stations, err := tx.Station.Query(). + Where(stationRepo.HasGuardianWith(guardianRepo.IDIn(morningGuardianIDs...))). + Where(stationRepo.HasGuardianWith(guardianRepo.IDIn(eveningGuardianIDs...))). + All(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get stations: %w", err) + } + + // 子供たちの処理を関数を用いて簡潔に + morningChildren := tx.Child.Query(). + Where(childRepo.HasGuardianWith(guardianRepo.IDIn(morningGuardianIDs...))).AllX(ctx) + if err := createChildBusAssociations(ctx, tx, morningChildren, bus, childbusassociationRepo.BusTypeMorning); err != nil { + return nil, err + } + + eveningChildren := tx.Child.Query(). + Where(childRepo.HasGuardianWith(guardianRepo.IDIn(eveningGuardianIDs...))).AllX(ctx) + if err := createChildBusAssociations(ctx, tx, eveningChildren, bus, childbusassociationRepo.BusTypeEvening); err != nil { + return nil, err + } + + // ステーションの更新処理は変更なし + for _, station := range stations { + _, err = tx.Bus.UpdateOne(bus). + AddStations(station). + Save(ctx) + if err != nil { + return nil, fmt.Errorf("failed to update bus with stations: %w", err) + } + } //TODO: CloudFunctionにバスの作成を通知 cfg, _ := config.New() @@ -94,6 +140,35 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* }, nil } +// parseGuardianIDs は、指定されたガーディアンIDの文字列のスライスをUUIDのスライスに変換します。 +func parseGuardianIDs(ids []string) ([]uuid.UUID, error) { + parsedIDs := make([]uuid.UUID, len(ids)) + for i, id := range ids { + parsedID, err := uuid.Parse(id) + if err != nil { + return nil, fmt.Errorf("failed to parse guardian ID '%s': %w", id, err) + } + parsedIDs[i] = parsedID + } + return parsedIDs, nil +} + +// createChildBusAssociations は、指定された子供たちに対してBusChildAssociationを作成します。 +func createChildBusAssociations(ctx context.Context, tx *ent.Tx, children []*ent.Child, bus *ent.Bus, busType childbusassociationRepo.BusType) error { + for _, child := range children { + _, err := tx.ChildBusAssociation.Create(). + SetChild(child). + SetBus(bus). + SetBusType(busType). + Save(ctx) // ctxを関数の引数から渡す + if err != nil { + return fmt.Errorf("failed to create bus child association: %w", err) + } + } + return nil +} + + func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusListByNurseryIdRequest) (*pb.GetBusListByNurseryIdResponse, error) { nurseryID, err := uuid.Parse(req.NurseryId) if err != nil { @@ -150,12 +225,22 @@ func setNextStation(ctx context.Context, tx *ent.Tx, guardianIDs []string, setNe } currentStation, err := tx.Station.Query(). - Where(station.HasGuardianWith(guardian.IDEQ(guardianIDParsed))). + Where(stationRepo.HasGuardianWith(guardianRepo.IDEQ(guardianIDParsed))). Only(ctx) if err != nil { return fmt.Errorf("failed to find station for guardian ID '%s': %w", guardianID, err) } + // 既存のnextStationリレーションをクリアします + err = tx.Station.UpdateOne(currentStation). + ClearMorningNextStation(). // 朝のnextStationリレーションをクリア + ClearEveningNextStation(). // 夕方のnextStationリレーションをクリア + Exec(ctx) + if err != nil { + return fmt.Errorf("failed to clear next stations for station ID '%s': %w", currentStation.ID, err) + } + + if index < len(guardianIDs)-1 { nextGuardianID := guardianIDs[index+1] nextGuardianIDParsed, err := uuid.Parse(nextGuardianID) @@ -164,7 +249,7 @@ func setNextStation(ctx context.Context, tx *ent.Tx, guardianIDs []string, setNe } nextStation, err := tx.Station.Query(). - Where(station.HasGuardianWith(guardian.IDEQ(nextGuardianIDParsed))). + Where(stationRepo.HasGuardianWith(guardianRepo.IDEQ(nextGuardianIDParsed))). Only(ctx) if err != nil { return fmt.Errorf("failed to find next station for guardian ID '%s': %w", nextGuardianID, err) From e941c4c097832b5d43577e76b21d72df2234d2ce Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 21:19:46 +0900 Subject: [PATCH 367/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=82=B5?= =?UTF-8?q?=E3=83=BC=E3=83=93=E3=82=B9=E3=81=AB=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E3=82=B9=E3=83=86=E3=83=BC=E3=82=BF=E3=82=B9=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E3=81=99=E3=82=8B=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 238 ++++++++++++++---- .../go/where_child_bus/v1/bus_grpc.pb.go | 37 +++ .../proto-gen/where_child_bus/v1/bus.pb.dart | 117 +++++++++ .../where_child_bus/v1/bus.pbgrpc.dart | 20 ++ .../where_child_bus/v1/bus.pbjson.dart | 27 ++ .../proto-gen/where_child_bus/v1/bus_pb2.py | 10 +- .../proto-gen/where_child_bus/v1/bus_pb2.pyi | 14 ++ .../where_child_bus/v1/bus_pb2_grpc.py | 36 ++- proto/where_child_bus/v1/bus.proto | 13 +- 9 files changed, 462 insertions(+), 50 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 32658f7f..47af73ea 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -240,6 +240,108 @@ func (x *GetBusListByNurseryIdResponse) GetBuses() []*Bus { return nil } +type ChangeBusStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=where_child_bus.v1.Status" json:"status,omitempty"` +} + +func (x *ChangeBusStatusRequest) Reset() { + *x = ChangeBusStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeBusStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeBusStatusRequest) ProtoMessage() {} + +func (x *ChangeBusStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeBusStatusRequest.ProtoReflect.Descriptor instead. +func (*ChangeBusStatusRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{4} +} + +func (x *ChangeBusStatusRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *ChangeBusStatusRequest) GetStatus() Status { + if x != nil { + return x.Status + } + return Status_STATUS_UNSPECIFIED +} + +type ChangeBusStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bus *Bus `protobuf:"bytes,1,opt,name=bus,proto3" json:"bus,omitempty"` +} + +func (x *ChangeBusStatusResponse) Reset() { + *x = ChangeBusStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeBusStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeBusStatusResponse) ProtoMessage() {} + +func (x *ChangeBusStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeBusStatusResponse.ProtoReflect.Descriptor instead. +func (*ChangeBusStatusResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{5} +} + +func (x *ChangeBusStatusResponse) GetBus() *Bus { + if x != nil { + return x.Bus + } + return nil +} + var File_where_child_bus_v1_bus_proto protoreflect.FileDescriptor var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ @@ -274,37 +376,54 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x65, 0x73, 0x32, 0xe4, 0x01, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, - 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x75, 0x73, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, + 0xd0, 0x02, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, + 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xeb, 0x01, 0x0a, 0x16, - 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, - 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, - 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, - 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, - 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, + 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -319,26 +438,33 @@ func file_where_child_bus_v1_bus_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_bus_proto_rawDescData } -var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ (*CreateBusRequest)(nil), // 0: where_child_bus.v1.CreateBusRequest (*CreateBusResponse)(nil), // 1: where_child_bus.v1.CreateBusResponse (*GetBusListByNurseryIdRequest)(nil), // 2: where_child_bus.v1.GetBusListByNurseryIdRequest (*GetBusListByNurseryIdResponse)(nil), // 3: where_child_bus.v1.GetBusListByNurseryIdResponse - (*Bus)(nil), // 4: where_child_bus.v1.Bus + (*ChangeBusStatusRequest)(nil), // 4: where_child_bus.v1.ChangeBusStatusRequest + (*ChangeBusStatusResponse)(nil), // 5: where_child_bus.v1.ChangeBusStatusResponse + (*Bus)(nil), // 6: where_child_bus.v1.Bus + (Status)(0), // 7: where_child_bus.v1.Status } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ - 4, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus - 4, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus - 0, // 2: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest - 2, // 3: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 1, // 4: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 5: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 6, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus + 6, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus + 7, // 2: where_child_bus.v1.ChangeBusStatusRequest.status:type_name -> where_child_bus.v1.Status + 6, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus + 0, // 4: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 5: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 4, // 6: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest + 1, // 7: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 8: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 5, // 9: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } @@ -396,6 +522,30 @@ func file_where_child_bus_v1_bus_proto_init() { return nil } } + file_where_child_bus_v1_bus_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeBusStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeBusStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -403,7 +553,7 @@ func file_where_child_bus_v1_bus_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_bus_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go index 07e4ddf9..8f00f225 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( BusService_CreateBus_FullMethodName = "/where_child_bus.v1.BusService/CreateBus" BusService_GetBusListByNurseryId_FullMethodName = "/where_child_bus.v1.BusService/GetBusListByNurseryId" + BusService_ChangeBusStatus_FullMethodName = "/where_child_bus.v1.BusService/ChangeBusStatus" ) // BusServiceClient is the client API for BusService service. @@ -29,6 +30,7 @@ const ( type BusServiceClient interface { CreateBus(ctx context.Context, in *CreateBusRequest, opts ...grpc.CallOption) (*CreateBusResponse, error) GetBusListByNurseryId(ctx context.Context, in *GetBusListByNurseryIdRequest, opts ...grpc.CallOption) (*GetBusListByNurseryIdResponse, error) + ChangeBusStatus(ctx context.Context, in *ChangeBusStatusRequest, opts ...grpc.CallOption) (*ChangeBusStatusResponse, error) } type busServiceClient struct { @@ -57,12 +59,22 @@ func (c *busServiceClient) GetBusListByNurseryId(ctx context.Context, in *GetBus return out, nil } +func (c *busServiceClient) ChangeBusStatus(ctx context.Context, in *ChangeBusStatusRequest, opts ...grpc.CallOption) (*ChangeBusStatusResponse, error) { + out := new(ChangeBusStatusResponse) + err := c.cc.Invoke(ctx, BusService_ChangeBusStatus_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // BusServiceServer is the server API for BusService service. // All implementations should embed UnimplementedBusServiceServer // for forward compatibility type BusServiceServer interface { CreateBus(context.Context, *CreateBusRequest) (*CreateBusResponse, error) GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) + ChangeBusStatus(context.Context, *ChangeBusStatusRequest) (*ChangeBusStatusResponse, error) } // UnimplementedBusServiceServer should be embedded to have forward compatible implementations. @@ -75,6 +87,9 @@ func (UnimplementedBusServiceServer) CreateBus(context.Context, *CreateBusReques func (UnimplementedBusServiceServer) GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBusListByNurseryId not implemented") } +func (UnimplementedBusServiceServer) ChangeBusStatus(context.Context, *ChangeBusStatusRequest) (*ChangeBusStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChangeBusStatus not implemented") +} // UnsafeBusServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BusServiceServer will @@ -123,6 +138,24 @@ func _BusService_GetBusListByNurseryId_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _BusService_ChangeBusStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangeBusStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BusServiceServer).ChangeBusStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BusService_ChangeBusStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BusServiceServer).ChangeBusStatus(ctx, req.(*ChangeBusStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // BusService_ServiceDesc is the grpc.ServiceDesc for BusService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -138,6 +171,10 @@ var BusService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetBusListByNurseryId", Handler: _BusService_GetBusListByNurseryId_Handler, }, + { + MethodName: "ChangeBusStatus", + Handler: _BusService_ChangeBusStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/bus.proto", diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index 2a41f8de..9bb7ba9f 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -14,6 +14,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; import 'resources.pb.dart' as $8; +import 'resources.pbenum.dart' as $8; class CreateBusRequest extends $pb.GeneratedMessage { factory CreateBusRequest({ @@ -255,6 +256,122 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { $core.List<$8.Bus> get buses => $_getList(0); } +class ChangeBusStatusRequest extends $pb.GeneratedMessage { + factory ChangeBusStatusRequest({ + $core.String? busId, + $8.Status? status, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + if (status != null) { + $result.status = status; + } + return $result; + } + ChangeBusStatusRequest._() : super(); + factory ChangeBusStatusRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ChangeBusStatusRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChangeBusStatusRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..e<$8.Status>(2, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: $8.Status.STATUS_UNSPECIFIED, valueOf: $8.Status.valueOf, enumValues: $8.Status.values) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ChangeBusStatusRequest clone() => ChangeBusStatusRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ChangeBusStatusRequest copyWith(void Function(ChangeBusStatusRequest) updates) => super.copyWith((message) => updates(message as ChangeBusStatusRequest)) as ChangeBusStatusRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ChangeBusStatusRequest create() => ChangeBusStatusRequest._(); + ChangeBusStatusRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ChangeBusStatusRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ChangeBusStatusRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + $8.Status get status => $_getN(1); + @$pb.TagNumber(2) + set status($8.Status v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasStatus() => $_has(1); + @$pb.TagNumber(2) + void clearStatus() => clearField(2); +} + +class ChangeBusStatusResponse extends $pb.GeneratedMessage { + factory ChangeBusStatusResponse({ + $8.Bus? bus, + }) { + final $result = create(); + if (bus != null) { + $result.bus = bus; + } + return $result; + } + ChangeBusStatusResponse._() : super(); + factory ChangeBusStatusResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ChangeBusStatusResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChangeBusStatusResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $8.Bus.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ChangeBusStatusResponse clone() => ChangeBusStatusResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ChangeBusStatusResponse copyWith(void Function(ChangeBusStatusResponse) updates) => super.copyWith((message) => updates(message as ChangeBusStatusResponse)) as ChangeBusStatusResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ChangeBusStatusResponse create() => ChangeBusStatusResponse._(); + ChangeBusStatusResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ChangeBusStatusResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ChangeBusStatusResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.Bus get bus => $_getN(0); + @$pb.TagNumber(1) + set bus($8.Bus v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasBus() => $_has(0); + @$pb.TagNumber(1) + void clearBus() => clearField(1); + @$pb.TagNumber(1) + $8.Bus ensureBus() => $_ensure(0); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart index 6e790502..86ae243c 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart @@ -29,6 +29,10 @@ class BusServiceClient extends $grpc.Client { '/where_child_bus.v1.BusService/GetBusListByNurseryId', ($0.GetBusListByNurseryIdRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.GetBusListByNurseryIdResponse.fromBuffer(value)); + static final _$changeBusStatus = $grpc.ClientMethod<$0.ChangeBusStatusRequest, $0.ChangeBusStatusResponse>( + '/where_child_bus.v1.BusService/ChangeBusStatus', + ($0.ChangeBusStatusRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.ChangeBusStatusResponse.fromBuffer(value)); BusServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -43,6 +47,10 @@ class BusServiceClient extends $grpc.Client { $grpc.ResponseFuture<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($0.GetBusListByNurseryIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getBusListByNurseryId, request, options: options); } + + $grpc.ResponseFuture<$0.ChangeBusStatusResponse> changeBusStatus($0.ChangeBusStatusRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$changeBusStatus, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.BusService') @@ -64,6 +72,13 @@ abstract class BusServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $0.GetBusListByNurseryIdRequest.fromBuffer(value), ($0.GetBusListByNurseryIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.ChangeBusStatusRequest, $0.ChangeBusStatusResponse>( + 'ChangeBusStatus', + changeBusStatus_Pre, + false, + false, + ($core.List<$core.int> value) => $0.ChangeBusStatusRequest.fromBuffer(value), + ($0.ChangeBusStatusResponse value) => value.writeToBuffer())); } $async.Future<$0.CreateBusResponse> createBus_Pre($grpc.ServiceCall call, $async.Future<$0.CreateBusRequest> request) async { @@ -74,6 +89,11 @@ abstract class BusServiceBase extends $grpc.Service { return getBusListByNurseryId(call, await request); } + $async.Future<$0.ChangeBusStatusResponse> changeBusStatus_Pre($grpc.ServiceCall call, $async.Future<$0.ChangeBusStatusRequest> request) async { + return changeBusStatus(call, await request); + } + $async.Future<$0.CreateBusResponse> createBus($grpc.ServiceCall call, $0.CreateBusRequest request); $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($grpc.ServiceCall call, $0.GetBusListByNurseryIdRequest request); + $async.Future<$0.ChangeBusStatusResponse> changeBusStatus($grpc.ServiceCall call, $0.ChangeBusStatusRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index e7cd29b6..e2e06806 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -71,3 +71,30 @@ final $typed_data.Uint8List getBusListByNurseryIdResponseDescriptor = $convert.b 'Ch1HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXNwb25zZRItCgVidXNlcxgBIAMoCzIXLndoZXJlX2' 'NoaWxkX2J1cy52MS5CdXNSBWJ1c2Vz'); +@$core.Deprecated('Use changeBusStatusRequestDescriptor instead') +const ChangeBusStatusRequest$json = { + '1': 'ChangeBusStatusRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'status', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.Status', '10': 'status'}, + ], +}; + +/// Descriptor for `ChangeBusStatusRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List changeBusStatusRequestDescriptor = $convert.base64Decode( + 'ChZDaGFuZ2VCdXNTdGF0dXNSZXF1ZXN0EhUKBmJ1c19pZBgBIAEoCVIFYnVzSWQSMgoGc3RhdH' + 'VzGAIgASgOMhoud2hlcmVfY2hpbGRfYnVzLnYxLlN0YXR1c1IGc3RhdHVz'); + +@$core.Deprecated('Use changeBusStatusResponseDescriptor instead') +const ChangeBusStatusResponse$json = { + '1': 'ChangeBusStatusResponse', + '2': [ + {'1': 'bus', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Bus', '10': 'bus'}, + ], +}; + +/// Descriptor for `ChangeBusStatusResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List changeBusStatusResponseDescriptor = $convert.base64Decode( + 'ChdDaGFuZ2VCdXNTdGF0dXNSZXNwb25zZRIpCgNidXMYASABKAsyFy53aGVyZV9jaGlsZF9idX' + 'MudjEuQnVzUgNidXM='); + diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py index 0a6f39e0..30d9ea2e 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses2\xe4\x01\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponseB\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xd0\x02\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponseB\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -31,6 +31,10 @@ _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=420 _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=422 _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=500 - _globals['_BUSSERVICE']._serialized_start=503 - _globals['_BUSSERVICE']._serialized_end=731 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=502 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=601 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=603 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=671 + _globals['_BUSSERVICE']._serialized_start=674 + _globals['_BUSSERVICE']._serialized_end=1010 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi index 19508735..bbbf90f7 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi @@ -37,3 +37,17 @@ class GetBusListByNurseryIdResponse(_message.Message): BUSES_FIELD_NUMBER: _ClassVar[int] buses: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Bus] def __init__(self, buses: _Optional[_Iterable[_Union[_resources_pb2.Bus, _Mapping]]] = ...) -> None: ... + +class ChangeBusStatusRequest(_message.Message): + __slots__ = ("bus_id", "status") + BUS_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + bus_id: str + status: _resources_pb2.Status + def __init__(self, bus_id: _Optional[str] = ..., status: _Optional[_Union[_resources_pb2.Status, str]] = ...) -> None: ... + +class ChangeBusStatusResponse(_message.Message): + __slots__ = ("bus",) + BUS_FIELD_NUMBER: _ClassVar[int] + bus: _resources_pb2.Bus + def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py index 0931079b..778cfeb8 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py @@ -3,8 +3,7 @@ import grpc import grpc.experimental - -from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 +import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 class BusServiceStub(object): @@ -26,6 +25,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, ) + self.ChangeBusStatus = channel.unary_unary( + '/where_child_bus.v1.BusService/ChangeBusStatus', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.FromString, + ) class BusServiceServicer(object): @@ -43,6 +47,12 @@ def GetBusListByNurseryId(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def ChangeBusStatus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_BusServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -56,6 +66,11 @@ def add_BusServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.SerializeToString, ), + 'ChangeBusStatus': grpc.unary_unary_rpc_method_handler( + servicer.ChangeBusStatus, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.BusService', rpc_method_handlers) @@ -99,3 +114,20 @@ def GetBusListByNurseryId(request, where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ChangeBusStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/ChangeBusStatus', + where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 3e4d9a70..eb0966fe 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -7,6 +7,7 @@ import "where_child_bus/v1/resources.proto"; service BusService { rpc CreateBus(CreateBusRequest) returns (CreateBusResponse); rpc GetBusListByNurseryId(GetBusListByNurseryIdRequest) returns (GetBusListByNurseryIdResponse); + rpc ChangeBusStatus(ChangeBusStatusRequest) returns (ChangeBusStatusResponse); } message CreateBusRequest { @@ -27,4 +28,14 @@ message GetBusListByNurseryIdRequest { message GetBusListByNurseryIdResponse { repeated Bus buses = 1; -} \ No newline at end of file +} + +message ChangeBusStatusRequest { + string bus_id = 1; + Status status = 2; +} + +message ChangeBusStatusResponse { + Bus bus = 1; +} + From 5d48f969d8da82bfe66353fe1223450ebbae4121 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 16 Feb 2024 21:28:12 +0900 Subject: [PATCH 368/771] =?UTF-8?q?refactor(ml):=20=E9=A1=94=E6=A4=9C?= =?UTF-8?q?=E5=87=BA=E3=81=A8Clipping=E5=87=A6=E7=90=86=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=81=AE?= =?UTF-8?q?=E3=83=AA=E3=83=8D=E3=83=BC=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 103 +++++----- .../v1/machine_learning_grpc.pb.go | 12 +- .../v1/machine_learning.pb.dart | 26 +-- .../v1/machine_learning.pbgrpc.dart | 14 +- .../v1/machine_learning.pbjson.dart | 13 +- .../v1/machine_learning_pb2.py | 10 +- .../v1/machine_learning_pb2.pyi | 2 +- .../v1/machine_learning_pb2_grpc.py | 185 +++++++++++------- .../v1/machine_learning.proto | 4 +- 9 files changed, 205 insertions(+), 164 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index 38b08767..e136aac2 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -279,7 +279,7 @@ func (x *FaceDetectAndClipResponse) GetChildId() string { return "" } -type FaceAndClipRequest struct { +type FaceDetectAndClipRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -287,8 +287,8 @@ type FaceAndClipRequest struct { IsStarted bool `protobuf:"varint,1,opt,name=is_started,json=isStarted,proto3" json:"is_started,omitempty"` } -func (x *FaceAndClipRequest) Reset() { - *x = FaceAndClipRequest{} +func (x *FaceDetectAndClipRequest) Reset() { + *x = FaceDetectAndClipRequest{} if protoimpl.UnsafeEnabled { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -296,13 +296,13 @@ func (x *FaceAndClipRequest) Reset() { } } -func (x *FaceAndClipRequest) String() string { +func (x *FaceDetectAndClipRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FaceAndClipRequest) ProtoMessage() {} +func (*FaceDetectAndClipRequest) ProtoMessage() {} -func (x *FaceAndClipRequest) ProtoReflect() protoreflect.Message { +func (x *FaceDetectAndClipRequest) ProtoReflect() protoreflect.Message { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -314,12 +314,12 @@ func (x *FaceAndClipRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FaceAndClipRequest.ProtoReflect.Descriptor instead. -func (*FaceAndClipRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use FaceDetectAndClipRequest.ProtoReflect.Descriptor instead. +func (*FaceDetectAndClipRequest) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{5} } -func (x *FaceAndClipRequest) GetIsStarted() bool { +func (x *FaceDetectAndClipRequest) GetIsStarted() bool { if x != nil { return x.IsStarted } @@ -352,46 +352,47 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x12, 0x46, 0x61, - 0x63, 0x65, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x32, - 0xa7, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x05, 0x54, 0x72, - 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, - 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x45, 0x76, - 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, - 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6c, 0x0a, 0x11, 0x46, - 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, - 0x12, 0x27, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x41, 0x6e, 0x64, 0x43, 0x6c, - 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, + 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x18, 0x46, 0x61, + 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x32, 0xad, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x4e, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, - 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, - 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, - 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, - 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, - 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, - 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4f, 0x0a, 0x04, 0x45, 0x76, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, + 0x01, 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, + 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, + 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, + 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, + 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -413,12 +414,12 @@ var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ (*EvalRequest)(nil), // 2: machine_learning.v1.EvalRequest (*EvalResponse)(nil), // 3: machine_learning.v1.EvalResponse (*FaceDetectAndClipResponse)(nil), // 4: machine_learning.v1.FaceDetectAndClipResponse - (*FaceAndClipRequest)(nil), // 5: machine_learning.v1.FaceAndClipRequest + (*FaceDetectAndClipRequest)(nil), // 5: machine_learning.v1.FaceDetectAndClipRequest } var file_machine_learning_v1_machine_learning_proto_depIdxs = []int32{ 0, // 0: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest 2, // 1: machine_learning.v1.MachineLearningService.Eval:input_type -> machine_learning.v1.EvalRequest - 5, // 2: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceAndClipRequest + 5, // 2: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest 1, // 3: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse 3, // 4: machine_learning.v1.MachineLearningService.Eval:output_type -> machine_learning.v1.EvalResponse 4, // 5: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse @@ -496,7 +497,7 @@ func file_machine_learning_v1_machine_learning_proto_init() { } } file_machine_learning_v1_machine_learning_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FaceAndClipRequest); i { + switch v := v.(*FaceDetectAndClipRequest); i { case 0: return &v.state case 1: diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go index 0d116da6..3d517d67 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go @@ -30,7 +30,7 @@ const ( type MachineLearningServiceClient interface { Train(ctx context.Context, in *TrainRequest, opts ...grpc.CallOption) (*TrainResponse, error) Eval(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_EvalClient, error) - FaceDetectAndClip(ctx context.Context, in *FaceAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) + FaceDetectAndClip(ctx context.Context, in *FaceDetectAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) } type machineLearningServiceClient struct { @@ -81,7 +81,7 @@ func (x *machineLearningServiceEvalClient) Recv() (*EvalResponse, error) { return m, nil } -func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, in *FaceAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) { +func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, in *FaceDetectAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) { out := new(FaceDetectAndClipResponse) err := c.cc.Invoke(ctx, MachineLearningService_FaceDetectAndClip_FullMethodName, in, out, opts...) if err != nil { @@ -96,7 +96,7 @@ func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, in type MachineLearningServiceServer interface { Train(context.Context, *TrainRequest) (*TrainResponse, error) Eval(MachineLearningService_EvalServer) error - FaceDetectAndClip(context.Context, *FaceAndClipRequest) (*FaceDetectAndClipResponse, error) + FaceDetectAndClip(context.Context, *FaceDetectAndClipRequest) (*FaceDetectAndClipResponse, error) } // UnimplementedMachineLearningServiceServer should be embedded to have forward compatible implementations. @@ -109,7 +109,7 @@ func (UnimplementedMachineLearningServiceServer) Train(context.Context, *TrainRe func (UnimplementedMachineLearningServiceServer) Eval(MachineLearningService_EvalServer) error { return status.Errorf(codes.Unimplemented, "method Eval not implemented") } -func (UnimplementedMachineLearningServiceServer) FaceDetectAndClip(context.Context, *FaceAndClipRequest) (*FaceDetectAndClipResponse, error) { +func (UnimplementedMachineLearningServiceServer) FaceDetectAndClip(context.Context, *FaceDetectAndClipRequest) (*FaceDetectAndClipResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FaceDetectAndClip not implemented") } @@ -169,7 +169,7 @@ func (x *machineLearningServiceEvalServer) Recv() (*EvalRequest, error) { } func _MachineLearningService_FaceDetectAndClip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FaceAndClipRequest) + in := new(FaceDetectAndClipRequest) if err := dec(in); err != nil { return nil, err } @@ -181,7 +181,7 @@ func _MachineLearningService_FaceDetectAndClip_Handler(srv interface{}, ctx cont FullMethod: MachineLearningService_FaceDetectAndClip_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MachineLearningServiceServer).FaceDetectAndClip(ctx, req.(*FaceAndClipRequest)) + return srv.(MachineLearningServiceServer).FaceDetectAndClip(ctx, req.(*FaceDetectAndClipRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index 8159f4df..c705f792 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -293,8 +293,8 @@ class FaceDetectAndClipResponse extends $pb.GeneratedMessage { void clearChildId() => clearField(2); } -class FaceAndClipRequest extends $pb.GeneratedMessage { - factory FaceAndClipRequest({ +class FaceDetectAndClipRequest extends $pb.GeneratedMessage { + factory FaceDetectAndClipRequest({ $core.bool? isStarted, }) { final $result = create(); @@ -303,11 +303,11 @@ class FaceAndClipRequest extends $pb.GeneratedMessage { } return $result; } - FaceAndClipRequest._() : super(); - factory FaceAndClipRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory FaceAndClipRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + FaceDetectAndClipRequest._() : super(); + factory FaceDetectAndClipRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FaceDetectAndClipRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FaceAndClipRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FaceDetectAndClipRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'isStarted') ..hasRequiredFields = false ; @@ -316,22 +316,22 @@ class FaceAndClipRequest extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - FaceAndClipRequest clone() => FaceAndClipRequest()..mergeFromMessage(this); + FaceDetectAndClipRequest clone() => FaceDetectAndClipRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - FaceAndClipRequest copyWith(void Function(FaceAndClipRequest) updates) => super.copyWith((message) => updates(message as FaceAndClipRequest)) as FaceAndClipRequest; + FaceDetectAndClipRequest copyWith(void Function(FaceDetectAndClipRequest) updates) => super.copyWith((message) => updates(message as FaceDetectAndClipRequest)) as FaceDetectAndClipRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static FaceAndClipRequest create() => FaceAndClipRequest._(); - FaceAndClipRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static FaceDetectAndClipRequest create() => FaceDetectAndClipRequest._(); + FaceDetectAndClipRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static FaceAndClipRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static FaceAndClipRequest? _defaultInstance; + static FaceDetectAndClipRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FaceDetectAndClipRequest? _defaultInstance; @$pb.TagNumber(1) $core.bool get isStarted => $_getBF(0); diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart index f52bf846..69ae705c 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart @@ -29,9 +29,9 @@ class MachineLearningServiceClient extends $grpc.Client { '/machine_learning.v1.MachineLearningService/Eval', ($1.EvalRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $1.EvalResponse.fromBuffer(value)); - static final _$faceDetectAndClip = $grpc.ClientMethod<$1.FaceAndClipRequest, $1.FaceDetectAndClipResponse>( + static final _$faceDetectAndClip = $grpc.ClientMethod<$1.FaceDetectAndClipRequest, $1.FaceDetectAndClipResponse>( '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', - ($1.FaceAndClipRequest value) => value.writeToBuffer(), + ($1.FaceDetectAndClipRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $1.FaceDetectAndClipResponse.fromBuffer(value)); MachineLearningServiceClient($grpc.ClientChannel channel, @@ -48,7 +48,7 @@ class MachineLearningServiceClient extends $grpc.Client { return $createStreamingCall(_$eval, request, options: options); } - $grpc.ResponseFuture<$1.FaceDetectAndClipResponse> faceDetectAndClip($1.FaceAndClipRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$1.FaceDetectAndClipResponse> faceDetectAndClip($1.FaceDetectAndClipRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$faceDetectAndClip, request, options: options); } } @@ -72,12 +72,12 @@ abstract class MachineLearningServiceBase extends $grpc.Service { true, ($core.List<$core.int> value) => $1.EvalRequest.fromBuffer(value), ($1.EvalResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.FaceAndClipRequest, $1.FaceDetectAndClipResponse>( + $addMethod($grpc.ServiceMethod<$1.FaceDetectAndClipRequest, $1.FaceDetectAndClipResponse>( 'FaceDetectAndClip', faceDetectAndClip_Pre, false, false, - ($core.List<$core.int> value) => $1.FaceAndClipRequest.fromBuffer(value), + ($core.List<$core.int> value) => $1.FaceDetectAndClipRequest.fromBuffer(value), ($1.FaceDetectAndClipResponse value) => value.writeToBuffer())); } @@ -85,11 +85,11 @@ abstract class MachineLearningServiceBase extends $grpc.Service { return train(call, await request); } - $async.Future<$1.FaceDetectAndClipResponse> faceDetectAndClip_Pre($grpc.ServiceCall call, $async.Future<$1.FaceAndClipRequest> request) async { + $async.Future<$1.FaceDetectAndClipResponse> faceDetectAndClip_Pre($grpc.ServiceCall call, $async.Future<$1.FaceDetectAndClipRequest> request) async { return faceDetectAndClip(call, await request); } $async.Future<$1.TrainResponse> train($grpc.ServiceCall call, $1.TrainRequest request); $async.Stream<$1.EvalResponse> eval($grpc.ServiceCall call, $async.Stream<$1.EvalRequest> request); - $async.Future<$1.FaceDetectAndClipResponse> faceDetectAndClip($grpc.ServiceCall call, $1.FaceAndClipRequest request); + $async.Future<$1.FaceDetectAndClipResponse> faceDetectAndClip($grpc.ServiceCall call, $1.FaceDetectAndClipRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index 9e78cf3e..fe7ac58f 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -78,15 +78,16 @@ final $typed_data.Uint8List faceDetectAndClipResponseDescriptor = $convert.base6 'ChlGYWNlRGV0ZWN0QW5kQ2xpcFJlc3BvbnNlEh0KCm51cnNlcnlfaWQYASABKAlSCW51cnNlcn' 'lJZBIZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZA=='); -@$core.Deprecated('Use faceAndClipRequestDescriptor instead') -const FaceAndClipRequest$json = { - '1': 'FaceAndClipRequest', +@$core.Deprecated('Use faceDetectAndClipRequestDescriptor instead') +const FaceDetectAndClipRequest$json = { + '1': 'FaceDetectAndClipRequest', '2': [ {'1': 'is_started', '3': 1, '4': 1, '5': 8, '10': 'isStarted'}, ], }; -/// Descriptor for `FaceAndClipRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List faceAndClipRequestDescriptor = $convert.base64Decode( - 'ChJGYWNlQW5kQ2xpcFJlcXVlc3QSHQoKaXNfc3RhcnRlZBgBIAEoCFIJaXNTdGFydGVk'); +/// Descriptor for `FaceDetectAndClipRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List faceDetectAndClipRequestDescriptor = $convert.base64Decode( + 'ChhGYWNlRGV0ZWN0QW5kQ2xpcFJlcXVlc3QSHQoKaXNfc3RhcnRlZBgBIAEoCFIJaXNTdGFydG' + 'Vk'); diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py index f3975123..7db292c6 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"_\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x03(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"$\n\x0b\x45valRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\")\n\x0c\x45valResponse\x12\x19\n\x08\x63hild_id\x18\x01 \x03(\tR\x07\x63hildId\"U\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\"3\n\x12\x46\x61\x63\x65\x41ndClipRequest\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xa7\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04\x45val\x12 .machine_learning.v1.EvalRequest\x1a!.machine_learning.v1.EvalResponse(\x01\x30\x01\x12l\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12\'.machine_learning.v1.FaceAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"_\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x03(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"$\n\x0b\x45valRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\")\n\x0c\x45valResponse\x12\x19\n\x08\x63hild_id\x18\x01 \x03(\tR\x07\x63hildId\"U\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\"9\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04\x45val\x12 .machine_learning.v1.EvalRequest\x1a!.machine_learning.v1.EvalResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -32,8 +32,8 @@ _globals['_EVALRESPONSE']._serialized_end=291 _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=293 _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=378 - _globals['_FACEANDCLIPREQUEST']._serialized_start=380 - _globals['_FACEANDCLIPREQUEST']._serialized_end=431 - _globals['_MACHINELEARNINGSERVICE']._serialized_start=434 - _globals['_MACHINELEARNINGSERVICE']._serialized_end=729 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=380 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=437 + _globals['_MACHINELEARNINGSERVICE']._serialized_start=440 + _globals['_MACHINELEARNINGSERVICE']._serialized_end=741 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi index 71309701..66d89ce4 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi @@ -41,7 +41,7 @@ class FaceDetectAndClipResponse(_message.Message): child_id: str def __init__(self, nursery_id: _Optional[str] = ..., child_id: _Optional[str] = ...) -> None: ... -class FaceAndClipRequest(_message.Message): +class FaceDetectAndClipRequest(_message.Message): __slots__ = ("is_started",) IS_STARTED_FIELD_NUMBER: _ClassVar[int] is_started: bool diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py index 92b94b55..846749d7 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py @@ -3,7 +3,9 @@ import grpc import grpc.experimental -import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 +from machine_learning.v1 import ( + machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2, +) class MachineLearningServiceStub(object): @@ -16,20 +18,20 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Train = channel.unary_unary( - '/machine_learning.v1.MachineLearningService/Train', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/Train", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, + ) self.Eval = channel.stream_stream( - '/machine_learning.v1.MachineLearningService/Eval', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/Eval", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.FromString, + ) self.FaceDetectAndClip = channel.unary_unary( - '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceAndClipRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, + ) class MachineLearningServiceServicer(object): @@ -38,96 +40,133 @@ class MachineLearningServiceServicer(object): def Train(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def Eval(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def FaceDetectAndClip(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_MachineLearningServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'Train': grpc.unary_unary_rpc_method_handler( - servicer.Train, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, - ), - 'Eval': grpc.stream_stream_rpc_method_handler( - servicer.Eval, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.SerializeToString, - ), - 'FaceDetectAndClip': grpc.unary_unary_rpc_method_handler( - servicer.FaceDetectAndClip, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceAndClipRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, - ), + "Train": grpc.unary_unary_rpc_method_handler( + servicer.Train, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, + ), + "Eval": grpc.stream_stream_rpc_method_handler( + servicer.Eval, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.SerializeToString, + ), + "FaceDetectAndClip": grpc.unary_unary_rpc_method_handler( + servicer.FaceDetectAndClip, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'machine_learning.v1.MachineLearningService', rpc_method_handlers) + "machine_learning.v1.MachineLearningService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class MachineLearningService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Train(request, + def Train( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/Train', + "/machine_learning.v1.MachineLearningService/Train", machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def Eval(request_iterator, + def Eval( + request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.stream_stream( + request_iterator, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.stream_stream(request_iterator, target, '/machine_learning.v1.MachineLearningService/Eval', + "/machine_learning.v1.MachineLearningService/Eval", machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def FaceDetectAndClip(request, + def FaceDetectAndClip( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', - machine__learning_dot_v1_dot_machine__learning__pb2.FaceAndClipRequest.SerializeToString, + "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", + machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index 52127c83..e011c59e 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -5,7 +5,7 @@ package machine_learning.v1; service MachineLearningService { rpc Train(TrainRequest) returns (TrainResponse); rpc Eval(stream EvalRequest) returns (stream EvalResponse); - rpc FaceDetectAndClip(FaceAndClipRequest) returns (FaceDetectAndClipResponse); + rpc FaceDetectAndClip(FaceDetectAndClipRequest) returns (FaceDetectAndClipResponse); } message TrainRequest { @@ -32,7 +32,7 @@ message FaceDetectAndClipResponse { string child_id = 2; } -message FaceAndClipRequest { +message FaceDetectAndClipRequest { bool is_started = 1; } From 64b7b0520ae3cb028832a4b37d972a9a66945b9c Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 21:36:56 +0900 Subject: [PATCH 369/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E9=81=8B=E8=A1=8C=E7=8A=B6=E6=85=8B=E3=82=92=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/bus.go | 5 +++++ backend/usecases/bus/bus.go | 40 +++++++++++++++++++++++++++++++++ backend/usecases/utils/utils.go | 14 ++++++++++++ 3 files changed, 59 insertions(+) diff --git a/backend/interfaces/bus.go b/backend/interfaces/bus.go index 84e18dbf..55ad79f6 100644 --- a/backend/interfaces/bus.go +++ b/backend/interfaces/bus.go @@ -24,3 +24,8 @@ func (s *busServiceServer) CreateBus(ctx context.Context, req *pb.CreateBusReque func (s *busServiceServer) GetBusListByNurseryId(ctx context.Context, req *pb.GetBusListByNurseryIdRequest) (*pb.GetBusListByNurseryIdResponse, error) { return s.interactor.GetBusListByNurseryID(ctx, req) } + +// ChangeBusStatus implements where_child_busv1.BusServiceServer. +func (s *busServiceServer) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatusRequest) (*pb.ChangeBusStatusResponse, error) { + return s.interactor.ChangeBusStatus(ctx, req) +} diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index fdf985cf..857d32bb 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -188,6 +188,46 @@ func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusLi return &pb.GetBusListByNurseryIdResponse{Buses: buses}, nil } +func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatusRequest) (*pb.ChangeBusStatusResponse, error) { + busID, err := uuid.Parse(req.BusId) + if err != nil { + return nil, fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) + } + + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + + status, err := utils.ConvertPbStatusToEntStatus(req.Status) + if err != nil { + return nil, fmt.Errorf("failed to convert status: %w", err) + } + + bus, err := tx.Bus.UpdateOneID(busID). + SetStatus(*status). + Save(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to update bus: %w", err) + } + + // Nurseryエッジを持つBusを取得 + bus, err = tx.Bus.Query(). + Where(busRepo.IDEQ(bus.ID)). + WithNursery(). + Only(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to get bus: %w", err) + } + + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + return &pb.ChangeBusStatusResponse{Bus: utils.ToPbBus(bus)}, nil +} + func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.BusQuery, error)) ([]*pb.Bus, error) { tx, err := i.entClient.Tx(ctx) if err != nil { diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index a676c5d0..756267c7 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -45,6 +45,20 @@ func convertSexToPbSex(sex child.Sex) pb.Sex { } } +func ConvertPbStatusToEntStatus(pbStatus pb.Status) (*bus.Status, error) { + switch pbStatus { + case pb.Status_STATUS_RUNNING: + status := bus.StatusRunning + return &status, nil + case pb.Status_STATUS_STOPPED: + status := bus.StatusStopped + return &status, nil + default: + // 不正な値の場合はエラーを返す + return nil, fmt.Errorf("invalid Status value: %v", pbStatus) + } +} + func ToPbBus(t *ent.Bus) *pb.Bus { status := convertStatusToPbStatus(t.Status) return &pb.Bus{ From 3bc28bbfc14f0f54bfd60971d004d7e9983dadf7 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 16 Feb 2024 21:36:57 +0900 Subject: [PATCH 370/771] =?UTF-8?q?refactor(ml):=20=E9=A1=94=E6=8E=A8?= =?UTF-8?q?=E8=AB=96=E7=94=A8=E3=81=AE=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89?= =?UTF-8?q?=E3=81=AB=E5=AF=BE=E3=81=99=E3=82=8B=E3=83=AA=E3=83=8D=E3=83=BC?= =?UTF-8?q?=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 60 +++++++++---------- .../v1/machine_learning_grpc.pb.go | 52 ++++++++-------- .../v1/machine_learning.pb.dart | 52 ++++++++-------- .../v1/machine_learning.pbgrpc.dart | 24 ++++---- .../v1/machine_learning.pbjson.dart | 24 ++++---- .../v1/machine_learning_pb2.py | 10 ++-- .../v1/machine_learning_pb2.pyi | 4 +- .../v1/machine_learning_pb2_grpc.py | 26 ++++---- .../v1/machine_learning.proto | 6 +- 9 files changed, 129 insertions(+), 129 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index e136aac2..cf5e748b 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -130,7 +130,7 @@ func (x *TrainResponse) GetIsStarted() bool { return false } -type EvalRequest struct { +type PredRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -138,8 +138,8 @@ type EvalRequest struct { BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` // TODO: add video data } -func (x *EvalRequest) Reset() { - *x = EvalRequest{} +func (x *PredRequest) Reset() { + *x = PredRequest{} if protoimpl.UnsafeEnabled { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -147,13 +147,13 @@ func (x *EvalRequest) Reset() { } } -func (x *EvalRequest) String() string { +func (x *PredRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EvalRequest) ProtoMessage() {} +func (*PredRequest) ProtoMessage() {} -func (x *EvalRequest) ProtoReflect() protoreflect.Message { +func (x *PredRequest) ProtoReflect() protoreflect.Message { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -165,19 +165,19 @@ func (x *EvalRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EvalRequest.ProtoReflect.Descriptor instead. -func (*EvalRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PredRequest.ProtoReflect.Descriptor instead. +func (*PredRequest) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{2} } -func (x *EvalRequest) GetBusId() string { +func (x *PredRequest) GetBusId() string { if x != nil { return x.BusId } return "" } -type EvalResponse struct { +type PredResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -185,8 +185,8 @@ type EvalResponse struct { ChildId []string `protobuf:"bytes,1,rep,name=child_id,json=childId,proto3" json:"child_id,omitempty"` } -func (x *EvalResponse) Reset() { - *x = EvalResponse{} +func (x *PredResponse) Reset() { + *x = PredResponse{} if protoimpl.UnsafeEnabled { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -194,13 +194,13 @@ func (x *EvalResponse) Reset() { } } -func (x *EvalResponse) String() string { +func (x *PredResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EvalResponse) ProtoMessage() {} +func (*PredResponse) ProtoMessage() {} -func (x *EvalResponse) ProtoReflect() protoreflect.Message { +func (x *PredResponse) ProtoReflect() protoreflect.Message { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -212,12 +212,12 @@ func (x *EvalResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EvalResponse.ProtoReflect.Descriptor instead. -func (*EvalResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PredResponse.ProtoReflect.Descriptor instead. +func (*PredResponse) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{3} } -func (x *EvalResponse) GetChildId() []string { +func (x *PredResponse) GetChildId() []string { if x != nil { return x.ChildId } @@ -342,9 +342,9 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x65, 0x64, 0x22, 0x24, 0x0a, 0x0b, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x65, 0x64, 0x22, 0x24, 0x0a, 0x0b, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0c, 0x45, 0x76, 0x61, 0x6c, + 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x55, 0x0a, 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, @@ -363,11 +363,11 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4f, 0x0a, 0x04, 0x45, 0x76, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, + 0x12, 0x4f, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, + 0x2e, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, @@ -411,17 +411,17 @@ var file_machine_learning_v1_machine_learning_proto_msgTypes = make([]protoimpl. var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ (*TrainRequest)(nil), // 0: machine_learning.v1.TrainRequest (*TrainResponse)(nil), // 1: machine_learning.v1.TrainResponse - (*EvalRequest)(nil), // 2: machine_learning.v1.EvalRequest - (*EvalResponse)(nil), // 3: machine_learning.v1.EvalResponse + (*PredRequest)(nil), // 2: machine_learning.v1.PredRequest + (*PredResponse)(nil), // 3: machine_learning.v1.PredResponse (*FaceDetectAndClipResponse)(nil), // 4: machine_learning.v1.FaceDetectAndClipResponse (*FaceDetectAndClipRequest)(nil), // 5: machine_learning.v1.FaceDetectAndClipRequest } var file_machine_learning_v1_machine_learning_proto_depIdxs = []int32{ 0, // 0: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest - 2, // 1: machine_learning.v1.MachineLearningService.Eval:input_type -> machine_learning.v1.EvalRequest + 2, // 1: machine_learning.v1.MachineLearningService.Pred:input_type -> machine_learning.v1.PredRequest 5, // 2: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest 1, // 3: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse - 3, // 4: machine_learning.v1.MachineLearningService.Eval:output_type -> machine_learning.v1.EvalResponse + 3, // 4: machine_learning.v1.MachineLearningService.Pred:output_type -> machine_learning.v1.PredResponse 4, // 5: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse 3, // [3:6] is the sub-list for method output_type 0, // [0:3] is the sub-list for method input_type @@ -461,7 +461,7 @@ func file_machine_learning_v1_machine_learning_proto_init() { } } file_machine_learning_v1_machine_learning_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvalRequest); i { + switch v := v.(*PredRequest); i { case 0: return &v.state case 1: @@ -473,7 +473,7 @@ func file_machine_learning_v1_machine_learning_proto_init() { } } file_machine_learning_v1_machine_learning_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvalResponse); i { + switch v := v.(*PredResponse); i { case 0: return &v.state case 1: diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go index 3d517d67..b6f98178 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go @@ -20,7 +20,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( MachineLearningService_Train_FullMethodName = "/machine_learning.v1.MachineLearningService/Train" - MachineLearningService_Eval_FullMethodName = "/machine_learning.v1.MachineLearningService/Eval" + MachineLearningService_Pred_FullMethodName = "/machine_learning.v1.MachineLearningService/Pred" MachineLearningService_FaceDetectAndClip_FullMethodName = "/machine_learning.v1.MachineLearningService/FaceDetectAndClip" ) @@ -29,7 +29,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MachineLearningServiceClient interface { Train(ctx context.Context, in *TrainRequest, opts ...grpc.CallOption) (*TrainResponse, error) - Eval(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_EvalClient, error) + Pred(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_PredClient, error) FaceDetectAndClip(ctx context.Context, in *FaceDetectAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) } @@ -50,31 +50,31 @@ func (c *machineLearningServiceClient) Train(ctx context.Context, in *TrainReque return out, nil } -func (c *machineLearningServiceClient) Eval(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_EvalClient, error) { - stream, err := c.cc.NewStream(ctx, &MachineLearningService_ServiceDesc.Streams[0], MachineLearningService_Eval_FullMethodName, opts...) +func (c *machineLearningServiceClient) Pred(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_PredClient, error) { + stream, err := c.cc.NewStream(ctx, &MachineLearningService_ServiceDesc.Streams[0], MachineLearningService_Pred_FullMethodName, opts...) if err != nil { return nil, err } - x := &machineLearningServiceEvalClient{stream} + x := &machineLearningServicePredClient{stream} return x, nil } -type MachineLearningService_EvalClient interface { - Send(*EvalRequest) error - Recv() (*EvalResponse, error) +type MachineLearningService_PredClient interface { + Send(*PredRequest) error + Recv() (*PredResponse, error) grpc.ClientStream } -type machineLearningServiceEvalClient struct { +type machineLearningServicePredClient struct { grpc.ClientStream } -func (x *machineLearningServiceEvalClient) Send(m *EvalRequest) error { +func (x *machineLearningServicePredClient) Send(m *PredRequest) error { return x.ClientStream.SendMsg(m) } -func (x *machineLearningServiceEvalClient) Recv() (*EvalResponse, error) { - m := new(EvalResponse) +func (x *machineLearningServicePredClient) Recv() (*PredResponse, error) { + m := new(PredResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -95,7 +95,7 @@ func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, in // for forward compatibility type MachineLearningServiceServer interface { Train(context.Context, *TrainRequest) (*TrainResponse, error) - Eval(MachineLearningService_EvalServer) error + Pred(MachineLearningService_PredServer) error FaceDetectAndClip(context.Context, *FaceDetectAndClipRequest) (*FaceDetectAndClipResponse, error) } @@ -106,8 +106,8 @@ type UnimplementedMachineLearningServiceServer struct { func (UnimplementedMachineLearningServiceServer) Train(context.Context, *TrainRequest) (*TrainResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Train not implemented") } -func (UnimplementedMachineLearningServiceServer) Eval(MachineLearningService_EvalServer) error { - return status.Errorf(codes.Unimplemented, "method Eval not implemented") +func (UnimplementedMachineLearningServiceServer) Pred(MachineLearningService_PredServer) error { + return status.Errorf(codes.Unimplemented, "method Pred not implemented") } func (UnimplementedMachineLearningServiceServer) FaceDetectAndClip(context.Context, *FaceDetectAndClipRequest) (*FaceDetectAndClipResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FaceDetectAndClip not implemented") @@ -142,26 +142,26 @@ func _MachineLearningService_Train_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _MachineLearningService_Eval_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(MachineLearningServiceServer).Eval(&machineLearningServiceEvalServer{stream}) +func _MachineLearningService_Pred_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(MachineLearningServiceServer).Pred(&machineLearningServicePredServer{stream}) } -type MachineLearningService_EvalServer interface { - Send(*EvalResponse) error - Recv() (*EvalRequest, error) +type MachineLearningService_PredServer interface { + Send(*PredResponse) error + Recv() (*PredRequest, error) grpc.ServerStream } -type machineLearningServiceEvalServer struct { +type machineLearningServicePredServer struct { grpc.ServerStream } -func (x *machineLearningServiceEvalServer) Send(m *EvalResponse) error { +func (x *machineLearningServicePredServer) Send(m *PredResponse) error { return x.ServerStream.SendMsg(m) } -func (x *machineLearningServiceEvalServer) Recv() (*EvalRequest, error) { - m := new(EvalRequest) +func (x *machineLearningServicePredServer) Recv() (*PredRequest, error) { + m := new(PredRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } @@ -204,8 +204,8 @@ var MachineLearningService_ServiceDesc = grpc.ServiceDesc{ }, Streams: []grpc.StreamDesc{ { - StreamName: "Eval", - Handler: _MachineLearningService_Eval_Handler, + StreamName: "Pred", + Handler: _MachineLearningService_Pred_Handler, ServerStreams: true, ClientStreams: true, }, diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index c705f792..272993e6 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -135,8 +135,8 @@ class TrainResponse extends $pb.GeneratedMessage { void clearIsStarted() => clearField(1); } -class EvalRequest extends $pb.GeneratedMessage { - factory EvalRequest({ +class PredRequest extends $pb.GeneratedMessage { + factory PredRequest({ $core.String? busId, }) { final $result = create(); @@ -145,11 +145,11 @@ class EvalRequest extends $pb.GeneratedMessage { } return $result; } - EvalRequest._() : super(); - factory EvalRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory EvalRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + PredRequest._() : super(); + factory PredRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PredRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EvalRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PredRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') ..hasRequiredFields = false ; @@ -158,22 +158,22 @@ class EvalRequest extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - EvalRequest clone() => EvalRequest()..mergeFromMessage(this); + PredRequest clone() => PredRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - EvalRequest copyWith(void Function(EvalRequest) updates) => super.copyWith((message) => updates(message as EvalRequest)) as EvalRequest; + PredRequest copyWith(void Function(PredRequest) updates) => super.copyWith((message) => updates(message as PredRequest)) as PredRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static EvalRequest create() => EvalRequest._(); - EvalRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static PredRequest create() => PredRequest._(); + PredRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static EvalRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static EvalRequest? _defaultInstance; + static PredRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PredRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get busId => $_getSZ(0); @@ -185,8 +185,8 @@ class EvalRequest extends $pb.GeneratedMessage { void clearBusId() => clearField(1); } -class EvalResponse extends $pb.GeneratedMessage { - factory EvalResponse({ +class PredResponse extends $pb.GeneratedMessage { + factory PredResponse({ $core.Iterable<$core.String>? childId, }) { final $result = create(); @@ -195,11 +195,11 @@ class EvalResponse extends $pb.GeneratedMessage { } return $result; } - EvalResponse._() : super(); - factory EvalResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory EvalResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + PredResponse._() : super(); + factory PredResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PredResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EvalResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PredResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) ..pPS(1, _omitFieldNames ? '' : 'childId') ..hasRequiredFields = false ; @@ -208,22 +208,22 @@ class EvalResponse extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - EvalResponse clone() => EvalResponse()..mergeFromMessage(this); + PredResponse clone() => PredResponse()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - EvalResponse copyWith(void Function(EvalResponse) updates) => super.copyWith((message) => updates(message as EvalResponse)) as EvalResponse; + PredResponse copyWith(void Function(PredResponse) updates) => super.copyWith((message) => updates(message as PredResponse)) as PredResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static EvalResponse create() => EvalResponse._(); - EvalResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static PredResponse create() => PredResponse._(); + PredResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static EvalResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static EvalResponse? _defaultInstance; + static PredResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PredResponse? _defaultInstance; @$pb.TagNumber(1) $core.List<$core.String> get childId => $_getList(0); diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart index 69ae705c..e22f558e 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart @@ -25,10 +25,10 @@ class MachineLearningServiceClient extends $grpc.Client { '/machine_learning.v1.MachineLearningService/Train', ($1.TrainRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $1.TrainResponse.fromBuffer(value)); - static final _$eval = $grpc.ClientMethod<$1.EvalRequest, $1.EvalResponse>( - '/machine_learning.v1.MachineLearningService/Eval', - ($1.EvalRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.EvalResponse.fromBuffer(value)); + static final _$pred = $grpc.ClientMethod<$1.PredRequest, $1.PredResponse>( + '/machine_learning.v1.MachineLearningService/Pred', + ($1.PredRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.PredResponse.fromBuffer(value)); static final _$faceDetectAndClip = $grpc.ClientMethod<$1.FaceDetectAndClipRequest, $1.FaceDetectAndClipResponse>( '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', ($1.FaceDetectAndClipRequest value) => value.writeToBuffer(), @@ -44,8 +44,8 @@ class MachineLearningServiceClient extends $grpc.Client { return $createUnaryCall(_$train, request, options: options); } - $grpc.ResponseStream<$1.EvalResponse> eval($async.Stream<$1.EvalRequest> request, {$grpc.CallOptions? options}) { - return $createStreamingCall(_$eval, request, options: options); + $grpc.ResponseStream<$1.PredResponse> pred($async.Stream<$1.PredRequest> request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$pred, request, options: options); } $grpc.ResponseFuture<$1.FaceDetectAndClipResponse> faceDetectAndClip($1.FaceDetectAndClipRequest request, {$grpc.CallOptions? options}) { @@ -65,13 +65,13 @@ abstract class MachineLearningServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $1.TrainRequest.fromBuffer(value), ($1.TrainResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.EvalRequest, $1.EvalResponse>( - 'Eval', - eval, + $addMethod($grpc.ServiceMethod<$1.PredRequest, $1.PredResponse>( + 'Pred', + pred, true, true, - ($core.List<$core.int> value) => $1.EvalRequest.fromBuffer(value), - ($1.EvalResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $1.PredRequest.fromBuffer(value), + ($1.PredResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.FaceDetectAndClipRequest, $1.FaceDetectAndClipResponse>( 'FaceDetectAndClip', faceDetectAndClip_Pre, @@ -90,6 +90,6 @@ abstract class MachineLearningServiceBase extends $grpc.Service { } $async.Future<$1.TrainResponse> train($grpc.ServiceCall call, $1.TrainRequest request); - $async.Stream<$1.EvalResponse> eval($grpc.ServiceCall call, $async.Stream<$1.EvalRequest> request); + $async.Stream<$1.PredResponse> pred($grpc.ServiceCall call, $async.Stream<$1.PredRequest> request); $async.Future<$1.FaceDetectAndClipResponse> faceDetectAndClip($grpc.ServiceCall call, $1.FaceDetectAndClipRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index fe7ac58f..156b2270 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -40,29 +40,29 @@ const TrainResponse$json = { final $typed_data.Uint8List trainResponseDescriptor = $convert.base64Decode( 'Cg1UcmFpblJlc3BvbnNlEh0KCmlzX3N0YXJ0ZWQYASABKAhSCWlzU3RhcnRlZA=='); -@$core.Deprecated('Use evalRequestDescriptor instead') -const EvalRequest$json = { - '1': 'EvalRequest', +@$core.Deprecated('Use predRequestDescriptor instead') +const PredRequest$json = { + '1': 'PredRequest', '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, ], }; -/// Descriptor for `EvalRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List evalRequestDescriptor = $convert.base64Decode( - 'CgtFdmFsUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lk'); +/// Descriptor for `PredRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List predRequestDescriptor = $convert.base64Decode( + 'CgtQcmVkUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lk'); -@$core.Deprecated('Use evalResponseDescriptor instead') -const EvalResponse$json = { - '1': 'EvalResponse', +@$core.Deprecated('Use predResponseDescriptor instead') +const PredResponse$json = { + '1': 'PredResponse', '2': [ {'1': 'child_id', '3': 1, '4': 3, '5': 9, '10': 'childId'}, ], }; -/// Descriptor for `EvalResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List evalResponseDescriptor = $convert.base64Decode( - 'CgxFdmFsUmVzcG9uc2USGQoIY2hpbGRfaWQYASADKAlSB2NoaWxkSWQ='); +/// Descriptor for `PredResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List predResponseDescriptor = $convert.base64Decode( + 'CgxQcmVkUmVzcG9uc2USGQoIY2hpbGRfaWQYASADKAlSB2NoaWxkSWQ='); @$core.Deprecated('Use faceDetectAndClipResponseDescriptor instead') const FaceDetectAndClipResponse$json = { diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py index 7db292c6..9c21d3d4 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"_\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x03(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"$\n\x0b\x45valRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\")\n\x0c\x45valResponse\x12\x19\n\x08\x63hild_id\x18\x01 \x03(\tR\x07\x63hildId\"U\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\"9\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04\x45val\x12 .machine_learning.v1.EvalRequest\x1a!.machine_learning.v1.EvalResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"_\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x03(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"$\n\x0bPredRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\")\n\x0cPredResponse\x12\x19\n\x08\x63hild_id\x18\x01 \x03(\tR\x07\x63hildId\"U\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\"9\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04Pred\x12 .machine_learning.v1.PredRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,10 +26,10 @@ _globals['_TRAINREQUEST']._serialized_end=162 _globals['_TRAINRESPONSE']._serialized_start=164 _globals['_TRAINRESPONSE']._serialized_end=210 - _globals['_EVALREQUEST']._serialized_start=212 - _globals['_EVALREQUEST']._serialized_end=248 - _globals['_EVALRESPONSE']._serialized_start=250 - _globals['_EVALRESPONSE']._serialized_end=291 + _globals['_PREDREQUEST']._serialized_start=212 + _globals['_PREDREQUEST']._serialized_end=248 + _globals['_PREDRESPONSE']._serialized_start=250 + _globals['_PREDRESPONSE']._serialized_end=291 _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=293 _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=378 _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=380 diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi index 66d89ce4..4b8bec81 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi @@ -21,13 +21,13 @@ class TrainResponse(_message.Message): is_started: bool def __init__(self, is_started: bool = ...) -> None: ... -class EvalRequest(_message.Message): +class PredRequest(_message.Message): __slots__ = ("bus_id",) BUS_ID_FIELD_NUMBER: _ClassVar[int] bus_id: str def __init__(self, bus_id: _Optional[str] = ...) -> None: ... -class EvalResponse(_message.Message): +class PredResponse(_message.Message): __slots__ = ("child_id",) CHILD_ID_FIELD_NUMBER: _ClassVar[int] child_id: _containers.RepeatedScalarFieldContainer[str] diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py index 846749d7..9905ccd4 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py @@ -22,10 +22,10 @@ def __init__(self, channel): request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, ) - self.Eval = channel.stream_stream( - "/machine_learning.v1.MachineLearningService/Eval", - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.FromString, + self.Pred = channel.stream_stream( + "/machine_learning.v1.MachineLearningService/Pred", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, ) self.FaceDetectAndClip = channel.unary_unary( "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", @@ -43,7 +43,7 @@ def Train(self, request, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") - def Eval(self, request_iterator, context): + def Pred(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -63,10 +63,10 @@ def add_MachineLearningServiceServicer_to_server(servicer, server): request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, ), - "Eval": grpc.stream_stream_rpc_method_handler( - servicer.Eval, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.SerializeToString, + "Pred": grpc.stream_stream_rpc_method_handler( + servicer.Pred, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, ), "FaceDetectAndClip": grpc.unary_unary_rpc_method_handler( servicer.FaceDetectAndClip, @@ -114,7 +114,7 @@ def Train( ) @staticmethod - def Eval( + def Pred( request_iterator, target, options=(), @@ -129,9 +129,9 @@ def Eval( return grpc.experimental.stream_stream( request_iterator, target, - "/machine_learning.v1.MachineLearningService/Eval", - machine__learning_dot_v1_dot_machine__learning__pb2.EvalRequest.SerializeToString, - machine__learning_dot_v1_dot_machine__learning__pb2.EvalResponse.FromString, + "/machine_learning.v1.MachineLearningService/Pred", + machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.SerializeToString, + machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, options, channel_credentials, insecure, diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index e011c59e..2097acc6 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -4,7 +4,7 @@ package machine_learning.v1; service MachineLearningService { rpc Train(TrainRequest) returns (TrainResponse); - rpc Eval(stream EvalRequest) returns (stream EvalResponse); + rpc Pred(stream PredRequest) returns (stream PredResponse); rpc FaceDetectAndClip(FaceDetectAndClipRequest) returns (FaceDetectAndClipResponse); } @@ -18,12 +18,12 @@ message TrainResponse { bool is_started = 1; } -message EvalRequest { +message PredRequest { string bus_id = 1; // TODO: add video data } -message EvalResponse { +message PredResponse { repeated string child_id = 1; } From 8ce5b5e1eaef3113d61e892717e9f690f2e559a8 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 16 Feb 2024 21:44:13 +0900 Subject: [PATCH 371/771] =?UTF-8?q?chore(ml):=20machine-learning=E3=81=AB?= =?UTF-8?q?=E5=AF=BE=E3=81=99=E3=82=8BgRPC=E3=81=AEClass=E3=81=8A=E3=82=88?= =?UTF-8?q?=E3=81=B3=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=82=92=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/machine_learning/v1/server.py | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 52c2e476..82fdd1e0 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -4,6 +4,7 @@ import machine_learning_pb2_grpc from grpc_reflection.v1alpha import reflection + class HealthCheck(machine_learning_pb2_grpc.MachineLearningServiceServicer): def Ping(self, request, context): print("RECV: %s" % request.message) @@ -11,20 +12,39 @@ def Ping(self, request, context): print("SEND: %s" % message) return machine_learning_pb2.PingResponse(message=message) + +class MachineLearningServiceServicer( + machine_learning_pb2_grpc.MachineLearningServiceServicer +): + def Predict(self, request, context): + pass + + def Train(self, request, context): + pass + + def FaceDetectAndClip(self, request, context): + pass + + def serve(): server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) - machine_learning_pb2_grpc.add_MachineLearningServiceServicer_to_server(HealthCheck(), server) + machine_learning_pb2_grpc.add_MachineLearningServiceServicer_to_server( + HealthCheck(), server + ) # Reflection APIの設定 SERVICE_NAMES = ( - machine_learning_pb2.DESCRIPTOR.services_by_name['MachineLearningService'].full_name, + machine_learning_pb2.DESCRIPTOR.services_by_name[ + "MachineLearningService" + ].full_name, reflection.SERVICE_NAME, ) reflection.enable_server_reflection(SERVICE_NAMES, server) - server.add_insecure_port('[::]:8080') + server.add_insecure_port("[::]:8080") server.start() server.wait_for_termination() -if __name__ == '__main__': + +if __name__ == "__main__": serve() From f33a779c1a9f631750b0b05cf3f7b591787eeb7f Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 16 Feb 2024 22:03:20 +0900 Subject: [PATCH 372/771] =?UTF-8?q?fix(ml):=20typo=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 66 +++---- .../v1/machine_learning.pb.dart | 52 ++--- .../v1/machine_learning.pbjson.dart | 28 +-- .../v1/machine_learning_pb2.py | 10 +- .../v1/machine_learning_pb2.pyi | 4 +- .../v1/machine_learning_pb2_grpc.py | 184 +++++++----------- .../v1/machine_learning.proto | 4 +- 7 files changed, 154 insertions(+), 194 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index cf5e748b..dff1f444 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -224,7 +224,7 @@ func (x *PredResponse) GetChildId() []string { return nil } -type FaceDetectAndClipResponse struct { +type FaceDetectAndClipRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -233,8 +233,8 @@ type FaceDetectAndClipResponse struct { ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` } -func (x *FaceDetectAndClipResponse) Reset() { - *x = FaceDetectAndClipResponse{} +func (x *FaceDetectAndClipRequest) Reset() { + *x = FaceDetectAndClipRequest{} if protoimpl.UnsafeEnabled { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -242,13 +242,13 @@ func (x *FaceDetectAndClipResponse) Reset() { } } -func (x *FaceDetectAndClipResponse) String() string { +func (x *FaceDetectAndClipRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FaceDetectAndClipResponse) ProtoMessage() {} +func (*FaceDetectAndClipRequest) ProtoMessage() {} -func (x *FaceDetectAndClipResponse) ProtoReflect() protoreflect.Message { +func (x *FaceDetectAndClipRequest) ProtoReflect() protoreflect.Message { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -260,26 +260,26 @@ func (x *FaceDetectAndClipResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FaceDetectAndClipResponse.ProtoReflect.Descriptor instead. -func (*FaceDetectAndClipResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use FaceDetectAndClipRequest.ProtoReflect.Descriptor instead. +func (*FaceDetectAndClipRequest) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{4} } -func (x *FaceDetectAndClipResponse) GetNurseryId() string { +func (x *FaceDetectAndClipRequest) GetNurseryId() string { if x != nil { return x.NurseryId } return "" } -func (x *FaceDetectAndClipResponse) GetChildId() string { +func (x *FaceDetectAndClipRequest) GetChildId() string { if x != nil { return x.ChildId } return "" } -type FaceDetectAndClipRequest struct { +type FaceDetectAndClipResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -287,8 +287,8 @@ type FaceDetectAndClipRequest struct { IsStarted bool `protobuf:"varint,1,opt,name=is_started,json=isStarted,proto3" json:"is_started,omitempty"` } -func (x *FaceDetectAndClipRequest) Reset() { - *x = FaceDetectAndClipRequest{} +func (x *FaceDetectAndClipResponse) Reset() { + *x = FaceDetectAndClipResponse{} if protoimpl.UnsafeEnabled { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -296,13 +296,13 @@ func (x *FaceDetectAndClipRequest) Reset() { } } -func (x *FaceDetectAndClipRequest) String() string { +func (x *FaceDetectAndClipResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FaceDetectAndClipRequest) ProtoMessage() {} +func (*FaceDetectAndClipResponse) ProtoMessage() {} -func (x *FaceDetectAndClipRequest) ProtoReflect() protoreflect.Message { +func (x *FaceDetectAndClipResponse) ProtoReflect() protoreflect.Message { mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -314,12 +314,12 @@ func (x *FaceDetectAndClipRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FaceDetectAndClipRequest.ProtoReflect.Descriptor instead. -func (*FaceDetectAndClipRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use FaceDetectAndClipResponse.ProtoReflect.Descriptor instead. +func (*FaceDetectAndClipResponse) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{5} } -func (x *FaceDetectAndClipRequest) GetIsStarted() bool { +func (x *FaceDetectAndClipResponse) GetIsStarted() bool { if x != nil { return x.IsStarted } @@ -347,14 +347,14 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x49, 0x64, 0x22, 0x55, 0x0a, 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, - 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, - 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x18, 0x46, 0x61, - 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, + 0x64, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x19, 0x46, 0x61, 0x63, + 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x32, 0xad, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, @@ -413,16 +413,16 @@ var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ (*TrainResponse)(nil), // 1: machine_learning.v1.TrainResponse (*PredRequest)(nil), // 2: machine_learning.v1.PredRequest (*PredResponse)(nil), // 3: machine_learning.v1.PredResponse - (*FaceDetectAndClipResponse)(nil), // 4: machine_learning.v1.FaceDetectAndClipResponse - (*FaceDetectAndClipRequest)(nil), // 5: machine_learning.v1.FaceDetectAndClipRequest + (*FaceDetectAndClipRequest)(nil), // 4: machine_learning.v1.FaceDetectAndClipRequest + (*FaceDetectAndClipResponse)(nil), // 5: machine_learning.v1.FaceDetectAndClipResponse } var file_machine_learning_v1_machine_learning_proto_depIdxs = []int32{ 0, // 0: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest 2, // 1: machine_learning.v1.MachineLearningService.Pred:input_type -> machine_learning.v1.PredRequest - 5, // 2: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest + 4, // 2: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest 1, // 3: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse 3, // 4: machine_learning.v1.MachineLearningService.Pred:output_type -> machine_learning.v1.PredResponse - 4, // 5: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse + 5, // 5: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse 3, // [3:6] is the sub-list for method output_type 0, // [0:3] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -485,7 +485,7 @@ func file_machine_learning_v1_machine_learning_proto_init() { } } file_machine_learning_v1_machine_learning_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FaceDetectAndClipResponse); i { + switch v := v.(*FaceDetectAndClipRequest); i { case 0: return &v.state case 1: @@ -497,7 +497,7 @@ func file_machine_learning_v1_machine_learning_proto_init() { } } file_machine_learning_v1_machine_learning_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FaceDetectAndClipRequest); i { + switch v := v.(*FaceDetectAndClipResponse); i { case 0: return &v.state case 1: diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index 272993e6..d5241a22 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -229,8 +229,8 @@ class PredResponse extends $pb.GeneratedMessage { $core.List<$core.String> get childId => $_getList(0); } -class FaceDetectAndClipResponse extends $pb.GeneratedMessage { - factory FaceDetectAndClipResponse({ +class FaceDetectAndClipRequest extends $pb.GeneratedMessage { + factory FaceDetectAndClipRequest({ $core.String? nurseryId, $core.String? childId, }) { @@ -243,11 +243,11 @@ class FaceDetectAndClipResponse extends $pb.GeneratedMessage { } return $result; } - FaceDetectAndClipResponse._() : super(); - factory FaceDetectAndClipResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory FaceDetectAndClipResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + FaceDetectAndClipRequest._() : super(); + factory FaceDetectAndClipRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FaceDetectAndClipRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FaceDetectAndClipResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FaceDetectAndClipRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'nurseryId') ..aOS(2, _omitFieldNames ? '' : 'childId') ..hasRequiredFields = false @@ -257,22 +257,22 @@ class FaceDetectAndClipResponse extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - FaceDetectAndClipResponse clone() => FaceDetectAndClipResponse()..mergeFromMessage(this); + FaceDetectAndClipRequest clone() => FaceDetectAndClipRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - FaceDetectAndClipResponse copyWith(void Function(FaceDetectAndClipResponse) updates) => super.copyWith((message) => updates(message as FaceDetectAndClipResponse)) as FaceDetectAndClipResponse; + FaceDetectAndClipRequest copyWith(void Function(FaceDetectAndClipRequest) updates) => super.copyWith((message) => updates(message as FaceDetectAndClipRequest)) as FaceDetectAndClipRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static FaceDetectAndClipResponse create() => FaceDetectAndClipResponse._(); - FaceDetectAndClipResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static FaceDetectAndClipRequest create() => FaceDetectAndClipRequest._(); + FaceDetectAndClipRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static FaceDetectAndClipResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static FaceDetectAndClipResponse? _defaultInstance; + static FaceDetectAndClipRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FaceDetectAndClipRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get nurseryId => $_getSZ(0); @@ -293,8 +293,8 @@ class FaceDetectAndClipResponse extends $pb.GeneratedMessage { void clearChildId() => clearField(2); } -class FaceDetectAndClipRequest extends $pb.GeneratedMessage { - factory FaceDetectAndClipRequest({ +class FaceDetectAndClipResponse extends $pb.GeneratedMessage { + factory FaceDetectAndClipResponse({ $core.bool? isStarted, }) { final $result = create(); @@ -303,11 +303,11 @@ class FaceDetectAndClipRequest extends $pb.GeneratedMessage { } return $result; } - FaceDetectAndClipRequest._() : super(); - factory FaceDetectAndClipRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory FaceDetectAndClipRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + FaceDetectAndClipResponse._() : super(); + factory FaceDetectAndClipResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FaceDetectAndClipResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FaceDetectAndClipRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FaceDetectAndClipResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'isStarted') ..hasRequiredFields = false ; @@ -316,22 +316,22 @@ class FaceDetectAndClipRequest extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - FaceDetectAndClipRequest clone() => FaceDetectAndClipRequest()..mergeFromMessage(this); + FaceDetectAndClipResponse clone() => FaceDetectAndClipResponse()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - FaceDetectAndClipRequest copyWith(void Function(FaceDetectAndClipRequest) updates) => super.copyWith((message) => updates(message as FaceDetectAndClipRequest)) as FaceDetectAndClipRequest; + FaceDetectAndClipResponse copyWith(void Function(FaceDetectAndClipResponse) updates) => super.copyWith((message) => updates(message as FaceDetectAndClipResponse)) as FaceDetectAndClipResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static FaceDetectAndClipRequest create() => FaceDetectAndClipRequest._(); - FaceDetectAndClipRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static FaceDetectAndClipResponse create() => FaceDetectAndClipResponse._(); + FaceDetectAndClipResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static FaceDetectAndClipRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static FaceDetectAndClipRequest? _defaultInstance; + static FaceDetectAndClipResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FaceDetectAndClipResponse? _defaultInstance; @$pb.TagNumber(1) $core.bool get isStarted => $_getBF(0); diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index 156b2270..0e7fe04d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -64,30 +64,30 @@ const PredResponse$json = { final $typed_data.Uint8List predResponseDescriptor = $convert.base64Decode( 'CgxQcmVkUmVzcG9uc2USGQoIY2hpbGRfaWQYASADKAlSB2NoaWxkSWQ='); -@$core.Deprecated('Use faceDetectAndClipResponseDescriptor instead') -const FaceDetectAndClipResponse$json = { - '1': 'FaceDetectAndClipResponse', +@$core.Deprecated('Use faceDetectAndClipRequestDescriptor instead') +const FaceDetectAndClipRequest$json = { + '1': 'FaceDetectAndClipRequest', '2': [ {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, ], }; -/// Descriptor for `FaceDetectAndClipResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List faceDetectAndClipResponseDescriptor = $convert.base64Decode( - 'ChlGYWNlRGV0ZWN0QW5kQ2xpcFJlc3BvbnNlEh0KCm51cnNlcnlfaWQYASABKAlSCW51cnNlcn' - 'lJZBIZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZA=='); +/// Descriptor for `FaceDetectAndClipRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List faceDetectAndClipRequestDescriptor = $convert.base64Decode( + 'ChhGYWNlRGV0ZWN0QW5kQ2xpcFJlcXVlc3QSHQoKbnVyc2VyeV9pZBgBIAEoCVIJbnVyc2VyeU' + 'lkEhkKCGNoaWxkX2lkGAIgASgJUgdjaGlsZElk'); -@$core.Deprecated('Use faceDetectAndClipRequestDescriptor instead') -const FaceDetectAndClipRequest$json = { - '1': 'FaceDetectAndClipRequest', +@$core.Deprecated('Use faceDetectAndClipResponseDescriptor instead') +const FaceDetectAndClipResponse$json = { + '1': 'FaceDetectAndClipResponse', '2': [ {'1': 'is_started', '3': 1, '4': 1, '5': 8, '10': 'isStarted'}, ], }; -/// Descriptor for `FaceDetectAndClipRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List faceDetectAndClipRequestDescriptor = $convert.base64Decode( - 'ChhGYWNlRGV0ZWN0QW5kQ2xpcFJlcXVlc3QSHQoKaXNfc3RhcnRlZBgBIAEoCFIJaXNTdGFydG' - 'Vk'); +/// Descriptor for `FaceDetectAndClipResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List faceDetectAndClipResponseDescriptor = $convert.base64Decode( + 'ChlGYWNlRGV0ZWN0QW5kQ2xpcFJlc3BvbnNlEh0KCmlzX3N0YXJ0ZWQYASABKAhSCWlzU3Rhcn' + 'RlZA=='); diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py index 9c21d3d4..2a21e4cf 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"_\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x03(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"$\n\x0bPredRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\")\n\x0cPredResponse\x12\x19\n\x08\x63hild_id\x18\x01 \x03(\tR\x07\x63hildId\"U\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\"9\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04Pred\x12 .machine_learning.v1.PredRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"_\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x03(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"$\n\x0bPredRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\")\n\x0cPredResponse\x12\x19\n\x08\x63hild_id\x18\x01 \x03(\tR\x07\x63hildId\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04Pred\x12 .machine_learning.v1.PredRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -30,10 +30,10 @@ _globals['_PREDREQUEST']._serialized_end=248 _globals['_PREDRESPONSE']._serialized_start=250 _globals['_PREDRESPONSE']._serialized_end=291 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=293 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=378 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=380 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=437 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=293 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=377 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=379 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=437 _globals['_MACHINELEARNINGSERVICE']._serialized_start=440 _globals['_MACHINELEARNINGSERVICE']._serialized_end=741 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi index 4b8bec81..61fa9e5e 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi @@ -33,7 +33,7 @@ class PredResponse(_message.Message): child_id: _containers.RepeatedScalarFieldContainer[str] def __init__(self, child_id: _Optional[_Iterable[str]] = ...) -> None: ... -class FaceDetectAndClipResponse(_message.Message): +class FaceDetectAndClipRequest(_message.Message): __slots__ = ("nursery_id", "child_id") NURSERY_ID_FIELD_NUMBER: _ClassVar[int] CHILD_ID_FIELD_NUMBER: _ClassVar[int] @@ -41,7 +41,7 @@ class FaceDetectAndClipResponse(_message.Message): child_id: str def __init__(self, nursery_id: _Optional[str] = ..., child_id: _Optional[str] = ...) -> None: ... -class FaceDetectAndClipRequest(_message.Message): +class FaceDetectAndClipResponse(_message.Message): __slots__ = ("is_started",) IS_STARTED_FIELD_NUMBER: _ClassVar[int] is_started: bool diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py index 9905ccd4..b9af7a7e 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py @@ -1,11 +1,8 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import grpc.experimental -from machine_learning.v1 import ( - machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2, -) +from machine_learning.v1 import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 class MachineLearningServiceStub(object): @@ -18,20 +15,20 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Train = channel.unary_unary( - "/machine_learning.v1.MachineLearningService/Train", - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - ) + '/machine_learning.v1.MachineLearningService/Train', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, + ) self.Pred = channel.stream_stream( - "/machine_learning.v1.MachineLearningService/Pred", - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - ) + '/machine_learning.v1.MachineLearningService/Pred', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, + ) self.FaceDetectAndClip = channel.unary_unary( - "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - ) + '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, + ) class MachineLearningServiceServicer(object): @@ -40,133 +37,96 @@ class MachineLearningServiceServicer(object): def Train(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def Pred(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def FaceDetectAndClip(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_MachineLearningServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "Train": grpc.unary_unary_rpc_method_handler( - servicer.Train, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, - ), - "Pred": grpc.stream_stream_rpc_method_handler( - servicer.Pred, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, - ), - "FaceDetectAndClip": grpc.unary_unary_rpc_method_handler( - servicer.FaceDetectAndClip, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, - ), + 'Train': grpc.unary_unary_rpc_method_handler( + servicer.Train, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, + ), + 'Pred': grpc.stream_stream_rpc_method_handler( + servicer.Pred, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, + ), + 'FaceDetectAndClip': grpc.unary_unary_rpc_method_handler( + servicer.FaceDetectAndClip, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "machine_learning.v1.MachineLearningService", rpc_method_handlers - ) + 'machine_learning.v1.MachineLearningService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class MachineLearningService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Train( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def Train(request, target, - "/machine_learning.v1.MachineLearningService/Train", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/Train', machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def Pred( - request_iterator, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.stream_stream( - request_iterator, + def Pred(request_iterator, target, - "/machine_learning.v1.MachineLearningService/Pred", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/machine_learning.v1.MachineLearningService/Pred', machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def FaceDetectAndClip( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def FaceDetectAndClip(request, target, - "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index 2097acc6..3a4b4f5a 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -27,12 +27,12 @@ message PredResponse { repeated string child_id = 1; } -message FaceDetectAndClipResponse { +message FaceDetectAndClipRequest { string nursery_id = 1; string child_id = 2; } -message FaceDetectAndClipRequest { +message FaceDetectAndClipResponse { bool is_started = 1; } From 3fa842bdee242699274d7b12c822a7d995d67054 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 22:24:53 +0900 Subject: [PATCH 373/771] =?UTF-8?q?feat:createBus=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/util/api/bus.dart | 48 +++++++++++++------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index 940c8cfd..ac2fdafa 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -4,32 +4,50 @@ import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart"; -Future getBusListByNurseryId( - String nurseryId) async { +Future performGrpcCall( + Future Function(BusServiceClient) grpcCall) async { final channel = ClientChannel( appConfig.grpcEndpoint, port: appConfig.grpcPort, ); - final grpcClient = BusServiceClient(channel); try { - var req = GetBusListByNurseryIdRequest(nurseryId: nurseryId); - + final result = await grpcCall(grpcClient); if (kDebugMode) { - developer.log("リクエスト: $req"); + developer.log("レスポンス: $result"); } - - var res = await grpcClient.getBusListByNurseryId(req); - if (kDebugMode) { - developer.log("レスポンス: $res"); - } - - await channel.shutdown(); - return res; + return result; } catch (error) { - await channel.shutdown(); developer.log("Caught Error:", error: error); return Future.error(error); + } finally { + await channel.shutdown(); } } + +Future getBusListByNurseryId( + String nurseryId) async { + return performGrpcCall((client) async { + var req = GetBusListByNurseryIdRequest(nurseryId: nurseryId); + return client.getBusListByNurseryId(req); + }); +} + +Future createBus( + String nurseryId, + String name, + String plateNumber, + Iterable morningGuardianIds, + Iterable eveningGuardianIds) async { + return performGrpcCall((client) async { + var req = CreateBusRequest( + nurseryId: nurseryId, + name: name, + plateNumber: plateNumber, + morningGuardianIds: morningGuardianIds.toList(), + eveningGuardianIds: eveningGuardianIds.toList(), + ); + return client.createBus(req); + }); +} From 6708608385fb3689ec520deccb01c5514385ad4d Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 22:28:48 +0900 Subject: [PATCH 374/771] =?UTF-8?q?feat:=20=E3=82=B9=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=83=BC=E3=83=9F=E3=83=B3=E3=82=B0=E5=91=A8=E3=82=8A=E3=81=AE?= =?UTF-8?q?=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9=E3=82=92=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 591 ++++++++++++++++-- .../go/where_child_bus/v1/bus_grpc.pb.go | 215 ++++++- .../proto-gen/where_child_bus/v1/bus.pb.dart | 378 +++++++++++ .../where_child_bus/v1/bus.pbgrpc.dart | 52 ++ .../where_child_bus/v1/bus.pbjson.dart | 79 +++ .../proto-gen/where_child_bus/v1/bus_pb2.py | 18 +- .../proto-gen/where_child_bus/v1/bus_pb2.pyi | 48 ++ .../where_child_bus/v1/bus_pb2_grpc.py | 99 +++ proto/where_child_bus/v1/bus.proto | 42 +- 9 files changed, 1450 insertions(+), 72 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 47af73ea..dac8ae8d 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -342,6 +342,335 @@ func (x *ChangeBusStatusResponse) GetBus() *Bus { return nil } +// Updated and newly defined messages for the adjusted RPCs +type SendLocationContinuousRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` + Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp +} + +func (x *SendLocationContinuousRequest) Reset() { + *x = SendLocationContinuousRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendLocationContinuousRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendLocationContinuousRequest) ProtoMessage() {} + +func (x *SendLocationContinuousRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendLocationContinuousRequest.ProtoReflect.Descriptor instead. +func (*SendLocationContinuousRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{6} +} + +func (x *SendLocationContinuousRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *SendLocationContinuousRequest) GetLatitude() float64 { + if x != nil { + return x.Latitude + } + return 0 +} + +func (x *SendLocationContinuousRequest) GetLongitude() float64 { + if x != nil { + return x.Longitude + } + return 0 +} + +func (x *SendLocationContinuousRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type SendLocationContinuousResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SendLocationContinuousResponse) Reset() { + *x = SendLocationContinuousResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendLocationContinuousResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendLocationContinuousResponse) ProtoMessage() {} + +func (x *SendLocationContinuousResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendLocationContinuousResponse.ProtoReflect.Descriptor instead. +func (*SendLocationContinuousResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{7} +} + +type TrackBusContinuousRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` +} + +func (x *TrackBusContinuousRequest) Reset() { + *x = TrackBusContinuousRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TrackBusContinuousRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TrackBusContinuousRequest) ProtoMessage() {} + +func (x *TrackBusContinuousRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TrackBusContinuousRequest.ProtoReflect.Descriptor instead. +func (*TrackBusContinuousRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{8} +} + +func (x *TrackBusContinuousRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +type TrackBusContinuousResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` + Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp +} + +func (x *TrackBusContinuousResponse) Reset() { + *x = TrackBusContinuousResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TrackBusContinuousResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TrackBusContinuousResponse) ProtoMessage() {} + +func (x *TrackBusContinuousResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TrackBusContinuousResponse.ProtoReflect.Descriptor instead. +func (*TrackBusContinuousResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{9} +} + +func (x *TrackBusContinuousResponse) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *TrackBusContinuousResponse) GetLatitude() float64 { + if x != nil { + return x.Latitude + } + return 0 +} + +func (x *TrackBusContinuousResponse) GetLongitude() float64 { + if x != nil { + return x.Longitude + } + return 0 +} + +func (x *TrackBusContinuousResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type StreamBusVideoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + VideoChunk []byte `protobuf:"bytes,2,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp +} + +func (x *StreamBusVideoRequest) Reset() { + *x = StreamBusVideoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamBusVideoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamBusVideoRequest) ProtoMessage() {} + +func (x *StreamBusVideoRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamBusVideoRequest.ProtoReflect.Descriptor instead. +func (*StreamBusVideoRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{10} +} + +func (x *StreamBusVideoRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *StreamBusVideoRequest) GetVideoChunk() []byte { + if x != nil { + return x.VideoChunk + } + return nil +} + +func (x *StreamBusVideoRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type StreamBusVideoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StreamBusVideoResponse) Reset() { + *x = StreamBusVideoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamBusVideoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamBusVideoResponse) ProtoMessage() {} + +func (x *StreamBusVideoResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamBusVideoResponse.ProtoReflect.Descriptor instead. +func (*StreamBusVideoResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{11} +} + var File_where_child_bus_v1_bus_proto protoreflect.FileDescriptor var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ @@ -386,44 +715,98 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, - 0xd0, 0x02, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, - 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, - 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, + 0x8e, 0x01, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, + 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0x6d, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, + 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, + 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, + 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb6, 0x05, + 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, - 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, + 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, + 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, + 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, + 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -438,33 +821,45 @@ func file_where_child_bus_v1_bus_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_bus_proto_rawDescData } -var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ - (*CreateBusRequest)(nil), // 0: where_child_bus.v1.CreateBusRequest - (*CreateBusResponse)(nil), // 1: where_child_bus.v1.CreateBusResponse - (*GetBusListByNurseryIdRequest)(nil), // 2: where_child_bus.v1.GetBusListByNurseryIdRequest - (*GetBusListByNurseryIdResponse)(nil), // 3: where_child_bus.v1.GetBusListByNurseryIdResponse - (*ChangeBusStatusRequest)(nil), // 4: where_child_bus.v1.ChangeBusStatusRequest - (*ChangeBusStatusResponse)(nil), // 5: where_child_bus.v1.ChangeBusStatusResponse - (*Bus)(nil), // 6: where_child_bus.v1.Bus - (Status)(0), // 7: where_child_bus.v1.Status + (*CreateBusRequest)(nil), // 0: where_child_bus.v1.CreateBusRequest + (*CreateBusResponse)(nil), // 1: where_child_bus.v1.CreateBusResponse + (*GetBusListByNurseryIdRequest)(nil), // 2: where_child_bus.v1.GetBusListByNurseryIdRequest + (*GetBusListByNurseryIdResponse)(nil), // 3: where_child_bus.v1.GetBusListByNurseryIdResponse + (*ChangeBusStatusRequest)(nil), // 4: where_child_bus.v1.ChangeBusStatusRequest + (*ChangeBusStatusResponse)(nil), // 5: where_child_bus.v1.ChangeBusStatusResponse + (*SendLocationContinuousRequest)(nil), // 6: where_child_bus.v1.SendLocationContinuousRequest + (*SendLocationContinuousResponse)(nil), // 7: where_child_bus.v1.SendLocationContinuousResponse + (*TrackBusContinuousRequest)(nil), // 8: where_child_bus.v1.TrackBusContinuousRequest + (*TrackBusContinuousResponse)(nil), // 9: where_child_bus.v1.TrackBusContinuousResponse + (*StreamBusVideoRequest)(nil), // 10: where_child_bus.v1.StreamBusVideoRequest + (*StreamBusVideoResponse)(nil), // 11: where_child_bus.v1.StreamBusVideoResponse + (*Bus)(nil), // 12: where_child_bus.v1.Bus + (Status)(0), // 13: where_child_bus.v1.Status } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ - 6, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus - 6, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus - 7, // 2: where_child_bus.v1.ChangeBusStatusRequest.status:type_name -> where_child_bus.v1.Status - 6, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus - 0, // 4: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest - 2, // 5: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 4, // 6: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest - 1, // 7: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 8: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 5, // 9: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse - 7, // [7:10] is the sub-list for method output_type - 4, // [4:7] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 12, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus + 12, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus + 13, // 2: where_child_bus.v1.ChangeBusStatusRequest.status:type_name -> where_child_bus.v1.Status + 12, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus + 0, // 4: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 5: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 4, // 6: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest + 6, // 7: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest + 8, // 8: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest + 10, // 9: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest + 1, // 10: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 11: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 5, // 12: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse + 7, // 13: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse + 9, // 14: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse + 11, // 15: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse + 10, // [10:16] is the sub-list for method output_type + 4, // [4:10] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } @@ -546,6 +941,78 @@ func file_where_child_bus_v1_bus_proto_init() { return nil } } + file_where_child_bus_v1_bus_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendLocationContinuousRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendLocationContinuousResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TrackBusContinuousRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TrackBusContinuousResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamBusVideoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamBusVideoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -553,7 +1020,7 @@ func file_where_child_bus_v1_bus_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_bus_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go index 8f00f225..ff76ce9c 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go @@ -19,9 +19,12 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - BusService_CreateBus_FullMethodName = "/where_child_bus.v1.BusService/CreateBus" - BusService_GetBusListByNurseryId_FullMethodName = "/where_child_bus.v1.BusService/GetBusListByNurseryId" - BusService_ChangeBusStatus_FullMethodName = "/where_child_bus.v1.BusService/ChangeBusStatus" + BusService_CreateBus_FullMethodName = "/where_child_bus.v1.BusService/CreateBus" + BusService_GetBusListByNurseryId_FullMethodName = "/where_child_bus.v1.BusService/GetBusListByNurseryId" + BusService_ChangeBusStatus_FullMethodName = "/where_child_bus.v1.BusService/ChangeBusStatus" + BusService_SendLocationContinuous_FullMethodName = "/where_child_bus.v1.BusService/SendLocationContinuous" + BusService_TrackBusContinuous_FullMethodName = "/where_child_bus.v1.BusService/TrackBusContinuous" + BusService_StreamBusVideo_FullMethodName = "/where_child_bus.v1.BusService/StreamBusVideo" ) // BusServiceClient is the client API for BusService service. @@ -31,6 +34,9 @@ type BusServiceClient interface { CreateBus(ctx context.Context, in *CreateBusRequest, opts ...grpc.CallOption) (*CreateBusResponse, error) GetBusListByNurseryId(ctx context.Context, in *GetBusListByNurseryIdRequest, opts ...grpc.CallOption) (*GetBusListByNurseryIdResponse, error) ChangeBusStatus(ctx context.Context, in *ChangeBusStatusRequest, opts ...grpc.CallOption) (*ChangeBusStatusResponse, error) + SendLocationContinuous(ctx context.Context, opts ...grpc.CallOption) (BusService_SendLocationContinuousClient, error) + TrackBusContinuous(ctx context.Context, in *TrackBusContinuousRequest, opts ...grpc.CallOption) (BusService_TrackBusContinuousClient, error) + StreamBusVideo(ctx context.Context, opts ...grpc.CallOption) (BusService_StreamBusVideoClient, error) } type busServiceClient struct { @@ -68,6 +74,106 @@ func (c *busServiceClient) ChangeBusStatus(ctx context.Context, in *ChangeBusSta return out, nil } +func (c *busServiceClient) SendLocationContinuous(ctx context.Context, opts ...grpc.CallOption) (BusService_SendLocationContinuousClient, error) { + stream, err := c.cc.NewStream(ctx, &BusService_ServiceDesc.Streams[0], BusService_SendLocationContinuous_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &busServiceSendLocationContinuousClient{stream} + return x, nil +} + +type BusService_SendLocationContinuousClient interface { + Send(*SendLocationContinuousRequest) error + CloseAndRecv() (*SendLocationContinuousResponse, error) + grpc.ClientStream +} + +type busServiceSendLocationContinuousClient struct { + grpc.ClientStream +} + +func (x *busServiceSendLocationContinuousClient) Send(m *SendLocationContinuousRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *busServiceSendLocationContinuousClient) CloseAndRecv() (*SendLocationContinuousResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(SendLocationContinuousResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *busServiceClient) TrackBusContinuous(ctx context.Context, in *TrackBusContinuousRequest, opts ...grpc.CallOption) (BusService_TrackBusContinuousClient, error) { + stream, err := c.cc.NewStream(ctx, &BusService_ServiceDesc.Streams[1], BusService_TrackBusContinuous_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &busServiceTrackBusContinuousClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type BusService_TrackBusContinuousClient interface { + Recv() (*TrackBusContinuousResponse, error) + grpc.ClientStream +} + +type busServiceTrackBusContinuousClient struct { + grpc.ClientStream +} + +func (x *busServiceTrackBusContinuousClient) Recv() (*TrackBusContinuousResponse, error) { + m := new(TrackBusContinuousResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *busServiceClient) StreamBusVideo(ctx context.Context, opts ...grpc.CallOption) (BusService_StreamBusVideoClient, error) { + stream, err := c.cc.NewStream(ctx, &BusService_ServiceDesc.Streams[2], BusService_StreamBusVideo_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &busServiceStreamBusVideoClient{stream} + return x, nil +} + +type BusService_StreamBusVideoClient interface { + Send(*StreamBusVideoRequest) error + CloseAndRecv() (*StreamBusVideoResponse, error) + grpc.ClientStream +} + +type busServiceStreamBusVideoClient struct { + grpc.ClientStream +} + +func (x *busServiceStreamBusVideoClient) Send(m *StreamBusVideoRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *busServiceStreamBusVideoClient) CloseAndRecv() (*StreamBusVideoResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(StreamBusVideoResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // BusServiceServer is the server API for BusService service. // All implementations should embed UnimplementedBusServiceServer // for forward compatibility @@ -75,6 +181,9 @@ type BusServiceServer interface { CreateBus(context.Context, *CreateBusRequest) (*CreateBusResponse, error) GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) ChangeBusStatus(context.Context, *ChangeBusStatusRequest) (*ChangeBusStatusResponse, error) + SendLocationContinuous(BusService_SendLocationContinuousServer) error + TrackBusContinuous(*TrackBusContinuousRequest, BusService_TrackBusContinuousServer) error + StreamBusVideo(BusService_StreamBusVideoServer) error } // UnimplementedBusServiceServer should be embedded to have forward compatible implementations. @@ -90,6 +199,15 @@ func (UnimplementedBusServiceServer) GetBusListByNurseryId(context.Context, *Get func (UnimplementedBusServiceServer) ChangeBusStatus(context.Context, *ChangeBusStatusRequest) (*ChangeBusStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeBusStatus not implemented") } +func (UnimplementedBusServiceServer) SendLocationContinuous(BusService_SendLocationContinuousServer) error { + return status.Errorf(codes.Unimplemented, "method SendLocationContinuous not implemented") +} +func (UnimplementedBusServiceServer) TrackBusContinuous(*TrackBusContinuousRequest, BusService_TrackBusContinuousServer) error { + return status.Errorf(codes.Unimplemented, "method TrackBusContinuous not implemented") +} +func (UnimplementedBusServiceServer) StreamBusVideo(BusService_StreamBusVideoServer) error { + return status.Errorf(codes.Unimplemented, "method StreamBusVideo not implemented") +} // UnsafeBusServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BusServiceServer will @@ -156,6 +274,79 @@ func _BusService_ChangeBusStatus_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _BusService_SendLocationContinuous_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(BusServiceServer).SendLocationContinuous(&busServiceSendLocationContinuousServer{stream}) +} + +type BusService_SendLocationContinuousServer interface { + SendAndClose(*SendLocationContinuousResponse) error + Recv() (*SendLocationContinuousRequest, error) + grpc.ServerStream +} + +type busServiceSendLocationContinuousServer struct { + grpc.ServerStream +} + +func (x *busServiceSendLocationContinuousServer) SendAndClose(m *SendLocationContinuousResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *busServiceSendLocationContinuousServer) Recv() (*SendLocationContinuousRequest, error) { + m := new(SendLocationContinuousRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _BusService_TrackBusContinuous_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(TrackBusContinuousRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BusServiceServer).TrackBusContinuous(m, &busServiceTrackBusContinuousServer{stream}) +} + +type BusService_TrackBusContinuousServer interface { + Send(*TrackBusContinuousResponse) error + grpc.ServerStream +} + +type busServiceTrackBusContinuousServer struct { + grpc.ServerStream +} + +func (x *busServiceTrackBusContinuousServer) Send(m *TrackBusContinuousResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _BusService_StreamBusVideo_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(BusServiceServer).StreamBusVideo(&busServiceStreamBusVideoServer{stream}) +} + +type BusService_StreamBusVideoServer interface { + SendAndClose(*StreamBusVideoResponse) error + Recv() (*StreamBusVideoRequest, error) + grpc.ServerStream +} + +type busServiceStreamBusVideoServer struct { + grpc.ServerStream +} + +func (x *busServiceStreamBusVideoServer) SendAndClose(m *StreamBusVideoResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *busServiceStreamBusVideoServer) Recv() (*StreamBusVideoRequest, error) { + m := new(StreamBusVideoRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // BusService_ServiceDesc is the grpc.ServiceDesc for BusService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -176,6 +367,22 @@ var BusService_ServiceDesc = grpc.ServiceDesc{ Handler: _BusService_ChangeBusStatus_Handler, }, }, - Streams: []grpc.StreamDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "SendLocationContinuous", + Handler: _BusService_SendLocationContinuous_Handler, + ClientStreams: true, + }, + { + StreamName: "TrackBusContinuous", + Handler: _BusService_TrackBusContinuous_Handler, + ServerStreams: true, + }, + { + StreamName: "StreamBusVideo", + Handler: _BusService_StreamBusVideo_Handler, + ClientStreams: true, + }, + }, Metadata: "where_child_bus/v1/bus.proto", } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index 9bb7ba9f..b4ee3bf2 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -11,6 +11,7 @@ import 'dart:core' as $core; +import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; import 'resources.pb.dart' as $8; @@ -372,6 +373,383 @@ class ChangeBusStatusResponse extends $pb.GeneratedMessage { $8.Bus ensureBus() => $_ensure(0); } +/// Updated and newly defined messages for the adjusted RPCs +class SendLocationContinuousRequest extends $pb.GeneratedMessage { + factory SendLocationContinuousRequest({ + $core.String? busId, + $core.double? latitude, + $core.double? longitude, + $fixnum.Int64? timestamp, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + if (latitude != null) { + $result.latitude = latitude; + } + if (longitude != null) { + $result.longitude = longitude; + } + if (timestamp != null) { + $result.timestamp = timestamp; + } + return $result; + } + SendLocationContinuousRequest._() : super(); + factory SendLocationContinuousRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SendLocationContinuousRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SendLocationContinuousRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..a<$core.double>(2, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(3, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..aInt64(4, _omitFieldNames ? '' : 'timestamp') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SendLocationContinuousRequest clone() => SendLocationContinuousRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SendLocationContinuousRequest copyWith(void Function(SendLocationContinuousRequest) updates) => super.copyWith((message) => updates(message as SendLocationContinuousRequest)) as SendLocationContinuousRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SendLocationContinuousRequest create() => SendLocationContinuousRequest._(); + SendLocationContinuousRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SendLocationContinuousRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SendLocationContinuousRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + $core.double get latitude => $_getN(1); + @$pb.TagNumber(2) + set latitude($core.double v) { $_setDouble(1, v); } + @$pb.TagNumber(2) + $core.bool hasLatitude() => $_has(1); + @$pb.TagNumber(2) + void clearLatitude() => clearField(2); + + @$pb.TagNumber(3) + $core.double get longitude => $_getN(2); + @$pb.TagNumber(3) + set longitude($core.double v) { $_setDouble(2, v); } + @$pb.TagNumber(3) + $core.bool hasLongitude() => $_has(2); + @$pb.TagNumber(3) + void clearLongitude() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get timestamp => $_getI64(3); + @$pb.TagNumber(4) + set timestamp($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasTimestamp() => $_has(3); + @$pb.TagNumber(4) + void clearTimestamp() => clearField(4); +} + +class SendLocationContinuousResponse extends $pb.GeneratedMessage { + factory SendLocationContinuousResponse() => create(); + SendLocationContinuousResponse._() : super(); + factory SendLocationContinuousResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SendLocationContinuousResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SendLocationContinuousResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SendLocationContinuousResponse clone() => SendLocationContinuousResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SendLocationContinuousResponse copyWith(void Function(SendLocationContinuousResponse) updates) => super.copyWith((message) => updates(message as SendLocationContinuousResponse)) as SendLocationContinuousResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SendLocationContinuousResponse create() => SendLocationContinuousResponse._(); + SendLocationContinuousResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SendLocationContinuousResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SendLocationContinuousResponse? _defaultInstance; +} + +class TrackBusContinuousRequest extends $pb.GeneratedMessage { + factory TrackBusContinuousRequest({ + $core.String? busId, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + return $result; + } + TrackBusContinuousRequest._() : super(); + factory TrackBusContinuousRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TrackBusContinuousRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TrackBusContinuousRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + TrackBusContinuousRequest clone() => TrackBusContinuousRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + TrackBusContinuousRequest copyWith(void Function(TrackBusContinuousRequest) updates) => super.copyWith((message) => updates(message as TrackBusContinuousRequest)) as TrackBusContinuousRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TrackBusContinuousRequest create() => TrackBusContinuousRequest._(); + TrackBusContinuousRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static TrackBusContinuousRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TrackBusContinuousRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); +} + +class TrackBusContinuousResponse extends $pb.GeneratedMessage { + factory TrackBusContinuousResponse({ + $core.String? busId, + $core.double? latitude, + $core.double? longitude, + $fixnum.Int64? timestamp, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + if (latitude != null) { + $result.latitude = latitude; + } + if (longitude != null) { + $result.longitude = longitude; + } + if (timestamp != null) { + $result.timestamp = timestamp; + } + return $result; + } + TrackBusContinuousResponse._() : super(); + factory TrackBusContinuousResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TrackBusContinuousResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TrackBusContinuousResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..a<$core.double>(2, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(3, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..aInt64(4, _omitFieldNames ? '' : 'timestamp') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + TrackBusContinuousResponse clone() => TrackBusContinuousResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + TrackBusContinuousResponse copyWith(void Function(TrackBusContinuousResponse) updates) => super.copyWith((message) => updates(message as TrackBusContinuousResponse)) as TrackBusContinuousResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TrackBusContinuousResponse create() => TrackBusContinuousResponse._(); + TrackBusContinuousResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static TrackBusContinuousResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TrackBusContinuousResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + $core.double get latitude => $_getN(1); + @$pb.TagNumber(2) + set latitude($core.double v) { $_setDouble(1, v); } + @$pb.TagNumber(2) + $core.bool hasLatitude() => $_has(1); + @$pb.TagNumber(2) + void clearLatitude() => clearField(2); + + @$pb.TagNumber(3) + $core.double get longitude => $_getN(2); + @$pb.TagNumber(3) + set longitude($core.double v) { $_setDouble(2, v); } + @$pb.TagNumber(3) + $core.bool hasLongitude() => $_has(2); + @$pb.TagNumber(3) + void clearLongitude() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get timestamp => $_getI64(3); + @$pb.TagNumber(4) + set timestamp($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasTimestamp() => $_has(3); + @$pb.TagNumber(4) + void clearTimestamp() => clearField(4); +} + +class StreamBusVideoRequest extends $pb.GeneratedMessage { + factory StreamBusVideoRequest({ + $core.String? busId, + $core.List<$core.int>? videoChunk, + $fixnum.Int64? timestamp, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + if (videoChunk != null) { + $result.videoChunk = videoChunk; + } + if (timestamp != null) { + $result.timestamp = timestamp; + } + return $result; + } + StreamBusVideoRequest._() : super(); + factory StreamBusVideoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StreamBusVideoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StreamBusVideoRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) + ..aInt64(3, _omitFieldNames ? '' : 'timestamp') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + StreamBusVideoRequest clone() => StreamBusVideoRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + StreamBusVideoRequest copyWith(void Function(StreamBusVideoRequest) updates) => super.copyWith((message) => updates(message as StreamBusVideoRequest)) as StreamBusVideoRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StreamBusVideoRequest create() => StreamBusVideoRequest._(); + StreamBusVideoRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StreamBusVideoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StreamBusVideoRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.int> get videoChunk => $_getN(1); + @$pb.TagNumber(2) + set videoChunk($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasVideoChunk() => $_has(1); + @$pb.TagNumber(2) + void clearVideoChunk() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get timestamp => $_getI64(2); + @$pb.TagNumber(3) + set timestamp($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasTimestamp() => $_has(2); + @$pb.TagNumber(3) + void clearTimestamp() => clearField(3); +} + +class StreamBusVideoResponse extends $pb.GeneratedMessage { + factory StreamBusVideoResponse() => create(); + StreamBusVideoResponse._() : super(); + factory StreamBusVideoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StreamBusVideoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StreamBusVideoResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + StreamBusVideoResponse clone() => StreamBusVideoResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + StreamBusVideoResponse copyWith(void Function(StreamBusVideoResponse) updates) => super.copyWith((message) => updates(message as StreamBusVideoResponse)) as StreamBusVideoResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StreamBusVideoResponse create() => StreamBusVideoResponse._(); + StreamBusVideoResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StreamBusVideoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StreamBusVideoResponse? _defaultInstance; +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart index 86ae243c..227e31e8 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart @@ -33,6 +33,18 @@ class BusServiceClient extends $grpc.Client { '/where_child_bus.v1.BusService/ChangeBusStatus', ($0.ChangeBusStatusRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.ChangeBusStatusResponse.fromBuffer(value)); + static final _$sendLocationContinuous = $grpc.ClientMethod<$0.SendLocationContinuousRequest, $0.SendLocationContinuousResponse>( + '/where_child_bus.v1.BusService/SendLocationContinuous', + ($0.SendLocationContinuousRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.SendLocationContinuousResponse.fromBuffer(value)); + static final _$trackBusContinuous = $grpc.ClientMethod<$0.TrackBusContinuousRequest, $0.TrackBusContinuousResponse>( + '/where_child_bus.v1.BusService/TrackBusContinuous', + ($0.TrackBusContinuousRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.TrackBusContinuousResponse.fromBuffer(value)); + static final _$streamBusVideo = $grpc.ClientMethod<$0.StreamBusVideoRequest, $0.StreamBusVideoResponse>( + '/where_child_bus.v1.BusService/StreamBusVideo', + ($0.StreamBusVideoRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.StreamBusVideoResponse.fromBuffer(value)); BusServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -51,6 +63,18 @@ class BusServiceClient extends $grpc.Client { $grpc.ResponseFuture<$0.ChangeBusStatusResponse> changeBusStatus($0.ChangeBusStatusRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$changeBusStatus, request, options: options); } + + $grpc.ResponseFuture<$0.SendLocationContinuousResponse> sendLocationContinuous($async.Stream<$0.SendLocationContinuousRequest> request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$sendLocationContinuous, request, options: options).single; + } + + $grpc.ResponseStream<$0.TrackBusContinuousResponse> trackBusContinuous($0.TrackBusContinuousRequest request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$trackBusContinuous, $async.Stream.fromIterable([request]), options: options); + } + + $grpc.ResponseFuture<$0.StreamBusVideoResponse> streamBusVideo($async.Stream<$0.StreamBusVideoRequest> request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$streamBusVideo, request, options: options).single; + } } @$pb.GrpcServiceName('where_child_bus.v1.BusService') @@ -79,6 +103,27 @@ abstract class BusServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $0.ChangeBusStatusRequest.fromBuffer(value), ($0.ChangeBusStatusResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SendLocationContinuousRequest, $0.SendLocationContinuousResponse>( + 'SendLocationContinuous', + sendLocationContinuous, + true, + false, + ($core.List<$core.int> value) => $0.SendLocationContinuousRequest.fromBuffer(value), + ($0.SendLocationContinuousResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.TrackBusContinuousRequest, $0.TrackBusContinuousResponse>( + 'TrackBusContinuous', + trackBusContinuous_Pre, + false, + true, + ($core.List<$core.int> value) => $0.TrackBusContinuousRequest.fromBuffer(value), + ($0.TrackBusContinuousResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.StreamBusVideoRequest, $0.StreamBusVideoResponse>( + 'StreamBusVideo', + streamBusVideo, + true, + false, + ($core.List<$core.int> value) => $0.StreamBusVideoRequest.fromBuffer(value), + ($0.StreamBusVideoResponse value) => value.writeToBuffer())); } $async.Future<$0.CreateBusResponse> createBus_Pre($grpc.ServiceCall call, $async.Future<$0.CreateBusRequest> request) async { @@ -93,7 +138,14 @@ abstract class BusServiceBase extends $grpc.Service { return changeBusStatus(call, await request); } + $async.Stream<$0.TrackBusContinuousResponse> trackBusContinuous_Pre($grpc.ServiceCall call, $async.Future<$0.TrackBusContinuousRequest> request) async* { + yield* trackBusContinuous(call, await request); + } + $async.Future<$0.CreateBusResponse> createBus($grpc.ServiceCall call, $0.CreateBusRequest request); $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($grpc.ServiceCall call, $0.GetBusListByNurseryIdRequest request); $async.Future<$0.ChangeBusStatusResponse> changeBusStatus($grpc.ServiceCall call, $0.ChangeBusStatusRequest request); + $async.Future<$0.SendLocationContinuousResponse> sendLocationContinuous($grpc.ServiceCall call, $async.Stream<$0.SendLocationContinuousRequest> request); + $async.Stream<$0.TrackBusContinuousResponse> trackBusContinuous($grpc.ServiceCall call, $0.TrackBusContinuousRequest request); + $async.Future<$0.StreamBusVideoResponse> streamBusVideo($grpc.ServiceCall call, $async.Stream<$0.StreamBusVideoRequest> request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index e2e06806..48a9635d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -98,3 +98,82 @@ final $typed_data.Uint8List changeBusStatusResponseDescriptor = $convert.base64D 'ChdDaGFuZ2VCdXNTdGF0dXNSZXNwb25zZRIpCgNidXMYASABKAsyFy53aGVyZV9jaGlsZF9idX' 'MudjEuQnVzUgNidXM='); +@$core.Deprecated('Use sendLocationContinuousRequestDescriptor instead') +const SendLocationContinuousRequest$json = { + '1': 'SendLocationContinuousRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'latitude', '3': 2, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 3, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'timestamp', '3': 4, '4': 1, '5': 3, '10': 'timestamp'}, + ], +}; + +/// Descriptor for `SendLocationContinuousRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sendLocationContinuousRequestDescriptor = $convert.base64Decode( + 'Ch1TZW5kTG9jYXRpb25Db250aW51b3VzUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lkEh' + 'oKCGxhdGl0dWRlGAIgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYAyABKAFSCWxvbmdpdHVk' + 'ZRIcCgl0aW1lc3RhbXAYBCABKANSCXRpbWVzdGFtcA=='); + +@$core.Deprecated('Use sendLocationContinuousResponseDescriptor instead') +const SendLocationContinuousResponse$json = { + '1': 'SendLocationContinuousResponse', +}; + +/// Descriptor for `SendLocationContinuousResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sendLocationContinuousResponseDescriptor = $convert.base64Decode( + 'Ch5TZW5kTG9jYXRpb25Db250aW51b3VzUmVzcG9uc2U='); + +@$core.Deprecated('Use trackBusContinuousRequestDescriptor instead') +const TrackBusContinuousRequest$json = { + '1': 'TrackBusContinuousRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + ], +}; + +/// Descriptor for `TrackBusContinuousRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List trackBusContinuousRequestDescriptor = $convert.base64Decode( + 'ChlUcmFja0J1c0NvbnRpbnVvdXNSZXF1ZXN0EhUKBmJ1c19pZBgBIAEoCVIFYnVzSWQ='); + +@$core.Deprecated('Use trackBusContinuousResponseDescriptor instead') +const TrackBusContinuousResponse$json = { + '1': 'TrackBusContinuousResponse', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'latitude', '3': 2, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 3, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'timestamp', '3': 4, '4': 1, '5': 3, '10': 'timestamp'}, + ], +}; + +/// Descriptor for `TrackBusContinuousResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List trackBusContinuousResponseDescriptor = $convert.base64Decode( + 'ChpUcmFja0J1c0NvbnRpbnVvdXNSZXNwb25zZRIVCgZidXNfaWQYASABKAlSBWJ1c0lkEhoKCG' + 'xhdGl0dWRlGAIgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYAyABKAFSCWxvbmdpdHVkZRIc' + 'Cgl0aW1lc3RhbXAYBCABKANSCXRpbWVzdGFtcA=='); + +@$core.Deprecated('Use streamBusVideoRequestDescriptor instead') +const StreamBusVideoRequest$json = { + '1': 'StreamBusVideoRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'video_chunk', '3': 2, '4': 1, '5': 12, '10': 'videoChunk'}, + {'1': 'timestamp', '3': 3, '4': 1, '5': 3, '10': 'timestamp'}, + ], +}; + +/// Descriptor for `StreamBusVideoRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Decode( + 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBIfCgt2aWRlb1' + '9jaHVuaxgCIAEoDFIKdmlkZW9DaHVuaxIcCgl0aW1lc3RhbXAYAyABKANSCXRpbWVzdGFtcA=='); + +@$core.Deprecated('Use streamBusVideoResponseDescriptor instead') +const StreamBusVideoResponse$json = { + '1': 'StreamBusVideoResponse', +}; + +/// Descriptor for `StreamBusVideoResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List streamBusVideoResponseDescriptor = $convert.base64Decode( + 'ChZTdHJlYW1CdXNWaWRlb1Jlc3BvbnNl'); + diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py index 30d9ea2e..96f44557 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xd0\x02\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponseB\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\x8e\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\"m\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1f\n\x0bvideo_chunk\x18\x02 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x03 \x01(\x03R\ttimestamp\"\x18\n\x16StreamBusVideoResponse2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -35,6 +35,18 @@ _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=601 _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=603 _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=671 - _globals['_BUSSERVICE']._serialized_start=674 - _globals['_BUSSERVICE']._serialized_end=1010 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=674 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=816 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=818 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=850 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=852 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=902 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=905 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1044 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1046 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1155 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1157 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1181 + _globals['_BUSSERVICE']._serialized_start=1184 + _globals['_BUSSERVICE']._serialized_end=1878 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi index bbbf90f7..df1957a1 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi @@ -51,3 +51,51 @@ class ChangeBusStatusResponse(_message.Message): BUS_FIELD_NUMBER: _ClassVar[int] bus: _resources_pb2.Bus def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... + +class SendLocationContinuousRequest(_message.Message): + __slots__ = ("bus_id", "latitude", "longitude", "timestamp") + BUS_ID_FIELD_NUMBER: _ClassVar[int] + LATITUDE_FIELD_NUMBER: _ClassVar[int] + LONGITUDE_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + bus_id: str + latitude: float + longitude: float + timestamp: int + def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., timestamp: _Optional[int] = ...) -> None: ... + +class SendLocationContinuousResponse(_message.Message): + __slots__ = () + def __init__(self) -> None: ... + +class TrackBusContinuousRequest(_message.Message): + __slots__ = ("bus_id",) + BUS_ID_FIELD_NUMBER: _ClassVar[int] + bus_id: str + def __init__(self, bus_id: _Optional[str] = ...) -> None: ... + +class TrackBusContinuousResponse(_message.Message): + __slots__ = ("bus_id", "latitude", "longitude", "timestamp") + BUS_ID_FIELD_NUMBER: _ClassVar[int] + LATITUDE_FIELD_NUMBER: _ClassVar[int] + LONGITUDE_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + bus_id: str + latitude: float + longitude: float + timestamp: int + def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., timestamp: _Optional[int] = ...) -> None: ... + +class StreamBusVideoRequest(_message.Message): + __slots__ = ("bus_id", "video_chunk", "timestamp") + BUS_ID_FIELD_NUMBER: _ClassVar[int] + VIDEO_CHUNK_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + bus_id: str + video_chunk: bytes + timestamp: int + def __init__(self, bus_id: _Optional[str] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[int] = ...) -> None: ... + +class StreamBusVideoResponse(_message.Message): + __slots__ = () + def __init__(self) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py index 778cfeb8..f6ab49a6 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py @@ -30,6 +30,21 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.FromString, ) + self.SendLocationContinuous = channel.stream_unary( + '/where_child_bus.v1.BusService/SendLocationContinuous', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.FromString, + ) + self.TrackBusContinuous = channel.unary_stream( + '/where_child_bus.v1.BusService/TrackBusContinuous', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.FromString, + ) + self.StreamBusVideo = channel.stream_unary( + '/where_child_bus.v1.BusService/StreamBusVideo', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.FromString, + ) class BusServiceServicer(object): @@ -53,6 +68,24 @@ def ChangeBusStatus(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def SendLocationContinuous(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def TrackBusContinuous(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def StreamBusVideo(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_BusServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -71,6 +104,21 @@ def add_BusServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.SerializeToString, ), + 'SendLocationContinuous': grpc.stream_unary_rpc_method_handler( + servicer.SendLocationContinuous, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.SerializeToString, + ), + 'TrackBusContinuous': grpc.unary_stream_rpc_method_handler( + servicer.TrackBusContinuous, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.SerializeToString, + ), + 'StreamBusVideo': grpc.stream_unary_rpc_method_handler( + servicer.StreamBusVideo, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.BusService', rpc_method_handlers) @@ -131,3 +179,54 @@ def ChangeBusStatus(request, where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SendLocationContinuous(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/where_child_bus.v1.BusService/SendLocationContinuous', + where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def TrackBusContinuous(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/where_child_bus.v1.BusService/TrackBusContinuous', + where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def StreamBusVideo(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/where_child_bus.v1.BusService/StreamBusVideo', + where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index eb0966fe..94434d92 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -5,9 +5,13 @@ package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; service BusService { - rpc CreateBus(CreateBusRequest) returns (CreateBusResponse); - rpc GetBusListByNurseryId(GetBusListByNurseryIdRequest) returns (GetBusListByNurseryIdResponse); - rpc ChangeBusStatus(ChangeBusStatusRequest) returns (ChangeBusStatusResponse); + rpc CreateBus(CreateBusRequest) returns (CreateBusResponse); + rpc GetBusListByNurseryId(GetBusListByNurseryIdRequest) returns (GetBusListByNurseryIdResponse); + rpc ChangeBusStatus(ChangeBusStatusRequest) returns (ChangeBusStatusResponse); + + rpc SendLocationContinuous(stream SendLocationContinuousRequest) returns (SendLocationContinuousResponse); + rpc TrackBusContinuous(TrackBusContinuousRequest) returns (stream TrackBusContinuousResponse); + rpc StreamBusVideo(stream StreamBusVideoRequest) returns (StreamBusVideoResponse); } message CreateBusRequest { @@ -39,3 +43,35 @@ message ChangeBusStatusResponse { Bus bus = 1; } +// Updated and newly defined messages for the adjusted RPCs +message SendLocationContinuousRequest { + string bus_id = 1; + double latitude = 2; + double longitude = 3; + int64 timestamp = 4; // Unix timestamp +} + +message SendLocationContinuousResponse { + // Custom empty response type to conform to Protobuf style guide +} + +message TrackBusContinuousRequest { + string bus_id = 1; +} + +message TrackBusContinuousResponse { + string bus_id = 1; + double latitude = 2; + double longitude = 3; + int64 timestamp = 4; // Unix timestamp +} + +message StreamBusVideoRequest { + string bus_id = 1; + bytes video_chunk = 2; // Chunk of video data + int64 timestamp = 3; // Unix timestamp +} + +message StreamBusVideoResponse { + // Custom empty response type to conform to Protobuf style guide +} From 25c786a8e840ed706c79652f3200843e28129478 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 22:29:32 +0900 Subject: [PATCH 375/771] =?UTF-8?q?fix:=20=E6=97=A2=E3=81=AB=E7=99=BB?= =?UTF-8?q?=E9=8C=B2=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=82=8B=E4=BF=9D?= =?UTF-8?q?=E8=AD=B7=E8=80=85=E3=81=AF=E6=96=B0=E8=A6=8F=E3=81=AB=E3=83=90?= =?UTF-8?q?=E3=82=B9=E3=81=AB=E7=99=BB=E9=8C=B2=E3=81=A7=E3=81=8D=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 211 +++++++++++++++++------------------- 1 file changed, 100 insertions(+), 111 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 857d32bb..413304f4 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -81,49 +81,49 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* if err != nil { return nil, err // 夕方のステーション設定中にエラーが発生しました } - // 以下のコードはリファクタリング後のメインの処理フローです。 - - morningGuardianIDs, err := parseGuardianIDs(req.MorningGuardianIds) - if err != nil { - return nil, err // エラーハンドリングは簡潔に - } - - eveningGuardianIDs, err := parseGuardianIDs(req.EveningGuardianIds) - if err != nil { - return nil, err // エラーハンドリングは簡潔に - } - - // ステーションの取得処理は変更なし - stations, err := tx.Station.Query(). - Where(stationRepo.HasGuardianWith(guardianRepo.IDIn(morningGuardianIDs...))). - Where(stationRepo.HasGuardianWith(guardianRepo.IDIn(eveningGuardianIDs...))). - All(ctx) - if err != nil { - return nil, fmt.Errorf("failed to get stations: %w", err) - } - - // 子供たちの処理を関数を用いて簡潔に - morningChildren := tx.Child.Query(). - Where(childRepo.HasGuardianWith(guardianRepo.IDIn(morningGuardianIDs...))).AllX(ctx) - if err := createChildBusAssociations(ctx, tx, morningChildren, bus, childbusassociationRepo.BusTypeMorning); err != nil { - return nil, err - } - - eveningChildren := tx.Child.Query(). - Where(childRepo.HasGuardianWith(guardianRepo.IDIn(eveningGuardianIDs...))).AllX(ctx) - if err := createChildBusAssociations(ctx, tx, eveningChildren, bus, childbusassociationRepo.BusTypeEvening); err != nil { - return nil, err - } - - // ステーションの更新処理は変更なし - for _, station := range stations { - _, err = tx.Bus.UpdateOne(bus). - AddStations(station). - Save(ctx) - if err != nil { - return nil, fmt.Errorf("failed to update bus with stations: %w", err) - } - } + // 以下のコードはリファクタリング後のメインの処理フローです。 + + morningGuardianIDs, err := parseGuardianIDs(req.MorningGuardianIds) + if err != nil { + return nil, err // エラーハンドリングは簡潔に + } + + eveningGuardianIDs, err := parseGuardianIDs(req.EveningGuardianIds) + if err != nil { + return nil, err // エラーハンドリングは簡潔に + } + + // ステーションの取得処理は変更なし + stations, err := tx.Station.Query(). + Where(stationRepo.HasGuardianWith(guardianRepo.IDIn(morningGuardianIDs...))). + Where(stationRepo.HasGuardianWith(guardianRepo.IDIn(eveningGuardianIDs...))). + All(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get stations: %w", err) + } + + // 子供たちの処理を関数を用いて簡潔に + morningChildren := tx.Child.Query(). + Where(childRepo.HasGuardianWith(guardianRepo.IDIn(morningGuardianIDs...))).AllX(ctx) + if err := createChildBusAssociations(ctx, tx, morningChildren, bus, childbusassociationRepo.BusTypeMorning); err != nil { + return nil, err + } + + eveningChildren := tx.Child.Query(). + Where(childRepo.HasGuardianWith(guardianRepo.IDIn(eveningGuardianIDs...))).AllX(ctx) + if err := createChildBusAssociations(ctx, tx, eveningChildren, bus, childbusassociationRepo.BusTypeEvening); err != nil { + return nil, err + } + + // ステーションの更新処理は変更なし + for _, station := range stations { + _, err = tx.Bus.UpdateOne(bus). + AddStations(station). + Save(ctx) + if err != nil { + return nil, fmt.Errorf("failed to update bus with stations: %w", err) + } + } //TODO: CloudFunctionにバスの作成を通知 cfg, _ := config.New() @@ -142,33 +142,32 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* // parseGuardianIDs は、指定されたガーディアンIDの文字列のスライスをUUIDのスライスに変換します。 func parseGuardianIDs(ids []string) ([]uuid.UUID, error) { - parsedIDs := make([]uuid.UUID, len(ids)) - for i, id := range ids { - parsedID, err := uuid.Parse(id) - if err != nil { - return nil, fmt.Errorf("failed to parse guardian ID '%s': %w", id, err) - } - parsedIDs[i] = parsedID - } - return parsedIDs, nil + parsedIDs := make([]uuid.UUID, len(ids)) + for i, id := range ids { + parsedID, err := uuid.Parse(id) + if err != nil { + return nil, fmt.Errorf("failed to parse guardian ID '%s': %w", id, err) + } + parsedIDs[i] = parsedID + } + return parsedIDs, nil } // createChildBusAssociations は、指定された子供たちに対してBusChildAssociationを作成します。 func createChildBusAssociations(ctx context.Context, tx *ent.Tx, children []*ent.Child, bus *ent.Bus, busType childbusassociationRepo.BusType) error { - for _, child := range children { - _, err := tx.ChildBusAssociation.Create(). - SetChild(child). - SetBus(bus). - SetBusType(busType). - Save(ctx) // ctxを関数の引数から渡す - if err != nil { - return fmt.Errorf("failed to create bus child association: %w", err) - } - } - return nil + for _, child := range children { + _, err := tx.ChildBusAssociation.Create(). + SetChild(child). + SetBus(bus). + SetBusType(busType). + Save(ctx) // ctxを関数の引数から渡す + if err != nil { + return fmt.Errorf("failed to create bus child association: %w", err) + } + } + return nil } - func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusListByNurseryIdRequest) (*pb.GetBusListByNurseryIdResponse, error) { nurseryID, err := uuid.Parse(req.NurseryId) if err != nil { @@ -189,43 +188,43 @@ func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusLi } func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatusRequest) (*pb.ChangeBusStatusResponse, error) { - busID, err := uuid.Parse(req.BusId) - if err != nil { - return nil, fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) - } - - tx, err := i.entClient.Tx(ctx) - if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) - } - - status, err := utils.ConvertPbStatusToEntStatus(req.Status) - if err != nil { - return nil, fmt.Errorf("failed to convert status: %w", err) - } - - bus, err := tx.Bus.UpdateOneID(busID). - SetStatus(*status). - Save(ctx) - - if err != nil { - return nil, fmt.Errorf("failed to update bus: %w", err) - } - - // Nurseryエッジを持つBusを取得 - bus, err = tx.Bus.Query(). - Where(busRepo.IDEQ(bus.ID)). - WithNursery(). - Only(ctx) - - if err != nil { - return nil, fmt.Errorf("failed to get bus: %w", err) - } - - if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) - } - return &pb.ChangeBusStatusResponse{Bus: utils.ToPbBus(bus)}, nil + busID, err := uuid.Parse(req.BusId) + if err != nil { + return nil, fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) + } + + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + + status, err := utils.ConvertPbStatusToEntStatus(req.Status) + if err != nil { + return nil, fmt.Errorf("failed to convert status: %w", err) + } + + bus, err := tx.Bus.UpdateOneID(busID). + SetStatus(*status). + Save(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to update bus: %w", err) + } + + // Nurseryエッジを持つBusを取得 + bus, err = tx.Bus.Query(). + Where(busRepo.IDEQ(bus.ID)). + WithNursery(). + Only(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to get bus: %w", err) + } + + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + return &pb.ChangeBusStatusResponse{Bus: utils.ToPbBus(bus)}, nil } func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.BusQuery, error)) ([]*pb.Bus, error) { @@ -271,16 +270,6 @@ func setNextStation(ctx context.Context, tx *ent.Tx, guardianIDs []string, setNe return fmt.Errorf("failed to find station for guardian ID '%s': %w", guardianID, err) } - // 既存のnextStationリレーションをクリアします - err = tx.Station.UpdateOne(currentStation). - ClearMorningNextStation(). // 朝のnextStationリレーションをクリア - ClearEveningNextStation(). // 夕方のnextStationリレーションをクリア - Exec(ctx) - if err != nil { - return fmt.Errorf("failed to clear next stations for station ID '%s': %w", currentStation.ID, err) - } - - if index < len(guardianIDs)-1 { nextGuardianID := guardianIDs[index+1] nextGuardianIDParsed, err := uuid.Parse(nextGuardianID) From 1f54f33979e702dc1e694ea7ddaaa036cd244101 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 22:36:53 +0900 Subject: [PATCH 376/771] fix: Add VideoType enum to resources.proto --- backend/interfaces/bus.go | 17 +- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 180 +++++++++-------- .../go/where_child_bus/v1/resources.pb.go | 190 ++++++++++++------ .../proto-gen/where_child_bus/v1/bus.pb.dart | 34 +++- .../where_child_bus/v1/bus.pbjson.dart | 11 +- .../where_child_bus/v1/resources.pbenum.dart | 17 ++ .../where_child_bus/v1/resources.pbjson.dart | 15 ++ .../proto-gen/where_child_bus/v1/bus_pb2.py | 14 +- .../proto-gen/where_child_bus/v1/bus_pb2.pyi | 6 +- .../where_child_bus/v1/resources_pb2.py | 12 +- .../where_child_bus/v1/resources_pb2.pyi | 9 + proto/where_child_bus/v1/bus.proto | 37 ++-- proto/where_child_bus/v1/resources.proto | 6 + 13 files changed, 351 insertions(+), 197 deletions(-) diff --git a/backend/interfaces/bus.go b/backend/interfaces/bus.go index 55ad79f6..62633ae7 100644 --- a/backend/interfaces/bus.go +++ b/backend/interfaces/bus.go @@ -11,6 +11,21 @@ type busServiceServer struct { interactor *bus.Interactor } +// SendLocationContinuous implements where_child_busv1.BusServiceServer. +func (*busServiceServer) SendLocationContinuous(pb.BusService_SendLocationContinuousServer) error { + panic("unimplemented") +} + +// StreamBusVideo implements where_child_busv1.BusServiceServer. +func (*busServiceServer) StreamBusVideo(pb.BusService_StreamBusVideoServer) error { + panic("unimplemented") +} + +// TrackBusContinuous implements where_child_busv1.BusServiceServer. +func (*busServiceServer) TrackBusContinuous(*pb.TrackBusContinuousRequest, pb.BusService_TrackBusContinuousServer) error { + panic("unimplemented") +} + func NewBusServiceServer(interactor *bus.Interactor) pb.BusServiceServer { return &busServiceServer{interactor} } @@ -27,5 +42,5 @@ func (s *busServiceServer) GetBusListByNurseryId(ctx context.Context, req *pb.Ge // ChangeBusStatus implements where_child_busv1.BusServiceServer. func (s *busServiceServer) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatusRequest) (*pb.ChangeBusStatusResponse, error) { - return s.interactor.ChangeBusStatus(ctx, req) + return s.interactor.ChangeBusStatus(ctx, req) } diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index dac8ae8d..67906e12 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -575,9 +575,10 @@ type StreamBusVideoRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - VideoChunk []byte `protobuf:"bytes,2,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + VideoType VideoType `protobuf:"varint,2,opt,name=video_type,json=videoType,proto3,enum=where_child_bus.v1.VideoType" json:"video_type,omitempty"` + VideoChunk []byte `protobuf:"bytes,3,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data + Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp } func (x *StreamBusVideoRequest) Reset() { @@ -619,6 +620,13 @@ func (x *StreamBusVideoRequest) GetBusId() string { return "" } +func (x *StreamBusVideoRequest) GetVideoType() VideoType { + if x != nil { + return x.VideoType + } + return VideoType_VIDEO_TYPE_UNSPECIFIED +} + func (x *StreamBusVideoRequest) GetVideoChunk() []byte { if x != nil { return x.VideoChunk @@ -739,74 +747,78 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0x6d, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, - 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, - 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, - 0x75, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, - 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb6, 0x05, - 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, - 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, - 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0xab, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, + 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, + 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, + 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb6, 0x05, 0x0a, + 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, + 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, - 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, - 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, + 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, + 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -837,29 +849,31 @@ var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ (*StreamBusVideoResponse)(nil), // 11: where_child_bus.v1.StreamBusVideoResponse (*Bus)(nil), // 12: where_child_bus.v1.Bus (Status)(0), // 13: where_child_bus.v1.Status + (VideoType)(0), // 14: where_child_bus.v1.VideoType } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ 12, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus 12, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus 13, // 2: where_child_bus.v1.ChangeBusStatusRequest.status:type_name -> where_child_bus.v1.Status 12, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus - 0, // 4: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest - 2, // 5: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 4, // 6: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest - 6, // 7: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest - 8, // 8: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest - 10, // 9: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest - 1, // 10: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 11: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 5, // 12: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse - 7, // 13: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse - 9, // 14: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse - 11, // 15: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse - 10, // [10:16] is the sub-list for method output_type - 4, // [4:10] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 14, // 4: where_child_bus.v1.StreamBusVideoRequest.video_type:type_name -> where_child_bus.v1.VideoType + 0, // 5: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 6: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 4, // 7: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest + 6, // 8: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest + 8, // 9: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest + 10, // 10: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest + 1, // 11: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 12: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 5, // 13: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse + 7, // 14: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse + 9, // 15: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse + 11, // 16: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 987fcb19..ba6d06d0 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -73,6 +73,55 @@ func (Status) EnumDescriptor() ([]byte, []int) { return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{0} } +type VideoType int32 + +const ( + VideoType_VIDEO_TYPE_UNSPECIFIED VideoType = 0 + VideoType_VIDEO_TYPE_GET_ON VideoType = 1 + VideoType_VIDEO_TYPE_GET_OFF VideoType = 2 +) + +// Enum value maps for VideoType. +var ( + VideoType_name = map[int32]string{ + 0: "VIDEO_TYPE_UNSPECIFIED", + 1: "VIDEO_TYPE_GET_ON", + 2: "VIDEO_TYPE_GET_OFF", + } + VideoType_value = map[string]int32{ + "VIDEO_TYPE_UNSPECIFIED": 0, + "VIDEO_TYPE_GET_ON": 1, + "VIDEO_TYPE_GET_OFF": 2, + } +) + +func (x VideoType) Enum() *VideoType { + p := new(VideoType) + *p = x + return p +} + +func (x VideoType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VideoType) Descriptor() protoreflect.EnumDescriptor { + return file_where_child_bus_v1_resources_proto_enumTypes[1].Descriptor() +} + +func (VideoType) Type() protoreflect.EnumType { + return &file_where_child_bus_v1_resources_proto_enumTypes[1] +} + +func (x VideoType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VideoType.Descriptor instead. +func (VideoType) EnumDescriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{1} +} + type Sex int32 const ( @@ -109,11 +158,11 @@ func (x Sex) String() string { } func (Sex) Descriptor() protoreflect.EnumDescriptor { - return file_where_child_bus_v1_resources_proto_enumTypes[1].Descriptor() + return file_where_child_bus_v1_resources_proto_enumTypes[2].Descriptor() } func (Sex) Type() protoreflect.EnumType { - return &file_where_child_bus_v1_resources_proto_enumTypes[1] + return &file_where_child_bus_v1_resources_proto_enumTypes[2] } func (x Sex) Number() protoreflect.EnumNumber { @@ -122,7 +171,7 @@ func (x Sex) Number() protoreflect.EnumNumber { // Deprecated: Use Sex.Descriptor instead. func (Sex) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{1} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{2} } type BusType int32 @@ -158,11 +207,11 @@ func (x BusType) String() string { } func (BusType) Descriptor() protoreflect.EnumDescriptor { - return file_where_child_bus_v1_resources_proto_enumTypes[2].Descriptor() + return file_where_child_bus_v1_resources_proto_enumTypes[3].Descriptor() } func (BusType) Type() protoreflect.EnumType { - return &file_where_child_bus_v1_resources_proto_enumTypes[2] + return &file_where_child_bus_v1_resources_proto_enumTypes[3] } func (x BusType) Number() protoreflect.EnumNumber { @@ -171,7 +220,7 @@ func (x BusType) Number() protoreflect.EnumNumber { // Deprecated: Use BusType.Descriptor instead. func (BusType) EnumDescriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{2} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{3} } type Nursery struct { @@ -1504,32 +1553,38 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, - 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, - 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, - 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, - 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, - 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, - 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, - 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x56, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, + 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x44, 0x45, 0x4f, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, + 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, + 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, + 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, + 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, + 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, + 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, + 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1544,46 +1599,47 @@ func file_where_child_bus_v1_resources_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_resources_proto_rawDescData } -var file_where_child_bus_v1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_where_child_bus_v1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_where_child_bus_v1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_where_child_bus_v1_resources_proto_goTypes = []interface{}{ (Status)(0), // 0: where_child_bus.v1.Status - (Sex)(0), // 1: where_child_bus.v1.Sex - (BusType)(0), // 2: where_child_bus.v1.BusType - (*Nursery)(nil), // 3: where_child_bus.v1.Nursery - (*NurseryResponse)(nil), // 4: where_child_bus.v1.NurseryResponse - (*Guardian)(nil), // 5: where_child_bus.v1.Guardian - (*GuardianResponse)(nil), // 6: where_child_bus.v1.GuardianResponse - (*Bus)(nil), // 7: where_child_bus.v1.Bus - (*Child)(nil), // 8: where_child_bus.v1.Child - (*Station)(nil), // 9: where_child_bus.v1.Station - (*ChildBusAssociation)(nil), // 10: where_child_bus.v1.ChildBusAssociation - (*BusStationAssociation)(nil), // 11: where_child_bus.v1.BusStationAssociation - (*ChildPhoto)(nil), // 12: where_child_bus.v1.ChildPhoto - (*BoardingRecord)(nil), // 13: where_child_bus.v1.BoardingRecord - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + (VideoType)(0), // 1: where_child_bus.v1.VideoType + (Sex)(0), // 2: where_child_bus.v1.Sex + (BusType)(0), // 3: where_child_bus.v1.BusType + (*Nursery)(nil), // 4: where_child_bus.v1.Nursery + (*NurseryResponse)(nil), // 5: where_child_bus.v1.NurseryResponse + (*Guardian)(nil), // 6: where_child_bus.v1.Guardian + (*GuardianResponse)(nil), // 7: where_child_bus.v1.GuardianResponse + (*Bus)(nil), // 8: where_child_bus.v1.Bus + (*Child)(nil), // 9: where_child_bus.v1.Child + (*Station)(nil), // 10: where_child_bus.v1.Station + (*ChildBusAssociation)(nil), // 11: where_child_bus.v1.ChildBusAssociation + (*BusStationAssociation)(nil), // 12: where_child_bus.v1.BusStationAssociation + (*ChildPhoto)(nil), // 13: where_child_bus.v1.ChildPhoto + (*BoardingRecord)(nil), // 14: where_child_bus.v1.BoardingRecord + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp } var file_where_child_bus_v1_resources_proto_depIdxs = []int32{ - 14, // 0: where_child_bus.v1.Nursery.created_at:type_name -> google.protobuf.Timestamp - 14, // 1: where_child_bus.v1.Nursery.updated_at:type_name -> google.protobuf.Timestamp - 14, // 2: where_child_bus.v1.NurseryResponse.created_at:type_name -> google.protobuf.Timestamp - 14, // 3: where_child_bus.v1.NurseryResponse.updated_at:type_name -> google.protobuf.Timestamp - 14, // 4: where_child_bus.v1.Guardian.created_at:type_name -> google.protobuf.Timestamp - 14, // 5: where_child_bus.v1.Guardian.updated_at:type_name -> google.protobuf.Timestamp - 14, // 6: where_child_bus.v1.GuardianResponse.created_at:type_name -> google.protobuf.Timestamp - 14, // 7: where_child_bus.v1.GuardianResponse.updated_at:type_name -> google.protobuf.Timestamp + 15, // 0: where_child_bus.v1.Nursery.created_at:type_name -> google.protobuf.Timestamp + 15, // 1: where_child_bus.v1.Nursery.updated_at:type_name -> google.protobuf.Timestamp + 15, // 2: where_child_bus.v1.NurseryResponse.created_at:type_name -> google.protobuf.Timestamp + 15, // 3: where_child_bus.v1.NurseryResponse.updated_at:type_name -> google.protobuf.Timestamp + 15, // 4: where_child_bus.v1.Guardian.created_at:type_name -> google.protobuf.Timestamp + 15, // 5: where_child_bus.v1.Guardian.updated_at:type_name -> google.protobuf.Timestamp + 15, // 6: where_child_bus.v1.GuardianResponse.created_at:type_name -> google.protobuf.Timestamp + 15, // 7: where_child_bus.v1.GuardianResponse.updated_at:type_name -> google.protobuf.Timestamp 0, // 8: where_child_bus.v1.Bus.status:type_name -> where_child_bus.v1.Status - 14, // 9: where_child_bus.v1.Bus.created_at:type_name -> google.protobuf.Timestamp - 14, // 10: where_child_bus.v1.Bus.updated_at:type_name -> google.protobuf.Timestamp - 1, // 11: where_child_bus.v1.Child.sex:type_name -> where_child_bus.v1.Sex - 14, // 12: where_child_bus.v1.Child.created_at:type_name -> google.protobuf.Timestamp - 14, // 13: where_child_bus.v1.Child.updated_at:type_name -> google.protobuf.Timestamp - 14, // 14: where_child_bus.v1.Station.created_at:type_name -> google.protobuf.Timestamp - 14, // 15: where_child_bus.v1.Station.updated_at:type_name -> google.protobuf.Timestamp - 2, // 16: where_child_bus.v1.ChildBusAssociation.bus_type:type_name -> where_child_bus.v1.BusType - 14, // 17: where_child_bus.v1.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp - 14, // 18: where_child_bus.v1.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp - 14, // 19: where_child_bus.v1.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp + 15, // 9: where_child_bus.v1.Bus.created_at:type_name -> google.protobuf.Timestamp + 15, // 10: where_child_bus.v1.Bus.updated_at:type_name -> google.protobuf.Timestamp + 2, // 11: where_child_bus.v1.Child.sex:type_name -> where_child_bus.v1.Sex + 15, // 12: where_child_bus.v1.Child.created_at:type_name -> google.protobuf.Timestamp + 15, // 13: where_child_bus.v1.Child.updated_at:type_name -> google.protobuf.Timestamp + 15, // 14: where_child_bus.v1.Station.created_at:type_name -> google.protobuf.Timestamp + 15, // 15: where_child_bus.v1.Station.updated_at:type_name -> google.protobuf.Timestamp + 3, // 16: where_child_bus.v1.ChildBusAssociation.bus_type:type_name -> where_child_bus.v1.BusType + 15, // 17: where_child_bus.v1.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp + 15, // 18: where_child_bus.v1.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp + 15, // 19: where_child_bus.v1.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp 20, // [20:20] is the sub-list for method output_type 20, // [20:20] is the sub-list for method input_type 20, // [20:20] is the sub-list for extension type_name @@ -1735,7 +1791,7 @@ func file_where_child_bus_v1_resources_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_resources_proto_rawDesc, - NumEnums: 3, + NumEnums: 4, NumMessages: 11, NumExtensions: 0, NumServices: 0, diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index b4ee3bf2..b6097d33 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -643,6 +643,7 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { class StreamBusVideoRequest extends $pb.GeneratedMessage { factory StreamBusVideoRequest({ $core.String? busId, + $8.VideoType? videoType, $core.List<$core.int>? videoChunk, $fixnum.Int64? timestamp, }) { @@ -650,6 +651,9 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { if (busId != null) { $result.busId = busId; } + if (videoType != null) { + $result.videoType = videoType; + } if (videoChunk != null) { $result.videoChunk = videoChunk; } @@ -664,8 +668,9 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StreamBusVideoRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') - ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) - ..aInt64(3, _omitFieldNames ? '' : 'timestamp') + ..e<$8.VideoType>(2, _omitFieldNames ? '' : 'videoType', $pb.PbFieldType.OE, defaultOrMaker: $8.VideoType.VIDEO_TYPE_UNSPECIFIED, valueOf: $8.VideoType.valueOf, enumValues: $8.VideoType.values) + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) + ..aInt64(4, _omitFieldNames ? '' : 'timestamp') ..hasRequiredFields = false ; @@ -700,22 +705,31 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { void clearBusId() => clearField(1); @$pb.TagNumber(2) - $core.List<$core.int> get videoChunk => $_getN(1); + $8.VideoType get videoType => $_getN(1); @$pb.TagNumber(2) - set videoChunk($core.List<$core.int> v) { $_setBytes(1, v); } + set videoType($8.VideoType v) { setField(2, v); } @$pb.TagNumber(2) - $core.bool hasVideoChunk() => $_has(1); + $core.bool hasVideoType() => $_has(1); @$pb.TagNumber(2) - void clearVideoChunk() => clearField(2); + void clearVideoType() => clearField(2); @$pb.TagNumber(3) - $fixnum.Int64 get timestamp => $_getI64(2); + $core.List<$core.int> get videoChunk => $_getN(2); @$pb.TagNumber(3) - set timestamp($fixnum.Int64 v) { $_setInt64(2, v); } + set videoChunk($core.List<$core.int> v) { $_setBytes(2, v); } @$pb.TagNumber(3) - $core.bool hasTimestamp() => $_has(2); + $core.bool hasVideoChunk() => $_has(2); @$pb.TagNumber(3) - void clearTimestamp() => clearField(3); + void clearVideoChunk() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get timestamp => $_getI64(3); + @$pb.TagNumber(4) + set timestamp($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasTimestamp() => $_has(3); + @$pb.TagNumber(4) + void clearTimestamp() => clearField(4); } class StreamBusVideoResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 48a9635d..c89b69b3 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -158,15 +158,18 @@ const StreamBusVideoRequest$json = { '1': 'StreamBusVideoRequest', '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'video_chunk', '3': 2, '4': 1, '5': 12, '10': 'videoChunk'}, - {'1': 'timestamp', '3': 3, '4': 1, '5': 3, '10': 'timestamp'}, + {'1': 'video_type', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.VideoType', '10': 'videoType'}, + {'1': 'video_chunk', '3': 3, '4': 1, '5': 12, '10': 'videoChunk'}, + {'1': 'timestamp', '3': 4, '4': 1, '5': 3, '10': 'timestamp'}, ], }; /// Descriptor for `StreamBusVideoRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Decode( - 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBIfCgt2aWRlb1' - '9jaHVuaxgCIAEoDFIKdmlkZW9DaHVuaxIcCgl0aW1lc3RhbXAYAyABKANSCXRpbWVzdGFtcA=='); + 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI8Cgp2aWRlb1' + '90eXBlGAIgASgOMh0ud2hlcmVfY2hpbGRfYnVzLnYxLlZpZGVvVHlwZVIJdmlkZW9UeXBlEh8K' + 'C3ZpZGVvX2NodW5rGAMgASgMUgp2aWRlb0NodW5rEhwKCXRpbWVzdGFtcBgEIAEoA1IJdGltZX' + 'N0YW1w'); @$core.Deprecated('Use streamBusVideoResponseDescriptor instead') const StreamBusVideoResponse$json = { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart index 491d8433..dee62498 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart @@ -32,6 +32,23 @@ class Status extends $pb.ProtobufEnum { const Status._($core.int v, $core.String n) : super(v, n); } +class VideoType extends $pb.ProtobufEnum { + static const VideoType VIDEO_TYPE_UNSPECIFIED = VideoType._(0, _omitEnumNames ? '' : 'VIDEO_TYPE_UNSPECIFIED'); + static const VideoType VIDEO_TYPE_GET_ON = VideoType._(1, _omitEnumNames ? '' : 'VIDEO_TYPE_GET_ON'); + static const VideoType VIDEO_TYPE_GET_OFF = VideoType._(2, _omitEnumNames ? '' : 'VIDEO_TYPE_GET_OFF'); + + static const $core.List values = [ + VIDEO_TYPE_UNSPECIFIED, + VIDEO_TYPE_GET_ON, + VIDEO_TYPE_GET_OFF, + ]; + + static final $core.Map<$core.int, VideoType> _byValue = $pb.ProtobufEnum.initByValue(values); + static VideoType? valueOf($core.int value) => _byValue[value]; + + const VideoType._($core.int v, $core.String n) : super(v, n); +} + class Sex extends $pb.ProtobufEnum { static const Sex SEX_UNSPECIFIED = Sex._(0, _omitEnumNames ? '' : 'SEX_UNSPECIFIED'); static const Sex SEX_MAN = Sex._(1, _omitEnumNames ? '' : 'SEX_MAN'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 95589495..3b94f11d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -29,6 +29,21 @@ final $typed_data.Uint8List statusDescriptor = $convert.base64Decode( 'CgZTdGF0dXMSFgoSU1RBVFVTX1VOU1BFQ0lGSUVEEAASEgoOU1RBVFVTX1NUT1BQRUQQARISCg' '5TVEFUVVNfUlVOTklORxACEhcKE1NUQVRVU19NQUlOVEVJTkFOQ0UQAw=='); +@$core.Deprecated('Use videoTypeDescriptor instead') +const VideoType$json = { + '1': 'VideoType', + '2': [ + {'1': 'VIDEO_TYPE_UNSPECIFIED', '2': 0}, + {'1': 'VIDEO_TYPE_GET_ON', '2': 1}, + {'1': 'VIDEO_TYPE_GET_OFF', '2': 2}, + ], +}; + +/// Descriptor for `VideoType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List videoTypeDescriptor = $convert.base64Decode( + 'CglWaWRlb1R5cGUSGgoWVklERU9fVFlQRV9VTlNQRUNJRklFRBAAEhUKEVZJREVPX1RZUEVfR0' + 'VUX09OEAESFgoSVklERU9fVFlQRV9HRVRfT0ZGEAI='); + @$core.Deprecated('Use sexDescriptor instead') const Sex$json = { '1': 'Sex', diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py index 96f44557..13407d1b 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\x8e\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\"m\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1f\n\x0bvideo_chunk\x18\x02 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x03 \x01(\x03R\ttimestamp\"\x18\n\x16StreamBusVideoResponse2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\x8e\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\"\xab\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nvideo_type\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x03 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\"\x18\n\x16StreamBusVideoResponse2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -43,10 +43,10 @@ _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=902 _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=905 _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1044 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1046 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1155 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1157 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1181 - _globals['_BUSSERVICE']._serialized_start=1184 - _globals['_BUSSERVICE']._serialized_end=1878 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1047 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1218 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1220 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1244 + _globals['_BUSSERVICE']._serialized_start=1247 + _globals['_BUSSERVICE']._serialized_end=1941 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi index df1957a1..2206dd23 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi @@ -87,14 +87,16 @@ class TrackBusContinuousResponse(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., timestamp: _Optional[int] = ...) -> None: ... class StreamBusVideoRequest(_message.Message): - __slots__ = ("bus_id", "video_chunk", "timestamp") + __slots__ = ("bus_id", "video_type", "video_chunk", "timestamp") BUS_ID_FIELD_NUMBER: _ClassVar[int] + VIDEO_TYPE_FIELD_NUMBER: _ClassVar[int] VIDEO_CHUNK_FIELD_NUMBER: _ClassVar[int] TIMESTAMP_FIELD_NUMBER: _ClassVar[int] bus_id: str + video_type: _resources_pb2.VideoType video_chunk: bytes timestamp: int - def __init__(self, bus_id: _Optional[str] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[int] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., video_type: _Optional[_Union[_resources_pb2.VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[int] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = () diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index d8a9e8d9..7a82d610 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x87\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xad\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x87\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xad\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -25,10 +25,12 @@ _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' _globals['_STATUS']._serialized_start=3350 _globals['_STATUS']._serialized_end=3447 - _globals['_SEX']._serialized_start=3449 - _globals['_SEX']._serialized_end=3518 - _globals['_BUSTYPE']._serialized_start=3520 - _globals['_BUSTYPE']._serialized_end=3599 + _globals['_VIDEOTYPE']._serialized_start=3449 + _globals['_VIDEOTYPE']._serialized_end=3535 + _globals['_SEX']._serialized_start=3537 + _globals['_SEX']._serialized_end=3606 + _globals['_BUSTYPE']._serialized_start=3608 + _globals['_BUSTYPE']._serialized_end=3687 _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=414 _globals['_NURSERYRESPONSE']._serialized_start=417 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi index 9d5b49cd..230298bc 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi @@ -13,6 +13,12 @@ class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): STATUS_RUNNING: _ClassVar[Status] STATUS_MAINTEINANCE: _ClassVar[Status] +class VideoType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + VIDEO_TYPE_UNSPECIFIED: _ClassVar[VideoType] + VIDEO_TYPE_GET_ON: _ClassVar[VideoType] + VIDEO_TYPE_GET_OFF: _ClassVar[VideoType] + class Sex(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () SEX_UNSPECIFIED: _ClassVar[Sex] @@ -29,6 +35,9 @@ STATUS_UNSPECIFIED: Status STATUS_STOPPED: Status STATUS_RUNNING: Status STATUS_MAINTEINANCE: Status +VIDEO_TYPE_UNSPECIFIED: VideoType +VIDEO_TYPE_GET_ON: VideoType +VIDEO_TYPE_GET_OFF: VideoType SEX_UNSPECIFIED: Sex SEX_MAN: Sex SEX_WOMAN: Sex diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 94434d92..69eccfd8 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -5,13 +5,13 @@ package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; service BusService { - rpc CreateBus(CreateBusRequest) returns (CreateBusResponse); - rpc GetBusListByNurseryId(GetBusListByNurseryIdRequest) returns (GetBusListByNurseryIdResponse); - rpc ChangeBusStatus(ChangeBusStatusRequest) returns (ChangeBusStatusResponse); + rpc CreateBus(CreateBusRequest) returns (CreateBusResponse); + rpc GetBusListByNurseryId(GetBusListByNurseryIdRequest) returns (GetBusListByNurseryIdResponse); + rpc ChangeBusStatus(ChangeBusStatusRequest) returns (ChangeBusStatusResponse); - rpc SendLocationContinuous(stream SendLocationContinuousRequest) returns (SendLocationContinuousResponse); - rpc TrackBusContinuous(TrackBusContinuousRequest) returns (stream TrackBusContinuousResponse); - rpc StreamBusVideo(stream StreamBusVideoRequest) returns (StreamBusVideoResponse); + rpc SendLocationContinuous(stream SendLocationContinuousRequest) returns (SendLocationContinuousResponse); + rpc TrackBusContinuous(TrackBusContinuousRequest) returns (stream TrackBusContinuousResponse); + rpc StreamBusVideo(stream StreamBusVideoRequest) returns (StreamBusVideoResponse); } message CreateBusRequest { @@ -45,10 +45,10 @@ message ChangeBusStatusResponse { // Updated and newly defined messages for the adjusted RPCs message SendLocationContinuousRequest { - string bus_id = 1; - double latitude = 2; - double longitude = 3; - int64 timestamp = 4; // Unix timestamp + string bus_id = 1; + double latitude = 2; + double longitude = 3; + int64 timestamp = 4; // Unix timestamp } message SendLocationContinuousResponse { @@ -56,20 +56,21 @@ message SendLocationContinuousResponse { } message TrackBusContinuousRequest { - string bus_id = 1; + string bus_id = 1; } message TrackBusContinuousResponse { - string bus_id = 1; - double latitude = 2; - double longitude = 3; - int64 timestamp = 4; // Unix timestamp + string bus_id = 1; + double latitude = 2; + double longitude = 3; + int64 timestamp = 4; // Unix timestamp } message StreamBusVideoRequest { - string bus_id = 1; - bytes video_chunk = 2; // Chunk of video data - int64 timestamp = 3; // Unix timestamp + string bus_id = 1; + VideoType video_type = 2; + bytes video_chunk = 3; // Chunk of video data + int64 timestamp = 4; // Unix timestamp } message StreamBusVideoResponse { diff --git a/proto/where_child_bus/v1/resources.proto b/proto/where_child_bus/v1/resources.proto index 8012c24d..4f4754eb 100644 --- a/proto/where_child_bus/v1/resources.proto +++ b/proto/where_child_bus/v1/resources.proto @@ -61,6 +61,12 @@ enum Status { STATUS_MAINTEINANCE = 3; } +enum VideoType { + VIDEO_TYPE_UNSPECIFIED = 0; + VIDEO_TYPE_GET_ON = 1; + VIDEO_TYPE_GET_OFF = 2; +} + message Bus { string id = 1; string nursery_id = 2; From dde8ec28ff7fe615e659e5f06fc608c0a3477bb7 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 16 Feb 2024 23:35:37 +0900 Subject: [PATCH 377/771] =?UTF-8?q?feat:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=81=AE=E8=AA=AD=E3=81=BF=E8=BE=BC?= =?UTF-8?q?=E3=81=BF=E3=81=AB=E3=82=A8=E3=83=A9=E3=83=BC=E3=83=8F=E3=83=B3?= =?UTF-8?q?=E3=83=89=E3=83=AA=E3=83=B3=E3=82=B0=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/models/bus_edit_page_type.dart | 4 +++ .../lib/pages/bus_list_page/bottom_sheet.dart | 36 +++++++++---------- .../bus_edit_page/bus_edit_page.dart | 8 +++-- .../pages/bus_list_page/bus_list_page.dart | 8 ++++- .../bus_list_page/service/create_bus.dart | 16 +++++++++ 5 files changed, 51 insertions(+), 21 deletions(-) create mode 100644 frontend/where_child_bus/lib/models/bus_edit_page_type.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/service/create_bus.dart diff --git a/frontend/where_child_bus/lib/models/bus_edit_page_type.dart b/frontend/where_child_bus/lib/models/bus_edit_page_type.dart new file mode 100644 index 00000000..2ee8765e --- /dev/null +++ b/frontend/where_child_bus/lib/models/bus_edit_page_type.dart @@ -0,0 +1,4 @@ +enum BusEditPageType { + create, + update, +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index e35d54ec..d01ecd8b 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -1,6 +1,7 @@ import "dart:developer" as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:where_child_bus/models/bus_edit_page_type.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/guardians_list.dart'; @@ -23,20 +24,6 @@ class _BottomSheetWidgetState extends State { bool _isLoading = true; bool _isFailLoading = false; - //削除する - final busStations = [ - "station1", - "station2", - "station3", - "station4", - "station5", - "station6", - "station7", - "station8", - "station7", - "station7" - ]; - @override void initState() { super.initState(); @@ -44,8 +31,8 @@ class _BottomSheetWidgetState extends State { } Future _loadGuardians() async { - var res = await getGuardiansByBusId(widget.bus.id); try { + var res = await getGuardiansByBusId(widget.bus.id); if (mounted) { setState(() { guardians = res; @@ -54,9 +41,11 @@ class _BottomSheetWidgetState extends State { } } catch (e) { if (kDebugMode) { - developer.log("バスリストのロード中にエラーが発生しました: $e"); + developer.log("保護者リストのロード中にエラーが発生しました: $e"); + } + if (mounted) { + setState(() => {_isLoading = false, _isFailLoading = true}); } - setState(() => {_isLoading = false, _isFailLoading = true}); } } @@ -85,7 +74,7 @@ class _BottomSheetWidgetState extends State { children: [ // titleText(), modalHeader(widget.bus.name, "test"), - guardiansListView(), + _isFailLoading ? loadingFailText() : guardiansListView(), ConfirmButton( buttonText: "乗客情報", onTap: () => moveToBusPassengerPage(context), @@ -124,6 +113,7 @@ class _BottomSheetWidgetState extends State { MaterialPageRoute( builder: (context) => BusEditPage( bus: widget.bus, + busEditPageType: BusEditPageType.update, ))); }, style: editButtonStyle(), @@ -163,6 +153,16 @@ class _BottomSheetWidgetState extends State { ); } + Widget loadingFailText() { + return const Text( + "保護者リストの読み込みに失敗しました", + style: TextStyle( + color: Colors.red, + fontSize: 16, + ), + ); + } + Widget courseNameText(String name) { return Padding( padding: const EdgeInsets.only(bottom: 10), diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 85d663ac..a697ea3f 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; +import 'package:where_child_bus/models/bus_edit_page_type.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; @@ -8,8 +9,9 @@ import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.da class BusEditPage extends StatefulWidget { Bus? bus; + final BusEditPageType busEditPageType; - BusEditPage({super.key, this.bus}); + BusEditPage({super.key, this.bus, required this.busEditPageType}); @override _BusEditPage createState() => _BusEditPage(); @@ -50,7 +52,9 @@ class _BusEditPage extends State { // inputFieldsAndThumbnail(context), inputFields(), manageChildrenButton(), - ConfirmButton(buttonText: "保存"), + ConfirmButton( + buttonText: "保存", + ), ], ), ); diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index c1054910..b5b9a020 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -1,8 +1,10 @@ import "dart:developer" as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:where_child_bus/models/bus_edit_page_type.dart'; import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; +import 'package:where_child_bus/pages/bus_list_page/service/create_bus.dart'; import 'package:where_child_bus/pages/bus_list_page/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -82,7 +84,11 @@ class _BusListPageState extends State { return FloatingActionButton( onPressed: () { Navigator.push( - context, MaterialPageRoute(builder: (context) => BusEditPage())); + context, + MaterialPageRoute( + builder: (context) => BusEditPage( + busEditPageType: BusEditPageType.create, + ))); }, child: const Icon(Icons.add), ); diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/service/create_bus.dart b/frontend/where_child_bus/lib/pages/bus_list_page/service/create_bus.dart new file mode 100644 index 00000000..135c3dc3 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/service/create_bus.dart @@ -0,0 +1,16 @@ +import 'package:where_child_bus/util/api/bus.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; + +Future createBusService( + String nurseryId, + String name, + String plateNumber, + Iterable morningGuardianIds, + Iterable eveningGuardianIds) async { + try { + await createBus( + nurseryId, name, plateNumber, morningGuardianIds, eveningGuardianIds); + } catch (error) { + return Future.error(error); + } +} From 920e221f15723d32544e5a504095e3c628a9fa21 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 16 Feb 2024 23:36:54 +0900 Subject: [PATCH 378/771] feat: Implement GetGuardianListByBusId API --- backend/interfaces/guardian.go | 5 + .../go/where_child_bus/v1/guardian.pb.go | 241 ++++++++++++++---- .../go/where_child_bus/v1/guardian_grpc.pb.go | 41 ++- backend/usecases/guardian/guardian.go | 37 +++ .../where_child_bus/v1/guardian.pb.dart | 94 +++++++ .../where_child_bus/v1/guardian.pbgrpc.dart | 20 ++ .../where_child_bus/v1/guardian.pbjson.dart | 25 ++ .../where_child_bus/v1/guardian_pb2.py | 10 +- .../where_child_bus/v1/guardian_pb2.pyi | 15 +- .../where_child_bus/v1/guardian_pb2_grpc.py | 34 ++- proto/where_child_bus/v1/guardian.proto | 11 +- 11 files changed, 475 insertions(+), 58 deletions(-) diff --git a/backend/interfaces/guardian.go b/backend/interfaces/guardian.go index 6effc3d3..c33332d8 100644 --- a/backend/interfaces/guardian.go +++ b/backend/interfaces/guardian.go @@ -24,3 +24,8 @@ func (s *guardianServiceServer) CreateGuardian(ctx context.Context, req *pb.Crea func (s *guardianServiceServer) GuardianLogin(ctx context.Context, req *pb.GuardianLoginRequest) (*pb.GuardianLoginResponse, error) { return s.interactor.GuardianLogin(ctx, req) } + +// GetGuardianListByBusId implements where_child_busv1.GuardianServiceServer. +func (s *guardianServiceServer) GetGuardianListByBusId(ctx context.Context, req *pb.GetGuardianListByBusIdRequest) (*pb.GetGuardianListByBusIdResponse, error) { + return s.interactor.GetGuardianListByBusID(ctx, req) +} diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go index 032b53bd..e3e2b063 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go @@ -264,6 +264,100 @@ func (x *GuardianLoginResponse) GetNursery() *NurseryResponse { return nil } +type GetGuardianListByBusIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` +} + +func (x *GetGuardianListByBusIdRequest) Reset() { + *x = GetGuardianListByBusIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGuardianListByBusIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGuardianListByBusIdRequest) ProtoMessage() {} + +func (x *GetGuardianListByBusIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGuardianListByBusIdRequest.ProtoReflect.Descriptor instead. +func (*GetGuardianListByBusIdRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{4} +} + +func (x *GetGuardianListByBusIdRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +type GetGuardianListByBusIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Guardians []*GuardianResponse `protobuf:"bytes,1,rep,name=guardians,proto3" json:"guardians,omitempty"` +} + +func (x *GetGuardianListByBusIdResponse) Reset() { + *x = GetGuardianListByBusIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGuardianListByBusIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGuardianListByBusIdResponse) ProtoMessage() {} + +func (x *GetGuardianListByBusIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGuardianListByBusIdResponse.ProtoReflect.Descriptor instead. +func (*GetGuardianListByBusIdResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{5} +} + +func (x *GetGuardianListByBusIdResponse) GetGuardians() []*GuardianResponse { + if x != nil { + return x.Guardians + } + return nil +} + var File_where_child_bus_v1_guardian_proto protoreflect.FileDescriptor var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ @@ -304,37 +398,55 @@ var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0xe0, 0x01, 0x0a, - 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, + 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x22, 0x36, 0x0a, 0x1d, + 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, + 0x75, 0x73, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x32, 0xe1, 0x02, 0x0a, 0x0f, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, + 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, + 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, - 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, + 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, + 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -349,28 +461,33 @@ func file_where_child_bus_v1_guardian_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_guardian_proto_rawDescData } -var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_where_child_bus_v1_guardian_proto_goTypes = []interface{}{ - (*CreateGuardianRequest)(nil), // 0: where_child_bus.v1.CreateGuardianRequest - (*CreateGuardianResponse)(nil), // 1: where_child_bus.v1.CreateGuardianResponse - (*GuardianLoginRequest)(nil), // 2: where_child_bus.v1.GuardianLoginRequest - (*GuardianLoginResponse)(nil), // 3: where_child_bus.v1.GuardianLoginResponse - (*GuardianResponse)(nil), // 4: where_child_bus.v1.GuardianResponse - (*NurseryResponse)(nil), // 5: where_child_bus.v1.NurseryResponse + (*CreateGuardianRequest)(nil), // 0: where_child_bus.v1.CreateGuardianRequest + (*CreateGuardianResponse)(nil), // 1: where_child_bus.v1.CreateGuardianResponse + (*GuardianLoginRequest)(nil), // 2: where_child_bus.v1.GuardianLoginRequest + (*GuardianLoginResponse)(nil), // 3: where_child_bus.v1.GuardianLoginResponse + (*GetGuardianListByBusIdRequest)(nil), // 4: where_child_bus.v1.GetGuardianListByBusIdRequest + (*GetGuardianListByBusIdResponse)(nil), // 5: where_child_bus.v1.GetGuardianListByBusIdResponse + (*GuardianResponse)(nil), // 6: where_child_bus.v1.GuardianResponse + (*NurseryResponse)(nil), // 7: where_child_bus.v1.NurseryResponse } var file_where_child_bus_v1_guardian_proto_depIdxs = []int32{ - 4, // 0: where_child_bus.v1.CreateGuardianResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 4, // 1: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 5, // 2: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 0, // 3: where_child_bus.v1.GuardianService.CreateGuardian:input_type -> where_child_bus.v1.CreateGuardianRequest - 2, // 4: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest - 1, // 5: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse - 3, // 6: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 6, // 0: where_child_bus.v1.CreateGuardianResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 6, // 1: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 7, // 2: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 6, // 3: where_child_bus.v1.GetGuardianListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 0, // 4: where_child_bus.v1.GuardianService.CreateGuardian:input_type -> where_child_bus.v1.CreateGuardianRequest + 2, // 5: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest + 4, // 6: where_child_bus.v1.GuardianService.GetGuardianListByBusId:input_type -> where_child_bus.v1.GetGuardianListByBusIdRequest + 1, // 7: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse + 3, // 8: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse + 5, // 9: where_child_bus.v1.GuardianService.GetGuardianListByBusId:output_type -> where_child_bus.v1.GetGuardianListByBusIdResponse + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_where_child_bus_v1_guardian_proto_init() } @@ -428,6 +545,30 @@ func file_where_child_bus_v1_guardian_proto_init() { return nil } } + file_where_child_bus_v1_guardian_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGuardianListByBusIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_guardian_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGuardianListByBusIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -435,7 +576,7 @@ func file_where_child_bus_v1_guardian_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_guardian_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go index df4b5828..4e6ae6c3 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go @@ -19,8 +19,9 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - GuardianService_CreateGuardian_FullMethodName = "/where_child_bus.v1.GuardianService/CreateGuardian" - GuardianService_GuardianLogin_FullMethodName = "/where_child_bus.v1.GuardianService/GuardianLogin" + GuardianService_CreateGuardian_FullMethodName = "/where_child_bus.v1.GuardianService/CreateGuardian" + GuardianService_GuardianLogin_FullMethodName = "/where_child_bus.v1.GuardianService/GuardianLogin" + GuardianService_GetGuardianListByBusId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianListByBusId" ) // GuardianServiceClient is the client API for GuardianService service. @@ -29,6 +30,7 @@ const ( type GuardianServiceClient interface { CreateGuardian(ctx context.Context, in *CreateGuardianRequest, opts ...grpc.CallOption) (*CreateGuardianResponse, error) GuardianLogin(ctx context.Context, in *GuardianLoginRequest, opts ...grpc.CallOption) (*GuardianLoginResponse, error) + GetGuardianListByBusId(ctx context.Context, in *GetGuardianListByBusIdRequest, opts ...grpc.CallOption) (*GetGuardianListByBusIdResponse, error) } type guardianServiceClient struct { @@ -57,12 +59,22 @@ func (c *guardianServiceClient) GuardianLogin(ctx context.Context, in *GuardianL return out, nil } +func (c *guardianServiceClient) GetGuardianListByBusId(ctx context.Context, in *GetGuardianListByBusIdRequest, opts ...grpc.CallOption) (*GetGuardianListByBusIdResponse, error) { + out := new(GetGuardianListByBusIdResponse) + err := c.cc.Invoke(ctx, GuardianService_GetGuardianListByBusId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // GuardianServiceServer is the server API for GuardianService service. // All implementations should embed UnimplementedGuardianServiceServer // for forward compatibility type GuardianServiceServer interface { CreateGuardian(context.Context, *CreateGuardianRequest) (*CreateGuardianResponse, error) GuardianLogin(context.Context, *GuardianLoginRequest) (*GuardianLoginResponse, error) + GetGuardianListByBusId(context.Context, *GetGuardianListByBusIdRequest) (*GetGuardianListByBusIdResponse, error) } // UnimplementedGuardianServiceServer should be embedded to have forward compatible implementations. @@ -75,6 +87,9 @@ func (UnimplementedGuardianServiceServer) CreateGuardian(context.Context, *Creat func (UnimplementedGuardianServiceServer) GuardianLogin(context.Context, *GuardianLoginRequest) (*GuardianLoginResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GuardianLogin not implemented") } +func (UnimplementedGuardianServiceServer) GetGuardianListByBusId(context.Context, *GetGuardianListByBusIdRequest) (*GetGuardianListByBusIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGuardianListByBusId not implemented") +} // UnsafeGuardianServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GuardianServiceServer will @@ -123,6 +138,24 @@ func _GuardianService_GuardianLogin_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _GuardianService_GetGuardianListByBusId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGuardianListByBusIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuardianServiceServer).GetGuardianListByBusId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GuardianService_GetGuardianListByBusId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuardianServiceServer).GetGuardianListByBusId(ctx, req.(*GetGuardianListByBusIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + // GuardianService_ServiceDesc is the grpc.ServiceDesc for GuardianService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -138,6 +171,10 @@ var GuardianService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GuardianLogin", Handler: _GuardianService_GuardianLogin_Handler, }, + { + MethodName: "GetGuardianListByBusId", + Handler: _GuardianService_GetGuardianListByBusId_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/guardian.proto", diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 6fb684b1..9fa86aad 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -8,10 +8,12 @@ import ( "context" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" + "github.com/google/uuid" ) type Interactor struct { @@ -123,3 +125,38 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq Nursery: utils.ToPbNurseryResponse(guardian.Edges.Nursery), }, nil } + +func (i *Interactor) GetGuardianListByBusID(ctx context.Context, req *pb.GetGuardianListByBusIdRequest) (*pb.GetGuardianListByBusIdResponse, error) { + busID, err := uuid.Parse(req.BusId) + if err != nil { + return nil, fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) + } + // トランザクションを開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + return nil, fmt.Errorf("failed to start transaction: %w", err) + } + defer tx.Rollback() + + // Guardianを取得 + guardians, err := tx.Guardian.Query(). + Where(guardianRepo.HasNurseryWith(nurseryRepo.HasBusesWith(busRepo.IDEQ(busID)))). + WithNursery(). + All(ctx) + + if err != nil { + return nil, fmt.Errorf("failed to get guardians by bus ID: %w", err) + } + + // トランザクションをコミット + if err := tx.Commit(); err != nil { + return nil, fmt.Errorf("failed to commit transaction: %w", err) + } + + var pbGuardians []*pb.GuardianResponse + for _, guardian := range guardians { + pbGuardians = append(pbGuardians, utils.ToPbGuardianResponse(guardian)) + } + + return &pb.GetGuardianListByBusIdResponse{Guardians: pbGuardians}, nil +} diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index a4ec1e6a..3522cdd2 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -319,6 +319,100 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { $8.NurseryResponse ensureNursery() => $_ensure(2); } +class GetGuardianListByBusIdRequest extends $pb.GeneratedMessage { + factory GetGuardianListByBusIdRequest({ + $core.String? busId, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + return $result; + } + GetGuardianListByBusIdRequest._() : super(); + factory GetGuardianListByBusIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianListByBusIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByBusIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdRequest clone() => GetGuardianListByBusIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdRequest copyWith(void Function(GetGuardianListByBusIdRequest) updates) => super.copyWith((message) => updates(message as GetGuardianListByBusIdRequest)) as GetGuardianListByBusIdRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetGuardianListByBusIdRequest create() => GetGuardianListByBusIdRequest._(); + GetGuardianListByBusIdRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetGuardianListByBusIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianListByBusIdRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); +} + +class GetGuardianListByBusIdResponse extends $pb.GeneratedMessage { + factory GetGuardianListByBusIdResponse({ + $core.Iterable<$8.GuardianResponse>? guardians, + }) { + final $result = create(); + if (guardians != null) { + $result.guardians.addAll(guardians); + } + return $result; + } + GetGuardianListByBusIdResponse._() : super(); + factory GetGuardianListByBusIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianListByBusIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByBusIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdResponse clone() => GetGuardianListByBusIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdResponse copyWith(void Function(GetGuardianListByBusIdResponse) updates) => super.copyWith((message) => updates(message as GetGuardianListByBusIdResponse)) as GetGuardianListByBusIdResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetGuardianListByBusIdResponse create() => GetGuardianListByBusIdResponse._(); + GetGuardianListByBusIdResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetGuardianListByBusIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianListByBusIdResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$8.GuardianResponse> get guardians => $_getList(0); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart index f1251a9b..440a4f23 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart @@ -29,6 +29,10 @@ class GuardianServiceClient extends $grpc.Client { '/where_child_bus.v1.GuardianService/GuardianLogin', ($3.GuardianLoginRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $3.GuardianLoginResponse.fromBuffer(value)); + static final _$getGuardianListByBusId = $grpc.ClientMethod<$3.GetGuardianListByBusIdRequest, $3.GetGuardianListByBusIdResponse>( + '/where_child_bus.v1.GuardianService/GetGuardianListByBusId', + ($3.GetGuardianListByBusIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.GetGuardianListByBusIdResponse.fromBuffer(value)); GuardianServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -43,6 +47,10 @@ class GuardianServiceClient extends $grpc.Client { $grpc.ResponseFuture<$3.GuardianLoginResponse> guardianLogin($3.GuardianLoginRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$guardianLogin, request, options: options); } + + $grpc.ResponseFuture<$3.GetGuardianListByBusIdResponse> getGuardianListByBusId($3.GetGuardianListByBusIdRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getGuardianListByBusId, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.GuardianService') @@ -64,6 +72,13 @@ abstract class GuardianServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $3.GuardianLoginRequest.fromBuffer(value), ($3.GuardianLoginResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$3.GetGuardianListByBusIdRequest, $3.GetGuardianListByBusIdResponse>( + 'GetGuardianListByBusId', + getGuardianListByBusId_Pre, + false, + false, + ($core.List<$core.int> value) => $3.GetGuardianListByBusIdRequest.fromBuffer(value), + ($3.GetGuardianListByBusIdResponse value) => value.writeToBuffer())); } $async.Future<$3.CreateGuardianResponse> createGuardian_Pre($grpc.ServiceCall call, $async.Future<$3.CreateGuardianRequest> request) async { @@ -74,6 +89,11 @@ abstract class GuardianServiceBase extends $grpc.Service { return guardianLogin(call, await request); } + $async.Future<$3.GetGuardianListByBusIdResponse> getGuardianListByBusId_Pre($grpc.ServiceCall call, $async.Future<$3.GetGuardianListByBusIdRequest> request) async { + return getGuardianListByBusId(call, await request); + } + $async.Future<$3.CreateGuardianResponse> createGuardian($grpc.ServiceCall call, $3.CreateGuardianRequest request); $async.Future<$3.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $3.GuardianLoginRequest request); + $async.Future<$3.GetGuardianListByBusIdResponse> getGuardianListByBusId($grpc.ServiceCall call, $3.GetGuardianListByBusIdRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart index 5eb151a4..bdebc760 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -75,3 +75,28 @@ final $typed_data.Uint8List guardianLoginResponseDescriptor = $convert.base64Dec 'ZGlhbhI9CgdudXJzZXJ5GAMgASgLMiMud2hlcmVfY2hpbGRfYnVzLnYxLk51cnNlcnlSZXNwb2' '5zZVIHbnVyc2VyeQ=='); +@$core.Deprecated('Use getGuardianListByBusIdRequestDescriptor instead') +const GetGuardianListByBusIdRequest$json = { + '1': 'GetGuardianListByBusIdRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + ], +}; + +/// Descriptor for `GetGuardianListByBusIdRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getGuardianListByBusIdRequestDescriptor = $convert.base64Decode( + 'Ch1HZXRHdWFyZGlhbkxpc3RCeUJ1c0lkUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lk'); + +@$core.Deprecated('Use getGuardianListByBusIdResponseDescriptor instead') +const GetGuardianListByBusIdResponse$json = { + '1': 'GetGuardianListByBusIdResponse', + '2': [ + {'1': 'guardians', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.GuardianResponse', '10': 'guardians'}, + ], +}; + +/// Descriptor for `GetGuardianListByBusIdResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getGuardianListByBusIdResponseDescriptor = $convert.base64Decode( + 'Ch5HZXRHdWFyZGlhbkxpc3RCeUJ1c0lkUmVzcG9uc2USQgoJZ3VhcmRpYW5zGAEgAygLMiQud2' + 'hlcmVfY2hpbGRfYnVzLnYxLkd1YXJkaWFuUmVzcG9uc2VSCWd1YXJkaWFucw=='); + diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py index 9ada04d8..7b14c0d5 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xe0\x01\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians2\xe1\x02\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -31,6 +31,10 @@ _globals['_GUARDIANLOGINREQUEST']._serialized_end=423 _globals['_GUARDIANLOGINRESPONSE']._serialized_start=426 _globals['_GUARDIANLOGINRESPONSE']._serialized_end=604 - _globals['_GUARDIANSERVICE']._serialized_start=607 - _globals['_GUARDIANSERVICE']._serialized_end=831 + _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_start=606 + _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_end=660 + _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_start=662 + _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_end=762 + _globals['_GUARDIANSERVICE']._serialized_start=765 + _globals['_GUARDIANSERVICE']._serialized_end=1118 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi index ddf0e20c..1722fc6a 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi @@ -1,7 +1,8 @@ from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -42,3 +43,15 @@ class GuardianLoginResponse(_message.Message): guardian: _resources_pb2.GuardianResponse nursery: _resources_pb2.NurseryResponse def __init__(self, success: bool = ..., guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... + +class GetGuardianListByBusIdRequest(_message.Message): + __slots__ = ("bus_id",) + BUS_ID_FIELD_NUMBER: _ClassVar[int] + bus_id: str + def __init__(self, bus_id: _Optional[str] = ...) -> None: ... + +class GetGuardianListByBusIdResponse(_message.Message): + __slots__ = ("guardians",) + GUARDIANS_FIELD_NUMBER: _ClassVar[int] + guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] + def __init__(self, guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py index 7c1cced2..3bcb7e19 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import grpc.experimental from where_child_bus.v1 import guardian_pb2 as where__child__bus_dot_v1_dot_guardian__pb2 @@ -25,6 +24,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.FromString, ) + self.GetGuardianListByBusId = channel.unary_unary( + '/where_child_bus.v1.GuardianService/GetGuardianListByBusId', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.FromString, + ) class GuardianServiceServicer(object): @@ -42,6 +46,12 @@ def GuardianLogin(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetGuardianListByBusId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_GuardianServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -55,6 +65,11 @@ def add_GuardianServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.SerializeToString, ), + 'GetGuardianListByBusId': grpc.unary_unary_rpc_method_handler( + servicer.GetGuardianListByBusId, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.GuardianService', rpc_method_handlers) @@ -98,3 +113,20 @@ def GuardianLogin(request, where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetGuardianListByBusId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GetGuardianListByBusId', + where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.SerializeToString, + where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/guardian.proto b/proto/where_child_bus/v1/guardian.proto index ce302af7..c24a747e 100644 --- a/proto/where_child_bus/v1/guardian.proto +++ b/proto/where_child_bus/v1/guardian.proto @@ -7,6 +7,7 @@ import "where_child_bus/v1/resources.proto"; service GuardianService { rpc CreateGuardian(CreateGuardianRequest) returns (CreateGuardianResponse); rpc GuardianLogin(GuardianLoginRequest) returns (GuardianLoginResponse); + rpc GetGuardianListByBusId(GetGuardianListByBusIdRequest) returns (GetGuardianListByBusIdResponse); } message CreateGuardianRequest { @@ -30,4 +31,12 @@ message GuardianLoginResponse { bool success = 1; GuardianResponse guardian = 2; NurseryResponse nursery = 3; -} \ No newline at end of file +} + +message GetGuardianListByBusIdRequest { + string bus_id = 1; +} + +message GetGuardianListByBusIdResponse { + repeated GuardianResponse guardians = 1; +} From 25fa359358d256f353fb9f8dd766126f284d065c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 17 Feb 2024 00:00:24 +0900 Subject: [PATCH 379/771] =?UTF-8?q?fix:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=81=AE=E3=83=AA=E3=82=B9=E3=83=88=E8=A1=A8=E7=A4=BA=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 9 +++-- .../components/guardians_list.dart | 1 - .../pages/bus_list_page/bus_list_page.dart | 1 - .../service/get_guardians_list_by_bus_id.dart | 14 ++++++++ .../service/get_stations_list_by_bus_id.dart | 13 ------- .../lib/util/api/guardians.dart | 35 +++++++++++++++++++ 6 files changed, 53 insertions(+), 20 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/service/get_guardians_list_by_bus_id.dart delete mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/service/get_stations_list_by_bus_id.dart create mode 100644 frontend/where_child_bus/lib/util/api/guardians.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index d01ecd8b..7c82613e 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -7,7 +7,7 @@ import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/con import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/guardians_list.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart'; -import 'package:where_child_bus/pages/bus_list_page/service/get_stations_list_by_bus_id.dart'; +import 'package:where_child_bus/pages/bus_list_page/service/get_guardians_list_by_bus_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BottomSheetWidget extends StatefulWidget { @@ -32,10 +32,10 @@ class _BottomSheetWidgetState extends State { Future _loadGuardians() async { try { - var res = await getGuardiansByBusId(widget.bus.id); + var res = await getGuardiansListByBusIdService(widget.bus.id); if (mounted) { setState(() { - guardians = res; + guardians = res.guardians; _isLoading = false; }); } @@ -72,7 +72,6 @@ class _BottomSheetWidgetState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // titleText(), modalHeader(widget.bus.name, "test"), _isFailLoading ? loadingFailText() : guardiansListView(), ConfirmButton( @@ -92,7 +91,7 @@ class _BottomSheetWidgetState extends State { ), ) : GuardiansList( - guardiansList: [], + guardiansList: guardians, ); } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart index d7070d53..2598b81e 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart @@ -11,7 +11,6 @@ class GuardiansList extends StatelessWidget { return Expanded(child: guardiansListView(context, guardiansList)); } - //将来的にはStationのListを参照 Widget guardiansListView( BuildContext context, List guardiansList) { return ListView.builder( diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index b5b9a020..4d162bc1 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/models/bus_edit_page_type.dart'; import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; -import 'package:where_child_bus/pages/bus_list_page/service/create_bus.dart'; import 'package:where_child_bus/pages/bus_list_page/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/service/get_guardians_list_by_bus_id.dart b/frontend/where_child_bus/lib/pages/bus_list_page/service/get_guardians_list_by_bus_id.dart new file mode 100644 index 00000000..135acb3c --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/service/get_guardians_list_by_bus_id.dart @@ -0,0 +1,14 @@ +import "dart:developer" as developer; +import 'package:where_child_bus/util/api/guardians.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart'; + +Future getGuardiansListByBusIdService( + String busId) async { + try { + var res = await getGuardiansListByBusId(busId); + return res; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/service/get_stations_list_by_bus_id.dart b/frontend/where_child_bus/lib/pages/bus_list_page/service/get_stations_list_by_bus_id.dart deleted file mode 100644 index e0f49673..00000000 --- a/frontend/where_child_bus/lib/pages/bus_list_page/service/get_stations_list_by_bus_id.dart +++ /dev/null @@ -1,13 +0,0 @@ -import "dart:developer" as developer; -import 'package:where_child_bus/util/api/station.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; - -Future> getGuardiansByBusId(String busId) async { - try { - var res = await getStationListByBusId(busId); - return res.guardians; - } catch (error) { - developer.log("Caught Error:", error: error); - return Future.error(error); - } -} diff --git a/frontend/where_child_bus/lib/util/api/guardians.dart b/frontend/where_child_bus/lib/util/api/guardians.dart new file mode 100644 index 00000000..fe9f832a --- /dev/null +++ b/frontend/where_child_bus/lib/util/api/guardians.dart @@ -0,0 +1,35 @@ +import "dart:developer" as developer; +import "package:flutter/foundation.dart"; +import "package:grpc/grpc.dart"; +import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart"; + +Future performGrpcCall( + Future Function(GuardianServiceClient) grpcCall) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + final grpcClient = GuardianServiceClient(channel); + + try { + final result = await grpcCall(grpcClient); + if (kDebugMode) { + developer.log("レスポンス: $result"); + } + return result; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } finally { + await channel.shutdown(); + } +} + +Future getGuardiansListByBusId( + String busId) async { + return performGrpcCall((client) async { + var req = GetGuardianListByBusIdRequest(busId: busId); + return client.getGuardianListByBusId(req); + }); +} From be4849b3238dd113815256c58716630b3f78924a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 17 Feb 2024 00:05:01 +0900 Subject: [PATCH 380/771] =?UTF-8?q?chore:=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E9=85=8D=E7=BD=AE=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart | 2 +- .../where_child_bus/lib/pages/bus_list_page/bus_list_page.dart | 2 +- .../lib/{pages/bus_list_page => }/service/create_bus.dart | 0 .../bus_list_page => }/service/get_bus_list_by_nursery_id.dart | 0 .../service/get_guardians_list_by_bus_id.dart | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename frontend/where_child_bus/lib/{pages/bus_list_page => }/service/create_bus.dart (100%) rename frontend/where_child_bus/lib/{pages/bus_list_page => }/service/get_bus_list_by_nursery_id.dart (100%) rename frontend/where_child_bus/lib/{pages/bus_list_page => }/service/get_guardians_list_by_bus_id.dart (100%) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index 7c82613e..c803204e 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -7,7 +7,7 @@ import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/con import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/guardians_list.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart'; -import 'package:where_child_bus/pages/bus_list_page/service/get_guardians_list_by_bus_id.dart'; +import 'package:where_child_bus/service/get_guardians_list_by_bus_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BottomSheetWidget extends StatefulWidget { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 4d162bc1..9ef7c388 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/models/bus_edit_page_type.dart'; import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; -import 'package:where_child_bus/pages/bus_list_page/service/get_bus_list_by_nursery_id.dart'; +import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BusListPage extends StatefulWidget { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/service/create_bus.dart b/frontend/where_child_bus/lib/service/create_bus.dart similarity index 100% rename from frontend/where_child_bus/lib/pages/bus_list_page/service/create_bus.dart rename to frontend/where_child_bus/lib/service/create_bus.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/service/get_bus_list_by_nursery_id.dart b/frontend/where_child_bus/lib/service/get_bus_list_by_nursery_id.dart similarity index 100% rename from frontend/where_child_bus/lib/pages/bus_list_page/service/get_bus_list_by_nursery_id.dart rename to frontend/where_child_bus/lib/service/get_bus_list_by_nursery_id.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/service/get_guardians_list_by_bus_id.dart b/frontend/where_child_bus/lib/service/get_guardians_list_by_bus_id.dart similarity index 100% rename from frontend/where_child_bus/lib/pages/bus_list_page/service/get_guardians_list_by_bus_id.dart rename to frontend/where_child_bus/lib/service/get_guardians_list_by_bus_id.dart From ac8a0ba91e3a3b974a1403f1c9061ec55eab6964 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 00:51:46 +0900 Subject: [PATCH 381/771] =?UTF-8?q?refactor:=20cloudFnction=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=BB=83=E6=AD=A2=E3=81=AB=E4=BC=B4=E3=81=86=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=81=AE=E5=A4=89=E6=9B=B4c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/child/child.go | 7 ++-- backend/usecases/utils/cloud_function.go | 46 ------------------------ 2 files changed, 2 insertions(+), 51 deletions(-) delete mode 100644 backend/usecases/utils/cloud_function.go diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index 227bd7b7..844256d7 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -9,7 +9,6 @@ import ( "context" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" @@ -128,8 +127,6 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest // 最後にCloudFunctionに通知を送信 // TODO: 将来的に子供作成の通知にする - cfg, err := config.New() - utils.MakeCloudFunctionRequest(cfg.EndPointPingRequest, "POST") return &pb.CreateChildResponse{ Child: utils.ToPbChild(child), @@ -144,8 +141,8 @@ func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetCh children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { return tx.Child.Query(). - Where(childRepo.HasGuardianWith(guardianRepo.IDEQ(guardianID))). - WithGuardian(), nil + Where(childRepo.HasGuardianWith(guardianRepo.IDEQ(guardianID))). + WithGuardian(), nil }) if err != nil { diff --git a/backend/usecases/utils/cloud_function.go b/backend/usecases/utils/cloud_function.go deleted file mode 100644 index 1dff9521..00000000 --- a/backend/usecases/utils/cloud_function.go +++ /dev/null @@ -1,46 +0,0 @@ -package utils - -import ( - "context" - "fmt" - "io" - "net/http" - - "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" - "google.golang.org/api/idtoken" - "google.golang.org/api/option" -) - -// MakeCloudFunctionRequest makes a request to the provided targetURL -// with an authenticated client using audience. It returns the response body. -func MakeCloudFunctionRequest(targetURL, method string) (string, error) { - cfg, err := config.New() - - ctx := context.Background() - client, err := idtoken.NewClient(ctx, targetURL, option.WithCredentialsFile(cfg.GoogleApplicationCredentials)) - if err != nil { - return "", fmt.Errorf("idtoken.NewClient: %w", err) - } - - var resp *http.Response - switch method { - case "GET": - resp, err = client.Get(targetURL) - case "POST": - resp, err = client.Post(targetURL, "application/json", nil) // Note: In a real scenario, you might want to pass a non-nil body for POST requests. - default: - return "", fmt.Errorf("unsupported method: %s", method) - } - - if err != nil { - return "", fmt.Errorf("%s request failed: %w", method, err) - } - defer resp.Body.Close() - - body, err := io.ReadAll(resp.Body) - if err != nil { - return "", fmt.Errorf("reading response body failed: %w", err) - } - - return string(body), nil -} From 5f63511ce82c8501542d3813ea36cb6a369c7595 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 17 Feb 2024 01:05:22 +0900 Subject: [PATCH 382/771] =?UTF-8?q?refactor(ml):=20=E9=A1=94=E6=A4=9C?= =?UTF-8?q?=E5=87=BA=E3=81=A8=E3=82=AF=E3=83=AA=E3=83=83=E3=83=94=E3=83=B3?= =?UTF-8?q?=E3=82=B0=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=AE=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF?= =?UTF-8?q?=E3=83=AA=E3=83=B3=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/pyproject.toml | 5 +++- machine_learning/requirements-dev.lock | 2 ++ machine_learning/requirements.lock | 2 ++ .../DetectFaceAndClip/__init.py | 0 .../DetectFaceAndClip/detectFaceAndClip.py | 26 ++++++++++--------- .../src/face_detect_model/__init__.py | 0 6 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 machine_learning/src/face_detect_model/DetectFaceAndClip/__init.py create mode 100644 machine_learning/src/face_detect_model/__init__.py diff --git a/machine_learning/pyproject.toml b/machine_learning/pyproject.toml index d93bf8ea..566e52f8 100644 --- a/machine_learning/pyproject.toml +++ b/machine_learning/pyproject.toml @@ -12,6 +12,8 @@ dependencies = [ "tqdm>=4.66.2", "google-cloud-storage>=2.14.0", "python-dotenv>=1.0.1", + "grpcio>=1.60.1", + "grpcio_reflection>=1.60.1", ] readme = "README.md" requires-python = ">= 3.8" @@ -31,4 +33,5 @@ dev-dependencies = [] allow-direct-references = true [tool.hatch.build.targets.wheel] -packages = ["src/wherechildbus"] +packages = ["src/face_detect_model", "src/proto_gen"] + diff --git a/machine_learning/requirements-dev.lock b/machine_learning/requirements-dev.lock index 80e190ae..7d273106 100644 --- a/machine_learning/requirements-dev.lock +++ b/machine_learning/requirements-dev.lock @@ -19,6 +19,8 @@ google-cloud-storage==2.14.0 google-crc32c==1.5.0 google-resumable-media==2.7.0 googleapis-common-protos==1.62.0 +grpcio==1.60.1 +grpcio-reflection==1.60.1 idna==3.6 jinja2==3.1.3 markupsafe==2.1.5 diff --git a/machine_learning/requirements.lock b/machine_learning/requirements.lock index 80e190ae..7d273106 100644 --- a/machine_learning/requirements.lock +++ b/machine_learning/requirements.lock @@ -19,6 +19,8 @@ google-cloud-storage==2.14.0 google-crc32c==1.5.0 google-resumable-media==2.7.0 googleapis-common-protos==1.62.0 +grpcio==1.60.1 +grpcio-reflection==1.60.1 idna==3.6 jinja2==3.1.3 markupsafe==2.1.5 diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/__init.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/__init.py new file mode 100644 index 00000000..e69de29b diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index 15518b38..701002d4 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -1,19 +1,18 @@ -import cv2 -import os -import yaml -import numpy as np import argparse import logging -from dotenv import load_dotenv -from google.oauth2 import service_account +import os + +import cv2 import google.cloud.storage as gcs +import numpy as np +import yaml +from dotenv import load_dotenv from google.cloud.storage import Blob, Bucket - -from detectFaceUtil import ( - load_cascade, - detect_face, +from face_detect_model.DetectFaceAndClip.detectFaceUtil import ( clip_and_resize_face, + detect_face, + load_cascade, ) load_dotenv("secrets/.env") @@ -46,7 +45,7 @@ def load_image_from_local(image_dir_path: str): return images -def load_image_from_remote(nursery_id: str, child_id: str, blobs: list): +def load_image_from_remote(blobs: list): images = [] for blob in blobs: logger.info(f"loading: {blob.name}") @@ -96,7 +95,7 @@ def get_bucket(client: gcs.Client): if bucket.exists(): return bucket else: - logger.error("Failed to " + BUCKET_NAME + " does not exist.") + logger.error(f"Failed to {BUCKET_NAME} does not exist.") exit(1) @@ -166,6 +165,9 @@ def detect_face_and_clip(args: argparse.Namespace, config: dict): SOURCE_BLOB_NAME = f"{args.nursery_id}/{args.child_id}/raw/" blobs = get_blobs(bucket, SOURCE_BLOB_NAME) images = load_image(args, blobs=blobs) + else: + logger.error(f"Invalid env: {args.env}") + exit(1) logger.info("Detecting faces...") detect_face_num = 0 diff --git a/machine_learning/src/face_detect_model/__init__.py b/machine_learning/src/face_detect_model/__init__.py new file mode 100644 index 00000000..e69de29b From 3c02983b18f213f25c7fe968470e1621aaa3bd26 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 17 Feb 2024 01:32:01 +0900 Subject: [PATCH 383/771] =?UTF-8?q?feat(ml):=20feat(ml):=20HealthCheck?= =?UTF-8?q?=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9=E3=81=AE=E5=AE=9A=E7=BE=A9?= =?UTF-8?q?=E3=81=A8MachineLearning=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9?= =?UTF-8?q?=E3=81=AEFaceDetectAndClip=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89?= =?UTF-8?q?=E3=81=AE=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squashed commit of the following: commit 73f6747d7148ac7df14eb6ffd734ba40622187c7 Author: Mizuki Date: Sat Feb 17 01:23:54 2024 +0900 feat(ml): HealthCheckサービスの定義とMachineLearningサービスのFaceDetectAndClipメソッドの定義 commit dd246191de99b8967b6e67685b6328cd4b8c5e7a Author: Mizuki Date: Sat Feb 17 01:15:58 2024 +0900 chore(ml): buf generateによって生成されたコードに対する変更 --- .../v1/machine_learning_pb2_grpc.py | 182 +++++++++++------- .../proto-gen/machine_learning/v1/server.py | 47 ++++- 2 files changed, 150 insertions(+), 79 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py index b9af7a7e..3104cc6a 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py @@ -1,8 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - -from machine_learning.v1 import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 +import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 class MachineLearningServiceStub(object): @@ -15,20 +14,20 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Train = channel.unary_unary( - '/machine_learning.v1.MachineLearningService/Train', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/Train", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, + ) self.Pred = channel.stream_stream( - '/machine_learning.v1.MachineLearningService/Pred', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/Pred", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, + ) self.FaceDetectAndClip = channel.unary_unary( - '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, + ) class MachineLearningServiceServicer(object): @@ -37,96 +36,133 @@ class MachineLearningServiceServicer(object): def Train(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def Pred(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def FaceDetectAndClip(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_MachineLearningServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'Train': grpc.unary_unary_rpc_method_handler( - servicer.Train, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, - ), - 'Pred': grpc.stream_stream_rpc_method_handler( - servicer.Pred, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, - ), - 'FaceDetectAndClip': grpc.unary_unary_rpc_method_handler( - servicer.FaceDetectAndClip, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, - ), + "Train": grpc.unary_unary_rpc_method_handler( + servicer.Train, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, + ), + "Pred": grpc.stream_stream_rpc_method_handler( + servicer.Pred, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, + ), + "FaceDetectAndClip": grpc.unary_unary_rpc_method_handler( + servicer.FaceDetectAndClip, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'machine_learning.v1.MachineLearningService', rpc_method_handlers) + "machine_learning.v1.MachineLearningService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class MachineLearningService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Train(request, + def Train( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/Train', + "/machine_learning.v1.MachineLearningService/Train", machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def Pred(request_iterator, + def Pred( + request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.stream_stream( + request_iterator, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.stream_stream(request_iterator, target, '/machine_learning.v1.MachineLearningService/Pred', + "/machine_learning.v1.MachineLearningService/Pred", machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def FaceDetectAndClip(request, + def FaceDetectAndClip( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', + "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 82fdd1e0..5de248e2 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -1,35 +1,65 @@ +import argparse +import logging +import threading from concurrent import futures + import grpc +import health_check_pb2 +import health_check_pb2_grpc import machine_learning_pb2 import machine_learning_pb2_grpc from grpc_reflection.v1alpha import reflection +from face_detect_model.DetectFaceAndClip.detectFaceAndClip import main + -class HealthCheck(machine_learning_pb2_grpc.MachineLearningServiceServicer): +class HealthCheckServiceServer( + machine_learning_pb2_grpc.MachineLearningServiceServicer +): def Ping(self, request, context): - print("RECV: %s" % request.message) - message = "Hello, %s!" % request.message + print("RECV: %s" % request.name) + message = "Hello, %s!" % request.name print("SEND: %s" % message) - return machine_learning_pb2.PingResponse(message=message) + return health_check_pb2.PingResponse(message=message) class MachineLearningServiceServicer( machine_learning_pb2_grpc.MachineLearningServiceServicer ): + # TODO: implement Predict def Predict(self, request, context): pass + # TODO: implement Train def Train(self, request, context): pass def FaceDetectAndClip(self, request, context): - pass + parser = argparse.ArgumentParser() + args = parser.parse_args() + + args.nursery_id = request.nursery_id + args.child_id = request.child_id + args.env = "remote" + # mainメソッドを別スレッドで実行 + try: + thread = threading.Thread(target=main, args=(args,)) + thread.start() + is_started = True + except Exception as e: + logging.error(e) + is_started = False + + return machine_learning_pb2.FaceDetectAndClipResponse(is_started=is_started) def serve(): server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) + health_check_pb2_grpc.add_HealthcheckServiceServicer_to_server( + HealthCheckServiceServer(), server + ) machine_learning_pb2_grpc.add_MachineLearningServiceServicer_to_server( - HealthCheck(), server + MachineLearningServiceServicer(), server ) # Reflection APIの設定 @@ -37,14 +67,19 @@ def serve(): machine_learning_pb2.DESCRIPTOR.services_by_name[ "MachineLearningService" ].full_name, + health_check_pb2.DESCRIPTOR.services_by_name["HealthcheckService"].full_name, reflection.SERVICE_NAME, ) reflection.enable_server_reflection(SERVICE_NAMES, server) server.add_insecure_port("[::]:8080") server.start() + logging.info("Server started at [::]:8080") server.wait_for_termination() if __name__ == "__main__": + # NOTE: https://github.com/grpc/grpc/issues/17321 + # gRPCのPython環境でloggingを使う場合、server起動前にlogging.basicConfig()を実行する必要がある + logging.basicConfig() serve() From f5783c5a30bb3c098fbb4ee70e1e1a2d4a040783 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 01:40:56 +0900 Subject: [PATCH 384/771] =?UTF-8?q?refactor:=20logger=E3=82=92slog?= =?UTF-8?q?=E3=81=AB=E7=BD=AE=E3=81=8D=E6=8F=9B=E3=81=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 154 ++++++++++++++------------ backend/usecases/child/child.go | 57 ++++++---- backend/usecases/guardian/guardian.go | 47 +++++--- backend/usecases/nursery/nursery.go | 32 ++++-- backend/usecases/station/station.go | 41 ++++--- 5 files changed, 194 insertions(+), 137 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 413304f4..b47843b9 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -1,14 +1,11 @@ package bus import ( - "fmt" - "github.com/google/uuid" "golang.org/x/exp/slog" "context" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" @@ -33,19 +30,18 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (*pb.CreateBusResponse, error) { nurseryID, err := uuid.Parse(req.NurseryId) if err != nil { - return nil, fmt.Errorf("failed to parse nursery ID: %w", err) + i.logger.Error("failed to parse nursery ID", "error", err) + return nil, err } tx, err := i.entClient.Tx(ctx) if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) + i.logger.Error("failed to start transaction", "error", err) + return nil, err } - var commit bool defer func() { - if !commit { - tx.Rollback() - } + tx.Rollback() }() bus, err := tx.Bus.Create(). @@ -55,7 +51,8 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* Save(ctx) if err != nil { - return nil, fmt.Errorf("failed to create bus: %w", err) + i.logger.Error("failed to create bus", "error", err) + return nil, err } // Nurseryエッジを持つBusを取得 @@ -65,17 +62,18 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* Only(ctx) if err != nil { - return nil, fmt.Errorf("failed to get bus: %w", err) + i.logger.Error("failed to get bus", "error", err) + return nil, err } - err = setNextStation(ctx, tx, req.MorningGuardianIds, func(updateOp *ent.StationUpdateOne, nextStation *ent.Station) *ent.StationUpdateOne { + err = setNextStation(*i.logger, ctx, tx, req.MorningGuardianIds, func(updateOp *ent.StationUpdateOne, nextStation *ent.Station) *ent.StationUpdateOne { return updateOp.AddMorningNextStation(nextStation) }) if err != nil { return nil, err // 朝のステーション設定中にエラーが発生しました } - err = setNextStation(ctx, tx, req.EveningGuardianIds, func(updateOp *ent.StationUpdateOne, nextStation *ent.Station) *ent.StationUpdateOne { + err = setNextStation(*i.logger, ctx, tx, req.EveningGuardianIds, func(updateOp *ent.StationUpdateOne, nextStation *ent.Station) *ent.StationUpdateOne { return updateOp.AddEveningNextStation(nextStation) }) if err != nil { @@ -83,12 +81,12 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* } // 以下のコードはリファクタリング後のメインの処理フローです。 - morningGuardianIDs, err := parseGuardianIDs(req.MorningGuardianIds) + morningGuardianIDs, err := parseGuardianIDs(*i.logger, req.MorningGuardianIds) if err != nil { return nil, err // エラーハンドリングは簡潔に } - eveningGuardianIDs, err := parseGuardianIDs(req.EveningGuardianIds) + eveningGuardianIDs, err := parseGuardianIDs(*i.logger, req.EveningGuardianIds) if err != nil { return nil, err // エラーハンドリングは簡潔に } @@ -99,19 +97,20 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* Where(stationRepo.HasGuardianWith(guardianRepo.IDIn(eveningGuardianIDs...))). All(ctx) if err != nil { - return nil, fmt.Errorf("failed to get stations: %w", err) + i.logger.Error("failed to get stations", "error", err) + return nil, err } // 子供たちの処理を関数を用いて簡潔に morningChildren := tx.Child.Query(). Where(childRepo.HasGuardianWith(guardianRepo.IDIn(morningGuardianIDs...))).AllX(ctx) - if err := createChildBusAssociations(ctx, tx, morningChildren, bus, childbusassociationRepo.BusTypeMorning); err != nil { + if err := createChildBusAssociations(*i.logger, ctx, tx, morningChildren, bus, childbusassociationRepo.BusTypeMorning); err != nil { return nil, err } eveningChildren := tx.Child.Query(). Where(childRepo.HasGuardianWith(guardianRepo.IDIn(eveningGuardianIDs...))).AllX(ctx) - if err := createChildBusAssociations(ctx, tx, eveningChildren, bus, childbusassociationRepo.BusTypeEvening); err != nil { + if err := createChildBusAssociations(*i.logger, ctx, tx, eveningChildren, bus, childbusassociationRepo.BusTypeEvening); err != nil { return nil, err } @@ -121,18 +120,16 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* AddStations(station). Save(ctx) if err != nil { - return nil, fmt.Errorf("failed to update bus with stations: %w", err) + i.logger.Error("failed to update bus with stations", "error", err) + return nil, err } } //TODO: CloudFunctionにバスの作成を通知 - cfg, _ := config.New() - utils.MakeCloudFunctionRequest(cfg.EndPointCreateBusNotification, "POST") - // Make sure to commit the transaction since everything succeeded - commit = true if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + i.logger.Error("failed to commit transaction", "error", err) + return nil, err } return &pb.CreateBusResponse{ @@ -140,38 +137,11 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* }, nil } -// parseGuardianIDs は、指定されたガーディアンIDの文字列のスライスをUUIDのスライスに変換します。 -func parseGuardianIDs(ids []string) ([]uuid.UUID, error) { - parsedIDs := make([]uuid.UUID, len(ids)) - for i, id := range ids { - parsedID, err := uuid.Parse(id) - if err != nil { - return nil, fmt.Errorf("failed to parse guardian ID '%s': %w", id, err) - } - parsedIDs[i] = parsedID - } - return parsedIDs, nil -} - -// createChildBusAssociations は、指定された子供たちに対してBusChildAssociationを作成します。 -func createChildBusAssociations(ctx context.Context, tx *ent.Tx, children []*ent.Child, bus *ent.Bus, busType childbusassociationRepo.BusType) error { - for _, child := range children { - _, err := tx.ChildBusAssociation.Create(). - SetChild(child). - SetBus(bus). - SetBusType(busType). - Save(ctx) // ctxを関数の引数から渡す - if err != nil { - return fmt.Errorf("failed to create bus child association: %w", err) - } - } - return nil -} - func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusListByNurseryIdRequest) (*pb.GetBusListByNurseryIdResponse, error) { nurseryID, err := uuid.Parse(req.NurseryId) if err != nil { - return nil, fmt.Errorf("failed to parse nursery ID '%s': %w", req.NurseryId, err) + i.logger.Error("failed to parse nursery ID", "error", err) + return nil, err } buses, err := i.getBusList(ctx, func(tx *ent.Tx) (*ent.BusQuery, error) { @@ -181,6 +151,7 @@ func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusLi }) if err != nil { + i.logger.Error("failed to get bus list", "error", err) return nil, err } @@ -190,17 +161,20 @@ func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusLi func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatusRequest) (*pb.ChangeBusStatusResponse, error) { busID, err := uuid.Parse(req.BusId) if err != nil { - return nil, fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) + i.logger.Error("failed to parse bus ID", "error", err) + return nil, err } tx, err := i.entClient.Tx(ctx) if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) + i.logger.Error("failed to start transaction", "error", err) + return nil, err } status, err := utils.ConvertPbStatusToEntStatus(req.Status) if err != nil { - return nil, fmt.Errorf("failed to convert status: %w", err) + i.logger.Error("failed to convert status", "error", err) + return nil, err } bus, err := tx.Bus.UpdateOneID(busID). @@ -208,7 +182,8 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu Save(ctx) if err != nil { - return nil, fmt.Errorf("failed to update bus: %w", err) + i.logger.Error("failed to update bus", "error", err) + return nil, err } // Nurseryエッジを持つBusを取得 @@ -218,11 +193,13 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu Only(ctx) if err != nil { - return nil, fmt.Errorf("failed to get bus: %w", err) + i.logger.Error("failed to get bus", "error", err) + return nil, err } if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + i.logger.Error("failed to commit transaction", "error", err) + return nil, err } return &pb.ChangeBusStatusResponse{Bus: utils.ToPbBus(bus)}, nil } @@ -230,18 +207,21 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.BusQuery, error)) ([]*pb.Bus, error) { tx, err := i.entClient.Tx(ctx) if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) + i.logger.Error("failed to start transaction", "error", err) + return nil, err } defer tx.Rollback() query, err := queryFunc(tx) if err != nil { - return nil, fmt.Errorf("failed to create query: %w", err) + i.logger.Error("failed to create query", "error", err) + return nil, err } entBuses, err := query.All(ctx) if err != nil { - return nil, fmt.Errorf("failed to execute query: %w", err) + i.logger.Error("failed to execute query", "error", err) + return nil, err } pbBuses := make([]*pb.Bus, len(entBuses)) @@ -250,43 +230,79 @@ func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*e } if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + i.logger.Error("failed to commit transaction", "error", err) + return nil, err } return pbBuses, nil } -func setNextStation(ctx context.Context, tx *ent.Tx, guardianIDs []string, setNextStationFunc func(*ent.StationUpdateOne, *ent.Station) *ent.StationUpdateOne) error { +// parseGuardianIDs は、指定されたガーディアンIDの文字列のスライスをUUIDのスライスに変換します。 +func parseGuardianIDs(logger slog.Logger, ids []string) ([]uuid.UUID, error) { + parsedIDs := make([]uuid.UUID, len(ids)) + for i, id := range ids { + parsedID, err := uuid.Parse(id) + if err != nil { + logger.Error("failed to parse guardian ID", "error", err) + return nil, err + } + parsedIDs[i] = parsedID + } + return parsedIDs, nil +} + +// createChildBusAssociations は、指定された子供たちに対してBusChildAssociationを作成します。 +func createChildBusAssociations(logger slog.Logger, ctx context.Context, tx *ent.Tx, children []*ent.Child, bus *ent.Bus, busType childbusassociationRepo.BusType) error { + for _, child := range children { + _, err := tx.ChildBusAssociation.Create(). + SetChild(child). + SetBus(bus). + SetBusType(busType). + Save(ctx) // ctxを関数の引数から渡す + if err != nil { + logger.Error("failed to create bus child association", "error", err) + return err + } + } + return nil +} + +func setNextStation(logger slog.Logger, ctx context.Context, tx *ent.Tx, guardianIDs []string, setNextStationFunc func(*ent.StationUpdateOne, *ent.Station) *ent.StationUpdateOne) error { for index, guardianID := range guardianIDs { guardianIDParsed, err := uuid.Parse(guardianID) if err != nil { - return fmt.Errorf("failed to parse guardian ID '%s': %w", guardianID, err) + logger.Error("failed to parse guardian ID", "error", err) + return err } currentStation, err := tx.Station.Query(). Where(stationRepo.HasGuardianWith(guardianRepo.IDEQ(guardianIDParsed))). Only(ctx) if err != nil { - return fmt.Errorf("failed to find station for guardian ID '%s': %w", guardianID, err) + logger.Error("failed to find station for guardian ID", "error", err) + return err } if index < len(guardianIDs)-1 { nextGuardianID := guardianIDs[index+1] nextGuardianIDParsed, err := uuid.Parse(nextGuardianID) if err != nil { - return fmt.Errorf("failed to parse next guardian ID '%s': %w", nextGuardianID, err) + logger.Error("failed to parse next guardian ID", "error", err) + return err } nextStation, err := tx.Station.Query(). Where(stationRepo.HasGuardianWith(guardianRepo.IDEQ(nextGuardianIDParsed))). Only(ctx) if err != nil { - return fmt.Errorf("failed to find next station for guardian ID '%s': %w", nextGuardianID, err) + logger.Error("failed to find next station for guardian ID", "error", err) + return err } err = setNextStationFunc(tx.Station.UpdateOne(currentStation), nextStation).Exec(ctx) if err != nil { - return fmt.Errorf("failed to set next station for station ID '%s': %w", currentStation.ID, err) + logger.Error("failed to set next station for station ID", "error", err) + return err } } } diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index 844256d7..1ec735b6 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -33,12 +33,14 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger, storageClient *st func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest) (*pb.CreateChildResponse, error) { nurseryID, err := uuid.Parse(req.NurseryId) if err != nil { - return nil, fmt.Errorf("failed to parse nursery ID '%s': %w", req.NurseryId, err) + i.logger.Error("failed to parse nursery ID", "error", err) + return nil, err } guardianID, err := uuid.Parse(req.GuardianId) if err != nil { - return nil, fmt.Errorf("failed to parse guardian ID '%s': %w", req.GuardianId, err) + i.logger.Error("failed to parse guardian ID", "error", err) + return nil, err } // トランザクションの開始 @@ -47,18 +49,15 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest i.logger.Error("failed to start transaction", "error", err) return nil, err } - // 成功した場合にロールバックを防ぐためのフラグ - var commit bool defer func() { - if !commit { - tx.Rollback() - } + tx.Rollback() }() sex, err := utils.ConvertPbSexToEntSex(req.Sex) if err != nil { - return nil, fmt.Errorf("failed to convert sex: %w", err) + i.logger.Error("failed to convert sex", "error", err) + return nil, err } age := int(req.Age) @@ -72,7 +71,8 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest Save(ctx) if err != nil { - return nil, fmt.Errorf("failed to create child: %w", err) + i.logger.Error("failed to create child", "error", err) + return nil, err } child, err = tx.Child.Query(). @@ -104,7 +104,8 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest // 写真をGCSにアップロード if err := i.uploadPhotoToGCS(ctx, nurseryID.String(), child.ID.String(), photoID.String(), photoData); err != nil { - return nil, fmt.Errorf("failed to upload photo to GCS: %w", err) + i.logger.Error("failed to upload photo to GCS", "error", err) + return nil, err } // childPhotoレコードをデータベースに作成 @@ -115,15 +116,16 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest Save(ctx) if err != nil { - return nil, fmt.Errorf("failed to create child photo record: %w", err) + i.logger.Error("failed to create child photo record", "error", err) + return nil, err } } // トランザクションのコミット if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + i.logger.Error("failed to commit transaction", "error", err) + return nil, err } - commit = true // トランザクションが成功した // 最後にCloudFunctionに通知を送信 // TODO: 将来的に子供作成の通知にする @@ -136,7 +138,8 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetChildListByGuardianIDRequest) (*pb.GetChildListByGuardianIDResponse, error) { guardianID, err := uuid.Parse(req.GuardianId) if err != nil { - return nil, fmt.Errorf("failed to parse guardian ID '%s': %w", req.GuardianId, err) + i.logger.Error("failed to parse guardian ID", "error", err) + return nil, err } children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { @@ -146,6 +149,7 @@ func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetCh }) if err != nil { + i.logger.Error("failed to get children by guardian ID", "error", err) return nil, err } @@ -155,7 +159,8 @@ func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetCh func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChildListByNurseryIDRequest) (*pb.GetChildListByNurseryIDResponse, error) { nurseryID, err := uuid.Parse(req.NurseryId) if err != nil { - return nil, fmt.Errorf("failed to parse nursery ID '%s': %w", req.NurseryId, err) + i.logger.Error("failed to parse nursery ID", "error", err) + return nil, err } // 子供と保育園の間に親を介在させるためのクエリを修正 @@ -167,6 +172,7 @@ func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChi }) if err != nil { + i.logger.Error("failed to get children by nursery ID", "error", err) return nil, err } @@ -176,7 +182,8 @@ func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChi func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildListByBusIDRequest) (*pb.GetChildListByBusIDResponse, error) { busID, err := uuid.Parse(req.BusId) if err != nil { - return nil, fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) + i.logger.Error("failed to parse bus ID", "error", err) + return nil, err } // バスIDに紐づく子供のIDを中間テーブルを通じて取得 @@ -185,7 +192,8 @@ func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildLi WithGuardian(). All(ctx) if err != nil { - return nil, fmt.Errorf("failed to get children by bus ID: %w", err) + i.logger.Error("failed to get children by bus ID", "error", err) + return nil, err } // 子供の情報をプロトコルバッファ形式に変換 @@ -201,18 +209,21 @@ func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildLi func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.ChildQuery, error)) ([]*pb.Child, error) { tx, err := i.entClient.Tx(ctx) if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) + i.logger.Error("failed to start transaction", "error", err) + return nil, err } defer tx.Rollback() // Rollback is safe to call even if the tx is already committed. query, err := queryFunc(tx) if err != nil { + i.logger.Error("failed to create query", "error", err) return nil, err } entChildren, err := query.All(ctx) if err != nil { - return nil, fmt.Errorf("query failed: %w", err) + i.logger.Error("failed to get children", "error", err) + return nil, err } pbChildren := make([]*pb.Child, len(entChildren)) @@ -221,7 +232,8 @@ func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) ( } if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + i.logger.Error("failed to commit transaction", "error", err) + return nil, err } return pbChildren, nil @@ -237,11 +249,13 @@ func (i *Interactor) uploadPhotoToGCS(ctx context.Context, nurseryID, childID, p // 写真のバイトデータを書き込む if _, err := wc.Write(photo); err != nil { + i.logger.Error("failed to write photo to GCS", "error", err) return err } // ライターを閉じて、アップロードを完了させる if err := wc.Close(); err != nil { + i.logger.Error("failed to close writer", "error", err) return err } @@ -256,7 +270,8 @@ func (i *Interactor) deletePhotoFromGCS(ctx context.Context, nurseryID, childID, // 指定したバケット内のオブジェクトを削除 o := i.StorageClient.Bucket(i.BucketName).Object(objectName) if err := o.Delete(ctx); err != nil { - return fmt.Errorf("failed to delete photo '%s' from GCS: %w", objectName, err) + i.logger.Error("failed to delete photo from GCS", "error", err) + return err } return nil diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 9fa86aad..029dc978 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -1,8 +1,6 @@ package guardian import ( - "fmt" - "golang.org/x/exp/slog" "context" @@ -30,13 +28,15 @@ func (i *Interactor) CreateGuardian(ctx context.Context, req *pb.CreateGuardianR hashedPassword, err := utils.HashPassword(req.Password) if err != nil { // エラーハンドリング - return nil, fmt.Errorf("failed to hash password: %w", err) + i.logger.Error("failed to hash password", "error", err) + return nil, err } // トランザクションを開始 tx, err := i.entClient.Tx(ctx) if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) + i.logger.Error("failed to start transaction", "error", err) + return nil, err } defer tx.Rollback() @@ -45,7 +45,8 @@ func (i *Interactor) CreateGuardian(ctx context.Context, req *pb.CreateGuardianR Where(nurseryRepo.NurseryCode(req.NurseryCode)). Only(ctx) if err != nil { - return nil, fmt.Errorf("failed to get nursery: %w", err) + i.logger.Error("failed to get nursery", "error", err) + return nil, err } // Guardianを作成 @@ -58,7 +59,8 @@ func (i *Interactor) CreateGuardian(ctx context.Context, req *pb.CreateGuardianR Save(ctx) if err != nil { - return nil, fmt.Errorf("failed to create guardian: %w", err) + i.logger.Error("failed to create guardian", "error", err) + return nil, err } guardian, err = tx.Guardian.Query(). @@ -67,7 +69,8 @@ func (i *Interactor) CreateGuardian(ctx context.Context, req *pb.CreateGuardianR Only(ctx) if err != nil { - return nil, fmt.Errorf("failed to get guardian: %w", err) + i.logger.Error("failed to get guardian", "error", err) + return nil, err } // Stationを作成 @@ -76,12 +79,14 @@ func (i *Interactor) CreateGuardian(ctx context.Context, req *pb.CreateGuardianR Save(ctx) if err != nil { - return nil, fmt.Errorf("failed to create guardian: %w", err) + i.logger.Error("failed to create station", "error", err) + return nil, err } // トランザクションをコミット if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + i.logger.Error("failed to commit transaction", "error", err) + return nil, err } // レスポンスを返す @@ -94,7 +99,8 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq // トランザクションを開始 tx, err := i.entClient.Tx(ctx) if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) + i.logger.Error("failed to start transaction", "error", err) + return nil, err } defer tx.Rollback() @@ -105,17 +111,20 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq Only(ctx) if err != nil { - return nil, fmt.Errorf("failed to get guardian") + i.logger.Error("failed to get guardian", "error", err) + return nil, err } // フロントエンドから送られてきたパスワードとデータベースのハッシュ値を比較 if !utils.CheckPassword(guardian.HashedPassword, req.Password) { - return nil, fmt.Errorf("failed to get guardian") + i.logger.Error("password is incorrect") + return nil, err } // トランザクションをコミット if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %v", err) + i.logger.Error("failed to commit transaction", "error", err) + return nil, err } // レスポンスを返す @@ -129,12 +138,14 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq func (i *Interactor) GetGuardianListByBusID(ctx context.Context, req *pb.GetGuardianListByBusIdRequest) (*pb.GetGuardianListByBusIdResponse, error) { busID, err := uuid.Parse(req.BusId) if err != nil { - return nil, fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) + i.logger.Error("failed to parse bus ID", "error", err) + return nil, err } // トランザクションを開始 tx, err := i.entClient.Tx(ctx) if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) + i.logger.Error("failed to start transaction", "error", err) + return nil, err } defer tx.Rollback() @@ -145,12 +156,14 @@ func (i *Interactor) GetGuardianListByBusID(ctx context.Context, req *pb.GetGuar All(ctx) if err != nil { - return nil, fmt.Errorf("failed to get guardians by bus ID: %w", err) + i.logger.Error("failed to get guardians by bus ID", "error", err) + return nil, err } // トランザクションをコミット if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + i.logger.Error("failed to commit transaction", "error", err) + return nil, err } var pbGuardians []*pb.GuardianResponse diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index 4dae5c8f..9bb9644f 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -28,13 +28,14 @@ func (i *Interactor) CreateNursery(ctx context.Context, req *pb.CreateNurseryReq //パスワードをハッシュ化 hashedPassword, err := utils.HashPassword(req.Password) if err != nil { - //エラーハンドリング - return nil, fmt.Errorf("failed to hash password: %w", err) + i.logger.Error("failed to hash password", "error", err) + return nil, err } tx, err := i.entClient.Tx(ctx) if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) + i.logger.Error("failed to start transaction", "error", err) + return nil, err } defer tx.Rollback() @@ -47,6 +48,7 @@ func (i *Interactor) CreateNursery(ctx context.Context, req *pb.CreateNurseryReq if err != nil { break } + i.logger.Warn("code is already exists", "code", code) } //Nurseryを作成 @@ -60,12 +62,13 @@ func (i *Interactor) CreateNursery(ctx context.Context, req *pb.CreateNurseryReq Save(ctx) if err != nil { - //エラーハンドリング - return nil, fmt.Errorf("failed to create nursery: %w", err) + i.logger.Error("failed to create nursery", "error", err) + return nil, err } if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + i.logger.Error("failed to commit transaction", "error", err) + return nil, err } return &pb.CreateNurseryResponse{ @@ -77,7 +80,8 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque // トランザクションを開始 tx, err := i.entClient.Tx(ctx) if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) + i.logger.Error("failed to start transaction", "error", err) + return nil, err } defer tx.Rollback() @@ -87,17 +91,20 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque Only(ctx) if err != nil { - return nil, fmt.Errorf("failed to get nursery") + i.logger.Error("failed to get nursery", "error", err) + return nil, err } // フロントエンドから送られてきたパスワードとデータベースのハッシュ値を比較 if !utils.CheckPassword(nursery.HashedPassword, req.Password) { - return nil, fmt.Errorf("failed to get nursery") + i.logger.Info("password is incorrect") + return nil, err } // トランザクションをコミット if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + i.logger.Error("failed to commit transaction", "error", err) + return nil, err } return &pb.NurseryLoginResponse{ @@ -108,11 +115,12 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque // コード生成 func generateCode() string { - rand.Seed(time.Now().UnixNano()) // 現在時刻をシード値として乱数生成器を初期化 + rnd := rand.New(rand.NewSource(time.Now().UnixNano())) code := "" // 空の文字列でコードを初期化 for i := 0; i < 7; i++ { // 7桁のコードを生成 - digit := rand.Intn(10) // 0から9までの乱数を生成 + // `rand.Intn` の代わりに `rnd.Intn` を使用する + digit := rnd.Intn(10) code += fmt.Sprintf("%d", digit) // 数字を文字列に変換してコードに追加 } diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 1618ce3c..5d7ee600 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -2,7 +2,6 @@ package station import ( "context" - "fmt" "golang.org/x/exp/slog" @@ -26,13 +25,15 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { tx, err := i.entClient.Tx(ctx) if err != nil { - return nil, fmt.Errorf("failed to start transaction: %w", err) + i.logger.Error("failed to start transaction", "error", err) + return nil, err } defer tx.Rollback() guardianID, err := uuid.Parse(req.GuardianId) if err != nil { - return nil, fmt.Errorf("failed to parse guardian ID: %w", err) + i.logger.Error("failed to parse guardian ID", "error", err) + return nil, err } // ステーションを更新または作成します。 @@ -43,21 +44,20 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq Save(ctx) if err != nil { - return nil, fmt.Errorf("failed to create or update station: %w", err) + i.logger.Error("failed to create or update station", "error", err) + return nil, err } - morningNextStationID, eveningNextStationID, err := getNextStationIDs(ctx, station) + morningNextStationID, eveningNextStationID, err := getNextStationIDs(*i.logger, ctx, station) if err != nil { + i.logger.Error("failed to get next station IDs", "error", err) return nil, err // エラーハンドリング } - if err != nil { - return nil, err // 夕方のステーション設定中にエラーが発生しました - } - // トランザクションをコミットします。 if err := tx.Commit(); err != nil { - return nil, fmt.Errorf("failed to commit transaction: %w", err) + i.logger.Error(("failed to commit transaction"), "error", err) + return nil, err } // レスポンスを作成します。 @@ -69,7 +69,8 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStationListByBusIdRequest) (*pb.GetStationListByBusIdResponse, error) { busID, err := uuid.Parse(req.BusId) if err != nil { - return nil, fmt.Errorf("failed to parse bus ID: %w", err) + i.logger.Error("failed to parse bus ID", "error", err) + return nil, err } stations, err := i.entClient.Station.Query(). @@ -81,7 +82,8 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati All(ctx) if err != nil { - return nil, fmt.Errorf("failed to get stations with guardians and children: %w", err) + i.logger.Error("failed to get stations by bus ID", "error", err) + return nil, err } pbStations := make([]*pb.Station, 0, len(stations)) @@ -89,10 +91,11 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati uniqueChildren := make(map[string]*pb.Child) for _, station := range stations { - morningNextStationID, eveningNextStationID, err := getNextStationIDs(ctx, station) + morningNextStationID, eveningNextStationID, err := getNextStationIDs(*i.logger, ctx, station) if err != nil { // エラーメッセージにステーションIDを追加して明確にする - return nil, fmt.Errorf("error getting next station IDs for station %v: %w", station.ID, err) + i.logger.Error("failed to get next station IDs", "error", err) + return nil, err } pbStation := utils.ToPbStation(station, morningNextStationID, eveningNextStationID) @@ -102,7 +105,8 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati guardian := station.Edges.Guardian if err != nil { // 適切なエラーハンドリング - return nil, fmt.Errorf("error querying nursery for guardian with ID %v: %w", guardian.ID, err) + i.logger.Error("failed to get guardian", "error", err) + return nil, err } guardianID := guardian.ID.String() pbGuardian := utils.ToPbGuardianResponse(guardian) @@ -134,10 +138,11 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati }, nil } -func getNextStationIDs(ctx context.Context, station *ent.Station) (morningNextStationID, eveningNextStationID string, err error) { +func getNextStationIDs(logger slog.Logger, ctx context.Context, station *ent.Station) (morningNextStationID, eveningNextStationID string, err error) { morningNextStation, err := station.QueryMorningNextStation().Only(ctx) if err != nil && !ent.IsNotFound(err) { - return "", "", fmt.Errorf("failed to query morning next station: %w", err) + logger.Error("failed to query morning next station", "error", err) + return "", "", err } if morningNextStation != nil { morningNextStationID = morningNextStation.ID.String() @@ -145,7 +150,7 @@ func getNextStationIDs(ctx context.Context, station *ent.Station) (morningNextSt eveningNextStation, err := station.QueryEveningNextStation().Only(ctx) if err != nil && !ent.IsNotFound(err) { - return "", "", fmt.Errorf("failed to query evening next station: %w", err) + return "", "", err } if eveningNextStation != nil { eveningNextStationID = eveningNextStation.ID.String() From d8ccc8a3ab754d6a3d96f0a709c4b4e48f28e202 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 17 Feb 2024 10:12:29 +0900 Subject: [PATCH 385/771] =?UTF-8?q?feat:getChildListByNurseryId=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/auth_page/auth_page.dart | 8 +++-- .../service/get_child_list_by_nursery_id.dart | 7 ++++ .../where_child_bus/lib/util/api/child.dart | 36 +++++++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart create mode 100644 frontend/where_child_bus/lib/util/api/child.dart diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index e60e3408..2a66dabd 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -148,9 +148,11 @@ class _AuthPageState extends State { print('Login failed'); } } catch (e) { - setState(() { - _loginError = NurseryLoginError.invalidCredentials; - }); + if (mounted) { + setState(() { + _loginError = NurseryLoginError.invalidCredentials; + }); + } } } diff --git a/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart b/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart new file mode 100644 index 00000000..6ec20582 --- /dev/null +++ b/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart @@ -0,0 +1,7 @@ +import 'package:where_child_bus/util/api/child.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +Future> getChildListByNurseryIdService(String nurseryId) async { + var res = await getChildListByNurseryId(nurseryId); + return res.children; +} diff --git a/frontend/where_child_bus/lib/util/api/child.dart b/frontend/where_child_bus/lib/util/api/child.dart new file mode 100644 index 00000000..a8960d8d --- /dev/null +++ b/frontend/where_child_bus/lib/util/api/child.dart @@ -0,0 +1,36 @@ +import "dart:developer" as developer; + +import "package:flutter/foundation.dart"; +import "package:grpc/grpc.dart"; +import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart"; + +Future performGrpcCall( + Future Function(ChildServiceClient) grpcCall) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + final grpcClient = ChildServiceClient(channel); + + try { + final result = await grpcCall(grpcClient); + if (kDebugMode) { + developer.log("レスポンス: $result"); + } + return result; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } finally { + await channel.shutdown(); + } +} + +Future getChildListByNurseryId( + String nurseryId) async { + return performGrpcCall((client) async { + var req = GetChildListByNurseryIDRequest(nurseryId: nurseryId); + return client.getChildListByNurseryID(req); + }); +} From 5a0e56feb407be2f3583e3bdd88028a585474e30 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 17 Feb 2024 10:18:08 +0900 Subject: [PATCH 386/771] =?UTF-8?q?chore:childListPage=E3=81=8Cnursery?= =?UTF-8?q?=E3=82=92=E5=8F=97=E3=81=91=E5=8F=96=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/app.dart | 4 +++- .../student_list_page/student_list_page.dart | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index 2d3244fd..f9baef87 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -23,7 +23,9 @@ class _AppState extends State { title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定'][_selectedIndex]), ), body: [ - const StudentListPage(), + ChildListPage( + nursery: widget.nursery, + ), BusListPage( nursery: widget.nursery, ), diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 89d1193a..5c3ccaf3 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -2,15 +2,18 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/child_list.dart'; import 'package:where_child_bus/pages/student_list_page/student_detail_sheet.dart'; import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; -class StudentListPage extends StatefulWidget { - const StudentListPage({super.key}); +class ChildListPage extends StatefulWidget { + final NurseryResponse nursery; + + const ChildListPage({super.key, required this.nursery}); @override - State createState() => _StudentListPageState(); + State createState() => _ChildListPageState(); } -class _StudentListPageState extends State { +class _ChildListPageState extends State { //TODO: 将来的には動的にデータを受け取る。 final List name = [ "園児1", @@ -39,7 +42,11 @@ class _StudentListPageState extends State { var screenSize = MediaQuery.of(context).size; return Scaffold( - body: ChildList(childNames: name, groupNames: group, images: image,), + body: ChildList( + childNames: name, + groupNames: group, + images: image, + ), floatingActionButton: FloatingActionButton( onPressed: () { Navigator.of(context).push(MaterialPageRoute( From 30c5c1f55b9df4876a4103705e70978afe75e818 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 17 Feb 2024 11:25:53 +0900 Subject: [PATCH 387/771] =?UTF-8?q?feat:=E5=88=B0=E7=9D=80=E4=BA=88?= =?UTF-8?q?=E5=AE=9A=E6=99=82=E5=88=BB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/lib/app.dart | 11 +-- .../lib/components/utils/google_map_view.dart | 48 ++++----- .../where_child_bus_guardian/lib/main.dart | 5 +- .../map_page/components/arrival_time.dart | 98 +++++++++++++++++++ .../lib/pages/map_page/map_page.dart | 72 +++++++++++--- .../where_child_bus_guardian/pubspec.lock | 24 +++++ .../where_child_bus_guardian/pubspec.yaml | 1 + 7 files changed, 208 insertions(+), 51 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index 90bcaf00..1d12715e 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -4,8 +4,7 @@ import 'package:where_child_bus_guardian/pages/daily_page/daily_page.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; class App extends StatefulWidget { - final Widget googleMap; - const App({super.key, required this.googleMap}); + const App({super.key}); @override State createState() => _AppState(); @@ -20,11 +19,9 @@ class _AppState extends State { appBar: AppBar( title: Text(['日々の記録', '地図', '乗車確認'][_selectedIndex]), ), - body: IndexedStack(index: _selectedIndex, children: [ - const DailyPage(), - MapPage(googleMap: widget.googleMap), - const CheckPage() - ]), + body: IndexedStack( + index: _selectedIndex, + children: const [DailyPage(), MapPage(), CheckPage()]), bottomNavigationBar: BottomNavigationBar( currentIndex: _selectedIndex, onTap: (int index) => setState(() => _selectedIndex = index), diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index d6c6909b..5812bfcc 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -2,25 +2,20 @@ import 'package:flutter/material.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart'; - -class Waypoint { - final double latitude; - final double longitude; - final String name; - - Waypoint( - {required this.latitude, required this.longitude, required this.name}); -} - -//TODO: 将来的に停留所のデータを受け取る -final List waypoints = [ - Waypoint(latitude: 34.7159, longitude: 137.7368, name: "停留所1"), - Waypoint(latitude: 34.7108, longitude: 137.7261, name: "停留所2"), - Waypoint(latitude: 34.7169, longitude: 137.7285, name: "停留所3"), -]; +import '../../pages/map_page/map_page.dart'; class GoogleMapView extends StatefulWidget { - const GoogleMapView({super.key}); + final List waypoints; + double nurseryLatitude, nurseryLongitude; + double busLatitude, busLongitude; + + GoogleMapView( + {super.key, + required this.waypoints, + required this.nurseryLatitude, + required this.nurseryLongitude, + required this.busLatitude, + required this.busLongitude}); @override State createState() => _GoogleMapView(); @@ -32,12 +27,6 @@ class _GoogleMapView extends State { late GoogleMapController mapController; - //TODO: 将来的に保育園の緯度経度を受け取る - double nurseryLatitude = 34.7056, nurseryLongitude = 137.7343; - - //TODO: 将来的にバスの現在位置を受け取る - double busLatitude = 34.7057, busLongitude = 137.7317; - Map markers = {}; Map polylines = {}; List polylineCoordinates = []; @@ -47,13 +36,13 @@ class _GoogleMapView extends State { @override void initState() { super.initState(); - _addMarker(LatLng(nurseryLatitude, nurseryLongitude), "保育園", + _addMarker(LatLng(widget.nurseryLatitude, widget.nurseryLongitude), "保育園", BitmapDescriptor.defaultMarker); - _addMarker(LatLng(busLatitude, busLongitude), "バス", + _addMarker(LatLng(widget.busLatitude, widget.busLongitude), "バス", BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueBlue)); - waypoints.forEach((Waypoint waypoint) { + widget.waypoints.forEach((Waypoint waypoint) { _addMarker(LatLng(waypoint.latitude, waypoint.longitude), waypoint.name, BitmapDescriptor.defaultMarkerWithHue(90)); }); @@ -69,7 +58,7 @@ class _GoogleMapView extends State { mapType: MapType.normal, onMapCreated: (GoogleMapController controller) { mapController = controller; - _getPolyline(waypoints); + _getPolyline(widget.waypoints); }, markers: Set.of(markers.values), polylines: Set.of(polylines.values), @@ -102,14 +91,13 @@ class _GoogleMapView extends State { try { PolylineResult result = await polylinePoints.getRouteBetweenCoordinates( googleApiKey, - PointLatLng(nurseryLatitude, nurseryLongitude), - PointLatLng(nurseryLatitude, nurseryLongitude), + PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), + PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), travelMode: TravelMode.driving, avoidTolls: true, avoidHighways: false, avoidFerries: false, wayPoints: polylineWayPoints, - optimizeWaypoints: true, ); if (result.points.isNotEmpty) { diff --git a/frontend/where_child_bus_guardian/lib/main.dart b/frontend/where_child_bus_guardian/lib/main.dart index ec16f894..e3540630 100644 --- a/frontend/where_child_bus_guardian/lib/main.dart +++ b/frontend/where_child_bus_guardian/lib/main.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:where_child_bus_guardian/app.dart'; -import './components/utils/google_map_view.dart'; Future main() async { await dotenv.load(fileName: '.env'); @@ -18,7 +17,7 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State { - Widget googleMap = const GoogleMapView(); + // Widget googleMap = const GoogleMapView(); @override Widget build(BuildContext context) { @@ -28,7 +27,7 @@ class _MyAppState extends State { colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), - home: App(googleMap: googleMap), + home: App(), ); } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart new file mode 100644 index 00000000..cc59e13f --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -0,0 +1,98 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:http/http.dart' as http; +import 'dart:convert'; +import '../map_page.dart'; + +class ArrivalTime extends StatefulWidget { + final List waypoints; + double nurseryLatitude, nurseryLongitude; + double guardianLatitude, guardianLongitude; + DateTime departureTime; + + ArrivalTime({ + super.key, + required this.waypoints, + required this.nurseryLatitude, + required this.nurseryLongitude, + required this.guardianLatitude, + required this.guardianLongitude, + required this.departureTime, + }); + + @override + State createState() => _ArrivalTime(); +} + +class _ArrivalTime extends State { + String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); + String arrivalTime = ''; + + @override + Widget build(BuildContext context) { + setTravelTime(); + return Text( + arrivalTime, + style: const TextStyle(fontSize: 30), + ); + } + + getTravelTime(double startLat, double startLng, double endLat, double endLng, + List waypoints) async { + String apiKey = dotenv.get("GOOGLE_MAP_API_KEY"); + String url = ''; + + if (waypoints[0].latitude == endLat && waypoints[0].longitude == endLng) { + url = 'https://maps.googleapis.com/maps/api/directions/json' + '?destination=$endLat,$endLng&origin=$startLat,$startLng&key=$apiKey'; + } else { + int guardianIndex = waypoints.indexWhere((point) => + point.latitude == guardianLatitude && + point.longitude == guardianLongitude); + if (guardianIndex != -1) { + waypoints = waypoints.sublist(0, guardianIndex); + } + + String waypointsString = waypoints + .map((point) => 'via:${point.latitude},${point.longitude}|') + .join(''); + + url = 'https://maps.googleapis.com/maps/api/directions/json' + '?destination=$endLat,$endLng&origin=$startLat,$startLng&waypoints=$waypointsString&key=$apiKey'; + } + + final response = await http.get(Uri.parse(url)); + + if (response.statusCode == 200) { + final data = json.decode(response.body); + if (data['routes'] != null && data['routes'].isNotEmpty) { + final route = data['routes'][0]; + final duration = route['legs'][0]['duration']['value']; + return duration; + } else { + print('No routes found.'); + } + } else { + print('Failed to fetch directions.'); + } + } + + void setTravelTime() async { + int durationInSeconds = await getTravelTime( + widget.nurseryLatitude, + widget.nurseryLongitude, + widget.guardianLatitude, + widget.guardianLongitude, + widget.waypoints); + + DateTime nurseryToBusStopTime = + widget.departureTime.add(Duration(seconds: durationInSeconds)); + + String formattedArrivalTime = + '${nurseryToBusStopTime.hour.toString().padLeft(2, '0')}:${nurseryToBusStopTime.minute.toString().padLeft(2, '0')}'; + + setState(() { + arrivalTime = formattedArrivalTime; + }); + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 294e49a3..05db6811 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -1,10 +1,38 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus_guardian/components/utils/google_map_view.dart'; +import 'package:where_child_bus_guardian/pages/map_page/components/arrival_time.dart'; import '../styles/styles.dart'; -class MapPage extends StatefulWidget { - final Widget googleMap; +class Waypoint { + final double latitude; + final double longitude; + final String name; + + Waypoint( + {required this.latitude, required this.longitude, required this.name}); +} + +//TODO: 将来的に停留所のデータを受け取る +final List waypoints = [ + Waypoint(latitude: 34.7108, longitude: 137.7261, name: "停留所1"), + Waypoint(latitude: 34.7169, longitude: 137.7285, name: "停留所2"), + Waypoint(latitude: 34.7159, longitude: 137.7368, name: "停留所3"), +]; + +//TODO: 将来的に保育園の緯度経度を受け取る +double nurseryLatitude = 34.7056, nurseryLongitude = 137.7343; + +//TODO: 将来的にバスの現在位置を受け取る +double busLatitude = 34.7057, busLongitude = 137.7317; - const MapPage({super.key, required this.googleMap}); +//TODO: 将来的には保護者に結び付く停留所の緯度経度を受け取る +double guardianLatitude = 34.7108, guardianLongitude = 137.7261; + +//TODO: 将来的には出発時刻を受け取る +DateTime departureTime = DateTime.now(); + +class MapPage extends StatefulWidget { + const MapPage({super.key}); @override State createState() => _MapPageState(); @@ -18,7 +46,16 @@ class _MapPageState extends State { return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: [widget.googleMap, pageBottomBody()], + children: [ + GoogleMapView( + waypoints: waypoints, + nurseryLatitude: nurseryLatitude, + nurseryLongitude: nurseryLongitude, + busLatitude: busLatitude, + busLongitude: busLongitude, + ), + pageBottomBody() + ], ), ); } @@ -46,19 +83,32 @@ class _MapPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, children: [ - fieldTitleAndTime("到着まで", "n分"), - fieldTitleAndTime("到着予定時刻", "HH:MM") + fieldTitleAndTime( + "到着まで", + ArrivalTime( + waypoints: waypoints, + nurseryLatitude: nurseryLatitude, + nurseryLongitude: nurseryLongitude, + guardianLatitude: guardianLatitude, + guardianLongitude: guardianLongitude, + departureTime: departureTime)), + fieldTitleAndTime( + "到着予定時刻", + ArrivalTime( + waypoints: waypoints, + nurseryLatitude: nurseryLatitude, + nurseryLongitude: nurseryLongitude, + guardianLatitude: guardianLatitude, + guardianLongitude: guardianLongitude, + departureTime: departureTime)) ]); } - Widget fieldTitleAndTime(String title, String time) { + Widget fieldTitleAndTime(String title, Widget time) { return Column( children: [ Text(title), - Text( - time, - style: const TextStyle(fontSize: 30), - ) + time, ], ); } diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index df43f8e7..cbbfaac3 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -113,6 +113,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + flinq: + dependency: transitive + description: + name: flinq + sha256: "828d6cc2f2525f2c1fbf1803f1a526f4c6592068b70f46609131d0cc0562f514" + url: "https://pub.dev" + source: hosted + version: "2.0.2" flutter: dependency: "direct main" description: flutter @@ -176,6 +184,14 @@ packages: description: flutter source: sdk version: "0.0.0" + google_directions_api: + dependency: "direct main" + description: + name: google_directions_api + sha256: a901c60830b442652c8285631aa11bba3e84c43e77ddf9a2797f8e6398fa5043 + url: "https://pub.dev" + source: hosted + version: "0.10.0" google_maps: dependency: transitive description: @@ -224,6 +240,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.4+3" + google_polyline_algorithm: + dependency: transitive + description: + name: google_polyline_algorithm + sha256: "357874f00d3f93c3ba1bf4b4d9a154aa9ee87147c068238c1e8392012b686a03" + url: "https://pub.dev" + source: hosted + version: "3.1.0" googleapis_auth: dependency: transitive description: diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index e7235931..7704f921 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -20,6 +20,7 @@ dependencies: flutter_state_notifier: ^1.0.0 google_maps_flutter: ^2.5.3 flutter_polyline_points: ^2.0.0 + google_directions_api: ^0.10.0 dev_dependencies: flutter_test: From 16db51bfe1f6227904762622e06b5338bb01d361 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 17 Feb 2024 12:16:43 +0900 Subject: [PATCH 388/771] =?UTF-8?q?feat:=E5=AD=90=E4=BE=9B=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E3=82=92=E3=83=90=E3=83=83=E3=82=AF=E3=82=A8=E3=83=B3?= =?UTF-8?q?=E3=83=89=E3=81=8B=E3=82=89=E5=8F=96=E5=BE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/child_list/child_list.dart | 40 +++++++------- .../student_list_page/student_list_page.dart | 53 ++++++++++++++++--- 2 files changed, 67 insertions(+), 26 deletions(-) diff --git a/frontend/where_child_bus/lib/components/child_list/child_list.dart b/frontend/where_child_bus/lib/components/child_list/child_list.dart index a1959cba..912c8a8e 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list.dart @@ -1,17 +1,16 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; import 'package:where_child_bus/pages/student_list_page/student_detail_sheet.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class ChildList extends StatefulWidget { - final List childNames; - final List groupNames; + final List children; final List images; final VoidCallback? callback; const ChildList({ Key? key, - required this.childNames, - required this.groupNames, + required this.children, required this.images, this.callback, }) : super(key: key); @@ -24,32 +23,33 @@ class _ChildListState extends State { @override Widget build(BuildContext context) { return ListView.separated( - itemCount: widget.childNames.length, - separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), - itemBuilder: (BuildContext context, int index) => childListElement(context, index), + itemCount: widget.children.length, + separatorBuilder: (BuildContext context, int index) => + const Divider(height: 20, color: Colors.transparent), + itemBuilder: (BuildContext context, int index) => + childListElement(context, index), ); } Widget childListElement(BuildContext context, int index) { return ChildListElement( - title: widget.childNames[index], - subtitle: widget.groupNames[index], - imagePath: "assets/images/face_${widget.images[index]}.png", - onTap: () { - if (widget.callback == null) { - childDetailModal(index); - } else { - widget.callback!(); - } - } - ); + title: widget.children[index].name, + subtitle: widget.children[index].id, + imagePath: "assets/images/face_${widget.images[index]}.png", + onTap: () { + if (widget.callback == null) { + childDetailModal(index); + } else { + widget.callback!(); + } + }); } - childDetailModal(int index) async{ + childDetailModal(int index) async { await showModalBottomSheet( context: context, builder: (BuildContext context) { - return StudentDetailSheet(childName: widget.childNames[index]); + return StudentDetailSheet(childName: widget.children[index].name); }); } } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 5c3ccaf3..2409004f 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -1,7 +1,9 @@ +import "dart:developer" as developer; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/child_list.dart'; -import 'package:where_child_bus/pages/student_list_page/student_detail_sheet.dart'; import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; +import 'package:where_child_bus/service/get_child_list_by_nursery_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class ChildListPage extends StatefulWidget { @@ -14,6 +16,10 @@ class ChildListPage extends StatefulWidget { } class _ChildListPageState extends State { + List children = []; + bool _isLoading = false; + bool _isFailLoading = false; + //TODO: 将来的には動的にデータを受け取る。 final List name = [ "園児1", @@ -37,16 +43,43 @@ class _ChildListPageState extends State { "2", ]; + @override + void initState() { + super.initState(); + _loadChildren(); + } + + Future _loadChildren() async { + try { + _isLoading = true; + List childList = + await getChildListByNurseryIdService(widget.nursery.id); + if (mounted) { + setState(() { + children = childList; + _isLoading = false; + }); + } + } catch (error) { + if (kDebugMode) { + developer.log("子供のロード中にエラーが発生しました"); + } + + if (mounted) { + setState(() { + _isLoading = false; + _isFailLoading = true; + }); + } + } + } + @override Widget build(BuildContext context) { var screenSize = MediaQuery.of(context).size; return Scaffold( - body: ChildList( - childNames: name, - groupNames: group, - images: image, - ), + body: pageBody(), floatingActionButton: FloatingActionButton( onPressed: () { Navigator.of(context).push(MaterialPageRoute( @@ -56,4 +89,12 @@ class _ChildListPageState extends State { ), ); } + + Widget pageBody() { + return _isLoading + ? const Center( + child: CircularProgressIndicator(), + ) + : ChildList(children: children, images: image); + } } From 7489ca13d0987310dd87640df29bf0cac32b535c Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 17 Feb 2024 13:45:45 +0900 Subject: [PATCH 389/771] fix(ml): typo --- .../DetectFaceAndClip/{__init.py => __init__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename machine_learning/src/face_detect_model/DetectFaceAndClip/{__init.py => __init__.py} (100%) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/__init.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/__init__.py similarity index 100% rename from machine_learning/src/face_detect_model/DetectFaceAndClip/__init.py rename to machine_learning/src/face_detect_model/DetectFaceAndClip/__init__.py From 2367849455120bffac448e3e32f1960fa3a5cf31 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 17 Feb 2024 13:56:25 +0900 Subject: [PATCH 390/771] =?UTF-8?q?chore(ml):=20=E5=90=84=E3=82=B5?= =?UTF-8?q?=E3=83=BC=E3=83=93=E3=82=B9=E3=81=AE=E3=83=A1=E3=82=BD=E3=83=83?= =?UTF-8?q?=E3=83=89=E3=81=AB=E5=AF=BE=E3=81=97=E3=81=A6=E5=BC=95=E6=95=B0?= =?UTF-8?q?=E3=81=AE=E5=9E=8B=E3=83=92=E3=83=B3=E3=83=88=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/proto-gen/machine_learning/v1/server.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 5de248e2..7ea9c92b 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -16,7 +16,7 @@ class HealthCheckServiceServer( machine_learning_pb2_grpc.MachineLearningServiceServicer ): - def Ping(self, request, context): + def Ping(self, request: health_check_pb2.PingRequest, context): print("RECV: %s" % request.name) message = "Hello, %s!" % request.name print("SEND: %s" % message) @@ -27,14 +27,18 @@ class MachineLearningServiceServicer( machine_learning_pb2_grpc.MachineLearningServiceServicer ): # TODO: implement Predict - def Predict(self, request, context): + def Predict(self, request: machine_learning_pb2.PredRequest, context): pass # TODO: implement Train - def Train(self, request, context): + def Train(self, request: machine_learning_pb2.TrainRequest, context): pass - def FaceDetectAndClip(self, request, context): + def FaceDetectAndClip( + self, + request: machine_learning_pb2.FaceDetectAndClipRequest, + context, + ): parser = argparse.ArgumentParser() args = parser.parse_args() From e219feeb2668f39d1382b253f636a0d4d673b3e0 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 17 Feb 2024 13:58:25 +0900 Subject: [PATCH 391/771] =?UTF-8?q?chore(ml):=20logging=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E3=81=99=E3=82=8Bconfig=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=81=A8?= =?UTF-8?q?=E4=B8=80=E9=83=A8logging=E3=82=92=E5=88=A9=E7=94=A8=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/proto-gen/machine_learning/v1/server.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 7ea9c92b..b7e607dd 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -17,9 +17,9 @@ class HealthCheckServiceServer( machine_learning_pb2_grpc.MachineLearningServiceServicer ): def Ping(self, request: health_check_pb2.PingRequest, context): - print("RECV: %s" % request.name) + logging.info("RECV: %s" % request.name) message = "Hello, %s!" % request.name - print("SEND: %s" % message) + logging.info("SEND: %s" % message) return health_check_pb2.PingResponse(message=message) @@ -85,5 +85,8 @@ def serve(): if __name__ == "__main__": # NOTE: https://github.com/grpc/grpc/issues/17321 # gRPCのPython環境でloggingを使う場合、server起動前にlogging.basicConfig()を実行する必要がある - logging.basicConfig() + logging.basicConfig( + level=logging.INFO, + format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", + ) serve() From 677a0a2bb0525037d2919b90ff7c7e2a2fa3537b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 16:55:03 +0900 Subject: [PATCH 392/771] =?UTF-8?q?feat:=20proto=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 340 +++++++++++++----- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 192 +++++----- .../go/where_child_bus/v1/child.pb.go | 218 ++++++----- .../go/where_child_bus/v1/child_photo.pb.go | 298 ++++++++++++--- .../where_child_bus/v1/child_photo_grpc.pb.go | 37 ++ .../go/where_child_bus/v1/resources.pb.go | 129 +++---- .../go/where_child_bus/v1/station.pb.go | 98 ++--- .../v1/machine_learning.pb.dart | 103 +++++- .../v1/machine_learning.pbenum.dart | 40 +++ .../v1/machine_learning.pbjson.dart | 49 ++- .../proto-gen/where_child_bus/v1/bus.pb.dart | 44 ++- .../where_child_bus/v1/bus.pbjson.dart | 16 +- .../where_child_bus/v1/child.pb.dart | 24 ++ .../where_child_bus/v1/child.pbjson.dart | 12 +- .../where_child_bus/v1/child_photo.pb.dart | 158 ++++++++ .../v1/child_photo.pbgrpc.dart | 20 ++ .../v1/child_photo.pbjson.dart | 39 ++ .../v1/health_check.pbgrpc.dart | 16 +- .../where_child_bus/v1/resources.pb.dart | 50 ++- .../where_child_bus/v1/resources.pbjson.dart | 11 +- .../where_child_bus/v1/station.pb.dart | 8 + .../where_child_bus/v1/station.pbjson.dart | 4 +- .../v1/machine_learning_pb2.py | 34 +- .../v1/machine_learning_pb2.pyi | 43 ++- .../proto-gen/where_child_bus/v1/bus_pb2.py | 12 +- .../proto-gen/where_child_bus/v1/bus_pb2.pyi | 6 +- .../proto-gen/where_child_bus/v1/child_pb2.py | 26 +- .../where_child_bus/v1/child_pb2.pyi | 18 +- .../where_child_bus/v1/child_photo_pb2.py | 12 +- .../where_child_bus/v1/child_photo_pb2.pyi | 22 +- .../v1/child_photo_pb2_grpc.py | 34 +- .../where_child_bus/v1/resources_pb2.py | 24 +- .../where_child_bus/v1/resources_pb2.pyi | 6 +- .../where_child_bus/v1/station_pb2.py | 8 +- .../where_child_bus/v1/station_pb2.pyi | 6 +- .../v1/machine_learning.proto | 22 +- proto/where_child_bus/v1/bus.proto | 7 +- proto/where_child_bus/v1/child.proto | 5 +- proto/where_child_bus/v1/child_photo.proto | 17 +- proto/where_child_bus/v1/resources.proto | 7 +- proto/where_child_bus/v1/station.proto | 1 + 41 files changed, 1645 insertions(+), 571 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index dff1f444..59d74d64 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -20,14 +20,113 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type BusType int32 + +const ( + BusType_BUS_TYPE_UNSPECIFIED BusType = 0 + BusType_BUS_TYPE_MORNING BusType = 1 + BusType_BUS_TYPE_EVENING BusType = 2 +) + +// Enum value maps for BusType. +var ( + BusType_name = map[int32]string{ + 0: "BUS_TYPE_UNSPECIFIED", + 1: "BUS_TYPE_MORNING", + 2: "BUS_TYPE_EVENING", + } + BusType_value = map[string]int32{ + "BUS_TYPE_UNSPECIFIED": 0, + "BUS_TYPE_MORNING": 1, + "BUS_TYPE_EVENING": 2, + } +) + +func (x BusType) Enum() *BusType { + p := new(BusType) + *p = x + return p +} + +func (x BusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BusType) Descriptor() protoreflect.EnumDescriptor { + return file_machine_learning_v1_machine_learning_proto_enumTypes[0].Descriptor() +} + +func (BusType) Type() protoreflect.EnumType { + return &file_machine_learning_v1_machine_learning_proto_enumTypes[0] +} + +func (x BusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BusType.Descriptor instead. +func (BusType) EnumDescriptor() ([]byte, []int) { + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{0} +} + +type VideoType int32 + +const ( + VideoType_VIDEO_TYPE_UNSPECIFIED VideoType = 0 + VideoType_VIDEO_TYPE_GET_ON VideoType = 1 + VideoType_VIDEO_TYPE_GET_OFF VideoType = 2 +) + +// Enum value maps for VideoType. +var ( + VideoType_name = map[int32]string{ + 0: "VIDEO_TYPE_UNSPECIFIED", + 1: "VIDEO_TYPE_GET_ON", + 2: "VIDEO_TYPE_GET_OFF", + } + VideoType_value = map[string]int32{ + "VIDEO_TYPE_UNSPECIFIED": 0, + "VIDEO_TYPE_GET_ON": 1, + "VIDEO_TYPE_GET_OFF": 2, + } +) + +func (x VideoType) Enum() *VideoType { + p := new(VideoType) + *p = x + return p +} + +func (x VideoType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VideoType) Descriptor() protoreflect.EnumDescriptor { + return file_machine_learning_v1_machine_learning_proto_enumTypes[1].Descriptor() +} + +func (VideoType) Type() protoreflect.EnumType { + return &file_machine_learning_v1_machine_learning_proto_enumTypes[1] +} + +func (x VideoType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VideoType.Descriptor instead. +func (VideoType) EnumDescriptor() ([]byte, []int) { + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{1} +} + type TrainRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - ChildId []string `protobuf:"bytes,2,rep,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - BusId string `protobuf:"bytes,3,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + ChildIds []string `protobuf:"bytes,3,rep,name=child_ids,json=childIds,proto3" json:"child_ids,omitempty"` + BusType BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=machine_learning.v1.BusType" json:"bus_type,omitempty"` } func (x *TrainRequest) Reset() { @@ -69,18 +168,25 @@ func (x *TrainRequest) GetNurseryId() string { return "" } -func (x *TrainRequest) GetChildId() []string { +func (x *TrainRequest) GetBusId() string { if x != nil { - return x.ChildId + return x.BusId + } + return "" +} + +func (x *TrainRequest) GetChildIds() []string { + if x != nil { + return x.ChildIds } return nil } -func (x *TrainRequest) GetBusId() string { +func (x *TrainRequest) GetBusType() BusType { if x != nil { - return x.BusId + return x.BusType } - return "" + return BusType_BUS_TYPE_UNSPECIFIED } type TrainResponse struct { @@ -135,7 +241,11 @@ type PredRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` // TODO: add video data + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=machine_learning.v1.BusType" json:"bus_type,omitempty"` + VideoType VideoType `protobuf:"varint,3,opt,name=video_type,json=videoType,proto3,enum=machine_learning.v1.VideoType" json:"video_type,omitempty"` + VideoChunk []byte `protobuf:"bytes,4,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data + Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp } func (x *PredRequest) Reset() { @@ -177,6 +287,34 @@ func (x *PredRequest) GetBusId() string { return "" } +func (x *PredRequest) GetBusType() BusType { + if x != nil { + return x.BusType + } + return BusType_BUS_TYPE_UNSPECIFIED +} + +func (x *PredRequest) GetVideoType() VideoType { + if x != nil { + return x.VideoType + } + return VideoType_VIDEO_TYPE_UNSPECIFIED +} + +func (x *PredRequest) GetVideoChunk() []byte { + if x != nil { + return x.VideoChunk + } + return nil +} + +func (x *PredRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + type PredResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -333,66 +471,91 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x22, 0x5f, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, - 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, - 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x65, 0x64, 0x22, 0x24, 0x0a, 0x0b, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, - 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x19, - 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x19, 0x46, 0x61, 0x63, - 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x65, 0x64, 0x32, 0xad, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x4e, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, + 0x31, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x49, 0x64, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2e, + 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, 0xdb, + 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3d, + 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x29, 0x0a, 0x0c, + 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, 0x63, 0x65, 0x44, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x3a, 0x0a, + 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, + 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, + 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, + 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x56, 0x0a, 0x09, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, 0x45, 0x4f, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, + 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, + 0x10, 0x02, 0x32, 0xad, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, + 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4f, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, - 0x01, 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, - 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, - 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, - 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, - 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, - 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, + 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, + 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x72, + 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, + 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -407,27 +570,33 @@ func file_machine_learning_v1_machine_learning_proto_rawDescGZIP() []byte { return file_machine_learning_v1_machine_learning_proto_rawDescData } +var file_machine_learning_v1_machine_learning_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_machine_learning_v1_machine_learning_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ - (*TrainRequest)(nil), // 0: machine_learning.v1.TrainRequest - (*TrainResponse)(nil), // 1: machine_learning.v1.TrainResponse - (*PredRequest)(nil), // 2: machine_learning.v1.PredRequest - (*PredResponse)(nil), // 3: machine_learning.v1.PredResponse - (*FaceDetectAndClipRequest)(nil), // 4: machine_learning.v1.FaceDetectAndClipRequest - (*FaceDetectAndClipResponse)(nil), // 5: machine_learning.v1.FaceDetectAndClipResponse + (BusType)(0), // 0: machine_learning.v1.BusType + (VideoType)(0), // 1: machine_learning.v1.VideoType + (*TrainRequest)(nil), // 2: machine_learning.v1.TrainRequest + (*TrainResponse)(nil), // 3: machine_learning.v1.TrainResponse + (*PredRequest)(nil), // 4: machine_learning.v1.PredRequest + (*PredResponse)(nil), // 5: machine_learning.v1.PredResponse + (*FaceDetectAndClipRequest)(nil), // 6: machine_learning.v1.FaceDetectAndClipRequest + (*FaceDetectAndClipResponse)(nil), // 7: machine_learning.v1.FaceDetectAndClipResponse } var file_machine_learning_v1_machine_learning_proto_depIdxs = []int32{ - 0, // 0: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest - 2, // 1: machine_learning.v1.MachineLearningService.Pred:input_type -> machine_learning.v1.PredRequest - 4, // 2: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest - 1, // 3: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse - 3, // 4: machine_learning.v1.MachineLearningService.Pred:output_type -> machine_learning.v1.PredResponse - 5, // 5: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: machine_learning.v1.TrainRequest.bus_type:type_name -> machine_learning.v1.BusType + 0, // 1: machine_learning.v1.PredRequest.bus_type:type_name -> machine_learning.v1.BusType + 1, // 2: machine_learning.v1.PredRequest.video_type:type_name -> machine_learning.v1.VideoType + 2, // 3: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest + 4, // 4: machine_learning.v1.MachineLearningService.Pred:input_type -> machine_learning.v1.PredRequest + 6, // 5: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest + 3, // 6: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse + 5, // 7: machine_learning.v1.MachineLearningService.Pred:output_type -> machine_learning.v1.PredResponse + 7, // 8: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse + 6, // [6:9] is the sub-list for method output_type + 3, // [3:6] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_machine_learning_v1_machine_learning_proto_init() } @@ -514,13 +683,14 @@ func file_machine_learning_v1_machine_learning_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_machine_learning_v1_machine_learning_proto_rawDesc, - NumEnums: 0, + NumEnums: 2, NumMessages: 6, NumExtensions: 0, NumServices: 1, }, GoTypes: file_machine_learning_v1_machine_learning_proto_goTypes, DependencyIndexes: file_machine_learning_v1_machine_learning_proto_depIdxs, + EnumInfos: file_machine_learning_v1_machine_learning_proto_enumTypes, MessageInfos: file_machine_learning_v1_machine_learning_proto_msgTypes, }.Build() File_machine_learning_v1_machine_learning_proto = out.File diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 67906e12..22dfe0ab 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -576,9 +576,10 @@ type StreamBusVideoRequest struct { unknownFields protoimpl.UnknownFields BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - VideoType VideoType `protobuf:"varint,2,opt,name=video_type,json=videoType,proto3,enum=where_child_bus.v1.VideoType" json:"video_type,omitempty"` - VideoChunk []byte `protobuf:"bytes,3,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data - Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp + BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` + VideoType VideoType `protobuf:"varint,3,opt,name=video_type,json=videoType,proto3,enum=where_child_bus.v1.VideoType" json:"video_type,omitempty"` + VideoChunk []byte `protobuf:"bytes,4,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data + Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp } func (x *StreamBusVideoRequest) Reset() { @@ -620,6 +621,13 @@ func (x *StreamBusVideoRequest) GetBusId() string { return "" } +func (x *StreamBusVideoRequest) GetBusType() BusType { + if x != nil { + return x.BusType + } + return BusType_BUS_TYPE_UNSPECIFIED +} + func (x *StreamBusVideoRequest) GetVideoType() VideoType { if x != nil { return x.VideoType @@ -747,78 +755,82 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0xab, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0xe3, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, - 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, - 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, - 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb6, 0x05, 0x0a, - 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, + 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x76, + 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb6, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, + 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, - 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, - 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, + 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, - 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, - 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, - 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, + 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, + 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -849,31 +861,33 @@ var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ (*StreamBusVideoResponse)(nil), // 11: where_child_bus.v1.StreamBusVideoResponse (*Bus)(nil), // 12: where_child_bus.v1.Bus (Status)(0), // 13: where_child_bus.v1.Status - (VideoType)(0), // 14: where_child_bus.v1.VideoType + (BusType)(0), // 14: where_child_bus.v1.BusType + (VideoType)(0), // 15: where_child_bus.v1.VideoType } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ 12, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus 12, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus 13, // 2: where_child_bus.v1.ChangeBusStatusRequest.status:type_name -> where_child_bus.v1.Status 12, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus - 14, // 4: where_child_bus.v1.StreamBusVideoRequest.video_type:type_name -> where_child_bus.v1.VideoType - 0, // 5: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest - 2, // 6: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 4, // 7: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest - 6, // 8: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest - 8, // 9: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest - 10, // 10: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest - 1, // 11: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 12: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 5, // 13: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse - 7, // 14: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse - 9, // 15: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse - 11, // 16: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse - 11, // [11:17] is the sub-list for method output_type - 5, // [5:11] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 14, // 4: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType + 15, // 5: where_child_bus.v1.StreamBusVideoRequest.video_type:type_name -> where_child_bus.v1.VideoType + 0, // 6: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 7: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 4, // 8: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest + 6, // 9: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest + 8, // 10: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest + 10, // 11: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest + 1, // 12: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 13: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 5, // 14: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse + 7, // 15: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse + 9, // 16: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse + 11, // 17: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse + 12, // [12:18] is the sub-list for method output_type + 6, // [6:12] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } diff --git a/backend/proto-gen/go/where_child_bus/v1/child.pb.go b/backend/proto-gen/go/where_child_bus/v1/child.pb.go index ad3f8263..e55c313f 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child.pb.go @@ -206,7 +206,8 @@ type GetChildListByNurseryIDResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` + Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` + Photos []*ChildPhoto `protobuf:"bytes,2,rep,name=photos,proto3" json:"photos,omitempty"` } func (x *GetChildListByNurseryIDResponse) Reset() { @@ -248,6 +249,13 @@ func (x *GetChildListByNurseryIDResponse) GetChildren() []*Child { return nil } +func (x *GetChildListByNurseryIDResponse) GetPhotos() []*ChildPhoto { + if x != nil { + return x.Photos + } + return nil +} + type GetChildListByGuardianIDRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -300,7 +308,8 @@ type GetChildListByGuardianIDResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` + Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` + Photos []*ChildPhoto `protobuf:"bytes,2,rep,name=photos,proto3" json:"photos,omitempty"` } func (x *GetChildListByGuardianIDResponse) Reset() { @@ -342,6 +351,13 @@ func (x *GetChildListByGuardianIDResponse) GetChildren() []*Child { return nil } +func (x *GetChildListByGuardianIDResponse) GetPhotos() []*ChildPhoto { + if x != nil { + return x.Photos + } + return nil +} + type GetChildListByBusIDRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -394,7 +410,8 @@ type GetChildListByBusIDResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` + Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` + Photos []*ChildPhoto `protobuf:"bytes,2,rep,name=photos,proto3" json:"photos,omitempty"` } func (x *GetChildListByBusIDResponse) Reset() { @@ -436,6 +453,13 @@ func (x *GetChildListByBusIDResponse) GetChildren() []*Child { return nil } +func (x *GetChildListByBusIDResponse) GetPhotos() []*ChildPhoto { + if x != nil { + return x.Photos + } + return nil +} + var File_where_child_bus_v1_child_proto protoreflect.FileDescriptor var file_where_child_bus_v1_child_proto_rawDesc = []byte{ @@ -465,78 +489,88 @@ var file_where_child_bus_v1_child_proto_rawDesc = []byte{ 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x22, 0x58, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x42, 0x0a, 0x1f, 0x47, - 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, - 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, - 0x59, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x33, 0x0a, 0x1a, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, - 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, - 0x54, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, - 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x32, 0xf3, 0x03, 0x0a, 0x0c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x64, 0x22, 0x90, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, + 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, + 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, + 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x42, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x91, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, + 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x33, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, + 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, + 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, + 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, + 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, + 0x32, 0xf3, 0x03, 0x0a, 0x0c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x49, 0x44, 0x12, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, + 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x12, 0x2e, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, - 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, - 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xed, 0x01, 0x0a, 0x16, - 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, - 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, + 0x42, 0x75, 0x73, 0x49, 0x44, 0x12, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, + 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -563,26 +597,30 @@ var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ (*GetChildListByBusIDResponse)(nil), // 7: where_child_bus.v1.GetChildListByBusIDResponse (Sex)(0), // 8: where_child_bus.v1.Sex (*Child)(nil), // 9: where_child_bus.v1.Child + (*ChildPhoto)(nil), // 10: where_child_bus.v1.ChildPhoto } var file_where_child_bus_v1_child_proto_depIdxs = []int32{ - 8, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex - 9, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child - 9, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child - 9, // 3: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child - 9, // 4: where_child_bus.v1.GetChildListByBusIDResponse.children:type_name -> where_child_bus.v1.Child - 0, // 5: where_child_bus.v1.ChildService.CreateChild:input_type -> where_child_bus.v1.CreateChildRequest - 2, // 6: where_child_bus.v1.ChildService.GetChildListByNurseryID:input_type -> where_child_bus.v1.GetChildListByNurseryIDRequest - 4, // 7: where_child_bus.v1.ChildService.GetChildListByGuardianID:input_type -> where_child_bus.v1.GetChildListByGuardianIDRequest - 6, // 8: where_child_bus.v1.ChildService.GetChildListByBusID:input_type -> where_child_bus.v1.GetChildListByBusIDRequest - 1, // 9: where_child_bus.v1.ChildService.CreateChild:output_type -> where_child_bus.v1.CreateChildResponse - 3, // 10: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse - 5, // 11: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse - 7, // 12: where_child_bus.v1.ChildService.GetChildListByBusID:output_type -> where_child_bus.v1.GetChildListByBusIDResponse - 9, // [9:13] is the sub-list for method output_type - 5, // [5:9] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 8, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex + 9, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child + 9, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child + 10, // 3: where_child_bus.v1.GetChildListByNurseryIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 9, // 4: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child + 10, // 5: where_child_bus.v1.GetChildListByGuardianIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 9, // 6: where_child_bus.v1.GetChildListByBusIDResponse.children:type_name -> where_child_bus.v1.Child + 10, // 7: where_child_bus.v1.GetChildListByBusIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 0, // 8: where_child_bus.v1.ChildService.CreateChild:input_type -> where_child_bus.v1.CreateChildRequest + 2, // 9: where_child_bus.v1.ChildService.GetChildListByNurseryID:input_type -> where_child_bus.v1.GetChildListByNurseryIDRequest + 4, // 10: where_child_bus.v1.ChildService.GetChildListByGuardianID:input_type -> where_child_bus.v1.GetChildListByGuardianIDRequest + 6, // 11: where_child_bus.v1.ChildService.GetChildListByBusID:input_type -> where_child_bus.v1.GetChildListByBusIDRequest + 1, // 12: where_child_bus.v1.ChildService.CreateChild:output_type -> where_child_bus.v1.CreateChildResponse + 3, // 13: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse + 5, // 14: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse + 7, // 15: where_child_bus.v1.ChildService.GetChildListByBusID:output_type -> where_child_bus.v1.GetChildListByBusIDResponse + 12, // [12:16] is the sub-list for method output_type + 8, // [8:12] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_where_child_bus_v1_child_proto_init() } diff --git a/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go index 9e15f136..a7c182f9 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child_photo.pb.go @@ -232,6 +232,155 @@ func (x *DeleteChildPhotoResponse) GetIds() []string { return nil } +type GetChildPhotoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChildId string `protobuf:"bytes,1,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` +} + +func (x *GetChildPhotoRequest) Reset() { + *x = GetChildPhotoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChildPhotoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChildPhotoRequest) ProtoMessage() {} + +func (x *GetChildPhotoRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChildPhotoRequest.ProtoReflect.Descriptor instead. +func (*GetChildPhotoRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{4} +} + +func (x *GetChildPhotoRequest) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +type ChildPhotoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChildPhotoId string `protobuf:"bytes,1,opt,name=child_photo_id,json=childPhotoId,proto3" json:"child_photo_id,omitempty"` + Photo []byte `protobuf:"bytes,2,opt,name=photo,proto3" json:"photo,omitempty"` +} + +func (x *ChildPhotoResponse) Reset() { + *x = ChildPhotoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChildPhotoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChildPhotoResponse) ProtoMessage() {} + +func (x *ChildPhotoResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChildPhotoResponse.ProtoReflect.Descriptor instead. +func (*ChildPhotoResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{5} +} + +func (x *ChildPhotoResponse) GetChildPhotoId() string { + if x != nil { + return x.ChildPhotoId + } + return "" +} + +func (x *ChildPhotoResponse) GetPhoto() []byte { + if x != nil { + return x.Photo + } + return nil +} + +type GetChildPhotoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChildPhotos []*ChildPhotoResponse `protobuf:"bytes,1,rep,name=child_photos,json=childPhotos,proto3" json:"child_photos,omitempty"` +} + +func (x *GetChildPhotoResponse) Reset() { + *x = GetChildPhotoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChildPhotoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChildPhotoResponse) ProtoMessage() {} + +func (x *GetChildPhotoResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_photo_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChildPhotoResponse.ProtoReflect.Descriptor instead. +func (*GetChildPhotoResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_photo_proto_rawDescGZIP(), []int{6} +} + +func (x *GetChildPhotoResponse) GetChildPhotos() []*ChildPhotoResponse { + if x != nil { + return x.ChildPhotos + } + return nil +} + var File_where_child_bus_v1_child_photo_proto protoreflect.FileDescriptor var file_where_child_bus_v1_child_photo_proto_rawDesc = []byte{ @@ -259,38 +408,59 @@ var file_where_child_bus_v1_child_photo_proto_rawDesc = []byte{ 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, - 0x73, 0x32, 0xf1, 0x01, 0x0a, 0x11, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x10, 0x44, 0x75, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2b, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x75, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf2, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x42, 0x0f, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, - 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, - 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, - 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x22, 0x31, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, + 0x74, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x12, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, + 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x49, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x22, 0x62, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x49, 0x0a, 0x0c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0b, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x32, 0xd7, 0x02, 0x0a, 0x11, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x6d, 0x0a, 0x10, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x6d, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, + 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, + 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, + 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, + 0x74, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf2, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x0f, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, + 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, + 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, + 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -305,23 +475,29 @@ func file_where_child_bus_v1_child_photo_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_child_photo_proto_rawDescData } -var file_where_child_bus_v1_child_photo_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_where_child_bus_v1_child_photo_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_where_child_bus_v1_child_photo_proto_goTypes = []interface{}{ (*DuplicationCheckRequest)(nil), // 0: where_child_bus.v1.DuplicationCheckRequest (*DuplicationCheckResponse)(nil), // 1: where_child_bus.v1.DuplicationCheckResponse (*DeleteChildPhotoRequest)(nil), // 2: where_child_bus.v1.DeleteChildPhotoRequest (*DeleteChildPhotoResponse)(nil), // 3: where_child_bus.v1.DeleteChildPhotoResponse + (*GetChildPhotoRequest)(nil), // 4: where_child_bus.v1.GetChildPhotoRequest + (*ChildPhotoResponse)(nil), // 5: where_child_bus.v1.ChildPhotoResponse + (*GetChildPhotoResponse)(nil), // 6: where_child_bus.v1.GetChildPhotoResponse } var file_where_child_bus_v1_child_photo_proto_depIdxs = []int32{ - 0, // 0: where_child_bus.v1.ChildPhotoService.DuplicationCheck:input_type -> where_child_bus.v1.DuplicationCheckRequest - 2, // 1: where_child_bus.v1.ChildPhotoService.DeleteChildPhoto:input_type -> where_child_bus.v1.DeleteChildPhotoRequest - 1, // 2: where_child_bus.v1.ChildPhotoService.DuplicationCheck:output_type -> where_child_bus.v1.DuplicationCheckResponse - 3, // 3: where_child_bus.v1.ChildPhotoService.DeleteChildPhoto:output_type -> where_child_bus.v1.DeleteChildPhotoResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 5, // 0: where_child_bus.v1.GetChildPhotoResponse.child_photos:type_name -> where_child_bus.v1.ChildPhotoResponse + 0, // 1: where_child_bus.v1.ChildPhotoService.DuplicationCheck:input_type -> where_child_bus.v1.DuplicationCheckRequest + 2, // 2: where_child_bus.v1.ChildPhotoService.DeleteChildPhoto:input_type -> where_child_bus.v1.DeleteChildPhotoRequest + 4, // 3: where_child_bus.v1.ChildPhotoService.GetChildPhoto:input_type -> where_child_bus.v1.GetChildPhotoRequest + 1, // 4: where_child_bus.v1.ChildPhotoService.DuplicationCheck:output_type -> where_child_bus.v1.DuplicationCheckResponse + 3, // 5: where_child_bus.v1.ChildPhotoService.DeleteChildPhoto:output_type -> where_child_bus.v1.DeleteChildPhotoResponse + 6, // 6: where_child_bus.v1.ChildPhotoService.GetChildPhoto:output_type -> where_child_bus.v1.GetChildPhotoResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_where_child_bus_v1_child_photo_proto_init() } @@ -378,6 +554,42 @@ func file_where_child_bus_v1_child_photo_proto_init() { return nil } } + file_where_child_bus_v1_child_photo_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChildPhotoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_photo_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChildPhotoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_photo_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChildPhotoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -385,7 +597,7 @@ func file_where_child_bus_v1_child_photo_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_child_photo_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go index f32d2441..fa22f481 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child_photo_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( ChildPhotoService_DuplicationCheck_FullMethodName = "/where_child_bus.v1.ChildPhotoService/DuplicationCheck" ChildPhotoService_DeleteChildPhoto_FullMethodName = "/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto" + ChildPhotoService_GetChildPhoto_FullMethodName = "/where_child_bus.v1.ChildPhotoService/GetChildPhoto" ) // ChildPhotoServiceClient is the client API for ChildPhotoService service. @@ -29,6 +30,7 @@ const ( type ChildPhotoServiceClient interface { DuplicationCheck(ctx context.Context, in *DuplicationCheckRequest, opts ...grpc.CallOption) (*DuplicationCheckResponse, error) DeleteChildPhoto(ctx context.Context, in *DeleteChildPhotoRequest, opts ...grpc.CallOption) (*DeleteChildPhotoResponse, error) + GetChildPhoto(ctx context.Context, in *GetChildPhotoRequest, opts ...grpc.CallOption) (*GetChildPhotoResponse, error) } type childPhotoServiceClient struct { @@ -57,12 +59,22 @@ func (c *childPhotoServiceClient) DeleteChildPhoto(ctx context.Context, in *Dele return out, nil } +func (c *childPhotoServiceClient) GetChildPhoto(ctx context.Context, in *GetChildPhotoRequest, opts ...grpc.CallOption) (*GetChildPhotoResponse, error) { + out := new(GetChildPhotoResponse) + err := c.cc.Invoke(ctx, ChildPhotoService_GetChildPhoto_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ChildPhotoServiceServer is the server API for ChildPhotoService service. // All implementations should embed UnimplementedChildPhotoServiceServer // for forward compatibility type ChildPhotoServiceServer interface { DuplicationCheck(context.Context, *DuplicationCheckRequest) (*DuplicationCheckResponse, error) DeleteChildPhoto(context.Context, *DeleteChildPhotoRequest) (*DeleteChildPhotoResponse, error) + GetChildPhoto(context.Context, *GetChildPhotoRequest) (*GetChildPhotoResponse, error) } // UnimplementedChildPhotoServiceServer should be embedded to have forward compatible implementations. @@ -75,6 +87,9 @@ func (UnimplementedChildPhotoServiceServer) DuplicationCheck(context.Context, *D func (UnimplementedChildPhotoServiceServer) DeleteChildPhoto(context.Context, *DeleteChildPhotoRequest) (*DeleteChildPhotoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteChildPhoto not implemented") } +func (UnimplementedChildPhotoServiceServer) GetChildPhoto(context.Context, *GetChildPhotoRequest) (*GetChildPhotoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChildPhoto not implemented") +} // UnsafeChildPhotoServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ChildPhotoServiceServer will @@ -123,6 +138,24 @@ func _ChildPhotoService_DeleteChildPhoto_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _ChildPhotoService_GetChildPhoto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetChildPhotoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChildPhotoServiceServer).GetChildPhoto(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChildPhotoService_GetChildPhoto_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChildPhotoServiceServer).GetChildPhoto(ctx, req.(*GetChildPhotoRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ChildPhotoService_ServiceDesc is the grpc.ServiceDesc for ChildPhotoService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -138,6 +171,10 @@ var ChildPhotoService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DeleteChildPhoto", Handler: _ChildPhotoService_DeleteChildPhoto_Handler, }, + { + MethodName: "GetChildPhoto", + Handler: _ChildPhotoService_GetChildPhoto_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/child_photo.proto", diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index ba6d06d0..346606dd 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -1192,8 +1192,9 @@ type ChildPhoto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Photo []byte `protobuf:"bytes,3,opt,name=photo,proto3" json:"photo,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *ChildPhoto) Reset() { @@ -1242,6 +1243,13 @@ func (x *ChildPhoto) GetChildId() string { return "" } +func (x *ChildPhoto) GetPhoto() []byte { + if x != nil { + return x.Photo + } + return nil +} + func (x *ChildPhoto) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -1525,66 +1533,67 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xad, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x39, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, - 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, - 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, - 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x56, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, - 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x44, 0x45, 0x4f, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, - 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, - 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, - 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, - 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, - 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, - 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, - 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, - 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, + 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, + 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, + 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, + 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x56, 0x0a, + 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, + 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, + 0x12, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, + 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, + 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, + 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, + 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, + 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, + 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, + 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index b5151868..80b0b9af 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -185,6 +185,7 @@ type GetStationListByBusIdResponse struct { Stations []*Station `protobuf:"bytes,1,rep,name=stations,proto3" json:"stations,omitempty"` Guardians []*GuardianResponse `protobuf:"bytes,2,rep,name=guardians,proto3" json:"guardians,omitempty"` Children []*Child `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty"` + Photos []*ChildPhoto `protobuf:"bytes,4,rep,name=photos,proto3" json:"photos,omitempty"` } func (x *GetStationListByBusIdResponse) Reset() { @@ -240,6 +241,13 @@ func (x *GetStationListByBusIdResponse) GetChildren() []*Child { return nil } +func (x *GetStationListByBusIdResponse) GetPhotos() []*ChildPhoto { + if x != nil { + return x.Photos + } + return nil +} + var File_where_child_bus_v1_station_proto protoreflect.FileDescriptor var file_where_child_bus_v1_station_proto_rawDesc = []byte{ @@ -264,7 +272,7 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x1c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x49, 0x64, 0x22, 0xd3, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x49, 0x64, 0x22, 0x8b, 0x02, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, @@ -277,38 +285,42 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x61, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x32, 0xf4, 0x01, 0x0a, 0x0e, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, - 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, - 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, - 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, + 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, + 0x6f, 0x73, 0x32, 0xf4, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, + 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, + 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, + 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -332,21 +344,23 @@ var file_where_child_bus_v1_station_proto_goTypes = []interface{}{ (*Station)(nil), // 4: where_child_bus.v1.Station (*GuardianResponse)(nil), // 5: where_child_bus.v1.GuardianResponse (*Child)(nil), // 6: where_child_bus.v1.Child + (*ChildPhoto)(nil), // 7: where_child_bus.v1.ChildPhoto } var file_where_child_bus_v1_station_proto_depIdxs = []int32{ 4, // 0: where_child_bus.v1.UpdateStationResponse.station:type_name -> where_child_bus.v1.Station 4, // 1: where_child_bus.v1.GetStationListByBusIdResponse.stations:type_name -> where_child_bus.v1.Station 5, // 2: where_child_bus.v1.GetStationListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse 6, // 3: where_child_bus.v1.GetStationListByBusIdResponse.children:type_name -> where_child_bus.v1.Child - 0, // 4: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest - 2, // 5: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest - 1, // 6: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse - 3, // 7: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse - 6, // [6:8] is the sub-list for method output_type - 4, // [4:6] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 7, // 4: where_child_bus.v1.GetStationListByBusIdResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 0, // 5: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest + 2, // 6: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest + 1, // 7: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse + 3, // 8: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse + 7, // [7:9] is the sub-list for method output_type + 5, // [5:7] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_where_child_bus_v1_station_proto_init() } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index d5241a22..866f4020 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -11,24 +11,33 @@ import 'dart:core' as $core; +import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; +import 'machine_learning.pbenum.dart'; + +export 'machine_learning.pbenum.dart'; + class TrainRequest extends $pb.GeneratedMessage { factory TrainRequest({ $core.String? nurseryId, - $core.Iterable<$core.String>? childId, $core.String? busId, + $core.Iterable<$core.String>? childIds, + BusType? busType, }) { final $result = create(); if (nurseryId != null) { $result.nurseryId = nurseryId; } - if (childId != null) { - $result.childId.addAll(childId); - } if (busId != null) { $result.busId = busId; } + if (childIds != null) { + $result.childIds.addAll(childIds); + } + if (busType != null) { + $result.busType = busType; + } return $result; } TrainRequest._() : super(); @@ -37,8 +46,9 @@ class TrainRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TrainRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'nurseryId') - ..pPS(2, _omitFieldNames ? '' : 'childId') - ..aOS(3, _omitFieldNames ? '' : 'busId') + ..aOS(2, _omitFieldNames ? '' : 'busId') + ..pPS(3, _omitFieldNames ? '' : 'childIds') + ..e(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: BusType.BUS_TYPE_UNSPECIFIED, valueOf: BusType.valueOf, enumValues: BusType.values) ..hasRequiredFields = false ; @@ -73,16 +83,25 @@ class TrainRequest extends $pb.GeneratedMessage { void clearNurseryId() => clearField(1); @$pb.TagNumber(2) - $core.List<$core.String> get childId => $_getList(1); + $core.String get busId => $_getSZ(1); + @$pb.TagNumber(2) + set busId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasBusId() => $_has(1); + @$pb.TagNumber(2) + void clearBusId() => clearField(2); @$pb.TagNumber(3) - $core.String get busId => $_getSZ(2); - @$pb.TagNumber(3) - set busId($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasBusId() => $_has(2); - @$pb.TagNumber(3) - void clearBusId() => clearField(3); + $core.List<$core.String> get childIds => $_getList(2); + + @$pb.TagNumber(4) + BusType get busType => $_getN(3); + @$pb.TagNumber(4) + set busType(BusType v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasBusType() => $_has(3); + @$pb.TagNumber(4) + void clearBusType() => clearField(4); } class TrainResponse extends $pb.GeneratedMessage { @@ -138,11 +157,27 @@ class TrainResponse extends $pb.GeneratedMessage { class PredRequest extends $pb.GeneratedMessage { factory PredRequest({ $core.String? busId, + BusType? busType, + VideoType? videoType, + $core.List<$core.int>? videoChunk, + $fixnum.Int64? timestamp, }) { final $result = create(); if (busId != null) { $result.busId = busId; } + if (busType != null) { + $result.busType = busType; + } + if (videoType != null) { + $result.videoType = videoType; + } + if (videoChunk != null) { + $result.videoChunk = videoChunk; + } + if (timestamp != null) { + $result.timestamp = timestamp; + } return $result; } PredRequest._() : super(); @@ -151,6 +186,10 @@ class PredRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PredRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') + ..e(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: BusType.BUS_TYPE_UNSPECIFIED, valueOf: BusType.valueOf, enumValues: BusType.values) + ..e(3, _omitFieldNames ? '' : 'videoType', $pb.PbFieldType.OE, defaultOrMaker: VideoType.VIDEO_TYPE_UNSPECIFIED, valueOf: VideoType.valueOf, enumValues: VideoType.values) + ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) + ..aInt64(5, _omitFieldNames ? '' : 'timestamp') ..hasRequiredFields = false ; @@ -183,6 +222,42 @@ class PredRequest extends $pb.GeneratedMessage { $core.bool hasBusId() => $_has(0); @$pb.TagNumber(1) void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + BusType get busType => $_getN(1); + @$pb.TagNumber(2) + set busType(BusType v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasBusType() => $_has(1); + @$pb.TagNumber(2) + void clearBusType() => clearField(2); + + @$pb.TagNumber(3) + VideoType get videoType => $_getN(2); + @$pb.TagNumber(3) + set videoType(VideoType v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasVideoType() => $_has(2); + @$pb.TagNumber(3) + void clearVideoType() => clearField(3); + + @$pb.TagNumber(4) + $core.List<$core.int> get videoChunk => $_getN(3); + @$pb.TagNumber(4) + set videoChunk($core.List<$core.int> v) { $_setBytes(3, v); } + @$pb.TagNumber(4) + $core.bool hasVideoChunk() => $_has(3); + @$pb.TagNumber(4) + void clearVideoChunk() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get timestamp => $_getI64(4); + @$pb.TagNumber(5) + set timestamp($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasTimestamp() => $_has(4); + @$pb.TagNumber(5) + void clearTimestamp() => clearField(5); } class PredResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart index 2e7d3a99..5e3f9985 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart @@ -9,3 +9,43 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class BusType extends $pb.ProtobufEnum { + static const BusType BUS_TYPE_UNSPECIFIED = BusType._(0, _omitEnumNames ? '' : 'BUS_TYPE_UNSPECIFIED'); + static const BusType BUS_TYPE_MORNING = BusType._(1, _omitEnumNames ? '' : 'BUS_TYPE_MORNING'); + static const BusType BUS_TYPE_EVENING = BusType._(2, _omitEnumNames ? '' : 'BUS_TYPE_EVENING'); + + static const $core.List values = [ + BUS_TYPE_UNSPECIFIED, + BUS_TYPE_MORNING, + BUS_TYPE_EVENING, + ]; + + static final $core.Map<$core.int, BusType> _byValue = $pb.ProtobufEnum.initByValue(values); + static BusType? valueOf($core.int value) => _byValue[value]; + + const BusType._($core.int v, $core.String n) : super(v, n); +} + +class VideoType extends $pb.ProtobufEnum { + static const VideoType VIDEO_TYPE_UNSPECIFIED = VideoType._(0, _omitEnumNames ? '' : 'VIDEO_TYPE_UNSPECIFIED'); + static const VideoType VIDEO_TYPE_GET_ON = VideoType._(1, _omitEnumNames ? '' : 'VIDEO_TYPE_GET_ON'); + static const VideoType VIDEO_TYPE_GET_OFF = VideoType._(2, _omitEnumNames ? '' : 'VIDEO_TYPE_GET_OFF'); + + static const $core.List values = [ + VIDEO_TYPE_UNSPECIFIED, + VIDEO_TYPE_GET_ON, + VIDEO_TYPE_GET_OFF, + ]; + + static final $core.Map<$core.int, VideoType> _byValue = $pb.ProtobufEnum.initByValue(values); + static VideoType? valueOf($core.int value) => _byValue[value]; + + const VideoType._($core.int v, $core.String n) : super(v, n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index 0e7fe04d..c077ec34 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -13,20 +13,52 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use busTypeDescriptor instead') +const BusType$json = { + '1': 'BusType', + '2': [ + {'1': 'BUS_TYPE_UNSPECIFIED', '2': 0}, + {'1': 'BUS_TYPE_MORNING', '2': 1}, + {'1': 'BUS_TYPE_EVENING', '2': 2}, + ], +}; + +/// Descriptor for `BusType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List busTypeDescriptor = $convert.base64Decode( + 'CgdCdXNUeXBlEhgKFEJVU19UWVBFX1VOU1BFQ0lGSUVEEAASFAoQQlVTX1RZUEVfTU9STklORx' + 'ABEhQKEEJVU19UWVBFX0VWRU5JTkcQAg=='); + +@$core.Deprecated('Use videoTypeDescriptor instead') +const VideoType$json = { + '1': 'VideoType', + '2': [ + {'1': 'VIDEO_TYPE_UNSPECIFIED', '2': 0}, + {'1': 'VIDEO_TYPE_GET_ON', '2': 1}, + {'1': 'VIDEO_TYPE_GET_OFF', '2': 2}, + ], +}; + +/// Descriptor for `VideoType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List videoTypeDescriptor = $convert.base64Decode( + 'CglWaWRlb1R5cGUSGgoWVklERU9fVFlQRV9VTlNQRUNJRklFRBAAEhUKEVZJREVPX1RZUEVfR0' + 'VUX09OEAESFgoSVklERU9fVFlQRV9HRVRfT0ZGEAI='); + @$core.Deprecated('Use trainRequestDescriptor instead') const TrainRequest$json = { '1': 'TrainRequest', '2': [ {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, - {'1': 'child_id', '3': 2, '4': 3, '5': 9, '10': 'childId'}, - {'1': 'bus_id', '3': 3, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'bus_id', '3': 2, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'child_ids', '3': 3, '4': 3, '5': 9, '10': 'childIds'}, + {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.machine_learning.v1.BusType', '10': 'busType'}, ], }; /// Descriptor for `TrainRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List trainRequestDescriptor = $convert.base64Decode( - 'CgxUcmFpblJlcXVlc3QSHQoKbnVyc2VyeV9pZBgBIAEoCVIJbnVyc2VyeUlkEhkKCGNoaWxkX2' - 'lkGAIgAygJUgdjaGlsZElkEhUKBmJ1c19pZBgDIAEoCVIFYnVzSWQ='); + 'CgxUcmFpblJlcXVlc3QSHQoKbnVyc2VyeV9pZBgBIAEoCVIJbnVyc2VyeUlkEhUKBmJ1c19pZB' + 'gCIAEoCVIFYnVzSWQSGwoJY2hpbGRfaWRzGAMgAygJUghjaGlsZElkcxI3CghidXNfdHlwZRgE' + 'IAEoDjIcLm1hY2hpbmVfbGVhcm5pbmcudjEuQnVzVHlwZVIHYnVzVHlwZQ=='); @$core.Deprecated('Use trainResponseDescriptor instead') const TrainResponse$json = { @@ -45,12 +77,19 @@ const PredRequest$json = { '1': 'PredRequest', '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'bus_type', '3': 2, '4': 1, '5': 14, '6': '.machine_learning.v1.BusType', '10': 'busType'}, + {'1': 'video_type', '3': 3, '4': 1, '5': 14, '6': '.machine_learning.v1.VideoType', '10': 'videoType'}, + {'1': 'video_chunk', '3': 4, '4': 1, '5': 12, '10': 'videoChunk'}, + {'1': 'timestamp', '3': 5, '4': 1, '5': 3, '10': 'timestamp'}, ], }; /// Descriptor for `PredRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List predRequestDescriptor = $convert.base64Decode( - 'CgtQcmVkUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lk'); + 'CgtQcmVkUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lkEjcKCGJ1c190eXBlGAIgASgOMh' + 'wubWFjaGluZV9sZWFybmluZy52MS5CdXNUeXBlUgdidXNUeXBlEj0KCnZpZGVvX3R5cGUYAyAB' + 'KA4yHi5tYWNoaW5lX2xlYXJuaW5nLnYxLlZpZGVvVHlwZVIJdmlkZW9UeXBlEh8KC3ZpZGVvX2' + 'NodW5rGAQgASgMUgp2aWRlb0NodW5rEhwKCXRpbWVzdGFtcBgFIAEoA1IJdGltZXN0YW1w'); @$core.Deprecated('Use predResponseDescriptor instead') const PredResponse$json = { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index b6097d33..ef71032c 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -643,6 +643,7 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { class StreamBusVideoRequest extends $pb.GeneratedMessage { factory StreamBusVideoRequest({ $core.String? busId, + $8.BusType? busType, $8.VideoType? videoType, $core.List<$core.int>? videoChunk, $fixnum.Int64? timestamp, @@ -651,6 +652,9 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { if (busId != null) { $result.busId = busId; } + if (busType != null) { + $result.busType = busType; + } if (videoType != null) { $result.videoType = videoType; } @@ -668,9 +672,10 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StreamBusVideoRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') - ..e<$8.VideoType>(2, _omitFieldNames ? '' : 'videoType', $pb.PbFieldType.OE, defaultOrMaker: $8.VideoType.VIDEO_TYPE_UNSPECIFIED, valueOf: $8.VideoType.valueOf, enumValues: $8.VideoType.values) - ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) - ..aInt64(4, _omitFieldNames ? '' : 'timestamp') + ..e<$8.BusType>(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) + ..e<$8.VideoType>(3, _omitFieldNames ? '' : 'videoType', $pb.PbFieldType.OE, defaultOrMaker: $8.VideoType.VIDEO_TYPE_UNSPECIFIED, valueOf: $8.VideoType.valueOf, enumValues: $8.VideoType.values) + ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) + ..aInt64(5, _omitFieldNames ? '' : 'timestamp') ..hasRequiredFields = false ; @@ -705,31 +710,40 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { void clearBusId() => clearField(1); @$pb.TagNumber(2) - $8.VideoType get videoType => $_getN(1); + $8.BusType get busType => $_getN(1); @$pb.TagNumber(2) - set videoType($8.VideoType v) { setField(2, v); } + set busType($8.BusType v) { setField(2, v); } @$pb.TagNumber(2) - $core.bool hasVideoType() => $_has(1); + $core.bool hasBusType() => $_has(1); @$pb.TagNumber(2) - void clearVideoType() => clearField(2); + void clearBusType() => clearField(2); @$pb.TagNumber(3) - $core.List<$core.int> get videoChunk => $_getN(2); + $8.VideoType get videoType => $_getN(2); @$pb.TagNumber(3) - set videoChunk($core.List<$core.int> v) { $_setBytes(2, v); } + set videoType($8.VideoType v) { setField(3, v); } @$pb.TagNumber(3) - $core.bool hasVideoChunk() => $_has(2); + $core.bool hasVideoType() => $_has(2); @$pb.TagNumber(3) - void clearVideoChunk() => clearField(3); + void clearVideoType() => clearField(3); @$pb.TagNumber(4) - $fixnum.Int64 get timestamp => $_getI64(3); + $core.List<$core.int> get videoChunk => $_getN(3); @$pb.TagNumber(4) - set timestamp($fixnum.Int64 v) { $_setInt64(3, v); } + set videoChunk($core.List<$core.int> v) { $_setBytes(3, v); } @$pb.TagNumber(4) - $core.bool hasTimestamp() => $_has(3); + $core.bool hasVideoChunk() => $_has(3); @$pb.TagNumber(4) - void clearTimestamp() => clearField(4); + void clearVideoChunk() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get timestamp => $_getI64(4); + @$pb.TagNumber(5) + set timestamp($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasTimestamp() => $_has(4); + @$pb.TagNumber(5) + void clearTimestamp() => clearField(5); } class StreamBusVideoResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index c89b69b3..9754313c 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -158,18 +158,20 @@ const StreamBusVideoRequest$json = { '1': 'StreamBusVideoRequest', '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'video_type', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.VideoType', '10': 'videoType'}, - {'1': 'video_chunk', '3': 3, '4': 1, '5': 12, '10': 'videoChunk'}, - {'1': 'timestamp', '3': 4, '4': 1, '5': 3, '10': 'timestamp'}, + {'1': 'bus_type', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, + {'1': 'video_type', '3': 3, '4': 1, '5': 14, '6': '.where_child_bus.v1.VideoType', '10': 'videoType'}, + {'1': 'video_chunk', '3': 4, '4': 1, '5': 12, '10': 'videoChunk'}, + {'1': 'timestamp', '3': 5, '4': 1, '5': 3, '10': 'timestamp'}, ], }; /// Descriptor for `StreamBusVideoRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Decode( - 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI8Cgp2aWRlb1' - '90eXBlGAIgASgOMh0ud2hlcmVfY2hpbGRfYnVzLnYxLlZpZGVvVHlwZVIJdmlkZW9UeXBlEh8K' - 'C3ZpZGVvX2NodW5rGAMgASgMUgp2aWRlb0NodW5rEhwKCXRpbWVzdGFtcBgEIAEoA1IJdGltZX' - 'N0YW1w'); + 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI2CghidXNfdH' + 'lwZRgCIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBlEjwKCnZpZGVv' + 'X3R5cGUYAyABKA4yHS53aGVyZV9jaGlsZF9idXMudjEuVmlkZW9UeXBlUgl2aWRlb1R5cGUSHw' + 'oLdmlkZW9fY2h1bmsYBCABKAxSCnZpZGVvQ2h1bmsSHAoJdGltZXN0YW1wGAUgASgDUgl0aW1l' + 'c3RhbXA='); @$core.Deprecated('Use streamBusVideoResponseDescriptor instead') const StreamBusVideoResponse$json = { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart index 764ef6bb..889bdf38 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -235,11 +235,15 @@ class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse({ $core.Iterable<$8.Child>? children, + $core.Iterable<$8.ChildPhoto>? photos, }) { final $result = create(); if (children != null) { $result.children.addAll(children); } + if (photos != null) { + $result.photos.addAll(photos); + } return $result; } GetChildListByNurseryIDResponse._() : super(); @@ -248,6 +252,7 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByNurseryIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) + ..pc<$8.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $8.ChildPhoto.create) ..hasRequiredFields = false ; @@ -274,6 +279,9 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.List<$8.Child> get children => $_getList(0); + + @$pb.TagNumber(2) + $core.List<$8.ChildPhoto> get photos => $_getList(1); } class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { @@ -329,11 +337,15 @@ class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse({ $core.Iterable<$8.Child>? children, + $core.Iterable<$8.ChildPhoto>? photos, }) { final $result = create(); if (children != null) { $result.children.addAll(children); } + if (photos != null) { + $result.photos.addAll(photos); + } return $result; } GetChildListByGuardianIDResponse._() : super(); @@ -342,6 +354,7 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByGuardianIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) + ..pc<$8.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $8.ChildPhoto.create) ..hasRequiredFields = false ; @@ -368,6 +381,9 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.List<$8.Child> get children => $_getList(0); + + @$pb.TagNumber(2) + $core.List<$8.ChildPhoto> get photos => $_getList(1); } class GetChildListByBusIDRequest extends $pb.GeneratedMessage { @@ -423,11 +439,15 @@ class GetChildListByBusIDRequest extends $pb.GeneratedMessage { class GetChildListByBusIDResponse extends $pb.GeneratedMessage { factory GetChildListByBusIDResponse({ $core.Iterable<$8.Child>? children, + $core.Iterable<$8.ChildPhoto>? photos, }) { final $result = create(); if (children != null) { $result.children.addAll(children); } + if (photos != null) { + $result.photos.addAll(photos); + } return $result; } GetChildListByBusIDResponse._() : super(); @@ -436,6 +456,7 @@ class GetChildListByBusIDResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByBusIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) + ..pc<$8.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $8.ChildPhoto.create) ..hasRequiredFields = false ; @@ -462,6 +483,9 @@ class GetChildListByBusIDResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.List<$8.Child> get children => $_getList(0); + + @$pb.TagNumber(2) + $core.List<$8.ChildPhoto> get photos => $_getList(1); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart index d18144df..17a3fcca 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -64,13 +64,15 @@ const GetChildListByNurseryIDResponse$json = { '1': 'GetChildListByNurseryIDResponse', '2': [ {'1': 'children', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + {'1': 'photos', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.ChildPhoto', '10': 'photos'}, ], }; /// Descriptor for `GetChildListByNurseryIDResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getChildListByNurseryIDResponseDescriptor = $convert.base64Decode( 'Ch9HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEjUKCGNoaWxkcmVuGAEgAygLMhkud2' - 'hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJlbg=='); + 'hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJlbhI2CgZwaG90b3MYAiADKAsyHi53aGVy' + 'ZV9jaGlsZF9idXMudjEuQ2hpbGRQaG90b1IGcGhvdG9z'); @$core.Deprecated('Use getChildListByGuardianIDRequestDescriptor instead') const GetChildListByGuardianIDRequest$json = { @@ -90,13 +92,15 @@ const GetChildListByGuardianIDResponse$json = { '1': 'GetChildListByGuardianIDResponse', '2': [ {'1': 'children', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + {'1': 'photos', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.ChildPhoto', '10': 'photos'}, ], }; /// Descriptor for `GetChildListByGuardianIDResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getChildListByGuardianIDResponseDescriptor = $convert.base64Decode( 'CiBHZXRDaGlsZExpc3RCeUd1YXJkaWFuSURSZXNwb25zZRI1CghjaGlsZHJlbhgBIAMoCzIZLn' - 'doZXJlX2NoaWxkX2J1cy52MS5DaGlsZFIIY2hpbGRyZW4='); + 'doZXJlX2NoaWxkX2J1cy52MS5DaGlsZFIIY2hpbGRyZW4SNgoGcGhvdG9zGAIgAygLMh4ud2hl' + 'cmVfY2hpbGRfYnVzLnYxLkNoaWxkUGhvdG9SBnBob3Rvcw=='); @$core.Deprecated('Use getChildListByBusIDRequestDescriptor instead') const GetChildListByBusIDRequest$json = { @@ -115,11 +119,13 @@ const GetChildListByBusIDResponse$json = { '1': 'GetChildListByBusIDResponse', '2': [ {'1': 'children', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + {'1': 'photos', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.ChildPhoto', '10': 'photos'}, ], }; /// Descriptor for `GetChildListByBusIDResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getChildListByBusIDResponseDescriptor = $convert.base64Decode( 'ChtHZXRDaGlsZExpc3RCeUJ1c0lEUmVzcG9uc2USNQoIY2hpbGRyZW4YASADKAsyGS53aGVyZV' - '9jaGlsZF9idXMudjEuQ2hpbGRSCGNoaWxkcmVu'); + '9jaGlsZF9idXMudjEuQ2hpbGRSCGNoaWxkcmVuEjYKBnBob3RvcxgCIAMoCzIeLndoZXJlX2No' + 'aWxkX2J1cy52MS5DaGlsZFBob3RvUgZwaG90b3M='); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart index 1017ce19..ae735096 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pb.dart @@ -219,6 +219,164 @@ class DeleteChildPhotoResponse extends $pb.GeneratedMessage { $core.List<$core.String> get ids => $_getList(1); } +class GetChildPhotoRequest extends $pb.GeneratedMessage { + factory GetChildPhotoRequest({ + $core.String? childId, + }) { + final $result = create(); + if (childId != null) { + $result.childId = childId; + } + return $result; + } + GetChildPhotoRequest._() : super(); + factory GetChildPhotoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetChildPhotoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildPhotoRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'childId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetChildPhotoRequest clone() => GetChildPhotoRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetChildPhotoRequest copyWith(void Function(GetChildPhotoRequest) updates) => super.copyWith((message) => updates(message as GetChildPhotoRequest)) as GetChildPhotoRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetChildPhotoRequest create() => GetChildPhotoRequest._(); + GetChildPhotoRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetChildPhotoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetChildPhotoRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get childId => $_getSZ(0); + @$pb.TagNumber(1) + set childId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasChildId() => $_has(0); + @$pb.TagNumber(1) + void clearChildId() => clearField(1); +} + +class ChildPhotoResponse extends $pb.GeneratedMessage { + factory ChildPhotoResponse({ + $core.String? childPhotoId, + $core.List<$core.int>? photo, + }) { + final $result = create(); + if (childPhotoId != null) { + $result.childPhotoId = childPhotoId; + } + if (photo != null) { + $result.photo = photo; + } + return $result; + } + ChildPhotoResponse._() : super(); + factory ChildPhotoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ChildPhotoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildPhotoResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'childPhotoId') + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'photo', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ChildPhotoResponse clone() => ChildPhotoResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ChildPhotoResponse copyWith(void Function(ChildPhotoResponse) updates) => super.copyWith((message) => updates(message as ChildPhotoResponse)) as ChildPhotoResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ChildPhotoResponse create() => ChildPhotoResponse._(); + ChildPhotoResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ChildPhotoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ChildPhotoResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get childPhotoId => $_getSZ(0); + @$pb.TagNumber(1) + set childPhotoId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasChildPhotoId() => $_has(0); + @$pb.TagNumber(1) + void clearChildPhotoId() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.int> get photo => $_getN(1); + @$pb.TagNumber(2) + set photo($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasPhoto() => $_has(1); + @$pb.TagNumber(2) + void clearPhoto() => clearField(2); +} + +class GetChildPhotoResponse extends $pb.GeneratedMessage { + factory GetChildPhotoResponse({ + $core.Iterable? childPhotos, + }) { + final $result = create(); + if (childPhotos != null) { + $result.childPhotos.addAll(childPhotos); + } + return $result; + } + GetChildPhotoResponse._() : super(); + factory GetChildPhotoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetChildPhotoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildPhotoResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'childPhotos', $pb.PbFieldType.PM, subBuilder: ChildPhotoResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetChildPhotoResponse clone() => GetChildPhotoResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetChildPhotoResponse copyWith(void Function(GetChildPhotoResponse) updates) => super.copyWith((message) => updates(message as GetChildPhotoResponse)) as GetChildPhotoResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetChildPhotoResponse create() => GetChildPhotoResponse._(); + GetChildPhotoResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetChildPhotoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetChildPhotoResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get childPhotos => $_getList(0); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart index a320d57c..e1f7b94d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart @@ -29,6 +29,10 @@ class ChildPhotoServiceClient extends $grpc.Client { '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', ($2.DeleteChildPhotoRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $2.DeleteChildPhotoResponse.fromBuffer(value)); + static final _$getChildPhoto = $grpc.ClientMethod<$2.GetChildPhotoRequest, $2.GetChildPhotoResponse>( + '/where_child_bus.v1.ChildPhotoService/GetChildPhoto', + ($2.GetChildPhotoRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.GetChildPhotoResponse.fromBuffer(value)); ChildPhotoServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -43,6 +47,10 @@ class ChildPhotoServiceClient extends $grpc.Client { $grpc.ResponseFuture<$2.DeleteChildPhotoResponse> deleteChildPhoto($2.DeleteChildPhotoRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$deleteChildPhoto, request, options: options); } + + $grpc.ResponseFuture<$2.GetChildPhotoResponse> getChildPhoto($2.GetChildPhotoRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getChildPhoto, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.ChildPhotoService') @@ -64,6 +72,13 @@ abstract class ChildPhotoServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $2.DeleteChildPhotoRequest.fromBuffer(value), ($2.DeleteChildPhotoResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$2.GetChildPhotoRequest, $2.GetChildPhotoResponse>( + 'GetChildPhoto', + getChildPhoto_Pre, + false, + false, + ($core.List<$core.int> value) => $2.GetChildPhotoRequest.fromBuffer(value), + ($2.GetChildPhotoResponse value) => value.writeToBuffer())); } $async.Future<$2.DuplicationCheckResponse> duplicationCheck_Pre($grpc.ServiceCall call, $async.Future<$2.DuplicationCheckRequest> request) async { @@ -74,6 +89,11 @@ abstract class ChildPhotoServiceBase extends $grpc.Service { return deleteChildPhoto(call, await request); } + $async.Future<$2.GetChildPhotoResponse> getChildPhoto_Pre($grpc.ServiceCall call, $async.Future<$2.GetChildPhotoRequest> request) async { + return getChildPhoto(call, await request); + } + $async.Future<$2.DuplicationCheckResponse> duplicationCheck($grpc.ServiceCall call, $2.DuplicationCheckRequest request); $async.Future<$2.DeleteChildPhotoResponse> deleteChildPhoto($grpc.ServiceCall call, $2.DeleteChildPhotoRequest request); + $async.Future<$2.GetChildPhotoResponse> getChildPhoto($grpc.ServiceCall call, $2.GetChildPhotoRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart index 0bd75499..9cad8f79 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbjson.dart @@ -67,3 +67,42 @@ final $typed_data.Uint8List deleteChildPhotoResponseDescriptor = $convert.base64 'ChhEZWxldGVDaGlsZFBob3RvUmVzcG9uc2USJgoPaXNfc3VjY2Vzc19saXN0GAEgAygIUg1pc1' 'N1Y2Nlc3NMaXN0EhAKA2lkcxgCIAMoCVIDaWRz'); +@$core.Deprecated('Use getChildPhotoRequestDescriptor instead') +const GetChildPhotoRequest$json = { + '1': 'GetChildPhotoRequest', + '2': [ + {'1': 'child_id', '3': 1, '4': 1, '5': 9, '10': 'childId'}, + ], +}; + +/// Descriptor for `GetChildPhotoRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getChildPhotoRequestDescriptor = $convert.base64Decode( + 'ChRHZXRDaGlsZFBob3RvUmVxdWVzdBIZCghjaGlsZF9pZBgBIAEoCVIHY2hpbGRJZA=='); + +@$core.Deprecated('Use childPhotoResponseDescriptor instead') +const ChildPhotoResponse$json = { + '1': 'ChildPhotoResponse', + '2': [ + {'1': 'child_photo_id', '3': 1, '4': 1, '5': 9, '10': 'childPhotoId'}, + {'1': 'photo', '3': 2, '4': 1, '5': 12, '10': 'photo'}, + ], +}; + +/// Descriptor for `ChildPhotoResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List childPhotoResponseDescriptor = $convert.base64Decode( + 'ChJDaGlsZFBob3RvUmVzcG9uc2USJAoOY2hpbGRfcGhvdG9faWQYASABKAlSDGNoaWxkUGhvdG' + '9JZBIUCgVwaG90bxgCIAEoDFIFcGhvdG8='); + +@$core.Deprecated('Use getChildPhotoResponseDescriptor instead') +const GetChildPhotoResponse$json = { + '1': 'GetChildPhotoResponse', + '2': [ + {'1': 'child_photos', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.ChildPhotoResponse', '10': 'childPhotos'}, + ], +}; + +/// Descriptor for `GetChildPhotoResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getChildPhotoResponseDescriptor = $convert.base64Decode( + 'ChVHZXRDaGlsZFBob3RvUmVzcG9uc2USSQoMY2hpbGRfcGhvdG9zGAEgAygLMiYud2hlcmVfY2' + 'hpbGRfYnVzLnYxLkNoaWxkUGhvdG9SZXNwb25zZVILY2hpbGRQaG90b3M='); + diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart index b1f241ff..3aec87de 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart @@ -20,19 +20,19 @@ import 'health_check.pb.dart' as $4; export 'health_check.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.HealthcheckService') -class HealthCheckServiceClient extends $grpc.Client { +class HealthcheckServiceClient extends $grpc.Client { static final _$ping = $grpc.ClientMethod<$4.PingRequest, $4.PingResponse>( '/where_child_bus.v1.HealthcheckService/Ping', ($4.PingRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $4.PingResponse.fromBuffer(value)); - HealthCheckServiceClient($grpc.ClientChannel channel, + HealthcheckServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, interceptors: interceptors); + : super(channel, options: options, + interceptors: interceptors); - $grpc.ResponseFuture<$4.PingResponse> ping($4.PingRequest request, - {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$4.PingResponse> ping($4.PingRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$ping, request, options: options); } } @@ -51,11 +51,9 @@ abstract class HealthcheckServiceBase extends $grpc.Service { ($4.PingResponse value) => value.writeToBuffer())); } - $async.Future<$4.PingResponse> ping_Pre( - $grpc.ServiceCall call, $async.Future<$4.PingRequest> request) async { + $async.Future<$4.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$4.PingRequest> request) async { return ping(call, await request); } - $async.Future<$4.PingResponse> ping( - $grpc.ServiceCall call, $4.PingRequest request); + $async.Future<$4.PingResponse> ping($grpc.ServiceCall call, $4.PingRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 7bf27f42..0040c988 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -1441,6 +1441,7 @@ class ChildPhoto extends $pb.GeneratedMessage { factory ChildPhoto({ $core.String? id, $core.String? childId, + $core.List<$core.int>? photo, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, }) { @@ -1451,6 +1452,9 @@ class ChildPhoto extends $pb.GeneratedMessage { if (childId != null) { $result.childId = childId; } + if (photo != null) { + $result.photo = photo; + } if (createdAt != null) { $result.createdAt = createdAt; } @@ -1466,8 +1470,9 @@ class ChildPhoto extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildPhoto', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'childId') - ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(6, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'photo', $pb.PbFieldType.OY) + ..aOM<$7.Timestamp>(4, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1510,27 +1515,36 @@ class ChildPhoto extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearChildId() => clearField(2); + @$pb.TagNumber(3) + $core.List<$core.int> get photo => $_getN(2); + @$pb.TagNumber(3) + set photo($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(3) + $core.bool hasPhoto() => $_has(2); + @$pb.TagNumber(3) + void clearPhoto() => clearField(3); + + @$pb.TagNumber(4) + $7.Timestamp get createdAt => $_getN(3); + @$pb.TagNumber(4) + set createdAt($7.Timestamp v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasCreatedAt() => $_has(3); + @$pb.TagNumber(4) + void clearCreatedAt() => clearField(4); + @$pb.TagNumber(4) + $7.Timestamp ensureCreatedAt() => $_ensure(3); + @$pb.TagNumber(5) - $7.Timestamp get createdAt => $_getN(2); + $7.Timestamp get updatedAt => $_getN(4); @$pb.TagNumber(5) - set createdAt($7.Timestamp v) { setField(5, v); } + set updatedAt($7.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) - $core.bool hasCreatedAt() => $_has(2); + $core.bool hasUpdatedAt() => $_has(4); @$pb.TagNumber(5) - void clearCreatedAt() => clearField(5); + void clearUpdatedAt() => clearField(5); @$pb.TagNumber(5) - $7.Timestamp ensureCreatedAt() => $_ensure(2); - - @$pb.TagNumber(6) - $7.Timestamp get updatedAt => $_getN(3); - @$pb.TagNumber(6) - set updatedAt($7.Timestamp v) { setField(6, v); } - @$pb.TagNumber(6) - $core.bool hasUpdatedAt() => $_has(3); - @$pb.TagNumber(6) - void clearUpdatedAt() => clearField(6); - @$pb.TagNumber(6) - $7.Timestamp ensureUpdatedAt() => $_ensure(3); + $7.Timestamp ensureUpdatedAt() => $_ensure(4); } class BoardingRecord extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 3b94f11d..feed0e70 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -304,17 +304,18 @@ const ChildPhoto$json = { '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, - {'1': 'created_at', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'photo', '3': 3, '4': 1, '5': 12, '10': 'photo'}, + {'1': 'created_at', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; /// Descriptor for `ChildPhoto`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List childPhotoDescriptor = $convert.base64Decode( 'CgpDaGlsZFBob3RvEg4KAmlkGAEgASgJUgJpZBIZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZB' - 'I5CgpjcmVhdGVkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRl' - 'ZEF0EjkKCnVwZGF0ZWRfYXQYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cG' - 'RhdGVkQXQ='); + 'IUCgVwaG90bxgDIAEoDFIFcGhvdG8SOQoKY3JlYXRlZF9hdBgEIAEoCzIaLmdvb2dsZS5wcm90' + 'b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRhdGVkX2F0GAUgASgLMhouZ29vZ2xlLn' + 'Byb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); @$core.Deprecated('Use boardingRecordDescriptor instead') const BoardingRecord$json = { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart index 7bb2020c..a8631afa 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -200,6 +200,7 @@ class GetStationListByBusIdResponse extends $pb.GeneratedMessage { $core.Iterable<$8.Station>? stations, $core.Iterable<$8.GuardianResponse>? guardians, $core.Iterable<$8.Child>? children, + $core.Iterable<$8.ChildPhoto>? photos, }) { final $result = create(); if (stations != null) { @@ -211,6 +212,9 @@ class GetStationListByBusIdResponse extends $pb.GeneratedMessage { if (children != null) { $result.children.addAll(children); } + if (photos != null) { + $result.photos.addAll(photos); + } return $result; } GetStationListByBusIdResponse._() : super(); @@ -221,6 +225,7 @@ class GetStationListByBusIdResponse extends $pb.GeneratedMessage { ..pc<$8.Station>(1, _omitFieldNames ? '' : 'stations', $pb.PbFieldType.PM, subBuilder: $8.Station.create) ..pc<$8.GuardianResponse>(2, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) ..pc<$8.Child>(3, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) + ..pc<$8.ChildPhoto>(4, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $8.ChildPhoto.create) ..hasRequiredFields = false ; @@ -253,6 +258,9 @@ class GetStationListByBusIdResponse extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.List<$8.Child> get children => $_getList(2); + + @$pb.TagNumber(4) + $core.List<$8.ChildPhoto> get photos => $_getList(3); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart index 57aa60c9..197d8f88 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -61,6 +61,7 @@ const GetStationListByBusIdResponse$json = { {'1': 'stations', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Station', '10': 'stations'}, {'1': 'guardians', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.GuardianResponse', '10': 'guardians'}, {'1': 'children', '3': 3, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + {'1': 'photos', '3': 4, '4': 3, '5': 11, '6': '.where_child_bus.v1.ChildPhoto', '10': 'photos'}, ], }; @@ -69,5 +70,6 @@ final $typed_data.Uint8List getStationListByBusIdResponseDescriptor = $convert.b 'Ch1HZXRTdGF0aW9uTGlzdEJ5QnVzSWRSZXNwb25zZRI3CghzdGF0aW9ucxgBIAMoCzIbLndoZX' 'JlX2NoaWxkX2J1cy52MS5TdGF0aW9uUghzdGF0aW9ucxJCCglndWFyZGlhbnMYAiADKAsyJC53' 'aGVyZV9jaGlsZF9idXMudjEuR3VhcmRpYW5SZXNwb25zZVIJZ3VhcmRpYW5zEjUKCGNoaWxkcm' - 'VuGAMgAygLMhkud2hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJlbg=='); + 'VuGAMgAygLMhkud2hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJlbhI2CgZwaG90b3MY' + 'BCADKAsyHi53aGVyZV9jaGlsZF9idXMudjEuQ2hpbGRQaG90b1IGcGhvdG9z'); diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py index 2a21e4cf..0c436168 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"_\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x03(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"$\n\x0bPredRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\")\n\x0cPredResponse\x12\x19\n\x08\x63hild_id\x18\x01 \x03(\tR\x07\x63hildId\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04Pred\x12 .machine_learning.v1.PredRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"\x9a\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x37\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"\xdb\x01\n\x0bPredRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x37\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\x12=\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1e.machine_learning.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x05 \x01(\x03R\ttimestamp\")\n\x0cPredResponse\x12\x19\n\x08\x63hild_id\x18\x01 \x03(\tR\x07\x63hildId\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02\x32\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04Pred\x12 .machine_learning.v1.PredRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -22,18 +22,22 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' - _globals['_TRAINREQUEST']._serialized_start=67 - _globals['_TRAINREQUEST']._serialized_end=162 - _globals['_TRAINRESPONSE']._serialized_start=164 - _globals['_TRAINRESPONSE']._serialized_end=210 - _globals['_PREDREQUEST']._serialized_start=212 - _globals['_PREDREQUEST']._serialized_end=248 - _globals['_PREDRESPONSE']._serialized_start=250 - _globals['_PREDRESPONSE']._serialized_end=291 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=293 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=377 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=379 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=437 - _globals['_MACHINELEARNINGSERVICE']._serialized_start=440 - _globals['_MACHINELEARNINGSERVICE']._serialized_end=741 + _globals['_BUSTYPE']._serialized_start=683 + _globals['_BUSTYPE']._serialized_end=762 + _globals['_VIDEOTYPE']._serialized_start=764 + _globals['_VIDEOTYPE']._serialized_end=850 + _globals['_TRAINREQUEST']._serialized_start=68 + _globals['_TRAINREQUEST']._serialized_end=222 + _globals['_TRAINRESPONSE']._serialized_start=224 + _globals['_TRAINRESPONSE']._serialized_end=270 + _globals['_PREDREQUEST']._serialized_start=273 + _globals['_PREDREQUEST']._serialized_end=492 + _globals['_PREDRESPONSE']._serialized_start=494 + _globals['_PREDRESPONSE']._serialized_end=535 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=537 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=621 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=623 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=681 + _globals['_MACHINELEARNINGSERVICE']._serialized_start=853 + _globals['_MACHINELEARNINGSERVICE']._serialized_end=1154 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi index 61fa9e5e..01f24ced 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi @@ -1,19 +1,40 @@ from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor +class BusType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + BUS_TYPE_UNSPECIFIED: _ClassVar[BusType] + BUS_TYPE_MORNING: _ClassVar[BusType] + BUS_TYPE_EVENING: _ClassVar[BusType] + +class VideoType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + VIDEO_TYPE_UNSPECIFIED: _ClassVar[VideoType] + VIDEO_TYPE_GET_ON: _ClassVar[VideoType] + VIDEO_TYPE_GET_OFF: _ClassVar[VideoType] +BUS_TYPE_UNSPECIFIED: BusType +BUS_TYPE_MORNING: BusType +BUS_TYPE_EVENING: BusType +VIDEO_TYPE_UNSPECIFIED: VideoType +VIDEO_TYPE_GET_ON: VideoType +VIDEO_TYPE_GET_OFF: VideoType + class TrainRequest(_message.Message): - __slots__ = ("nursery_id", "child_id", "bus_id") + __slots__ = ("nursery_id", "bus_id", "child_ids", "bus_type") NURSERY_ID_FIELD_NUMBER: _ClassVar[int] - CHILD_ID_FIELD_NUMBER: _ClassVar[int] BUS_ID_FIELD_NUMBER: _ClassVar[int] + CHILD_IDS_FIELD_NUMBER: _ClassVar[int] + BUS_TYPE_FIELD_NUMBER: _ClassVar[int] nursery_id: str - child_id: _containers.RepeatedScalarFieldContainer[str] bus_id: str - def __init__(self, nursery_id: _Optional[str] = ..., child_id: _Optional[_Iterable[str]] = ..., bus_id: _Optional[str] = ...) -> None: ... + child_ids: _containers.RepeatedScalarFieldContainer[str] + bus_type: BusType + def __init__(self, nursery_id: _Optional[str] = ..., bus_id: _Optional[str] = ..., child_ids: _Optional[_Iterable[str]] = ..., bus_type: _Optional[_Union[BusType, str]] = ...) -> None: ... class TrainResponse(_message.Message): __slots__ = ("is_started",) @@ -22,10 +43,18 @@ class TrainResponse(_message.Message): def __init__(self, is_started: bool = ...) -> None: ... class PredRequest(_message.Message): - __slots__ = ("bus_id",) + __slots__ = ("bus_id", "bus_type", "video_type", "video_chunk", "timestamp") BUS_ID_FIELD_NUMBER: _ClassVar[int] + BUS_TYPE_FIELD_NUMBER: _ClassVar[int] + VIDEO_TYPE_FIELD_NUMBER: _ClassVar[int] + VIDEO_CHUNK_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] bus_id: str - def __init__(self, bus_id: _Optional[str] = ...) -> None: ... + bus_type: BusType + video_type: VideoType + video_chunk: bytes + timestamp: int + def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[BusType, str]] = ..., video_type: _Optional[_Union[VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[int] = ...) -> None: ... class PredResponse(_message.Message): __slots__ = ("child_id",) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py index 13407d1b..3e149f33 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\x8e\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\"\xab\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nvideo_type\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x03 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\"\x18\n\x16StreamBusVideoResponse2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\x8e\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\"\xe3\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12<\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x05 \x01(\x03R\ttimestamp\"\x18\n\x16StreamBusVideoResponse2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -44,9 +44,9 @@ _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=905 _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1044 _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1047 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1218 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1220 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1244 - _globals['_BUSSERVICE']._serialized_start=1247 - _globals['_BUSSERVICE']._serialized_end=1941 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1274 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1276 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1300 + _globals['_BUSSERVICE']._serialized_start=1303 + _globals['_BUSSERVICE']._serialized_end=1997 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi index 2206dd23..31567724 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi @@ -87,16 +87,18 @@ class TrackBusContinuousResponse(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., timestamp: _Optional[int] = ...) -> None: ... class StreamBusVideoRequest(_message.Message): - __slots__ = ("bus_id", "video_type", "video_chunk", "timestamp") + __slots__ = ("bus_id", "bus_type", "video_type", "video_chunk", "timestamp") BUS_ID_FIELD_NUMBER: _ClassVar[int] + BUS_TYPE_FIELD_NUMBER: _ClassVar[int] VIDEO_TYPE_FIELD_NUMBER: _ClassVar[int] VIDEO_CHUNK_FIELD_NUMBER: _ClassVar[int] TIMESTAMP_FIELD_NUMBER: _ClassVar[int] bus_id: str + bus_type: _resources_pb2.BusType video_type: _resources_pb2.VideoType video_chunk: bytes timestamp: int - def __init__(self, bus_id: _Optional[str] = ..., video_type: _Optional[_Union[_resources_pb2.VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[int] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., video_type: _Optional[_Union[_resources_pb2.VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[int] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = () diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py index 5039ce1f..86188c57 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"X\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"Y\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"T\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xf3\x03\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos2\xf3\x03\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -29,16 +29,16 @@ _globals['_CREATECHILDRESPONSE']._serialized_end=352 _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=354 _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=417 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=419 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=507 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=509 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=575 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=577 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=666 - _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=668 - _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=719 - _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=721 - _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=805 - _globals['_CHILDSERVICE']._serialized_start=808 - _globals['_CHILDSERVICE']._serialized_end=1307 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=420 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=564 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=566 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=632 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=635 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=780 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=782 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=833 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=836 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=976 + _globals['_CHILDSERVICE']._serialized_start=979 + _globals['_CHILDSERVICE']._serialized_end=1478 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi index fcdc142d..410879ad 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi @@ -35,10 +35,12 @@ class GetChildListByNurseryIDRequest(_message.Message): def __init__(self, nursery_id: _Optional[str] = ...) -> None: ... class GetChildListByNurseryIDResponse(_message.Message): - __slots__ = ("children",) + __slots__ = ("children", "photos") CHILDREN_FIELD_NUMBER: _ClassVar[int] + PHOTOS_FIELD_NUMBER: _ClassVar[int] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] - def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... + photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] + def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... class GetChildListByGuardianIDRequest(_message.Message): __slots__ = ("guardian_id",) @@ -47,10 +49,12 @@ class GetChildListByGuardianIDRequest(_message.Message): def __init__(self, guardian_id: _Optional[str] = ...) -> None: ... class GetChildListByGuardianIDResponse(_message.Message): - __slots__ = ("children",) + __slots__ = ("children", "photos") CHILDREN_FIELD_NUMBER: _ClassVar[int] + PHOTOS_FIELD_NUMBER: _ClassVar[int] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] - def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... + photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] + def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... class GetChildListByBusIDRequest(_message.Message): __slots__ = ("bus_id",) @@ -59,7 +63,9 @@ class GetChildListByBusIDRequest(_message.Message): def __init__(self, bus_id: _Optional[str] = ...) -> None: ... class GetChildListByBusIDResponse(_message.Message): - __slots__ = ("children",) + __slots__ = ("children", "photos") CHILDREN_FIELD_NUMBER: _ClassVar[int] + PHOTOS_FIELD_NUMBER: _ClassVar[int] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] - def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... + photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] + def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py index 3d283741..b1182eaa 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$where_child_bus/v1/child_photo.proto\x12\x12where_child_bus.v1\"6\n\x17\x44uplicationCheckRequest\x12\x1b\n\tchild_ids\x18\x01 \x03(\tR\x08\x63hildIds\"\x89\x01\n\x18\x44uplicationCheckResponse\x12#\n\ris_duplicated\x18\x01 \x01(\x08R\x0cisDuplicated\x12\x1b\n\tphoto_ids\x18\x02 \x03(\tR\x08photoIds\x12+\n\x11\x64uplicated_photos\x18\x03 \x03(\x0cR\x10\x64uplicatedPhotos\"+\n\x17\x44\x65leteChildPhotoRequest\x12\x10\n\x03ids\x18\x01 \x03(\tR\x03ids\"T\n\x18\x44\x65leteChildPhotoResponse\x12&\n\x0fis_success_list\x18\x01 \x03(\x08R\risSuccessList\x12\x10\n\x03ids\x18\x02 \x03(\tR\x03ids2\xf1\x01\n\x11\x43hildPhotoService\x12m\n\x10\x44uplicationCheck\x12+.where_child_bus.v1.DuplicationCheckRequest\x1a,.where_child_bus.v1.DuplicationCheckResponse\x12m\n\x10\x44\x65leteChildPhoto\x12+.where_child_bus.v1.DeleteChildPhotoRequest\x1a,.where_child_bus.v1.DeleteChildPhotoResponseB\xf2\x01\n\x16\x63om.where_child_bus.v1B\x0f\x43hildPhotoProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$where_child_bus/v1/child_photo.proto\x12\x12where_child_bus.v1\"6\n\x17\x44uplicationCheckRequest\x12\x1b\n\tchild_ids\x18\x01 \x03(\tR\x08\x63hildIds\"\x89\x01\n\x18\x44uplicationCheckResponse\x12#\n\ris_duplicated\x18\x01 \x01(\x08R\x0cisDuplicated\x12\x1b\n\tphoto_ids\x18\x02 \x03(\tR\x08photoIds\x12+\n\x11\x64uplicated_photos\x18\x03 \x03(\x0cR\x10\x64uplicatedPhotos\"+\n\x17\x44\x65leteChildPhotoRequest\x12\x10\n\x03ids\x18\x01 \x03(\tR\x03ids\"T\n\x18\x44\x65leteChildPhotoResponse\x12&\n\x0fis_success_list\x18\x01 \x03(\x08R\risSuccessList\x12\x10\n\x03ids\x18\x02 \x03(\tR\x03ids\"1\n\x14GetChildPhotoRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"P\n\x12\x43hildPhotoResponse\x12$\n\x0e\x63hild_photo_id\x18\x01 \x01(\tR\x0c\x63hildPhotoId\x12\x14\n\x05photo\x18\x02 \x01(\x0cR\x05photo\"b\n\x15GetChildPhotoResponse\x12I\n\x0c\x63hild_photos\x18\x01 \x03(\x0b\x32&.where_child_bus.v1.ChildPhotoResponseR\x0b\x63hildPhotos2\xd7\x02\n\x11\x43hildPhotoService\x12m\n\x10\x44uplicationCheck\x12+.where_child_bus.v1.DuplicationCheckRequest\x1a,.where_child_bus.v1.DuplicationCheckResponse\x12m\n\x10\x44\x65leteChildPhoto\x12+.where_child_bus.v1.DeleteChildPhotoRequest\x1a,.where_child_bus.v1.DeleteChildPhotoResponse\x12\x64\n\rGetChildPhoto\x12(.where_child_bus.v1.GetChildPhotoRequest\x1a).where_child_bus.v1.GetChildPhotoResponseB\xf2\x01\n\x16\x63om.where_child_bus.v1B\x0f\x43hildPhotoProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -30,6 +30,12 @@ _globals['_DELETECHILDPHOTOREQUEST']._serialized_end=299 _globals['_DELETECHILDPHOTORESPONSE']._serialized_start=301 _globals['_DELETECHILDPHOTORESPONSE']._serialized_end=385 - _globals['_CHILDPHOTOSERVICE']._serialized_start=388 - _globals['_CHILDPHOTOSERVICE']._serialized_end=629 + _globals['_GETCHILDPHOTOREQUEST']._serialized_start=387 + _globals['_GETCHILDPHOTOREQUEST']._serialized_end=436 + _globals['_CHILDPHOTORESPONSE']._serialized_start=438 + _globals['_CHILDPHOTORESPONSE']._serialized_end=518 + _globals['_GETCHILDPHOTORESPONSE']._serialized_start=520 + _globals['_GETCHILDPHOTORESPONSE']._serialized_end=618 + _globals['_CHILDPHOTOSERVICE']._serialized_start=621 + _globals['_CHILDPHOTOSERVICE']._serialized_end=964 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi index 718db86b..231461af 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi @@ -1,7 +1,7 @@ from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -34,3 +34,23 @@ class DeleteChildPhotoResponse(_message.Message): is_success_list: _containers.RepeatedScalarFieldContainer[bool] ids: _containers.RepeatedScalarFieldContainer[str] def __init__(self, is_success_list: _Optional[_Iterable[bool]] = ..., ids: _Optional[_Iterable[str]] = ...) -> None: ... + +class GetChildPhotoRequest(_message.Message): + __slots__ = ("child_id",) + CHILD_ID_FIELD_NUMBER: _ClassVar[int] + child_id: str + def __init__(self, child_id: _Optional[str] = ...) -> None: ... + +class ChildPhotoResponse(_message.Message): + __slots__ = ("child_photo_id", "photo") + CHILD_PHOTO_ID_FIELD_NUMBER: _ClassVar[int] + PHOTO_FIELD_NUMBER: _ClassVar[int] + child_photo_id: str + photo: bytes + def __init__(self, child_photo_id: _Optional[str] = ..., photo: _Optional[bytes] = ...) -> None: ... + +class GetChildPhotoResponse(_message.Message): + __slots__ = ("child_photos",) + CHILD_PHOTOS_FIELD_NUMBER: _ClassVar[int] + child_photos: _containers.RepeatedCompositeFieldContainer[ChildPhotoResponse] + def __init__(self, child_photos: _Optional[_Iterable[_Union[ChildPhotoResponse, _Mapping]]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py index 35f45fd1..7f938756 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py @@ -3,7 +3,6 @@ import grpc import grpc.experimental - from where_child_bus.v1 import child_photo_pb2 as where__child__bus_dot_v1_dot_child__photo__pb2 @@ -26,6 +25,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.FromString, ) + self.GetChildPhoto = channel.unary_unary( + '/where_child_bus.v1.ChildPhotoService/GetChildPhoto', + request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.FromString, + ) class ChildPhotoServiceServicer(object): @@ -43,6 +47,12 @@ def DeleteChildPhoto(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetChildPhoto(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_ChildPhotoServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -56,6 +66,11 @@ def add_ChildPhotoServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.SerializeToString, ), + 'GetChildPhoto': grpc.unary_unary_rpc_method_handler( + servicer.GetChildPhoto, + request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.ChildPhotoService', rpc_method_handlers) @@ -99,3 +114,20 @@ def DeleteChildPhoto(request, where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetChildPhoto(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildPhotoService/GetChildPhoto', + where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.SerializeToString, + where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index 7a82d610..875d9425 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x87\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xad\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x39\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x87\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xc3\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x14\n\x05photo\x18\x03 \x01(\x0cR\x05photo\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_STATUS']._serialized_start=3350 - _globals['_STATUS']._serialized_end=3447 - _globals['_VIDEOTYPE']._serialized_start=3449 - _globals['_VIDEOTYPE']._serialized_end=3535 - _globals['_SEX']._serialized_start=3537 - _globals['_SEX']._serialized_end=3606 - _globals['_BUSTYPE']._serialized_start=3608 - _globals['_BUSTYPE']._serialized_end=3687 + _globals['_STATUS']._serialized_start=3372 + _globals['_STATUS']._serialized_end=3469 + _globals['_VIDEOTYPE']._serialized_start=3471 + _globals['_VIDEOTYPE']._serialized_end=3557 + _globals['_SEX']._serialized_start=3559 + _globals['_SEX']._serialized_end=3628 + _globals['_BUSTYPE']._serialized_start=3630 + _globals['_BUSTYPE']._serialized_end=3709 _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=414 _globals['_NURSERYRESPONSE']._serialized_start=417 @@ -50,7 +50,7 @@ _globals['_BUSSTATIONASSOCIATION']._serialized_start=2919 _globals['_BUSSTATIONASSOCIATION']._serialized_end=2996 _globals['_CHILDPHOTO']._serialized_start=2999 - _globals['_CHILDPHOTO']._serialized_end=3172 - _globals['_BOARDINGRECORD']._serialized_start=3175 - _globals['_BOARDINGRECORD']._serialized_end=3348 + _globals['_CHILDPHOTO']._serialized_end=3194 + _globals['_BOARDINGRECORD']._serialized_start=3197 + _globals['_BOARDINGRECORD']._serialized_end=3370 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi index 230298bc..7b64831c 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi @@ -235,16 +235,18 @@ class BusStationAssociation(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., station_id: _Optional[str] = ...) -> None: ... class ChildPhoto(_message.Message): - __slots__ = ("id", "child_id", "created_at", "updated_at") + __slots__ = ("id", "child_id", "photo", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] CHILD_ID_FIELD_NUMBER: _ClassVar[int] + PHOTO_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str child_id: str + photo: bytes created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., photo: _Optional[bytes] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class BoardingRecord(_message.Message): __slots__ = ("id", "child_id", "bus_id", "is_boarding", "timestamp") diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py index 0dac39e8..77230d53 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"q\n\x14UpdateStationRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xd3\x01\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xf4\x01\n\x0eStationService\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"q\n\x14UpdateStationRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos2\xf4\x01\n\x0eStationService\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -30,7 +30,7 @@ _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_start=287 _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_end=340 _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=343 - _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=554 - _globals['_STATIONSERVICE']._serialized_start=557 - _globals['_STATIONSERVICE']._serialized_end=801 + _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=610 + _globals['_STATIONSERVICE']._serialized_start=613 + _globals['_STATIONSERVICE']._serialized_end=857 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi index 3bb846a5..d42573cd 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi @@ -29,11 +29,13 @@ class GetStationListByBusIdRequest(_message.Message): def __init__(self, bus_id: _Optional[str] = ...) -> None: ... class GetStationListByBusIdResponse(_message.Message): - __slots__ = ("stations", "guardians", "children") + __slots__ = ("stations", "guardians", "children", "photos") STATIONS_FIELD_NUMBER: _ClassVar[int] GUARDIANS_FIELD_NUMBER: _ClassVar[int] CHILDREN_FIELD_NUMBER: _ClassVar[int] + PHOTOS_FIELD_NUMBER: _ClassVar[int] stations: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Station] guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] - def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... + photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] + def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index 3a4b4f5a..edf29c5e 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -8,10 +8,23 @@ service MachineLearningService { rpc FaceDetectAndClip(FaceDetectAndClipRequest) returns (FaceDetectAndClipResponse); } +enum BusType { + BUS_TYPE_UNSPECIFIED = 0; + BUS_TYPE_MORNING = 1; + BUS_TYPE_EVENING = 2; +} + +enum VideoType { + VIDEO_TYPE_UNSPECIFIED = 0; + VIDEO_TYPE_GET_ON = 1; + VIDEO_TYPE_GET_OFF = 2; +} + message TrainRequest { string nursery_id = 1; - repeated string child_id = 2; - string bus_id = 3; + string bus_id = 2; + repeated string child_ids = 3; + BusType bus_type = 4; } message TrainResponse { @@ -20,7 +33,10 @@ message TrainResponse { message PredRequest { string bus_id = 1; - // TODO: add video data + BusType bus_type = 2; + VideoType video_type = 3; + bytes video_chunk = 4; // Chunk of video data + int64 timestamp = 5; // Unix timestamp } message PredResponse { diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 69eccfd8..7e2641a9 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -68,9 +68,10 @@ message TrackBusContinuousResponse { message StreamBusVideoRequest { string bus_id = 1; - VideoType video_type = 2; - bytes video_chunk = 3; // Chunk of video data - int64 timestamp = 4; // Unix timestamp + BusType bus_type = 2; + VideoType video_type = 3; + bytes video_chunk = 4; // Chunk of video data + int64 timestamp = 5; // Unix timestamp } message StreamBusVideoResponse { diff --git a/proto/where_child_bus/v1/child.proto b/proto/where_child_bus/v1/child.proto index 74fd6737..9a625ba0 100644 --- a/proto/where_child_bus/v1/child.proto +++ b/proto/where_child_bus/v1/child.proto @@ -30,6 +30,7 @@ message GetChildListByNurseryIDRequest { message GetChildListByNurseryIDResponse { repeated Child children = 1; + repeated ChildPhoto photos = 2; } message GetChildListByGuardianIDRequest { @@ -38,6 +39,7 @@ message GetChildListByGuardianIDRequest { message GetChildListByGuardianIDResponse { repeated Child children = 1; + repeated ChildPhoto photos = 2; } message GetChildListByBusIDRequest { @@ -46,4 +48,5 @@ message GetChildListByBusIDRequest { message GetChildListByBusIDResponse { repeated Child children = 1; -} \ No newline at end of file + repeated ChildPhoto photos = 2; +} diff --git a/proto/where_child_bus/v1/child_photo.proto b/proto/where_child_bus/v1/child_photo.proto index d1009883..6f2bf6b1 100644 --- a/proto/where_child_bus/v1/child_photo.proto +++ b/proto/where_child_bus/v1/child_photo.proto @@ -5,6 +5,7 @@ package where_child_bus.v1; service ChildPhotoService { rpc DuplicationCheck(DuplicationCheckRequest) returns (DuplicationCheckResponse); rpc DeleteChildPhoto(DeleteChildPhotoRequest) returns (DeleteChildPhotoResponse); + rpc GetChildPhoto(GetChildPhotoRequest) returns (GetChildPhotoResponse); } message DuplicationCheckRequest { @@ -25,4 +26,18 @@ message DeleteChildPhotoRequest { message DeleteChildPhotoResponse { repeated bool is_success_list = 1; repeated string ids = 2; -} \ No newline at end of file +} + +message GetChildPhotoRequest { + string child_id = 1; +} + +message ChildPhotoResponse { + string child_photo_id = 1; + bytes photo = 2; +} + + +message GetChildPhotoResponse { + repeated ChildPhotoResponse child_photos = 1; +} diff --git a/proto/where_child_bus/v1/resources.proto b/proto/where_child_bus/v1/resources.proto index 4f4754eb..8ca7db53 100644 --- a/proto/where_child_bus/v1/resources.proto +++ b/proto/where_child_bus/v1/resources.proto @@ -139,8 +139,9 @@ message BusStationAssociation { message ChildPhoto { string id = 1; string child_id = 2; - google.protobuf.Timestamp created_at = 5; - google.protobuf.Timestamp updated_at = 6; + bytes photo = 3; + google.protobuf.Timestamp created_at = 4; + google.protobuf.Timestamp updated_at = 5; } message BoardingRecord { @@ -149,4 +150,4 @@ message BoardingRecord { string bus_id = 3; bool is_boarding = 4; google.protobuf.Timestamp timestamp = 5; -} \ No newline at end of file +} diff --git a/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto index ec4b914c..7a0c6f3c 100644 --- a/proto/where_child_bus/v1/station.proto +++ b/proto/where_child_bus/v1/station.proto @@ -27,4 +27,5 @@ message GetStationListByBusIdResponse { repeated Station stations = 1; repeated GuardianResponse guardians = 2; repeated Child children = 3; + repeated ChildPhoto photos = 4; } \ No newline at end of file From 462f929f6dd0312a0fd5d299098c8cd34d6a0f95 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 16:56:56 +0900 Subject: [PATCH 393/771] =?UTF-8?q?fix:=20=E5=8D=98=E6=95=B0=E5=BD=A2?= =?UTF-8?q?=E3=83=BB=E8=A4=87=E6=95=B0=E5=BD=A2=E3=81=AE=E8=A1=A8=E7=8F=BE?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 123 +++++++++--------- .../v1/machine_learning.pb.dart | 10 +- .../v1/machine_learning.pbjson.dart | 4 +- .../v1/machine_learning_pb2.py | 24 ++-- .../v1/machine_learning_pb2.pyi | 8 +- .../v1/machine_learning.proto | 2 +- 6 files changed, 86 insertions(+), 85 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index 59d74d64..77c0762a 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -320,7 +320,7 @@ type PredResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ChildId []string `protobuf:"bytes,1,rep,name=child_id,json=childId,proto3" json:"child_id,omitempty"` + ChildIds []string `protobuf:"bytes,1,rep,name=child_ids,json=childIds,proto3" json:"child_ids,omitempty"` } func (x *PredResponse) Reset() { @@ -355,9 +355,9 @@ func (*PredResponse) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{3} } -func (x *PredResponse) GetChildId() []string { +func (x *PredResponse) GetChildIds() []string { if x != nil { - return x.ChildId + return x.ChildIds } return nil } @@ -497,65 +497,66 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x29, 0x0a, 0x0c, - 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, 0x63, 0x65, 0x44, - 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x3a, 0x0a, - 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, - 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, - 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, - 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, - 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x56, 0x0a, 0x09, 0x56, 0x69, - 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, 0x45, 0x4f, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, - 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, - 0x10, 0x02, 0x32, 0xad, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, - 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, - 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, - 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, - 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x2b, 0x0a, 0x0c, + 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, 0x63, + 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, + 0x3a, 0x0a, 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, + 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x4f, 0x0a, 0x07, 0x42, + 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, + 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x56, 0x0a, 0x09, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, + 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, + 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, + 0x46, 0x46, 0x10, 0x02, 0x32, 0xad, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x4e, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4f, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x72, - 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, - 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, - 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, - 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, + 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, + 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, + 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, + 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index 866f4020..e1e758d0 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -262,11 +262,11 @@ class PredRequest extends $pb.GeneratedMessage { class PredResponse extends $pb.GeneratedMessage { factory PredResponse({ - $core.Iterable<$core.String>? childId, + $core.Iterable<$core.String>? childIds, }) { final $result = create(); - if (childId != null) { - $result.childId.addAll(childId); + if (childIds != null) { + $result.childIds.addAll(childIds); } return $result; } @@ -275,7 +275,7 @@ class PredResponse extends $pb.GeneratedMessage { factory PredResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PredResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) - ..pPS(1, _omitFieldNames ? '' : 'childId') + ..pPS(1, _omitFieldNames ? '' : 'childIds') ..hasRequiredFields = false ; @@ -301,7 +301,7 @@ class PredResponse extends $pb.GeneratedMessage { static PredResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$core.String> get childId => $_getList(0); + $core.List<$core.String> get childIds => $_getList(0); } class FaceDetectAndClipRequest extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index c077ec34..4bf7ba6d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -95,13 +95,13 @@ final $typed_data.Uint8List predRequestDescriptor = $convert.base64Decode( const PredResponse$json = { '1': 'PredResponse', '2': [ - {'1': 'child_id', '3': 1, '4': 3, '5': 9, '10': 'childId'}, + {'1': 'child_ids', '3': 1, '4': 3, '5': 9, '10': 'childIds'}, ], }; /// Descriptor for `PredResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List predResponseDescriptor = $convert.base64Decode( - 'CgxQcmVkUmVzcG9uc2USGQoIY2hpbGRfaWQYASADKAlSB2NoaWxkSWQ='); + 'CgxQcmVkUmVzcG9uc2USGwoJY2hpbGRfaWRzGAEgAygJUghjaGlsZElkcw=='); @$core.Deprecated('Use faceDetectAndClipRequestDescriptor instead') const FaceDetectAndClipRequest$json = { diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py index 0c436168..a8b34757 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"\x9a\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x37\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"\xdb\x01\n\x0bPredRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x37\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\x12=\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1e.machine_learning.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x05 \x01(\x03R\ttimestamp\")\n\x0cPredResponse\x12\x19\n\x08\x63hild_id\x18\x01 \x03(\tR\x07\x63hildId\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02\x32\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04Pred\x12 .machine_learning.v1.PredRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"\x9a\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x37\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"\xdb\x01\n\x0bPredRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x37\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\x12=\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1e.machine_learning.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x05 \x01(\x03R\ttimestamp\"+\n\x0cPredResponse\x12\x1b\n\tchild_ids\x18\x01 \x03(\tR\x08\x63hildIds\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02\x32\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04Pred\x12 .machine_learning.v1.PredRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -22,10 +22,10 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' - _globals['_BUSTYPE']._serialized_start=683 - _globals['_BUSTYPE']._serialized_end=762 - _globals['_VIDEOTYPE']._serialized_start=764 - _globals['_VIDEOTYPE']._serialized_end=850 + _globals['_BUSTYPE']._serialized_start=685 + _globals['_BUSTYPE']._serialized_end=764 + _globals['_VIDEOTYPE']._serialized_start=766 + _globals['_VIDEOTYPE']._serialized_end=852 _globals['_TRAINREQUEST']._serialized_start=68 _globals['_TRAINREQUEST']._serialized_end=222 _globals['_TRAINRESPONSE']._serialized_start=224 @@ -33,11 +33,11 @@ _globals['_PREDREQUEST']._serialized_start=273 _globals['_PREDREQUEST']._serialized_end=492 _globals['_PREDRESPONSE']._serialized_start=494 - _globals['_PREDRESPONSE']._serialized_end=535 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=537 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=621 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=623 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=681 - _globals['_MACHINELEARNINGSERVICE']._serialized_start=853 - _globals['_MACHINELEARNINGSERVICE']._serialized_end=1154 + _globals['_PREDRESPONSE']._serialized_end=537 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=539 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=623 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=625 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=683 + _globals['_MACHINELEARNINGSERVICE']._serialized_start=855 + _globals['_MACHINELEARNINGSERVICE']._serialized_end=1156 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi index 01f24ced..cf3a45a5 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi @@ -57,10 +57,10 @@ class PredRequest(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[BusType, str]] = ..., video_type: _Optional[_Union[VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[int] = ...) -> None: ... class PredResponse(_message.Message): - __slots__ = ("child_id",) - CHILD_ID_FIELD_NUMBER: _ClassVar[int] - child_id: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, child_id: _Optional[_Iterable[str]] = ...) -> None: ... + __slots__ = ("child_ids",) + CHILD_IDS_FIELD_NUMBER: _ClassVar[int] + child_ids: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, child_ids: _Optional[_Iterable[str]] = ...) -> None: ... class FaceDetectAndClipRequest(_message.Message): __slots__ = ("nursery_id", "child_id") diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index edf29c5e..729dfba4 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -40,7 +40,7 @@ message PredRequest { } message PredResponse { - repeated string child_id = 1; + repeated string child_ids = 1; } message FaceDetectAndClipRequest { From 228b316e40256cf554949ed13c064f8e25e8a235 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 17 Feb 2024 17:14:07 +0900 Subject: [PATCH 394/771] =?UTF-8?q?feat:=E5=88=B0=E7=9D=80=E3=81=BE?= =?UTF-8?q?=E3=81=A7=E3=81=AE=E6=99=82=E9=96=93=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/google_map_view.dart | 30 ++-- .../map_page/components/arrival_time.dart | 49 +++--- .../components/bus_to_bus_stop_time.dart | 146 ++++++++++++++++++ .../lib/pages/map_page/map_page.dart | 17 +- 4 files changed, 199 insertions(+), 43 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index 5812bfcc..999085f4 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -50,19 +50,23 @@ class _GoogleMapView extends State { @override Widget build(BuildContext context) { - return SizedBox( - width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height * 0.5, - child: GoogleMap( - initialCameraPosition: _initialLocation, - mapType: MapType.normal, - onMapCreated: (GoogleMapController controller) { - mapController = controller; - _getPolyline(widget.waypoints); - }, - markers: Set.of(markers.values), - polylines: Set.of(polylines.values), - )); + return Padding( + padding: EdgeInsets.only(right: 10.0, left: 10.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(20.0), + child: SizedBox( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.5, + child: GoogleMap( + initialCameraPosition: _initialLocation, + mapType: MapType.normal, + onMapCreated: (GoogleMapController controller) { + mapController = controller; + _getPolyline(widget.waypoints); + }, + markers: Set.of(markers.values), + polylines: Set.of(polylines.values), + )))); } _addMarker(LatLng position, String id, BitmapDescriptor descriptor) { diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index cc59e13f..be9f2a71 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -28,16 +28,40 @@ class _ArrivalTime extends State { String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); String arrivalTime = ''; + @override + void initState() { + super.initState(); + setArrivalTime(); + } + @override Widget build(BuildContext context) { - setTravelTime(); return Text( arrivalTime, style: const TextStyle(fontSize: 30), ); } - getTravelTime(double startLat, double startLng, double endLat, double endLng, + void setArrivalTime() async { + int durationInSeconds = await getArrivalTime( + widget.nurseryLatitude, + widget.nurseryLongitude, + widget.guardianLatitude, + widget.guardianLongitude, + widget.waypoints); + + DateTime nurseryToBusStopTime = + widget.departureTime.add(Duration(seconds: durationInSeconds)); + + String formattedArrivalTime = + '${nurseryToBusStopTime.hour.toString().padLeft(2, '0')}:${nurseryToBusStopTime.minute.toString().padLeft(2, '0')}'; + + setState(() { + arrivalTime = formattedArrivalTime; + }); + } + + getArrivalTime(double startLat, double startLng, double endLat, double endLng, List waypoints) async { String apiKey = dotenv.get("GOOGLE_MAP_API_KEY"); String url = ''; @@ -50,7 +74,7 @@ class _ArrivalTime extends State { point.latitude == guardianLatitude && point.longitude == guardianLongitude); if (guardianIndex != -1) { - waypoints = waypoints.sublist(0, guardianIndex); + waypoints = waypoints.sublist(0, guardianIndex + 1); } String waypointsString = waypoints @@ -76,23 +100,4 @@ class _ArrivalTime extends State { print('Failed to fetch directions.'); } } - - void setTravelTime() async { - int durationInSeconds = await getTravelTime( - widget.nurseryLatitude, - widget.nurseryLongitude, - widget.guardianLatitude, - widget.guardianLongitude, - widget.waypoints); - - DateTime nurseryToBusStopTime = - widget.departureTime.add(Duration(seconds: durationInSeconds)); - - String formattedArrivalTime = - '${nurseryToBusStopTime.hour.toString().padLeft(2, '0')}:${nurseryToBusStopTime.minute.toString().padLeft(2, '0')}'; - - setState(() { - arrivalTime = formattedArrivalTime; - }); - } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart new file mode 100644 index 00000000..7e10ffd2 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart @@ -0,0 +1,146 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:http/http.dart' as http; +import 'dart:convert'; +import 'dart:math' as math; +import '../map_page.dart'; + +class BusToBusStopTime extends StatefulWidget { + final List waypoints; + double busLatitude, busLongitude; + double guardianLatitude, guardianLongitude; + + BusToBusStopTime( + {super.key, + required this.waypoints, + required this.busLatitude, + required this.busLongitude, + required this.guardianLatitude, + required this.guardianLongitude}); + + @override + State createState() => _BusToBusStopTime(); +} + +class _BusToBusStopTime extends State { + String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); + String busToBusStopTime = ''; + + @override + void initState() { + super.initState(); + setArrivalTime(); + } + + @override + Widget build(BuildContext context) { + return Text( + "${busToBusStopTime}分", + style: const TextStyle(fontSize: 30), + ); + } + + void setArrivalTime() async { + int durationInMinutes = (await getArrivalTime( + widget.busLatitude, + widget.busLongitude, + widget.guardianLatitude, + widget.guardianLongitude, + widget.waypoints) / + 60) + .toInt(); + + String formattedBusToBusStopTime = durationInMinutes.toString(); + + setState(() { + busToBusStopTime = formattedBusToBusStopTime; + }); + } + + getArrivalTime(double startLat, double startLng, double endLat, double endLng, + List waypoints) async { + String apiKey = dotenv.get("GOOGLE_MAP_API_KEY"); + String url = ''; + + int nearestWaypointIndex = + findNearestWaypointIndex(startLat, startLng, waypoints); + + double busToNextWaypointDistance = calculateDistance( + startLat, + startLng, + waypoints[nearestWaypointIndex + 1].latitude, + waypoints[nearestWaypointIndex + 1].longitude); + + double nearestWaypointToNextWaypointDistance = calculateDistance( + waypoints[nearestWaypointIndex].latitude, + waypoints[nearestWaypointIndex].longitude, + waypoints[nearestWaypointIndex + 1].latitude, + waypoints[nearestWaypointIndex + 1].longitude); + + if (busToNextWaypointDistance > nearestWaypointToNextWaypointDistance) { + nearestWaypointIndex++; + } + + if (waypoints[0].latitude == endLat && waypoints[0].longitude == endLng) { + url = 'https://maps.googleapis.com/maps/api/directions/json' + '?destination=$endLat,$endLng&origin=$startLat,$startLng&key=$apiKey'; + } else { + int guardianIndex = waypoints.indexWhere((point) => + point.latitude == guardianLatitude && + point.longitude == guardianLongitude); + if (guardianIndex != -1) { + waypoints = waypoints.sublist(nearestWaypointIndex, guardianIndex + 1); + } + + String waypointsString = waypoints + .map((point) => 'via:${point.latitude},${point.longitude}|') + .join(''); + + url = 'https://maps.googleapis.com/maps/api/directions/json' + '?destination=$endLat,$endLng&origin=$startLat,$startLng&waypoints=$waypointsString&key=$apiKey'; + } + + final response = await http.get(Uri.parse(url)); + + if (response.statusCode == 200) { + final data = json.decode(response.body); + if (data['routes'] != null && data['routes'].isNotEmpty) { + final route = data['routes'][0]; + final duration = route['legs'][0]['duration']['value']; + return duration; + } else { + print('No routes found.'); + } + } else { + print('Failed to fetch directions.'); + } + } + + int findNearestWaypointIndex( + double busLat, double busLng, List waypoints) { + int nearestIndex = 0; + double nearestDistance = double.infinity; + + for (int i = 0; i < waypoints.length; i++) { + double distance = calculateDistance( + busLat, busLng, waypoints[i].latitude, waypoints[i].longitude); + if (distance < nearestDistance) { + nearestDistance = distance; + nearestIndex = i; + } + } + + return nearestIndex; + } + + double calculateDistance(double lat1, double lon1, double lat2, double lon2) { + var p = 0.017453292519943295; + var a = 0.5 - + math.cos((lat2 - lat1) * p) / 2 + + math.cos(lat1 * p) * + math.cos(lat2 * p) * + (1 - math.cos((lon2 - lon1) * p)) / + 2; + return 12742 * math.asin(math.sqrt(a)); + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 05db6811..b8e81765 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus_guardian/components/utils/google_map_view.dart'; +import 'package:where_child_bus_guardian/pages/map_page/components/bus_to_bus_stop_time.dart'; import 'package:where_child_bus_guardian/pages/map_page/components/arrival_time.dart'; import '../styles/styles.dart'; @@ -85,13 +86,13 @@ class _MapPageState extends State { children: [ fieldTitleAndTime( "到着まで", - ArrivalTime( - waypoints: waypoints, - nurseryLatitude: nurseryLatitude, - nurseryLongitude: nurseryLongitude, - guardianLatitude: guardianLatitude, - guardianLongitude: guardianLongitude, - departureTime: departureTime)), + BusToBusStopTime( + waypoints: waypoints, + busLatitude: busLatitude, + busLongitude: busLongitude, + guardianLatitude: guardianLatitude, + guardianLongitude: guardianLongitude, + )), fieldTitleAndTime( "到着予定時刻", ArrivalTime( @@ -100,7 +101,7 @@ class _MapPageState extends State { nurseryLongitude: nurseryLongitude, guardianLatitude: guardianLatitude, guardianLongitude: guardianLongitude, - departureTime: departureTime)) + departureTime: departureTime)), ]); } From fb4847612ccd4d5e06c709638f83f2ca1f3080ac Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 17 Feb 2024 17:29:28 +0900 Subject: [PATCH 395/771] =?UTF-8?q?refactor:const=E3=81=AE=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/google_map_view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index 999085f4..897fa96d 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -51,7 +51,7 @@ class _GoogleMapView extends State { @override Widget build(BuildContext context) { return Padding( - padding: EdgeInsets.only(right: 10.0, left: 10.0), + padding: const EdgeInsets.only(right: 10.0, left: 10.0), child: ClipRRect( borderRadius: BorderRadius.circular(20.0), child: SizedBox( From 1abce824108cee67fc51451b278fccec44220692 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 17 Feb 2024 18:10:34 +0900 Subject: [PATCH 396/771] =?UTF-8?q?feat(ml):=20dockerfile=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 machine_learning/dockerfile diff --git a/machine_learning/dockerfile b/machine_learning/dockerfile new file mode 100644 index 00000000..ed276574 --- /dev/null +++ b/machine_learning/dockerfile @@ -0,0 +1,12 @@ +FROM python:3.11.6-slim + +WORKDIR /machine-learning +COPY ./requirements.lock /machine-learning/ + +RUN sed '/-e/d' requirements.lock > requirements.txt +RUN pip install -r requirements.txt + +COPY ./src ./src + +# TODO: server.pyをproto-genから切り出し +ENTRYPOINT ["python", "/machine-learning/src/proto-gen/machine_learning/v1/server.py"] From fe47d8a8446ecd59025de6789202f46f02a009fa Mon Sep 17 00:00:00 2001 From: Takuya Kataiwa Date: Sat, 17 Feb 2024 19:34:37 +0900 Subject: [PATCH 397/771] refactor: bug fixed(num=varieations, RandomCrop size changed same as input) --- .../src/face_detect_model/data/faceDetectDataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index 1a15f0ff..ea80de9b 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -37,7 +37,7 @@ def __init__(self, config, transform=None): self.face_data.append((label, default_transform(image_pil))) - augmented_images = self.augment_image(image_pil, num_variations=5) + augmented_images = self.augment_image(image_pil, num_variations=100) for aug_img in augmented_images: self.face_data.append((label, aug_img)) @@ -50,7 +50,7 @@ def get_default_transforms(self): def get_augment_transform(self): return transforms.Compose([ transforms.RandomApply([transforms.Resize((256, 256))], p=0.5), - transforms.RandomCrop((224, 224), p=0.5), + transforms.RandomCrop((100, 100)), transforms.RandomHorizontalFlip(p=0.5), transforms.RandomVerticalFlip(p=0.5), transforms.RandomApply([transforms.RandomRotation(degrees=180)], p=0.5), From 55e310975b6bb871c50263a2c5d6db8215c37213 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 17 Feb 2024 20:09:56 +0900 Subject: [PATCH 398/771] =?UTF-8?q?chore:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E3=82=92StateFul=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/child_list/child_list.dart | 4 +++- .../student_detail_sheet.dart | 20 +++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/frontend/where_child_bus/lib/components/child_list/child_list.dart b/frontend/where_child_bus/lib/components/child_list/child_list.dart index 912c8a8e..6d99222c 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list.dart @@ -49,7 +49,9 @@ class _ChildListState extends State { await showModalBottomSheet( context: context, builder: (BuildContext context) { - return StudentDetailSheet(childName: widget.children[index].name); + return StudentDetailSheet( + child: widget.children[index], + ); }); } } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart index 116f4c91..3ad2dc9e 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart @@ -1,12 +1,17 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; -class StudentDetailSheet extends StatelessWidget { - final String childName; +class StudentDetailSheet extends StatefulWidget { + final Child child; - //将来的にはChild型を受け取る。 - const StudentDetailSheet({super.key, required this.childName}); + const StudentDetailSheet({Key? key, required this.child}) : super(key: key); + @override + _StudentDetailSheetState createState() => _StudentDetailSheetState(); +} + +class _StudentDetailSheetState extends State { @override Widget build(BuildContext context) { return Container( @@ -39,7 +44,6 @@ class StudentDetailSheet extends StatelessWidget { alignment: Alignment.topRight, child: ElevatedButton( style: ElevatedButton.styleFrom(shape: const CircleBorder()), - //将来的に編集画面へ遷移する。 onPressed: () { Navigator.of(context).push(MaterialPageRoute( builder: (BuildContext context) => StudentEditPage())); @@ -57,13 +61,13 @@ class StudentDetailSheet extends StatelessWidget { const SizedBox( width: 50, ), - Text(childName, + Text(widget.child.name, style: const TextStyle(color: Colors.black, fontSize: 24)), ]); } - //TODO: 将来的に画像を受け取る。 Widget childFaceImage() { + // 画像を受け取る処理を将来的に実装 return const SizedBox( width: 100, height: 100, @@ -73,8 +77,8 @@ class StudentDetailSheet extends StatelessWidget { ); } - //TODO: 将来的にはデータを受け取る。 Widget childDetailList() { + // 詳細リストのデータを受け取る処理を将来的に実装 return Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, From ae50f9d10b7c787dd0eb4459295852379802646b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 20:09:59 +0900 Subject: [PATCH 399/771] =?UTF-8?q?feat:=20python=20gRPCClient=E3=82=92?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=BF=E3=83=A9=E3=82=AF=E3=82=BF=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.env.example | 6 +--- backend/cmd/server/main.go | 13 +++++++++ backend/config/config.go | 26 +++++++---------- backend/gprc_server/grpc_server.go | 4 +-- backend/gprc_server/option.go | 8 +++++ backend/usecases/bus/bus.go | 47 +++++++++++++++++++++++++----- 6 files changed, 74 insertions(+), 30 deletions(-) diff --git a/backend/.env.example b/backend/.env.example index c2dfb74f..f9882f57 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -8,8 +8,4 @@ MODE_DEV= GOOGLE_APPLICATION_CREDENTIALS= STORAGE_BUCKET_NAME= PASSWORD_PEPPER= -ENDPOINT_PING_REQUEST= -ENDPOINT_CREATE_CHILD_NOTIFICATION= -ENDPOINT_CREATE_BUS_NOTIFICATION= -ENDPOINT_CHILD_GET_ON_BUS_NOTIFICATION= -ENDPOINT_CHILD_GET_OFF_BUS_NOTIFICATION= \ No newline at end of file +ML_ADDR= \ No newline at end of file diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index 13fe4726..6302db47 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -10,9 +10,12 @@ import ( "syscall" "cloud.google.com/go/storage" + mlv1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1" "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql" "golang.org/x/exp/slog" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" @@ -77,6 +80,15 @@ func main() { log.Println("Connected to Cloud Storage!") + // 機械学習gRPCサーバーへの接続を開始 + log.Println("Connecting to ML gRPC server...") + conn, err := grpc.Dial(config.MLAddress, grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + log.Fatal(err) + } + defer conn.Close() + mlClient := mlv1.NewMachineLearningServiceClient(conn) + // loggerを作成 logger := slog.Default() @@ -87,6 +99,7 @@ func main() { grpc_server.WithReflection(config.ModeDev), grpc_server.WithStorageClient(storageClient), grpc_server.WithBucketName(config.StorageBucketName), + grpc_server.WithMLClient(mlClient), ) lsnr, err := net.Listen("tcp", ":"+config.GrpcPort) if err != nil { diff --git a/backend/config/config.go b/backend/config/config.go index b12a5f15..a6bf2f24 100644 --- a/backend/config/config.go +++ b/backend/config/config.go @@ -8,21 +8,17 @@ import ( ) type Config struct { - DSN string `envconfig:"DSN" required:"true"` - DBUser string `envconfig:"DB_USER_NAME" required:"true"` - DBPassword string `envconfig:"DB_PASSWORD" required:"true"` - DBAddress string `envconfig:"DB_ADDR" required:"true"` - DBName string `envconfig:"DB_NAME" required:"true"` - GrpcPort string `envconfig:"PORT" default:"50051"` - ModeDev bool `envconfig:"MODE_DEV" default:"true"` - GoogleApplicationCredentials string `envconfig:"GOOGLE_APPLICATION_CREDENTIALS" required:"true"` - StorageBucketName string `envconfig:"STORAGE_BUCKET_NAME" required:"true"` - PasswordPepper string `envconfig:"PASSWORD_PEPPER" required:"true"` - EndPointPingRequest string `envconfig:"ENDPOINT_PING_REQUEST" required:"true"` - EndPointCreateChildNotification string `envconfig:"ENDPOINT_CREATE_CHILD_NOTIFICATION" required:"true"` - EndPointCreateBusNotification string `envconfig:"ENDPOINT_CREATE_BUS_NOTIFICATION" required:"true"` - EndPointChildGetOnBusNotification string `envconfig:"ENDPOINT_CHILD_GET_ON_BUS_NOTIFICATION" required:"true"` - EndPointChildGetOffBusNotification string `envconfig:"ENDPOINT_CHILD_GET_OFF_BUS_NOTIFICATION" required:"true"` + DSN string `envconfig:"DSN" required:"true"` + DBUser string `envconfig:"DB_USER_NAME" required:"true"` + DBPassword string `envconfig:"DB_PASSWORD" required:"true"` + DBAddress string `envconfig:"DB_ADDR" required:"true"` + DBName string `envconfig:"DB_NAME" required:"true"` + GrpcPort string `envconfig:"PORT" default:"50051"` + ModeDev bool `envconfig:"MODE_DEV" default:"true"` + GoogleApplicationCredentials string `envconfig:"GOOGLE_APPLICATION_CREDENTIALS" required:"true"` + StorageBucketName string `envconfig:"STORAGE_BUCKET_NAME" required:"true"` + PasswordPepper string `envconfig:"PASSWORD_PEPPER" required:"true"` + MLAddress string `envconfig:"ML_ADDR" required:"true"` } func New() (*Config, error) { diff --git a/backend/gprc_server/grpc_server.go b/backend/gprc_server/grpc_server.go index 6f45f09f..84f33e06 100644 --- a/backend/gprc_server/grpc_server.go +++ b/backend/gprc_server/grpc_server.go @@ -39,11 +39,11 @@ func New(opts ...optionFunc) *grpc.Server { reflection.Register(srv) } - busInteractor := bus.NewInteractor(opt.entClient, opt.logger) + busInteractor := bus.NewInteractor(opt.entClient, opt.logger, opt.MLClient) busSrv := grpc_interfaces.NewBusServiceServer(busInteractor) pb.RegisterBusServiceServer(srv, busSrv) - childInteractor := child.NewInteractor(opt.entClient, opt.logger, opt.storageClient, opt.bucketName) // NOTE: GCSを使うのでstorageClientとbucketNameを渡す + childInteractor := child.NewInteractor(opt.entClient, opt.logger, opt.storageClient, opt.MLClient, opt.bucketName) // NOTE: GCSを使うのでstorageClientとbucketNameを渡す childSrv := grpc_interfaces.NewChildServiceServer(childInteractor) pb.RegisterChildServiceServer(srv, childSrv) diff --git a/backend/gprc_server/option.go b/backend/gprc_server/option.go index a6be0fda..d783c115 100644 --- a/backend/gprc_server/option.go +++ b/backend/gprc_server/option.go @@ -3,6 +3,7 @@ package grpc_server import ( "cloud.google.com/go/storage" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + mlv1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1" "golang.org/x/exp/slog" ) @@ -12,6 +13,7 @@ type option struct { storageClient *storage.Client bucketName string useReflection bool + MLClient mlv1.MachineLearningServiceClient } func defaultOption() *option { @@ -52,3 +54,9 @@ func WithBucketName(b string) optionFunc { o.bucketName = b } } + +func WithMLClient(c mlv1.MachineLearningServiceClient) optionFunc { + return func(o *option) { + o.MLClient = c + } +} diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 413304f4..70a5f4fd 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -8,7 +8,6 @@ import ( "context" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" @@ -19,15 +18,17 @@ import ( guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" stationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + mlv1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1" ) type Interactor struct { - entClient *ent.Client - logger *slog.Logger + entClient *ent.Client + logger *slog.Logger + MLServiceClient mlv1.MachineLearningServiceClient } -func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { - return &Interactor{entClient, logger} +func NewInteractor(entClient *ent.Client, logger *slog.Logger, mlClient mlv1.MachineLearningServiceClient) *Interactor { + return &Interactor{entClient, logger, mlClient} } func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (*pb.CreateBusResponse, error) { @@ -121,13 +122,43 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* AddStations(station). Save(ctx) if err != nil { + i.logger.Error("failed to update bus with stations", err) return nil, fmt.Errorf("failed to update bus with stations: %w", err) } } - //TODO: CloudFunctionにバスの作成を通知 - cfg, _ := config.New() - utils.MakeCloudFunctionRequest(cfg.EndPointCreateBusNotification, "POST") + morningChildIds := make([]string, len(morningChildren)) + for i, child := range morningChildren { + morningChildIds[i] = child.ID.String() + } + + //TODO: MLgRPCにバスの作成を通知 + // _, err = i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ + // BusId: bus.ID.String(), + // BusType: mlv1.BusType_BUS_TYPE_MORNING, + // ChildIds: morningChildIds, + // }) + + // if err != nil { + // i.logger.Error("failed to train ML model", err) + // return nil, err + // } + + // eveningChildIds := make([]string, len(eveningChildren)) + // for i, child := range eveningChildren { + // eveningChildIds[i] = child.ID.String() + // } + + // _, err = i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ + // BusId: bus.ID.String(), + // BusType: mlv1.BusType_BUS_TYPE_EVENING, + // ChildIds: eveningChildIds, + // }) + + // if err != nil { + // i.logger.Error("failed to train ML model", err) + // return nil, err + // } // Make sure to commit the transaction since everything succeeded commit = true From 32337cca946e0541a3a4e9ec9ae7d9ec6e86e3b6 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 20:11:55 +0900 Subject: [PATCH 400/771] =?UTF-8?q?fix:=20ChildPhoto=E3=81=AE=E3=83=95?= =?UTF-8?q?=E3=82=A3=E3=83=BC=E3=83=AB=E3=83=89=E7=95=AA=E5=8F=B7=E3=81=8C?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=81=95=E3=82=8C=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/where_child_bus/v1/resources.pb.go | 129 ++++++++---------- backend/usecases/child/child.go | 123 +++++++++++++---- .../where_child_bus/v1/resources.pb.dart | 40 ++---- .../where_child_bus/v1/resources.pbjson.dart | 11 +- .../where_child_bus/v1/resources_pb2.py | 24 ++-- .../where_child_bus/v1/resources_pb2.pyi | 6 +- proto/where_child_bus/v1/resources.proto | 5 +- 7 files changed, 191 insertions(+), 147 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 346606dd..6692f9d1 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -1192,9 +1192,8 @@ type ChildPhoto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - Photo []byte `protobuf:"bytes,3,opt,name=photo,proto3" json:"photo,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *ChildPhoto) Reset() { @@ -1243,13 +1242,6 @@ func (x *ChildPhoto) GetChildId() string { return "" } -func (x *ChildPhoto) GetPhoto() []byte { - if x != nil { - return x.Photo - } - return nil -} - func (x *ChildPhoto) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -1533,67 +1525,66 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xad, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, - 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, - 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, - 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, - 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, - 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x56, 0x0a, - 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, - 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, - 0x12, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, - 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, - 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, - 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, - 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, - 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, - 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, - 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, + 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, + 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x56, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, + 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x44, 0x45, 0x4f, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, + 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, + 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, + 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, + 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, + 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, + 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, + 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index 227bd7b7..e435223d 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -9,26 +9,29 @@ import ( "context" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childBusAssociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + childPhotoRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + + mlv1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1" ) type Interactor struct { - entClient *ent.Client - logger *slog.Logger - StorageClient *storage.Client - BucketName string + entClient *ent.Client + logger *slog.Logger + StorageClient *storage.Client + MLServiceClient mlv1.MachineLearningServiceClient + BucketName string } -func NewInteractor(entClient *ent.Client, logger *slog.Logger, storageClient *storage.Client, bucketName string) *Interactor { - return &Interactor{entClient, logger, storageClient, bucketName} +func NewInteractor(entClient *ent.Client, logger *slog.Logger, storageClient *storage.Client, mlClient mlv1.MachineLearningServiceClient, bucketName string) *Interactor { + return &Interactor{entClient, logger, storageClient, mlClient, bucketName} } func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest) (*pb.CreateChildResponse, error) { @@ -120,17 +123,23 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest } } + // TODO: 顔検出と切り抜きのリクエストを送信 + // res, err := i.MLServiceClient.FaceDetectAndClip(ctx, &mlv1.FaceDetectAndClipRequest{ + // NurseryId: nurseryID.String(), + // ChildId: child.ID.String(), + // }) + + // if !res.IsStarted && err != nil { + // i.logger.Error("failed to start face detection and clipping", "error", err) + // return nil, err + // } + // トランザクションのコミット if err := tx.Commit(); err != nil { return nil, fmt.Errorf("failed to commit transaction: %w", err) } commit = true // トランザクションが成功した - // 最後にCloudFunctionに通知を送信 - // TODO: 将来的に子供作成の通知にする - cfg, err := config.New() - utils.MakeCloudFunctionRequest(cfg.EndPointPingRequest, "POST") - return &pb.CreateChildResponse{ Child: utils.ToPbChild(child), }, nil @@ -144,15 +153,36 @@ func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetCh children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { return tx.Child.Query(). - Where(childRepo.HasGuardianWith(guardianRepo.IDEQ(guardianID))). - WithGuardian(), nil + Where(childRepo.HasGuardianWith(guardianRepo.IDEQ(guardianID))). + WithGuardian(), nil }) if err != nil { return nil, err } - return &pb.GetChildListByGuardianIDResponse{Children: children}, nil + var childPhotoList []*pb.ChildPhoto + for _, child := range children { + childPhotoRecordList, err := i.entClient.ChildPhoto.Query(). + Where(childPhotoRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(child.Id)))). + All(ctx) + + if err != nil { + i.logger.Error("failed to get child photo list", "error", err) + return nil, err + } + + for _, photo := range childPhotoRecordList { + childPhotoList = append(childPhotoList, &pb.ChildPhoto{ + ChildId: child.Id, + Id: photo.ID.String(), + }) + } + } + + return &pb.GetChildListByGuardianIDResponse{ + Children: children, + Photos: childPhotoList}, nil } func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChildListByNurseryIDRequest) (*pb.GetChildListByNurseryIDResponse, error) { @@ -170,10 +200,33 @@ func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChi }) if err != nil { + i.logger.Error("failed to get children by nursery ID", "error", err) return nil, err } - return &pb.GetChildListByNurseryIDResponse{Children: children}, nil + // 子供の写真を取得 + var photos []*pb.ChildPhoto + for _, child := range children { + photoRecordList, err := i.entClient.ChildPhoto.Query(). + Where(childPhotoRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(child.Id)))).All(ctx) + + if err != nil { + i.logger.Error("failed to get child photo list", "error", err) + return nil, err + } + + for _, photo := range photoRecordList { + photos = append(photos, &pb.ChildPhoto{ + ChildId: child.Id, + Id: photo.ID.String(), + }) + } + } + + return &pb.GetChildListByNurseryIDResponse{ + Children: children, + Photos: photos, + }, nil } func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildListByBusIDRequest) (*pb.GetChildListByBusIDResponse, error) { @@ -182,22 +235,40 @@ func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildLi return nil, fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) } - // バスIDに紐づく子供のIDを中間テーブルを通じて取得 - children, err := i.entClient.Child.Query(). - Where(childRepo.HasChildBusAssociationsWith(childBusAssociationRepo.BusIDEQ(busID))). - WithGuardian(). - All(ctx) + children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { + return tx.Child.Query(). + Where(childRepo.HasChildBusAssociationsWith(childBusAssociationRepo.BusIDEQ(busID))). + WithGuardian(), nil + }) + if err != nil { - return nil, fmt.Errorf("failed to get children by bus ID: %w", err) + i.logger.Error("failed to get children by bus ID", "error", err) + return nil, err } - // 子供の情報をプロトコルバッファ形式に変換 - pbChildren := make([]*pb.Child, 0, len(children)) + // 子供の写真を取得 + var photos []*pb.ChildPhoto for _, child := range children { - pbChildren = append(pbChildren, utils.ToPbChild(child)) + photoRecordList, err := i.entClient.ChildPhoto.Query(). + Where(childPhotoRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(child.Id)))).All(ctx) + + if err != nil { + i.logger.Error("failed to get child photo list", "error", err) + return nil, err + } + + for _, photo := range photoRecordList { + photos = append(photos, &pb.ChildPhoto{ + ChildId: child.Id, + Id: photo.ID.String(), + }) + } } - return &pb.GetChildListByBusIDResponse{Children: pbChildren}, nil + return &pb.GetChildListByBusIDResponse{ + Children: children, + Photos: photos, + }, nil } // getChildList abstracts the common logic for fetching child lists. diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 0040c988..024e2553 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -1441,7 +1441,6 @@ class ChildPhoto extends $pb.GeneratedMessage { factory ChildPhoto({ $core.String? id, $core.String? childId, - $core.List<$core.int>? photo, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, }) { @@ -1452,9 +1451,6 @@ class ChildPhoto extends $pb.GeneratedMessage { if (childId != null) { $result.childId = childId; } - if (photo != null) { - $result.photo = photo; - } if (createdAt != null) { $result.createdAt = createdAt; } @@ -1470,9 +1466,8 @@ class ChildPhoto extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildPhoto', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'childId') - ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'photo', $pb.PbFieldType.OY) - ..aOM<$7.Timestamp>(4, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(3, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(4, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1516,35 +1511,26 @@ class ChildPhoto extends $pb.GeneratedMessage { void clearChildId() => clearField(2); @$pb.TagNumber(3) - $core.List<$core.int> get photo => $_getN(2); + $7.Timestamp get createdAt => $_getN(2); + @$pb.TagNumber(3) + set createdAt($7.Timestamp v) { setField(3, v); } @$pb.TagNumber(3) - set photo($core.List<$core.int> v) { $_setBytes(2, v); } + $core.bool hasCreatedAt() => $_has(2); @$pb.TagNumber(3) - $core.bool hasPhoto() => $_has(2); + void clearCreatedAt() => clearField(3); @$pb.TagNumber(3) - void clearPhoto() => clearField(3); + $7.Timestamp ensureCreatedAt() => $_ensure(2); @$pb.TagNumber(4) - $7.Timestamp get createdAt => $_getN(3); + $7.Timestamp get updatedAt => $_getN(3); @$pb.TagNumber(4) - set createdAt($7.Timestamp v) { setField(4, v); } + set updatedAt($7.Timestamp v) { setField(4, v); } @$pb.TagNumber(4) - $core.bool hasCreatedAt() => $_has(3); + $core.bool hasUpdatedAt() => $_has(3); @$pb.TagNumber(4) - void clearCreatedAt() => clearField(4); + void clearUpdatedAt() => clearField(4); @$pb.TagNumber(4) - $7.Timestamp ensureCreatedAt() => $_ensure(3); - - @$pb.TagNumber(5) - $7.Timestamp get updatedAt => $_getN(4); - @$pb.TagNumber(5) - set updatedAt($7.Timestamp v) { setField(5, v); } - @$pb.TagNumber(5) - $core.bool hasUpdatedAt() => $_has(4); - @$pb.TagNumber(5) - void clearUpdatedAt() => clearField(5); - @$pb.TagNumber(5) - $7.Timestamp ensureUpdatedAt() => $_ensure(4); + $7.Timestamp ensureUpdatedAt() => $_ensure(3); } class BoardingRecord extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index feed0e70..7d849c2b 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -304,18 +304,17 @@ const ChildPhoto$json = { '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, - {'1': 'photo', '3': 3, '4': 1, '5': 12, '10': 'photo'}, - {'1': 'created_at', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'created_at', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; /// Descriptor for `ChildPhoto`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List childPhotoDescriptor = $convert.base64Decode( 'CgpDaGlsZFBob3RvEg4KAmlkGAEgASgJUgJpZBIZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZB' - 'IUCgVwaG90bxgDIAEoDFIFcGhvdG8SOQoKY3JlYXRlZF9hdBgEIAEoCzIaLmdvb2dsZS5wcm90' - 'b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRhdGVkX2F0GAUgASgLMhouZ29vZ2xlLn' - 'Byb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); + 'I5CgpjcmVhdGVkX2F0GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRl' + 'ZEF0EjkKCnVwZGF0ZWRfYXQYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cG' + 'RhdGVkQXQ='); @$core.Deprecated('Use boardingRecordDescriptor instead') const BoardingRecord$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index 875d9425..9a506096 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x87\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xc3\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x14\n\x05photo\x18\x03 \x01(\x0cR\x05photo\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x87\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xad\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x39\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_STATUS']._serialized_start=3372 - _globals['_STATUS']._serialized_end=3469 - _globals['_VIDEOTYPE']._serialized_start=3471 - _globals['_VIDEOTYPE']._serialized_end=3557 - _globals['_SEX']._serialized_start=3559 - _globals['_SEX']._serialized_end=3628 - _globals['_BUSTYPE']._serialized_start=3630 - _globals['_BUSTYPE']._serialized_end=3709 + _globals['_STATUS']._serialized_start=3350 + _globals['_STATUS']._serialized_end=3447 + _globals['_VIDEOTYPE']._serialized_start=3449 + _globals['_VIDEOTYPE']._serialized_end=3535 + _globals['_SEX']._serialized_start=3537 + _globals['_SEX']._serialized_end=3606 + _globals['_BUSTYPE']._serialized_start=3608 + _globals['_BUSTYPE']._serialized_end=3687 _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=414 _globals['_NURSERYRESPONSE']._serialized_start=417 @@ -50,7 +50,7 @@ _globals['_BUSSTATIONASSOCIATION']._serialized_start=2919 _globals['_BUSSTATIONASSOCIATION']._serialized_end=2996 _globals['_CHILDPHOTO']._serialized_start=2999 - _globals['_CHILDPHOTO']._serialized_end=3194 - _globals['_BOARDINGRECORD']._serialized_start=3197 - _globals['_BOARDINGRECORD']._serialized_end=3370 + _globals['_CHILDPHOTO']._serialized_end=3172 + _globals['_BOARDINGRECORD']._serialized_start=3175 + _globals['_BOARDINGRECORD']._serialized_end=3348 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi index 7b64831c..230298bc 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi @@ -235,18 +235,16 @@ class BusStationAssociation(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., station_id: _Optional[str] = ...) -> None: ... class ChildPhoto(_message.Message): - __slots__ = ("id", "child_id", "photo", "created_at", "updated_at") + __slots__ = ("id", "child_id", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] CHILD_ID_FIELD_NUMBER: _ClassVar[int] - PHOTO_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str child_id: str - photo: bytes created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., photo: _Optional[bytes] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class BoardingRecord(_message.Message): __slots__ = ("id", "child_id", "bus_id", "is_boarding", "timestamp") diff --git a/proto/where_child_bus/v1/resources.proto b/proto/where_child_bus/v1/resources.proto index 8ca7db53..c9b6121b 100644 --- a/proto/where_child_bus/v1/resources.proto +++ b/proto/where_child_bus/v1/resources.proto @@ -139,9 +139,8 @@ message BusStationAssociation { message ChildPhoto { string id = 1; string child_id = 2; - bytes photo = 3; - google.protobuf.Timestamp created_at = 4; - google.protobuf.Timestamp updated_at = 5; + google.protobuf.Timestamp created_at = 3; + google.protobuf.Timestamp updated_at = 4; } message BoardingRecord { From 71d090e438e65206475133184b71a43297f0e0e2 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 17 Feb 2024 20:39:43 +0900 Subject: [PATCH 401/771] =?UTF-8?q?chore(ml):=20requirements.lock=E3=81=AE?= =?UTF-8?q?=E5=86=8D=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/requirements-dev.lock | 14 -------------- machine_learning/requirements.lock | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/machine_learning/requirements-dev.lock b/machine_learning/requirements-dev.lock index 1a0277b6..7d273106 100644 --- a/machine_learning/requirements-dev.lock +++ b/machine_learning/requirements-dev.lock @@ -5,7 +5,6 @@ # pre: false # features: [] # all-features: false -# with-sources: false -e file:. cachetools==5.3.2 @@ -28,18 +27,6 @@ markupsafe==2.1.5 mpmath==1.3.0 networkx==3.2.1 numpy==1.26.4 -nvidia-cublas-cu12==12.1.3.1 -nvidia-cuda-cupti-cu12==12.1.105 -nvidia-cuda-nvrtc-cu12==12.1.105 -nvidia-cuda-runtime-cu12==12.1.105 -nvidia-cudnn-cu12==8.9.2.26 -nvidia-cufft-cu12==11.0.2.54 -nvidia-curand-cu12==10.3.2.106 -nvidia-cusolver-cu12==11.4.5.107 -nvidia-cusparse-cu12==12.1.0.106 -nvidia-nccl-cu12==2.19.3 -nvidia-nvjitlink-cu12==12.3.101 -nvidia-nvtx-cu12==12.1.105 opencv-python==4.9.0.80 pillow==10.2.0 protobuf==4.25.2 @@ -52,7 +39,6 @@ rsa==4.9 sympy==1.12 torch==2.2.0 torchvision==0.17.0 -triton==2.2.0 tqdm==4.66.2 typing-extensions==4.9.0 urllib3==2.2.0 diff --git a/machine_learning/requirements.lock b/machine_learning/requirements.lock index 1a0277b6..7d273106 100644 --- a/machine_learning/requirements.lock +++ b/machine_learning/requirements.lock @@ -5,7 +5,6 @@ # pre: false # features: [] # all-features: false -# with-sources: false -e file:. cachetools==5.3.2 @@ -28,18 +27,6 @@ markupsafe==2.1.5 mpmath==1.3.0 networkx==3.2.1 numpy==1.26.4 -nvidia-cublas-cu12==12.1.3.1 -nvidia-cuda-cupti-cu12==12.1.105 -nvidia-cuda-nvrtc-cu12==12.1.105 -nvidia-cuda-runtime-cu12==12.1.105 -nvidia-cudnn-cu12==8.9.2.26 -nvidia-cufft-cu12==11.0.2.54 -nvidia-curand-cu12==10.3.2.106 -nvidia-cusolver-cu12==11.4.5.107 -nvidia-cusparse-cu12==12.1.0.106 -nvidia-nccl-cu12==2.19.3 -nvidia-nvjitlink-cu12==12.3.101 -nvidia-nvtx-cu12==12.1.105 opencv-python==4.9.0.80 pillow==10.2.0 protobuf==4.25.2 @@ -52,7 +39,6 @@ rsa==4.9 sympy==1.12 torch==2.2.0 torchvision==0.17.0 -triton==2.2.0 tqdm==4.66.2 typing-extensions==4.9.0 urllib3==2.2.0 From ed8b4aaa02cdd95e1dbf951d989ef33bac7e28b8 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 20:48:25 +0900 Subject: [PATCH 402/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E6=83=85=E5=A0=B1=E3=82=92=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=83=BC=E3=83=A0=E3=81=A7=E5=8F=97=E3=81=91=E5=8F=96?= =?UTF-8?q?=E3=82=8A=E3=80=81=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B=E6=A9=9F?= =?UTF-8?q?=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/bus.go | 12 ++++++------ backend/usecases/bus/bus.go | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/backend/interfaces/bus.go b/backend/interfaces/bus.go index 62633ae7..4577a0c1 100644 --- a/backend/interfaces/bus.go +++ b/backend/interfaces/bus.go @@ -11,9 +11,13 @@ type busServiceServer struct { interactor *bus.Interactor } +func NewBusServiceServer(interactor *bus.Interactor) pb.BusServiceServer { + return &busServiceServer{interactor} +} + // SendLocationContinuous implements where_child_busv1.BusServiceServer. -func (*busServiceServer) SendLocationContinuous(pb.BusService_SendLocationContinuousServer) error { - panic("unimplemented") +func (s *busServiceServer) SendLocationContinuous(stream pb.BusService_SendLocationContinuousServer) error { + return s.interactor.SendLocationContinuous(stream) } // StreamBusVideo implements where_child_busv1.BusServiceServer. @@ -26,10 +30,6 @@ func (*busServiceServer) TrackBusContinuous(*pb.TrackBusContinuousRequest, pb.Bu panic("unimplemented") } -func NewBusServiceServer(interactor *bus.Interactor) pb.BusServiceServer { - return &busServiceServer{interactor} -} - // CreateBus implements where_child_busv1.BusServiceServer. func (s *busServiceServer) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (*pb.CreateBusResponse, error) { return s.interactor.CreateBus(ctx, req) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 70a5f4fd..59af4ba8 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -1,7 +1,9 @@ package bus import ( + "errors" "fmt" + "io" "github.com/google/uuid" "golang.org/x/exp/slog" @@ -258,6 +260,40 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu return &pb.ChangeBusStatusResponse{Bus: utils.ToPbBus(bus)}, nil } +func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationContinuousServer) error { + for { + req, err := stream.Recv() + if errors.Is(err, io.EOF) { + // ストリームの終了 + return stream.SendAndClose(&pb.SendLocationContinuousResponse{}) + } + if err != nil { + i.logger.Error("failed to receive location", err) + // 一時的なエラーの場合は、エラーをログに記録し、処理を続行する + continue + } + + busID, err := uuid.Parse(req.BusId) + if err != nil { + i.logger.Error("failed to parse bus ID", err) + // バスIDの解析に失敗した場合は、エラーをログに記録し、処理を続行する + continue + } + + // トランザクションを使用せずに直接更新 + _, err = i.entClient.Bus.UpdateOneID(busID). + SetLatitude(req.Latitude). + SetLongitude(req.Longitude). + Save(context.Background()) + + if err != nil { + i.logger.Error("failed to update bus location", err) + // 更新に失敗した場合は、エラーをログに記録し、処理を続行する + continue + } + } +} + func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.BusQuery, error)) ([]*pb.Bus, error) { tx, err := i.entClient.Tx(ctx) if err != nil { From 00c6565dc248bd1919cd0d5fb3ff0d598d22339a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 21:00:38 +0900 Subject: [PATCH 403/771] =?UTF-8?q?fix:=20timestamp=E3=81=AE=E5=9E=8B?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/where_child_bus/v1/bus.pb.dart | 32 ++++++----- .../where_child_bus/v1/bus.pbjson.dart | 18 +++--- .../proto-gen/where_child_bus/v1/bus_pb2.py | 55 ++++++++++--------- .../proto-gen/where_child_bus/v1/bus_pb2.pyi | 13 +++-- proto/where_child_bus/v1/bus.proto | 7 ++- 5 files changed, 68 insertions(+), 57 deletions(-) diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index ef71032c..83718ff5 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -11,9 +11,9 @@ import 'dart:core' as $core; -import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; +import '../../google/protobuf/timestamp.pb.dart' as $7; import 'resources.pb.dart' as $8; import 'resources.pbenum.dart' as $8; @@ -379,7 +379,7 @@ class SendLocationContinuousRequest extends $pb.GeneratedMessage { $core.String? busId, $core.double? latitude, $core.double? longitude, - $fixnum.Int64? timestamp, + $7.Timestamp? timestamp, }) { final $result = create(); if (busId != null) { @@ -404,7 +404,7 @@ class SendLocationContinuousRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'busId') ..a<$core.double>(2, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(3, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aInt64(4, _omitFieldNames ? '' : 'timestamp') + ..aOM<$7.Timestamp>(4, _omitFieldNames ? '' : 'timestamp', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -457,13 +457,15 @@ class SendLocationContinuousRequest extends $pb.GeneratedMessage { void clearLongitude() => clearField(3); @$pb.TagNumber(4) - $fixnum.Int64 get timestamp => $_getI64(3); + $7.Timestamp get timestamp => $_getN(3); @$pb.TagNumber(4) - set timestamp($fixnum.Int64 v) { $_setInt64(3, v); } + set timestamp($7.Timestamp v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasTimestamp() => $_has(3); @$pb.TagNumber(4) void clearTimestamp() => clearField(4); + @$pb.TagNumber(4) + $7.Timestamp ensureTimestamp() => $_ensure(3); } class SendLocationContinuousResponse extends $pb.GeneratedMessage { @@ -553,7 +555,7 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { $core.String? busId, $core.double? latitude, $core.double? longitude, - $fixnum.Int64? timestamp, + $7.Timestamp? timestamp, }) { final $result = create(); if (busId != null) { @@ -578,7 +580,7 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'busId') ..a<$core.double>(2, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(3, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aInt64(4, _omitFieldNames ? '' : 'timestamp') + ..aOM<$7.Timestamp>(4, _omitFieldNames ? '' : 'timestamp', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -631,13 +633,15 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { void clearLongitude() => clearField(3); @$pb.TagNumber(4) - $fixnum.Int64 get timestamp => $_getI64(3); + $7.Timestamp get timestamp => $_getN(3); @$pb.TagNumber(4) - set timestamp($fixnum.Int64 v) { $_setInt64(3, v); } + set timestamp($7.Timestamp v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasTimestamp() => $_has(3); @$pb.TagNumber(4) void clearTimestamp() => clearField(4); + @$pb.TagNumber(4) + $7.Timestamp ensureTimestamp() => $_ensure(3); } class StreamBusVideoRequest extends $pb.GeneratedMessage { @@ -646,7 +650,7 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { $8.BusType? busType, $8.VideoType? videoType, $core.List<$core.int>? videoChunk, - $fixnum.Int64? timestamp, + $7.Timestamp? timestamp, }) { final $result = create(); if (busId != null) { @@ -675,7 +679,7 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { ..e<$8.BusType>(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) ..e<$8.VideoType>(3, _omitFieldNames ? '' : 'videoType', $pb.PbFieldType.OE, defaultOrMaker: $8.VideoType.VIDEO_TYPE_UNSPECIFIED, valueOf: $8.VideoType.valueOf, enumValues: $8.VideoType.values) ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) - ..aInt64(5, _omitFieldNames ? '' : 'timestamp') + ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -737,13 +741,15 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { void clearVideoChunk() => clearField(4); @$pb.TagNumber(5) - $fixnum.Int64 get timestamp => $_getI64(4); + $7.Timestamp get timestamp => $_getN(4); @$pb.TagNumber(5) - set timestamp($fixnum.Int64 v) { $_setInt64(4, v); } + set timestamp($7.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasTimestamp() => $_has(4); @$pb.TagNumber(5) void clearTimestamp() => clearField(5); + @$pb.TagNumber(5) + $7.Timestamp ensureTimestamp() => $_ensure(4); } class StreamBusVideoResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 9754313c..7a3c5ba3 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -105,7 +105,7 @@ const SendLocationContinuousRequest$json = { {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, {'1': 'latitude', '3': 2, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 3, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'timestamp', '3': 4, '4': 1, '5': 3, '10': 'timestamp'}, + {'1': 'timestamp', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timestamp'}, ], }; @@ -113,7 +113,8 @@ const SendLocationContinuousRequest$json = { final $typed_data.Uint8List sendLocationContinuousRequestDescriptor = $convert.base64Decode( 'Ch1TZW5kTG9jYXRpb25Db250aW51b3VzUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lkEh' 'oKCGxhdGl0dWRlGAIgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYAyABKAFSCWxvbmdpdHVk' - 'ZRIcCgl0aW1lc3RhbXAYBCABKANSCXRpbWVzdGFtcA=='); + 'ZRI4Cgl0aW1lc3RhbXAYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl0aW1lc3' + 'RhbXA='); @$core.Deprecated('Use sendLocationContinuousResponseDescriptor instead') const SendLocationContinuousResponse$json = { @@ -143,15 +144,16 @@ const TrackBusContinuousResponse$json = { {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, {'1': 'latitude', '3': 2, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 3, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'timestamp', '3': 4, '4': 1, '5': 3, '10': 'timestamp'}, + {'1': 'timestamp', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timestamp'}, ], }; /// Descriptor for `TrackBusContinuousResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List trackBusContinuousResponseDescriptor = $convert.base64Decode( 'ChpUcmFja0J1c0NvbnRpbnVvdXNSZXNwb25zZRIVCgZidXNfaWQYASABKAlSBWJ1c0lkEhoKCG' - 'xhdGl0dWRlGAIgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYAyABKAFSCWxvbmdpdHVkZRIc' - 'Cgl0aW1lc3RhbXAYBCABKANSCXRpbWVzdGFtcA=='); + 'xhdGl0dWRlGAIgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYAyABKAFSCWxvbmdpdHVkZRI4' + 'Cgl0aW1lc3RhbXAYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl0aW1lc3RhbX' + 'A='); @$core.Deprecated('Use streamBusVideoRequestDescriptor instead') const StreamBusVideoRequest$json = { @@ -161,7 +163,7 @@ const StreamBusVideoRequest$json = { {'1': 'bus_type', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, {'1': 'video_type', '3': 3, '4': 1, '5': 14, '6': '.where_child_bus.v1.VideoType', '10': 'videoType'}, {'1': 'video_chunk', '3': 4, '4': 1, '5': 12, '10': 'videoChunk'}, - {'1': 'timestamp', '3': 5, '4': 1, '5': 3, '10': 'timestamp'}, + {'1': 'timestamp', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timestamp'}, ], }; @@ -170,8 +172,8 @@ final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Dec 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI2CghidXNfdH' 'lwZRgCIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBlEjwKCnZpZGVv' 'X3R5cGUYAyABKA4yHS53aGVyZV9jaGlsZF9idXMudjEuVmlkZW9UeXBlUgl2aWRlb1R5cGUSHw' - 'oLdmlkZW9fY2h1bmsYBCABKAxSCnZpZGVvQ2h1bmsSHAoJdGltZXN0YW1wGAUgASgDUgl0aW1l' - 'c3RhbXA='); + 'oLdmlkZW9fY2h1bmsYBCABKAxSCnZpZGVvQ2h1bmsSOAoJdGltZXN0YW1wGAUgASgLMhouZ29v' + 'Z2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdGltZXN0YW1w'); @$core.Deprecated('Use streamBusVideoResponseDescriptor instead') const StreamBusVideoResponse$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py index 3e149f33..863b990b 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py @@ -13,9 +13,10 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\x8e\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x1c\n\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\"\xe3\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12<\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x05 \x01(\x03R\ttimestamp\"\x18\n\x16StreamBusVideoResponse2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xaa\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa7\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"\xff\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12<\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"\x18\n\x16StreamBusVideoResponse2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,30 +24,30 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATEBUSREQUEST']._serialized_start=89 - _globals['_CREATEBUSREQUEST']._serialized_end=293 - _globals['_CREATEBUSRESPONSE']._serialized_start=295 - _globals['_CREATEBUSRESPONSE']._serialized_end=357 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=359 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=420 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=422 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=500 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=502 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=601 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=603 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=671 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=674 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=816 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=818 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=850 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=852 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=902 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=905 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1044 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1047 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1274 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1276 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1300 - _globals['_BUSSERVICE']._serialized_start=1303 - _globals['_BUSSERVICE']._serialized_end=1997 + _globals['_CREATEBUSREQUEST']._serialized_start=122 + _globals['_CREATEBUSREQUEST']._serialized_end=326 + _globals['_CREATEBUSRESPONSE']._serialized_start=328 + _globals['_CREATEBUSRESPONSE']._serialized_end=390 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=392 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=453 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=455 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=533 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=535 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=634 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=636 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=704 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=707 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=877 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=879 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=911 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=913 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=963 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=966 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1133 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1136 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1391 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1393 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1417 + _globals['_BUSSERVICE']._serialized_start=1420 + _globals['_BUSSERVICE']._serialized_end=2114 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi index 31567724..8ab21b8c 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi @@ -1,4 +1,5 @@ from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -61,8 +62,8 @@ class SendLocationContinuousRequest(_message.Message): bus_id: str latitude: float longitude: float - timestamp: int - def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., timestamp: _Optional[int] = ...) -> None: ... + timestamp: _timestamp_pb2.Timestamp + def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class SendLocationContinuousResponse(_message.Message): __slots__ = () @@ -83,8 +84,8 @@ class TrackBusContinuousResponse(_message.Message): bus_id: str latitude: float longitude: float - timestamp: int - def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., timestamp: _Optional[int] = ...) -> None: ... + timestamp: _timestamp_pb2.Timestamp + def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class StreamBusVideoRequest(_message.Message): __slots__ = ("bus_id", "bus_type", "video_type", "video_chunk", "timestamp") @@ -97,8 +98,8 @@ class StreamBusVideoRequest(_message.Message): bus_type: _resources_pb2.BusType video_type: _resources_pb2.VideoType video_chunk: bytes - timestamp: int - def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., video_type: _Optional[_Union[_resources_pb2.VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[int] = ...) -> None: ... + timestamp: _timestamp_pb2.Timestamp + def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., video_type: _Optional[_Union[_resources_pb2.VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = () diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 7e2641a9..e06a75c5 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; +import "google/protobuf/timestamp.proto"; service BusService { rpc CreateBus(CreateBusRequest) returns (CreateBusResponse); @@ -48,7 +49,7 @@ message SendLocationContinuousRequest { string bus_id = 1; double latitude = 2; double longitude = 3; - int64 timestamp = 4; // Unix timestamp + google.protobuf.Timestamp timestamp = 4; // Unix timestamp } message SendLocationContinuousResponse { @@ -63,7 +64,7 @@ message TrackBusContinuousResponse { string bus_id = 1; double latitude = 2; double longitude = 3; - int64 timestamp = 4; // Unix timestamp + google.protobuf.Timestamp timestamp = 4; // Unix timestamp } message StreamBusVideoRequest { @@ -71,7 +72,7 @@ message StreamBusVideoRequest { BusType bus_type = 2; VideoType video_type = 3; bytes video_chunk = 4; // Chunk of video data - int64 timestamp = 5; // Unix timestamp + google.protobuf.Timestamp timestamp = 5; // Unix timestamp } message StreamBusVideoResponse { From cade59d79011fdc80d876f24d3e2779f270ab705 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 21:01:13 +0900 Subject: [PATCH 404/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E8=B7=A1=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 356 +++++++++--------- backend/usecases/bus/bus.go | 29 ++ 2 files changed, 213 insertions(+), 172 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 22dfe0ab..85f1670f 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -9,6 +9,7 @@ package where_child_busv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -348,10 +349,10 @@ type SendLocationContinuousRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` - Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp } func (x *SendLocationContinuousRequest) Reset() { @@ -407,11 +408,11 @@ func (x *SendLocationContinuousRequest) GetLongitude() float64 { return 0 } -func (x *SendLocationContinuousRequest) GetTimestamp() int64 { +func (x *SendLocationContinuousRequest) GetTimestamp() *timestamppb.Timestamp { if x != nil { return x.Timestamp } - return 0 + return nil } type SendLocationContinuousResponse struct { @@ -504,10 +505,10 @@ type TrackBusContinuousResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` - Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp } func (x *TrackBusContinuousResponse) Reset() { @@ -563,11 +564,11 @@ func (x *TrackBusContinuousResponse) GetLongitude() float64 { return 0 } -func (x *TrackBusContinuousResponse) GetTimestamp() int64 { +func (x *TrackBusContinuousResponse) GetTimestamp() *timestamppb.Timestamp { if x != nil { return x.Timestamp } - return 0 + return nil } type StreamBusVideoRequest struct { @@ -575,11 +576,11 @@ type StreamBusVideoRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` - VideoType VideoType `protobuf:"varint,3,opt,name=video_type,json=videoType,proto3,enum=where_child_bus.v1.VideoType" json:"video_type,omitempty"` - VideoChunk []byte `protobuf:"bytes,4,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data - Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` + VideoType VideoType `protobuf:"varint,3,opt,name=video_type,json=videoType,proto3,enum=where_child_bus.v1.VideoType" json:"video_type,omitempty"` + VideoChunk []byte `protobuf:"bytes,4,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data + Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp } func (x *StreamBusVideoRequest) Reset() { @@ -642,11 +643,11 @@ func (x *StreamBusVideoRequest) GetVideoChunk() []byte { return nil } -func (x *StreamBusVideoRequest) GetTimestamp() int64 { +func (x *StreamBusVideoRequest) GetTimestamp() *timestamppb.Timestamp { if x != nil { return x.Timestamp } - return 0 + return nil } type StreamBusVideoResponse struct { @@ -695,142 +696,149 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x12, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x3e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, - 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x12, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x3e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, + 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, - 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, - 0x8e, 0x01, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, - 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, + 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, - 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, - 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0xe3, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, - 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, - 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, - 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x76, - 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb6, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, - 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, + 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, + 0x22, 0xaa, 0x01, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x20, 0x0a, + 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, + 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, + 0x73, 0x49, 0x64, 0x22, 0xa7, 0x01, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xff, 0x01, + 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x36, + 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, + 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, - 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, - 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, - 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, - 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, - 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, + 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, + 0x18, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb6, 0x05, 0x0a, 0x0a, 0x42, 0x75, + 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, + 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, + 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, + 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, + 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, + 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, - 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, - 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, - 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, + 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -861,33 +869,37 @@ var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ (*StreamBusVideoResponse)(nil), // 11: where_child_bus.v1.StreamBusVideoResponse (*Bus)(nil), // 12: where_child_bus.v1.Bus (Status)(0), // 13: where_child_bus.v1.Status - (BusType)(0), // 14: where_child_bus.v1.BusType - (VideoType)(0), // 15: where_child_bus.v1.VideoType + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + (BusType)(0), // 15: where_child_bus.v1.BusType + (VideoType)(0), // 16: where_child_bus.v1.VideoType } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ 12, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus 12, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus 13, // 2: where_child_bus.v1.ChangeBusStatusRequest.status:type_name -> where_child_bus.v1.Status 12, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus - 14, // 4: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType - 15, // 5: where_child_bus.v1.StreamBusVideoRequest.video_type:type_name -> where_child_bus.v1.VideoType - 0, // 6: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest - 2, // 7: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 4, // 8: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest - 6, // 9: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest - 8, // 10: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest - 10, // 11: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest - 1, // 12: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 13: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 5, // 14: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse - 7, // 15: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse - 9, // 16: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse - 11, // 17: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse - 12, // [12:18] is the sub-list for method output_type - 6, // [6:12] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 14, // 4: where_child_bus.v1.SendLocationContinuousRequest.timestamp:type_name -> google.protobuf.Timestamp + 14, // 5: where_child_bus.v1.TrackBusContinuousResponse.timestamp:type_name -> google.protobuf.Timestamp + 15, // 6: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType + 16, // 7: where_child_bus.v1.StreamBusVideoRequest.video_type:type_name -> where_child_bus.v1.VideoType + 14, // 8: where_child_bus.v1.StreamBusVideoRequest.timestamp:type_name -> google.protobuf.Timestamp + 0, // 9: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 10: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 4, // 11: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest + 6, // 12: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest + 8, // 13: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest + 10, // 14: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest + 1, // 15: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 16: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 5, // 17: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse + 7, // 18: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse + 9, // 19: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse + 11, // 20: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse + 15, // [15:21] is the sub-list for method output_type + 9, // [9:15] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 59af4ba8..d3addea2 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -4,9 +4,11 @@ import ( "errors" "fmt" "io" + "time" "github.com/google/uuid" "golang.org/x/exp/slog" + "google.golang.org/protobuf/types/known/timestamppb" "context" @@ -294,6 +296,33 @@ func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationCon } } +func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, stream pb.BusService_TrackBusContinuousServer) error { + busID, err := uuid.Parse(req.BusId) + if err != nil { + return fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) + } + + for { + bus, err := i.entClient.Bus.Query(). + Where(busRepo.IDEQ(busID)). + WithNursery(). + Only(context.Background()) + + if err != nil { + return fmt.Errorf("failed to get bus: %w", err) + } + + if err := stream.Send(&pb.TrackBusContinuousResponse{ + BusId: req.BusId, + Latitude: bus.Latitude, + Longitude: bus.Longitude, + Timestamp: ×tamppb.Timestamp{Seconds: time.Now().Unix()}, + }); err != nil { + return fmt.Errorf("failed to send bus: %w", err) + } + } +} + func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.BusQuery, error)) ([]*pb.Bus, error) { tx, err := i.entClient.Tx(ctx) if err != nil { From 823f8f3133d8989b6e2815619ff73712253c0dad Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 21:08:40 +0900 Subject: [PATCH 405/771] =?UTF-8?q?feat:=20=E9=A1=94=E6=A4=9C=E5=87=BA?= =?UTF-8?q?=E3=81=AE=E3=83=AC=E3=82=B9=E3=83=9D=E3=83=B3=E3=82=B9=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/where_child_bus/v1/bus.pb.dart | 28 ++++++++++++++++++- .../where_child_bus/v1/bus.pbjson.dart | 8 +++++- .../proto-gen/where_child_bus/v1/bus_pb2.py | 8 +++--- .../proto-gen/where_child_bus/v1/bus_pb2.pyi | 8 ++++-- proto/where_child_bus/v1/bus.proto | 3 +- 5 files changed, 46 insertions(+), 9 deletions(-) diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index 83718ff5..6b07cd3f 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -753,12 +753,26 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { } class StreamBusVideoResponse extends $pb.GeneratedMessage { - factory StreamBusVideoResponse() => create(); + factory StreamBusVideoResponse({ + $core.bool? isDetected, + $core.Iterable<$8.Child>? children, + }) { + final $result = create(); + if (isDetected != null) { + $result.isDetected = isDetected; + } + if (children != null) { + $result.children.addAll(children); + } + return $result; + } StreamBusVideoResponse._() : super(); factory StreamBusVideoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory StreamBusVideoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StreamBusVideoResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'isDetected') + ..pc<$8.Child>(2, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) ..hasRequiredFields = false ; @@ -782,6 +796,18 @@ class StreamBusVideoResponse extends $pb.GeneratedMessage { @$core.pragma('dart2js:noInline') static StreamBusVideoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static StreamBusVideoResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get isDetected => $_getBF(0); + @$pb.TagNumber(1) + set isDetected($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasIsDetected() => $_has(0); + @$pb.TagNumber(1) + void clearIsDetected() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$8.Child> get children => $_getList(1); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 7a3c5ba3..b8ef15b9 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -178,9 +178,15 @@ final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Dec @$core.Deprecated('Use streamBusVideoResponseDescriptor instead') const StreamBusVideoResponse$json = { '1': 'StreamBusVideoResponse', + '2': [ + {'1': 'is_detected', '3': 1, '4': 1, '5': 8, '10': 'isDetected'}, + {'1': 'children', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + ], }; /// Descriptor for `StreamBusVideoResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List streamBusVideoResponseDescriptor = $convert.base64Decode( - 'ChZTdHJlYW1CdXNWaWRlb1Jlc3BvbnNl'); + 'ChZTdHJlYW1CdXNWaWRlb1Jlc3BvbnNlEh8KC2lzX2RldGVjdGVkGAEgASgIUgppc0RldGVjdG' + 'VkEjUKCGNoaWxkcmVuGAIgAygLMhkud2hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJl' + 'bg=='); diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py index 863b990b..a81f1665 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xaa\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa7\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"\xff\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12<\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"\x18\n\x16StreamBusVideoResponse2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xaa\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa7\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"\xff\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12<\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -47,7 +47,7 @@ _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1136 _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1391 _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1393 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1417 - _globals['_BUSSERVICE']._serialized_start=1420 - _globals['_BUSSERVICE']._serialized_end=2114 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1505 + _globals['_BUSSERVICE']._serialized_start=1508 + _globals['_BUSSERVICE']._serialized_end=2202 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi index 8ab21b8c..c0e85f05 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi @@ -102,5 +102,9 @@ class StreamBusVideoRequest(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., video_type: _Optional[_Union[_resources_pb2.VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): - __slots__ = () - def __init__(self) -> None: ... + __slots__ = ("is_detected", "children") + IS_DETECTED_FIELD_NUMBER: _ClassVar[int] + CHILDREN_FIELD_NUMBER: _ClassVar[int] + is_detected: bool + children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] + def __init__(self, is_detected: bool = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index e06a75c5..60ed2d06 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -76,5 +76,6 @@ message StreamBusVideoRequest { } message StreamBusVideoResponse { - // Custom empty response type to conform to Protobuf style guide + bool is_detected = 1; + repeated Child children = 2; } From d1296811358b1ddffff93a8a135216e7d2661913 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 21:11:52 +0900 Subject: [PATCH 406/771] =?UTF-8?q?feat:=20machine=5Flearning=E5=81=B4?= =?UTF-8?q?=E3=81=AB=E3=82=82is=5Fdetected=E3=83=95=E3=82=A3=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 128 +++++++------ .../proto-gen/go/where_child_bus/v1/bus.pb.go | 176 ++++++++++-------- .../v1/machine_learning.pb.dart | 18 +- .../v1/machine_learning.pbjson.dart | 6 +- .../v1/machine_learning_pb2.py | 24 +-- .../v1/machine_learning_pb2.pyi | 6 +- .../v1/machine_learning.proto | 3 +- 7 files changed, 207 insertions(+), 154 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index 77c0762a..93df0c98 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -320,7 +320,8 @@ type PredResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ChildIds []string `protobuf:"bytes,1,rep,name=child_ids,json=childIds,proto3" json:"child_ids,omitempty"` + IsDetected bool `protobuf:"varint,1,opt,name=is_detected,json=isDetected,proto3" json:"is_detected,omitempty"` + ChildIds []string `protobuf:"bytes,2,rep,name=child_ids,json=childIds,proto3" json:"child_ids,omitempty"` } func (x *PredResponse) Reset() { @@ -355,6 +356,13 @@ func (*PredResponse) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{3} } +func (x *PredResponse) GetIsDetected() bool { + if x != nil { + return x.IsDetected + } + return false +} + func (x *PredResponse) GetChildIds() []string { if x != nil { return x.ChildIds @@ -497,66 +505,68 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x2b, 0x0a, 0x0c, - 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, 0x63, - 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, - 0x3a, 0x0a, 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, - 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x4f, 0x0a, 0x07, 0x42, - 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, - 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x56, 0x0a, 0x09, - 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, - 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, - 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, - 0x46, 0x46, 0x10, 0x02, 0x32, 0xad, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x4e, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4f, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x4c, 0x0a, 0x0c, + 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, + 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, + 0x22, 0x3a, 0x0a, 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, + 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x4f, 0x0a, 0x07, + 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, + 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x56, 0x0a, + 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, + 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, + 0x12, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, + 0x4f, 0x46, 0x46, 0x10, 0x02, 0x32, 0xad, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x4e, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, - 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, - 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, - 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, - 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, - 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, - 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, + 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4f, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, - 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, - 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, - 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, - 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x2e, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, + 0x01, 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, + 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, + 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, + 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, + 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 85f1670f..49e7b32e 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -654,6 +654,9 @@ type StreamBusVideoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + IsDetected bool `protobuf:"varint,1,opt,name=is_detected,json=isDetected,proto3" json:"is_detected,omitempty"` + Children []*Child `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` } func (x *StreamBusVideoResponse) Reset() { @@ -688,6 +691,20 @@ func (*StreamBusVideoResponse) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{11} } +func (x *StreamBusVideoResponse) GetIsDetected() bool { + if x != nil { + return x.IsDetected + } + return false +} + +func (x *StreamBusVideoResponse) GetChildren() []*Child { + if x != nil { + return x.Children + } + return nil +} + var File_where_child_bus_v1_bus_proto protoreflect.FileDescriptor var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ @@ -778,67 +795,72 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, - 0x18, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb6, 0x05, 0x0a, 0x0a, 0x42, 0x75, - 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, + 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, + 0x6e, 0x32, 0xb6, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, + 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, + 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, + 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, - 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, - 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, - 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, - 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, - 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, - 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, - 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, + 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, + 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, + 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, + 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, + 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, + 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -872,6 +894,7 @@ var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp (BusType)(0), // 15: where_child_bus.v1.BusType (VideoType)(0), // 16: where_child_bus.v1.VideoType + (*Child)(nil), // 17: where_child_bus.v1.Child } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ 12, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus @@ -883,23 +906,24 @@ var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ 15, // 6: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType 16, // 7: where_child_bus.v1.StreamBusVideoRequest.video_type:type_name -> where_child_bus.v1.VideoType 14, // 8: where_child_bus.v1.StreamBusVideoRequest.timestamp:type_name -> google.protobuf.Timestamp - 0, // 9: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest - 2, // 10: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 4, // 11: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest - 6, // 12: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest - 8, // 13: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest - 10, // 14: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest - 1, // 15: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 16: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 5, // 17: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse - 7, // 18: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse - 9, // 19: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse - 11, // 20: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse - 15, // [15:21] is the sub-list for method output_type - 9, // [9:15] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 17, // 9: where_child_bus.v1.StreamBusVideoResponse.children:type_name -> where_child_bus.v1.Child + 0, // 10: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 11: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 4, // 12: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest + 6, // 13: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest + 8, // 14: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest + 10, // 15: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest + 1, // 16: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 17: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 5, // 18: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse + 7, // 19: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse + 9, // 20: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse + 11, // 21: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse + 16, // [16:22] is the sub-list for method output_type + 10, // [10:16] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index e1e758d0..9884ff70 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -262,9 +262,13 @@ class PredRequest extends $pb.GeneratedMessage { class PredResponse extends $pb.GeneratedMessage { factory PredResponse({ + $core.bool? isDetected, $core.Iterable<$core.String>? childIds, }) { final $result = create(); + if (isDetected != null) { + $result.isDetected = isDetected; + } if (childIds != null) { $result.childIds.addAll(childIds); } @@ -275,7 +279,8 @@ class PredResponse extends $pb.GeneratedMessage { factory PredResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PredResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) - ..pPS(1, _omitFieldNames ? '' : 'childIds') + ..aOB(1, _omitFieldNames ? '' : 'isDetected') + ..pPS(2, _omitFieldNames ? '' : 'childIds') ..hasRequiredFields = false ; @@ -301,7 +306,16 @@ class PredResponse extends $pb.GeneratedMessage { static PredResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$core.String> get childIds => $_getList(0); + $core.bool get isDetected => $_getBF(0); + @$pb.TagNumber(1) + set isDetected($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasIsDetected() => $_has(0); + @$pb.TagNumber(1) + void clearIsDetected() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.String> get childIds => $_getList(1); } class FaceDetectAndClipRequest extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index 4bf7ba6d..b20d61e4 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -95,13 +95,15 @@ final $typed_data.Uint8List predRequestDescriptor = $convert.base64Decode( const PredResponse$json = { '1': 'PredResponse', '2': [ - {'1': 'child_ids', '3': 1, '4': 3, '5': 9, '10': 'childIds'}, + {'1': 'is_detected', '3': 1, '4': 1, '5': 8, '10': 'isDetected'}, + {'1': 'child_ids', '3': 2, '4': 3, '5': 9, '10': 'childIds'}, ], }; /// Descriptor for `PredResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List predResponseDescriptor = $convert.base64Decode( - 'CgxQcmVkUmVzcG9uc2USGwoJY2hpbGRfaWRzGAEgAygJUghjaGlsZElkcw=='); + 'CgxQcmVkUmVzcG9uc2USHwoLaXNfZGV0ZWN0ZWQYASABKAhSCmlzRGV0ZWN0ZWQSGwoJY2hpbG' + 'RfaWRzGAIgAygJUghjaGlsZElkcw=='); @$core.Deprecated('Use faceDetectAndClipRequestDescriptor instead') const FaceDetectAndClipRequest$json = { diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py index a8b34757..ed4aaaf5 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"\x9a\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x37\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"\xdb\x01\n\x0bPredRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x37\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\x12=\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1e.machine_learning.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x05 \x01(\x03R\ttimestamp\"+\n\x0cPredResponse\x12\x1b\n\tchild_ids\x18\x01 \x03(\tR\x08\x63hildIds\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02\x32\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04Pred\x12 .machine_learning.v1.PredRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"\x9a\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x37\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"\xdb\x01\n\x0bPredRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x37\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\x12=\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1e.machine_learning.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x05 \x01(\x03R\ttimestamp\"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02\x32\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04Pred\x12 .machine_learning.v1.PredRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -22,10 +22,10 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' - _globals['_BUSTYPE']._serialized_start=685 - _globals['_BUSTYPE']._serialized_end=764 - _globals['_VIDEOTYPE']._serialized_start=766 - _globals['_VIDEOTYPE']._serialized_end=852 + _globals['_BUSTYPE']._serialized_start=718 + _globals['_BUSTYPE']._serialized_end=797 + _globals['_VIDEOTYPE']._serialized_start=799 + _globals['_VIDEOTYPE']._serialized_end=885 _globals['_TRAINREQUEST']._serialized_start=68 _globals['_TRAINREQUEST']._serialized_end=222 _globals['_TRAINRESPONSE']._serialized_start=224 @@ -33,11 +33,11 @@ _globals['_PREDREQUEST']._serialized_start=273 _globals['_PREDREQUEST']._serialized_end=492 _globals['_PREDRESPONSE']._serialized_start=494 - _globals['_PREDRESPONSE']._serialized_end=537 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=539 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=623 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=625 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=683 - _globals['_MACHINELEARNINGSERVICE']._serialized_start=855 - _globals['_MACHINELEARNINGSERVICE']._serialized_end=1156 + _globals['_PREDRESPONSE']._serialized_end=570 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=572 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=656 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=658 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=716 + _globals['_MACHINELEARNINGSERVICE']._serialized_start=888 + _globals['_MACHINELEARNINGSERVICE']._serialized_end=1189 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi index cf3a45a5..c5c6722a 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi @@ -57,10 +57,12 @@ class PredRequest(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[BusType, str]] = ..., video_type: _Optional[_Union[VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[int] = ...) -> None: ... class PredResponse(_message.Message): - __slots__ = ("child_ids",) + __slots__ = ("is_detected", "child_ids") + IS_DETECTED_FIELD_NUMBER: _ClassVar[int] CHILD_IDS_FIELD_NUMBER: _ClassVar[int] + is_detected: bool child_ids: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, child_ids: _Optional[_Iterable[str]] = ...) -> None: ... + def __init__(self, is_detected: bool = ..., child_ids: _Optional[_Iterable[str]] = ...) -> None: ... class FaceDetectAndClipRequest(_message.Message): __slots__ = ("nursery_id", "child_id") diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index 729dfba4..e840bd08 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -40,7 +40,8 @@ message PredRequest { } message PredResponse { - repeated string child_ids = 1; + bool is_detected = 1; + repeated string child_ids = 2; } message FaceDetectAndClipRequest { From 0c1cb2425ff9d5face6bf6afa60ac22815ed2c5c Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 17 Feb 2024 21:59:25 +0900 Subject: [PATCH 407/771] =?UTF-8?q?fix(ml):=20dockerfile=E3=82=92=E7=B7=A8?= =?UTF-8?q?=E9=9B=86=E3=83=BB=E6=AD=A3=E3=81=97=E3=81=8F=E5=8B=95=E4=BD=9C?= =?UTF-8?q?=E3=81=97=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E8=A7=A3?= =?UTF-8?q?=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/dockerfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/machine_learning/dockerfile b/machine_learning/dockerfile index ed276574..53ae43c5 100644 --- a/machine_learning/dockerfile +++ b/machine_learning/dockerfile @@ -4,9 +4,16 @@ WORKDIR /machine-learning COPY ./requirements.lock /machine-learning/ RUN sed '/-e/d' requirements.lock > requirements.txt -RUN pip install -r requirements.txt +RUN pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu -COPY ./src ./src +# 必要なライブラリをインストール +RUN apt-get update && apt-get install -y \ + libgl1-mesa-glx \ + libglib2.0-0 + +COPY ./src /machine-learning/src + +ENV PYTHONPATH "${PYTHONPATH}:/machine-learning/src/" # TODO: server.pyをproto-genから切り出し -ENTRYPOINT ["python", "/machine-learning/src/proto-gen/machine_learning/v1/server.py"] +ENTRYPOINT ["python", "src/proto-gen/machine_learning/v1/server.py"] From addb5d999d5d1b33350dd83b832521f7accfb6b6 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 22:10:37 +0900 Subject: [PATCH 408/771] fix: update server.py --- .../proto-gen/machine_learning/v1/server.py | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index b7e607dd..9242c800 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -58,31 +58,21 @@ def FaceDetectAndClip( def serve(): - server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) + bind_address = f"[::]:8080" + server = grpc.server(futures.ThreadPoolExecutor()) health_check_pb2_grpc.add_HealthcheckServiceServicer_to_server( HealthCheckServiceServer(), server ) machine_learning_pb2_grpc.add_MachineLearningServiceServicer_to_server( MachineLearningServiceServicer(), server ) - - # Reflection APIの設定 - SERVICE_NAMES = ( - machine_learning_pb2.DESCRIPTOR.services_by_name[ - "MachineLearningService" - ].full_name, - health_check_pb2.DESCRIPTOR.services_by_name["HealthcheckService"].full_name, - reflection.SERVICE_NAME, - ) - reflection.enable_server_reflection(SERVICE_NAMES, server) - - server.add_insecure_port("[::]:8080") + server.add_insecure_port(bind_address) server.start() - logging.info("Server started at [::]:8080") + logging.info("Listening on %s.", bind_address) server.wait_for_termination() - if __name__ == "__main__": + print("Called server.py") # NOTE: https://github.com/grpc/grpc/issues/17321 # gRPCのPython環境でloggingを使う場合、server起動前にlogging.basicConfig()を実行する必要がある logging.basicConfig( From fb3a641f293270ba3ce58081c429c10075c3032d Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 22:11:47 +0900 Subject: [PATCH 409/771] fix: update import --- machine_learning/src/proto-gen/machine_learning/v1/server.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 9242c800..8e1022e0 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -1,14 +1,12 @@ -import argparse import logging -import threading from concurrent import futures import grpc + import health_check_pb2 import health_check_pb2_grpc import machine_learning_pb2 import machine_learning_pb2_grpc -from grpc_reflection.v1alpha import reflection from face_detect_model.DetectFaceAndClip.detectFaceAndClip import main From 6df10486861ebc4517b0a01e85a5d31f115f08a8 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 17 Feb 2024 22:13:38 +0900 Subject: [PATCH 410/771] fix --- .../proto-gen/machine_learning/v1/server.py | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 8e1022e0..b775d4ba 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -1,13 +1,20 @@ +import argparse import logging +import threading from concurrent import futures import grpc - import health_check_pb2 import health_check_pb2_grpc import machine_learning_pb2 import machine_learning_pb2_grpc +import logging +import os +from concurrent import futures + +import grpc + from face_detect_model.DetectFaceAndClip.detectFaceAndClip import main @@ -37,22 +44,23 @@ def FaceDetectAndClip( request: machine_learning_pb2.FaceDetectAndClipRequest, context, ): - parser = argparse.ArgumentParser() - args = parser.parse_args() + pass + # parser = argparse.ArgumentParser() + # args = parser.parse_args() - args.nursery_id = request.nursery_id - args.child_id = request.child_id - args.env = "remote" - # mainメソッドを別スレッドで実行 - try: - thread = threading.Thread(target=main, args=(args,)) - thread.start() - is_started = True - except Exception as e: - logging.error(e) - is_started = False + # args.nursery_id = request.nursery_id + # args.child_id = request.child_id + # args.env = "remote" + # # mainメソッドを別スレッドで実行 + # try: + # thread = threading.Thread(target=main, args=(args,)) + # thread.start() + # is_started = True + # except Exception as e: + # logging.error(e) + # is_started = False - return machine_learning_pb2.FaceDetectAndClipResponse(is_started=is_started) + # return machine_learning_pb2.FaceDetectAndClipResponse(is_started=is_started) def serve(): From 283093a6cc96ef74e8748e0da16816a9ba68f7ff Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 00:41:25 +0900 Subject: [PATCH 411/771] =?UTF-8?q?fix(ml):=20=E6=83=B3=E5=AE=9A=E3=82=88?= =?UTF-8?q?=E3=82=8A=E3=82=82=E5=A4=9A=E3=81=84=E5=BC=95=E6=95=B0=E3=82=92?= =?UTF-8?q?=E5=8F=96=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B=E9=96=A2=E6=95=B0?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../face_detect_model/DetectFaceAndClip/detectFaceAndClip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index 701002d4..9a936288 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -30,7 +30,7 @@ def load_image(args: argparse.Namespace, blobs=None): if args.env == "local": return load_image_from_local(args.image_dir_path) elif args.env == "remote": - return load_image_from_remote(args.nursery_id, args.child_id, blobs) + return load_image_from_remote(blobs) def load_image_from_local(image_dir_path: str): From db59bd242a52b8ff0069ecbec2a348158a30a482 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 00:42:04 +0900 Subject: [PATCH 412/771] =?UTF-8?q?chore(ml):=20=E5=AE=9F=E9=9A=9B?= =?UTF-8?q?=E3=81=AE=E6=8C=99=E5=8B=95=E3=81=AB=E5=BE=A9=E5=85=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/machine_learning/v1/server.py | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index b775d4ba..eb20db6a 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -44,23 +44,22 @@ def FaceDetectAndClip( request: machine_learning_pb2.FaceDetectAndClipRequest, context, ): - pass - # parser = argparse.ArgumentParser() - # args = parser.parse_args() + parser = argparse.ArgumentParser() + args = parser.parse_args() - # args.nursery_id = request.nursery_id - # args.child_id = request.child_id - # args.env = "remote" - # # mainメソッドを別スレッドで実行 - # try: - # thread = threading.Thread(target=main, args=(args,)) - # thread.start() - # is_started = True - # except Exception as e: - # logging.error(e) - # is_started = False + args.nursery_id = request.nursery_id + args.child_id = request.child_id + args.env = "remote" + # mainメソッドを別スレッドで実行 + try: + thread = threading.Thread(target=main, args=(args,)) + thread.start() + is_started = True + except Exception as e: + logging.error(e) + is_started = False - # return machine_learning_pb2.FaceDetectAndClipResponse(is_started=is_started) + return machine_learning_pb2.FaceDetectAndClipResponse(is_started=is_started) def serve(): @@ -77,8 +76,9 @@ def serve(): logging.info("Listening on %s.", bind_address) server.wait_for_termination() + if __name__ == "__main__": - print("Called server.py") + logging.info("Called server.py") # NOTE: https://github.com/grpc/grpc/issues/17321 # gRPCのPython環境でloggingを使う場合、server起動前にlogging.basicConfig()を実行する必要がある logging.basicConfig( From d97af637e2d53b90b61a7a8b9fa370dddc260e31 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 00:44:42 +0900 Subject: [PATCH 413/771] =?UTF-8?q?chore(ml):=20secrets=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=82=92build=E5=BE=8C?= =?UTF-8?q?=E3=81=AE=E3=82=A4=E3=83=A1=E3=83=BC=E3=82=B8=E3=81=AB=E5=90=AB?= =?UTF-8?q?=E3=82=81=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/machine_learning/dockerfile b/machine_learning/dockerfile index 53ae43c5..c0c6d4ad 100644 --- a/machine_learning/dockerfile +++ b/machine_learning/dockerfile @@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y \ libglib2.0-0 COPY ./src /machine-learning/src +COPY ./secrets /machine-learning/secrets ENV PYTHONPATH "${PYTHONPATH}:/machine-learning/src/" From 71e5f060ea17e4ae8bf5297d776b7afa4d945579 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 00:50:57 +0900 Subject: [PATCH 414/771] =?UTF-8?q?fix:=20gRPC=E3=82=B5=E3=83=BC=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=81=B8=E3=81=AETLS=E6=8E=A5=E7=B6=9A=E3=82=92?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/server/main.go | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index 6302db47..dbcb07c9 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -9,13 +9,14 @@ import ( "os/signal" "syscall" + "golang.org/x/exp/slog" + "cloud.google.com/go/storage" mlv1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1" "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql" - "golang.org/x/exp/slog" "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/credentials" "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" @@ -81,13 +82,30 @@ func main() { log.Println("Connected to Cloud Storage!") // 機械学習gRPCサーバーへの接続を開始 - log.Println("Connecting to ML gRPC server...") - conn, err := grpc.Dial(config.MLAddress, grpc.WithTransportCredentials(insecure.NewCredentials())) + log.Println("Connecting to Machine Learning gRPC server...") + // デフォルトのシステム証明書を使用してTLS接続を設定 + creds := credentials.NewClientTLSFromCert(nil, "") + + // セキュアなチャネルを通じてサーバーに接続 + conn, err := grpc.Dial(config.MLAddress, grpc.WithTransportCredentials(creds)) if err != nil { - log.Fatal(err) + log.Fatalf("Failed to connect: %v", err) } defer conn.Close() - mlClient := mlv1.NewMachineLearningServiceClient(conn) + + // スタブの作成 + stub := mlv1.NewHealthcheckServiceClient(conn) + + // 最初のPingリクエスト(nameが設定されていない) + request := &mlv1.PingRequest{ + Name: "ping", + } + _, err = stub.Ping(context.Background(), request) + if err != nil { + log.Fatalf("Failed to ping: %v", err) + } + + log.Println("Connected to Machine Learning gRPC server!") // loggerを作成 logger := slog.Default() @@ -99,7 +117,6 @@ func main() { grpc_server.WithReflection(config.ModeDev), grpc_server.WithStorageClient(storageClient), grpc_server.WithBucketName(config.StorageBucketName), - grpc_server.WithMLClient(mlClient), ) lsnr, err := net.Listen("tcp", ":"+config.GrpcPort) if err != nil { From bb8c3d153eafd7fcbef59afbca07cbb7fa7e3b56 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 01:51:28 +0900 Subject: [PATCH 415/771] =?UTF-8?q?fix:=20proto=E3=81=AE=E5=86=8D=E5=88=A9?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 427 +++++------------- .../v1/machine_learning_grpc.pb.go | 11 +- .../v1/machine_learning.pb.dart | 119 +---- .../v1/machine_learning.pbenum.dart | 40 -- .../v1/machine_learning.pbgrpc.dart | 55 +-- .../v1/machine_learning.pbjson.dart | 55 +-- .../v1/machine_learning_pb2.py | 34 +- .../v1/machine_learning_pb2.pyi | 39 +- .../v1/machine_learning_pb2_grpc.py | 7 +- .../where_child_bus/v1/bus_pb2_grpc.py | 2 +- .../v1/machine_learning.proto | 26 +- 11 files changed, 177 insertions(+), 638 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index 93df0c98..7f86a600 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -7,6 +7,7 @@ package machine_learningv1 import ( + v1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -20,113 +21,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type BusType int32 - -const ( - BusType_BUS_TYPE_UNSPECIFIED BusType = 0 - BusType_BUS_TYPE_MORNING BusType = 1 - BusType_BUS_TYPE_EVENING BusType = 2 -) - -// Enum value maps for BusType. -var ( - BusType_name = map[int32]string{ - 0: "BUS_TYPE_UNSPECIFIED", - 1: "BUS_TYPE_MORNING", - 2: "BUS_TYPE_EVENING", - } - BusType_value = map[string]int32{ - "BUS_TYPE_UNSPECIFIED": 0, - "BUS_TYPE_MORNING": 1, - "BUS_TYPE_EVENING": 2, - } -) - -func (x BusType) Enum() *BusType { - p := new(BusType) - *p = x - return p -} - -func (x BusType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BusType) Descriptor() protoreflect.EnumDescriptor { - return file_machine_learning_v1_machine_learning_proto_enumTypes[0].Descriptor() -} - -func (BusType) Type() protoreflect.EnumType { - return &file_machine_learning_v1_machine_learning_proto_enumTypes[0] -} - -func (x BusType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BusType.Descriptor instead. -func (BusType) EnumDescriptor() ([]byte, []int) { - return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{0} -} - -type VideoType int32 - -const ( - VideoType_VIDEO_TYPE_UNSPECIFIED VideoType = 0 - VideoType_VIDEO_TYPE_GET_ON VideoType = 1 - VideoType_VIDEO_TYPE_GET_OFF VideoType = 2 -) - -// Enum value maps for VideoType. -var ( - VideoType_name = map[int32]string{ - 0: "VIDEO_TYPE_UNSPECIFIED", - 1: "VIDEO_TYPE_GET_ON", - 2: "VIDEO_TYPE_GET_OFF", - } - VideoType_value = map[string]int32{ - "VIDEO_TYPE_UNSPECIFIED": 0, - "VIDEO_TYPE_GET_ON": 1, - "VIDEO_TYPE_GET_OFF": 2, - } -) - -func (x VideoType) Enum() *VideoType { - p := new(VideoType) - *p = x - return p -} - -func (x VideoType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (VideoType) Descriptor() protoreflect.EnumDescriptor { - return file_machine_learning_v1_machine_learning_proto_enumTypes[1].Descriptor() -} - -func (VideoType) Type() protoreflect.EnumType { - return &file_machine_learning_v1_machine_learning_proto_enumTypes[1] -} - -func (x VideoType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use VideoType.Descriptor instead. -func (VideoType) EnumDescriptor() ([]byte, []int) { - return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{1} -} - type TrainRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - ChildIds []string `protobuf:"bytes,3,rep,name=child_ids,json=childIds,proto3" json:"child_ids,omitempty"` - BusType BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=machine_learning.v1.BusType" json:"bus_type,omitempty"` + NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + ChildIds []string `protobuf:"bytes,3,rep,name=child_ids,json=childIds,proto3" json:"child_ids,omitempty"` + BusType v1.BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` } func (x *TrainRequest) Reset() { @@ -182,11 +85,11 @@ func (x *TrainRequest) GetChildIds() []string { return nil } -func (x *TrainRequest) GetBusType() BusType { +func (x *TrainRequest) GetBusType() v1.BusType { if x != nil { return x.BusType } - return BusType_BUS_TYPE_UNSPECIFIED + return v1.BusType(0) } type TrainResponse struct { @@ -236,85 +139,6 @@ func (x *TrainResponse) GetIsStarted() bool { return false } -type PredRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=machine_learning.v1.BusType" json:"bus_type,omitempty"` - VideoType VideoType `protobuf:"varint,3,opt,name=video_type,json=videoType,proto3,enum=machine_learning.v1.VideoType" json:"video_type,omitempty"` - VideoChunk []byte `protobuf:"bytes,4,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data - Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp -} - -func (x *PredRequest) Reset() { - *x = PredRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PredRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PredRequest) ProtoMessage() {} - -func (x *PredRequest) ProtoReflect() protoreflect.Message { - mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PredRequest.ProtoReflect.Descriptor instead. -func (*PredRequest) Descriptor() ([]byte, []int) { - return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{2} -} - -func (x *PredRequest) GetBusId() string { - if x != nil { - return x.BusId - } - return "" -} - -func (x *PredRequest) GetBusType() BusType { - if x != nil { - return x.BusType - } - return BusType_BUS_TYPE_UNSPECIFIED -} - -func (x *PredRequest) GetVideoType() VideoType { - if x != nil { - return x.VideoType - } - return VideoType_VIDEO_TYPE_UNSPECIFIED -} - -func (x *PredRequest) GetVideoChunk() []byte { - if x != nil { - return x.VideoChunk - } - return nil -} - -func (x *PredRequest) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - type PredResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -327,7 +151,7 @@ type PredResponse struct { func (x *PredResponse) Reset() { *x = PredResponse{} if protoimpl.UnsafeEnabled { - mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[3] + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -340,7 +164,7 @@ func (x *PredResponse) String() string { func (*PredResponse) ProtoMessage() {} func (x *PredResponse) ProtoReflect() protoreflect.Message { - mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[3] + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -353,7 +177,7 @@ func (x *PredResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PredResponse.ProtoReflect.Descriptor instead. func (*PredResponse) Descriptor() ([]byte, []int) { - return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{3} + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{2} } func (x *PredResponse) GetIsDetected() bool { @@ -382,7 +206,7 @@ type FaceDetectAndClipRequest struct { func (x *FaceDetectAndClipRequest) Reset() { *x = FaceDetectAndClipRequest{} if protoimpl.UnsafeEnabled { - mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[4] + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -395,7 +219,7 @@ func (x *FaceDetectAndClipRequest) String() string { func (*FaceDetectAndClipRequest) ProtoMessage() {} func (x *FaceDetectAndClipRequest) ProtoReflect() protoreflect.Message { - mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[4] + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -408,7 +232,7 @@ func (x *FaceDetectAndClipRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FaceDetectAndClipRequest.ProtoReflect.Descriptor instead. func (*FaceDetectAndClipRequest) Descriptor() ([]byte, []int) { - return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{4} + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{3} } func (x *FaceDetectAndClipRequest) GetNurseryId() string { @@ -436,7 +260,7 @@ type FaceDetectAndClipResponse struct { func (x *FaceDetectAndClipResponse) Reset() { *x = FaceDetectAndClipResponse{} if protoimpl.UnsafeEnabled { - mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[5] + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -449,7 +273,7 @@ func (x *FaceDetectAndClipResponse) String() string { func (*FaceDetectAndClipResponse) ProtoMessage() {} func (x *FaceDetectAndClipResponse) ProtoReflect() protoreflect.Message { - mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[5] + mi := &file_machine_learning_v1_machine_learning_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -462,7 +286,7 @@ func (x *FaceDetectAndClipResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FaceDetectAndClipResponse.ProtoReflect.Descriptor instead. func (*FaceDetectAndClipResponse) Descriptor() ([]byte, []int) { - return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{5} + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{4} } func (x *FaceDetectAndClipResponse) GetIsStarted() bool { @@ -479,94 +303,74 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x49, 0x64, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2e, - 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, 0xdb, - 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, - 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3d, - 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x1c, - 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x4c, 0x0a, 0x0c, - 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, - 0x09, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, - 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, - 0x22, 0x3a, 0x0a, 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, - 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x4f, 0x0a, 0x07, - 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, - 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x56, 0x0a, - 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, - 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, - 0x12, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, - 0x4f, 0x46, 0x46, 0x10, 0x02, 0x32, 0xad, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x4e, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, + 0x31, 0x1a, 0x1c, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x2e, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, + 0x4c, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, + 0x18, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, + 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x32, + 0xb6, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x05, 0x54, 0x72, + 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x04, 0x50, 0x72, + 0x65, 0x64, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, + 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x28, 0x01, 0x30, 0x01, 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4f, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, - 0x01, 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, - 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, - 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, - 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, - 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, - 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, + 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, + 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -581,33 +385,29 @@ func file_machine_learning_v1_machine_learning_proto_rawDescGZIP() []byte { return file_machine_learning_v1_machine_learning_proto_rawDescData } -var file_machine_learning_v1_machine_learning_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_machine_learning_v1_machine_learning_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_machine_learning_v1_machine_learning_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ - (BusType)(0), // 0: machine_learning.v1.BusType - (VideoType)(0), // 1: machine_learning.v1.VideoType - (*TrainRequest)(nil), // 2: machine_learning.v1.TrainRequest - (*TrainResponse)(nil), // 3: machine_learning.v1.TrainResponse - (*PredRequest)(nil), // 4: machine_learning.v1.PredRequest - (*PredResponse)(nil), // 5: machine_learning.v1.PredResponse - (*FaceDetectAndClipRequest)(nil), // 6: machine_learning.v1.FaceDetectAndClipRequest - (*FaceDetectAndClipResponse)(nil), // 7: machine_learning.v1.FaceDetectAndClipResponse + (*TrainRequest)(nil), // 0: machine_learning.v1.TrainRequest + (*TrainResponse)(nil), // 1: machine_learning.v1.TrainResponse + (*PredResponse)(nil), // 2: machine_learning.v1.PredResponse + (*FaceDetectAndClipRequest)(nil), // 3: machine_learning.v1.FaceDetectAndClipRequest + (*FaceDetectAndClipResponse)(nil), // 4: machine_learning.v1.FaceDetectAndClipResponse + (v1.BusType)(0), // 5: where_child_bus.v1.BusType + (*v1.StreamBusVideoRequest)(nil), // 6: where_child_bus.v1.StreamBusVideoRequest } var file_machine_learning_v1_machine_learning_proto_depIdxs = []int32{ - 0, // 0: machine_learning.v1.TrainRequest.bus_type:type_name -> machine_learning.v1.BusType - 0, // 1: machine_learning.v1.PredRequest.bus_type:type_name -> machine_learning.v1.BusType - 1, // 2: machine_learning.v1.PredRequest.video_type:type_name -> machine_learning.v1.VideoType - 2, // 3: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest - 4, // 4: machine_learning.v1.MachineLearningService.Pred:input_type -> machine_learning.v1.PredRequest - 6, // 5: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest - 3, // 6: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse - 5, // 7: machine_learning.v1.MachineLearningService.Pred:output_type -> machine_learning.v1.PredResponse - 7, // 8: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse - 6, // [6:9] is the sub-list for method output_type - 3, // [3:6] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 5, // 0: machine_learning.v1.TrainRequest.bus_type:type_name -> where_child_bus.v1.BusType + 0, // 1: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest + 6, // 2: machine_learning.v1.MachineLearningService.Pred:input_type -> where_child_bus.v1.StreamBusVideoRequest + 3, // 3: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest + 1, // 4: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse + 2, // 5: machine_learning.v1.MachineLearningService.Pred:output_type -> machine_learning.v1.PredResponse + 4, // 6: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_machine_learning_v1_machine_learning_proto_init() } @@ -641,18 +441,6 @@ func file_machine_learning_v1_machine_learning_proto_init() { } } file_machine_learning_v1_machine_learning_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PredRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_machine_learning_v1_machine_learning_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PredResponse); i { case 0: return &v.state @@ -664,7 +452,7 @@ func file_machine_learning_v1_machine_learning_proto_init() { return nil } } - file_machine_learning_v1_machine_learning_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_machine_learning_v1_machine_learning_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FaceDetectAndClipRequest); i { case 0: return &v.state @@ -676,7 +464,7 @@ func file_machine_learning_v1_machine_learning_proto_init() { return nil } } - file_machine_learning_v1_machine_learning_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_machine_learning_v1_machine_learning_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FaceDetectAndClipResponse); i { case 0: return &v.state @@ -694,14 +482,13 @@ func file_machine_learning_v1_machine_learning_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_machine_learning_v1_machine_learning_proto_rawDesc, - NumEnums: 2, - NumMessages: 6, + NumEnums: 0, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, GoTypes: file_machine_learning_v1_machine_learning_proto_goTypes, DependencyIndexes: file_machine_learning_v1_machine_learning_proto_depIdxs, - EnumInfos: file_machine_learning_v1_machine_learning_proto_enumTypes, MessageInfos: file_machine_learning_v1_machine_learning_proto_msgTypes, }.Build() File_machine_learning_v1_machine_learning_proto = out.File diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go index b6f98178..fa63ffc6 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go @@ -8,6 +8,7 @@ package machine_learningv1 import ( context "context" + v1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -60,7 +61,7 @@ func (c *machineLearningServiceClient) Pred(ctx context.Context, opts ...grpc.Ca } type MachineLearningService_PredClient interface { - Send(*PredRequest) error + Send(*v1.StreamBusVideoRequest) error Recv() (*PredResponse, error) grpc.ClientStream } @@ -69,7 +70,7 @@ type machineLearningServicePredClient struct { grpc.ClientStream } -func (x *machineLearningServicePredClient) Send(m *PredRequest) error { +func (x *machineLearningServicePredClient) Send(m *v1.StreamBusVideoRequest) error { return x.ClientStream.SendMsg(m) } @@ -148,7 +149,7 @@ func _MachineLearningService_Pred_Handler(srv interface{}, stream grpc.ServerStr type MachineLearningService_PredServer interface { Send(*PredResponse) error - Recv() (*PredRequest, error) + Recv() (*v1.StreamBusVideoRequest, error) grpc.ServerStream } @@ -160,8 +161,8 @@ func (x *machineLearningServicePredServer) Send(m *PredResponse) error { return x.ServerStream.SendMsg(m) } -func (x *machineLearningServicePredServer) Recv() (*PredRequest, error) { - m := new(PredRequest) +func (x *machineLearningServicePredServer) Recv() (*v1.StreamBusVideoRequest, error) { + m := new(v1.StreamBusVideoRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index 9884ff70..7d281bd0 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -11,19 +11,16 @@ import 'dart:core' as $core; -import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; -import 'machine_learning.pbenum.dart'; - -export 'machine_learning.pbenum.dart'; +import '../../where_child_bus/v1/resources.pbenum.dart' as $3; class TrainRequest extends $pb.GeneratedMessage { factory TrainRequest({ $core.String? nurseryId, $core.String? busId, $core.Iterable<$core.String>? childIds, - BusType? busType, + $3.BusType? busType, }) { final $result = create(); if (nurseryId != null) { @@ -48,7 +45,7 @@ class TrainRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'nurseryId') ..aOS(2, _omitFieldNames ? '' : 'busId') ..pPS(3, _omitFieldNames ? '' : 'childIds') - ..e(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: BusType.BUS_TYPE_UNSPECIFIED, valueOf: BusType.valueOf, enumValues: BusType.values) + ..e<$3.BusType>(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $3.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $3.BusType.valueOf, enumValues: $3.BusType.values) ..hasRequiredFields = false ; @@ -95,9 +92,9 @@ class TrainRequest extends $pb.GeneratedMessage { $core.List<$core.String> get childIds => $_getList(2); @$pb.TagNumber(4) - BusType get busType => $_getN(3); + $3.BusType get busType => $_getN(3); @$pb.TagNumber(4) - set busType(BusType v) { setField(4, v); } + set busType($3.BusType v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasBusType() => $_has(3); @$pb.TagNumber(4) @@ -154,112 +151,6 @@ class TrainResponse extends $pb.GeneratedMessage { void clearIsStarted() => clearField(1); } -class PredRequest extends $pb.GeneratedMessage { - factory PredRequest({ - $core.String? busId, - BusType? busType, - VideoType? videoType, - $core.List<$core.int>? videoChunk, - $fixnum.Int64? timestamp, - }) { - final $result = create(); - if (busId != null) { - $result.busId = busId; - } - if (busType != null) { - $result.busType = busType; - } - if (videoType != null) { - $result.videoType = videoType; - } - if (videoChunk != null) { - $result.videoChunk = videoChunk; - } - if (timestamp != null) { - $result.timestamp = timestamp; - } - return $result; - } - PredRequest._() : super(); - factory PredRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PredRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PredRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'busId') - ..e(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: BusType.BUS_TYPE_UNSPECIFIED, valueOf: BusType.valueOf, enumValues: BusType.values) - ..e(3, _omitFieldNames ? '' : 'videoType', $pb.PbFieldType.OE, defaultOrMaker: VideoType.VIDEO_TYPE_UNSPECIFIED, valueOf: VideoType.valueOf, enumValues: VideoType.values) - ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) - ..aInt64(5, _omitFieldNames ? '' : 'timestamp') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PredRequest clone() => PredRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PredRequest copyWith(void Function(PredRequest) updates) => super.copyWith((message) => updates(message as PredRequest)) as PredRequest; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static PredRequest create() => PredRequest._(); - PredRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PredRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PredRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get busId => $_getSZ(0); - @$pb.TagNumber(1) - set busId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasBusId() => $_has(0); - @$pb.TagNumber(1) - void clearBusId() => clearField(1); - - @$pb.TagNumber(2) - BusType get busType => $_getN(1); - @$pb.TagNumber(2) - set busType(BusType v) { setField(2, v); } - @$pb.TagNumber(2) - $core.bool hasBusType() => $_has(1); - @$pb.TagNumber(2) - void clearBusType() => clearField(2); - - @$pb.TagNumber(3) - VideoType get videoType => $_getN(2); - @$pb.TagNumber(3) - set videoType(VideoType v) { setField(3, v); } - @$pb.TagNumber(3) - $core.bool hasVideoType() => $_has(2); - @$pb.TagNumber(3) - void clearVideoType() => clearField(3); - - @$pb.TagNumber(4) - $core.List<$core.int> get videoChunk => $_getN(3); - @$pb.TagNumber(4) - set videoChunk($core.List<$core.int> v) { $_setBytes(3, v); } - @$pb.TagNumber(4) - $core.bool hasVideoChunk() => $_has(3); - @$pb.TagNumber(4) - void clearVideoChunk() => clearField(4); - - @$pb.TagNumber(5) - $fixnum.Int64 get timestamp => $_getI64(4); - @$pb.TagNumber(5) - set timestamp($fixnum.Int64 v) { $_setInt64(4, v); } - @$pb.TagNumber(5) - $core.bool hasTimestamp() => $_has(4); - @$pb.TagNumber(5) - void clearTimestamp() => clearField(5); -} - class PredResponse extends $pb.GeneratedMessage { factory PredResponse({ $core.bool? isDetected, diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart index 5e3f9985..2e7d3a99 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart @@ -9,43 +9,3 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -class BusType extends $pb.ProtobufEnum { - static const BusType BUS_TYPE_UNSPECIFIED = BusType._(0, _omitEnumNames ? '' : 'BUS_TYPE_UNSPECIFIED'); - static const BusType BUS_TYPE_MORNING = BusType._(1, _omitEnumNames ? '' : 'BUS_TYPE_MORNING'); - static const BusType BUS_TYPE_EVENING = BusType._(2, _omitEnumNames ? '' : 'BUS_TYPE_EVENING'); - - static const $core.List values = [ - BUS_TYPE_UNSPECIFIED, - BUS_TYPE_MORNING, - BUS_TYPE_EVENING, - ]; - - static final $core.Map<$core.int, BusType> _byValue = $pb.ProtobufEnum.initByValue(values); - static BusType? valueOf($core.int value) => _byValue[value]; - - const BusType._($core.int v, $core.String n) : super(v, n); -} - -class VideoType extends $pb.ProtobufEnum { - static const VideoType VIDEO_TYPE_UNSPECIFIED = VideoType._(0, _omitEnumNames ? '' : 'VIDEO_TYPE_UNSPECIFIED'); - static const VideoType VIDEO_TYPE_GET_ON = VideoType._(1, _omitEnumNames ? '' : 'VIDEO_TYPE_GET_ON'); - static const VideoType VIDEO_TYPE_GET_OFF = VideoType._(2, _omitEnumNames ? '' : 'VIDEO_TYPE_GET_OFF'); - - static const $core.List values = [ - VIDEO_TYPE_UNSPECIFIED, - VIDEO_TYPE_GET_ON, - VIDEO_TYPE_GET_OFF, - ]; - - static final $core.Map<$core.int, VideoType> _byValue = $pb.ProtobufEnum.initByValue(values); - static VideoType? valueOf($core.int value) => _byValue[value]; - - const VideoType._($core.int v, $core.String n) : super(v, n); -} - - -const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart index e22f558e..adf0a7c9 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart @@ -15,24 +15,25 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'machine_learning.pb.dart' as $1; +import '../../where_child_bus/v1/bus.pb.dart' as $1; +import 'machine_learning.pb.dart' as $2; export 'machine_learning.pb.dart'; @$pb.GrpcServiceName('machine_learning.v1.MachineLearningService') class MachineLearningServiceClient extends $grpc.Client { - static final _$train = $grpc.ClientMethod<$1.TrainRequest, $1.TrainResponse>( + static final _$train = $grpc.ClientMethod<$2.TrainRequest, $2.TrainResponse>( '/machine_learning.v1.MachineLearningService/Train', - ($1.TrainRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.TrainResponse.fromBuffer(value)); - static final _$pred = $grpc.ClientMethod<$1.PredRequest, $1.PredResponse>( + ($2.TrainRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.TrainResponse.fromBuffer(value)); + static final _$pred = $grpc.ClientMethod<$1.StreamBusVideoRequest, $2.PredResponse>( '/machine_learning.v1.MachineLearningService/Pred', - ($1.PredRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.PredResponse.fromBuffer(value)); - static final _$faceDetectAndClip = $grpc.ClientMethod<$1.FaceDetectAndClipRequest, $1.FaceDetectAndClipResponse>( + ($1.StreamBusVideoRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.PredResponse.fromBuffer(value)); + static final _$faceDetectAndClip = $grpc.ClientMethod<$2.FaceDetectAndClipRequest, $2.FaceDetectAndClipResponse>( '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', - ($1.FaceDetectAndClipRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.FaceDetectAndClipResponse.fromBuffer(value)); + ($2.FaceDetectAndClipRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.FaceDetectAndClipResponse.fromBuffer(value)); MachineLearningServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -40,15 +41,15 @@ class MachineLearningServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$1.TrainResponse> train($1.TrainRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$2.TrainResponse> train($2.TrainRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$train, request, options: options); } - $grpc.ResponseStream<$1.PredResponse> pred($async.Stream<$1.PredRequest> request, {$grpc.CallOptions? options}) { + $grpc.ResponseStream<$2.PredResponse> pred($async.Stream<$1.StreamBusVideoRequest> request, {$grpc.CallOptions? options}) { return $createStreamingCall(_$pred, request, options: options); } - $grpc.ResponseFuture<$1.FaceDetectAndClipResponse> faceDetectAndClip($1.FaceDetectAndClipRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$2.FaceDetectAndClipResponse> faceDetectAndClip($2.FaceDetectAndClipRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$faceDetectAndClip, request, options: options); } } @@ -58,38 +59,38 @@ abstract class MachineLearningServiceBase extends $grpc.Service { $core.String get $name => 'machine_learning.v1.MachineLearningService'; MachineLearningServiceBase() { - $addMethod($grpc.ServiceMethod<$1.TrainRequest, $1.TrainResponse>( + $addMethod($grpc.ServiceMethod<$2.TrainRequest, $2.TrainResponse>( 'Train', train_Pre, false, false, - ($core.List<$core.int> value) => $1.TrainRequest.fromBuffer(value), - ($1.TrainResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.PredRequest, $1.PredResponse>( + ($core.List<$core.int> value) => $2.TrainRequest.fromBuffer(value), + ($2.TrainResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.StreamBusVideoRequest, $2.PredResponse>( 'Pred', pred, true, true, - ($core.List<$core.int> value) => $1.PredRequest.fromBuffer(value), - ($1.PredResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.FaceDetectAndClipRequest, $1.FaceDetectAndClipResponse>( + ($core.List<$core.int> value) => $1.StreamBusVideoRequest.fromBuffer(value), + ($2.PredResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$2.FaceDetectAndClipRequest, $2.FaceDetectAndClipResponse>( 'FaceDetectAndClip', faceDetectAndClip_Pre, false, false, - ($core.List<$core.int> value) => $1.FaceDetectAndClipRequest.fromBuffer(value), - ($1.FaceDetectAndClipResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $2.FaceDetectAndClipRequest.fromBuffer(value), + ($2.FaceDetectAndClipResponse value) => value.writeToBuffer())); } - $async.Future<$1.TrainResponse> train_Pre($grpc.ServiceCall call, $async.Future<$1.TrainRequest> request) async { + $async.Future<$2.TrainResponse> train_Pre($grpc.ServiceCall call, $async.Future<$2.TrainRequest> request) async { return train(call, await request); } - $async.Future<$1.FaceDetectAndClipResponse> faceDetectAndClip_Pre($grpc.ServiceCall call, $async.Future<$1.FaceDetectAndClipRequest> request) async { + $async.Future<$2.FaceDetectAndClipResponse> faceDetectAndClip_Pre($grpc.ServiceCall call, $async.Future<$2.FaceDetectAndClipRequest> request) async { return faceDetectAndClip(call, await request); } - $async.Future<$1.TrainResponse> train($grpc.ServiceCall call, $1.TrainRequest request); - $async.Stream<$1.PredResponse> pred($grpc.ServiceCall call, $async.Stream<$1.PredRequest> request); - $async.Future<$1.FaceDetectAndClipResponse> faceDetectAndClip($grpc.ServiceCall call, $1.FaceDetectAndClipRequest request); + $async.Future<$2.TrainResponse> train($grpc.ServiceCall call, $2.TrainRequest request); + $async.Stream<$2.PredResponse> pred($grpc.ServiceCall call, $async.Stream<$1.StreamBusVideoRequest> request); + $async.Future<$2.FaceDetectAndClipResponse> faceDetectAndClip($grpc.ServiceCall call, $2.FaceDetectAndClipRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index b20d61e4..2e0082b2 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -13,36 +13,6 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use busTypeDescriptor instead') -const BusType$json = { - '1': 'BusType', - '2': [ - {'1': 'BUS_TYPE_UNSPECIFIED', '2': 0}, - {'1': 'BUS_TYPE_MORNING', '2': 1}, - {'1': 'BUS_TYPE_EVENING', '2': 2}, - ], -}; - -/// Descriptor for `BusType`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List busTypeDescriptor = $convert.base64Decode( - 'CgdCdXNUeXBlEhgKFEJVU19UWVBFX1VOU1BFQ0lGSUVEEAASFAoQQlVTX1RZUEVfTU9STklORx' - 'ABEhQKEEJVU19UWVBFX0VWRU5JTkcQAg=='); - -@$core.Deprecated('Use videoTypeDescriptor instead') -const VideoType$json = { - '1': 'VideoType', - '2': [ - {'1': 'VIDEO_TYPE_UNSPECIFIED', '2': 0}, - {'1': 'VIDEO_TYPE_GET_ON', '2': 1}, - {'1': 'VIDEO_TYPE_GET_OFF', '2': 2}, - ], -}; - -/// Descriptor for `VideoType`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List videoTypeDescriptor = $convert.base64Decode( - 'CglWaWRlb1R5cGUSGgoWVklERU9fVFlQRV9VTlNQRUNJRklFRBAAEhUKEVZJREVPX1RZUEVfR0' - 'VUX09OEAESFgoSVklERU9fVFlQRV9HRVRfT0ZGEAI='); - @$core.Deprecated('Use trainRequestDescriptor instead') const TrainRequest$json = { '1': 'TrainRequest', @@ -50,15 +20,15 @@ const TrainRequest$json = { {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, {'1': 'bus_id', '3': 2, '4': 1, '5': 9, '10': 'busId'}, {'1': 'child_ids', '3': 3, '4': 3, '5': 9, '10': 'childIds'}, - {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.machine_learning.v1.BusType', '10': 'busType'}, + {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, ], }; /// Descriptor for `TrainRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List trainRequestDescriptor = $convert.base64Decode( 'CgxUcmFpblJlcXVlc3QSHQoKbnVyc2VyeV9pZBgBIAEoCVIJbnVyc2VyeUlkEhUKBmJ1c19pZB' - 'gCIAEoCVIFYnVzSWQSGwoJY2hpbGRfaWRzGAMgAygJUghjaGlsZElkcxI3CghidXNfdHlwZRgE' - 'IAEoDjIcLm1hY2hpbmVfbGVhcm5pbmcudjEuQnVzVHlwZVIHYnVzVHlwZQ=='); + 'gCIAEoCVIFYnVzSWQSGwoJY2hpbGRfaWRzGAMgAygJUghjaGlsZElkcxI2CghidXNfdHlwZRgE' + 'IAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBl'); @$core.Deprecated('Use trainResponseDescriptor instead') const TrainResponse$json = { @@ -72,25 +42,6 @@ const TrainResponse$json = { final $typed_data.Uint8List trainResponseDescriptor = $convert.base64Decode( 'Cg1UcmFpblJlc3BvbnNlEh0KCmlzX3N0YXJ0ZWQYASABKAhSCWlzU3RhcnRlZA=='); -@$core.Deprecated('Use predRequestDescriptor instead') -const PredRequest$json = { - '1': 'PredRequest', - '2': [ - {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'bus_type', '3': 2, '4': 1, '5': 14, '6': '.machine_learning.v1.BusType', '10': 'busType'}, - {'1': 'video_type', '3': 3, '4': 1, '5': 14, '6': '.machine_learning.v1.VideoType', '10': 'videoType'}, - {'1': 'video_chunk', '3': 4, '4': 1, '5': 12, '10': 'videoChunk'}, - {'1': 'timestamp', '3': 5, '4': 1, '5': 3, '10': 'timestamp'}, - ], -}; - -/// Descriptor for `PredRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List predRequestDescriptor = $convert.base64Decode( - 'CgtQcmVkUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lkEjcKCGJ1c190eXBlGAIgASgOMh' - 'wubWFjaGluZV9sZWFybmluZy52MS5CdXNUeXBlUgdidXNUeXBlEj0KCnZpZGVvX3R5cGUYAyAB' - 'KA4yHi5tYWNoaW5lX2xlYXJuaW5nLnYxLlZpZGVvVHlwZVIJdmlkZW9UeXBlEh8KC3ZpZGVvX2' - 'NodW5rGAQgASgMUgp2aWRlb0NodW5rEhwKCXRpbWVzdGFtcBgFIAEoA1IJdGltZXN0YW1w'); - @$core.Deprecated('Use predResponseDescriptor instead') const PredResponse$json = { '1': 'PredResponse', diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py index ed4aaaf5..68f8f6bb 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py @@ -12,9 +12,11 @@ _sym_db = _symbol_database.Default() +from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\"\x9a\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x37\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"\xdb\x01\n\x0bPredRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x37\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1c.machine_learning.v1.BusTypeR\x07\x62usType\x12=\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1e.machine_learning.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x1c\n\ttimestamp\x18\x05 \x01(\x03R\ttimestamp\"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02\x32\xad\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12O\n\x04Pred\x12 .machine_learning.v1.PredRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a\"where_child_bus/v1/resources.proto\"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xb6\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -22,22 +24,16 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' - _globals['_BUSTYPE']._serialized_start=718 - _globals['_BUSTYPE']._serialized_end=797 - _globals['_VIDEOTYPE']._serialized_start=799 - _globals['_VIDEOTYPE']._serialized_end=885 - _globals['_TRAINREQUEST']._serialized_start=68 - _globals['_TRAINREQUEST']._serialized_end=222 - _globals['_TRAINRESPONSE']._serialized_start=224 - _globals['_TRAINRESPONSE']._serialized_end=270 - _globals['_PREDREQUEST']._serialized_start=273 - _globals['_PREDREQUEST']._serialized_end=492 - _globals['_PREDRESPONSE']._serialized_start=494 - _globals['_PREDRESPONSE']._serialized_end=570 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=572 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=656 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=658 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=716 - _globals['_MACHINELEARNINGSERVICE']._serialized_start=888 - _globals['_MACHINELEARNINGSERVICE']._serialized_end=1189 + _globals['_TRAINREQUEST']._serialized_start=134 + _globals['_TRAINREQUEST']._serialized_end=287 + _globals['_TRAINRESPONSE']._serialized_start=289 + _globals['_TRAINRESPONSE']._serialized_end=335 + _globals['_PREDRESPONSE']._serialized_start=337 + _globals['_PREDRESPONSE']._serialized_end=413 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=415 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=499 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=501 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=559 + _globals['_MACHINELEARNINGSERVICE']._serialized_start=562 + _globals['_MACHINELEARNINGSERVICE']._serialized_end=872 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi index c5c6722a..c5d42e2f 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi @@ -1,29 +1,12 @@ +from where_child_bus.v1 import bus_pb2 as _bus_pb2 +from where_child_bus.v1 import resources_pb2 as _resources_pb2 from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor -class BusType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () - BUS_TYPE_UNSPECIFIED: _ClassVar[BusType] - BUS_TYPE_MORNING: _ClassVar[BusType] - BUS_TYPE_EVENING: _ClassVar[BusType] - -class VideoType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () - VIDEO_TYPE_UNSPECIFIED: _ClassVar[VideoType] - VIDEO_TYPE_GET_ON: _ClassVar[VideoType] - VIDEO_TYPE_GET_OFF: _ClassVar[VideoType] -BUS_TYPE_UNSPECIFIED: BusType -BUS_TYPE_MORNING: BusType -BUS_TYPE_EVENING: BusType -VIDEO_TYPE_UNSPECIFIED: VideoType -VIDEO_TYPE_GET_ON: VideoType -VIDEO_TYPE_GET_OFF: VideoType - class TrainRequest(_message.Message): __slots__ = ("nursery_id", "bus_id", "child_ids", "bus_type") NURSERY_ID_FIELD_NUMBER: _ClassVar[int] @@ -33,8 +16,8 @@ class TrainRequest(_message.Message): nursery_id: str bus_id: str child_ids: _containers.RepeatedScalarFieldContainer[str] - bus_type: BusType - def __init__(self, nursery_id: _Optional[str] = ..., bus_id: _Optional[str] = ..., child_ids: _Optional[_Iterable[str]] = ..., bus_type: _Optional[_Union[BusType, str]] = ...) -> None: ... + bus_type: _resources_pb2.BusType + def __init__(self, nursery_id: _Optional[str] = ..., bus_id: _Optional[str] = ..., child_ids: _Optional[_Iterable[str]] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ...) -> None: ... class TrainResponse(_message.Message): __slots__ = ("is_started",) @@ -42,20 +25,6 @@ class TrainResponse(_message.Message): is_started: bool def __init__(self, is_started: bool = ...) -> None: ... -class PredRequest(_message.Message): - __slots__ = ("bus_id", "bus_type", "video_type", "video_chunk", "timestamp") - BUS_ID_FIELD_NUMBER: _ClassVar[int] - BUS_TYPE_FIELD_NUMBER: _ClassVar[int] - VIDEO_TYPE_FIELD_NUMBER: _ClassVar[int] - VIDEO_CHUNK_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - bus_id: str - bus_type: BusType - video_type: VideoType - video_chunk: bytes - timestamp: int - def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[BusType, str]] = ..., video_type: _Optional[_Union[VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[int] = ...) -> None: ... - class PredResponse(_message.Message): __slots__ = ("is_detected", "child_ids") IS_DETECTED_FIELD_NUMBER: _ClassVar[int] diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py index b9af7a7e..7d9fccc4 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py @@ -3,6 +3,7 @@ import grpc from machine_learning.v1 import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 +from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 class MachineLearningServiceStub(object): @@ -21,7 +22,7 @@ def __init__(self, channel): ) self.Pred = channel.stream_stream( '/machine_learning.v1.MachineLearningService/Pred', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.SerializeToString, + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, ) self.FaceDetectAndClip = channel.unary_unary( @@ -62,7 +63,7 @@ def add_MachineLearningServiceServicer_to_server(servicer, server): ), 'Pred': grpc.stream_stream_rpc_method_handler( servicer.Pred, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.FromString, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, ), 'FaceDetectAndClip': grpc.unary_unary_rpc_method_handler( @@ -109,7 +110,7 @@ def Pred(request_iterator, timeout=None, metadata=None): return grpc.experimental.stream_stream(request_iterator, target, '/machine_learning.v1.MachineLearningService/Pred', - machine__learning_dot_v1_dot_machine__learning__pb2.PredRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py index f6ab49a6..406ef670 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py @@ -3,7 +3,7 @@ import grpc import grpc.experimental -import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 +from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 class BusServiceStub(object): diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index e840bd08..c2eeb91a 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -1,44 +1,27 @@ syntax = "proto3"; package machine_learning.v1; +import "where_child_bus/v1/bus.proto"; +import "where_child_bus/v1/resources.proto"; service MachineLearningService { rpc Train(TrainRequest) returns (TrainResponse); - rpc Pred(stream PredRequest) returns (stream PredResponse); + rpc Pred(stream where_child_bus.v1.StreamBusVideoRequest) returns (stream PredResponse); rpc FaceDetectAndClip(FaceDetectAndClipRequest) returns (FaceDetectAndClipResponse); } -enum BusType { - BUS_TYPE_UNSPECIFIED = 0; - BUS_TYPE_MORNING = 1; - BUS_TYPE_EVENING = 2; -} - -enum VideoType { - VIDEO_TYPE_UNSPECIFIED = 0; - VIDEO_TYPE_GET_ON = 1; - VIDEO_TYPE_GET_OFF = 2; -} message TrainRequest { string nursery_id = 1; string bus_id = 2; repeated string child_ids = 3; - BusType bus_type = 4; + where_child_bus.v1.BusType bus_type = 4; } message TrainResponse { bool is_started = 1; } -message PredRequest { - string bus_id = 1; - BusType bus_type = 2; - VideoType video_type = 3; - bytes video_chunk = 4; // Chunk of video data - int64 timestamp = 5; // Unix timestamp -} - message PredResponse { bool is_detected = 1; repeated string child_ids = 2; @@ -52,4 +35,3 @@ message FaceDetectAndClipRequest { message FaceDetectAndClipResponse { bool is_started = 1; } - From 3fddd6606d8d86d06292c268fdddd94901c0dd46 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 02:43:38 +0900 Subject: [PATCH 416/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E3=83=93=E3=83=87=E3=82=AA=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC?= =?UTF-8?q?=E3=83=9F=E3=83=B3=E3=82=B0=E6=A9=9F=E8=83=BD=E3=82=92=E5=AE=9F?= =?UTF-8?q?=E8=A3=85=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/bus.go | 12 ++-- backend/usecases/bus/bus.go | 137 ++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 6 deletions(-) diff --git a/backend/interfaces/bus.go b/backend/interfaces/bus.go index 4577a0c1..5625bcbd 100644 --- a/backend/interfaces/bus.go +++ b/backend/interfaces/bus.go @@ -20,14 +20,14 @@ func (s *busServiceServer) SendLocationContinuous(stream pb.BusService_SendLocat return s.interactor.SendLocationContinuous(stream) } -// StreamBusVideo implements where_child_busv1.BusServiceServer. -func (*busServiceServer) StreamBusVideo(pb.BusService_StreamBusVideoServer) error { - panic("unimplemented") +// TrackBusContinuous implements where_child_busv1.BusServiceServer. +func (s *busServiceServer) TrackBusContinuous(req *pb.TrackBusContinuousRequest, stream pb.BusService_TrackBusContinuousServer) error { + return s.interactor.TrackBusContinuous(req, stream) } -// TrackBusContinuous implements where_child_busv1.BusServiceServer. -func (*busServiceServer) TrackBusContinuous(*pb.TrackBusContinuousRequest, pb.BusService_TrackBusContinuousServer) error { - panic("unimplemented") +// StreamBusVideo implements where_child_busv1.BusServiceServer. +func (s *busServiceServer) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) error { + return s.interactor.StreamBusVideo(stream) } // CreateBus implements where_child_busv1.BusServiceServer. diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index d3addea2..3ead7c67 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "io" + "log" "time" "github.com/google/uuid" @@ -16,6 +17,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + boardingrecordRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childbusassociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" @@ -323,6 +325,141 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea } } +func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) error { + MLStream, err := i.MLServiceClient.Pred(context.Background()) + if err != nil { + return err + } + + var busID string + var videoType pb.VideoType + + // Go サーバーから受け取ったメッセージをPythonサーバーに転送 + for { + in, err := stream.Recv() + if err == io.EOF { + // ストリームの終了 + break + } + if err != nil { + return err + } + + // バスID、バスタイプ、ビデオタイプを保持 + busID = in.BusId + videoType = in.VideoType + + // Python サーバーへ送信 + err = MLStream.Send(&pb.StreamBusVideoRequest{ + BusId: in.BusId, + BusType: in.BusType, + VideoType: in.VideoType, + VideoChunk: in.VideoChunk, + Timestamp: in.Timestamp, + }) + if err != nil { + return err + } + } + + // Python サーバーからのレスポンスを待つ + for { + resp, err := MLStream.Recv() + if err == io.EOF { + // ストリームの終了 + break + } + if err != nil { + return err + } + + if !resp.IsDetected { + // 検出されなかった場合は、次のループに進む + continue + } + + var pbChildren []*pb.Child + busUUID := uuid.MustParse(busID) + for _, childId := range resp.ChildIds { + childUUID := uuid.MustParse(childId) + // まず既存のレコードを検索 + exists, err := i.entClient.BoardingRecord.Query(). + Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(childId)))). + Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(uuid.MustParse(busID)))). + Exist(context.Background()) + + if err != nil { + // エラーハンドリング + log.Printf("Failed to query existing boarding record: %v", err) + return err + } + + // 既存のレコードがない場合にのみ新しいレコードを作成 + if !exists { + _, err = i.entClient.BoardingRecord.Create(). + SetChildID(childUUID). + SetBusID(busUUID). + SetTimestamp(time.Now()). + Save(context.Background()) + if err != nil { + // レコード作成時のエラーハンドリング + i.logger.Error("Failed to create new boarding record: %v", err) + return err + } + // レコード作成成功 + } + + switch videoType { + case pb.VideoType_VIDEO_TYPE_GET_ON: + // 乗車時の検出の場合 + _, err = i.entClient.BoardingRecord.Update(). + Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). // 乗車レコードを更新 + Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(busUUID))). // 乗車レコードを更新 + SetIsBoarding(true). // 乗車フラグを立てる + SetTimestamp(time.Now()). // 乗車時刻を記録 + Save(context.Background()) + case pb.VideoType_VIDEO_TYPE_GET_OFF: + // 降車時の検出の場合 + _, err = i.entClient.BoardingRecord.Update(). + Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). // 降車レコードを更新 + Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(busUUID))). // 降車レコードを更新 + SetIsBoarding(false). // 降車フラグを立てる + SetTimestamp(time.Now()). // 降車時刻を記録 + Save(context.Background()) + default: + return fmt.Errorf("invalid video type: %v", videoType) + } + + if err != nil { + // レコード更新時のエラーハンドリング + i.logger.Error("Failed to update boarding record: %v", err) + return err + } + // レコード更新成功 + + child, err := i.entClient.Child.Query(). + Where(childRepo.IDEQ(childUUID)). + WithGuardian(). + All(context.Background()) + if err != nil { + i.logger.Error("Failed to get child: %v", err) + return err + } + pbChildren = append(pbChildren, utils.ToPbChild(child[0])) + } + // 元のクライアントにレスポンスを返す + err = stream.SendMsg(&pb.StreamBusVideoResponse{ + IsDetected: resp.IsDetected, + Children: pbChildren, // ChildIDsをChildrenオブジェクトに変換する必要がある + }) + if err != nil { + return err + } + } + + return nil +} + func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.BusQuery, error)) ([]*pb.Bus, error) { tx, err := i.entClient.Tx(ctx) if err != nil { From 888a25c688236e0cd40edd88958bf00f199994c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=82=8F=E3=81=8D=E3=82=93?= <93261102+KinjiKawaguchi@users.noreply.github.com> Date: Sun, 18 Feb 2024 02:48:44 +0900 Subject: [PATCH 417/771] ci: Create golangci-lint.yml --- .github/workflows/golangci-lint.yml | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/golangci-lint.yml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 00000000..36fba8f4 --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,37 @@ +name: golangci-lint + +on: + push: + branches: + - main # Changed from 'master' to 'main' + - develop # Added 'develop' branch + pull_request: + branches: + - main # Specify branches for pull request as well + - develop + +permissions: + contents: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.21' + - name: golangci-lint + uses: golangci/golangci-lint-action@v4 + with: + version: v1.54 + working-directory: backend # Set this to the directory where your Go code is located + + # You can uncomment and adjust the following lines if needed: + # args: --timeout=30m --config=/backend/.golangci.yml --issues-exit-code=0 + # only-new-issues: true + # skip-cache: true + # skip-pkg-cache: true + # skip-build-cache: true + # install-mode: "goinstall" From 96e16862c3735c8f78b11ea023f7f1ddb20b2d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=82=8F=E3=81=8D=E3=82=93?= <93261102+KinjiKawaguchi@users.noreply.github.com> Date: Sun, 18 Feb 2024 02:50:59 +0900 Subject: [PATCH 418/771] Update golangci-lint.yml --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 36fba8f4..de7659a0 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.21.5' - name: golangci-lint uses: golangci/golangci-lint-action@v4 with: From 9743b813d6618a232a450369b833731f7bbc8c15 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 03:28:34 +0900 Subject: [PATCH 419/771] ci: update ci --- .github/workflows/deploy-to-gcloud.yml | 38 ++++++++++++++------------ backend/Dockerfile | 13 +++++++-- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index fb6a2e4c..3ed6a8a7 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -11,27 +11,25 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 + - uses: "actions/checkout@v4" - - id: "auth" - name: "Authenticate to Google Cloud" - uses: "google-github-actions/auth@v2" + - uses: "google-github-actions/auth@v2" with: - token_format: "access_token" - workload_identity_provider: github-actions-service-account - service_account: projects/484440918227/locations/global/workloadIdentityPools/github-action-pool/providers/github-action-provider - # https://github.com/dockeogle-container-registry-gcr - - name: Login to GCR - uses: docker/login-action@v2 + project_id: ${{ secrets.GCP_PROJECT_ID }} + workload_identity_provider: "projects/484440918227/locations/global/workloadIdentityPools/github-action-pool/providers/github-action-provider" + service_account: "grpc-server-sa@wherechildbus.iam.gserviceaccount.com" + + - name: "Set up Cloud SDK" + uses: "google-github-actions/setup-gcloud@v2" with: - registry: asia.gcr.io - username: oauth2accesstoken - password: ${{ steps.auth.outputs.access_token }} + version: ">= 363.0.0" + + - name: "Use gcloud CLI" + run: "gcloud info" - name: Build Docker Image run: | - docker build --tag=gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest \ + docker build --tag=gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_DOCKER_IMAGE_NAME }}:latest \ --file=./backend/Dockerfile \ --platform linux/amd64 ./backend \ --build-arg DSN="${{ secrets.DSN }}" \ @@ -40,12 +38,16 @@ jobs: --build-arg DB_ADDR="${{ secrets.DB_ADDR }}" \ --build-arg DB_NAME="${{ secrets.DB_NAME }}" \ --build-arg PORT="${{ secrets.PORT }}" \ - --build-arg MODE_DEV="${{ secrets.MODE_DEV }}" + --build-arg MODE_DEV="${{ secrets.MODE_DEV }} \ + --build-arg GOOGLE_APPLICATION_CREDENTIALS="${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}" + --build-arg STORAGE_BUCKET_NAME="${{ secrets.STORAGE_BUCKET_NAME }}" + --build-arg PASSWORD_PEPPER="${{ secrets.PASSWORD_PEPPER }}" + --build-arg ML_ADDR="${{ secrets.ML_ADDR }}" - name: Push Docker Image to Google Container Registry run: | - docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest + docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_DOCKER_IMAGE_NAME }}:latest - name: Deploy to Cloud Run run: | - gcloud run deploy where-child-bus-grpc --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/where_child_bus-grpc:latest --platform=managed --allow-unauthenticated --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.GCP_REGION }} + gcloud run deploy ${{ secrets.GCP_CLOUD_RUN_NAME }} --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_DOCKER_IMAGE_NAME }}:latest --platform=managed --allow-unauthenticated --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.GCP_REGION }} diff --git a/backend/Dockerfile b/backend/Dockerfile index 63a1694e..525c67aa 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -12,6 +12,11 @@ ARG DB_ADDR ARG DB_NAME ARG PORT ARG MODE_DEV +ARG GOOGLE_APPLICATION_CREDENTIALS +ARG STORAGE_BUCKET_NAME +ARG PASSWORD_PEPPER +ARG ML_ADDR + # .env ファイルを生成 RUN echo "DSN=$DSN" > .env \ @@ -20,9 +25,11 @@ RUN echo "DSN=$DSN" > .env \ && echo "DB_ADDR=$DB_ADDR" >> .env \ && echo "DB_NAME=$DB_NAME" >> .env \ && echo "PORT=$PORT" >> .env \ - && echo "MODE_DEV=$MODE_DEV" >> .env - -RUN go mod download + && echo "MODE_DEV=$MODE_DEV" >> .env \ + && echo "GOOGLE_APPLICATION_CREDENTIALS" >> .env \ + && echo "STORAGE_BUCKET_NAME" >> .env \ + && echo "PASSWORD_PEPPER" >> .env \ + %% echo "ML_ADDR" >> .env RUN go mod download From 253f1e5714cf287ff715f24de4182a0b430cd80a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 03:32:30 +0900 Subject: [PATCH 420/771] ci: update actions permissions --- .github/workflows/deploy-to-gcloud.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 3ed6a8a7..d1d7c13b 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -1,4 +1,7 @@ name: Deploy to Google Cloud Run +permissions: + id-token: write + contents: read on: push: From 2b67004df740ffa54f26fe3121187ed06a89a38f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 03:36:04 +0900 Subject: [PATCH 421/771] =?UTF-8?q?ci:=20Dockerfile=E3=81=AE=E7=92=B0?= =?UTF-8?q?=E5=A2=83=E5=A4=89=E6=95=B0=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 525c67aa..8bf48a58 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -26,10 +26,10 @@ RUN echo "DSN=$DSN" > .env \ && echo "DB_NAME=$DB_NAME" >> .env \ && echo "PORT=$PORT" >> .env \ && echo "MODE_DEV=$MODE_DEV" >> .env \ - && echo "GOOGLE_APPLICATION_CREDENTIALS" >> .env \ - && echo "STORAGE_BUCKET_NAME" >> .env \ - && echo "PASSWORD_PEPPER" >> .env \ - %% echo "ML_ADDR" >> .env + && echo "GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS" >> .env \ + && echo "STORAGE_BUCKET_NAME=$STORAGE_BUCKET_NAME" >> .env \ + && echo "PASSWORD_PEPPER=$PASSWORD_PEPPER" >> .env \ + %% echo "ML_ADDR=$ML_ADDR" >> .env RUN go mod download From ababcba2edca4bfcc4b9392ead4b220b00288c50 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 03:38:39 +0900 Subject: [PATCH 422/771] fix: DockerFile --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 8bf48a58..b68b6c04 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -29,7 +29,7 @@ RUN echo "DSN=$DSN" > .env \ && echo "GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS" >> .env \ && echo "STORAGE_BUCKET_NAME=$STORAGE_BUCKET_NAME" >> .env \ && echo "PASSWORD_PEPPER=$PASSWORD_PEPPER" >> .env \ - %% echo "ML_ADDR=$ML_ADDR" >> .env + && echo "ML_ADDR=$ML_ADDR" >> .env RUN go mod download From 3955ed9fb7a066c9b00bef100229a4d995495110 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 03:42:43 +0900 Subject: [PATCH 423/771] fix: fix workflows --- .github/workflows/deploy-to-gcloud.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index d1d7c13b..0aa97bd1 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -42,9 +42,9 @@ jobs: --build-arg DB_NAME="${{ secrets.DB_NAME }}" \ --build-arg PORT="${{ secrets.PORT }}" \ --build-arg MODE_DEV="${{ secrets.MODE_DEV }} \ - --build-arg GOOGLE_APPLICATION_CREDENTIALS="${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}" - --build-arg STORAGE_BUCKET_NAME="${{ secrets.STORAGE_BUCKET_NAME }}" - --build-arg PASSWORD_PEPPER="${{ secrets.PASSWORD_PEPPER }}" + --build-arg GOOGLE_APPLICATION_CREDENTIALS="${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}" \ + --build-arg STORAGE_BUCKET_NAME="${{ secrets.STORAGE_BUCKET_NAME }}" \ + --build-arg PASSWORD_PEPPER="${{ secrets.PASSWORD_PEPPER }}" \ --build-arg ML_ADDR="${{ secrets.ML_ADDR }}" - name: Push Docker Image to Google Container Registry From 004dc65621ea97600c232f18f5ca089c58bb9d53 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 03:44:15 +0900 Subject: [PATCH 424/771] fix: workflow --- .github/workflows/deploy-to-gcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 0aa97bd1..e2c0297c 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -41,7 +41,7 @@ jobs: --build-arg DB_ADDR="${{ secrets.DB_ADDR }}" \ --build-arg DB_NAME="${{ secrets.DB_NAME }}" \ --build-arg PORT="${{ secrets.PORT }}" \ - --build-arg MODE_DEV="${{ secrets.MODE_DEV }} \ + --build-arg MODE_DEV="${{ secrets.MODE_DEV }}" \ --build-arg GOOGLE_APPLICATION_CREDENTIALS="${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}" \ --build-arg STORAGE_BUCKET_NAME="${{ secrets.STORAGE_BUCKET_NAME }}" \ --build-arg PASSWORD_PEPPER="${{ secrets.PASSWORD_PEPPER }}" \ From 4fce20c325b181d113ed2d7a9d5fb786a1cf4b64 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 03:47:35 +0900 Subject: [PATCH 425/771] fix: fix Dockerfile --- backend/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index b68b6c04..361a3473 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -50,6 +50,8 @@ RUN apk --no-cache add ca-certificates # ビルドステージからバイナリと.envファイルをコピー COPY --from=builder /go/bin/server /server +COPY --from=builder /srv/grpc/.env / +COPY --from=builder /srv/grpc/secrets /secrets # アプリケーションの起動 ENTRYPOINT ["/server"] From 5a797ef9225e617c51fe4dfd08cdecfc2bc93f03 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 03:48:36 +0900 Subject: [PATCH 426/771] =?UTF-8?q?ci(ml):=20github=20actions=E3=81=AB?= =?UTF-8?q?=E9=96=A2=E3=82=8F=E3=82=8Byml=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E5=88=9D=E6=9C=9F=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deploy_cloudrun_machine_learning.yml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/deploy_cloudrun_machine_learning.yml diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml new file mode 100644 index 00000000..50988924 --- /dev/null +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -0,0 +1,41 @@ +name: Deployment of machine learning system to CloudRun + +on: + push: + branches: + - develop + - feature/machine-learning/cicd + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@master + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + service_account_key: ${{ secrets.GCP_SA_KEY }} + export_default_credentials: true + + - name: Build Docker image + run: | + docker build \ + --tag=gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest \ + --file=./Dockerfile \ + --platform linux/amd64 . + + - name: Push Docker image to Artifact Registry + run: | + docker push gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest + + - name: Deploy to Cloud Run + run: | + gcloud run deploy ${{ secrets.GCP_IMAGE_NAME }} \ + --image gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest \ + --region ${{ secrets.REGION }} \ + --platform managed + + From 09ff6d409061ac5699a8df47a876b13b340f8cf9 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 03:50:27 +0900 Subject: [PATCH 427/771] fix(ml): workflow --- .../deploy_cloudrun_machine_learning.yml | 58 +++++++++---------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 50988924..e0e97226 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -1,4 +1,4 @@ -name: Deployment of machine learning system to CloudRun +name: Deployment of machine learning system to CloudRun on: push: @@ -10,32 +10,30 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@master - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true - - - name: Build Docker image - run: | - docker build \ - --tag=gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest \ - --file=./Dockerfile \ - --platform linux/amd64 . - - - name: Push Docker image to Artifact Registry - run: | - docker push gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest - - - name: Deploy to Cloud Run - run: | - gcloud run deploy ${{ secrets.GCP_IMAGE_NAME }} \ - --image gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest \ - --region ${{ secrets.REGION }} \ - --platform managed - - + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@main + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + service_account_key: ${{ secrets.GCP_SA_KEY }} + export_default_credentials: true + + - name: Build Docker image + run: | + docker build \ + --tag=gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest \ + --file=./Dockerfile \ + --platform linux/amd64 . + + - name: Push Docker image to Artifact Registry + run: | + docker push gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest + + - name: Deploy to Cloud Run + run: | + gcloud run deploy ${{ secrets.GCP_IMAGE_NAME }} \ + --image gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest \ + --region ${{ secrets.REGION }} \ + --platform managed From 9c5b96ac480d70c078aa0e1c2e01fe7c27acd73f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 03:53:01 +0900 Subject: [PATCH 428/771] ci: add credentials --- .github/workflows/deploy-to-gcloud.yml | 3 ++- backend/Dockerfile | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index e2c0297c..0bc7c227 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -45,7 +45,8 @@ jobs: --build-arg GOOGLE_APPLICATION_CREDENTIALS="${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}" \ --build-arg STORAGE_BUCKET_NAME="${{ secrets.STORAGE_BUCKET_NAME }}" \ --build-arg PASSWORD_PEPPER="${{ secrets.PASSWORD_PEPPER }}" \ - --build-arg ML_ADDR="${{ secrets.ML_ADDR }}" + --build-arg ML_ADDR="${{ secrets.ML_ADDR }}" \ + --build-arg INSIDE_OF_CREDENTIALS="${{ secrets.INSIDE_OF_CREDENTIALS }}" - name: Push Docker Image to Google Container Registry run: | diff --git a/backend/Dockerfile b/backend/Dockerfile index 361a3473..028d016e 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -17,6 +17,8 @@ ARG STORAGE_BUCKET_NAME ARG PASSWORD_PEPPER ARG ML_ADDR +ARG INSIDE_OF_CREDENTIALS + # .env ファイルを生成 RUN echo "DSN=$DSN" > .env \ @@ -31,6 +33,10 @@ RUN echo "DSN=$DSN" > .env \ && echo "PASSWORD_PEPPER=$PASSWORD_PEPPER" >> .env \ && echo "ML_ADDR=$ML_ADDR" >> .env +# secretsディレクトリのgcp-credentials.jsonを作成 +RUN mkdir secrets +RUN echo "$INSIDE_OF_CREDENTIALS" > secrets/gcp-credentials.json + RUN go mod download ARG VERS="3.11.4" From ff24e8c40f8784b4e779f8815a8ecac66072024c Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 03:53:53 +0900 Subject: [PATCH 429/771] fix(ml): workflow --- .github/workflows/deploy_cloudrun_machine_learning.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index e0e97226..1bd9e771 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -23,17 +23,17 @@ jobs: - name: Build Docker image run: | docker build \ - --tag=gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest \ + --tag=gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest \ --file=./Dockerfile \ --platform linux/amd64 . - name: Push Docker image to Artifact Registry run: | - docker push gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest + docker push gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest - name: Deploy to Cloud Run run: | - gcloud run deploy ${{ secrets.GCP_IMAGE_NAME }} \ - --image gcr.io/${{ secrets.GCP_PROJECT_NAME }}/${{ secrets.GCP_IMAGE_NAME }}:latest \ + gcloud run deploy ${{ secrets.GCP_IMAGE_NAME_FOR_ML }} \ + --image gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest \ --region ${{ secrets.REGION }} \ --platform managed From 77fa11ee1de3a6436d8d1f2c0580b76839b939d7 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 04:03:13 +0900 Subject: [PATCH 430/771] fix(ml): workflow --- .github/workflows/deploy_cloudrun_machine_learning.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 1bd9e771..9b3fe5f2 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v2 - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@main + uses: "google-github-actions/setup-gcloud@v2" with: project_id: ${{ secrets.GCP_PROJECT_ID }} service_account_key: ${{ secrets.GCP_SA_KEY }} @@ -24,8 +24,8 @@ jobs: run: | docker build \ --tag=gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest \ - --file=./Dockerfile \ - --platform linux/amd64 . + --file=./machine_learning/Dockerfile \ + --platform linux/amd64 ./machine_learning - name: Push Docker image to Artifact Registry run: | From 0020fa2697c269a482abe3e4613d1f1e0be3aeb3 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 11:15:40 +0900 Subject: [PATCH 431/771] fix(ml): workflow --- .github/workflows/deploy_cloudrun_machine_learning.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 9b3fe5f2..8f30e91c 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -23,6 +23,8 @@ jobs: - name: Build Docker image run: | docker build \ + --build-arg PROJECT_ID=${{ secrets.PROJECT_ID }} \ + --build-arg BUCKET_NAME=${{ secrets.BUCKET_NAME }} \ --tag=gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest \ --file=./machine_learning/Dockerfile \ --platform linux/amd64 ./machine_learning From a78190f9cd9dd064c0301e59719fbe507c8fa5ae Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 11:15:46 +0900 Subject: [PATCH 432/771] fix(ml): Dockerfile --- machine_learning/dockerfile | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/machine_learning/dockerfile b/machine_learning/dockerfile index c0c6d4ad..5ac08e52 100644 --- a/machine_learning/dockerfile +++ b/machine_learning/dockerfile @@ -1,20 +1,33 @@ +# ベースイメージ FROM python:3.11.6-slim +# ビルド引数を定義 +ARG PROJECT_ID +ARG BUCKET_NAME + +# 作業ディレクトリの設定 WORKDIR /machine-learning -COPY ./requirements.lock /machine-learning/ -RUN sed '/-e/d' requirements.lock > requirements.txt -RUN pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu +# 必要なパッケージのインストール +COPY ./requirements.lock /machine-learning/ +RUN sed '/-e/d' requirements.lock > requirements.txt && \ + pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu # 必要なライブラリをインストール RUN apt-get update && apt-get install -y \ libgl1-mesa-glx \ libglib2.0-0 +# アプリケーションコードをコピー COPY ./src /machine-learning/src -COPY ./secrets /machine-learning/secrets +# .envファイルを作成し、ビルド引数の値を書き込む +RUN mkdir -p /machine-learning/secrets && \ + echo "PROJECT_ID=$PROJECT_ID" > /machine-learning/secrets/.env && \ + echo "BUCKET_NAME=$BUCKET_NAME" >> /machine-learning/secrets/.env + +# 環境変数PATHの設定 ENV PYTHONPATH "${PYTHONPATH}:/machine-learning/src/" -# TODO: server.pyをproto-genから切り出し -ENTRYPOINT ["python", "src/proto-gen/machine_learning/v1/server.py"] +# サーバー起動 +ENTRYPOINT ["python", "src/proto-gen/machine_learning/v1/server.py"] \ No newline at end of file From fb9f6dffdfe68e095bc863682b28744af403bb13 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 11:17:57 +0900 Subject: [PATCH 433/771] fix(ml): some changes --- .github/workflows/deploy_cloudrun_machine_learning.yml | 4 ++-- machine_learning/dockerfile | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 8f30e91c..787fe851 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -23,8 +23,8 @@ jobs: - name: Build Docker image run: | docker build \ - --build-arg PROJECT_ID=${{ secrets.PROJECT_ID }} \ - --build-arg BUCKET_NAME=${{ secrets.BUCKET_NAME }} \ + --build-arg GCP_PROJECT_ID=${{ secrets.GCP_PROJECT_ID }} \ + --build-arg BUCKET_NAME_FOR_ML=${{ secrets.BUCKET_NAME_FOR_ML }} \ --tag=gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest \ --file=./machine_learning/Dockerfile \ --platform linux/amd64 ./machine_learning diff --git a/machine_learning/dockerfile b/machine_learning/dockerfile index 5ac08e52..b5c0da52 100644 --- a/machine_learning/dockerfile +++ b/machine_learning/dockerfile @@ -2,8 +2,8 @@ FROM python:3.11.6-slim # ビルド引数を定義 -ARG PROJECT_ID -ARG BUCKET_NAME +ARG GCP_PROJECT_ID +ARG BUCKET_NAME_FOR_ML # 作業ディレクトリの設定 WORKDIR /machine-learning @@ -23,8 +23,8 @@ COPY ./src /machine-learning/src # .envファイルを作成し、ビルド引数の値を書き込む RUN mkdir -p /machine-learning/secrets && \ - echo "PROJECT_ID=$PROJECT_ID" > /machine-learning/secrets/.env && \ - echo "BUCKET_NAME=$BUCKET_NAME" >> /machine-learning/secrets/.env + echo "PROJECT_ID=$GCP_PROJECT_ID" > /machine-learning/secrets/.env && \ + echo "BUCKET_NAME=$BUCKET_NAME_FOR_ML" >> /machine-learning/secrets/.env # 環境変数PATHの設定 ENV PYTHONPATH "${PYTHONPATH}:/machine-learning/src/" From 7fd32426865bfcccb3db6a22805178fdea85adb8 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 11:36:59 +0900 Subject: [PATCH 434/771] fix(ml): workflow --- .../deploy_cloudrun_machine_learning.yml | 7 +++---- machine_learning/Dockerfile_local | 20 +++++++++++++++++++ machine_learning/dockerfile | 5 +++-- 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 machine_learning/Dockerfile_local diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 787fe851..75dc6d67 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -11,14 +11,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Cloud SDK uses: "google-github-actions/setup-gcloud@v2" with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true + workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} + service_account: ${{ secrets.SERVICE_ACCOUNT }} - name: Build Docker image run: | diff --git a/machine_learning/Dockerfile_local b/machine_learning/Dockerfile_local new file mode 100644 index 00000000..c0c6d4ad --- /dev/null +++ b/machine_learning/Dockerfile_local @@ -0,0 +1,20 @@ +FROM python:3.11.6-slim + +WORKDIR /machine-learning +COPY ./requirements.lock /machine-learning/ + +RUN sed '/-e/d' requirements.lock > requirements.txt +RUN pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu + +# 必要なライブラリをインストール +RUN apt-get update && apt-get install -y \ + libgl1-mesa-glx \ + libglib2.0-0 + +COPY ./src /machine-learning/src +COPY ./secrets /machine-learning/secrets + +ENV PYTHONPATH "${PYTHONPATH}:/machine-learning/src/" + +# TODO: server.pyをproto-genから切り出し +ENTRYPOINT ["python", "src/proto-gen/machine_learning/v1/server.py"] diff --git a/machine_learning/dockerfile b/machine_learning/dockerfile index b5c0da52..d14bd27b 100644 --- a/machine_learning/dockerfile +++ b/machine_learning/dockerfile @@ -10,8 +10,9 @@ WORKDIR /machine-learning # 必要なパッケージのインストール COPY ./requirements.lock /machine-learning/ -RUN sed '/-e/d' requirements.lock > requirements.txt && \ - pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu + +RUN sed '/-e/d' requirements.lock > requirements.txt +RUN pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu # 必要なライブラリをインストール RUN apt-get update && apt-get install -y \ From 047de3691b39b753759bb828c6f50d331de13fb5 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 13:11:37 +0900 Subject: [PATCH 435/771] ci: fix docker --- backend/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 028d016e..3a4fb060 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -35,7 +35,8 @@ RUN echo "DSN=$DSN" > .env \ # secretsディレクトリのgcp-credentials.jsonを作成 RUN mkdir secrets -RUN echo "$INSIDE_OF_CREDENTIALS" > secrets/gcp-credentials.json +RUN touch secrets/gcp-credentials.json +RUN echo "$INSIDE_OF_CREDENTIALS" >> secrets/gcp-credentials.json RUN go mod download From 1c0c8ab4322555a3b07107195156f253abc02a32 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 13:23:41 +0900 Subject: [PATCH 436/771] fix: update workflows --- .github/workflows/deploy-to-gcloud.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 0bc7c227..2ebc826c 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -26,9 +26,8 @@ jobs: uses: "google-github-actions/setup-gcloud@v2" with: version: ">= 363.0.0" - - - name: "Use gcloud CLI" - run: "gcloud info" + - name: Configure Docker to use the gcloud command-line tool as a credential helper + run: gcloud auth configure-docker - name: Build Docker Image run: | From 12ba47914502ea9992ade108e2071d61b9704313 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 13:27:18 +0900 Subject: [PATCH 437/771] fix: add region --- .github/workflows/deploy-to-gcloud.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 2ebc826c..4c883863 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -26,8 +26,8 @@ jobs: uses: "google-github-actions/setup-gcloud@v2" with: version: ">= 363.0.0" - - name: Configure Docker to use the gcloud command-line tool as a credential helper - run: gcloud auth configure-docker + - name: Configure Docker to use the gcloud command-line tool as a credential helper for us-west1 + run: gcloud auth configure-docker us-west1-docker.pkg.dev --quiet - name: Build Docker Image run: | From 0c98a6d88cdd348f143cf10f27a01fe5091a1065 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 13:44:58 +0900 Subject: [PATCH 438/771] fix: fix region us-west1 to us --- .github/workflows/deploy-to-gcloud.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 4c883863..711b654b 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -14,20 +14,21 @@ jobs: runs-on: ubuntu-latest steps: - - uses: "actions/checkout@v4" + - uses: actions/checkout@v4 - - uses: "google-github-actions/auth@v2" + - uses: google-github-actions/auth@v2 with: project_id: ${{ secrets.GCP_PROJECT_ID }} workload_identity_provider: "projects/484440918227/locations/global/workloadIdentityPools/github-action-pool/providers/github-action-provider" service_account: "grpc-server-sa@wherechildbus.iam.gserviceaccount.com" - - name: "Set up Cloud SDK" - uses: "google-github-actions/setup-gcloud@v2" + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v2 with: version: ">= 363.0.0" - - name: Configure Docker to use the gcloud command-line tool as a credential helper for us-west1 - run: gcloud auth configure-docker us-west1-docker.pkg.dev --quiet + + - name: Configure Docker to use the gcloud command-line tool as a credential helper for the us region + run: gcloud auth configure-docker us-docker.pkg.dev --quiet - name: Build Docker Image run: | From 676a311cd7923a28c3c4451241ab5a14b3832dc4 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 13:55:52 +0900 Subject: [PATCH 439/771] =?UTF-8?q?feat:=20=E5=AD=90=E4=BE=9B=E3=81=8B?= =?UTF-8?q?=E3=82=89=E8=A6=AA=E3=82=92=E5=8F=96=E5=BE=97=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9=E3=82=92=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/v1/guardian.pb.dart | 102 ++++++++++++++ .../where_child_bus/v1/guardian.pbjson.dart | 26 ++++ .../v1/machine_learning_pb2_grpc.py | 131 ++++++------------ .../where_child_bus/v1/guardian_pb2.py | 10 +- .../where_child_bus/v1/guardian_pb2.pyi | 12 ++ proto/where_child_bus/v1/guardian.proto | 8 ++ 6 files changed, 198 insertions(+), 91 deletions(-) diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 3522cdd2..22e29f12 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -413,6 +413,108 @@ class GetGuardianListByBusIdResponse extends $pb.GeneratedMessage { $core.List<$8.GuardianResponse> get guardians => $_getList(0); } +class GetGuardianByChildIdRequest extends $pb.GeneratedMessage { + factory GetGuardianByChildIdRequest({ + $core.String? childId, + }) { + final $result = create(); + if (childId != null) { + $result.childId = childId; + } + return $result; + } + GetGuardianByChildIdRequest._() : super(); + factory GetGuardianByChildIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianByChildIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianByChildIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'childId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdRequest clone() => GetGuardianByChildIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdRequest copyWith(void Function(GetGuardianByChildIdRequest) updates) => super.copyWith((message) => updates(message as GetGuardianByChildIdRequest)) as GetGuardianByChildIdRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetGuardianByChildIdRequest create() => GetGuardianByChildIdRequest._(); + GetGuardianByChildIdRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetGuardianByChildIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianByChildIdRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get childId => $_getSZ(0); + @$pb.TagNumber(1) + set childId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasChildId() => $_has(0); + @$pb.TagNumber(1) + void clearChildId() => clearField(1); +} + +class GetGuardianByChildIdResponse extends $pb.GeneratedMessage { + factory GetGuardianByChildIdResponse({ + $8.GuardianResponse? guardian, + }) { + final $result = create(); + if (guardian != null) { + $result.guardian = guardian; + } + return $result; + } + GetGuardianByChildIdResponse._() : super(); + factory GetGuardianByChildIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianByChildIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianByChildIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdResponse clone() => GetGuardianByChildIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdResponse copyWith(void Function(GetGuardianByChildIdResponse) updates) => super.copyWith((message) => updates(message as GetGuardianByChildIdResponse)) as GetGuardianByChildIdResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetGuardianByChildIdResponse create() => GetGuardianByChildIdResponse._(); + GetGuardianByChildIdResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetGuardianByChildIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianByChildIdResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.GuardianResponse get guardian => $_getN(0); + @$pb.TagNumber(1) + set guardian($8.GuardianResponse v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasGuardian() => $_has(0); + @$pb.TagNumber(1) + void clearGuardian() => clearField(1); + @$pb.TagNumber(1) + $8.GuardianResponse ensureGuardian() => $_ensure(0); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart index bdebc760..b3788c9c 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -100,3 +100,29 @@ final $typed_data.Uint8List getGuardianListByBusIdResponseDescriptor = $convert. 'Ch5HZXRHdWFyZGlhbkxpc3RCeUJ1c0lkUmVzcG9uc2USQgoJZ3VhcmRpYW5zGAEgAygLMiQud2' 'hlcmVfY2hpbGRfYnVzLnYxLkd1YXJkaWFuUmVzcG9uc2VSCWd1YXJkaWFucw=='); +@$core.Deprecated('Use getGuardianByChildIdRequestDescriptor instead') +const GetGuardianByChildIdRequest$json = { + '1': 'GetGuardianByChildIdRequest', + '2': [ + {'1': 'child_id', '3': 1, '4': 1, '5': 9, '10': 'childId'}, + ], +}; + +/// Descriptor for `GetGuardianByChildIdRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getGuardianByChildIdRequestDescriptor = $convert.base64Decode( + 'ChtHZXRHdWFyZGlhbkJ5Q2hpbGRJZFJlcXVlc3QSGQoIY2hpbGRfaWQYASABKAlSB2NoaWxkSW' + 'Q='); + +@$core.Deprecated('Use getGuardianByChildIdResponseDescriptor instead') +const GetGuardianByChildIdResponse$json = { + '1': 'GetGuardianByChildIdResponse', + '2': [ + {'1': 'guardian', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.GuardianResponse', '10': 'guardian'}, + ], +}; + +/// Descriptor for `GetGuardianByChildIdResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getGuardianByChildIdResponseDescriptor = $convert.base64Decode( + 'ChxHZXRHdWFyZGlhbkJ5Q2hpbGRJZFJlc3BvbnNlEkAKCGd1YXJkaWFuGAEgASgLMiQud2hlcm' + 'VfY2hpbGRfYnVzLnYxLkd1YXJkaWFuUmVzcG9uc2VSCGd1YXJkaWFu'); + diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py index e40e6319..7d9fccc4 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py @@ -16,20 +16,20 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Train = channel.unary_unary( - "/machine_learning.v1.MachineLearningService/Train", - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - ) + '/machine_learning.v1.MachineLearningService/Train', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, + ) self.Pred = channel.stream_stream( '/machine_learning.v1.MachineLearningService/Pred', request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, ) self.FaceDetectAndClip = channel.unary_unary( - "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - ) + '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, + ) class MachineLearningServiceServicer(object): @@ -38,20 +38,20 @@ class MachineLearningServiceServicer(object): def Train(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def Pred(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def FaceDetectAndClip(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_MachineLearningServiceServicer_to_server(servicer, server): @@ -73,59 +73,33 @@ def add_MachineLearningServiceServicer_to_server(servicer, server): ), } generic_handler = grpc.method_handlers_generic_handler( - "machine_learning.v1.MachineLearningService", rpc_method_handlers - ) + 'machine_learning.v1.MachineLearningService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class MachineLearningService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Train( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def Train(request, target, - "/machine_learning.v1.MachineLearningService/Train", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/Train', machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def Pred( - request_iterator, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.stream_stream( - request_iterator, + def Pred(request_iterator, target, options=(), channel_credentials=None, @@ -138,41 +112,22 @@ def Pred( return grpc.experimental.stream_stream(request_iterator, target, '/machine_learning.v1.MachineLearningService/Pred', where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def FaceDetectAndClip( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def FaceDetectAndClip(request, target, - "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py index 7b14c0d5..dbfc0f01 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians2\xe1\x02\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian2\xe1\x02\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -35,6 +35,10 @@ _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_end=660 _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_start=662 _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_end=762 - _globals['_GUARDIANSERVICE']._serialized_start=765 - _globals['_GUARDIANSERVICE']._serialized_end=1118 + _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_start=764 + _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_end=820 + _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_start=822 + _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_end=918 + _globals['_GUARDIANSERVICE']._serialized_start=921 + _globals['_GUARDIANSERVICE']._serialized_end=1274 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi index 1722fc6a..9cde550c 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi @@ -55,3 +55,15 @@ class GetGuardianListByBusIdResponse(_message.Message): GUARDIANS_FIELD_NUMBER: _ClassVar[int] guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] def __init__(self, guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... + +class GetGuardianByChildIdRequest(_message.Message): + __slots__ = ("child_id",) + CHILD_ID_FIELD_NUMBER: _ClassVar[int] + child_id: str + def __init__(self, child_id: _Optional[str] = ...) -> None: ... + +class GetGuardianByChildIdResponse(_message.Message): + __slots__ = ("guardian",) + GUARDIAN_FIELD_NUMBER: _ClassVar[int] + guardian: _resources_pb2.GuardianResponse + def __init__(self, guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ...) -> None: ... diff --git a/proto/where_child_bus/v1/guardian.proto b/proto/where_child_bus/v1/guardian.proto index c24a747e..0bf3133e 100644 --- a/proto/where_child_bus/v1/guardian.proto +++ b/proto/where_child_bus/v1/guardian.proto @@ -40,3 +40,11 @@ message GetGuardianListByBusIdRequest { message GetGuardianListByBusIdResponse { repeated GuardianResponse guardians = 1; } + +message GetGuardianByChildIdRequest { + string child_id = 1; +} + +message GetGuardianByChildIdResponse { + GuardianResponse guardian = 1; +} From de8dbb3d5f3cb277f6d6be61bd5bc1a9352d34b5 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 13:56:11 +0900 Subject: [PATCH 440/771] =?UTF-8?q?feat:=20=E5=AD=90=E4=BE=9B=E3=81=8B?= =?UTF-8?q?=E3=82=89=E8=A6=AA=E3=82=92=E5=8F=96=E3=82=8BAPI=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/guardian.go | 5 + .../go/where_child_bus/v1/guardian.pb.go | 245 ++++++++++++++---- backend/usecases/guardian/guardian.go | 36 +++ 3 files changed, 229 insertions(+), 57 deletions(-) diff --git a/backend/interfaces/guardian.go b/backend/interfaces/guardian.go index c33332d8..e87d2a80 100644 --- a/backend/interfaces/guardian.go +++ b/backend/interfaces/guardian.go @@ -29,3 +29,8 @@ func (s *guardianServiceServer) GuardianLogin(ctx context.Context, req *pb.Guard func (s *guardianServiceServer) GetGuardianListByBusId(ctx context.Context, req *pb.GetGuardianListByBusIdRequest) (*pb.GetGuardianListByBusIdResponse, error) { return s.interactor.GetGuardianListByBusID(ctx, req) } + +// GetGuardianByChildId implements where_child_busv1.GuardianServiceServer. +func (s *guardianServiceServer) GetGuardianByChildId(ctx context.Context, req *pb.GetGuardianByChildIdRequest) (*pb.GetGuardianByChildIdResponse, error) { + return s.interactor.GetGuardianByChildID(ctx, req) +} \ No newline at end of file diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go index e3e2b063..5853a91e 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go @@ -358,6 +358,100 @@ func (x *GetGuardianListByBusIdResponse) GetGuardians() []*GuardianResponse { return nil } +type GetGuardianByChildIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChildId string `protobuf:"bytes,1,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` +} + +func (x *GetGuardianByChildIdRequest) Reset() { + *x = GetGuardianByChildIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGuardianByChildIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGuardianByChildIdRequest) ProtoMessage() {} + +func (x *GetGuardianByChildIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGuardianByChildIdRequest.ProtoReflect.Descriptor instead. +func (*GetGuardianByChildIdRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{6} +} + +func (x *GetGuardianByChildIdRequest) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +type GetGuardianByChildIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Guardian *GuardianResponse `protobuf:"bytes,1,opt,name=guardian,proto3" json:"guardian,omitempty"` +} + +func (x *GetGuardianByChildIdResponse) Reset() { + *x = GetGuardianByChildIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGuardianByChildIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGuardianByChildIdResponse) ProtoMessage() {} + +func (x *GetGuardianByChildIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGuardianByChildIdResponse.ProtoReflect.Descriptor instead. +func (*GetGuardianByChildIdResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{7} +} + +func (x *GetGuardianByChildIdResponse) GetGuardian() *GuardianResponse { + if x != nil { + return x.Guardian + } + return nil +} + var File_where_child_bus_v1_guardian_proto protoreflect.FileDescriptor var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ @@ -408,45 +502,55 @@ var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x32, 0xe1, 0x02, 0x0a, 0x0f, 0x47, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, - 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, - 0x16, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x22, 0x38, 0x0a, 0x1b, 0x47, 0x65, + 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x32, 0xe1, 0x02, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x29, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, - 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, - 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, - 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x49, 0x64, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, + 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, + 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -461,7 +565,7 @@ func file_where_child_bus_v1_guardian_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_guardian_proto_rawDescData } -var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_where_child_bus_v1_guardian_proto_goTypes = []interface{}{ (*CreateGuardianRequest)(nil), // 0: where_child_bus.v1.CreateGuardianRequest (*CreateGuardianResponse)(nil), // 1: where_child_bus.v1.CreateGuardianResponse @@ -469,25 +573,28 @@ var file_where_child_bus_v1_guardian_proto_goTypes = []interface{}{ (*GuardianLoginResponse)(nil), // 3: where_child_bus.v1.GuardianLoginResponse (*GetGuardianListByBusIdRequest)(nil), // 4: where_child_bus.v1.GetGuardianListByBusIdRequest (*GetGuardianListByBusIdResponse)(nil), // 5: where_child_bus.v1.GetGuardianListByBusIdResponse - (*GuardianResponse)(nil), // 6: where_child_bus.v1.GuardianResponse - (*NurseryResponse)(nil), // 7: where_child_bus.v1.NurseryResponse + (*GetGuardianByChildIdRequest)(nil), // 6: where_child_bus.v1.GetGuardianByChildIdRequest + (*GetGuardianByChildIdResponse)(nil), // 7: where_child_bus.v1.GetGuardianByChildIdResponse + (*GuardianResponse)(nil), // 8: where_child_bus.v1.GuardianResponse + (*NurseryResponse)(nil), // 9: where_child_bus.v1.NurseryResponse } var file_where_child_bus_v1_guardian_proto_depIdxs = []int32{ - 6, // 0: where_child_bus.v1.CreateGuardianResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 6, // 1: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 7, // 2: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 6, // 3: where_child_bus.v1.GetGuardianListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse - 0, // 4: where_child_bus.v1.GuardianService.CreateGuardian:input_type -> where_child_bus.v1.CreateGuardianRequest - 2, // 5: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest - 4, // 6: where_child_bus.v1.GuardianService.GetGuardianListByBusId:input_type -> where_child_bus.v1.GetGuardianListByBusIdRequest - 1, // 7: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse - 3, // 8: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse - 5, // 9: where_child_bus.v1.GuardianService.GetGuardianListByBusId:output_type -> where_child_bus.v1.GetGuardianListByBusIdResponse - 7, // [7:10] is the sub-list for method output_type - 4, // [4:7] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 8, // 0: where_child_bus.v1.CreateGuardianResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 8, // 1: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 9, // 2: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 8, // 3: where_child_bus.v1.GetGuardianListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 8, // 4: where_child_bus.v1.GetGuardianByChildIdResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 0, // 5: where_child_bus.v1.GuardianService.CreateGuardian:input_type -> where_child_bus.v1.CreateGuardianRequest + 2, // 6: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest + 4, // 7: where_child_bus.v1.GuardianService.GetGuardianListByBusId:input_type -> where_child_bus.v1.GetGuardianListByBusIdRequest + 1, // 8: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse + 3, // 9: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse + 5, // 10: where_child_bus.v1.GuardianService.GetGuardianListByBusId:output_type -> where_child_bus.v1.GetGuardianListByBusIdResponse + 8, // [8:11] is the sub-list for method output_type + 5, // [5:8] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_where_child_bus_v1_guardian_proto_init() } @@ -569,6 +676,30 @@ func file_where_child_bus_v1_guardian_proto_init() { return nil } } + file_where_child_bus_v1_guardian_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGuardianByChildIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_guardian_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGuardianByChildIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -576,7 +707,7 @@ func file_where_child_bus_v1_guardian_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_guardian_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 029dc978..a94eaf27 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -7,6 +7,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" @@ -173,3 +174,38 @@ func (i *Interactor) GetGuardianListByBusID(ctx context.Context, req *pb.GetGuar return &pb.GetGuardianListByBusIdResponse{Guardians: pbGuardians}, nil } + +func (i *Interactor) GetGuardianByChildID(ctx context.Context, req *pb.GetGuardianByChildIdRequest) (*pb.GetGuardianByChildIdResponse, error) { + childID, err := uuid.Parse(req.ChildId) + if err != nil { + i.logger.Error("failed to parse child ID", "error", err) + return nil, err + } + // トランザクションを開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + i.logger.Error("failed to start transaction", "error", err) + return nil, err + } + defer tx.Rollback() + + // Guardianを取得 + guardians, err := tx.Guardian.Query(). + Where(guardianRepo.HasChildrenWith(childRepo.ID(childID))). + WithNursery(). + Only(ctx) + + if err != nil { + i.logger.Error("failed to get guardians by child ID", "error", err) + return nil, err + } + + // トランザクションをコミット + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + + pbGuardian := utils.ToPbGuardianResponse(guardians) + return &pb.GetGuardianByChildIdResponse{Guardian: pbGuardian}, nil +} From c6e561c0ce8f0ac6b08dafe9ba62c872201e82c7 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 14:02:47 +0900 Subject: [PATCH 441/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E3=83=88=E3=83=A9=E3=83=B3=E3=82=B6=E3=82=AF=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=81=AE=E3=83=AD=E3=83=BC=E3=83=AB=E3=83=90=E3=83=83?= =?UTF-8?q?=E3=82=AF=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 8c24d19e..13ea272f 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -49,11 +49,12 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer func() { - tx.Rollback() + err := tx.Rollback() + if err != nil { + i.logger.Error("failed to rollback transaction", "error", err) + } }() - bus, err := tx.Bus.Create(). SetNurseryID(nurseryID). SetName(req.Name). @@ -447,7 +448,12 @@ func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*e i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer tx.Rollback() + defer func() { + err := tx.Rollback() + if err != nil { + i.logger.Error("failed to rollback transaction", "error", err) + } + }() query, err := queryFunc(tx) if err != nil { From 955b46783ffd3b2083a7ad104ced9de50d87673d Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 14:08:01 +0900 Subject: [PATCH 442/771] =?UTF-8?q?fix:=20rollback=20=E3=81=AE=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=83=8F=E3=83=B3=E3=83=89=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=B0=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 14 ++---------- backend/usecases/child/child.go | 6 ++---- backend/usecases/guardian/guardian.go | 10 ++++----- backend/usecases/station/station.go | 2 +- backend/usecases/utils/utils.go | 31 +++++++++++++++++---------- 5 files changed, 29 insertions(+), 34 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 13ea272f..a66002d7 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -49,12 +49,7 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer func() { - err := tx.Rollback() - if err != nil { - i.logger.Error("failed to rollback transaction", "error", err) - } - }() + defer utils.RollbackTx(tx, i.logger) bus, err := tx.Bus.Create(). SetNurseryID(nurseryID). SetName(req.Name). @@ -448,12 +443,7 @@ func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*e i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer func() { - err := tx.Rollback() - if err != nil { - i.logger.Error("failed to rollback transaction", "error", err) - } - }() + defer utils.RollbackTx(tx, i.logger) query, err := queryFunc(tx) if err != nil { diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index ab423959..a3e7335b 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -54,9 +54,7 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest return nil, err } // 成功した場合にロールバックを防ぐためのフラグ - defer func() { - tx.Rollback() - }() + defer utils.RollbackTx(tx, i.logger) sex, err := utils.ConvertPbSexToEntSex(req.Sex) if err != nil { @@ -284,7 +282,7 @@ func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) ( i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer tx.Rollback() // Rollback is safe to call even if the tx is already committed. + defer utils.RollbackTx(tx, i.logger) query, err := queryFunc(tx) if err != nil { diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index a94eaf27..46a2373b 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -39,8 +39,7 @@ func (i *Interactor) CreateGuardian(ctx context.Context, req *pb.CreateGuardianR i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer tx.Rollback() - + defer utils.RollbackTx(tx, i.logger) // req.nurseryCodeからnurseryを取得 nursery, err := tx.Nursery.Query(). Where(nurseryRepo.NurseryCode(req.NurseryCode)). @@ -103,8 +102,7 @@ func (i *Interactor) GuardianLogin(ctx context.Context, req *pb.GuardianLoginReq i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer tx.Rollback() - + defer utils.RollbackTx(tx, i.logger) // Guardianを取得 guardian, err := tx.Guardian.Query(). Where(guardianRepo.Email(req.Email)). @@ -148,7 +146,7 @@ func (i *Interactor) GetGuardianListByBusID(ctx context.Context, req *pb.GetGuar i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer tx.Rollback() + defer utils.RollbackTx(tx, i.logger) // Guardianを取得 guardians, err := tx.Guardian.Query(). @@ -187,7 +185,7 @@ func (i *Interactor) GetGuardianByChildID(ctx context.Context, req *pb.GetGuardi i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer tx.Rollback() + defer utils.RollbackTx(tx, i.logger) // Guardianを取得 guardians, err := tx.Guardian.Query(). diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 5d7ee600..6ac897ad 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -28,7 +28,7 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer tx.Rollback() + defer utils.RollbackTx(tx, i.logger) guardianID, err := uuid.Parse(req.GuardianId) if err != nil { diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 756267c7..6a14fccc 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -3,6 +3,8 @@ package utils import ( "fmt" + "golang.org/x/exp/slog" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/config" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "golang.org/x/crypto/bcrypt" @@ -46,17 +48,17 @@ func convertSexToPbSex(sex child.Sex) pb.Sex { } func ConvertPbStatusToEntStatus(pbStatus pb.Status) (*bus.Status, error) { - switch pbStatus { - case pb.Status_STATUS_RUNNING: - status := bus.StatusRunning - return &status, nil - case pb.Status_STATUS_STOPPED: - status := bus.StatusStopped - return &status, nil - default: - // 不正な値の場合はエラーを返す - return nil, fmt.Errorf("invalid Status value: %v", pbStatus) - } + switch pbStatus { + case pb.Status_STATUS_RUNNING: + status := bus.StatusRunning + return &status, nil + case pb.Status_STATUS_STOPPED: + status := bus.StatusStopped + return &status, nil + default: + // 不正な値の場合はエラーを返す + return nil, fmt.Errorf("invalid Status value: %v", pbStatus) + } } func ToPbBus(t *ent.Bus) *pb.Bus { @@ -176,3 +178,10 @@ func CheckPassword(hashedPassword string, plainPassword string) bool { err := bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte(passwordWithPepper)) return err == nil } + +// RollbackTx はトランザクションのロールバックを試み、エラーがあればロギングします。 +func RollbackTx(tx *ent.Tx, logger *slog.Logger) { + if err := tx.Rollback(); err != nil { + logger.Error("failed to rollback transaction", "error", err) + } +} From b8e66aae486c97d37270d8ea2789c9e123878da9 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 14:09:03 +0900 Subject: [PATCH 443/771] =?UTF-8?q?fix:=20nursery=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E5=BF=98=E3=82=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/nursery/nursery.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index 9bb9644f..9db015eb 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -37,7 +37,7 @@ func (i *Interactor) CreateNursery(ctx context.Context, req *pb.CreateNurseryReq i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer tx.Rollback() + defer utils.RollbackTx(tx, i.logger) // nurseryコード(レコードに存在しない) // 生成したコードが既存のコードと重複していないか確認 @@ -83,7 +83,7 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque i.logger.Error("failed to start transaction", "error", err) return nil, err } - defer tx.Rollback() + defer utils.RollbackTx(tx, i.logger) // Nurseryを取得 nursery, err := tx.Nursery.Query(). From 819bc857d6d6b87a52476374590434e7b5fc4ba9 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 18 Feb 2024 15:35:41 +0900 Subject: [PATCH 444/771] =?UTF-8?q?chore:=E3=83=A2=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_detail_sheet.dart | 8 ++--- .../student_list_page/student_list_page.dart | 30 +++++++------------ 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart index 3ad2dc9e..4bd33d5e 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart @@ -83,12 +83,12 @@ class _StudentDetailSheetState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - childDetailItem("年齢", "3歳"), - childDetailItem("クラス", "1組"), + childDetailItem("年齢", "${widget.child.age}歳"), + // childDetailItem("クラス", "1組"), childDetailItem("保護者氏名", "保護者1"), childDetailItem("保護者連絡先", "xxx-xxxx-xxxx"), - childDetailItem("利用コース", "○○コース"), - childDetailItem("乗降場所", "○○駐車場前"), + childDetailItem("利用バス", "○○コース"), + // childDetailItem("乗降場所", "○○駐車場前"), ], ); } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 2409004f..41449fed 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -21,20 +21,6 @@ class _ChildListPageState extends State { bool _isFailLoading = false; //TODO: 将来的には動的にデータを受け取る。 - final List name = [ - "園児1", - "園児2", - "園児3", - "園児4", - "園児5", - ]; - final List group = [ - "1組", - "2組", - "3組", - "4組", - "5組", - ]; final List image = [ "1", "2", @@ -91,10 +77,16 @@ class _ChildListPageState extends State { } Widget pageBody() { - return _isLoading - ? const Center( - child: CircularProgressIndicator(), - ) - : ChildList(children: children, images: image); + if (_isLoading) { + return const Center( + child: CircularProgressIndicator(), + ); + } else if (_isFailLoading) { + return const Center( + child: Text('Failed to load children.'), + ); + } else { + return ChildList(children: children, images: image); + } } } From 6f572346329b9c02787cc4592926d84676cb3cd8 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 16:24:05 +0900 Subject: [PATCH 445/771] =?UTF-8?q?fix:=20proto=E3=81=AErpc=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9=E3=81=97=E5=BF=98=E3=82=8C=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/where_child_bus/v1/guardian.pb.go | 55 +++++++++++-------- .../go/where_child_bus/v1/guardian_grpc.pb.go | 37 +++++++++++++ .../where_child_bus/v1/guardian.pbgrpc.dart | 20 +++++++ .../v1/health_check_pb2_grpc.py | 3 +- .../where_child_bus/v1/guardian_pb2.py | 4 +- .../where_child_bus/v1/guardian_pb2_grpc.py | 33 +++++++++++ proto/where_child_bus/v1/guardian.proto | 1 + 7 files changed, 126 insertions(+), 27 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go index 5853a91e..89e51894 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go @@ -512,7 +512,7 @@ var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x32, 0xe1, 0x02, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x32, 0xdc, 0x03, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, @@ -534,23 +534,30 @@ var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, - 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, - 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, + 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, + 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, + 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, + 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -587,11 +594,13 @@ var file_where_child_bus_v1_guardian_proto_depIdxs = []int32{ 0, // 5: where_child_bus.v1.GuardianService.CreateGuardian:input_type -> where_child_bus.v1.CreateGuardianRequest 2, // 6: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest 4, // 7: where_child_bus.v1.GuardianService.GetGuardianListByBusId:input_type -> where_child_bus.v1.GetGuardianListByBusIdRequest - 1, // 8: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse - 3, // 9: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse - 5, // 10: where_child_bus.v1.GuardianService.GetGuardianListByBusId:output_type -> where_child_bus.v1.GetGuardianListByBusIdResponse - 8, // [8:11] is the sub-list for method output_type - 5, // [5:8] is the sub-list for method input_type + 6, // 8: where_child_bus.v1.GuardianService.GetGuardianByChildId:input_type -> where_child_bus.v1.GetGuardianByChildIdRequest + 1, // 9: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse + 3, // 10: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse + 5, // 11: where_child_bus.v1.GuardianService.GetGuardianListByBusId:output_type -> where_child_bus.v1.GetGuardianListByBusIdResponse + 7, // 12: where_child_bus.v1.GuardianService.GetGuardianByChildId:output_type -> where_child_bus.v1.GetGuardianByChildIdResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go index 4e6ae6c3..1cc6616a 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go @@ -22,6 +22,7 @@ const ( GuardianService_CreateGuardian_FullMethodName = "/where_child_bus.v1.GuardianService/CreateGuardian" GuardianService_GuardianLogin_FullMethodName = "/where_child_bus.v1.GuardianService/GuardianLogin" GuardianService_GetGuardianListByBusId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianListByBusId" + GuardianService_GetGuardianByChildId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianByChildId" ) // GuardianServiceClient is the client API for GuardianService service. @@ -31,6 +32,7 @@ type GuardianServiceClient interface { CreateGuardian(ctx context.Context, in *CreateGuardianRequest, opts ...grpc.CallOption) (*CreateGuardianResponse, error) GuardianLogin(ctx context.Context, in *GuardianLoginRequest, opts ...grpc.CallOption) (*GuardianLoginResponse, error) GetGuardianListByBusId(ctx context.Context, in *GetGuardianListByBusIdRequest, opts ...grpc.CallOption) (*GetGuardianListByBusIdResponse, error) + GetGuardianByChildId(ctx context.Context, in *GetGuardianByChildIdRequest, opts ...grpc.CallOption) (*GetGuardianByChildIdResponse, error) } type guardianServiceClient struct { @@ -68,6 +70,15 @@ func (c *guardianServiceClient) GetGuardianListByBusId(ctx context.Context, in * return out, nil } +func (c *guardianServiceClient) GetGuardianByChildId(ctx context.Context, in *GetGuardianByChildIdRequest, opts ...grpc.CallOption) (*GetGuardianByChildIdResponse, error) { + out := new(GetGuardianByChildIdResponse) + err := c.cc.Invoke(ctx, GuardianService_GetGuardianByChildId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // GuardianServiceServer is the server API for GuardianService service. // All implementations should embed UnimplementedGuardianServiceServer // for forward compatibility @@ -75,6 +86,7 @@ type GuardianServiceServer interface { CreateGuardian(context.Context, *CreateGuardianRequest) (*CreateGuardianResponse, error) GuardianLogin(context.Context, *GuardianLoginRequest) (*GuardianLoginResponse, error) GetGuardianListByBusId(context.Context, *GetGuardianListByBusIdRequest) (*GetGuardianListByBusIdResponse, error) + GetGuardianByChildId(context.Context, *GetGuardianByChildIdRequest) (*GetGuardianByChildIdResponse, error) } // UnimplementedGuardianServiceServer should be embedded to have forward compatible implementations. @@ -90,6 +102,9 @@ func (UnimplementedGuardianServiceServer) GuardianLogin(context.Context, *Guardi func (UnimplementedGuardianServiceServer) GetGuardianListByBusId(context.Context, *GetGuardianListByBusIdRequest) (*GetGuardianListByBusIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGuardianListByBusId not implemented") } +func (UnimplementedGuardianServiceServer) GetGuardianByChildId(context.Context, *GetGuardianByChildIdRequest) (*GetGuardianByChildIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGuardianByChildId not implemented") +} // UnsafeGuardianServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GuardianServiceServer will @@ -156,6 +171,24 @@ func _GuardianService_GetGuardianListByBusId_Handler(srv interface{}, ctx contex return interceptor(ctx, in, info, handler) } +func _GuardianService_GetGuardianByChildId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGuardianByChildIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuardianServiceServer).GetGuardianByChildId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GuardianService_GetGuardianByChildId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuardianServiceServer).GetGuardianByChildId(ctx, req.(*GetGuardianByChildIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + // GuardianService_ServiceDesc is the grpc.ServiceDesc for GuardianService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -175,6 +208,10 @@ var GuardianService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetGuardianListByBusId", Handler: _GuardianService_GetGuardianListByBusId_Handler, }, + { + MethodName: "GetGuardianByChildId", + Handler: _GuardianService_GetGuardianByChildId_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/guardian.proto", diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart index 440a4f23..3f5464ea 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart @@ -33,6 +33,10 @@ class GuardianServiceClient extends $grpc.Client { '/where_child_bus.v1.GuardianService/GetGuardianListByBusId', ($3.GetGuardianListByBusIdRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $3.GetGuardianListByBusIdResponse.fromBuffer(value)); + static final _$getGuardianByChildId = $grpc.ClientMethod<$3.GetGuardianByChildIdRequest, $3.GetGuardianByChildIdResponse>( + '/where_child_bus.v1.GuardianService/GetGuardianByChildId', + ($3.GetGuardianByChildIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.GetGuardianByChildIdResponse.fromBuffer(value)); GuardianServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -51,6 +55,10 @@ class GuardianServiceClient extends $grpc.Client { $grpc.ResponseFuture<$3.GetGuardianListByBusIdResponse> getGuardianListByBusId($3.GetGuardianListByBusIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getGuardianListByBusId, request, options: options); } + + $grpc.ResponseFuture<$3.GetGuardianByChildIdResponse> getGuardianByChildId($3.GetGuardianByChildIdRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getGuardianByChildId, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.GuardianService') @@ -79,6 +87,13 @@ abstract class GuardianServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $3.GetGuardianListByBusIdRequest.fromBuffer(value), ($3.GetGuardianListByBusIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$3.GetGuardianByChildIdRequest, $3.GetGuardianByChildIdResponse>( + 'GetGuardianByChildId', + getGuardianByChildId_Pre, + false, + false, + ($core.List<$core.int> value) => $3.GetGuardianByChildIdRequest.fromBuffer(value), + ($3.GetGuardianByChildIdResponse value) => value.writeToBuffer())); } $async.Future<$3.CreateGuardianResponse> createGuardian_Pre($grpc.ServiceCall call, $async.Future<$3.CreateGuardianRequest> request) async { @@ -93,7 +108,12 @@ abstract class GuardianServiceBase extends $grpc.Service { return getGuardianListByBusId(call, await request); } + $async.Future<$3.GetGuardianByChildIdResponse> getGuardianByChildId_Pre($grpc.ServiceCall call, $async.Future<$3.GetGuardianByChildIdRequest> request) async { + return getGuardianByChildId(call, await request); + } + $async.Future<$3.CreateGuardianResponse> createGuardian($grpc.ServiceCall call, $3.CreateGuardianRequest request); $async.Future<$3.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $3.GuardianLoginRequest request); $async.Future<$3.GetGuardianListByBusIdResponse> getGuardianListByBusId($grpc.ServiceCall call, $3.GetGuardianListByBusIdRequest request); + $async.Future<$3.GetGuardianByChildIdResponse> getGuardianByChildId($grpc.ServiceCall call, $3.GetGuardianByChildIdRequest request); } diff --git a/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2_grpc.py b/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2_grpc.py index 6b58704d..a9cd43e0 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2_grpc.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2_grpc.py @@ -1,9 +1,8 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import grpc.experimental -import health_check_pb2 as machine__learning_dot_v1_dot_health__check__pb2 +from machine_learning.v1 import health_check_pb2 as machine__learning_dot_v1_dot_health__check__pb2 class HealthcheckServiceStub(object): diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py index dbfc0f01..27edb57d 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian2\xe1\x02\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian2\xdc\x03\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponse\x12y\n\x14GetGuardianByChildId\x12/.where_child_bus.v1.GetGuardianByChildIdRequest\x1a\x30.where_child_bus.v1.GetGuardianByChildIdResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -40,5 +40,5 @@ _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_start=822 _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_end=918 _globals['_GUARDIANSERVICE']._serialized_start=921 - _globals['_GUARDIANSERVICE']._serialized_end=1274 + _globals['_GUARDIANSERVICE']._serialized_end=1397 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py index 3bcb7e19..b39d0402 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py @@ -29,6 +29,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.FromString, ) + self.GetGuardianByChildId = channel.unary_unary( + '/where_child_bus.v1.GuardianService/GetGuardianByChildId', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.FromString, + ) class GuardianServiceServicer(object): @@ -52,6 +57,12 @@ def GetGuardianListByBusId(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetGuardianByChildId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_GuardianServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -70,6 +81,11 @@ def add_GuardianServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.SerializeToString, ), + 'GetGuardianByChildId': grpc.unary_unary_rpc_method_handler( + servicer.GetGuardianByChildId, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.GuardianService', rpc_method_handlers) @@ -130,3 +146,20 @@ def GetGuardianListByBusId(request, where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetGuardianByChildId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GetGuardianByChildId', + where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.SerializeToString, + where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/guardian.proto b/proto/where_child_bus/v1/guardian.proto index 0bf3133e..164fd6da 100644 --- a/proto/where_child_bus/v1/guardian.proto +++ b/proto/where_child_bus/v1/guardian.proto @@ -8,6 +8,7 @@ service GuardianService { rpc CreateGuardian(CreateGuardianRequest) returns (CreateGuardianResponse); rpc GuardianLogin(GuardianLoginRequest) returns (GuardianLoginResponse); rpc GetGuardianListByBusId(GetGuardianListByBusIdRequest) returns (GetGuardianListByBusIdResponse); + rpc GetGuardianByChildId(GetGuardianByChildIdRequest) returns (GetGuardianByChildIdResponse); } message CreateGuardianRequest { From 9f600fe7ce0cdabf484ba460f4de09b3a4e861ae Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 16:26:19 +0900 Subject: [PATCH 446/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=81=AB?= =?UTF-8?q?=E9=96=A2=E3=81=99=E3=82=8B=E6=93=8D=E4=BD=9C=E3=81=8C=E8=B5=B0?= =?UTF-8?q?=E3=82=8B=E3=81=A8=E3=81=8D=E3=81=AB=E3=80=81=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=86=E3=83=8A=E3=83=B3=E3=82=B9=E7=8A=B6=E6=85=8B=E5=8C=96?= =?UTF-8?q?=E3=81=A9=E3=81=86=E3=81=8B=E3=82=92=E7=A2=BA=E8=AA=8D=E3=81=99?= =?UTF-8?q?=E3=82=8B=E7=94=A8=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index a66002d7..a8775d27 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -61,6 +61,13 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* return nil, err } + // TODO: もう少し簡潔に + _, err = checkAndFixBusStationCoordinates(*i.logger, ctx, bus) + if err != nil { + i.logger.Error("failed to check and fix bus station coordinates", "error", err) + return nil, err + } + // Nurseryエッジを持つBusを取得 bus, err = tx.Bus.Query(). Where(busRepo.IDEQ(bus.ID)). @@ -223,6 +230,18 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu return nil, err } + // TODO: もう少し簡潔に + is_ready, err := checkAndFixBusStationCoordinates(*i.logger, ctx, bus) + if err != nil { + i.logger.Error("failed to check and fix bus station coordinates", "error", err) + return nil, err + } + + if !is_ready { + i.logger.Error("bus station coordinates are not ready") + return nil, errors.New("bus station coordinates are not ready") + } + // Nurseryエッジを持つBusを取得 bus, err = tx.Bus.Query(). Where(busRepo.IDEQ(bus.ID)). @@ -457,6 +476,21 @@ func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*e return nil, err } + // TODO: もう少し簡潔に書ける + for _, bus := range entBuses { + _, err = checkAndFixBusStationCoordinates(*i.logger, ctx, bus) + if err != nil { + i.logger.Error("failed to check and fix bus station coordinates", "error", err) + return nil, err + } + } + + entBuses, err = query.All(ctx) + if err != nil { + i.logger.Error("failed to execute query", "error", err) + return nil, err + } + pbBuses := make([]*pb.Bus, len(entBuses)) for i, b := range entBuses { pbBuses[i] = utils.ToPbBus(b) @@ -541,3 +575,37 @@ func setNextStation(logger slog.Logger, ctx context.Context, tx *ent.Tx, guardia } return nil } + +func checkAndFixBusStationCoordinates(logger slog.Logger, ctx context.Context, bus *ent.Bus) (is_ready bool, err error) { + // バスのステーションを取得 + stations, err := bus.QueryStations().All(ctx) + if err != nil { + logger.Error("failed to get stations", "error", err) + return false, err + } + + // ステーションの座標を修正 + for _, station := range stations { + // ステーションの座標が登録されていない場合は、バスのステータスをメンテナンスに設定 + if station.Latitude == 0 || station.Longitude == 0 { + _, err := bus.Update(). + SetStatus(busRepo.StatusMaintenance). + Save(ctx) + if err != nil { + logger.Error("failed to update bus status to maintenance due to missing station coordinates", "error", err) + return false, err + } + return false, nil + } + + } + // Stationは正しく設定されているので、バスのステータスを訂正 + if bus.Status == busRepo.StatusMaintenance { + _, err := bus.Update().SetStatus(busRepo.StatusStopped).Save(ctx) + if err != nil { + logger.Error("failed to update bus", "error", err) + return false, err + } + } + return true, nil +} From 5ca26efec327ccd8151c043d1c652bdc7f9d56f0 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 16:33:48 +0900 Subject: [PATCH 447/771] =?UTF-8?q?fix:=20Station=E3=81=AE=E3=81=84?= =?UTF-8?q?=E3=81=A1=E6=83=85=E5=A0=B1=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9=E5=90=8D=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/where_child_bus/v1/station.pb.go | 200 +++++++++--------- .../go/where_child_bus/v1/station_grpc.pb.go | 32 +-- .../where_child_bus/v1/station.pb.dart | 52 ++--- .../where_child_bus/v1/station.pbgrpc.dart | 28 +-- .../where_child_bus/v1/station.pbjson.dart | 30 +-- .../where_child_bus/v1/station_pb2.py | 22 +- .../where_child_bus/v1/station_pb2.pyi | 4 +- .../where_child_bus/v1/station_pb2_grpc.py | 27 ++- proto/where_child_bus/v1/station.proto | 6 +- 9 files changed, 203 insertions(+), 198 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index 80b0b9af..38e8963b 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -20,7 +20,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type UpdateStationRequest struct { +type UpdateStationLocationByGuardianIdRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -30,8 +30,8 @@ type UpdateStationRequest struct { Latitude float64 `protobuf:"fixed64,3,opt,name=latitude,proto3" json:"latitude,omitempty"` } -func (x *UpdateStationRequest) Reset() { - *x = UpdateStationRequest{} +func (x *UpdateStationLocationByGuardianIdRequest) Reset() { + *x = UpdateStationLocationByGuardianIdRequest{} if protoimpl.UnsafeEnabled { mi := &file_where_child_bus_v1_station_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39,13 +39,13 @@ func (x *UpdateStationRequest) Reset() { } } -func (x *UpdateStationRequest) String() string { +func (x *UpdateStationLocationByGuardianIdRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateStationRequest) ProtoMessage() {} +func (*UpdateStationLocationByGuardianIdRequest) ProtoMessage() {} -func (x *UpdateStationRequest) ProtoReflect() protoreflect.Message { +func (x *UpdateStationLocationByGuardianIdRequest) ProtoReflect() protoreflect.Message { mi := &file_where_child_bus_v1_station_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57,33 +57,33 @@ func (x *UpdateStationRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateStationRequest.ProtoReflect.Descriptor instead. -func (*UpdateStationRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateStationLocationByGuardianIdRequest.ProtoReflect.Descriptor instead. +func (*UpdateStationLocationByGuardianIdRequest) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{0} } -func (x *UpdateStationRequest) GetGuardianId() string { +func (x *UpdateStationLocationByGuardianIdRequest) GetGuardianId() string { if x != nil { return x.GuardianId } return "" } -func (x *UpdateStationRequest) GetLongitude() float64 { +func (x *UpdateStationLocationByGuardianIdRequest) GetLongitude() float64 { if x != nil { return x.Longitude } return 0 } -func (x *UpdateStationRequest) GetLatitude() float64 { +func (x *UpdateStationLocationByGuardianIdRequest) GetLatitude() float64 { if x != nil { return x.Latitude } return 0 } -type UpdateStationResponse struct { +type UpdateStationLocationByGuardianIdResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -91,8 +91,8 @@ type UpdateStationResponse struct { Station *Station `protobuf:"bytes,1,opt,name=station,proto3" json:"station,omitempty"` } -func (x *UpdateStationResponse) Reset() { - *x = UpdateStationResponse{} +func (x *UpdateStationLocationByGuardianIdResponse) Reset() { + *x = UpdateStationLocationByGuardianIdResponse{} if protoimpl.UnsafeEnabled { mi := &file_where_child_bus_v1_station_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100,13 +100,13 @@ func (x *UpdateStationResponse) Reset() { } } -func (x *UpdateStationResponse) String() string { +func (x *UpdateStationLocationByGuardianIdResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateStationResponse) ProtoMessage() {} +func (*UpdateStationLocationByGuardianIdResponse) ProtoMessage() {} -func (x *UpdateStationResponse) ProtoReflect() protoreflect.Message { +func (x *UpdateStationLocationByGuardianIdResponse) ProtoReflect() protoreflect.Message { mi := &file_where_child_bus_v1_station_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -118,12 +118,12 @@ func (x *UpdateStationResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateStationResponse.ProtoReflect.Descriptor instead. -func (*UpdateStationResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateStationLocationByGuardianIdResponse.ProtoReflect.Descriptor instead. +func (*UpdateStationLocationByGuardianIdResponse) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{1} } -func (x *UpdateStationResponse) GetStation() *Station { +func (x *UpdateStationLocationByGuardianIdResponse) GetStation() *Station { if x != nil { return x.Station } @@ -256,71 +256,77 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x71, 0x0a, 0x14, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x4e, 0x0a, - 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, - 0x1c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, - 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x49, 0x64, 0x22, 0x8b, 0x02, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, - 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, - 0x6f, 0x73, 0x32, 0xf4, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, - 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x28, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x22, 0x62, 0x0a, 0x29, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, - 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, - 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x8b, 0x02, + 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x37, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, + 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x32, 0xb1, 0x02, 0x0a, 0x0e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, + 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, + 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, + 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -337,24 +343,24 @@ func file_where_child_bus_v1_station_proto_rawDescGZIP() []byte { var file_where_child_bus_v1_station_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_where_child_bus_v1_station_proto_goTypes = []interface{}{ - (*UpdateStationRequest)(nil), // 0: where_child_bus.v1.UpdateStationRequest - (*UpdateStationResponse)(nil), // 1: where_child_bus.v1.UpdateStationResponse - (*GetStationListByBusIdRequest)(nil), // 2: where_child_bus.v1.GetStationListByBusIdRequest - (*GetStationListByBusIdResponse)(nil), // 3: where_child_bus.v1.GetStationListByBusIdResponse - (*Station)(nil), // 4: where_child_bus.v1.Station - (*GuardianResponse)(nil), // 5: where_child_bus.v1.GuardianResponse - (*Child)(nil), // 6: where_child_bus.v1.Child - (*ChildPhoto)(nil), // 7: where_child_bus.v1.ChildPhoto + (*UpdateStationLocationByGuardianIdRequest)(nil), // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdRequest + (*UpdateStationLocationByGuardianIdResponse)(nil), // 1: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse + (*GetStationListByBusIdRequest)(nil), // 2: where_child_bus.v1.GetStationListByBusIdRequest + (*GetStationListByBusIdResponse)(nil), // 3: where_child_bus.v1.GetStationListByBusIdResponse + (*Station)(nil), // 4: where_child_bus.v1.Station + (*GuardianResponse)(nil), // 5: where_child_bus.v1.GuardianResponse + (*Child)(nil), // 6: where_child_bus.v1.Child + (*ChildPhoto)(nil), // 7: where_child_bus.v1.ChildPhoto } var file_where_child_bus_v1_station_proto_depIdxs = []int32{ - 4, // 0: where_child_bus.v1.UpdateStationResponse.station:type_name -> where_child_bus.v1.Station + 4, // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse.station:type_name -> where_child_bus.v1.Station 4, // 1: where_child_bus.v1.GetStationListByBusIdResponse.stations:type_name -> where_child_bus.v1.Station 5, // 2: where_child_bus.v1.GetStationListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse 6, // 3: where_child_bus.v1.GetStationListByBusIdResponse.children:type_name -> where_child_bus.v1.Child 7, // 4: where_child_bus.v1.GetStationListByBusIdResponse.photos:type_name -> where_child_bus.v1.ChildPhoto - 0, // 5: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest + 0, // 5: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:input_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdRequest 2, // 6: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest - 1, // 7: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse + 1, // 7: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:output_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdResponse 3, // 8: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse 7, // [7:9] is the sub-list for method output_type 5, // [5:7] is the sub-list for method input_type @@ -371,7 +377,7 @@ func file_where_child_bus_v1_station_proto_init() { file_where_child_bus_v1_resources_proto_init() if !protoimpl.UnsafeEnabled { file_where_child_bus_v1_station_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateStationRequest); i { + switch v := v.(*UpdateStationLocationByGuardianIdRequest); i { case 0: return &v.state case 1: @@ -383,7 +389,7 @@ func file_where_child_bus_v1_station_proto_init() { } } file_where_child_bus_v1_station_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateStationResponse); i { + switch v := v.(*UpdateStationLocationByGuardianIdResponse); i { case 0: return &v.state case 1: diff --git a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go index 5ded9354..a5800c42 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go @@ -19,15 +19,15 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - StationService_UpdateStation_FullMethodName = "/where_child_bus.v1.StationService/UpdateStation" - StationService_GetStationListByBusId_FullMethodName = "/where_child_bus.v1.StationService/GetStationListByBusId" + StationService_UpdateStationLocationByGuardianId_FullMethodName = "/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId" + StationService_GetStationListByBusId_FullMethodName = "/where_child_bus.v1.StationService/GetStationListByBusId" ) // StationServiceClient is the client API for StationService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type StationServiceClient interface { - UpdateStation(ctx context.Context, in *UpdateStationRequest, opts ...grpc.CallOption) (*UpdateStationResponse, error) + UpdateStationLocationByGuardianId(ctx context.Context, in *UpdateStationLocationByGuardianIdRequest, opts ...grpc.CallOption) (*UpdateStationLocationByGuardianIdResponse, error) GetStationListByBusId(ctx context.Context, in *GetStationListByBusIdRequest, opts ...grpc.CallOption) (*GetStationListByBusIdResponse, error) } @@ -39,9 +39,9 @@ func NewStationServiceClient(cc grpc.ClientConnInterface) StationServiceClient { return &stationServiceClient{cc} } -func (c *stationServiceClient) UpdateStation(ctx context.Context, in *UpdateStationRequest, opts ...grpc.CallOption) (*UpdateStationResponse, error) { - out := new(UpdateStationResponse) - err := c.cc.Invoke(ctx, StationService_UpdateStation_FullMethodName, in, out, opts...) +func (c *stationServiceClient) UpdateStationLocationByGuardianId(ctx context.Context, in *UpdateStationLocationByGuardianIdRequest, opts ...grpc.CallOption) (*UpdateStationLocationByGuardianIdResponse, error) { + out := new(UpdateStationLocationByGuardianIdResponse) + err := c.cc.Invoke(ctx, StationService_UpdateStationLocationByGuardianId_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -61,7 +61,7 @@ func (c *stationServiceClient) GetStationListByBusId(ctx context.Context, in *Ge // All implementations should embed UnimplementedStationServiceServer // for forward compatibility type StationServiceServer interface { - UpdateStation(context.Context, *UpdateStationRequest) (*UpdateStationResponse, error) + UpdateStationLocationByGuardianId(context.Context, *UpdateStationLocationByGuardianIdRequest) (*UpdateStationLocationByGuardianIdResponse, error) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) } @@ -69,8 +69,8 @@ type StationServiceServer interface { type UnimplementedStationServiceServer struct { } -func (UnimplementedStationServiceServer) UpdateStation(context.Context, *UpdateStationRequest) (*UpdateStationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateStation not implemented") +func (UnimplementedStationServiceServer) UpdateStationLocationByGuardianId(context.Context, *UpdateStationLocationByGuardianIdRequest) (*UpdateStationLocationByGuardianIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateStationLocationByGuardianId not implemented") } func (UnimplementedStationServiceServer) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStationListByBusId not implemented") @@ -87,20 +87,20 @@ func RegisterStationServiceServer(s grpc.ServiceRegistrar, srv StationServiceSer s.RegisterService(&StationService_ServiceDesc, srv) } -func _StationService_UpdateStation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateStationRequest) +func _StationService_UpdateStationLocationByGuardianId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateStationLocationByGuardianIdRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(StationServiceServer).UpdateStation(ctx, in) + return srv.(StationServiceServer).UpdateStationLocationByGuardianId(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: StationService_UpdateStation_FullMethodName, + FullMethod: StationService_UpdateStationLocationByGuardianId_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StationServiceServer).UpdateStation(ctx, req.(*UpdateStationRequest)) + return srv.(StationServiceServer).UpdateStationLocationByGuardianId(ctx, req.(*UpdateStationLocationByGuardianIdRequest)) } return interceptor(ctx, in, info, handler) } @@ -131,8 +131,8 @@ var StationService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*StationServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "UpdateStation", - Handler: _StationService_UpdateStation_Handler, + MethodName: "UpdateStationLocationByGuardianId", + Handler: _StationService_UpdateStationLocationByGuardianId_Handler, }, { MethodName: "GetStationListByBusId", diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart index a8631afa..a224d682 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -15,8 +15,8 @@ import 'package:protobuf/protobuf.dart' as $pb; import 'resources.pb.dart' as $8; -class UpdateStationRequest extends $pb.GeneratedMessage { - factory UpdateStationRequest({ +class UpdateStationLocationByGuardianIdRequest extends $pb.GeneratedMessage { + factory UpdateStationLocationByGuardianIdRequest({ $core.String? guardianId, $core.double? longitude, $core.double? latitude, @@ -33,11 +33,11 @@ class UpdateStationRequest extends $pb.GeneratedMessage { } return $result; } - UpdateStationRequest._() : super(); - factory UpdateStationRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UpdateStationRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + UpdateStationLocationByGuardianIdRequest._() : super(); + factory UpdateStationLocationByGuardianIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateStationLocationByGuardianIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationLocationByGuardianIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'guardianId') ..a<$core.double>(2, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.double>(3, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) @@ -48,22 +48,22 @@ class UpdateStationRequest extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - UpdateStationRequest clone() => UpdateStationRequest()..mergeFromMessage(this); + UpdateStationLocationByGuardianIdRequest clone() => UpdateStationLocationByGuardianIdRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - UpdateStationRequest copyWith(void Function(UpdateStationRequest) updates) => super.copyWith((message) => updates(message as UpdateStationRequest)) as UpdateStationRequest; + UpdateStationLocationByGuardianIdRequest copyWith(void Function(UpdateStationLocationByGuardianIdRequest) updates) => super.copyWith((message) => updates(message as UpdateStationLocationByGuardianIdRequest)) as UpdateStationLocationByGuardianIdRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static UpdateStationRequest create() => UpdateStationRequest._(); - UpdateStationRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static UpdateStationLocationByGuardianIdRequest create() => UpdateStationLocationByGuardianIdRequest._(); + UpdateStationLocationByGuardianIdRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static UpdateStationRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UpdateStationRequest? _defaultInstance; + static UpdateStationLocationByGuardianIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateStationLocationByGuardianIdRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get guardianId => $_getSZ(0); @@ -93,8 +93,8 @@ class UpdateStationRequest extends $pb.GeneratedMessage { void clearLatitude() => clearField(3); } -class UpdateStationResponse extends $pb.GeneratedMessage { - factory UpdateStationResponse({ +class UpdateStationLocationByGuardianIdResponse extends $pb.GeneratedMessage { + factory UpdateStationLocationByGuardianIdResponse({ $8.Station? station, }) { final $result = create(); @@ -103,11 +103,11 @@ class UpdateStationResponse extends $pb.GeneratedMessage { } return $result; } - UpdateStationResponse._() : super(); - factory UpdateStationResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UpdateStationResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + UpdateStationLocationByGuardianIdResponse._() : super(); + factory UpdateStationLocationByGuardianIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateStationLocationByGuardianIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationLocationByGuardianIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOM<$8.Station>(1, _omitFieldNames ? '' : 'station', subBuilder: $8.Station.create) ..hasRequiredFields = false ; @@ -116,22 +116,22 @@ class UpdateStationResponse extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - UpdateStationResponse clone() => UpdateStationResponse()..mergeFromMessage(this); + UpdateStationLocationByGuardianIdResponse clone() => UpdateStationLocationByGuardianIdResponse()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - UpdateStationResponse copyWith(void Function(UpdateStationResponse) updates) => super.copyWith((message) => updates(message as UpdateStationResponse)) as UpdateStationResponse; + UpdateStationLocationByGuardianIdResponse copyWith(void Function(UpdateStationLocationByGuardianIdResponse) updates) => super.copyWith((message) => updates(message as UpdateStationLocationByGuardianIdResponse)) as UpdateStationLocationByGuardianIdResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static UpdateStationResponse create() => UpdateStationResponse._(); - UpdateStationResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static UpdateStationLocationByGuardianIdResponse create() => UpdateStationLocationByGuardianIdResponse._(); + UpdateStationLocationByGuardianIdResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static UpdateStationResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UpdateStationResponse? _defaultInstance; + static UpdateStationLocationByGuardianIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateStationLocationByGuardianIdResponse? _defaultInstance; @$pb.TagNumber(1) $8.Station get station => $_getN(0); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart index 51b51682..b6bd8f83 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart @@ -21,10 +21,10 @@ export 'station.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.StationService') class StationServiceClient extends $grpc.Client { - static final _$updateStation = $grpc.ClientMethod<$6.UpdateStationRequest, $6.UpdateStationResponse>( - '/where_child_bus.v1.StationService/UpdateStation', - ($6.UpdateStationRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $6.UpdateStationResponse.fromBuffer(value)); + static final _$updateStationLocationByGuardianId = $grpc.ClientMethod<$6.UpdateStationLocationByGuardianIdRequest, $6.UpdateStationLocationByGuardianIdResponse>( + '/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId', + ($6.UpdateStationLocationByGuardianIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.UpdateStationLocationByGuardianIdResponse.fromBuffer(value)); static final _$getStationListByBusId = $grpc.ClientMethod<$6.GetStationListByBusIdRequest, $6.GetStationListByBusIdResponse>( '/where_child_bus.v1.StationService/GetStationListByBusId', ($6.GetStationListByBusIdRequest value) => value.writeToBuffer(), @@ -36,8 +36,8 @@ class StationServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$6.UpdateStationResponse> updateStation($6.UpdateStationRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$updateStation, request, options: options); + $grpc.ResponseFuture<$6.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId($6.UpdateStationLocationByGuardianIdRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$updateStationLocationByGuardianId, request, options: options); } $grpc.ResponseFuture<$6.GetStationListByBusIdResponse> getStationListByBusId($6.GetStationListByBusIdRequest request, {$grpc.CallOptions? options}) { @@ -50,13 +50,13 @@ abstract class StationServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.StationService'; StationServiceBase() { - $addMethod($grpc.ServiceMethod<$6.UpdateStationRequest, $6.UpdateStationResponse>( - 'UpdateStation', - updateStation_Pre, + $addMethod($grpc.ServiceMethod<$6.UpdateStationLocationByGuardianIdRequest, $6.UpdateStationLocationByGuardianIdResponse>( + 'UpdateStationLocationByGuardianId', + updateStationLocationByGuardianId_Pre, false, false, - ($core.List<$core.int> value) => $6.UpdateStationRequest.fromBuffer(value), - ($6.UpdateStationResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $6.UpdateStationLocationByGuardianIdRequest.fromBuffer(value), + ($6.UpdateStationLocationByGuardianIdResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$6.GetStationListByBusIdRequest, $6.GetStationListByBusIdResponse>( 'GetStationListByBusId', getStationListByBusId_Pre, @@ -66,14 +66,14 @@ abstract class StationServiceBase extends $grpc.Service { ($6.GetStationListByBusIdResponse value) => value.writeToBuffer())); } - $async.Future<$6.UpdateStationResponse> updateStation_Pre($grpc.ServiceCall call, $async.Future<$6.UpdateStationRequest> request) async { - return updateStation(call, await request); + $async.Future<$6.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId_Pre($grpc.ServiceCall call, $async.Future<$6.UpdateStationLocationByGuardianIdRequest> request) async { + return updateStationLocationByGuardianId(call, await request); } $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId_Pre($grpc.ServiceCall call, $async.Future<$6.GetStationListByBusIdRequest> request) async { return getStationListByBusId(call, await request); } - $async.Future<$6.UpdateStationResponse> updateStation($grpc.ServiceCall call, $6.UpdateStationRequest request); + $async.Future<$6.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId($grpc.ServiceCall call, $6.UpdateStationLocationByGuardianIdRequest request); $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId($grpc.ServiceCall call, $6.GetStationListByBusIdRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart index 197d8f88..cfb593eb 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -13,9 +13,9 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use updateStationRequestDescriptor instead') -const UpdateStationRequest$json = { - '1': 'UpdateStationRequest', +@$core.Deprecated('Use updateStationLocationByGuardianIdRequestDescriptor instead') +const UpdateStationLocationByGuardianIdRequest$json = { + '1': 'UpdateStationLocationByGuardianIdRequest', '2': [ {'1': 'guardian_id', '3': 1, '4': 1, '5': 9, '10': 'guardianId'}, {'1': 'longitude', '3': 2, '4': 1, '5': 1, '10': 'longitude'}, @@ -23,24 +23,24 @@ const UpdateStationRequest$json = { ], }; -/// Descriptor for `UpdateStationRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List updateStationRequestDescriptor = $convert.base64Decode( - 'ChRVcGRhdGVTdGF0aW9uUmVxdWVzdBIfCgtndWFyZGlhbl9pZBgBIAEoCVIKZ3VhcmRpYW5JZB' - 'IcCglsb25naXR1ZGUYAiABKAFSCWxvbmdpdHVkZRIaCghsYXRpdHVkZRgDIAEoAVIIbGF0aXR1' - 'ZGU='); +/// Descriptor for `UpdateStationLocationByGuardianIdRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateStationLocationByGuardianIdRequestDescriptor = $convert.base64Decode( + 'CihVcGRhdGVTdGF0aW9uTG9jYXRpb25CeUd1YXJkaWFuSWRSZXF1ZXN0Eh8KC2d1YXJkaWFuX2' + 'lkGAEgASgJUgpndWFyZGlhbklkEhwKCWxvbmdpdHVkZRgCIAEoAVIJbG9uZ2l0dWRlEhoKCGxh' + 'dGl0dWRlGAMgASgBUghsYXRpdHVkZQ=='); -@$core.Deprecated('Use updateStationResponseDescriptor instead') -const UpdateStationResponse$json = { - '1': 'UpdateStationResponse', +@$core.Deprecated('Use updateStationLocationByGuardianIdResponseDescriptor instead') +const UpdateStationLocationByGuardianIdResponse$json = { + '1': 'UpdateStationLocationByGuardianIdResponse', '2': [ {'1': 'station', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Station', '10': 'station'}, ], }; -/// Descriptor for `UpdateStationResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List updateStationResponseDescriptor = $convert.base64Decode( - 'ChVVcGRhdGVTdGF0aW9uUmVzcG9uc2USNQoHc3RhdGlvbhgBIAEoCzIbLndoZXJlX2NoaWxkX2' - 'J1cy52MS5TdGF0aW9uUgdzdGF0aW9u'); +/// Descriptor for `UpdateStationLocationByGuardianIdResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateStationLocationByGuardianIdResponseDescriptor = $convert.base64Decode( + 'CilVcGRhdGVTdGF0aW9uTG9jYXRpb25CeUd1YXJkaWFuSWRSZXNwb25zZRI1CgdzdGF0aW9uGA' + 'EgASgLMhsud2hlcmVfY2hpbGRfYnVzLnYxLlN0YXRpb25SB3N0YXRpb24='); @$core.Deprecated('Use getStationListByBusIdRequestDescriptor instead') const GetStationListByBusIdRequest$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py index 77230d53..39634376 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"q\n\x14UpdateStationRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos2\xf4\x01\n\x0eStationService\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos2\xb1\x02\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014StationProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_UPDATESTATIONREQUEST']._serialized_start=92 - _globals['_UPDATESTATIONREQUEST']._serialized_end=205 - _globals['_UPDATESTATIONRESPONSE']._serialized_start=207 - _globals['_UPDATESTATIONRESPONSE']._serialized_end=285 - _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_start=287 - _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_end=340 - _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=343 - _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=610 - _globals['_STATIONSERVICE']._serialized_start=613 - _globals['_STATIONSERVICE']._serialized_end=857 + _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDREQUEST']._serialized_start=93 + _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDREQUEST']._serialized_end=226 + _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDRESPONSE']._serialized_start=228 + _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDRESPONSE']._serialized_end=326 + _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_start=328 + _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_end=381 + _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=384 + _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=651 + _globals['_STATIONSERVICE']._serialized_start=654 + _globals['_STATIONSERVICE']._serialized_end=959 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi index d42573cd..d5ca97d3 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi @@ -6,7 +6,7 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor -class UpdateStationRequest(_message.Message): +class UpdateStationLocationByGuardianIdRequest(_message.Message): __slots__ = ("guardian_id", "longitude", "latitude") GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] @@ -16,7 +16,7 @@ class UpdateStationRequest(_message.Message): latitude: float def __init__(self, guardian_id: _Optional[str] = ..., longitude: _Optional[float] = ..., latitude: _Optional[float] = ...) -> None: ... -class UpdateStationResponse(_message.Message): +class UpdateStationLocationByGuardianIdResponse(_message.Message): __slots__ = ("station",) STATION_FIELD_NUMBER: _ClassVar[int] station: _resources_pb2.Station diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py index cd8b9ac0..06b1eefb 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py @@ -3,7 +3,6 @@ import grpc import grpc.experimental - from where_child_bus.v1 import station_pb2 as where__child__bus_dot_v1_dot_station__pb2 @@ -16,10 +15,10 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ - self.UpdateStation = channel.unary_unary( - '/where_child_bus.v1.StationService/UpdateStation', - request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, + self.UpdateStationLocationByGuardianId = channel.unary_unary( + '/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId', + request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdResponse.FromString, ) self.GetStationListByBusId = channel.unary_unary( '/where_child_bus.v1.StationService/GetStationListByBusId', @@ -31,7 +30,7 @@ def __init__(self, channel): class StationServiceServicer(object): """Missing associated documentation comment in .proto file.""" - def UpdateStation(self, request, context): + def UpdateStationLocationByGuardianId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -46,10 +45,10 @@ def GetStationListByBusId(self, request, context): def add_StationServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'UpdateStation': grpc.unary_unary_rpc_method_handler( - servicer.UpdateStation, - request_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.SerializeToString, + 'UpdateStationLocationByGuardianId': grpc.unary_unary_rpc_method_handler( + servicer.UpdateStationLocationByGuardianId, + request_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdResponse.SerializeToString, ), 'GetStationListByBusId': grpc.unary_unary_rpc_method_handler( servicer.GetStationListByBusId, @@ -67,7 +66,7 @@ class StationService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def UpdateStation(request, + def UpdateStationLocationByGuardianId(request, target, options=(), channel_credentials=None, @@ -77,9 +76,9 @@ def UpdateStation(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/UpdateStation', - where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, - where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId', + where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.SerializeToString, + where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto index 7a0c6f3c..c05321b7 100644 --- a/proto/where_child_bus/v1/station.proto +++ b/proto/where_child_bus/v1/station.proto @@ -5,17 +5,17 @@ package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; service StationService { - rpc UpdateStation(UpdateStationRequest) returns (UpdateStationResponse); + rpc UpdateStationLocationByGuardianId(UpdateStationLocationByGuardianIdRequest) returns (UpdateStationLocationByGuardianIdResponse); rpc GetStationListByBusId(GetStationListByBusIdRequest) returns (GetStationListByBusIdResponse); } -message UpdateStationRequest { +message UpdateStationLocationByGuardianIdRequest { string guardian_id = 1; double longitude = 2; double latitude = 3; } -message UpdateStationResponse { +message UpdateStationLocationByGuardianIdResponse { Station station = 1; } From 3f743d1720f6de7bc727b9995415688ea109c1ad Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 16:39:41 +0900 Subject: [PATCH 448/771] =?UTF-8?q?feat:=20=E3=82=B5=E3=83=BC=E3=83=93?= =?UTF-8?q?=E3=82=B9=E5=90=8D=E5=A4=89=E6=9B=B4=E3=81=AB=E4=BC=B4=E3=81=84?= =?UTF-8?q?API=E5=AE=9F=E8=A3=85=E3=82=82=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/station.go | 6 ++--- backend/usecases/station/station.go | 41 ++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/backend/interfaces/station.go b/backend/interfaces/station.go index e4a45856..ce65a866 100644 --- a/backend/interfaces/station.go +++ b/backend/interfaces/station.go @@ -15,9 +15,9 @@ func NewStationServiceServer(interactor *station.Interactor) pb.StationServiceSe return &stationServiceServer{interactor} } -// CreateStation implements where_child_busv1.StationServiceServer. -func (s *stationServiceServer) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { - return s.interactor.UpdateStation(ctx, req) +// UpdateStationLocationByGuardianId implements where_child_busv1.StationServiceServer. +func (s *stationServiceServer) UpdateStationLocationByGuardianId(ctx context.Context, req *pb.UpdateStationLocationByGuardianIdRequest) (*pb.UpdateStationLocationByGuardianIdResponse, error) { + return s.interactor.UpdateStationLocationByGuardianID(ctx, req) } // GetStationListByBusId implements where_child_busv1.StationServiceServer. diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 6ac897ad..dcf6b550 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -7,6 +7,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" stationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" @@ -22,7 +23,7 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { return &Interactor{entClient, logger} } -func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { +func (i *Interactor) UpdateStationLocationByGuardianID(ctx context.Context, req *pb.UpdateStationLocationByGuardianIdRequest) (*pb.UpdateStationLocationByGuardianIdResponse, error) { tx, err := i.entClient.Tx(ctx) if err != nil { i.logger.Error("failed to start transaction", "error", err) @@ -36,13 +37,35 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq return nil, err } - // ステーションを更新または作成します。 - station, err := tx.Station.Create(). - SetGuardianID(guardianID). - SetLatitude(req.Latitude). - SetLongitude(req.Longitude). - Save(ctx) - + station, err := tx.Station.Query(). + Where(stationRepo.HasGuardianWith(guardianRepo.ID(guardianID))). + Only(ctx) + + if ent.IsNotFound(err) { + // エンティティが見つからない場合、新しく作成します。 + station, err = tx.Station.Create(). + SetGuardianID(guardianID). + SetLatitude(req.Latitude). + SetLongitude(req.Longitude). + Save(ctx) + if err != nil { + i.logger.Error("failed to create station", "error", err) + return nil, err + } + } else if err != nil { + i.logger.Error("failed to get station", "error", err) + return nil, err + } else { + // エンティティが見つかった場合、更新します。 + station, err = station.Update(). + SetLatitude(req.Latitude). + SetLongitude(req.Longitude). + Save(ctx) + if err != nil { + i.logger.Error("failed to update station", "error", err) + return nil, err + } + } if err != nil { i.logger.Error("failed to create or update station", "error", err) return nil, err @@ -61,7 +84,7 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq } // レスポンスを作成します。 - return &pb.UpdateStationResponse{ + return &pb.UpdateStationLocationByGuardianIdResponse{ Station: utils.ToPbStation(station, morningNextStationID, eveningNextStationID), }, nil } From 0d5cf1bfeb2b20174c8d3f39e9ab49b95cb981a3 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 18 Feb 2024 16:51:19 +0900 Subject: [PATCH 449/771] =?UTF-8?q?chore:Nursery=E3=82=92=E3=82=B7?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E3=83=AB=E3=83=88=E3=83=B3=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/app.dart | 14 +- .../lib/components/util/image_from_byte.dart | 13 ++ .../lib/pages/auth_page/auth_page.dart | 6 +- .../pages/bus_list_page/bus_list_page.dart | 9 +- .../pages/register_page/register_page.dart | 6 +- .../components/utils/input_form_body.dart | 5 +- .../student_list_page/student_edit_page.dart | 5 +- .../student_list_page/student_list_page.dart | 16 +- .../service/get_child_list_by_nursery_id.dart | 6 +- .../lib/util/api/guardians.dart | 7 + .../lib/util/api/health_check.dart | 2 +- .../lib/util/nursery_data.dart | 20 +++ frontend/where_child_bus/pubspec.lock | 144 ++++++++++++++++++ frontend/where_child_bus/pubspec.yaml | 1 + 14 files changed, 221 insertions(+), 33 deletions(-) create mode 100644 frontend/where_child_bus/lib/components/util/image_from_byte.dart create mode 100644 frontend/where_child_bus/lib/util/nursery_data.dart diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index f9baef87..98b48d0e 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -5,9 +5,9 @@ import 'package:where_child_bus/pages/student_list_page/student_list_page.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class App extends StatefulWidget { - NurseryResponse nursery; - - App({super.key, required this.nursery}); + App({ + super.key, + }); @override State createState() => _AppState(); @@ -23,12 +23,8 @@ class _AppState extends State { title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定'][_selectedIndex]), ), body: [ - ChildListPage( - nursery: widget.nursery, - ), - BusListPage( - nursery: widget.nursery, - ), + ChildListPage(), + BusListPage(), const NotificationPage() ][_selectedIndex], bottomNavigationBar: BottomNavigationBar( diff --git a/frontend/where_child_bus/lib/components/util/image_from_byte.dart b/frontend/where_child_bus/lib/components/util/image_from_byte.dart new file mode 100644 index 00000000..106065ab --- /dev/null +++ b/frontend/where_child_bus/lib/components/util/image_from_byte.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; +import 'dart:typed_data'; // Uint8Listを使用するために必要 + +class ImageFromBytes extends StatelessWidget { + final Uint8List imageData; + + const ImageFromBytes({Key? key, required this.imageData}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Image.memory(imageData); + } +} diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index 2a66dabd..b8202b77 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; import 'package:where_child_bus/util/api/nursery_login.dart'; +import 'package:where_child_bus/util/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; enum NurseryLoginError { @@ -135,12 +136,11 @@ class _AuthPageState extends State { if (res.success) { print(res.success); print(res.nursery.name); + NurseryData().setNursery(res.nursery); Navigator.pushReplacement( currentContext, MaterialPageRoute( - builder: (BuildContext context) => App( - nursery: res.nursery, - ), + builder: (BuildContext context) => App(), ), ); } else { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 9ef7c388..4c32487e 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -5,12 +5,13 @@ import 'package:where_child_bus/models/bus_edit_page_type.dart'; import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; +import 'package:where_child_bus/util/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BusListPage extends StatefulWidget { - final NurseryResponse nursery; - - const BusListPage({super.key, required this.nursery}); + const BusListPage({ + super.key, + }); @override State createState() => _BusListPageState(); @@ -28,7 +29,7 @@ class _BusListPageState extends State { } Future _loadBusList() async { - String nurseryId = widget.nursery.id; + String nurseryId = NurseryData().getNursery().id; List busList = await getBusList(nurseryId); try { if (mounted) { diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index 83e67640..6d90b7ec 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; import "dart:developer" as developer; import 'package:where_child_bus/util/api/nursery_create.dart'; +import 'package:where_child_bus/util/nursery_data.dart'; import 'package:where_child_bus/util/validation/create_nursery_validation.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; import '../../models/create_nursery_error.dart'; @@ -69,12 +70,11 @@ class _RegisterPageState extends State { _addressController.text, ); + NurseryData().setNursery(res.nursery); Navigator.pushReplacement( context, MaterialPageRoute( - builder: (BuildContext context) => App( - nursery: res.nursery, - ), + builder: (BuildContext context) => App(), ), ); } catch (err) { diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index eaa6313a..23adc2b6 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -76,10 +76,7 @@ class _InputFormBody extends State { context, "園児氏名", "園児氏名を入力してください", TextInputType.name), inputLabelAndTextField( context, "年齢", "年齢を入力してください", TextInputType.number), - inputLabelAndTextField( - context, "保護者氏名", "保護者氏名を入力してください", TextInputType.name), - inputLabelAndTextField( - context, "保護者連絡先", "保護者連絡先を入力してください", TextInputType.phone), + inputLabelAndSelectBox(context, "保護者", widget.busName), inputLabelAndSelectBox(context, "利用バス", widget.busName), inputLabelAndSelectBox(context, "乗降場所", widget.busStop), Container( diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index 4d73ef62..49ae4186 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -1,9 +1,12 @@ import 'dart:io'; import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'components/utils/input_form_body.dart'; class StudentEditPage extends StatefulWidget { - const StudentEditPage({super.key}); + final Child? child; + + const StudentEditPage({super.key, this.child}); @override State createState() => _StudentEditPageState(); diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 41449fed..02129cc1 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -4,12 +4,14 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/child_list.dart'; import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; import 'package:where_child_bus/service/get_child_list_by_nursery_id.dart'; +import 'package:where_child_bus/util/nursery_data.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class ChildListPage extends StatefulWidget { - final NurseryResponse nursery; - - const ChildListPage({super.key, required this.nursery}); + const ChildListPage({ + super.key, + }); @override State createState() => _ChildListPageState(); @@ -17,6 +19,7 @@ class ChildListPage extends StatefulWidget { class _ChildListPageState extends State { List children = []; + List photos = []; bool _isLoading = false; bool _isFailLoading = false; @@ -38,11 +41,12 @@ class _ChildListPageState extends State { Future _loadChildren() async { try { _isLoading = true; - List childList = - await getChildListByNurseryIdService(widget.nursery.id); + GetChildListByNurseryIDResponse res = + await getChildListByNurseryIdService(NurseryData().getNursery().id); if (mounted) { setState(() { - children = childList; + children = res.children; + photos = res.photos; _isLoading = false; }); } diff --git a/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart b/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart index 6ec20582..4191ad59 100644 --- a/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart +++ b/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart @@ -1,7 +1,9 @@ import 'package:where_child_bus/util/api/child.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; -Future> getChildListByNurseryIdService(String nurseryId) async { +Future getChildListByNurseryIdService( + String nurseryId) async { var res = await getChildListByNurseryId(nurseryId); - return res.children; + return res; } diff --git a/frontend/where_child_bus/lib/util/api/guardians.dart b/frontend/where_child_bus/lib/util/api/guardians.dart index fe9f832a..948db8bb 100644 --- a/frontend/where_child_bus/lib/util/api/guardians.dart +++ b/frontend/where_child_bus/lib/util/api/guardians.dart @@ -33,3 +33,10 @@ Future getGuardiansListByBusId( return client.getGuardianListByBusId(req); }); } + +// Future getGuardianByChildId(String childId) async { +// return performGrpcCall((client) async { +// var req = GetGuardianByChildIdRequest(childId: childId); +// return client.getGuardianBuChild +// }); +// } diff --git a/frontend/where_child_bus/lib/util/api/health_check.dart b/frontend/where_child_bus/lib/util/api/health_check.dart index dd5e2f26..5d84ef8d 100644 --- a/frontend/where_child_bus/lib/util/api/health_check.dart +++ b/frontend/where_child_bus/lib/util/api/health_check.dart @@ -10,7 +10,7 @@ Future serviceHealthCheck() async { port: appConfig.grpcPort, ); - final grpcClient = HealthCheckServiceClient(channel, + final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 60))); try { diff --git a/frontend/where_child_bus/lib/util/nursery_data.dart b/frontend/where_child_bus/lib/util/nursery_data.dart new file mode 100644 index 00000000..1d56d12b --- /dev/null +++ b/frontend/where_child_bus/lib/util/nursery_data.dart @@ -0,0 +1,20 @@ +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class NurseryData { + static final NurseryData _singleton = NurseryData._internal(); + late NurseryResponse _nursery; + + factory NurseryData() { + return _singleton; + } + + NurseryData._internal(); + + void setNursery(NurseryResponse nursery) { + _nursery = nursery; + } + + NurseryResponse getNursery() { + return _nursery; + } +} diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index 5bfa06f2..558d5b38 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -97,6 +97,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" file_selector_linux: dependency: transitive description: @@ -142,6 +158,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_cache_manager: + dependency: "direct main" + description: + name: flutter_cache_manager + sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" + url: "https://pub.dev" + source: hosted + version: "3.3.1" flutter_dotenv: dependency: "direct main" description: @@ -336,6 +360,62 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + platform: + dependency: transitive + description: + name: platform + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + url: "https://pub.dev" + source: hosted + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -360,6 +440,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.0" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" + source: hosted + version: "0.27.7" sky_engine: dependency: transitive description: flutter @@ -373,6 +461,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqflite: + dependency: transitive + description: + name: sqflite + sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6 + url: "https://pub.dev" + source: hosted + version: "2.3.2" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5" + url: "https://pub.dev" + source: hosted + version: "2.5.3" stack_trace: dependency: transitive description: @@ -397,6 +509,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" term_glyph: dependency: transitive description: @@ -421,6 +541,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + uuid: + dependency: transitive + description: + name: uuid + sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 + url: "https://pub.dev" + source: hosted + version: "4.3.3" vector_math: dependency: transitive description: @@ -444,6 +572,22 @@ packages: relative: true source: path version: "0.0.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" sdks: dart: ">=3.2.6 <4.0.0" flutter: ">=3.10.0" diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index c8f267ee..872b9719 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -14,6 +14,7 @@ dependencies: protobuf: ^3.1.0 flutter_dotenv: ^5.1.0 image_picker: ^1.0.7 + flutter_cache_manager: ^3.3.1 where_child_bus_api: path: ../where_child_bus_api From 319221c5de26e4e34f082373911e544195af0aa6 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 17:18:43 +0900 Subject: [PATCH 450/771] chore: add echo to debug --- backend/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index 3a4fb060..b350553e 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -19,6 +19,8 @@ ARG ML_ADDR ARG INSIDE_OF_CREDENTIALS +RUN echo "Port is: $PORT" && echo "Mode is: $MODE_DEV" + # .env ファイルを生成 RUN echo "DSN=$DSN" > .env \ From d557def0564838741d72cab0cfaa47e32427f4c2 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 17:33:27 +0900 Subject: [PATCH 451/771] fix: Docker --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index b350553e..b46621d5 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -59,7 +59,7 @@ RUN apk --no-cache add ca-certificates # ビルドステージからバイナリと.envファイルをコピー COPY --from=builder /go/bin/server /server -COPY --from=builder /srv/grpc/.env / +COPY --from=builder /srv/grpc/.env ./.env COPY --from=builder /srv/grpc/secrets /secrets # アプリケーションの起動 From 3840025e9071170b04709b5bfb9a49d55a8a6228 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 18:18:03 +0900 Subject: [PATCH 452/771] =?UTF-8?q?feat:=20childphoto=E3=81=AB=E5=86=99?= =?UTF-8?q?=E7=9C=9F=E3=82=92=E6=A0=BC=E7=B4=8D=E3=81=99=E3=82=8B=E3=83=90?= =?UTF-8?q?=E3=82=A4=E3=83=88=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/where_child_bus/v1/resources.pb.go | 130 ++++++++++-------- .../where_child_bus/v1/resources.pb.dart | 40 ++++-- .../where_child_bus/v1/resources.pbjson.dart | 11 +- .../where_child_bus/v1/resources_pb2.py | 24 ++-- .../where_child_bus/v1/resources_pb2.pyi | 6 +- proto/where_child_bus/v1/resources.proto | 5 +- 6 files changed, 122 insertions(+), 94 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 6692f9d1..4a4707e5 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -1192,8 +1192,9 @@ type ChildPhoto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + PhotoData []byte `protobuf:"bytes,3,opt,name=photo_data,json=photoData,proto3" json:"photo_data,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *ChildPhoto) Reset() { @@ -1242,6 +1243,13 @@ func (x *ChildPhoto) GetChildId() string { return "" } +func (x *ChildPhoto) GetPhotoData() []byte { + if x != nil { + return x.PhotoData + } + return nil +} + func (x *ChildPhoto) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -1525,66 +1533,68 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xad, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x39, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, - 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, - 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, - 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x56, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, - 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x44, 0x45, 0x4f, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, - 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, - 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, - 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, - 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, - 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, - 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, - 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, - 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, + 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, + 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, 0x0a, + 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, 0x4e, + 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x56, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, + 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, + 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, + 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, + 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, + 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, + 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, + 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, + 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, + 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 024e2553..a851ac96 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -1441,6 +1441,7 @@ class ChildPhoto extends $pb.GeneratedMessage { factory ChildPhoto({ $core.String? id, $core.String? childId, + $core.List<$core.int>? photoData, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, }) { @@ -1451,6 +1452,9 @@ class ChildPhoto extends $pb.GeneratedMessage { if (childId != null) { $result.childId = childId; } + if (photoData != null) { + $result.photoData = photoData; + } if (createdAt != null) { $result.createdAt = createdAt; } @@ -1466,8 +1470,9 @@ class ChildPhoto extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildPhoto', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'childId') - ..aOM<$7.Timestamp>(3, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(4, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'photoData', $pb.PbFieldType.OY) + ..aOM<$7.Timestamp>(4, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1511,26 +1516,35 @@ class ChildPhoto extends $pb.GeneratedMessage { void clearChildId() => clearField(2); @$pb.TagNumber(3) - $7.Timestamp get createdAt => $_getN(2); - @$pb.TagNumber(3) - set createdAt($7.Timestamp v) { setField(3, v); } + $core.List<$core.int> get photoData => $_getN(2); @$pb.TagNumber(3) - $core.bool hasCreatedAt() => $_has(2); + set photoData($core.List<$core.int> v) { $_setBytes(2, v); } @$pb.TagNumber(3) - void clearCreatedAt() => clearField(3); + $core.bool hasPhotoData() => $_has(2); @$pb.TagNumber(3) - $7.Timestamp ensureCreatedAt() => $_ensure(2); + void clearPhotoData() => clearField(3); @$pb.TagNumber(4) - $7.Timestamp get updatedAt => $_getN(3); + $7.Timestamp get createdAt => $_getN(3); @$pb.TagNumber(4) - set updatedAt($7.Timestamp v) { setField(4, v); } + set createdAt($7.Timestamp v) { setField(4, v); } @$pb.TagNumber(4) - $core.bool hasUpdatedAt() => $_has(3); + $core.bool hasCreatedAt() => $_has(3); @$pb.TagNumber(4) - void clearUpdatedAt() => clearField(4); + void clearCreatedAt() => clearField(4); @$pb.TagNumber(4) - $7.Timestamp ensureUpdatedAt() => $_ensure(3); + $7.Timestamp ensureCreatedAt() => $_ensure(3); + + @$pb.TagNumber(5) + $7.Timestamp get updatedAt => $_getN(4); + @$pb.TagNumber(5) + set updatedAt($7.Timestamp v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasUpdatedAt() => $_has(4); + @$pb.TagNumber(5) + void clearUpdatedAt() => clearField(5); + @$pb.TagNumber(5) + $7.Timestamp ensureUpdatedAt() => $_ensure(4); } class BoardingRecord extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 7d849c2b..0d682ded 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -304,17 +304,18 @@ const ChildPhoto$json = { '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, - {'1': 'created_at', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'photo_data', '3': 3, '4': 1, '5': 12, '10': 'photoData'}, + {'1': 'created_at', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; /// Descriptor for `ChildPhoto`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List childPhotoDescriptor = $convert.base64Decode( 'CgpDaGlsZFBob3RvEg4KAmlkGAEgASgJUgJpZBIZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZB' - 'I5CgpjcmVhdGVkX2F0GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRl' - 'ZEF0EjkKCnVwZGF0ZWRfYXQYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cG' - 'RhdGVkQXQ='); + 'IdCgpwaG90b19kYXRhGAMgASgMUglwaG90b0RhdGESOQoKY3JlYXRlZF9hdBgEIAEoCzIaLmdv' + 'b2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cGRhdGVkX2F0GAUgASgLMh' + 'ouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); @$core.Deprecated('Use boardingRecordDescriptor instead') const BoardingRecord$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py index 9a506096..966efcdb 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x87\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xad\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x39\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x87\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_STATUS']._serialized_start=3350 - _globals['_STATUS']._serialized_end=3447 - _globals['_VIDEOTYPE']._serialized_start=3449 - _globals['_VIDEOTYPE']._serialized_end=3535 - _globals['_SEX']._serialized_start=3537 - _globals['_SEX']._serialized_end=3606 - _globals['_BUSTYPE']._serialized_start=3608 - _globals['_BUSTYPE']._serialized_end=3687 + _globals['_STATUS']._serialized_start=3381 + _globals['_STATUS']._serialized_end=3478 + _globals['_VIDEOTYPE']._serialized_start=3480 + _globals['_VIDEOTYPE']._serialized_end=3566 + _globals['_SEX']._serialized_start=3568 + _globals['_SEX']._serialized_end=3637 + _globals['_BUSTYPE']._serialized_start=3639 + _globals['_BUSTYPE']._serialized_end=3718 _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=414 _globals['_NURSERYRESPONSE']._serialized_start=417 @@ -50,7 +50,7 @@ _globals['_BUSSTATIONASSOCIATION']._serialized_start=2919 _globals['_BUSSTATIONASSOCIATION']._serialized_end=2996 _globals['_CHILDPHOTO']._serialized_start=2999 - _globals['_CHILDPHOTO']._serialized_end=3172 - _globals['_BOARDINGRECORD']._serialized_start=3175 - _globals['_BOARDINGRECORD']._serialized_end=3348 + _globals['_CHILDPHOTO']._serialized_end=3203 + _globals['_BOARDINGRECORD']._serialized_start=3206 + _globals['_BOARDINGRECORD']._serialized_end=3379 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi index 230298bc..cd71a07c 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi @@ -235,16 +235,18 @@ class BusStationAssociation(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., station_id: _Optional[str] = ...) -> None: ... class ChildPhoto(_message.Message): - __slots__ = ("id", "child_id", "created_at", "updated_at") + __slots__ = ("id", "child_id", "photo_data", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] CHILD_ID_FIELD_NUMBER: _ClassVar[int] + PHOTO_DATA_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str child_id: str + photo_data: bytes created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., photo_data: _Optional[bytes] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class BoardingRecord(_message.Message): __slots__ = ("id", "child_id", "bus_id", "is_boarding", "timestamp") diff --git a/proto/where_child_bus/v1/resources.proto b/proto/where_child_bus/v1/resources.proto index c9b6121b..a817fb08 100644 --- a/proto/where_child_bus/v1/resources.proto +++ b/proto/where_child_bus/v1/resources.proto @@ -139,8 +139,9 @@ message BusStationAssociation { message ChildPhoto { string id = 1; string child_id = 2; - google.protobuf.Timestamp created_at = 3; - google.protobuf.Timestamp updated_at = 4; + bytes photo_data = 3; + google.protobuf.Timestamp created_at = 4; + google.protobuf.Timestamp updated_at = 5; } message BoardingRecord { From 6a75f445b5f68906912fc4f01d799502ced3f762 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 18:18:14 +0900 Subject: [PATCH 453/771] =?UTF-8?q?feat:=20=E5=AD=90=E4=BE=9B=E5=8F=96?= =?UTF-8?q?=E5=BE=97=E7=B3=BBAPI=E3=81=8C=E5=86=99=E7=9C=9F=E3=82=82?= =?UTF-8?q?=E8=BF=94=E3=81=99=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/child/child.go | 102 ++++++++++++++++++++++++++------ 1 file changed, 83 insertions(+), 19 deletions(-) diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index a3e7335b..e058f53e 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -2,6 +2,7 @@ package child import ( "fmt" + "io" "cloud.google.com/go/storage" "github.com/google/uuid" @@ -13,6 +14,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childBusAssociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" childPhotoRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" @@ -123,16 +125,16 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest } } - // TODO: 顔検出と切り抜きのリクエストを送信 - // res, err := i.MLServiceClient.FaceDetectAndClip(ctx, &mlv1.FaceDetectAndClipRequest{ - // NurseryId: nurseryID.String(), - // ChildId: child.ID.String(), - // }) + // NOTE: ここでPythonRPCを呼び出して、顔検出と切り抜きを行う + res, err := i.MLServiceClient.FaceDetectAndClip(ctx, &mlv1.FaceDetectAndClipRequest{ + NurseryId: nurseryID.String(), + ChildId: child.ID.String(), + }) - // if !res.IsStarted && err != nil { - // i.logger.Error("failed to start face detection and clipping", "error", err) - // return nil, err - // } + if !res.IsStarted && err != nil { + i.logger.Error("failed to start face detection and clipping", "error", err) + return nil, err + } // トランザクションのコミット if err := tx.Commit(); err != nil { @@ -163,8 +165,21 @@ func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetCh return nil, err } + nursery, err := i.entClient.Guardian.Query(). + Where(guardianRepo.HasNurseryWith(nurseryRepo.HasGuardiansWith(guardianRepo.IDEQ(guardianID)))). + Only(ctx) + + if err != nil { + i.logger.Error("failed to get nursery by guardian ID", "error", err) + return nil, err + } + + nurseryID := nursery.ID.String() var childPhotoList []*pb.ChildPhoto + + // 子供ごとに処理 for _, child := range children { + // データベースから子供の写真のメタデータを取得 childPhotoRecordList, err := i.entClient.ChildPhoto.Query(). Where(childPhotoRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(child.Id)))). All(ctx) @@ -174,17 +189,28 @@ func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetCh return nil, err } - for _, photo := range childPhotoRecordList { + // 写真メタデータリストをループ + for _, photoMetadata := range childPhotoRecordList { + // GCSから写真を取得するためのIDを使用 + photo_data, err := i.getPhotoFromGCS(ctx, nurseryID, child.Id, photoMetadata.ID.String()) + if err != nil { + i.logger.Error("failed to get photo from GCS", "error", err) + return nil, err + } + + // 結果リストに追加 childPhotoList = append(childPhotoList, &pb.ChildPhoto{ - ChildId: child.Id, - Id: photo.ID.String(), + ChildId: child.Id, + Id: photoMetadata.ID.String(), // 修正: GCSから取得した写真のIDではなく、メタデータのIDを使用 + PhotoData: photo_data, }) } } return &pb.GetChildListByGuardianIDResponse{ Children: children, - Photos: childPhotoList}, nil + Photos: childPhotoList, + }, nil } func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChildListByNurseryIDRequest) (*pb.GetChildListByNurseryIDResponse, error) { @@ -210,7 +236,8 @@ func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChi // 子供の写真を取得 var photos []*pb.ChildPhoto for _, child := range children { - photoRecordList, err := i.entClient.ChildPhoto.Query(). + // 子供の写真のメタデータを取得 + childPhotoRecordList, err := i.entClient.ChildPhoto.Query(). Where(childPhotoRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(child.Id)))).All(ctx) if err != nil { @@ -218,10 +245,20 @@ func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChi return nil, err } - for _, photo := range photoRecordList { + // 写真メタデータリストをループ + for _, photoMetadata := range childPhotoRecordList { + // GCSから写真を取得するためのIDを使用 + photo_data, err := i.getPhotoFromGCS(ctx, nurseryID.String(), child.Id, photoMetadata.ID.String()) + if err != nil { + i.logger.Error("failed to get photo from GCS", "error", err) + return nil, err + } + + // 結果リストに追加 photos = append(photos, &pb.ChildPhoto{ - ChildId: child.Id, - Id: photo.ID.String(), + ChildId: child.Id, + Id: photoMetadata.ID.String(), // 修正: GCSから取得した写真のIDではなく、メタデータのIDを使用 + PhotoData: photo_data, }) } } @@ -240,6 +277,7 @@ func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildLi } children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { + // Guardianの先のNurseryまで取得 return tx.Child.Query(). Where(childRepo.HasChildBusAssociationsWith(childBusAssociationRepo.BusIDEQ(busID))). WithGuardian(), nil @@ -250,6 +288,10 @@ func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildLi return nil, err } + nursery := i.entClient.Nursery.Query(). + Where(nurseryRepo.HasBusesWith(busRepo.ID(busID))). + OnlyX(ctx) + // 子供の写真を取得 var photos []*pb.ChildPhoto for _, child := range children { @@ -262,9 +304,16 @@ func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildLi } for _, photo := range photoRecordList { + photo_data, err := i.getPhotoFromGCS(ctx, nursery.ID.String(), child.Id, photo.ID.String()) + if err != nil { + i.logger.Error("failed to get photo from GCS", "error", err) + return nil, err + } + photos = append(photos, &pb.ChildPhoto{ - ChildId: child.Id, - Id: photo.ID.String(), + ChildId: child.Id, + Id: photo.ID.String(), + PhotoData: photo_data, }) } } @@ -309,6 +358,21 @@ func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) ( return pbChildren, nil } +func (i *Interactor) getPhotoFromGCS(ctx context.Context, nurseryID, childID, photoID string) ([]byte, error) { + // Cloud Storage上の写真のパスを生成 + objectName := fmt.Sprintf("%s/%s/raw/%s.png", nurseryID, childID, photoID) + + // 指定したバケット内のオブジェクトを取得 + rc, err := i.StorageClient.Bucket(i.BucketName).Object(objectName).NewReader(ctx) + if err != nil { + return nil, err + } + defer rc.Close() + + // バイトデータを読み込む + return io.ReadAll(rc) +} + // uploadPhotoToGCS は写真をGCPのCloud Storageにアップロードします。 func (i *Interactor) uploadPhotoToGCS(ctx context.Context, nurseryID, childID, photoID string, photo []byte) error { // Cloud Storage上の写真のパスを生成 From e10b7a0541f18eeb8e44bb298d7620637a52551e Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 18 Feb 2024 18:23:40 +0900 Subject: [PATCH 454/771] =?UTF-8?q?feat:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E3=81=A7=E4=BF=9D=E8=AD=B7=E8=80=85=E3=81=AE=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=82=92=E5=8F=96=E5=BE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_detail_sheet.dart | 75 +++++++++++++++---- .../student_list_page/student_edit_page.dart | 10 +++ .../get_guardians_list_by_child_id.dart | 13 ++++ .../lib/util/api/guardians.dart | 16 +++- 4 files changed, 96 insertions(+), 18 deletions(-) create mode 100644 frontend/where_child_bus/lib/service/get_guardians_list_by_child_id.dart diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart index 4bd33d5e..59ccf8ba 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart @@ -1,5 +1,7 @@ +import "dart:developer" as developer; import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; +import 'package:where_child_bus/service/get_guardians_list_by_child_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class StudentDetailSheet extends StatefulWidget { @@ -12,6 +14,41 @@ class StudentDetailSheet extends StatefulWidget { } class _StudentDetailSheetState extends State { + late GuardianResponse guardian; + bool _isLoading = false; + bool _isFailLoading = false; + + @override + void initState() { + super.initState(); + _loadGuardian(); + } + + Future _loadGuardian() async { + setState(() { + _isLoading = true; + }); + + try { + var res = await getGuardianListByChildIdService(widget.child.id); + + if (mounted) { + setState(() { + guardian = res; + _isLoading = false; + }); + } + } catch (error) { + developer.log("Caught ErrorAAAAAA", error: error); + if (mounted) { + setState(() { + _isLoading = false; + _isFailLoading = true; + }); + } + } + } + @override Widget build(BuildContext context) { return Container( @@ -33,7 +70,10 @@ class _StudentDetailSheetState extends State { children: [ modalHeader(context), Container( - margin: const EdgeInsets.only(top: 20), child: childDetailList()) + margin: const EdgeInsets.only(top: 20), + child: _isLoading + ? const Center(child: CircularProgressIndicator()) + : childDetailList()) ], ); } @@ -78,19 +118,26 @@ class _StudentDetailSheetState extends State { } Widget childDetailList() { - // 詳細リストのデータを受け取る処理を将来的に実装 - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - childDetailItem("年齢", "${widget.child.age}歳"), - // childDetailItem("クラス", "1組"), - childDetailItem("保護者氏名", "保護者1"), - childDetailItem("保護者連絡先", "xxx-xxxx-xxxx"), - childDetailItem("利用バス", "○○コース"), - // childDetailItem("乗降場所", "○○駐車場前"), - ], - ); + if (_isLoading) { + return const Center( + child: CircularProgressIndicator(), + ); + } else if (_isLoading == false && _isFailLoading) { + return const Text("ロードに失敗しました"); + } else { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + childDetailItem("年齢", "${widget.child.age}歳"), + // childDetailItem("クラス", "1組"), + childDetailItem("保護者氏名", "${guardian.name}"), + childDetailItem("保護者連絡先", guardian.phoneNumber), + childDetailItem("利用バス", "○○コース"), + // childDetailItem("乗降場所", "○○駐車場前"), + ], + ); + } } Widget childDetailItem(String title, String element) { diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index 49ae4186..3e7bc846 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -1,5 +1,6 @@ import 'dart:io'; import 'package:flutter/material.dart'; +import 'package:where_child_bus/service/get_guardians_list_by_child_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'components/utils/input_form_body.dart'; @@ -13,9 +14,18 @@ class StudentEditPage extends StatefulWidget { } class _StudentEditPageState extends State { + List guardiansList = []; final List busName = ["バス1", "バス2", "バス3"]; final List busStop = ["停留所1", "停留所2", "停留所3"]; + @override + void initState() { + super.initState(); + _loadGuardians(); + } + + Future _loadGuardians() async {} + @override Widget build(BuildContext context) { return GestureDetector( diff --git a/frontend/where_child_bus/lib/service/get_guardians_list_by_child_id.dart b/frontend/where_child_bus/lib/service/get_guardians_list_by_child_id.dart new file mode 100644 index 00000000..798daa20 --- /dev/null +++ b/frontend/where_child_bus/lib/service/get_guardians_list_by_child_id.dart @@ -0,0 +1,13 @@ +import "dart:developer" as developer; +import "package:where_child_bus/util/api/guardians.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; + +Future getGuardianListByChildIdService(String childId) async { + try { + var res = await getGuardiansListByChildId(childId); + return res.guardian; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } +} diff --git a/frontend/where_child_bus/lib/util/api/guardians.dart b/frontend/where_child_bus/lib/util/api/guardians.dart index 948db8bb..4633a565 100644 --- a/frontend/where_child_bus/lib/util/api/guardians.dart +++ b/frontend/where_child_bus/lib/util/api/guardians.dart @@ -34,9 +34,17 @@ Future getGuardiansListByBusId( }); } -// Future getGuardianByChildId(String childId) async { -// return performGrpcCall((client) async { -// var req = GetGuardianByChildIdRequest(childId: childId); -// return client.getGuardianBuChild +Future getGuardiansListByChildId( + String childId) async { + return performGrpcCall((client) async { + var req = GetGuardianByChildIdRequest(childId: childId); + return client.getGuardianByChildId(req); + }); +} + +// Future<> getGuardiansListByNurseryId(String nurseryId) async { +// return performGrpcCall((client) async{ +// var req = getGuardiansListByNurseryId(nurseryId); +// return client. // }); // } From 4ddadd7cdb63b0d82c5e27fc529fe52e477faf67 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 18:32:18 +0900 Subject: [PATCH 455/771] feat: Implement GetGuardianListByNurseryId RPC --- backend/interfaces/guardian.go | 5 + .../go/where_child_bus/v1/guardian.pb.go | 291 +++++++++++++----- .../go/where_child_bus/v1/guardian_grpc.pb.go | 45 ++- backend/usecases/guardian/guardian.go | 41 +++ .../where_child_bus/v1/guardian.pb.dart | 94 ++++++ .../where_child_bus/v1/guardian.pbgrpc.dart | 20 ++ .../where_child_bus/v1/guardian.pbjson.dart | 26 ++ .../where_child_bus/v1/guardian_pb2.py | 10 +- .../where_child_bus/v1/guardian_pb2.pyi | 12 + .../where_child_bus/v1/guardian_pb2_grpc.py | 33 ++ proto/where_child_bus/v1/guardian.proto | 9 + 11 files changed, 505 insertions(+), 81 deletions(-) diff --git a/backend/interfaces/guardian.go b/backend/interfaces/guardian.go index e87d2a80..f5b962d0 100644 --- a/backend/interfaces/guardian.go +++ b/backend/interfaces/guardian.go @@ -33,4 +33,9 @@ func (s *guardianServiceServer) GetGuardianListByBusId(ctx context.Context, req // GetGuardianByChildId implements where_child_busv1.GuardianServiceServer. func (s *guardianServiceServer) GetGuardianByChildId(ctx context.Context, req *pb.GetGuardianByChildIdRequest) (*pb.GetGuardianByChildIdResponse, error) { return s.interactor.GetGuardianByChildID(ctx, req) +} + +// GetGuardianListByNurseryId implements where_child_busv1.GuardianServiceServer. +func (s *guardianServiceServer) GetGuardianListByNurseryId(ctx context.Context, req *pb.GetGuardianListByNurseryIdRequest) (*pb.GetGuardianListByNurseryIdResponse, error) { + return s.interactor.GetGuardianListByNurseryID(ctx, req) } \ No newline at end of file diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go index 89e51894..b86deeb0 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go @@ -452,6 +452,100 @@ func (x *GetGuardianByChildIdResponse) GetGuardian() *GuardianResponse { return nil } +type GetGuardianListByNurseryIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` +} + +func (x *GetGuardianListByNurseryIdRequest) Reset() { + *x = GetGuardianListByNurseryIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGuardianListByNurseryIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGuardianListByNurseryIdRequest) ProtoMessage() {} + +func (x *GetGuardianListByNurseryIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGuardianListByNurseryIdRequest.ProtoReflect.Descriptor instead. +func (*GetGuardianListByNurseryIdRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{8} +} + +func (x *GetGuardianListByNurseryIdRequest) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + +type GetGuardianListByNurseryIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Guardians []*GuardianResponse `protobuf:"bytes,1,rep,name=guardians,proto3" json:"guardians,omitempty"` +} + +func (x *GetGuardianListByNurseryIdResponse) Reset() { + *x = GetGuardianListByNurseryIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGuardianListByNurseryIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGuardianListByNurseryIdResponse) ProtoMessage() {} + +func (x *GetGuardianListByNurseryIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGuardianListByNurseryIdResponse.ProtoReflect.Descriptor instead. +func (*GetGuardianListByNurseryIdResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{9} +} + +func (x *GetGuardianListByNurseryIdResponse) GetGuardians() []*GuardianResponse { + if x != nil { + return x.Guardians + } + return nil +} + var File_where_child_bus_v1_guardian_proto protoreflect.FileDescriptor var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ @@ -512,52 +606,72 @@ var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x32, 0xdc, 0x03, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x29, 0x2e, 0x77, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x22, 0x42, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x68, 0x0a, 0x22, 0x47, 0x65, + 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x73, 0x32, 0xea, 0x04, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, - 0x73, 0x49, 0x64, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, - 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x14, 0x47, 0x65, - 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, + 0x64, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, + 0x12, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x49, 0x64, 0x12, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, - 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, - 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, - 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, - 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, + 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, + 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -572,38 +686,43 @@ func file_where_child_bus_v1_guardian_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_guardian_proto_rawDescData } -var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_where_child_bus_v1_guardian_proto_goTypes = []interface{}{ - (*CreateGuardianRequest)(nil), // 0: where_child_bus.v1.CreateGuardianRequest - (*CreateGuardianResponse)(nil), // 1: where_child_bus.v1.CreateGuardianResponse - (*GuardianLoginRequest)(nil), // 2: where_child_bus.v1.GuardianLoginRequest - (*GuardianLoginResponse)(nil), // 3: where_child_bus.v1.GuardianLoginResponse - (*GetGuardianListByBusIdRequest)(nil), // 4: where_child_bus.v1.GetGuardianListByBusIdRequest - (*GetGuardianListByBusIdResponse)(nil), // 5: where_child_bus.v1.GetGuardianListByBusIdResponse - (*GetGuardianByChildIdRequest)(nil), // 6: where_child_bus.v1.GetGuardianByChildIdRequest - (*GetGuardianByChildIdResponse)(nil), // 7: where_child_bus.v1.GetGuardianByChildIdResponse - (*GuardianResponse)(nil), // 8: where_child_bus.v1.GuardianResponse - (*NurseryResponse)(nil), // 9: where_child_bus.v1.NurseryResponse + (*CreateGuardianRequest)(nil), // 0: where_child_bus.v1.CreateGuardianRequest + (*CreateGuardianResponse)(nil), // 1: where_child_bus.v1.CreateGuardianResponse + (*GuardianLoginRequest)(nil), // 2: where_child_bus.v1.GuardianLoginRequest + (*GuardianLoginResponse)(nil), // 3: where_child_bus.v1.GuardianLoginResponse + (*GetGuardianListByBusIdRequest)(nil), // 4: where_child_bus.v1.GetGuardianListByBusIdRequest + (*GetGuardianListByBusIdResponse)(nil), // 5: where_child_bus.v1.GetGuardianListByBusIdResponse + (*GetGuardianByChildIdRequest)(nil), // 6: where_child_bus.v1.GetGuardianByChildIdRequest + (*GetGuardianByChildIdResponse)(nil), // 7: where_child_bus.v1.GetGuardianByChildIdResponse + (*GetGuardianListByNurseryIdRequest)(nil), // 8: where_child_bus.v1.GetGuardianListByNurseryIdRequest + (*GetGuardianListByNurseryIdResponse)(nil), // 9: where_child_bus.v1.GetGuardianListByNurseryIdResponse + (*GuardianResponse)(nil), // 10: where_child_bus.v1.GuardianResponse + (*NurseryResponse)(nil), // 11: where_child_bus.v1.NurseryResponse } var file_where_child_bus_v1_guardian_proto_depIdxs = []int32{ - 8, // 0: where_child_bus.v1.CreateGuardianResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 8, // 1: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 9, // 2: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 8, // 3: where_child_bus.v1.GetGuardianListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse - 8, // 4: where_child_bus.v1.GetGuardianByChildIdResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 0, // 5: where_child_bus.v1.GuardianService.CreateGuardian:input_type -> where_child_bus.v1.CreateGuardianRequest - 2, // 6: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest - 4, // 7: where_child_bus.v1.GuardianService.GetGuardianListByBusId:input_type -> where_child_bus.v1.GetGuardianListByBusIdRequest - 6, // 8: where_child_bus.v1.GuardianService.GetGuardianByChildId:input_type -> where_child_bus.v1.GetGuardianByChildIdRequest - 1, // 9: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse - 3, // 10: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse - 5, // 11: where_child_bus.v1.GuardianService.GetGuardianListByBusId:output_type -> where_child_bus.v1.GetGuardianListByBusIdResponse - 7, // 12: where_child_bus.v1.GuardianService.GetGuardianByChildId:output_type -> where_child_bus.v1.GetGuardianByChildIdResponse - 9, // [9:13] is the sub-list for method output_type - 5, // [5:9] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 10, // 0: where_child_bus.v1.CreateGuardianResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 10, // 1: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 11, // 2: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 10, // 3: where_child_bus.v1.GetGuardianListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 10, // 4: where_child_bus.v1.GetGuardianByChildIdResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 10, // 5: where_child_bus.v1.GetGuardianListByNurseryIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 0, // 6: where_child_bus.v1.GuardianService.CreateGuardian:input_type -> where_child_bus.v1.CreateGuardianRequest + 2, // 7: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest + 4, // 8: where_child_bus.v1.GuardianService.GetGuardianListByBusId:input_type -> where_child_bus.v1.GetGuardianListByBusIdRequest + 6, // 9: where_child_bus.v1.GuardianService.GetGuardianByChildId:input_type -> where_child_bus.v1.GetGuardianByChildIdRequest + 8, // 10: where_child_bus.v1.GuardianService.GetGuardianListByNurseryId:input_type -> where_child_bus.v1.GetGuardianListByNurseryIdRequest + 1, // 11: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse + 3, // 12: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse + 5, // 13: where_child_bus.v1.GuardianService.GetGuardianListByBusId:output_type -> where_child_bus.v1.GetGuardianListByBusIdResponse + 7, // 14: where_child_bus.v1.GuardianService.GetGuardianByChildId:output_type -> where_child_bus.v1.GetGuardianByChildIdResponse + 9, // 15: where_child_bus.v1.GuardianService.GetGuardianListByNurseryId:output_type -> where_child_bus.v1.GetGuardianListByNurseryIdResponse + 11, // [11:16] is the sub-list for method output_type + 6, // [6:11] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_where_child_bus_v1_guardian_proto_init() } @@ -709,6 +828,30 @@ func file_where_child_bus_v1_guardian_proto_init() { return nil } } + file_where_child_bus_v1_guardian_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGuardianListByNurseryIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_guardian_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGuardianListByNurseryIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -716,7 +859,7 @@ func file_where_child_bus_v1_guardian_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_guardian_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go index 1cc6616a..22ce80ab 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go @@ -19,10 +19,11 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - GuardianService_CreateGuardian_FullMethodName = "/where_child_bus.v1.GuardianService/CreateGuardian" - GuardianService_GuardianLogin_FullMethodName = "/where_child_bus.v1.GuardianService/GuardianLogin" - GuardianService_GetGuardianListByBusId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianListByBusId" - GuardianService_GetGuardianByChildId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianByChildId" + GuardianService_CreateGuardian_FullMethodName = "/where_child_bus.v1.GuardianService/CreateGuardian" + GuardianService_GuardianLogin_FullMethodName = "/where_child_bus.v1.GuardianService/GuardianLogin" + GuardianService_GetGuardianListByBusId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianListByBusId" + GuardianService_GetGuardianByChildId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianByChildId" + GuardianService_GetGuardianListByNurseryId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId" ) // GuardianServiceClient is the client API for GuardianService service. @@ -33,6 +34,7 @@ type GuardianServiceClient interface { GuardianLogin(ctx context.Context, in *GuardianLoginRequest, opts ...grpc.CallOption) (*GuardianLoginResponse, error) GetGuardianListByBusId(ctx context.Context, in *GetGuardianListByBusIdRequest, opts ...grpc.CallOption) (*GetGuardianListByBusIdResponse, error) GetGuardianByChildId(ctx context.Context, in *GetGuardianByChildIdRequest, opts ...grpc.CallOption) (*GetGuardianByChildIdResponse, error) + GetGuardianListByNurseryId(ctx context.Context, in *GetGuardianListByNurseryIdRequest, opts ...grpc.CallOption) (*GetGuardianListByNurseryIdResponse, error) } type guardianServiceClient struct { @@ -79,6 +81,15 @@ func (c *guardianServiceClient) GetGuardianByChildId(ctx context.Context, in *Ge return out, nil } +func (c *guardianServiceClient) GetGuardianListByNurseryId(ctx context.Context, in *GetGuardianListByNurseryIdRequest, opts ...grpc.CallOption) (*GetGuardianListByNurseryIdResponse, error) { + out := new(GetGuardianListByNurseryIdResponse) + err := c.cc.Invoke(ctx, GuardianService_GetGuardianListByNurseryId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // GuardianServiceServer is the server API for GuardianService service. // All implementations should embed UnimplementedGuardianServiceServer // for forward compatibility @@ -87,6 +98,7 @@ type GuardianServiceServer interface { GuardianLogin(context.Context, *GuardianLoginRequest) (*GuardianLoginResponse, error) GetGuardianListByBusId(context.Context, *GetGuardianListByBusIdRequest) (*GetGuardianListByBusIdResponse, error) GetGuardianByChildId(context.Context, *GetGuardianByChildIdRequest) (*GetGuardianByChildIdResponse, error) + GetGuardianListByNurseryId(context.Context, *GetGuardianListByNurseryIdRequest) (*GetGuardianListByNurseryIdResponse, error) } // UnimplementedGuardianServiceServer should be embedded to have forward compatible implementations. @@ -105,6 +117,9 @@ func (UnimplementedGuardianServiceServer) GetGuardianListByBusId(context.Context func (UnimplementedGuardianServiceServer) GetGuardianByChildId(context.Context, *GetGuardianByChildIdRequest) (*GetGuardianByChildIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGuardianByChildId not implemented") } +func (UnimplementedGuardianServiceServer) GetGuardianListByNurseryId(context.Context, *GetGuardianListByNurseryIdRequest) (*GetGuardianListByNurseryIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGuardianListByNurseryId not implemented") +} // UnsafeGuardianServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GuardianServiceServer will @@ -189,6 +204,24 @@ func _GuardianService_GetGuardianByChildId_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } +func _GuardianService_GetGuardianListByNurseryId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGuardianListByNurseryIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuardianServiceServer).GetGuardianListByNurseryId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GuardianService_GetGuardianListByNurseryId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuardianServiceServer).GetGuardianListByNurseryId(ctx, req.(*GetGuardianListByNurseryIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + // GuardianService_ServiceDesc is the grpc.ServiceDesc for GuardianService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -212,6 +245,10 @@ var GuardianService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetGuardianByChildId", Handler: _GuardianService_GetGuardianByChildId_Handler, }, + { + MethodName: "GetGuardianListByNurseryId", + Handler: _GuardianService_GetGuardianListByNurseryId_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/guardian.proto", diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 46a2373b..39502d7d 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -207,3 +207,44 @@ func (i *Interactor) GetGuardianByChildID(ctx context.Context, req *pb.GetGuardi pbGuardian := utils.ToPbGuardianResponse(guardians) return &pb.GetGuardianByChildIdResponse{Guardian: pbGuardian}, nil } + +func (i *Interactor) GetGuardianListByNurseryID(ctx context.Context, req *pb.GetGuardianListByNurseryIdRequest) (*pb.GetGuardianListByNurseryIdResponse, error) { + nurseryID, err := uuid.Parse(req.NurseryId) + if err != nil { + i.logger.Error("failed to parse nursery ID", "error", err) + return nil, err + } + + // トランザクションを開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + i.logger.Error("failed to start transaction", "error", err) + return nil, err + } + + defer utils.RollbackTx(tx, i.logger) + + // Guardianを取得 + guardians, err := tx.Guardian.Query(). + Where(guardianRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID))). + WithNursery(). + All(ctx) + + if err != nil { + i.logger.Error("failed to get guardians by nursery ID", "error", err) + return nil, err + } + + // トランザクションをコミット + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + + var pbGuardians []*pb.GuardianResponse + for _, guardian := range guardians { + pbGuardians = append(pbGuardians, utils.ToPbGuardianResponse(guardian)) + } + + return &pb.GetGuardianListByNurseryIdResponse{Guardians: pbGuardians}, nil +} diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 22e29f12..4785e75f 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -515,6 +515,100 @@ class GetGuardianByChildIdResponse extends $pb.GeneratedMessage { $8.GuardianResponse ensureGuardian() => $_ensure(0); } +class GetGuardianListByNurseryIdRequest extends $pb.GeneratedMessage { + factory GetGuardianListByNurseryIdRequest({ + $core.String? nurseryId, + }) { + final $result = create(); + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } + return $result; + } + GetGuardianListByNurseryIdRequest._() : super(); + factory GetGuardianListByNurseryIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianListByNurseryIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByNurseryIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'nurseryId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdRequest clone() => GetGuardianListByNurseryIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdRequest copyWith(void Function(GetGuardianListByNurseryIdRequest) updates) => super.copyWith((message) => updates(message as GetGuardianListByNurseryIdRequest)) as GetGuardianListByNurseryIdRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetGuardianListByNurseryIdRequest create() => GetGuardianListByNurseryIdRequest._(); + GetGuardianListByNurseryIdRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetGuardianListByNurseryIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianListByNurseryIdRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get nurseryId => $_getSZ(0); + @$pb.TagNumber(1) + set nurseryId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNurseryId() => $_has(0); + @$pb.TagNumber(1) + void clearNurseryId() => clearField(1); +} + +class GetGuardianListByNurseryIdResponse extends $pb.GeneratedMessage { + factory GetGuardianListByNurseryIdResponse({ + $core.Iterable<$8.GuardianResponse>? guardians, + }) { + final $result = create(); + if (guardians != null) { + $result.guardians.addAll(guardians); + } + return $result; + } + GetGuardianListByNurseryIdResponse._() : super(); + factory GetGuardianListByNurseryIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianListByNurseryIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByNurseryIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdResponse clone() => GetGuardianListByNurseryIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdResponse copyWith(void Function(GetGuardianListByNurseryIdResponse) updates) => super.copyWith((message) => updates(message as GetGuardianListByNurseryIdResponse)) as GetGuardianListByNurseryIdResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetGuardianListByNurseryIdResponse create() => GetGuardianListByNurseryIdResponse._(); + GetGuardianListByNurseryIdResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetGuardianListByNurseryIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianListByNurseryIdResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$8.GuardianResponse> get guardians => $_getList(0); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart index 3f5464ea..14bf2ff9 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart @@ -37,6 +37,10 @@ class GuardianServiceClient extends $grpc.Client { '/where_child_bus.v1.GuardianService/GetGuardianByChildId', ($3.GetGuardianByChildIdRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $3.GetGuardianByChildIdResponse.fromBuffer(value)); + static final _$getGuardianListByNurseryId = $grpc.ClientMethod<$3.GetGuardianListByNurseryIdRequest, $3.GetGuardianListByNurseryIdResponse>( + '/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId', + ($3.GetGuardianListByNurseryIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.GetGuardianListByNurseryIdResponse.fromBuffer(value)); GuardianServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -59,6 +63,10 @@ class GuardianServiceClient extends $grpc.Client { $grpc.ResponseFuture<$3.GetGuardianByChildIdResponse> getGuardianByChildId($3.GetGuardianByChildIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getGuardianByChildId, request, options: options); } + + $grpc.ResponseFuture<$3.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId($3.GetGuardianListByNurseryIdRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getGuardianListByNurseryId, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.GuardianService') @@ -94,6 +102,13 @@ abstract class GuardianServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $3.GetGuardianByChildIdRequest.fromBuffer(value), ($3.GetGuardianByChildIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$3.GetGuardianListByNurseryIdRequest, $3.GetGuardianListByNurseryIdResponse>( + 'GetGuardianListByNurseryId', + getGuardianListByNurseryId_Pre, + false, + false, + ($core.List<$core.int> value) => $3.GetGuardianListByNurseryIdRequest.fromBuffer(value), + ($3.GetGuardianListByNurseryIdResponse value) => value.writeToBuffer())); } $async.Future<$3.CreateGuardianResponse> createGuardian_Pre($grpc.ServiceCall call, $async.Future<$3.CreateGuardianRequest> request) async { @@ -112,8 +127,13 @@ abstract class GuardianServiceBase extends $grpc.Service { return getGuardianByChildId(call, await request); } + $async.Future<$3.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId_Pre($grpc.ServiceCall call, $async.Future<$3.GetGuardianListByNurseryIdRequest> request) async { + return getGuardianListByNurseryId(call, await request); + } + $async.Future<$3.CreateGuardianResponse> createGuardian($grpc.ServiceCall call, $3.CreateGuardianRequest request); $async.Future<$3.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $3.GuardianLoginRequest request); $async.Future<$3.GetGuardianListByBusIdResponse> getGuardianListByBusId($grpc.ServiceCall call, $3.GetGuardianListByBusIdRequest request); $async.Future<$3.GetGuardianByChildIdResponse> getGuardianByChildId($grpc.ServiceCall call, $3.GetGuardianByChildIdRequest request); + $async.Future<$3.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId($grpc.ServiceCall call, $3.GetGuardianListByNurseryIdRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart index b3788c9c..ede2bf70 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -126,3 +126,29 @@ final $typed_data.Uint8List getGuardianByChildIdResponseDescriptor = $convert.ba 'ChxHZXRHdWFyZGlhbkJ5Q2hpbGRJZFJlc3BvbnNlEkAKCGd1YXJkaWFuGAEgASgLMiQud2hlcm' 'VfY2hpbGRfYnVzLnYxLkd1YXJkaWFuUmVzcG9uc2VSCGd1YXJkaWFu'); +@$core.Deprecated('Use getGuardianListByNurseryIdRequestDescriptor instead') +const GetGuardianListByNurseryIdRequest$json = { + '1': 'GetGuardianListByNurseryIdRequest', + '2': [ + {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, + ], +}; + +/// Descriptor for `GetGuardianListByNurseryIdRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getGuardianListByNurseryIdRequestDescriptor = $convert.base64Decode( + 'CiFHZXRHdWFyZGlhbkxpc3RCeU51cnNlcnlJZFJlcXVlc3QSHQoKbnVyc2VyeV9pZBgBIAEoCV' + 'IJbnVyc2VyeUlk'); + +@$core.Deprecated('Use getGuardianListByNurseryIdResponseDescriptor instead') +const GetGuardianListByNurseryIdResponse$json = { + '1': 'GetGuardianListByNurseryIdResponse', + '2': [ + {'1': 'guardians', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.GuardianResponse', '10': 'guardians'}, + ], +}; + +/// Descriptor for `GetGuardianListByNurseryIdResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getGuardianListByNurseryIdResponseDescriptor = $convert.base64Decode( + 'CiJHZXRHdWFyZGlhbkxpc3RCeU51cnNlcnlJZFJlc3BvbnNlEkIKCWd1YXJkaWFucxgBIAMoCz' + 'IkLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhblJlc3BvbnNlUglndWFyZGlhbnM='); + diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py index 27edb57d..587538d5 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian2\xdc\x03\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponse\x12y\n\x14GetGuardianByChildId\x12/.where_child_bus.v1.GetGuardianByChildIdRequest\x1a\x30.where_child_bus.v1.GetGuardianByChildIdResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"B\n!GetGuardianListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"h\n\"GetGuardianListByNurseryIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians2\xea\x04\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponse\x12y\n\x14GetGuardianByChildId\x12/.where_child_bus.v1.GetGuardianByChildIdRequest\x1a\x30.where_child_bus.v1.GetGuardianByChildIdResponse\x12\x8b\x01\n\x1aGetGuardianListByNurseryId\x12\x35.where_child_bus.v1.GetGuardianListByNurseryIdRequest\x1a\x36.where_child_bus.v1.GetGuardianListByNurseryIdResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -39,6 +39,10 @@ _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_end=820 _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_start=822 _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_end=918 - _globals['_GUARDIANSERVICE']._serialized_start=921 - _globals['_GUARDIANSERVICE']._serialized_end=1397 + _globals['_GETGUARDIANLISTBYNURSERYIDREQUEST']._serialized_start=920 + _globals['_GETGUARDIANLISTBYNURSERYIDREQUEST']._serialized_end=986 + _globals['_GETGUARDIANLISTBYNURSERYIDRESPONSE']._serialized_start=988 + _globals['_GETGUARDIANLISTBYNURSERYIDRESPONSE']._serialized_end=1092 + _globals['_GUARDIANSERVICE']._serialized_start=1095 + _globals['_GUARDIANSERVICE']._serialized_end=1713 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi index 9cde550c..29a256e1 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi @@ -67,3 +67,15 @@ class GetGuardianByChildIdResponse(_message.Message): GUARDIAN_FIELD_NUMBER: _ClassVar[int] guardian: _resources_pb2.GuardianResponse def __init__(self, guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ...) -> None: ... + +class GetGuardianListByNurseryIdRequest(_message.Message): + __slots__ = ("nursery_id",) + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] + nursery_id: str + def __init__(self, nursery_id: _Optional[str] = ...) -> None: ... + +class GetGuardianListByNurseryIdResponse(_message.Message): + __slots__ = ("guardians",) + GUARDIANS_FIELD_NUMBER: _ClassVar[int] + guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] + def __init__(self, guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py index b39d0402..311d95dc 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py @@ -34,6 +34,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.FromString, ) + self.GetGuardianListByNurseryId = channel.unary_unary( + '/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.FromString, + ) class GuardianServiceServicer(object): @@ -63,6 +68,12 @@ def GetGuardianByChildId(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetGuardianListByNurseryId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_GuardianServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -86,6 +97,11 @@ def add_GuardianServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.SerializeToString, ), + 'GetGuardianListByNurseryId': grpc.unary_unary_rpc_method_handler( + servicer.GetGuardianListByNurseryId, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.GuardianService', rpc_method_handlers) @@ -163,3 +179,20 @@ def GetGuardianByChildId(request, where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetGuardianListByNurseryId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId', + where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.SerializeToString, + where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/guardian.proto b/proto/where_child_bus/v1/guardian.proto index 164fd6da..f4f0e61c 100644 --- a/proto/where_child_bus/v1/guardian.proto +++ b/proto/where_child_bus/v1/guardian.proto @@ -9,6 +9,7 @@ service GuardianService { rpc GuardianLogin(GuardianLoginRequest) returns (GuardianLoginResponse); rpc GetGuardianListByBusId(GetGuardianListByBusIdRequest) returns (GetGuardianListByBusIdResponse); rpc GetGuardianByChildId(GetGuardianByChildIdRequest) returns (GetGuardianByChildIdResponse); + rpc GetGuardianListByNurseryId(GetGuardianListByNurseryIdRequest) returns (GetGuardianListByNurseryIdResponse); } message CreateGuardianRequest { @@ -49,3 +50,11 @@ message GetGuardianByChildIdRequest { message GetGuardianByChildIdResponse { GuardianResponse guardian = 1; } + +message GetGuardianListByNurseryIdRequest { + string nursery_id = 1; +} + +message GetGuardianListByNurseryIdResponse { + repeated GuardianResponse guardians = 1; +} \ No newline at end of file From 211a1f02d912cfdd45a471ede83d730ff25d7f3c Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 18:32:21 +0900 Subject: [PATCH 456/771] =?UTF-8?q?feat(ml):=20=E7=94=BB=E5=83=8F=E3=82=92?= =?UTF-8?q?GCS=E3=81=8B=E3=82=89=E8=AA=AD=E3=81=BF=E8=BE=BC=E3=82=81?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=AE=9F=E8=A3=85=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/faceDetectDataset.py | 141 +++++++++++------- .../src/face_detect_model/util.py | 90 +++++++++++ 2 files changed, 179 insertions(+), 52 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index ea80de9b..fa4505f0 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -1,68 +1,105 @@ -import torch -from torchvision import transforms import os -import cv2 + +import torch from PIL import Image +from torchvision import transforms + +from face_detect_model.util import ( + init_client, + get_bucket, + get_blobs, + load_image_from_remote, +) +# TODO: GCSに関する処理を別ファイルに切り出す + + +# 画像の読み込みを切り出す +# (child_id, image)のタプルを返す class FaceDetectDataset(torch.utils.data.Dataset): - VALID_EXTENSIONS = {".png"} - def __init__(self, config, transform=None): - self.data_dir = config["dataset"]["root_path"] + def __init__(self, args, config, client): + self.args = args + self.config = config + default_transform = self.get_default_transforms() + + bucket_name = os.environ.get("BUCKET_NAME") + bucket = get_bucket(client, bucket_name) + self.face_data = [] self.label_name_dict = {} - name_label_dict = {} + self.name_label_dict = {} self.label_num = 0 - for file_name in os.listdir(self.data_dir): - if not self._is_valid_file(file_name): - continue - - file_path = os.path.join(self.data_dir, file_name) - people_name = file_name.split("-")[0] - - image = cv2.imread(file_path) - if image is None: - continue - image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # BGRからRGBに変換 - - if people_name not in name_label_dict: - self.label_name_dict[self.label_num] = people_name - name_label_dict[people_name] = self.label_num - self.label_num += 1 - - label = torch.tensor(name_label_dict[people_name], dtype=torch.int64) - image_pil = Image.fromarray(image) - - self.face_data.append((label, default_transform(image_pil))) - - augmented_images = self.augment_image(image_pil, num_variations=100) + label_image_list = [] + for child_id in args.child_ids: + SOURCE_BLOB_NAME = f"{args.nursery_id}/{child_id}/clipped/" + + blobs = get_blobs(bucket, SOURCE_BLOB_NAME) + label_image_list.extend(load_image_from_remote(blobs)) + + for label, image in label_image_list: + if label not in self.name_label_dict: + self._add_label(label) + + label_tensor = self._convert_label_to_tensor(label) + image_pil = self._convert_image_to_pil(image) + + self.face_data.append((label_tensor, default_transform(image_pil))) + + augmented_images = self.augment_image( + image_pil, + num_variations=self.config["dataset"]["augmentation"]["num_variations"], + ) for aug_img in augmented_images: - self.face_data.append((label, aug_img)) + self.face_data.append((label_tensor, aug_img)) + + def _convert_label_to_tensor(self, label: str): + return torch.tensor(self.name_label_dict[label], dtype=torch.int64) + + def _convert_image_to_pil(self, image): + return Image.fromarray(image) + + def _add_label(self, label: str): + self.label_name_dict[self.label_num] = label + self.name_label_dict[label] = self.label_num + self.label_num += 1 def get_default_transforms(self): - return transforms.Compose([ - transforms.ToTensor(), - transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), - ]) - - def get_augment_transform(self): - return transforms.Compose([ - transforms.RandomApply([transforms.Resize((256, 256))], p=0.5), - transforms.RandomCrop((100, 100)), - transforms.RandomHorizontalFlip(p=0.5), - transforms.RandomVerticalFlip(p=0.5), - transforms.RandomApply([transforms.RandomRotation(degrees=180)], p=0.5), - transforms.RandomApply([transforms.RandomAffine(degrees=0, translate=(0.1, 0.1), scale=(0.8, 1.2))], p=0.5), - transforms.RandomApply([transforms.ColorJitter(brightness=0.2, contrast=0.2, saturation=0.2, hue=0.1)], p=0.5), - transforms.ToTensor(), - transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), - ]) + return transforms.Compose( + [ + transforms.ToTensor(), + transforms.Normalize( + mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225] + ), + ] + ) + def get_augment_transform(self): + return transforms.Compose( + [ + transforms.RandomCrop((100, 100)), + transforms.RandomHorizontalFlip(p=0.5), + transforms.RandomVerticalFlip(p=0.5), + transforms.RandomApply([transforms.RandomRotation(degrees=180)], p=0.5), + transforms.RandomApply( + [ + transforms.RandomAffine( + degrees=0, translate=(0.1, 0.1), scale=(0.8, 1.2) + ) + ], + p=0.5, + ), + transforms.ToTensor(), + transforms.Normalize( + mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225] + ), + ] + ) def augment_image(self, image, num_variations=100): - # ランダムな変換を適用するための拡張設定を強化 + # ランダムな変換を適用するための拡張設定を強化 transformations = self.get_augment_transform() augmented_images = [] for _ in range(num_variations): @@ -70,9 +107,6 @@ def augment_image(self, image, num_variations=100): augmented_images.append(augmented_image) return augmented_images - def _is_valid_file(self, file_name): - return os.path.splitext(file_name)[1].lower() in self.VALID_EXTENSIONS - def __len__(self): return len(self.face_data) @@ -84,3 +118,6 @@ def get_label_name_dict(self): def get_label_num(self): return self.label_num + + def get_image_shape(self): + return self.face_data[0][1].shape diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index 6e73254f..c66f446d 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -1,7 +1,14 @@ import logging +import re import random import torch +import google.cloud.storage as gcs +from google.cloud.storage import Bucket +import os +import numpy as np + +import cv2 logging.basicConfig( format="%(asctime)s - %(levelname)s - %(name)s - PID: %(process)d - %(message)s", @@ -16,3 +23,86 @@ def set_seed(seed): torch.manual_seed(seed) torch.cuda.manual_seed(seed) torch.cuda.manual_seed_all(seed) + + +def init_client(): + # NOTE: gcloud auth application-default loginにて事前に認証 + PROJECT_ID = os.environ.get("PROJECT_ID") + + client = gcs.Client(PROJECT_ID) + if client is None: + logger.error("Failed to initialize client.") + exit(1) + else: + return client + + +def get_bucket(client: gcs.Client, bucket_name: str): + bucket = client.bucket(bucket_name) + + if bucket.exists(): + return bucket + else: + raise ValueError(f"Failed to {bucket_name} does not exist.") + + +def get_blobs(bucket: Bucket, blob_name: str): + # blobsの中身に対するエラーハンドリング + try: + blobs = list(bucket.list_blobs(prefix=blob_name)) + if len(blobs) == 0: # 最初の要素がない場合、イテレータは空 + raise ValueError(f"No blobs found with prefix '{blob_name}' in the bucket.") + else: + return blobs + except Exception as e: + raise ValueError(f"Failed to get blobs from '{blob_name}' due to an error: {e}") + + +def get_child_id(blob_name: str): + # UUIDの正規表現パターン + uuid_pattern = r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + + # 正規表現でUUIDを検索 + uuids = re.findall(uuid_pattern, blob_name) + + # 目的のUUIDを取得(2番目に現れるUUID) + child_id = uuids[1] if len(uuids) > 1 else None + return child_id + + +def load_image_from_remote(blobs: list): + images = [] + for blob in blobs: + logger.info(f"loading: {blob.name}") + if _is_valid_file(blob.name) is False: + logger.info(f"skip: {blob.name}") + continue + + # バイトデータから numpy 配列を作成 + image_data = blob.download_as_string() + image_array = np.frombuffer(image_data, dtype=np.uint8) + + # cv2.imdecode でバイト配列を画像に変換 + image = cv2.imdecode(image_array, cv2.IMREAD_COLOR) + image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # BGRからRGBに変換 + if image is None: + logger.error(f"Can not load: {blob.name}") + continue + child_id = get_child_id(blob.name) + images.append((child_id, image)) + return images + + +def _is_valid_file(file_name): + VALID_EXTENSIONS = {".png"} + return os.path.splitext(file_name)[1].lower() in VALID_EXTENSIONS + + +def save_model_to_gcs( + bucket: Bucket, upload_model_path: str, model_instance: torch.nn.Module +): + logger.info(f"Saving model to {upload_model_path}") + blob = bucket.blob(upload_model_path) + with blob.open("wb", ignore_flush=True) as f: + torch.save(model_instance.state_dict(), f) + logger.info(f"Model saved to {upload_model_path}") From ccb2dd96720031e6971afde31ea3873bd3722f92 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 18:33:16 +0900 Subject: [PATCH 457/771] =?UTF-8?q?chore(ml):=20TODO=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../face_detect_model/DetectFaceAndClip/detectFaceAndClip.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index 9a936288..32efeb1c 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -24,6 +24,8 @@ ) logger = logging.getLogger(__name__) +# TODO: GCSに関する処理を別ファイルに切り出す + def load_image(args: argparse.Namespace, blobs=None): """画像の読み込みを行うラッパー関数""" From 1160454beefa2c370d1b4012c2e64cb1570145bd Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 18:34:00 +0900 Subject: [PATCH 458/771] =?UTF-8?q?feat(ml):num=5Fvariations=E3=82=92confi?= =?UTF-8?q?g.yaml=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/config.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index 548e842f..790f70df 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -15,17 +15,18 @@ face_detect: min_size: { width: 50, height: 50 } clip_size: { width: 100, height: 100 } dataset: - root_path: "src/face_detect_model/data/detect_img" + augmentation: + num_variations: 10 ratio: train: 0.7 valid: 0.1 test: 0.2 train: - epoch: 100 + epoch: 3 learning_rate: 0.001 train_batch_size: 1 valid_batch_size: 1 test_batch_size: 1 - validate_interval: 10 + validate_interval: 3 save_model_dir: "src/face_detect_model/pickle/mock_model/" test_model_path: "src/face_detect_model/pickle/mock_model/best_model.pth" From 961a896ce886ced79a4566bf79f307ab368d13f6 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 18:36:39 +0900 Subject: [PATCH 459/771] =?UTF-8?q?chore(ml):=20import=20path=E3=81=AE?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/main.py | 56 +++++++++++++------ 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index e892fa7e..6c6ffa8d 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -2,19 +2,25 @@ import argparse import torch -from data.faceDetectDataset import FaceDetectDataset -from model.faceDetectModel import FaceDetectModel -from trainer import Trainer -from util import logger +from face_detect_model.data.faceDetectDataset import FaceDetectDataset +from face_detect_model.model.faceDetectModel import FaceDetectModel +from face_detect_model.trainer import Trainer +from face_detect_model.util import logger, init_client +from dotenv import load_dotenv +load_dotenv("secrets/.env") -def main(args: argparse.Namespace, config: dict): + +def TrainAndTest(args: argparse.Namespace, config: dict): args.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") - logger.info("Your env is : {args.device}") + logger.info(f"Your env is : {args.device}") + + logger.info("client Initializing") + client = init_client() # datasetの読み込み logger.info("dataset Initializing") - dataset = FaceDetectDataset(config) + dataset = FaceDetectDataset(args, config, client) train_data_size = int(len(dataset) * config["dataset"]["ratio"]["train"]) valid_data_size = int(len(dataset) * config["dataset"]["ratio"]["valid"]) @@ -33,12 +39,20 @@ def main(args: argparse.Namespace, config: dict): logger.info("model Initializing") num_classes = dataset.get_label_num() image_shape = dataset.get_image_shape() - face_detect_model = FaceDetectModel(config, num_classes, image_shape) + face_detect_model = FaceDetectModel( + config, num_classes=num_classes, input_dim=image_shape + ) face_detect_model.to(args.device) # trainerの読み込み trainer = Trainer( - args, config, face_detect_model, train_dataset, valid_dataset, test_dataset + args, + config, + client, + face_detect_model, + train_dataset, + valid_dataset, + test_dataset, ) if args.mode == "train": # 学習 @@ -53,17 +67,25 @@ def main(args: argparse.Namespace, config: dict): raise ValueError("invalid mode") +def main(args: argparse.Namespace): + with open("src/face_detect_model/config.yaml", "r") as f: + config = yaml.safe_load(f) + + TrainAndTest(args, config) + + if __name__ == "__main__": parser = argparse.ArgumentParser() + parser.add_argument("--mode", type=str, choices=["train", "test"], default="train") + parser.add_argument("--nursery_id", type=str) parser.add_argument( - "--config", type=str, default="src/face_detect_model/config.yaml" + "--child_ids", + type=str, + nargs="*", ) - parser.add_argument("--mode", type=str, required=True, choices=["train", "test"]) - parser.add_argument("--debug", action="store_true") - parser.add_argument("--seed", type=int, default=42) - args = parser.parse_args() + parser.add_argument("--bus_id", type=str) + parser.add_argument("--bus_type", type=str) - with open(args.config, "r") as f: - config = yaml.safe_load(f) + args = parser.parse_args() - main(args, config) + main(args) From 6029802e487f6239c7dae6374a82098cc9a1fd99 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 18:38:52 +0900 Subject: [PATCH 460/771] =?UTF-8?q?chore(ml):=20debug=E7=94=A8=E3=81=AEshe?= =?UTF-8?q?ll=20file=E3=82=92=E6=A0=BC=E7=B4=8D=E3=81=97=E3=81=A6=E3=81=8A?= =?UTF-8?q?=E3=81=8Fdebug=5Fsh=5Ffiles=E3=82=92gitignore=E3=81=AB=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machine_learning/.gitignore b/machine_learning/.gitignore index c7a4b1ee..2728105a 100644 --- a/machine_learning/.gitignore +++ b/machine_learning/.gitignore @@ -8,6 +8,8 @@ src/face_detect_model/pickle/* src/face_detect_model/DetectFaceAndClip/img src/face_detect_model/DetectFaceAndClip/detce_img +debug_sh_files/ + ### macOS ### # General .DS_Store From a0216c8e96f8e3403887afcad6d703b4c83db249 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 18:40:51 +0900 Subject: [PATCH 461/771] =?UTF-8?q?feat(ml):=20=E3=83=A2=E3=83=87=E3=83=AB?= =?UTF-8?q?=E3=82=92GCS=E3=81=AB=E4=BF=9D=E5=AD=98=E3=83=BBimport=20path?= =?UTF-8?q?=E3=81=AE=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/trainer.py | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/machine_learning/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py index d025461d..18d9ba4f 100644 --- a/machine_learning/src/face_detect_model/trainer.py +++ b/machine_learning/src/face_detect_model/trainer.py @@ -2,10 +2,11 @@ import torch import torch.nn as nn import argparse +import google.cloud.storage as gcs -from data.faceDetectDataset import FaceDetectDataset -from model.faceDetectModel import FaceDetectModel -from util import logger +from face_detect_model.data.faceDetectDataset import FaceDetectDataset +from face_detect_model.model.faceDetectModel import FaceDetectModel +from face_detect_model.util import logger, init_client, get_bucket, save_model_to_gcs class Trainer: @@ -13,6 +14,7 @@ def __init__( self, args: argparse.Namespace, config: dict, + client: gcs.Client, model: FaceDetectModel, train_dataset: FaceDetectDataset, valid_dataset: FaceDetectDataset, @@ -54,9 +56,16 @@ def __init__( shuffle=False, ) - self.save_model_dir = config["train"]["save_model_dir"] - if not os.path.exists(self.save_model_dir): - os.makedirs(self.save_model_dir) + self.bucket = get_bucket( + client, + os.environ.get("BUCKET_NAME_FOR_MODEL"), + ) + logger.info("Bucket is ready") + + # XXX: local用の保存先 + # self.save_model_dir = config["train"]["save_model_dir"] + # if not os.path.exists(self.save_model_dir): + # os.makedirs(self.save_model_dir) def train(self): logger.info("Start Training") @@ -67,12 +76,14 @@ def train(self): self.end_epoch() if self.epoch % self.config["train"]["validate_interval"] == 0: - self.save_model( - self.save_model_dir + f"model_epoch_{self.epoch}.pth", - ) self.validate() self.test() + save_model_to_gcs( + bucket=self.bucket, + upload_model_path=f"{self.args.nursery_id}/{self.args.bus_id}/{self.args.bus_type}.pth", + model_instance=self.model, + ) def step(self, label: torch.Tensor, image: torch.Tensor): self.optimizer.zero_grad() @@ -91,7 +102,8 @@ def end_epoch(self): if self.last_loss < self.best_loss: self.best_loss = self.last_loss - self.save_model(self.save_model_dir + "best_model.pth") + # XXX: local用の保存先 + # self.save_model(self.save_model_dir + "best_model.pth") self.epoch += 1 self.step_num = 1 @@ -113,10 +125,6 @@ def validate(self): logger.info(f"########## Epoch {self.epoch} ##########") logger.info(f"Validation Accuracy: {accuracy}") - if self.args.debug: - print(f"Collect: {collect_list}") - print(f"Predict: {pred_list}") - def test(self): self.model.eval() collect_list = [] @@ -134,9 +142,6 @@ def test(self): accuracy = self.calc_accuracy(pred_list, collect_list) logger.info("########## Test ##########") logger.info(f"Test Accuracy: {accuracy}") - if self.args.debug: - print(f"Collect: {collect_list}") - print(f"Predict: {pred_list}") def calc_accuracy(self, pred_list, collect_list): pred = torch.cat(pred_list) From c0055f0840ec288b957a7a0b33610577cf375742 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 18:41:33 +0900 Subject: [PATCH 462/771] =?UTF-8?q?feat(ml):=20refrection=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=83=BB=E3=83=A2=E3=83=87=E3=83=AB=E3=83=88?= =?UTF-8?q?=E3=83=AC=E3=83=BC=E3=83=8B=E3=83=B3=E3=82=B0=E7=94=A8=E3=81=AE?= =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=81=AE=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/machine_learning/v1/server.py | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index eb20db6a..af1ca3da 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -4,18 +4,23 @@ from concurrent import futures import grpc +from grpc_reflection.v1alpha import reflection import health_check_pb2 import health_check_pb2_grpc import machine_learning_pb2 import machine_learning_pb2_grpc + import logging -import os from concurrent import futures -import grpc -from face_detect_model.DetectFaceAndClip.detectFaceAndClip import main +from face_detect_model.DetectFaceAndClip.detectFaceAndClip import ( + main as detect_face_and_clip_fn, +) +from face_detect_model.main import ( + main as train_fn, +) class HealthCheckServiceServer( @@ -37,7 +42,25 @@ def Predict(self, request: machine_learning_pb2.PredRequest, context): # TODO: implement Train def Train(self, request: machine_learning_pb2.TrainRequest, context): - pass + parser = argparse.ArgumentParser() + args = parser.parse_args() + + args.nursery_id = request.nursery_id + args.child_ids = request.child_ids + args.bus_id = request.bus_id + args.bus_type = request.bus_type + args.seed = 42 + args.mode = "train" + # mainメソッドを別スレッドで実行 + try: + thread = threading.Thread(target=train_fn, args=(args,)) + thread.start() + is_started = True + except Exception as e: + logging.error(e) + is_started = False + + return machine_learning_pb2.TrainResponse(is_started=is_started) def FaceDetectAndClip( self, @@ -52,7 +75,7 @@ def FaceDetectAndClip( args.env = "remote" # mainメソッドを別スレッドで実行 try: - thread = threading.Thread(target=main, args=(args,)) + thread = threading.Thread(target=detect_face_and_clip_fn, args=(args,)) thread.start() is_started = True except Exception as e: @@ -63,7 +86,7 @@ def FaceDetectAndClip( def serve(): - bind_address = f"[::]:8080" + bind_address = "[::]:8080" server = grpc.server(futures.ThreadPoolExecutor()) health_check_pb2_grpc.add_HealthcheckServiceServicer_to_server( HealthCheckServiceServer(), server @@ -71,6 +94,15 @@ def serve(): machine_learning_pb2_grpc.add_MachineLearningServiceServicer_to_server( MachineLearningServiceServicer(), server ) + service_names = ( + health_check_pb2.DESCRIPTOR.services_by_name["HealthcheckService"].full_name, + machine_learning_pb2.DESCRIPTOR.services_by_name[ + "MachineLearningService" + ].full_name, + reflection.SERVICE_NAME, + ) + reflection.enable_server_reflection(service_names, server) + server.add_insecure_port(bind_address) server.start() logging.info("Listening on %s.", bind_address) From 5b3dc82b20a76fe7864ac685001dcf295a95e3b0 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 18:49:50 +0900 Subject: [PATCH 463/771] refactor(ml): change config --- machine_learning/src/face_detect_model/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index 790f70df..f31778a2 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -18,9 +18,9 @@ dataset: augmentation: num_variations: 10 ratio: - train: 0.7 + train: 0.8 valid: 0.1 - test: 0.2 + test: 0.1 train: epoch: 3 learning_rate: 0.001 From c7640923c521274d21a0ab59c78d76356ae79e99 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 19:05:11 +0900 Subject: [PATCH 464/771] =?UTF-8?q?refactor(ml):=20=E5=88=A9=E7=94=A8?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84import=E3=81=AE?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py index 18d9ba4f..ce168fe0 100644 --- a/machine_learning/src/face_detect_model/trainer.py +++ b/machine_learning/src/face_detect_model/trainer.py @@ -6,7 +6,7 @@ from face_detect_model.data.faceDetectDataset import FaceDetectDataset from face_detect_model.model.faceDetectModel import FaceDetectModel -from face_detect_model.util import logger, init_client, get_bucket, save_model_to_gcs +from face_detect_model.util import logger, get_bucket, save_model_to_gcs class Trainer: From e6f5ac089ffa521b464b59465eed6bacf27c0f87 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 19:38:47 +0900 Subject: [PATCH 465/771] refactor(ml): remove TODO --- machine_learning/src/proto-gen/machine_learning/v1/server.py | 1 - 1 file changed, 1 deletion(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index af1ca3da..b1dcc51a 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -40,7 +40,6 @@ class MachineLearningServiceServicer( def Predict(self, request: machine_learning_pb2.PredRequest, context): pass - # TODO: implement Train def Train(self, request: machine_learning_pb2.TrainRequest, context): parser = argparse.ArgumentParser() args = parser.parse_args() From 7cd2742eb3aeb2569b0146ab573d8cb6c8dc9b41 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 19:48:33 +0900 Subject: [PATCH 466/771] =?UTF-8?q?fix:=20go=20mod=20download=E3=81=AE?= =?UTF-8?q?=E9=87=8D=E8=A4=87=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 63a1694e..fb8a4a15 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -24,8 +24,6 @@ RUN echo "DSN=$DSN" > .env \ RUN go mod download -RUN go mod download - ARG VERS="3.11.4" ARG ARCH="linux-x86_64" From 8d745a7a784142b7bd21662a3962bed2747f0685 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 18 Feb 2024 19:58:30 +0900 Subject: [PATCH 467/771] =?UTF-8?q?feat:=E5=AD=90=E4=BE=9B=E3=81=AE?= =?UTF-8?q?=E5=86=99=E7=9C=9F=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=82=92=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/child_list/child_list.dart | 4 +- .../child_list/child_list_with_button.dart | 7 +- .../child_list/child_list_with_mark.dart | 22 ++-- .../element/child_list_element.dart | 19 ++-- .../child_list_element_with_button.dart | 24 +++-- .../element/child_list_element_with_mark.dart | 10 +- .../lib/components/util/image_from_byte.dart | 18 +++- .../bus_child_manage_page.dart | 35 +++--- .../bus_passenger_page.dart | 8 +- .../components/utils/input_form_body.dart | 102 +++++++++++++++--- .../student_list_page/student_edit_page.dart | 2 - .../student_list_page/student_list_page.dart | 2 +- .../service/get_child_list_by_nursery_id.dart | 1 - .../get_guardian_list_by_nursery_id.dart | 8 ++ .../where_child_bus/lib/util/api/child.dart | 5 +- .../lib/util/api/guardians.dart | 13 +-- 16 files changed, 196 insertions(+), 84 deletions(-) create mode 100644 frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart diff --git a/frontend/where_child_bus/lib/components/child_list/child_list.dart b/frontend/where_child_bus/lib/components/child_list/child_list.dart index 6d99222c..c6d33026 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list.dart @@ -5,7 +5,7 @@ import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.da class ChildList extends StatefulWidget { final List children; - final List images; + final List images; final VoidCallback? callback; const ChildList({ @@ -35,7 +35,7 @@ class _ChildListState extends State { return ChildListElement( title: widget.children[index].name, subtitle: widget.children[index].id, - imagePath: "assets/images/face_${widget.images[index]}.png", + image: widget.images[index], onTap: () { if (widget.callback == null) { childDetailModal(index); diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart b/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart index 3a5d3d07..5215145e 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart @@ -1,12 +1,13 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/element/child_list_element_with_button.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; enum ButtonIconType { add, remove } class ChildListWithButton extends StatefulWidget { final List childNames; final List groupNames; - final List images; + final List images; final List buttonIconTypes; // 各アイテムのボタンアイコンタイプ final VoidCallback? callback; @@ -28,7 +29,8 @@ class _ChildListWithButtonState extends State { Widget build(BuildContext context) { return ListView.separated( itemCount: widget.childNames.length, - separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), + separatorBuilder: (BuildContext context, int index) => + const Divider(height: 20, color: Colors.transparent), itemBuilder: (BuildContext context, int index) { // ChildListElementWithButtonに必要な情報を渡す return ChildListElementWithButton( @@ -49,4 +51,3 @@ class _ChildListWithButtonState extends State { ); } } - diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart b/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart index d16937a0..97c3b399 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart @@ -1,10 +1,11 @@ import "package:flutter/material.dart"; import "package:where_child_bus/components/child_list/element/child_list_element_with_mark.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; class ChildListWithMark extends StatefulWidget { final List childNames; final List groupNames; - final List images; + final List images; final VoidCallback? callback; const ChildListWithMark({ @@ -24,19 +25,20 @@ class _ChildListWithMarkState extends State { Widget build(BuildContext context) { return ListView.separated( itemCount: widget.childNames.length, - separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), - itemBuilder: (BuildContext context, int index) => childListElement(context, index), + separatorBuilder: (BuildContext context, int index) => + const Divider(height: 20, color: Colors.transparent), + itemBuilder: (BuildContext context, int index) => + childListElement(context, index), ); } Widget childListElement(BuildContext context, int index) { return ChildListElementWithMark( - title: widget.childNames[index], - subtitle: widget.groupNames[index], - imagePath: "assets/images/face_${widget.images[index]}.png", - onTap: () { + title: widget.childNames[index], + subtitle: widget.groupNames[index], + image: widget.images[index], + onTap: () { widget.callback!(); - } - ); + }); } -} \ No newline at end of file +} diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart index d924a39f..8a1802ae 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart @@ -1,19 +1,21 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/util/image_from_byte.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class ChildListElement extends StatelessWidget { final String title; final String subtitle; - final String imagePath; + final ChildPhoto image; final VoidCallback? onTap; - final Widget? actionButton; + final Widget? actionButton; const ChildListElement({ Key? key, required this.title, required this.subtitle, - required this.imagePath, + required this.image, this.onTap, - this.actionButton, + this.actionButton, }) : super(key: key); @override @@ -30,7 +32,8 @@ class ChildListElement extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: Row( children: [ - Image.asset(imagePath, width: 100, height: 100), + ImageFromBytes( + imageData: image.photoData, height: 100, width: 100), const SizedBox(width: 16), Expanded( child: titleAndSubTitle(title, subtitle), @@ -57,10 +60,8 @@ class ChildListElement extends StatelessWidget { } Text titleText(String title) { - return Text( - title, - style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold) - ); + return Text(title, + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)); } Text subTitleText(String subtitle) { diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart index cf18820a..60a47119 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/child_list_with_button.dart'; import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; - +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class ChildListElementWithButton extends StatefulWidget { final String childName; final String groupName; - final String image; + final ChildPhoto image; final VoidCallback? onTap; final VoidCallback? onButtonTap; final ButtonIconType buttonIconType; @@ -22,10 +22,12 @@ class ChildListElementWithButton extends StatefulWidget { }) : super(key: key); @override - _ChildListElementWithButtonState createState() => _ChildListElementWithButtonState(); + _ChildListElementWithButtonState createState() => + _ChildListElementWithButtonState(); } -class _ChildListElementWithButtonState extends State { +class _ChildListElementWithButtonState + extends State { ButtonIconType? currentButtonType; @override @@ -43,7 +45,7 @@ class _ChildListElementWithButtonState extends State ChildListElement( title: widget.childName, subtitle: widget.groupName, - imagePath: "assets/images/face_${widget.image}.png", + image: widget.image, onTap: widget.onTap, ), Positioned( @@ -51,9 +53,13 @@ class _ChildListElementWithButtonState extends State bottom: 2, child: IconButton( icon: Icon( - currentButtonType == ButtonIconType.add ? Icons.add : Icons.remove, + currentButtonType == ButtonIconType.add + ? Icons.add + : Icons.remove, // アイコンの色を動的に変更 - color: currentButtonType == ButtonIconType.add ? Colors.green : Colors.red, + color: currentButtonType == ButtonIconType.add + ? Colors.green + : Colors.red, size: 50.0, // アイコンサイズの指定もここで行う ), onPressed: () { @@ -62,7 +68,9 @@ class _ChildListElementWithButtonState extends State } // アイコンタイプの切り替え setState(() { - currentButtonType = currentButtonType == ButtonIconType.add ? ButtonIconType.remove : ButtonIconType.add; + currentButtonType = currentButtonType == ButtonIconType.add + ? ButtonIconType.remove + : ButtonIconType.add; }); }, // IconButton自体の色指定は不要になるため削除 diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart index 6eb0ef26..f9398878 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart @@ -1,22 +1,24 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class ChildListElementWithMark extends StatefulWidget { final String title; final String subtitle; - final String imagePath; + final ChildPhoto image; final VoidCallback? onTap; const ChildListElementWithMark({ Key? key, required this.title, required this.subtitle, - required this.imagePath, + required this.image, this.onTap, }) : super(key: key); @override - _ChildListElementWithMarkState createState() => _ChildListElementWithMarkState(); + _ChildListElementWithMarkState createState() => + _ChildListElementWithMarkState(); } class _ChildListElementWithMarkState extends State { @@ -27,7 +29,7 @@ class _ChildListElementWithMarkState extends State { return ChildListElement( title: widget.title, subtitle: widget.subtitle, - imagePath: widget.imagePath, + image: widget.image, onTap: widget.onTap, actionButton: Padding( padding: const EdgeInsets.only(left: 16), // マークと他の要素との間隔を調整 diff --git a/frontend/where_child_bus/lib/components/util/image_from_byte.dart b/frontend/where_child_bus/lib/components/util/image_from_byte.dart index 106065ab..98af072a 100644 --- a/frontend/where_child_bus/lib/components/util/image_from_byte.dart +++ b/frontend/where_child_bus/lib/components/util/image_from_byte.dart @@ -2,12 +2,24 @@ import 'package:flutter/material.dart'; import 'dart:typed_data'; // Uint8Listを使用するために必要 class ImageFromBytes extends StatelessWidget { - final Uint8List imageData; + final List imageData; + final int height; + final int width; - const ImageFromBytes({Key? key, required this.imageData}) : super(key: key); + const ImageFromBytes( + {Key? key, + required this.imageData, + required this.height, + required this.width}) + : super(key: key); @override Widget build(BuildContext context) { - return Image.memory(imageData); + // int配列をUint8Listに変換 + final Uint8List bytes = Uint8List.fromList(imageData); + return SizedBox( + height: height.toDouble(), + width: width.toDouble(), + child: Image.memory(bytes)); } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart index eb65ac5d..97a33fb4 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart @@ -36,28 +36,29 @@ class _BusChildManagePageState extends State { return Scaffold( appBar: AppBar( title: const Text("子供の管理"), - backgroundColor: Colors.white, + backgroundColor: Colors.white, ), body: pageBody(), ); } Widget pageBody() { - // ChildListWithButton ウィジェットを使用してリストを表示 - return ChildListWithButton( - childNames: name, - groupNames: group, - images: image, - callback: () { - // ここでリストアイテムがタップされたときの動作を定義 - print("リストアイテムがタップされました"); - }, - buttonIconTypes: List.generate(name.length, (index) { - // ここで条件に基づいてアイコンタイプを決定するロジックを追加できる - // 例として、すべてのアイテムに対して 'add' アイコンを設定 - return ButtonIconType.add; - }), - ); -} + // ChildListWithButton ウィジェットを使用してリストを表示 + // return ChildListWithButton( + // childNames: name, + // groupNames: group, + // images: image, + // callback: () { + // // ここでリストアイテムがタップされたときの動作を定義 + // print("リストアイテムがタップされました"); + // }, + // buttonIconTypes: List.generate(name.length, (index) { + // // ここで条件に基づいてアイコンタイプを決定するロジックを追加できる + // // 例として、すべてのアイテムに対して 'add' アイコンを設定 + // return ButtonIconType.add; + // }), + // ); + return Container(); + } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart index 4227ac6f..3742f7db 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart @@ -33,7 +33,7 @@ class _BusPassengerPage extends State { Widget build(BuildContext context) { return Scaffold( appBar: pageAppBar(), - body:pageBody(), + body: pageBody(), ); } @@ -45,6 +45,8 @@ class _BusPassengerPage extends State { Widget pageBody() { //TODO:将来的にはChildのリストを渡す - return ChildListWithMark(childNames: widget.name, groupNames: widget.group, images: widget.image); + // return ChildListWithMark(childNames: widget.name, groupNames: widget.group, images: widget.image); + + return Container(); } -} \ No newline at end of file +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index 23adc2b6..a5c4f095 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -1,6 +1,11 @@ +import 'dart:developer' as developer; import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; +import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; +import 'package:where_child_bus/service/get_guardian_list_by_nursery_id.dart'; +import 'package:where_child_bus/util/nursery_data.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'input_value_label.dart'; import 'text_input_field.dart'; import 'select_value_box.dart'; @@ -10,22 +15,70 @@ class InputFormBody extends StatefulWidget { final List busName; final List busStop; - const InputFormBody( - {required this.busName, required this.busStop, super.key}); + const InputFormBody({required this.busName, required this.busStop, Key? key}) + : super(key: key); @override - State createState() => _InputFormBody(); + State createState() => _InputFormBodyState(); } -class _InputFormBody extends State { +class _InputFormBodyState extends State { + late Future _loadDataFuture; // 非同期処理の結果を保持する変数 + List guardians = []; + List buses = []; List? images; final picker = ImagePicker(); + @override + void initState() { + super.initState(); + // initState内で非同期処理をトリガーし、結果を変数に格納 + _loadDataFuture = _loadBusesAndGuardians(); + } + + Future _loadBusesAndGuardians() async { + try { + await _loadGuardians(); + await _loadBuses(); + } catch (error) { + developer.log("Caught Error", error: error.toString()); + } + } + + Future _loadGuardians() async { + try { + var res = await getGuardianListByNurseryIdService( + NurseryData().getNursery().id); + setState(() { + guardians = res; + }); + } catch (error) { + developer.log("Caught Error", error: error.toString()); + setState(() { + guardians = []; + }); + } + } + + Future _loadBuses() async { + try { + var res = await getBusList(NurseryData().getNursery().id); + setState(() { + buses = res; + }); + } catch (error) { + developer.log("Caught Error", error: error.toString()); + setState(() { + buses = []; + }); + } + } + Future getImageFromGallery() async { final pickedFiles = await picker.pickMultiImage(); setState(() { - if (pickedFiles != null && pickedFiles.isNotEmpty) { + if (pickedFiles.isNotEmpty) { images = pickedFiles.map((xFile) => File(xFile.path)).toList(); } else { print("画像が選択できませんでした。"); @@ -36,12 +89,28 @@ class _InputFormBody extends State { @override Widget build(BuildContext context) { return Center( - child: ListView( - children: [ - selectChildImage(), - editFormBody(context), - ], - )); + child: ListView( + children: [ + selectChildImage(), + FutureBuilder( + future: _loadDataFuture, // 修正: 非同期処理の結果を格納した変数を使用 + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const Padding( + padding: EdgeInsets.all(16), + child: Center(child: CircularProgressIndicator()), + ); + } else if (snapshot.hasError) { + return const Text("保護者情報の読み込みに失敗しました。"); + } else { + // 非同期処理が完了し、データがある場合 + return editFormBody(context); + } + }, + ), + ], + ), + ); } Widget selectChildImage() { @@ -69,16 +138,21 @@ class _InputFormBody extends State { ); } - Widget editFormBody(BuildContext context) { + Widget editFormBody( + BuildContext context, + ) { return Column( children: [ inputLabelAndTextField( context, "園児氏名", "園児氏名を入力してください", TextInputType.name), inputLabelAndTextField( context, "年齢", "年齢を入力してください", TextInputType.number), - inputLabelAndSelectBox(context, "保護者", widget.busName), + inputLabelAndSelectBox( + context, + "保護者", + guardians.map((guardian) => guardian.name).toList(), + ), inputLabelAndSelectBox(context, "利用バス", widget.busName), - inputLabelAndSelectBox(context, "乗降場所", widget.busStop), Container( margin: const EdgeInsets.only(top: 20.0), width: MediaQuery.of(context).size.width * 0.6, diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index 3e7bc846..0ba06f81 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -1,6 +1,4 @@ -import 'dart:io'; import 'package:flutter/material.dart'; -import 'package:where_child_bus/service/get_guardians_list_by_child_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'components/utils/input_form_body.dart'; diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 02129cc1..696cb49c 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -90,7 +90,7 @@ class _ChildListPageState extends State { child: Text('Failed to load children.'), ); } else { - return ChildList(children: children, images: image); + return ChildList(children: children, images: photos); } } } diff --git a/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart b/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart index 4191ad59..a498ae75 100644 --- a/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart +++ b/frontend/where_child_bus/lib/service/get_child_list_by_nursery_id.dart @@ -1,6 +1,5 @@ import 'package:where_child_bus/util/api/child.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; Future getChildListByNurseryIdService( String nurseryId) async { diff --git a/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart b/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart new file mode 100644 index 00000000..2521624b --- /dev/null +++ b/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart @@ -0,0 +1,8 @@ +import 'package:where_child_bus/util/api/guardians.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +Future> getGuardianListByNurseryIdService( + String nurseryId) async { + var res = await getGuardiansListByNurseryId(nurseryId); + return res.guardians; +} diff --git a/frontend/where_child_bus/lib/util/api/child.dart b/frontend/where_child_bus/lib/util/api/child.dart index a8960d8d..36f31c17 100644 --- a/frontend/where_child_bus/lib/util/api/child.dart +++ b/frontend/where_child_bus/lib/util/api/child.dart @@ -12,11 +12,14 @@ Future performGrpcCall( port: appConfig.grpcPort, ); final grpcClient = ChildServiceClient(channel); + final Stopwatch stopwatch = new Stopwatch()..start(); try { final result = await grpcCall(grpcClient); + stopwatch.stop(); + if (kDebugMode) { - developer.log("レスポンス: $result"); + developer.log("レスポンスが返ってきました: ${stopwatch.elapsedMilliseconds}ms"); } return result; } catch (error) { diff --git a/frontend/where_child_bus/lib/util/api/guardians.dart b/frontend/where_child_bus/lib/util/api/guardians.dart index 4633a565..65d303c4 100644 --- a/frontend/where_child_bus/lib/util/api/guardians.dart +++ b/frontend/where_child_bus/lib/util/api/guardians.dart @@ -42,9 +42,10 @@ Future getGuardiansListByChildId( }); } -// Future<> getGuardiansListByNurseryId(String nurseryId) async { -// return performGrpcCall((client) async{ -// var req = getGuardiansListByNurseryId(nurseryId); -// return client. -// }); -// } +Future getGuardiansListByNurseryId( + String nurseryId) async { + return performGrpcCall((client) async { + var req = GetGuardianListByNurseryIdRequest(nurseryId: nurseryId); + return client.getGuardianListByNurseryId(req); + }); +} From d8082964c766a7e52150c4e43ed2850f5dea3c27 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 20:24:01 +0900 Subject: [PATCH 468/771] refactor(ml) --- .../DetectFaceAndClip/detectFaceAndClip.py | 45 ++----------------- .../DetectFaceAndClip/detectFaceUtil.py | 1 - .../data/faceDetectDataset.py | 5 +-- .../src/face_detect_model/gcp_util.py | 35 +++++++++++++++ .../src/face_detect_model/main.py | 3 +- .../src/face_detect_model/pred.py | 4 ++ .../src/face_detect_model/trainer.py | 3 +- .../src/face_detect_model/util.py | 34 -------------- .../proto-gen/machine_learning/v1/server.py | 23 ++++++++-- 9 files changed, 69 insertions(+), 84 deletions(-) create mode 100644 machine_learning/src/face_detect_model/gcp_util.py create mode 100644 machine_learning/src/face_detect_model/pred.py diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index 32efeb1c..3a1cdc76 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -15,6 +15,8 @@ load_cascade, ) +from face_detect_model.gcp_util import get_bucket, get_blobs, init_client + load_dotenv("secrets/.env") logging.basicConfig( @@ -76,46 +78,6 @@ def init_save_dir(save_dir_path: str): os.remove(file_path) -def init_client(): - # NOTE: gcloud auth application-default loginにて事前に認証 - credential = os.environ.get("GOOGLE_APPLICATION_CREDENTIALS") - PROJECT_ID = os.environ.get("PROJECT_ID") - - client = gcs.Client(PROJECT_ID, credentials=credential) - if client is None: - logger.error("Failed to initialize client.") - exit(1) - else: - return client - - -def get_bucket(client: gcs.Client): - # NOTE: 環境変数からバケット名を取得 - BUCKET_NAME = os.environ.get("BUCKET_NAME") - bucket = client.bucket(BUCKET_NAME) - - if bucket.exists(): - return bucket - else: - logger.error(f"Failed to {BUCKET_NAME} does not exist.") - exit(1) - - -def get_blobs(bucket: Bucket, blob_name: str): - blobs = list(bucket.list_blobs(prefix=blob_name)) - - # blobsの中身に対するエラーハンドリング - try: - if len(blobs) == 0: # 最初の要素がない場合、イテレータは空 - logger.error(f"No blobs found with prefix '{blob_name}' in the bucket.") - exit(1) - else: - return blobs - except Exception as e: - logger.error(f"Failed to get blobs from '{blob_name}' due to an error: {e}") - exit(1) - - def save_face_image_to_local(face: np.ndarray, save_dir: str, save_file_name: str): """クリップされた顔画像を保存する""" os.makedirs(save_dir, exist_ok=True) @@ -156,7 +118,8 @@ def detect_face_and_clip(args: argparse.Namespace, config: dict): # GCSとの接続 if args.env == "remote": client = init_client() - bucket = get_bucket(client) + BUCKET_NAME = os.environ.get("BUCKET_NAME") + bucket = get_bucket(client, BUCKET_NAME) # Haar Cascadeの読み込み face_cascade = load_cascade(face_cascade_path) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceUtil.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceUtil.py index 00726dc4..a013be42 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceUtil.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceUtil.py @@ -1,5 +1,4 @@ import cv2 -import os def load_cascade(cascade_path): diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index fa4505f0..86c79865 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -5,12 +5,11 @@ from torchvision import transforms from face_detect_model.util import ( - init_client, - get_bucket, - get_blobs, load_image_from_remote, ) +from face_detect_model.gcp_util import get_bucket, get_blobs + # TODO: GCSに関する処理を別ファイルに切り出す diff --git a/machine_learning/src/face_detect_model/gcp_util.py b/machine_learning/src/face_detect_model/gcp_util.py new file mode 100644 index 00000000..2b2457cd --- /dev/null +++ b/machine_learning/src/face_detect_model/gcp_util.py @@ -0,0 +1,35 @@ +import google.cloud.storage as gcs +from google.cloud.storage import Bucket +import os + + +def init_client(): + # NOTE: gcloud auth application-default loginにて事前に認証 + PROJECT_ID = os.environ.get("PROJECT_ID") + + client = gcs.Client(PROJECT_ID) + if client is None: + raise RuntimeError("Failed to initialize client.") + else: + return client + + +def get_bucket(client: gcs.Client, bucket_name: str): + bucket = client.bucket(bucket_name) + + if bucket.exists(): + return bucket + else: + raise ValueError(f"Failed to {bucket_name} does not exist.") + + +def get_blobs(bucket: Bucket, blob_name: str): + # blobsの中身に対するエラーハンドリング + try: + blobs = list(bucket.list_blobs(prefix=blob_name)) + if len(blobs) == 0: # 最初の要素がない場合、イテレータは空 + raise ValueError(f"No blobs found with prefix '{blob_name}' in the bucket.") + else: + return blobs + except Exception as e: + raise ValueError(f"Failed to get blobs from '{blob_name}' due to an error: {e}") diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index 6c6ffa8d..4ec467bd 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -5,7 +5,8 @@ from face_detect_model.data.faceDetectDataset import FaceDetectDataset from face_detect_model.model.faceDetectModel import FaceDetectModel from face_detect_model.trainer import Trainer -from face_detect_model.util import logger, init_client +from face_detect_model.util import logger +from face_detect_model.gcp_util import init_client from dotenv import load_dotenv load_dotenv("secrets/.env") diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py new file mode 100644 index 00000000..843d3f1a --- /dev/null +++ b/machine_learning/src/face_detect_model/pred.py @@ -0,0 +1,4 @@ +def main(): + gray = cv2.cvtColor(captureBuffer, cv2.COLOR_BGR2GRAY) + pred_child_ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + return pred_child_ids diff --git a/machine_learning/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py index ce168fe0..bfea625e 100644 --- a/machine_learning/src/face_detect_model/trainer.py +++ b/machine_learning/src/face_detect_model/trainer.py @@ -6,7 +6,8 @@ from face_detect_model.data.faceDetectDataset import FaceDetectDataset from face_detect_model.model.faceDetectModel import FaceDetectModel -from face_detect_model.util import logger, get_bucket, save_model_to_gcs +from face_detect_model.util import logger, save_model_to_gcs +from face_detect_model.gcp_util import get_bucket class Trainer: diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index c66f446d..ca1c3fab 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -3,7 +3,6 @@ import random import torch -import google.cloud.storage as gcs from google.cloud.storage import Bucket import os import numpy as np @@ -25,39 +24,6 @@ def set_seed(seed): torch.cuda.manual_seed_all(seed) -def init_client(): - # NOTE: gcloud auth application-default loginにて事前に認証 - PROJECT_ID = os.environ.get("PROJECT_ID") - - client = gcs.Client(PROJECT_ID) - if client is None: - logger.error("Failed to initialize client.") - exit(1) - else: - return client - - -def get_bucket(client: gcs.Client, bucket_name: str): - bucket = client.bucket(bucket_name) - - if bucket.exists(): - return bucket - else: - raise ValueError(f"Failed to {bucket_name} does not exist.") - - -def get_blobs(bucket: Bucket, blob_name: str): - # blobsの中身に対するエラーハンドリング - try: - blobs = list(bucket.list_blobs(prefix=blob_name)) - if len(blobs) == 0: # 最初の要素がない場合、イテレータは空 - raise ValueError(f"No blobs found with prefix '{blob_name}' in the bucket.") - else: - return blobs - except Exception as e: - raise ValueError(f"Failed to get blobs from '{blob_name}' due to an error: {e}") - - def get_child_id(blob_name: str): # UUIDの正規表現パターン uuid_pattern = r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index af1ca3da..0fd61bc8 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -21,6 +21,9 @@ from face_detect_model.main import ( main as train_fn, ) +from face_detect_model.pred import ( + main as pred_fn, +) class HealthCheckServiceServer( @@ -37,10 +40,24 @@ class MachineLearningServiceServicer( machine_learning_pb2_grpc.MachineLearningServiceServicer ): # TODO: implement Predict - def Predict(self, request: machine_learning_pb2.PredRequest, context): - pass + def Predict(self, request_iterator: machine_learning_pb2.PredRequest, context): + for req in request_iterator: + parser = argparse.ArgumentParser() + args = parser.parse_args() + + args.bus_id = req.bus_id + args.bus_type = req.bus_type + args.video_type = req.video_type + args.video_chunk = req.video_chunk + args.timestamp = req.timestamp + + try: + child_ids = pred_fn(args) + except Exception as e: + logging.error(e) + child_ids = [] + yield machine_learning_pb2.PredResponse(child_ids=child_ids) - # TODO: implement Train def Train(self, request: machine_learning_pb2.TrainRequest, context): parser = argparse.ArgumentParser() args = parser.parse_args() From df1806da4373b22e484b220213ee0779df84d9b4 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 20:34:13 +0900 Subject: [PATCH 469/771] =?UTF-8?q?feat:=20=E8=A9=A6=E9=A8=93=E7=9A=84?= =?UTF-8?q?=E3=81=AB=E5=86=99=E7=9C=9F=E9=80=81=E4=BF=A1=E3=82=B5=E3=83=BC?= =?UTF-8?q?=E3=83=93=E3=82=B9=E3=82=92=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC?= =?UTF-8?q?=E3=83=9F=E3=83=B3=E3=82=B0=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/child.go | 10 +- .../go/where_child_bus/v1/child.pb.go | 158 +++++++++--------- .../go/where_child_bus/v1/child_grpc.pb.go | 84 ++++++---- backend/usecases/child/child.go | 40 +++-- backend/usecases/utils/utils.go | 10 ++ .../where_child_bus/v1/child.pb.dart | 36 ++-- .../where_child_bus/v1/child.pbgrpc.dart | 12 +- .../where_child_bus/v1/child.pbjson.dart | 10 +- .../proto-gen/where_child_bus/v1/child_pb2.py | 24 +-- .../where_child_bus/v1/child_pb2.pyi | 12 +- .../where_child_bus/v1/child_pb2_grpc.py | 6 +- proto/where_child_bus/v1/child.proto | 6 +- 12 files changed, 230 insertions(+), 178 deletions(-) diff --git a/backend/interfaces/child.go b/backend/interfaces/child.go index db7b6d3d..c3601488 100644 --- a/backend/interfaces/child.go +++ b/backend/interfaces/child.go @@ -11,6 +11,11 @@ type childServiceServer struct { interactor *child.Interactor } +// GetChildListByNurseryID implements where_child_busv1.ChildServiceServer. +func (s *childServiceServer) GetChildListByNurseryID(req *pb.GetChildListByNurseryIDRequest, stream pb.ChildService_GetChildListByNurseryIDServer) error { + return s.interactor.GetChildListByNurseryID(req, stream) +} + func NewChildServiceServer(interactor *child.Interactor) pb.ChildServiceServer { return &childServiceServer{interactor} } @@ -29,8 +34,3 @@ func (s *childServiceServer) CreateChild(ctx context.Context, req *pb.CreateChil func (s *childServiceServer) GetChildListByGuardianID(ctx context.Context, req *pb.GetChildListByGuardianIDRequest) (*pb.GetChildListByGuardianIDResponse, error) { return s.interactor.GetChildListByGuardianID(ctx, req) } - -// GetChildListByNurseryID implements where_child_busv1.ChildServiceServer. -func (s *childServiceServer) GetChildListByNurseryID(ctx context.Context, req *pb.GetChildListByNurseryIDRequest) (*pb.GetChildListByNurseryIDResponse, error) { - return s.interactor.GetChildListByNurseryID(ctx, req) -} diff --git a/backend/proto-gen/go/where_child_bus/v1/child.pb.go b/backend/proto-gen/go/where_child_bus/v1/child.pb.go index e55c313f..3e01e78b 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child.pb.go @@ -206,8 +206,8 @@ type GetChildListByNurseryIDResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` - Photos []*ChildPhoto `protobuf:"bytes,2,rep,name=photos,proto3" json:"photos,omitempty"` + Child *Child `protobuf:"bytes,1,opt,name=child,proto3" json:"child,omitempty"` + Photo *ChildPhoto `protobuf:"bytes,2,opt,name=photo,proto3" json:"photo,omitempty"` } func (x *GetChildListByNurseryIDResponse) Reset() { @@ -242,16 +242,16 @@ func (*GetChildListByNurseryIDResponse) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{3} } -func (x *GetChildListByNurseryIDResponse) GetChildren() []*Child { +func (x *GetChildListByNurseryIDResponse) GetChild() *Child { if x != nil { - return x.Children + return x.Child } return nil } -func (x *GetChildListByNurseryIDResponse) GetPhotos() []*ChildPhoto { +func (x *GetChildListByNurseryIDResponse) GetPhoto() *ChildPhoto { if x != nil { - return x.Photos + return x.Photo } return nil } @@ -489,8 +489,21 @@ var file_where_child_bus_v1_child_proto_rawDesc = []byte{ 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x22, 0x90, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, + 0x64, 0x22, 0x88, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, + 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x22, 0x42, 0x0a, 0x1f, + 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, + 0x22, 0x91, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, @@ -498,79 +511,66 @@ var file_where_child_bus_v1_child_proto_rawDesc = []byte{ 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, - 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x42, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x91, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, - 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x33, 0x0a, 0x1a, - 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, - 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, - 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, - 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, - 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, - 0x32, 0xf3, 0x03, 0x0a, 0x0c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x33, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, + 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, + 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, + 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x32, 0xf5, 0x03, 0x0a, 0x0c, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, 0x32, 0x2e, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, + 0x12, 0x85, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, - 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, - 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, - 0x42, 0x75, 0x73, 0x49, 0x44, 0x12, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, - 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x12, + 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -602,8 +602,8 @@ var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ var file_where_child_bus_v1_child_proto_depIdxs = []int32{ 8, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex 9, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child - 9, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child - 10, // 3: where_child_bus.v1.GetChildListByNurseryIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 9, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.child:type_name -> where_child_bus.v1.Child + 10, // 3: where_child_bus.v1.GetChildListByNurseryIDResponse.photo:type_name -> where_child_bus.v1.ChildPhoto 9, // 4: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child 10, // 5: where_child_bus.v1.GetChildListByGuardianIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto 9, // 6: where_child_bus.v1.GetChildListByBusIDResponse.children:type_name -> where_child_bus.v1.Child diff --git a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go index 206fea4f..bdc98cfb 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go @@ -30,7 +30,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ChildServiceClient interface { CreateChild(ctx context.Context, in *CreateChildRequest, opts ...grpc.CallOption) (*CreateChildResponse, error) - GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (*GetChildListByNurseryIDResponse, error) + GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (ChildService_GetChildListByNurseryIDClient, error) GetChildListByGuardianID(ctx context.Context, in *GetChildListByGuardianIDRequest, opts ...grpc.CallOption) (*GetChildListByGuardianIDResponse, error) GetChildListByBusID(ctx context.Context, in *GetChildListByBusIDRequest, opts ...grpc.CallOption) (*GetChildListByBusIDResponse, error) } @@ -52,13 +52,36 @@ func (c *childServiceClient) CreateChild(ctx context.Context, in *CreateChildReq return out, nil } -func (c *childServiceClient) GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (*GetChildListByNurseryIDResponse, error) { - out := new(GetChildListByNurseryIDResponse) - err := c.cc.Invoke(ctx, ChildService_GetChildListByNurseryID_FullMethodName, in, out, opts...) +func (c *childServiceClient) GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (ChildService_GetChildListByNurseryIDClient, error) { + stream, err := c.cc.NewStream(ctx, &ChildService_ServiceDesc.Streams[0], ChildService_GetChildListByNurseryID_FullMethodName, opts...) if err != nil { return nil, err } - return out, nil + x := &childServiceGetChildListByNurseryIDClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ChildService_GetChildListByNurseryIDClient interface { + Recv() (*GetChildListByNurseryIDResponse, error) + grpc.ClientStream +} + +type childServiceGetChildListByNurseryIDClient struct { + grpc.ClientStream +} + +func (x *childServiceGetChildListByNurseryIDClient) Recv() (*GetChildListByNurseryIDResponse, error) { + m := new(GetChildListByNurseryIDResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil } func (c *childServiceClient) GetChildListByGuardianID(ctx context.Context, in *GetChildListByGuardianIDRequest, opts ...grpc.CallOption) (*GetChildListByGuardianIDResponse, error) { @@ -84,7 +107,7 @@ func (c *childServiceClient) GetChildListByBusID(ctx context.Context, in *GetChi // for forward compatibility type ChildServiceServer interface { CreateChild(context.Context, *CreateChildRequest) (*CreateChildResponse, error) - GetChildListByNurseryID(context.Context, *GetChildListByNurseryIDRequest) (*GetChildListByNurseryIDResponse, error) + GetChildListByNurseryID(*GetChildListByNurseryIDRequest, ChildService_GetChildListByNurseryIDServer) error GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) GetChildListByBusID(context.Context, *GetChildListByBusIDRequest) (*GetChildListByBusIDResponse, error) } @@ -96,8 +119,8 @@ type UnimplementedChildServiceServer struct { func (UnimplementedChildServiceServer) CreateChild(context.Context, *CreateChildRequest) (*CreateChildResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateChild not implemented") } -func (UnimplementedChildServiceServer) GetChildListByNurseryID(context.Context, *GetChildListByNurseryIDRequest) (*GetChildListByNurseryIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChildListByNurseryID not implemented") +func (UnimplementedChildServiceServer) GetChildListByNurseryID(*GetChildListByNurseryIDRequest, ChildService_GetChildListByNurseryIDServer) error { + return status.Errorf(codes.Unimplemented, "method GetChildListByNurseryID not implemented") } func (UnimplementedChildServiceServer) GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChildListByGuardianID not implemented") @@ -135,22 +158,25 @@ func _ChildService_CreateChild_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _ChildService_GetChildListByNurseryID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetChildListByNurseryIDRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChildServiceServer).GetChildListByNurseryID(ctx, in) +func _ChildService_GetChildListByNurseryID_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetChildListByNurseryIDRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ChildService_GetChildListByNurseryID_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChildServiceServer).GetChildListByNurseryID(ctx, req.(*GetChildListByNurseryIDRequest)) - } - return interceptor(ctx, in, info, handler) + return srv.(ChildServiceServer).GetChildListByNurseryID(m, &childServiceGetChildListByNurseryIDServer{stream}) +} + +type ChildService_GetChildListByNurseryIDServer interface { + Send(*GetChildListByNurseryIDResponse) error + grpc.ServerStream +} + +type childServiceGetChildListByNurseryIDServer struct { + grpc.ServerStream +} + +func (x *childServiceGetChildListByNurseryIDServer) Send(m *GetChildListByNurseryIDResponse) error { + return x.ServerStream.SendMsg(m) } func _ChildService_GetChildListByGuardianID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -200,10 +226,6 @@ var ChildService_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreateChild", Handler: _ChildService_CreateChild_Handler, }, - { - MethodName: "GetChildListByNurseryID", - Handler: _ChildService_GetChildListByNurseryID_Handler, - }, { MethodName: "GetChildListByGuardianID", Handler: _ChildService_GetChildListByGuardianID_Handler, @@ -213,6 +235,12 @@ var ChildService_ServiceDesc = grpc.ServiceDesc{ Handler: _ChildService_GetChildListByBusID_Handler, }, }, - Streams: []grpc.StreamDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "GetChildListByNurseryID", + Handler: _ChildService_GetChildListByNurseryID_Handler, + ServerStreams: true, + }, + }, Metadata: "where_child_bus/v1/child.proto", } diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index e058f53e..7617d434 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -213,15 +213,15 @@ func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetCh }, nil } -func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChildListByNurseryIDRequest) (*pb.GetChildListByNurseryIDResponse, error) { +func (i *Interactor) GetChildListByNurseryID(req *pb.GetChildListByNurseryIDRequest, stream pb.ChildService_GetChildListByNurseryIDServer) error { nurseryID, err := uuid.Parse(req.NurseryId) if err != nil { i.logger.Error("failed to parse nursery ID", "error", err) - return nil, err + return err } // 子供と保育園の間に親を介在させるためのクエリを修正 - children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { + children, err := i.getChildList(context.Background(), func(tx *ent.Tx) (*ent.ChildQuery, error) { // 子供のクエリを作成する際に、親を介した保育園の条件を追加 return tx.Child.Query(). Where(childRepo.HasGuardianWith(guardianRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID)))). @@ -230,43 +230,41 @@ func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChi if err != nil { i.logger.Error("failed to get children by nursery ID", "error", err) - return nil, err + return err } // 子供の写真を取得 - var photos []*pb.ChildPhoto for _, child := range children { // 子供の写真のメタデータを取得 childPhotoRecordList, err := i.entClient.ChildPhoto.Query(). - Where(childPhotoRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(child.Id)))).All(ctx) + Where(childPhotoRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(child.Id)))). + WithChild(). + All(context.Background()) if err != nil { i.logger.Error("failed to get child photo list", "error", err) - return nil, err + return err } // 写真メタデータリストをループ for _, photoMetadata := range childPhotoRecordList { // GCSから写真を取得するためのIDを使用 - photo_data, err := i.getPhotoFromGCS(ctx, nurseryID.String(), child.Id, photoMetadata.ID.String()) + photo_data, err := i.getPhotoFromGCS(context.Background(), nurseryID.String(), child.Id, photoMetadata.ID.String()) if err != nil { i.logger.Error("failed to get photo from GCS", "error", err) - return nil, err + return err } - // 結果リストに追加 - photos = append(photos, &pb.ChildPhoto{ - ChildId: child.Id, - Id: photoMetadata.ID.String(), // 修正: GCSから取得した写真のIDではなく、メタデータのIDを使用 - PhotoData: photo_data, - }) + if err := stream.Send(&pb.GetChildListByNurseryIDResponse{ + Child: child, + Photo: utils.ToPbChildPhoto(photoMetadata, photo_data), + }); err != nil { + i.logger.Error("failed to send child photo", "error", err) + return err + } } } - - return &pb.GetChildListByNurseryIDResponse{ - Children: children, - Photos: photos, - }, nil + return nil } func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildListByBusIDRequest) (*pb.GetChildListByBusIDResponse, error) { @@ -361,10 +359,10 @@ func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) ( func (i *Interactor) getPhotoFromGCS(ctx context.Context, nurseryID, childID, photoID string) ([]byte, error) { // Cloud Storage上の写真のパスを生成 objectName := fmt.Sprintf("%s/%s/raw/%s.png", nurseryID, childID, photoID) - // 指定したバケット内のオブジェクトを取得 rc, err := i.StorageClient.Bucket(i.BucketName).Object(objectName).NewReader(ctx) if err != nil { + i.logger.Error("failed to get photo from GCS", "error", err) return nil, err } defer rc.Close() diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 6a14fccc..d4b93256 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -145,6 +145,16 @@ func ToPbStation(t *ent.Station, morningNextStationID, eveningNextStationID stri } } +func ToPbChildPhoto(t *ent.ChildPhoto, photo_data []byte) *pb.ChildPhoto { + return &pb.ChildPhoto{ + Id: t.ID.String(), + ChildId: t.Edges.Child.ID.String(), + PhotoData: photo_data, + CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, + UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + } +} + func HashPassword(password string) (string, error) { // 環境変数からペッパーを取得 config, _ := config.New() diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart index 889bdf38..3de46a39 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -234,15 +234,15 @@ class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse({ - $core.Iterable<$8.Child>? children, - $core.Iterable<$8.ChildPhoto>? photos, + $8.Child? child, + $8.ChildPhoto? photo, }) { final $result = create(); - if (children != null) { - $result.children.addAll(children); + if (child != null) { + $result.child = child; } - if (photos != null) { - $result.photos.addAll(photos); + if (photo != null) { + $result.photo = photo; } return $result; } @@ -251,8 +251,8 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByNurseryIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) - ..pc<$8.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $8.ChildPhoto.create) + ..aOM<$8.Child>(1, _omitFieldNames ? '' : 'child', subBuilder: $8.Child.create) + ..aOM<$8.ChildPhoto>(2, _omitFieldNames ? '' : 'photo', subBuilder: $8.ChildPhoto.create) ..hasRequiredFields = false ; @@ -278,10 +278,26 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { static GetChildListByNurseryIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$8.Child> get children => $_getList(0); + $8.Child get child => $_getN(0); + @$pb.TagNumber(1) + set child($8.Child v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasChild() => $_has(0); + @$pb.TagNumber(1) + void clearChild() => clearField(1); + @$pb.TagNumber(1) + $8.Child ensureChild() => $_ensure(0); @$pb.TagNumber(2) - $core.List<$8.ChildPhoto> get photos => $_getList(1); + $8.ChildPhoto get photo => $_getN(1); + @$pb.TagNumber(2) + set photo($8.ChildPhoto v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasPhoto() => $_has(1); + @$pb.TagNumber(2) + void clearPhoto() => clearField(2); + @$pb.TagNumber(2) + $8.ChildPhoto ensurePhoto() => $_ensure(1); } class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart index 310deac9..47a0b58d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart @@ -48,8 +48,8 @@ class ChildServiceClient extends $grpc.Client { return $createUnaryCall(_$createChild, request, options: options); } - $grpc.ResponseFuture<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($1.GetChildListByNurseryIDRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$getChildListByNurseryID, request, options: options); + $grpc.ResponseStream<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($1.GetChildListByNurseryIDRequest request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$getChildListByNurseryID, $async.Stream.fromIterable([request]), options: options); } $grpc.ResponseFuture<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($1.GetChildListByGuardianIDRequest request, {$grpc.CallOptions? options}) { @@ -77,7 +77,7 @@ abstract class ChildServiceBase extends $grpc.Service { 'GetChildListByNurseryID', getChildListByNurseryID_Pre, false, - false, + true, ($core.List<$core.int> value) => $1.GetChildListByNurseryIDRequest.fromBuffer(value), ($1.GetChildListByNurseryIDResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.GetChildListByGuardianIDRequest, $1.GetChildListByGuardianIDResponse>( @@ -100,8 +100,8 @@ abstract class ChildServiceBase extends $grpc.Service { return createChild(call, await request); } - $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByNurseryIDRequest> request) async { - return getChildListByNurseryID(call, await request); + $async.Stream<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByNurseryIDRequest> request) async* { + yield* getChildListByNurseryID(call, await request); } $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByGuardianIDRequest> request) async { @@ -113,7 +113,7 @@ abstract class ChildServiceBase extends $grpc.Service { } $async.Future<$1.CreateChildResponse> createChild($grpc.ServiceCall call, $1.CreateChildRequest request); - $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); + $async.Stream<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($grpc.ServiceCall call, $1.GetChildListByGuardianIDRequest request); $async.Future<$1.GetChildListByBusIDResponse> getChildListByBusID($grpc.ServiceCall call, $1.GetChildListByBusIDRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart index 17a3fcca..546f2729 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -63,16 +63,16 @@ final $typed_data.Uint8List getChildListByNurseryIDRequestDescriptor = $convert. const GetChildListByNurseryIDResponse$json = { '1': 'GetChildListByNurseryIDResponse', '2': [ - {'1': 'children', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, - {'1': 'photos', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.ChildPhoto', '10': 'photos'}, + {'1': 'child', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'child'}, + {'1': 'photo', '3': 2, '4': 1, '5': 11, '6': '.where_child_bus.v1.ChildPhoto', '10': 'photo'}, ], }; /// Descriptor for `GetChildListByNurseryIDResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getChildListByNurseryIDResponseDescriptor = $convert.base64Decode( - 'Ch9HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEjUKCGNoaWxkcmVuGAEgAygLMhkud2' - 'hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJlbhI2CgZwaG90b3MYAiADKAsyHi53aGVy' - 'ZV9jaGlsZF9idXMudjEuQ2hpbGRQaG90b1IGcGhvdG9z'); + 'Ch9HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEi8KBWNoaWxkGAEgASgLMhkud2hlcm' + 'VfY2hpbGRfYnVzLnYxLkNoaWxkUgVjaGlsZBI0CgVwaG90bxgCIAEoCzIeLndoZXJlX2NoaWxk' + 'X2J1cy52MS5DaGlsZFBob3RvUgVwaG90bw=='); @$core.Deprecated('Use getChildListByGuardianIDRequestDescriptor instead') const GetChildListByGuardianIDRequest$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py index 86188c57..3701c293 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos2\xf3\x03\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x88\x01\n\x1fGetChildListByNurseryIDResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\x12\x34\n\x05photo\x18\x02 \x01(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x05photo\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos2\xf5\x03\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x84\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse0\x01\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -30,15 +30,15 @@ _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=354 _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=417 _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=420 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=564 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=566 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=632 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=635 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=780 - _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=782 - _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=833 - _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=836 - _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=976 - _globals['_CHILDSERVICE']._serialized_start=979 - _globals['_CHILDSERVICE']._serialized_end=1478 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=556 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=558 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=624 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=627 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=772 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=774 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=825 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=828 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=968 + _globals['_CHILDSERVICE']._serialized_start=971 + _globals['_CHILDSERVICE']._serialized_end=1472 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi index 410879ad..8a53cb08 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi @@ -35,12 +35,12 @@ class GetChildListByNurseryIDRequest(_message.Message): def __init__(self, nursery_id: _Optional[str] = ...) -> None: ... class GetChildListByNurseryIDResponse(_message.Message): - __slots__ = ("children", "photos") - CHILDREN_FIELD_NUMBER: _ClassVar[int] - PHOTOS_FIELD_NUMBER: _ClassVar[int] - children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] - photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] - def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... + __slots__ = ("child", "photo") + CHILD_FIELD_NUMBER: _ClassVar[int] + PHOTO_FIELD_NUMBER: _ClassVar[int] + child: _resources_pb2.Child + photo: _resources_pb2.ChildPhoto + def __init__(self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ..., photo: _Optional[_Union[_resources_pb2.ChildPhoto, _Mapping]] = ...) -> None: ... class GetChildListByGuardianIDRequest(_message.Message): __slots__ = ("guardian_id",) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py index d76d8ecb..3a060797 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py @@ -19,7 +19,7 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.FromString, ) - self.GetChildListByNurseryID = channel.unary_unary( + self.GetChildListByNurseryID = channel.unary_stream( '/where_child_bus.v1.ChildService/GetChildListByNurseryID', request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, @@ -71,7 +71,7 @@ def add_ChildServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.SerializeToString, ), - 'GetChildListByNurseryID': grpc.unary_unary_rpc_method_handler( + 'GetChildListByNurseryID': grpc.unary_stream_rpc_method_handler( servicer.GetChildListByNurseryID, request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.SerializeToString, @@ -124,7 +124,7 @@ def GetChildListByNurseryID(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByNurseryID', + return grpc.experimental.unary_stream(request, target, '/where_child_bus.v1.ChildService/GetChildListByNurseryID', where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, options, channel_credentials, diff --git a/proto/where_child_bus/v1/child.proto b/proto/where_child_bus/v1/child.proto index 9a625ba0..703bb4ce 100644 --- a/proto/where_child_bus/v1/child.proto +++ b/proto/where_child_bus/v1/child.proto @@ -6,7 +6,7 @@ import "where_child_bus/v1/resources.proto"; service ChildService { rpc CreateChild(CreateChildRequest) returns (CreateChildResponse); - rpc GetChildListByNurseryID(GetChildListByNurseryIDRequest) returns (GetChildListByNurseryIDResponse); + rpc GetChildListByNurseryID(GetChildListByNurseryIDRequest) returns (stream GetChildListByNurseryIDResponse); rpc GetChildListByGuardianID(GetChildListByGuardianIDRequest) returns (GetChildListByGuardianIDResponse); rpc GetChildListByBusID(GetChildListByBusIDRequest) returns (GetChildListByBusIDResponse); } @@ -29,8 +29,8 @@ message GetChildListByNurseryIDRequest { } message GetChildListByNurseryIDResponse { - repeated Child children = 1; - repeated ChildPhoto photos = 2; + Child child = 1; + ChildPhoto photo = 2; } message GetChildListByGuardianIDRequest { From edf2c5ddbadadc3dcdfb7eba4f2eb470ddb8ba62 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 18 Feb 2024 21:55:15 +0900 Subject: [PATCH 470/771] =?UTF-8?q?feat:=E5=AD=90=E4=BE=9B=E7=B7=A8?= =?UTF-8?q?=E9=9B=86=E6=99=82=E3=81=ABChild=E3=82=92=E6=B8=A1=E3=81=99?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/utils/input_form_body.dart | 32 ++++++++++++------- .../components/utils/text_input_field.dart | 8 ++++- .../student_detail_sheet.dart | 4 ++- .../student_list_page/student_edit_page.dart | 7 +--- 4 files changed, 31 insertions(+), 20 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index a5c4f095..e2aace1b 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -12,17 +12,17 @@ import 'select_value_box.dart'; import 'submit_button.dart'; class InputFormBody extends StatefulWidget { - final List busName; - final List busStop; + Child? child; - const InputFormBody({required this.busName, required this.busStop, Key? key}) - : super(key: key); + InputFormBody({Key? key, this.child}) : super(key: key); @override State createState() => _InputFormBodyState(); } class _InputFormBodyState extends State { + TextEditingController _nameController = TextEditingController(); + TextEditingController _ageController = TextEditingController(); late Future _loadDataFuture; // 非同期処理の結果を保持する変数 List guardians = []; List buses = []; @@ -32,7 +32,10 @@ class _InputFormBodyState extends State { @override void initState() { super.initState(); - // initState内で非同期処理をトリガーし、結果を変数に格納 + if (widget.child != null) { + _nameController.text = widget.child!.name; + _ageController.text = widget.child!.age.toString(); + } _loadDataFuture = _loadBusesAndGuardians(); } @@ -143,16 +146,17 @@ class _InputFormBodyState extends State { ) { return Column( children: [ + inputLabelAndTextField(context, "園児氏名", "園児氏名を入力してください", + TextInputType.name, _nameController), inputLabelAndTextField( - context, "園児氏名", "園児氏名を入力してください", TextInputType.name), - inputLabelAndTextField( - context, "年齢", "年齢を入力してください", TextInputType.number), + context, "年齢", "年齢を入力してください", TextInputType.number, _ageController), inputLabelAndSelectBox( context, "保護者", guardians.map((guardian) => guardian.name).toList(), ), - inputLabelAndSelectBox(context, "利用バス", widget.busName), + inputLabelAndSelectBox( + context, "利用バス", buses.map((bus) => bus.name).toList()), Container( margin: const EdgeInsets.only(top: 20.0), width: MediaQuery.of(context).size.width * 0.6, @@ -162,13 +166,17 @@ class _InputFormBodyState extends State { ); } - Widget inputLabelAndTextField( - BuildContext context, String label, String hintText, TextInputType type) { + Widget inputLabelAndTextField(BuildContext context, String label, + String hintText, TextInputType type, TextEditingController controller) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ InputValueLabel(label: label), - TextInputField(hintText: hintText, type: type) + TextInputField( + hintText: hintText, + type: type, + controller: controller, + ) ], ); } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/text_input_field.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/text_input_field.dart index f5f6651c..0bce16f6 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/text_input_field.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/text_input_field.dart @@ -3,8 +3,13 @@ import 'package:flutter/material.dart'; class TextInputField extends StatelessWidget { final String hintText; final TextInputType type; + final TextEditingController controller; - const TextInputField({required this.hintText, required this.type, super.key}); + const TextInputField( + {required this.hintText, + required this.type, + required this.controller, + super.key}); @override Widget build(BuildContext context) { @@ -14,6 +19,7 @@ class TextInputField extends StatelessWidget { child: TextField( decoration: formInputDecoration(hintText), keyboardType: type, + controller: controller, )); } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart index 59ccf8ba..e1c26f7f 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart @@ -86,7 +86,9 @@ class _StudentDetailSheetState extends State { style: ElevatedButton.styleFrom(shape: const CircleBorder()), onPressed: () { Navigator.of(context).push(MaterialPageRoute( - builder: (BuildContext context) => StudentEditPage())); + builder: (BuildContext context) => StudentEditPage( + child: widget.child, + ))); }, child: const Icon(Icons.edit), ), diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart index 0ba06f81..3f59b72e 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart @@ -13,8 +13,6 @@ class StudentEditPage extends StatefulWidget { class _StudentEditPageState extends State { List guardiansList = []; - final List busName = ["バス1", "バス2", "バス3"]; - final List busStop = ["停留所1", "停留所2", "停留所3"]; @override void initState() { @@ -31,10 +29,7 @@ class _StudentEditPageState extends State { child: Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar(), - body: InputFormBody( - busName: busName, - busStop: busStop, - ), + body: InputFormBody(child: widget.child), ), ); } From d4f9eb46b69dcc509d4a1cf44fbe7d15ae8f017c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=82=8F=E3=81=8D=E3=82=93?= <93261102+KinjiKawaguchi@users.noreply.github.com> Date: Sun, 18 Feb 2024 21:58:45 +0900 Subject: [PATCH 471/771] Revert "Feature/backend/api" --- backend/Dockerfile | 2 + backend/interfaces/child.go | 10 +- .../go/where_child_bus/v1/child.pb.go | 158 +++++++++--------- .../go/where_child_bus/v1/child_grpc.pb.go | 84 ++++------ backend/usecases/child/child.go | 40 ++--- backend/usecases/utils/utils.go | 10 -- .../where_child_bus/v1/child.pb.dart | 36 ++-- .../where_child_bus/v1/child.pbgrpc.dart | 12 +- .../where_child_bus/v1/child.pbjson.dart | 10 +- .../proto-gen/where_child_bus/v1/child_pb2.py | 24 +-- .../where_child_bus/v1/child_pb2.pyi | 12 +- .../where_child_bus/v1/child_pb2_grpc.py | 6 +- proto/where_child_bus/v1/child.proto | 6 +- 13 files changed, 180 insertions(+), 230 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index fb8a4a15..63a1694e 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -24,6 +24,8 @@ RUN echo "DSN=$DSN" > .env \ RUN go mod download +RUN go mod download + ARG VERS="3.11.4" ARG ARCH="linux-x86_64" diff --git a/backend/interfaces/child.go b/backend/interfaces/child.go index c3601488..db7b6d3d 100644 --- a/backend/interfaces/child.go +++ b/backend/interfaces/child.go @@ -11,11 +11,6 @@ type childServiceServer struct { interactor *child.Interactor } -// GetChildListByNurseryID implements where_child_busv1.ChildServiceServer. -func (s *childServiceServer) GetChildListByNurseryID(req *pb.GetChildListByNurseryIDRequest, stream pb.ChildService_GetChildListByNurseryIDServer) error { - return s.interactor.GetChildListByNurseryID(req, stream) -} - func NewChildServiceServer(interactor *child.Interactor) pb.ChildServiceServer { return &childServiceServer{interactor} } @@ -34,3 +29,8 @@ func (s *childServiceServer) CreateChild(ctx context.Context, req *pb.CreateChil func (s *childServiceServer) GetChildListByGuardianID(ctx context.Context, req *pb.GetChildListByGuardianIDRequest) (*pb.GetChildListByGuardianIDResponse, error) { return s.interactor.GetChildListByGuardianID(ctx, req) } + +// GetChildListByNurseryID implements where_child_busv1.ChildServiceServer. +func (s *childServiceServer) GetChildListByNurseryID(ctx context.Context, req *pb.GetChildListByNurseryIDRequest) (*pb.GetChildListByNurseryIDResponse, error) { + return s.interactor.GetChildListByNurseryID(ctx, req) +} diff --git a/backend/proto-gen/go/where_child_bus/v1/child.pb.go b/backend/proto-gen/go/where_child_bus/v1/child.pb.go index 3e01e78b..e55c313f 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child.pb.go @@ -206,8 +206,8 @@ type GetChildListByNurseryIDResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Child *Child `protobuf:"bytes,1,opt,name=child,proto3" json:"child,omitempty"` - Photo *ChildPhoto `protobuf:"bytes,2,opt,name=photo,proto3" json:"photo,omitempty"` + Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` + Photos []*ChildPhoto `protobuf:"bytes,2,rep,name=photos,proto3" json:"photos,omitempty"` } func (x *GetChildListByNurseryIDResponse) Reset() { @@ -242,16 +242,16 @@ func (*GetChildListByNurseryIDResponse) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{3} } -func (x *GetChildListByNurseryIDResponse) GetChild() *Child { +func (x *GetChildListByNurseryIDResponse) GetChildren() []*Child { if x != nil { - return x.Child + return x.Children } return nil } -func (x *GetChildListByNurseryIDResponse) GetPhoto() *ChildPhoto { +func (x *GetChildListByNurseryIDResponse) GetPhotos() []*ChildPhoto { if x != nil { - return x.Photo + return x.Photos } return nil } @@ -489,21 +489,8 @@ var file_where_child_bus_v1_child_proto_rawDesc = []byte{ 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x22, 0x88, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, + 0x64, 0x22, 0x90, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, - 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x22, 0x42, 0x0a, 0x1f, - 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, - 0x22, 0x91, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, @@ -511,66 +498,79 @@ var file_where_child_bus_v1_child_proto_rawDesc = []byte{ 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, - 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x33, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, - 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, - 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, - 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x32, 0xf5, 0x03, 0x0a, 0x0c, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x42, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x91, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, + 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x33, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, + 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, + 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, + 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, + 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, + 0x32, 0xf3, 0x03, 0x0a, 0x0c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x85, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x12, - 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, + 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, + 0x42, 0x75, 0x73, 0x49, 0x44, 0x12, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, + 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -602,8 +602,8 @@ var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ var file_where_child_bus_v1_child_proto_depIdxs = []int32{ 8, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex 9, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child - 9, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.child:type_name -> where_child_bus.v1.Child - 10, // 3: where_child_bus.v1.GetChildListByNurseryIDResponse.photo:type_name -> where_child_bus.v1.ChildPhoto + 9, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child + 10, // 3: where_child_bus.v1.GetChildListByNurseryIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto 9, // 4: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child 10, // 5: where_child_bus.v1.GetChildListByGuardianIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto 9, // 6: where_child_bus.v1.GetChildListByBusIDResponse.children:type_name -> where_child_bus.v1.Child diff --git a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go index bdc98cfb..206fea4f 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go @@ -30,7 +30,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ChildServiceClient interface { CreateChild(ctx context.Context, in *CreateChildRequest, opts ...grpc.CallOption) (*CreateChildResponse, error) - GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (ChildService_GetChildListByNurseryIDClient, error) + GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (*GetChildListByNurseryIDResponse, error) GetChildListByGuardianID(ctx context.Context, in *GetChildListByGuardianIDRequest, opts ...grpc.CallOption) (*GetChildListByGuardianIDResponse, error) GetChildListByBusID(ctx context.Context, in *GetChildListByBusIDRequest, opts ...grpc.CallOption) (*GetChildListByBusIDResponse, error) } @@ -52,36 +52,13 @@ func (c *childServiceClient) CreateChild(ctx context.Context, in *CreateChildReq return out, nil } -func (c *childServiceClient) GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (ChildService_GetChildListByNurseryIDClient, error) { - stream, err := c.cc.NewStream(ctx, &ChildService_ServiceDesc.Streams[0], ChildService_GetChildListByNurseryID_FullMethodName, opts...) +func (c *childServiceClient) GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (*GetChildListByNurseryIDResponse, error) { + out := new(GetChildListByNurseryIDResponse) + err := c.cc.Invoke(ctx, ChildService_GetChildListByNurseryID_FullMethodName, in, out, opts...) if err != nil { return nil, err } - x := &childServiceGetChildListByNurseryIDClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ChildService_GetChildListByNurseryIDClient interface { - Recv() (*GetChildListByNurseryIDResponse, error) - grpc.ClientStream -} - -type childServiceGetChildListByNurseryIDClient struct { - grpc.ClientStream -} - -func (x *childServiceGetChildListByNurseryIDClient) Recv() (*GetChildListByNurseryIDResponse, error) { - m := new(GetChildListByNurseryIDResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil + return out, nil } func (c *childServiceClient) GetChildListByGuardianID(ctx context.Context, in *GetChildListByGuardianIDRequest, opts ...grpc.CallOption) (*GetChildListByGuardianIDResponse, error) { @@ -107,7 +84,7 @@ func (c *childServiceClient) GetChildListByBusID(ctx context.Context, in *GetChi // for forward compatibility type ChildServiceServer interface { CreateChild(context.Context, *CreateChildRequest) (*CreateChildResponse, error) - GetChildListByNurseryID(*GetChildListByNurseryIDRequest, ChildService_GetChildListByNurseryIDServer) error + GetChildListByNurseryID(context.Context, *GetChildListByNurseryIDRequest) (*GetChildListByNurseryIDResponse, error) GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) GetChildListByBusID(context.Context, *GetChildListByBusIDRequest) (*GetChildListByBusIDResponse, error) } @@ -119,8 +96,8 @@ type UnimplementedChildServiceServer struct { func (UnimplementedChildServiceServer) CreateChild(context.Context, *CreateChildRequest) (*CreateChildResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateChild not implemented") } -func (UnimplementedChildServiceServer) GetChildListByNurseryID(*GetChildListByNurseryIDRequest, ChildService_GetChildListByNurseryIDServer) error { - return status.Errorf(codes.Unimplemented, "method GetChildListByNurseryID not implemented") +func (UnimplementedChildServiceServer) GetChildListByNurseryID(context.Context, *GetChildListByNurseryIDRequest) (*GetChildListByNurseryIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChildListByNurseryID not implemented") } func (UnimplementedChildServiceServer) GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChildListByGuardianID not implemented") @@ -158,25 +135,22 @@ func _ChildService_CreateChild_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _ChildService_GetChildListByNurseryID_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(GetChildListByNurseryIDRequest) - if err := stream.RecvMsg(m); err != nil { - return err +func _ChildService_GetChildListByNurseryID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetChildListByNurseryIDRequest) + if err := dec(in); err != nil { + return nil, err } - return srv.(ChildServiceServer).GetChildListByNurseryID(m, &childServiceGetChildListByNurseryIDServer{stream}) -} - -type ChildService_GetChildListByNurseryIDServer interface { - Send(*GetChildListByNurseryIDResponse) error - grpc.ServerStream -} - -type childServiceGetChildListByNurseryIDServer struct { - grpc.ServerStream -} - -func (x *childServiceGetChildListByNurseryIDServer) Send(m *GetChildListByNurseryIDResponse) error { - return x.ServerStream.SendMsg(m) + if interceptor == nil { + return srv.(ChildServiceServer).GetChildListByNurseryID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChildService_GetChildListByNurseryID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChildServiceServer).GetChildListByNurseryID(ctx, req.(*GetChildListByNurseryIDRequest)) + } + return interceptor(ctx, in, info, handler) } func _ChildService_GetChildListByGuardianID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -226,6 +200,10 @@ var ChildService_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreateChild", Handler: _ChildService_CreateChild_Handler, }, + { + MethodName: "GetChildListByNurseryID", + Handler: _ChildService_GetChildListByNurseryID_Handler, + }, { MethodName: "GetChildListByGuardianID", Handler: _ChildService_GetChildListByGuardianID_Handler, @@ -235,12 +213,6 @@ var ChildService_ServiceDesc = grpc.ServiceDesc{ Handler: _ChildService_GetChildListByBusID_Handler, }, }, - Streams: []grpc.StreamDesc{ - { - StreamName: "GetChildListByNurseryID", - Handler: _ChildService_GetChildListByNurseryID_Handler, - ServerStreams: true, - }, - }, + Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/child.proto", } diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index 7617d434..e058f53e 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -213,15 +213,15 @@ func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetCh }, nil } -func (i *Interactor) GetChildListByNurseryID(req *pb.GetChildListByNurseryIDRequest, stream pb.ChildService_GetChildListByNurseryIDServer) error { +func (i *Interactor) GetChildListByNurseryID(ctx context.Context, req *pb.GetChildListByNurseryIDRequest) (*pb.GetChildListByNurseryIDResponse, error) { nurseryID, err := uuid.Parse(req.NurseryId) if err != nil { i.logger.Error("failed to parse nursery ID", "error", err) - return err + return nil, err } // 子供と保育園の間に親を介在させるためのクエリを修正 - children, err := i.getChildList(context.Background(), func(tx *ent.Tx) (*ent.ChildQuery, error) { + children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { // 子供のクエリを作成する際に、親を介した保育園の条件を追加 return tx.Child.Query(). Where(childRepo.HasGuardianWith(guardianRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID)))). @@ -230,41 +230,43 @@ func (i *Interactor) GetChildListByNurseryID(req *pb.GetChildListByNurseryIDRequ if err != nil { i.logger.Error("failed to get children by nursery ID", "error", err) - return err + return nil, err } // 子供の写真を取得 + var photos []*pb.ChildPhoto for _, child := range children { // 子供の写真のメタデータを取得 childPhotoRecordList, err := i.entClient.ChildPhoto.Query(). - Where(childPhotoRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(child.Id)))). - WithChild(). - All(context.Background()) + Where(childPhotoRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(child.Id)))).All(ctx) if err != nil { i.logger.Error("failed to get child photo list", "error", err) - return err + return nil, err } // 写真メタデータリストをループ for _, photoMetadata := range childPhotoRecordList { // GCSから写真を取得するためのIDを使用 - photo_data, err := i.getPhotoFromGCS(context.Background(), nurseryID.String(), child.Id, photoMetadata.ID.String()) + photo_data, err := i.getPhotoFromGCS(ctx, nurseryID.String(), child.Id, photoMetadata.ID.String()) if err != nil { i.logger.Error("failed to get photo from GCS", "error", err) - return err + return nil, err } - if err := stream.Send(&pb.GetChildListByNurseryIDResponse{ - Child: child, - Photo: utils.ToPbChildPhoto(photoMetadata, photo_data), - }); err != nil { - i.logger.Error("failed to send child photo", "error", err) - return err - } + // 結果リストに追加 + photos = append(photos, &pb.ChildPhoto{ + ChildId: child.Id, + Id: photoMetadata.ID.String(), // 修正: GCSから取得した写真のIDではなく、メタデータのIDを使用 + PhotoData: photo_data, + }) } } - return nil + + return &pb.GetChildListByNurseryIDResponse{ + Children: children, + Photos: photos, + }, nil } func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildListByBusIDRequest) (*pb.GetChildListByBusIDResponse, error) { @@ -359,10 +361,10 @@ func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) ( func (i *Interactor) getPhotoFromGCS(ctx context.Context, nurseryID, childID, photoID string) ([]byte, error) { // Cloud Storage上の写真のパスを生成 objectName := fmt.Sprintf("%s/%s/raw/%s.png", nurseryID, childID, photoID) + // 指定したバケット内のオブジェクトを取得 rc, err := i.StorageClient.Bucket(i.BucketName).Object(objectName).NewReader(ctx) if err != nil { - i.logger.Error("failed to get photo from GCS", "error", err) return nil, err } defer rc.Close() diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index d4b93256..6a14fccc 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -145,16 +145,6 @@ func ToPbStation(t *ent.Station, morningNextStationID, eveningNextStationID stri } } -func ToPbChildPhoto(t *ent.ChildPhoto, photo_data []byte) *pb.ChildPhoto { - return &pb.ChildPhoto{ - Id: t.ID.String(), - ChildId: t.Edges.Child.ID.String(), - PhotoData: photo_data, - CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, - UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, - } -} - func HashPassword(password string) (string, error) { // 環境変数からペッパーを取得 config, _ := config.New() diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart index 3de46a39..889bdf38 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -234,15 +234,15 @@ class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse({ - $8.Child? child, - $8.ChildPhoto? photo, + $core.Iterable<$8.Child>? children, + $core.Iterable<$8.ChildPhoto>? photos, }) { final $result = create(); - if (child != null) { - $result.child = child; + if (children != null) { + $result.children.addAll(children); } - if (photo != null) { - $result.photo = photo; + if (photos != null) { + $result.photos.addAll(photos); } return $result; } @@ -251,8 +251,8 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByNurseryIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.Child>(1, _omitFieldNames ? '' : 'child', subBuilder: $8.Child.create) - ..aOM<$8.ChildPhoto>(2, _omitFieldNames ? '' : 'photo', subBuilder: $8.ChildPhoto.create) + ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) + ..pc<$8.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $8.ChildPhoto.create) ..hasRequiredFields = false ; @@ -278,26 +278,10 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { static GetChildListByNurseryIDResponse? _defaultInstance; @$pb.TagNumber(1) - $8.Child get child => $_getN(0); - @$pb.TagNumber(1) - set child($8.Child v) { setField(1, v); } - @$pb.TagNumber(1) - $core.bool hasChild() => $_has(0); - @$pb.TagNumber(1) - void clearChild() => clearField(1); - @$pb.TagNumber(1) - $8.Child ensureChild() => $_ensure(0); + $core.List<$8.Child> get children => $_getList(0); @$pb.TagNumber(2) - $8.ChildPhoto get photo => $_getN(1); - @$pb.TagNumber(2) - set photo($8.ChildPhoto v) { setField(2, v); } - @$pb.TagNumber(2) - $core.bool hasPhoto() => $_has(1); - @$pb.TagNumber(2) - void clearPhoto() => clearField(2); - @$pb.TagNumber(2) - $8.ChildPhoto ensurePhoto() => $_ensure(1); + $core.List<$8.ChildPhoto> get photos => $_getList(1); } class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart index 47a0b58d..310deac9 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart @@ -48,8 +48,8 @@ class ChildServiceClient extends $grpc.Client { return $createUnaryCall(_$createChild, request, options: options); } - $grpc.ResponseStream<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($1.GetChildListByNurseryIDRequest request, {$grpc.CallOptions? options}) { - return $createStreamingCall(_$getChildListByNurseryID, $async.Stream.fromIterable([request]), options: options); + $grpc.ResponseFuture<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($1.GetChildListByNurseryIDRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getChildListByNurseryID, request, options: options); } $grpc.ResponseFuture<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($1.GetChildListByGuardianIDRequest request, {$grpc.CallOptions? options}) { @@ -77,7 +77,7 @@ abstract class ChildServiceBase extends $grpc.Service { 'GetChildListByNurseryID', getChildListByNurseryID_Pre, false, - true, + false, ($core.List<$core.int> value) => $1.GetChildListByNurseryIDRequest.fromBuffer(value), ($1.GetChildListByNurseryIDResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.GetChildListByGuardianIDRequest, $1.GetChildListByGuardianIDResponse>( @@ -100,8 +100,8 @@ abstract class ChildServiceBase extends $grpc.Service { return createChild(call, await request); } - $async.Stream<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByNurseryIDRequest> request) async* { - yield* getChildListByNurseryID(call, await request); + $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByNurseryIDRequest> request) async { + return getChildListByNurseryID(call, await request); } $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByGuardianIDRequest> request) async { @@ -113,7 +113,7 @@ abstract class ChildServiceBase extends $grpc.Service { } $async.Future<$1.CreateChildResponse> createChild($grpc.ServiceCall call, $1.CreateChildRequest request); - $async.Stream<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); + $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($grpc.ServiceCall call, $1.GetChildListByGuardianIDRequest request); $async.Future<$1.GetChildListByBusIDResponse> getChildListByBusID($grpc.ServiceCall call, $1.GetChildListByBusIDRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart index 546f2729..17a3fcca 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -63,16 +63,16 @@ final $typed_data.Uint8List getChildListByNurseryIDRequestDescriptor = $convert. const GetChildListByNurseryIDResponse$json = { '1': 'GetChildListByNurseryIDResponse', '2': [ - {'1': 'child', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'child'}, - {'1': 'photo', '3': 2, '4': 1, '5': 11, '6': '.where_child_bus.v1.ChildPhoto', '10': 'photo'}, + {'1': 'children', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'children'}, + {'1': 'photos', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.ChildPhoto', '10': 'photos'}, ], }; /// Descriptor for `GetChildListByNurseryIDResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getChildListByNurseryIDResponseDescriptor = $convert.base64Decode( - 'Ch9HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEi8KBWNoaWxkGAEgASgLMhkud2hlcm' - 'VfY2hpbGRfYnVzLnYxLkNoaWxkUgVjaGlsZBI0CgVwaG90bxgCIAEoCzIeLndoZXJlX2NoaWxk' - 'X2J1cy52MS5DaGlsZFBob3RvUgVwaG90bw=='); + 'Ch9HZXRDaGlsZExpc3RCeU51cnNlcnlJRFJlc3BvbnNlEjUKCGNoaWxkcmVuGAEgAygLMhkud2' + 'hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJlbhI2CgZwaG90b3MYAiADKAsyHi53aGVy' + 'ZV9jaGlsZF9idXMudjEuQ2hpbGRQaG90b1IGcGhvdG9z'); @$core.Deprecated('Use getChildListByGuardianIDRequestDescriptor instead') const GetChildListByGuardianIDRequest$json = { diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py index 3701c293..86188c57 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x88\x01\n\x1fGetChildListByNurseryIDResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\x12\x34\n\x05photo\x18\x02 \x01(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x05photo\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos2\xf5\x03\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x84\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse0\x01\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos2\xf3\x03\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -30,15 +30,15 @@ _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=354 _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=417 _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=420 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=556 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=558 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=624 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=627 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=772 - _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=774 - _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=825 - _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=828 - _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=968 - _globals['_CHILDSERVICE']._serialized_start=971 - _globals['_CHILDSERVICE']._serialized_end=1472 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=564 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=566 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=632 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=635 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=780 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=782 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=833 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=836 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=976 + _globals['_CHILDSERVICE']._serialized_start=979 + _globals['_CHILDSERVICE']._serialized_end=1478 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi index 8a53cb08..410879ad 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi @@ -35,12 +35,12 @@ class GetChildListByNurseryIDRequest(_message.Message): def __init__(self, nursery_id: _Optional[str] = ...) -> None: ... class GetChildListByNurseryIDResponse(_message.Message): - __slots__ = ("child", "photo") - CHILD_FIELD_NUMBER: _ClassVar[int] - PHOTO_FIELD_NUMBER: _ClassVar[int] - child: _resources_pb2.Child - photo: _resources_pb2.ChildPhoto - def __init__(self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ..., photo: _Optional[_Union[_resources_pb2.ChildPhoto, _Mapping]] = ...) -> None: ... + __slots__ = ("children", "photos") + CHILDREN_FIELD_NUMBER: _ClassVar[int] + PHOTOS_FIELD_NUMBER: _ClassVar[int] + children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] + photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] + def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... class GetChildListByGuardianIDRequest(_message.Message): __slots__ = ("guardian_id",) diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py index 3a060797..d76d8ecb 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py @@ -19,7 +19,7 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.FromString, ) - self.GetChildListByNurseryID = channel.unary_stream( + self.GetChildListByNurseryID = channel.unary_unary( '/where_child_bus.v1.ChildService/GetChildListByNurseryID', request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, @@ -71,7 +71,7 @@ def add_ChildServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.SerializeToString, ), - 'GetChildListByNurseryID': grpc.unary_stream_rpc_method_handler( + 'GetChildListByNurseryID': grpc.unary_unary_rpc_method_handler( servicer.GetChildListByNurseryID, request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.SerializeToString, @@ -124,7 +124,7 @@ def GetChildListByNurseryID(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_stream(request, target, '/where_child_bus.v1.ChildService/GetChildListByNurseryID', + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByNurseryID', where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, options, channel_credentials, diff --git a/proto/where_child_bus/v1/child.proto b/proto/where_child_bus/v1/child.proto index 703bb4ce..9a625ba0 100644 --- a/proto/where_child_bus/v1/child.proto +++ b/proto/where_child_bus/v1/child.proto @@ -6,7 +6,7 @@ import "where_child_bus/v1/resources.proto"; service ChildService { rpc CreateChild(CreateChildRequest) returns (CreateChildResponse); - rpc GetChildListByNurseryID(GetChildListByNurseryIDRequest) returns (stream GetChildListByNurseryIDResponse); + rpc GetChildListByNurseryID(GetChildListByNurseryIDRequest) returns (GetChildListByNurseryIDResponse); rpc GetChildListByGuardianID(GetChildListByGuardianIDRequest) returns (GetChildListByGuardianIDResponse); rpc GetChildListByBusID(GetChildListByBusIDRequest) returns (GetChildListByBusIDResponse); } @@ -29,8 +29,8 @@ message GetChildListByNurseryIDRequest { } message GetChildListByNurseryIDResponse { - Child child = 1; - ChildPhoto photo = 2; + repeated Child children = 1; + repeated ChildPhoto photos = 2; } message GetChildListByGuardianIDRequest { From e5546e6794a55d590f64738c365d484d6fb839cf Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 18 Feb 2024 22:02:54 +0900 Subject: [PATCH 472/771] =?UTF-8?q?feat:=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E5=86=99=E7=9C=9F=E8=A1=A8=E7=A4=BA=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/child_list/child_list.dart | 1 + .../student_list_page/student_detail_sheet.dart | 15 ++++++--------- .../student_list_page/student_list_page.dart | 11 ----------- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/frontend/where_child_bus/lib/components/child_list/child_list.dart b/frontend/where_child_bus/lib/components/child_list/child_list.dart index c6d33026..9dd98ea1 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list.dart @@ -51,6 +51,7 @@ class _ChildListState extends State { builder: (BuildContext context) { return StudentDetailSheet( child: widget.children[index], + image: widget.images[index], ); }); } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart index e1c26f7f..3a7508f7 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart @@ -1,13 +1,16 @@ import "dart:developer" as developer; import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/util/image_from_byte.dart'; import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; import 'package:where_child_bus/service/get_guardians_list_by_child_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class StudentDetailSheet extends StatefulWidget { final Child child; + final ChildPhoto image; - const StudentDetailSheet({Key? key, required this.child}) : super(key: key); + const StudentDetailSheet({Key? key, required this.child, required this.image}) + : super(key: key); @override _StudentDetailSheetState createState() => _StudentDetailSheetState(); @@ -109,14 +112,8 @@ class _StudentDetailSheetState extends State { } Widget childFaceImage() { - // 画像を受け取る処理を将来的に実装 - return const SizedBox( - width: 100, - height: 100, - child: Card( - color: Colors.grey, - ), - ); + return ImageFromBytes( + imageData: widget.image.photoData, height: 100, width: 100); } Widget childDetailList() { diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 696cb49c..a5acf594 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -23,15 +23,6 @@ class _ChildListPageState extends State { bool _isLoading = false; bool _isFailLoading = false; - //TODO: 将来的には動的にデータを受け取る。 - final List image = [ - "1", - "2", - "1", - "1", - "2", - ]; - @override void initState() { super.initState(); @@ -66,8 +57,6 @@ class _ChildListPageState extends State { @override Widget build(BuildContext context) { - var screenSize = MediaQuery.of(context).size; - return Scaffold( body: pageBody(), floatingActionButton: FloatingActionButton( From 3494e671fb32aac04d0b9e52e1432625b6368137 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 22:52:13 +0900 Subject: [PATCH 473/771] =?UTF-8?q?chore:=20python=E3=81=AEproto=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../machine_learning/v1/health_check_pb2.py | 0 .../machine_learning/v1/health_check_pb2.pyi | 0 .../machine_learning/v1/health_check_pb2_grpc.py | 0 .../machine_learning/v1/machine_learning_pb2.py | 0 .../machine_learning/v1/machine_learning_pb2.pyi | 0 .../machine_learning/v1/machine_learning_pb2_grpc.py | 0 .../{proto-gen => generated}/where_child_bus/v1/bus_pb2.py | 0 .../{proto-gen => generated}/where_child_bus/v1/bus_pb2.pyi | 0 .../where_child_bus/v1/bus_pb2_grpc.py | 1 - .../where_child_bus/v1/child_pb2.py | 0 .../where_child_bus/v1/child_pb2.pyi | 0 .../where_child_bus/v1/child_pb2_grpc.py | 0 .../where_child_bus/v1/child_photo_pb2.py | 0 .../where_child_bus/v1/child_photo_pb2.pyi | 0 .../where_child_bus/v1/child_photo_pb2_grpc.py | 1 - .../where_child_bus/v1/guardian_pb2.py | 0 .../where_child_bus/v1/guardian_pb2.pyi | 0 .../where_child_bus/v1/guardian_pb2_grpc.py | 0 .../where_child_bus/v1/health_check_pb2.py | 0 .../where_child_bus/v1/health_check_pb2.pyi | 0 .../where_child_bus/v1/health_check_pb2_grpc.py | 1 - .../where_child_bus/v1/nursery_pb2.py | 0 .../where_child_bus/v1/nursery_pb2.pyi | 0 .../where_child_bus/v1/nursery_pb2_grpc.py | 2 -- .../where_child_bus/v1/resources_pb2.py | 0 .../where_child_bus/v1/resources_pb2.pyi | 0 .../where_child_bus/v1/resources_pb2_grpc.py | 0 .../where_child_bus/v1/station_pb2.py | 0 .../where_child_bus/v1/station_pb2.pyi | 0 .../where_child_bus/v1/station_pb2_grpc.py | 1 - proto/buf.gen.yaml | 6 +++--- 31 files changed, 3 insertions(+), 9 deletions(-) rename machine_learning/src/{proto-gen => generated}/machine_learning/v1/health_check_pb2.py (100%) rename machine_learning/src/{proto-gen => generated}/machine_learning/v1/health_check_pb2.pyi (100%) rename machine_learning/src/{proto-gen => generated}/machine_learning/v1/health_check_pb2_grpc.py (100%) rename machine_learning/src/{proto-gen => generated}/machine_learning/v1/machine_learning_pb2.py (100%) rename machine_learning/src/{proto-gen => generated}/machine_learning/v1/machine_learning_pb2.pyi (100%) rename machine_learning/src/{proto-gen => generated}/machine_learning/v1/machine_learning_pb2_grpc.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/bus_pb2.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/bus_pb2.pyi (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/bus_pb2_grpc.py (99%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/child_pb2.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/child_pb2.pyi (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/child_pb2_grpc.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/child_photo_pb2.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/child_photo_pb2.pyi (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/child_photo_pb2_grpc.py (99%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/guardian_pb2.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/guardian_pb2.pyi (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/guardian_pb2_grpc.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/health_check_pb2.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/health_check_pb2.pyi (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/health_check_pb2_grpc.py (99%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/nursery_pb2.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/nursery_pb2.pyi (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/nursery_pb2_grpc.py (99%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/resources_pb2.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/resources_pb2.pyi (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/resources_pb2_grpc.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/station_pb2.py (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/station_pb2.pyi (100%) rename machine_learning/src/{proto-gen => generated}/where_child_bus/v1/station_pb2_grpc.py (99%) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.py b/machine_learning/src/generated/machine_learning/v1/health_check_pb2.py similarity index 100% rename from machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.py rename to machine_learning/src/generated/machine_learning/v1/health_check_pb2.py diff --git a/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.pyi b/machine_learning/src/generated/machine_learning/v1/health_check_pb2.pyi similarity index 100% rename from machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2.pyi rename to machine_learning/src/generated/machine_learning/v1/health_check_pb2.pyi diff --git a/machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py similarity index 100% rename from machine_learning/src/proto-gen/machine_learning/v1/health_check_pb2_grpc.py rename to machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py similarity index 100% rename from machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.py rename to machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi similarity index 100% rename from machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2.pyi rename to machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi diff --git a/machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py similarity index 100% rename from machine_learning/src/proto-gen/machine_learning/v1/machine_learning_pb2_grpc.py rename to machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.py rename to machine_learning/src/generated/where_child_bus/v1/bus_pb2.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2.pyi rename to machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py similarity index 99% rename from machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py rename to machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py index 406ef670..ba60c094 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import grpc.experimental from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py b/machine_learning/src/generated/where_child_bus/v1/child_pb2.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.py rename to machine_learning/src/generated/where_child_bus/v1/child_pb2.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/child_pb2.pyi rename to machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/child_pb2_grpc.py rename to machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.py rename to machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.pyi similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2.pyi rename to machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.pyi diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py similarity index 99% rename from machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py rename to machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py index 7f938756..af91ae42 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/child_photo_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import grpc.experimental from where_child_bus.v1 import child_photo_pb2 as where__child__bus_dot_v1_dot_child__photo__pb2 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.py rename to machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2.pyi rename to machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/guardian_pb2_grpc.py rename to machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.py b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.py rename to machine_learning/src/generated/where_child_bus/v1/health_check_pb2.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.pyi similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2.pyi rename to machine_learning/src/generated/where_child_bus/v1/health_check_pb2.pyi diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py similarity index 99% rename from machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py rename to machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py index 655c0c66..f0f6381c 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/health_check_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import grpc.experimental from where_child_bus.v1 import health_check_pb2 as where__child__bus_dot_v1_dot_health__check__pb2 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.py rename to machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2.pyi rename to machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py similarity index 99% rename from machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py rename to machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py index 238843cd..2d559ee0 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/nursery_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py @@ -1,8 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import grpc.experimental - from where_child_bus.v1 import nursery_pb2 as where__child__bus_dot_v1_dot_nursery__pb2 diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.py rename to machine_learning/src/generated/where_child_bus/v1/resources_pb2.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2.pyi rename to machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/resources_pb2_grpc.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/resources_pb2_grpc.py rename to machine_learning/src/generated/where_child_bus/v1/resources_pb2_grpc.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.py rename to machine_learning/src/generated/where_child_bus/v1/station_pb2.py diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi similarity index 100% rename from machine_learning/src/proto-gen/where_child_bus/v1/station_pb2.pyi rename to machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py similarity index 99% rename from machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py rename to machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py index 06b1eefb..d1b97011 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import grpc.experimental from where_child_bus.v1 import station_pb2 as where__child__bus_dot_v1_dot_station__pb2 diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index c53551c5..1d2176eb 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -18,12 +18,12 @@ plugins: # Python用の設定 (クライアント側) - plugin: buf.build/grpc/python:v1.61.0 out: - ../machine_learning/src/proto-gen/ + ../machine_learning/src/generated/ # dependencies - plugin: buf.build/protocolbuffers/python:v25.2 - out: ../machine_learning/src/proto-gen/ + out: ../machine_learning/src/generated/ - plugin: buf.build/protocolbuffers/pyi:v25.2 - out: ../machine_learning/src/proto-gen/ + out: ../machine_learning/src/generated/ # Dart用の設定 (クライアント側) - name: dart From 1ac641a2d0f4012e7138041b2d9ed76eb7ad65b0 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 22:52:17 +0900 Subject: [PATCH 474/771] =?UTF-8?q?refactor(ml):=20=E3=83=A1=E3=82=BD?= =?UTF-8?q?=E3=83=83=E3=83=89=E5=90=8D=E3=81=AE=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/data/faceDetectDataset.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index 86c79865..b69dab70 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -10,10 +10,7 @@ from face_detect_model.gcp_util import get_bucket, get_blobs -# TODO: GCSに関する処理を別ファイルに切り出す - -# 画像の読み込みを切り出す # (child_id, image)のタプルを返す class FaceDetectDataset(torch.utils.data.Dataset): @@ -112,7 +109,7 @@ def __len__(self): def __getitem__(self, idx): return self.face_data[idx] - def get_label_name_dict(self): + def get_idx_label_dict(self): return self.label_name_dict def get_label_num(self): From c08a2343949c2ba7824091b11d43c256d3134c01 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 22:54:38 +0900 Subject: [PATCH 475/771] =?UTF-8?q?feat(ml):=20=E3=83=A2=E3=83=87=E3=83=AB?= =?UTF-8?q?=E3=81=AE=E5=87=BA=E5=8A=9B=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E3=81=A8=E3=83=A9=E3=83=99=E3=83=AB=E3=81=AE?= =?UTF-8?q?=E8=BE=9E=E6=9B=B8=E3=82=92GCS=E3=81=AB=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/main.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index 4ec467bd..6781dd90 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -1,12 +1,13 @@ import yaml import argparse import torch +import os from face_detect_model.data.faceDetectDataset import FaceDetectDataset from face_detect_model.model.faceDetectModel import FaceDetectModel from face_detect_model.trainer import Trainer -from face_detect_model.util import logger -from face_detect_model.gcp_util import init_client +from face_detect_model.util import logger, save_pickle_to_gcs +from face_detect_model.gcp_util import init_client, get_bucket from dotenv import load_dotenv load_dotenv("secrets/.env") @@ -40,6 +41,20 @@ def TrainAndTest(args: argparse.Namespace, config: dict): logger.info("model Initializing") num_classes = dataset.get_label_num() image_shape = dataset.get_image_shape() + + idx_to_label = dataset.get_idx_label_dict() + if args.mode == "train": + bucket = get_bucket( + client, + os.environ.get("BUCKET_NAME_FOR_MODEL"), + ) + save_pickle_to_gcs( + bucket=bucket, + upload_model_path=f"{args.nursery_id}/{args.bus_id}/{args.bus_type}_idx_to_label.pth", + obj=idx_to_label, + ) + logger.info("idx_to_label is saved") + face_detect_model = FaceDetectModel( config, num_classes=num_classes, input_dim=image_shape ) From bc5579290aa20381e48bc98012457fc90754ddfe Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 22:55:49 +0900 Subject: [PATCH 476/771] =?UTF-8?q?refactor(ml):=20model=E3=81=AEpickle?= =?UTF-8?q?=E3=81=A8index=E3=81=A8=E3=83=A9=E3=83=99=E3=83=AB=E3=81=AE?= =?UTF-8?q?=E8=BE=9E=E6=9B=B8=E3=81=AEpickle=E3=82=92=E5=90=8C=E3=81=98?= =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=82=92=E5=88=A9=E7=94=A8?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/trainer.py | 6 +++--- machine_learning/src/face_detect_model/util.py | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/machine_learning/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py index bfea625e..2399deb8 100644 --- a/machine_learning/src/face_detect_model/trainer.py +++ b/machine_learning/src/face_detect_model/trainer.py @@ -6,7 +6,7 @@ from face_detect_model.data.faceDetectDataset import FaceDetectDataset from face_detect_model.model.faceDetectModel import FaceDetectModel -from face_detect_model.util import logger, save_model_to_gcs +from face_detect_model.util import logger, save_pickle_to_gcs from face_detect_model.gcp_util import get_bucket @@ -80,10 +80,10 @@ def train(self): self.validate() self.test() - save_model_to_gcs( + save_pickle_to_gcs( bucket=self.bucket, upload_model_path=f"{self.args.nursery_id}/{self.args.bus_id}/{self.args.bus_type}.pth", - model_instance=self.model, + obj=self.model.state_dict(), ) def step(self, label: torch.Tensor, image: torch.Tensor): diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index ca1c3fab..641a5630 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -64,11 +64,9 @@ def _is_valid_file(file_name): return os.path.splitext(file_name)[1].lower() in VALID_EXTENSIONS -def save_model_to_gcs( - bucket: Bucket, upload_model_path: str, model_instance: torch.nn.Module -): +def save_pickle_to_gcs(bucket: Bucket, upload_model_path: str, obj: object): logger.info(f"Saving model to {upload_model_path}") blob = bucket.blob(upload_model_path) with blob.open("wb", ignore_flush=True) as f: - torch.save(model_instance.state_dict(), f) + torch.save(obj, f) logger.info(f"Model saved to {upload_model_path}") From 48734a770340e2e7faa8f3ab976a1f6c82234d33 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 18 Feb 2024 23:00:12 +0900 Subject: [PATCH 477/771] =?UTF-8?q?feat:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=81=AB=E7=B5=90=E3=81=B3=E4=BB=98=E3=81=8F=E5=AD=90=E4=BE=9B?= =?UTF-8?q?=E3=82=92=E5=8F=96=E5=BE=97=E3=81=99=E3=82=8B=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/lib/app.dart | 4 +- .../components/daily_record_body.dart | 23 +++--- .../components/daily_record_slider.dart | 9 ++- .../lib/pages/daily_page/daily_page.dart | 81 +++++++++++++++---- .../get_child_list_by_guardian_id.dart | 13 +++ .../lib/util/api/child.dart | 33 ++++++++ 6 files changed, 130 insertions(+), 33 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/service/get_child_list_by_guardian_id.dart create mode 100644 frontend/where_child_bus_guardian/lib/util/api/child.dart diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index a3cc11e5..f2166b7a 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -23,7 +23,9 @@ class _AppState extends State { title: Text(['日々の記録', '地図', '乗車確認'][_selectedIndex]), ), body: [ - const DailyPage(), + DailyPage( + guardian: widget.guardian, + ), const MapPage(), const CheckPage() ][_selectedIndex], diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 9cc0dc53..65cef1dc 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -1,22 +1,19 @@ import 'package:flutter/material.dart'; import '../styles/styles.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class DailyRecordBody extends StatefulWidget { - final String childName; + final Child child; - const DailyRecordBody({super.key, required this.childName}); + const DailyRecordBody({super.key, required this.child}); @override State createState() => _DailyRecordBody(); } class _DailyRecordBody extends State { - //TODO: 将来的にChild型を受け取る - var isBoarding = true; - var hasBag = false; - var hasLunchBox = true; - var hasWaterBottle = true; - var hasUmbrella = true; + //TODO: 将来的にAPIからデータを受け取る + var isBoarding = false; @override Widget build(BuildContext context) { @@ -26,7 +23,7 @@ class _DailyRecordBody extends State { Padding( padding: const EdgeInsets.only(top: 20, bottom: 10), child: Text( - widget.childName, + widget.child.name, style: TextStyle(fontSize: 24), textAlign: TextAlign.center, )), @@ -106,10 +103,10 @@ class _DailyRecordBody extends State { runAlignment: WrapAlignment.spaceBetween, runSpacing: 4.0, children: [ - itemText("かばん", hasBag), - itemText("お弁当", hasLunchBox), - itemText("水筒", hasWaterBottle), - itemText("傘", hasUmbrella), + itemText("かばん", widget.child.hasBag), + itemText("お弁当", widget.child.hasLunchBox), + itemText("水筒", widget.child.hasWaterBottle), + itemText("傘", widget.child.hasUmbrella), ], ), ); diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart index 638fa0cd..f23e0386 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart @@ -1,11 +1,12 @@ import 'package:flutter/material.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:where_child_bus_guardian/pages/daily_page/components/daily_record_body.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class DailyRecordSlider extends StatefulWidget { - final List childNames; + final List children; - const DailyRecordSlider({super.key, required this.childNames}); + const DailyRecordSlider({super.key, required this.children}); @override State createState() => _DailyRecordSlider(); @@ -16,8 +17,8 @@ class _DailyRecordSlider extends State { @override Widget build(BuildContext context) { - List recordList = widget.childNames.map((childName) { - return DailyRecordBody(childName: childName); + List recordList = widget.children.map((child) { + return DailyRecordBody(child: child); }).toList(); return Column( diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index a0ec3868..4813a1ab 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -1,32 +1,83 @@ +import "dart:developer" as developer; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus_guardian/components/utils/current_time_body.dart'; import 'package:where_child_bus_guardian/pages/daily_page/components/daily_record_slider.dart'; +import 'package:where_child_bus_guardian/service/get_child_list_by_guardian_id.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class DailyPage extends StatefulWidget { - const DailyPage({super.key}); + final GuardianResponse guardian; + + const DailyPage({super.key, required this.guardian}); @override State createState() => _DailyPageState(); } class _DailyPageState extends State { - //TODO: 将来的にChild型を受け取る - final List childNames = ["園児1", "園児2", "園児3"]; + List children = []; + bool _isLoading = true; + bool _isFailLoading = false; + + @override + void initState() { + super.initState(); + _loadChildList(); + } + + Future _loadChildList() async { + String guardianId = widget.guardian.id; + List childList = await getChildList(guardianId); + try { + if (mounted) { + setState(() { + children = childList; + _isLoading = false; + }); + } + } catch (e) { + if (kDebugMode) { + developer.log("園児リストのロード中にエラーが発生しました: $e"); + } + setState(() => {_isLoading = false, _isFailLoading = true}); + } + } @override Widget build(BuildContext context) { - return Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - CurrentTimeBody(), - const SizedBox( - height: 20, - ), - DailyRecordSlider(childNames: childNames), - ], - ), + return _isLoading + ? const Center( + child: CircularProgressIndicator(), + ) + : Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + CurrentTimeBody(), + const SizedBox( + height: 20, + ), + if (_isFailLoading) loadFailText(), + if (children.isEmpty) noChildDataText(), + DailyRecordSlider(children: children), + ], + ), + ); + } + + Widget loadFailText() { + return const Padding( + padding: EdgeInsets.all(20), + child: Text("園児のロードに失敗しました"), + ); + } + + Widget noChildDataText() { + return const Padding( + padding: EdgeInsets.all(20), + child: Text("園児が登録されていません"), ); } } diff --git a/frontend/where_child_bus_guardian/lib/service/get_child_list_by_guardian_id.dart b/frontend/where_child_bus_guardian/lib/service/get_child_list_by_guardian_id.dart new file mode 100644 index 00000000..385c4841 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/service/get_child_list_by_guardian_id.dart @@ -0,0 +1,13 @@ +import 'package:where_child_bus_guardian/util/api/child.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pb.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +Future> getChildList(String guardianId) async { + try { + GetChildListByGuardianIDResponse childListResponse = + await getChildListByGuardianID(guardianId); + return childListResponse.children; + } catch (error) { + return Future.error(error); + } +} diff --git a/frontend/where_child_bus_guardian/lib/util/api/child.dart b/frontend/where_child_bus_guardian/lib/util/api/child.dart new file mode 100644 index 00000000..9d19b349 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/util/api/child.dart @@ -0,0 +1,33 @@ +import 'dart:developer' as developer; +import 'package:flutter/foundation.dart'; +import 'package:grpc/grpc.dart'; +import 'package:where_child_bus_guardian/config/config.dart'; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart"; + +Future performGrpcCall( + Future Function(ChildServiceClient) grpcCall) async { + final channel = + ClientChannel(appConfig.grpcEndpoint, port: appConfig.grpcPort); + final grpcClient = ChildServiceClient(channel); + + try { + final result = await grpcCall(grpcClient); + if (kDebugMode) { + developer.log("レスポンス: $result"); + } + return result; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } finally { + await channel.shutdown(); + } +} + +Future getChildListByGuardianID( + String guardianId) async { + return performGrpcCall((client) async { + var req = GetChildListByGuardianIDRequest(guardianId: guardianId); + return client.getChildListByGuardianID(req); + }); +} From 6ee225019d358e07e17e3a6373595c2dc3e6db94 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 18 Feb 2024 23:01:22 +0900 Subject: [PATCH 478/771] chore:fix typo --- frontend/where_child_bus/lib/util/api/health_check.dart | 2 +- .../where_child_bus_guardian/lib/util/api/health_check.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/lib/util/api/health_check.dart b/frontend/where_child_bus/lib/util/api/health_check.dart index dd5e2f26..5d84ef8d 100644 --- a/frontend/where_child_bus/lib/util/api/health_check.dart +++ b/frontend/where_child_bus/lib/util/api/health_check.dart @@ -10,7 +10,7 @@ Future serviceHealthCheck() async { port: appConfig.grpcPort, ); - final grpcClient = HealthCheckServiceClient(channel, + final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 60))); try { diff --git a/frontend/where_child_bus_guardian/lib/util/api/health_check.dart b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart index 8e1f14d0..ba495f49 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/health_check.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart @@ -10,7 +10,7 @@ Future serviceHealthCheck() async { port: appConfig.grpcPort, ); - final grpcClient = HealthCheckServiceClient(channel, + final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 60))); try { From 25e2d703e81a7f89869eae42a3758c39ac3d9f56 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sun, 18 Feb 2024 23:20:56 +0900 Subject: [PATCH 479/771] =?UTF-8?q?fix:=20GetChildListByGuardianID?= =?UTF-8?q?=E5=86=85=E3=81=A7=E4=BF=9D=E8=82=B2=E5=9C=92=E3=81=AE=E5=8F=96?= =?UTF-8?q?=E5=BE=97=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/child/child.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index e058f53e..ed8c26be 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -165,8 +165,8 @@ func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetCh return nil, err } - nursery, err := i.entClient.Guardian.Query(). - Where(guardianRepo.HasNurseryWith(nurseryRepo.HasGuardiansWith(guardianRepo.IDEQ(guardianID)))). + nursery, err := i.entClient.Nursery.Query(). + Where(nurseryRepo.HasGuardiansWith(guardianRepo.ID(guardianID))). Only(ctx) if err != nil { From c87aff8ddbc67a3a8c2ab5eaa2e238a676938765 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sun, 18 Feb 2024 23:22:48 +0900 Subject: [PATCH 480/771] =?UTF-8?q?feat:image=5Ffrom=5Fbyte.dart=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/image_from_byte.dart | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 frontend/where_child_bus_guardian/lib/components/utils/image_from_byte.dart diff --git a/frontend/where_child_bus_guardian/lib/components/utils/image_from_byte.dart b/frontend/where_child_bus_guardian/lib/components/utils/image_from_byte.dart new file mode 100644 index 00000000..98af072a --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/components/utils/image_from_byte.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; +import 'dart:typed_data'; // Uint8Listを使用するために必要 + +class ImageFromBytes extends StatelessWidget { + final List imageData; + final int height; + final int width; + + const ImageFromBytes( + {Key? key, + required this.imageData, + required this.height, + required this.width}) + : super(key: key); + + @override + Widget build(BuildContext context) { + // int配列をUint8Listに変換 + final Uint8List bytes = Uint8List.fromList(imageData); + return SizedBox( + height: height.toDouble(), + width: width.toDouble(), + child: Image.memory(bytes)); + } +} From 346bd74c1cee2c34f645152a14482bd09076bdcd Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sun, 18 Feb 2024 23:43:08 +0900 Subject: [PATCH 481/771] =?UTF-8?q?feat:=E3=82=AB=E3=83=A1=E3=83=A9?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E6=A9=9F=E8=83=BD=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/android/app/build.gradle | 1 + frontend/where_child_bus/lib/app.dart | 11 +++- frontend/where_child_bus/lib/main.dart | 12 +++-- .../lib/pages/camera_page/camera_page.dart | 50 +++++++++++++++++++ frontend/where_child_bus/pubspec.lock | 50 ++++++++++++++++++- frontend/where_child_bus/pubspec.yaml | 1 + 6 files changed, 118 insertions(+), 7 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/camera_page/camera_page.dart diff --git a/frontend/where_child_bus/android/app/build.gradle b/frontend/where_child_bus/android/app/build.gradle index 9f7a8711..ba77458a 100644 --- a/frontend/where_child_bus/android/app/build.gradle +++ b/frontend/where_child_bus/android/app/build.gradle @@ -49,6 +49,7 @@ android { targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName + minSdkVersion 21 //cameraパッケージの使用に必要 } buildTypes { diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index 98b48d0e..c2484a98 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_list_page.dart'; +import 'package:where_child_bus/pages/camera_page/camera_page.dart'; import 'package:where_child_bus/pages/notification_page/notification_page.dart'; import 'package:where_child_bus/pages/student_list_page/student_list_page.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -20,14 +21,16 @@ class _AppState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定'][_selectedIndex]), + title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定', 'カメラ'][_selectedIndex]), ), body: [ ChildListPage(), BusListPage(), - const NotificationPage() + const NotificationPage(), + CameraPage() ][_selectedIndex], bottomNavigationBar: BottomNavigationBar( + type: BottomNavigationBarType.fixed, currentIndex: _selectedIndex, onTap: (int index) => setState(() => _selectedIndex = index), items: const [ @@ -43,6 +46,10 @@ class _AppState extends State { icon: Icon(Icons.notifications), label: '連絡情報設定', ), + BottomNavigationBarItem( + icon: Icon(Icons.camera), + label: 'カメラ', + ), ], ), ); diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index fa661399..96aa862f 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -1,9 +1,12 @@ +import 'package:camera/camera.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/config/config.dart'; import 'package:where_child_bus/pages/auth_page/auth_page.dart'; import 'package:where_child_bus/util/api/health_check.dart'; -void main() async { +List cameras = []; + +Future main() async { WidgetsFlutterBinding.ensureInitialized(); try { @@ -12,6 +15,10 @@ void main() async { } catch (e) { print("Failed to initialize the app"); } + + //カメラを取得 + cameras = await availableCameras(); + runApp(const MyApp()); } @@ -30,9 +37,6 @@ class _MyAppState extends State { theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, - appBarTheme: const AppBarTheme( - backgroundColor: Colors.white, // AppBarの背景色を白に設定 - ), ), home: const AuthPage(), ); diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart new file mode 100644 index 00000000..a6b52aac --- /dev/null +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -0,0 +1,50 @@ +import 'dart:io'; +import "dart:developer" as developer; +import 'package:camera/camera.dart'; +import 'package:flutter/material.dart'; +import 'dart:async'; +import "package:where_child_bus/main.dart" as where_child_bus; + +class CameraPage extends StatefulWidget { + const CameraPage({ + Key? key, + }) : super(key: key); + + @override + _CameraPageState createState() => _CameraPageState(); +} + +class _CameraPageState extends State { + late CameraController _controller; + + @override + void initState() { + super.initState(); + _controller = CameraController( + where_child_bus.cameras.first, + ResolutionPreset.medium, + ); + _controller.initialize().then((_) { + if (!mounted) { + return; + } + setState(() {}); + }); + } + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + if (!_controller.value.isInitialized) { + return Container(); + } + return Scaffold( + body: CameraPreview(_controller), + ); + } +} diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index 558d5b38..84f4a268 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -33,6 +33,46 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + camera: + dependency: "direct main" + description: + name: camera + sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + url: "https://pub.dev" + source: hosted + version: "0.10.5+9" + camera_android: + dependency: transitive + description: + name: camera_android + sha256: "351429510121d179b9aac5a2e8cb525c3cd6c39f4d709c5f72dfb21726e52371" + url: "https://pub.dev" + source: hosted + version: "0.10.8+16" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "7d0763dfcbf060f56aa254a68c103210280bee9e97bbe4fdef23e257a4f70ab9" + url: "https://pub.dev" + source: hosted + version: "0.9.14" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: fceb2c36038b6392317b1d5790c6ba9e6ca9f1da3031181b8bea03882bf9387a + url: "https://pub.dev" + source: hosted + version: "2.7.3" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: f18ccfb33b2a7c49a52ad5aa3f07330b7422faaecbdfd9b9fe8e51182f6ad67d + url: "https://pub.dev" + source: hosted + version: "0.3.2+4" characters: dependency: transitive description: @@ -501,6 +541,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" string_scanner: dependency: transitive description: @@ -590,4 +638,4 @@ packages: version: "1.0.4" sdks: dart: ">=3.2.6 <4.0.0" - flutter: ">=3.10.0" + flutter: ">=3.16.6" diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 872b9719..0aa0c0d2 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -15,6 +15,7 @@ dependencies: flutter_dotenv: ^5.1.0 image_picker: ^1.0.7 flutter_cache_manager: ^3.3.1 + camera: ^0.10.5+9 where_child_bus_api: path: ../where_child_bus_api From 53f7980c35d1ada2a0d70b1150416705e80d3e30 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 23:49:34 +0900 Subject: [PATCH 482/771] =?UTF-8?q?fix(ml):=20import=20path=E3=82=92?= =?UTF-8?q?=E6=AD=A3=E3=81=97=E3=81=84=E3=82=82=E3=81=AE=E3=81=AB=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/health_check_pb2_grpc.py | 67 ++++--- .../v1/machine_learning_pb2.py | 47 +++-- .../v1/machine_learning_pb2_grpc.py | 187 +++++++++++------- .../generated/where_child_bus/v1/bus_pb2.py | 71 ++++--- 4 files changed, 224 insertions(+), 148 deletions(-) diff --git a/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py index a9cd43e0..b4c7ae61 100644 --- a/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py +++ b/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py @@ -2,7 +2,9 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from machine_learning.v1 import health_check_pb2 as machine__learning_dot_v1_dot_health__check__pb2 +from generated.machine_learning.v1 import ( + health_check_pb2 as machine__learning_dot_v1_dot_health__check__pb2, +) class HealthcheckServiceStub(object): @@ -15,10 +17,10 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Ping = channel.unary_unary( - '/machine_learning.v1.HealthcheckService/Ping', - request_serializer=machine__learning_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_health__check__pb2.PingResponse.FromString, - ) + "/machine_learning.v1.HealthcheckService/Ping", + request_serializer=machine__learning_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_health__check__pb2.PingResponse.FromString, + ) class HealthcheckServiceServicer(object): @@ -27,40 +29,53 @@ class HealthcheckServiceServicer(object): def Ping(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_HealthcheckServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'Ping': grpc.unary_unary_rpc_method_handler( - servicer.Ping, - request_deserializer=machine__learning_dot_v1_dot_health__check__pb2.PingRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_health__check__pb2.PingResponse.SerializeToString, - ), + "Ping": grpc.unary_unary_rpc_method_handler( + servicer.Ping, + request_deserializer=machine__learning_dot_v1_dot_health__check__pb2.PingRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_health__check__pb2.PingResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'machine_learning.v1.HealthcheckService', rpc_method_handlers) + "machine_learning.v1.HealthcheckService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class HealthcheckService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Ping(request, + def Ping( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.HealthcheckService/Ping', + "/machine_learning.v1.HealthcheckService/Ping", machine__learning_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, machine__learning_dot_v1_dot_health__check__pb2.PingResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py index 68f8f6bb..608bdfa6 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py @@ -7,33 +7,44 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 -from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from generated.where_child_bus.v1 import ( + bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2, +) +from generated.where_child_bus.v1 import ( + resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, +) -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a\"where_child_bus/v1/resources.proto\"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xb6\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xb6\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'machine_learning.v1.machine_learning_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "machine_learning.v1.machine_learning_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' - _globals['_TRAINREQUEST']._serialized_start=134 - _globals['_TRAINREQUEST']._serialized_end=287 - _globals['_TRAINRESPONSE']._serialized_start=289 - _globals['_TRAINRESPONSE']._serialized_end=335 - _globals['_PREDRESPONSE']._serialized_start=337 - _globals['_PREDRESPONSE']._serialized_end=413 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=415 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=499 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=501 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=559 - _globals['_MACHINELEARNINGSERVICE']._serialized_start=562 - _globals['_MACHINELEARNINGSERVICE']._serialized_end=872 + _globals["DESCRIPTOR"]._options = None + _globals["DESCRIPTOR"]._serialized_options = ( + b"\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" + ) + _globals["_TRAINREQUEST"]._serialized_start = 134 + _globals["_TRAINREQUEST"]._serialized_end = 287 + _globals["_TRAINRESPONSE"]._serialized_start = 289 + _globals["_TRAINRESPONSE"]._serialized_end = 335 + _globals["_PREDRESPONSE"]._serialized_start = 337 + _globals["_PREDRESPONSE"]._serialized_end = 413 + _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_start = 415 + _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_end = 499 + _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_start = 501 + _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_end = 559 + _globals["_MACHINELEARNINGSERVICE"]._serialized_start = 562 + _globals["_MACHINELEARNINGSERVICE"]._serialized_end = 872 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py index 7d9fccc4..699c2f1a 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py @@ -2,8 +2,12 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from machine_learning.v1 import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 -from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 +from generated.machine_learning.v1 import ( + machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2, +) +from generated.where_child_bus.v1 import ( + bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2, +) class MachineLearningServiceStub(object): @@ -16,20 +20,20 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Train = channel.unary_unary( - '/machine_learning.v1.MachineLearningService/Train', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/Train", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, + ) self.Pred = channel.stream_stream( - '/machine_learning.v1.MachineLearningService/Pred', - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/Pred", + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, + ) self.FaceDetectAndClip = channel.unary_unary( - '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, + ) class MachineLearningServiceServicer(object): @@ -38,96 +42,133 @@ class MachineLearningServiceServicer(object): def Train(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def Pred(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def FaceDetectAndClip(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_MachineLearningServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'Train': grpc.unary_unary_rpc_method_handler( - servicer.Train, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, - ), - 'Pred': grpc.stream_stream_rpc_method_handler( - servicer.Pred, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, - ), - 'FaceDetectAndClip': grpc.unary_unary_rpc_method_handler( - servicer.FaceDetectAndClip, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, - ), + "Train": grpc.unary_unary_rpc_method_handler( + servicer.Train, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, + ), + "Pred": grpc.stream_stream_rpc_method_handler( + servicer.Pred, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, + ), + "FaceDetectAndClip": grpc.unary_unary_rpc_method_handler( + servicer.FaceDetectAndClip, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'machine_learning.v1.MachineLearningService', rpc_method_handlers) + "machine_learning.v1.MachineLearningService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class MachineLearningService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Train(request, + def Train( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/Train', + "/machine_learning.v1.MachineLearningService/Train", machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def Pred(request_iterator, + def Pred( + request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.stream_stream( + request_iterator, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.stream_stream(request_iterator, target, '/machine_learning.v1.MachineLearningService/Pred', + "/machine_learning.v1.MachineLearningService/Pred", where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def FaceDetectAndClip(request, + def FaceDetectAndClip( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', + "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index a81f1665..afa610b6 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -7,47 +7,56 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from generated.where_child_bus.v1 import ( + resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, +) from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xaa\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa7\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"\xff\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12<\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"\xaa\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp" \n\x1eSendLocationContinuousResponse"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"\xa7\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp"\xff\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12<\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.bus_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.bus_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATEBUSREQUEST']._serialized_start=122 - _globals['_CREATEBUSREQUEST']._serialized_end=326 - _globals['_CREATEBUSRESPONSE']._serialized_start=328 - _globals['_CREATEBUSRESPONSE']._serialized_end=390 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=392 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=453 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=455 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=533 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=535 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=634 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=636 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=704 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=707 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=877 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=879 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=911 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=913 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=963 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=966 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1133 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1136 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1391 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1393 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1505 - _globals['_BUSSERVICE']._serialized_start=1508 - _globals['_BUSSERVICE']._serialized_end=2202 + _globals["DESCRIPTOR"]._options = None + _globals["DESCRIPTOR"]._serialized_options = ( + b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + ) + _globals["_CREATEBUSREQUEST"]._serialized_start = 122 + _globals["_CREATEBUSREQUEST"]._serialized_end = 326 + _globals["_CREATEBUSRESPONSE"]._serialized_start = 328 + _globals["_CREATEBUSRESPONSE"]._serialized_end = 390 + _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_start = 392 + _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_end = 453 + _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_start = 455 + _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_end = 533 + _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_start = 535 + _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_end = 634 + _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_start = 636 + _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_end = 704 + _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_start = 707 + _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_end = 877 + _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_start = 879 + _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_end = 911 + _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_start = 913 + _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_end = 963 + _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_start = 966 + _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_end = 1133 + _globals["_STREAMBUSVIDEOREQUEST"]._serialized_start = 1136 + _globals["_STREAMBUSVIDEOREQUEST"]._serialized_end = 1391 + _globals["_STREAMBUSVIDEORESPONSE"]._serialized_start = 1393 + _globals["_STREAMBUSVIDEORESPONSE"]._serialized_end = 1505 + _globals["_BUSSERVICE"]._serialized_start = 1508 + _globals["_BUSSERVICE"]._serialized_end = 2202 # @@protoc_insertion_point(module_scope) From 1709669952d5ed632aba456303ac6b0a51606feb Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sun, 18 Feb 2024 23:50:50 +0900 Subject: [PATCH 483/771] =?UTF-8?q?feat(ml):=20request=E3=81=A7=E5=8F=97?= =?UTF-8?q?=E3=81=91=E5=8F=96=E3=81=A3=E3=81=9Fint=E3=81=AEbus=5Ftype?= =?UTF-8?q?=E3=82=92str=E3=81=AB=E3=81=97=EF=BC=8C=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=85=88=E3=81=A8=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/main.py | 6 +++--- machine_learning/src/face_detect_model/trainer.py | 4 ++-- machine_learning/src/face_detect_model/util.py | 12 ++++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index 6781dd90..c7edb50b 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -6,7 +6,7 @@ from face_detect_model.data.faceDetectDataset import FaceDetectDataset from face_detect_model.model.faceDetectModel import FaceDetectModel from face_detect_model.trainer import Trainer -from face_detect_model.util import logger, save_pickle_to_gcs +from face_detect_model.util import logger, save_pickle_to_gcs, switch_to_bus_type from face_detect_model.gcp_util import init_client, get_bucket from dotenv import load_dotenv @@ -50,7 +50,7 @@ def TrainAndTest(args: argparse.Namespace, config: dict): ) save_pickle_to_gcs( bucket=bucket, - upload_model_path=f"{args.nursery_id}/{args.bus_id}/{args.bus_type}_idx_to_label.pth", + upload_model_path=f"{args.nursery_id}/{args.bus_id}/idx_to_label_{switch_to_bus_type(args.bus_type)}.pth", obj=idx_to_label, ) logger.info("idx_to_label is saved") @@ -73,6 +73,7 @@ def TrainAndTest(args: argparse.Namespace, config: dict): if args.mode == "train": # 学習 trainer.train() + logger.info("Done training!") elif args.mode == "test": # テスト face_detect_model.load_state_dict( @@ -86,7 +87,6 @@ def TrainAndTest(args: argparse.Namespace, config: dict): def main(args: argparse.Namespace): with open("src/face_detect_model/config.yaml", "r") as f: config = yaml.safe_load(f) - TrainAndTest(args, config) diff --git a/machine_learning/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py index 2399deb8..14a6fca7 100644 --- a/machine_learning/src/face_detect_model/trainer.py +++ b/machine_learning/src/face_detect_model/trainer.py @@ -6,7 +6,7 @@ from face_detect_model.data.faceDetectDataset import FaceDetectDataset from face_detect_model.model.faceDetectModel import FaceDetectModel -from face_detect_model.util import logger, save_pickle_to_gcs +from face_detect_model.util import logger, save_pickle_to_gcs, switch_to_bus_type from face_detect_model.gcp_util import get_bucket @@ -82,7 +82,7 @@ def train(self): self.test() save_pickle_to_gcs( bucket=self.bucket, - upload_model_path=f"{self.args.nursery_id}/{self.args.bus_id}/{self.args.bus_type}.pth", + upload_model_path=f"{self.args.nursery_id}/{self.args.bus_id}/model_{switch_to_bus_type(self.args.bus_type)}.pth", obj=self.model.state_dict(), ) diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index 641a5630..0194cd50 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -36,6 +36,18 @@ def get_child_id(blob_name: str): return child_id +def switch_to_bus_type(bus_type_num: int): + bus_type_str = "BUS_TYPE_" + if bus_type_num == 0: + return bus_type_str + "UNSPECIFIED" + elif bus_type_num == 1: + return bus_type_str + "MORNING" + elif bus_type_num == 2: + return bus_type_str + "EVENING" + else: + raise ValueError(f"Invalid bus_type: {bus_type_num}") + + def load_image_from_remote(blobs: list): images = [] for blob in blobs: From 4d2da8ec43c908dae8bb417fff8d31d7c1a93c64 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 00:04:53 +0900 Subject: [PATCH 484/771] =?UTF-8?q?refactor(ml):=20TODO=E3=81=AE=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index 0194cd50..780b3266 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -36,6 +36,7 @@ def get_child_id(blob_name: str): return child_id +# TODO: gRPC用に生成されたファイルを用いることができないか検証し,置換 def switch_to_bus_type(bus_type_num: int): bus_type_str = "BUS_TYPE_" if bus_type_num == 0: From 7c1ef47acbecb2bfb843f4bbebb0b70eb6ac35cb Mon Sep 17 00:00:00 2001 From: koto623 Date: Mon, 19 Feb 2024 00:51:42 +0900 Subject: [PATCH 485/771] =?UTF-8?q?feat:=E5=9C=92=E5=85=90=E3=81=AE?= =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/lib/app.dart | 12 +----- .../lib/pages/auth_page/auth_page.dart | 40 ++++++++++++------- .../components/daily_record_body.dart | 26 ++++++------ .../components/daily_record_slider.dart | 14 +++++-- .../lib/pages/daily_page/daily_page.dart | 19 +++++---- .../get_child_list_by_guardian_id.dart | 9 ++--- .../lib/util/api/child.dart | 2 +- .../lib/util/guardian_data.dart | 20 ++++++++++ 8 files changed, 87 insertions(+), 55 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/util/guardian_data.dart diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index f2166b7a..a51d4e55 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -5,9 +5,7 @@ import 'package:where_child_bus_guardian/pages/daily_page/daily_page.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; class App extends StatefulWidget { - GuardianResponse guardian; - - App({super.key, required this.guardian}); + App({super.key}); @override State createState() => _AppState(); @@ -22,13 +20,7 @@ class _AppState extends State { appBar: AppBar( title: Text(['日々の記録', '地図', '乗車確認'][_selectedIndex]), ), - body: [ - DailyPage( - guardian: widget.guardian, - ), - const MapPage(), - const CheckPage() - ][_selectedIndex], + body: [DailyPage(), const MapPage(), const CheckPage()][_selectedIndex], bottomNavigationBar: BottomNavigationBar( currentIndex: _selectedIndex, onTap: (int index) => setState(() => _selectedIndex = index), diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index 89a5031e..0d3d2416 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -1,8 +1,11 @@ import 'dart:developer' as developer; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus_guardian/app.dart'; import 'package:where_child_bus_guardian/models/guardian_login_error.dart'; import 'package:where_child_bus_guardian/util/api/guardian.dart'; +import 'package:where_child_bus_guardian/util/guardian_data.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pb.dart'; class AuthPage extends StatefulWidget { const AuthPage({super.key}); @@ -27,22 +30,31 @@ class _AuthPageState extends State { ); } - void login(String email, String password) async { - if (email.isEmpty || password.isEmpty) { - setState(() => _loginError = GuardianLoginError.fieldsDoNotFilled); - return; - } + login() async { + BuildContext currentContext = context; + GuardianLoginResponse res; try { - final res = await guardianLogin(email, password); + if (kDebugMode) { + res = await guardianLogin("guardian1@example.com", "password"); + } else { + res = await guardianLogin( + _emailController.text, _passwordController.text); + if (_emailController.text.isEmpty || _passwordController.text.isEmpty) { + setState(() => _loginError = GuardianLoginError.fieldsDoNotFilled); + return; + } + } + if (res.success) { - developer.log("$res"); + print(res.success); + print(res.guardian.name); + GuardianData().setGuardian(res.guardian); Navigator.pushReplacement( - context, + currentContext, MaterialPageRoute( - builder: (context) => App( - guardian: res.guardian, - ))); + builder: (BuildContext context) => App(), + )); } else { setState(() => _loginError = GuardianLoginError.invalidCredentials); } @@ -124,9 +136,7 @@ class _AuthPageState extends State { Widget loginButton() => SizedBox( width: MediaQuery.of(context).size.width * 0.6, - child: ElevatedButton( - onPressed: () => - login(_emailController.text, _passwordController.text), - child: const Text('ログイン')), + child: + ElevatedButton(onPressed: () => login(), child: const Text('ログイン')), ); } diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 65cef1dc..9de6910c 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -1,11 +1,14 @@ import 'package:flutter/material.dart'; import '../styles/styles.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; +import 'package:where_child_bus_guardian/components/utils/image_from_byte.dart'; class DailyRecordBody extends StatefulWidget { final Child child; + final ChildPhoto image; - const DailyRecordBody({super.key, required this.child}); + const DailyRecordBody({Key? key, required this.child, required this.image}) + : super(key: key); @override State createState() => _DailyRecordBody(); @@ -37,19 +40,14 @@ class _DailyRecordBody extends State { Widget childFaceAndExpression() { return Row( mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [childFaceImage(), childExpressionIcon()], - ); - } - - //TODO: 将来的に画像を受け取る - Widget childFaceImage() { - return const SizedBox( - width: 150, - height: 150, - child: Card( - color: Colors.grey, - child: Text("ここに子供の写真が入る"), - ), + children: [ + ImageFromBytes( + imageData: widget.image.photoData, + height: 150, + width: 150, + ), + childExpressionIcon() + ], ); } diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart index f23e0386..d83797cb 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart @@ -5,11 +5,15 @@ import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.da class DailyRecordSlider extends StatefulWidget { final List children; + final List images; + final VoidCallback? callback; - const DailyRecordSlider({super.key, required this.children}); + const DailyRecordSlider( + {Key? key, required this.children, required this.images, this.callback}) + : super(key: key); @override - State createState() => _DailyRecordSlider(); + _DailyRecordSlider createState() => _DailyRecordSlider(); } class _DailyRecordSlider extends State { @@ -18,7 +22,11 @@ class _DailyRecordSlider extends State { @override Widget build(BuildContext context) { List recordList = widget.children.map((child) { - return DailyRecordBody(child: child); + int imageIndex = widget.children.indexOf(child); + return DailyRecordBody( + child: child, + image: widget.images[imageIndex], + ); }).toList(); return Column( diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index 4813a1ab..9be0bd73 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -4,12 +4,13 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus_guardian/components/utils/current_time_body.dart'; import 'package:where_child_bus_guardian/pages/daily_page/components/daily_record_slider.dart'; import 'package:where_child_bus_guardian/service/get_child_list_by_guardian_id.dart'; +import 'package:where_child_bus_guardian/util/guardian_data.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pb.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class DailyPage extends StatefulWidget { - final GuardianResponse guardian; - - const DailyPage({super.key, required this.guardian}); + const DailyPage({super.key}); @override State createState() => _DailyPageState(); @@ -17,6 +18,7 @@ class DailyPage extends StatefulWidget { class _DailyPageState extends State { List children = []; + List photos = []; bool _isLoading = true; bool _isFailLoading = false; @@ -27,12 +29,15 @@ class _DailyPageState extends State { } Future _loadChildList() async { - String guardianId = widget.guardian.id; - List childList = await getChildList(guardianId); try { + _isLoading = true; + GetChildListByGuardianIDResponse res = + await getChildListByGuardianIdService( + GuardianData().getGuardian().id); if (mounted) { setState(() { - children = childList; + children = res.children; + photos = res.photos; _isLoading = false; }); } @@ -61,7 +66,7 @@ class _DailyPageState extends State { ), if (_isFailLoading) loadFailText(), if (children.isEmpty) noChildDataText(), - DailyRecordSlider(children: children), + DailyRecordSlider(children: children, images: photos), ], ), ); diff --git a/frontend/where_child_bus_guardian/lib/service/get_child_list_by_guardian_id.dart b/frontend/where_child_bus_guardian/lib/service/get_child_list_by_guardian_id.dart index 385c4841..2f834a8a 100644 --- a/frontend/where_child_bus_guardian/lib/service/get_child_list_by_guardian_id.dart +++ b/frontend/where_child_bus_guardian/lib/service/get_child_list_by_guardian_id.dart @@ -1,12 +1,11 @@ import 'package:where_child_bus_guardian/util/api/child.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pb.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; -Future> getChildList(String guardianId) async { +Future getChildListByGuardianIdService( + String guardianId) async { try { - GetChildListByGuardianIDResponse childListResponse = - await getChildListByGuardianID(guardianId); - return childListResponse.children; + var res = await getChildListByGuardianId(guardianId); + return res; } catch (error) { return Future.error(error); } diff --git a/frontend/where_child_bus_guardian/lib/util/api/child.dart b/frontend/where_child_bus_guardian/lib/util/api/child.dart index 9d19b349..2794a945 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/child.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/child.dart @@ -24,7 +24,7 @@ Future performGrpcCall( } } -Future getChildListByGuardianID( +Future getChildListByGuardianId( String guardianId) async { return performGrpcCall((client) async { var req = GetChildListByGuardianIDRequest(guardianId: guardianId); diff --git a/frontend/where_child_bus_guardian/lib/util/guardian_data.dart b/frontend/where_child_bus_guardian/lib/util/guardian_data.dart new file mode 100644 index 00000000..6c624df0 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/util/guardian_data.dart @@ -0,0 +1,20 @@ +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class GuardianData { + static final GuardianData _singleton = GuardianData._internal(); + late GuardianResponse _guardian; + + factory GuardianData() { + return _singleton; + } + + GuardianData._internal(); + + void setGuardian(GuardianResponse guardian) { + _guardian = guardian; + } + + GuardianResponse getGuardian() { + return _guardian; + } +} From 7d8fef9bce37d8ea0e56a79e50ccdd93f17be9db Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 01:02:57 +0900 Subject: [PATCH 486/771] =?UTF-8?q?feat:=20StreamBusVideo=E3=81=AE?= =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=88=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 376 ++++++++---------- .../proto-gen/where_child_bus/v1/bus.pb.dart | 83 ++-- .../where_child_bus/v1/bus.pbjson.dart | 27 +- .../v1/machine_learning_pb2.py | 47 +-- .../v1/machine_learning_pb2_grpc.py | 187 ++++----- .../generated/where_child_bus/v1/bus_pb2.py | 72 ++-- .../generated/where_child_bus/v1/bus_pb2.pyi | 21 +- proto/where_child_bus/v1/bus.proto | 11 +- 8 files changed, 341 insertions(+), 483 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 49e7b32e..66c9015e 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -9,7 +9,6 @@ package where_child_busv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -349,10 +348,9 @@ type SendLocationContinuousRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` } func (x *SendLocationContinuousRequest) Reset() { @@ -408,13 +406,6 @@ func (x *SendLocationContinuousRequest) GetLongitude() float64 { return 0 } -func (x *SendLocationContinuousRequest) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - type SendLocationContinuousResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -505,10 +496,9 @@ type TrackBusContinuousResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` } func (x *TrackBusContinuousResponse) Reset() { @@ -564,23 +554,16 @@ func (x *TrackBusContinuousResponse) GetLongitude() float64 { return 0 } -func (x *TrackBusContinuousResponse) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - type StreamBusVideoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` - VideoType VideoType `protobuf:"varint,3,opt,name=video_type,json=videoType,proto3,enum=where_child_bus.v1.VideoType" json:"video_type,omitempty"` - VideoChunk []byte `protobuf:"bytes,4,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data - Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + BusType BusType `protobuf:"varint,3,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` + VideoType VideoType `protobuf:"varint,4,opt,name=video_type,json=videoType,proto3,enum=where_child_bus.v1.VideoType" json:"video_type,omitempty"` + VideoChunk []byte `protobuf:"bytes,5,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data } func (x *StreamBusVideoRequest) Reset() { @@ -622,6 +605,13 @@ func (x *StreamBusVideoRequest) GetBusId() string { return "" } +func (x *StreamBusVideoRequest) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + func (x *StreamBusVideoRequest) GetBusType() BusType { if x != nil { return x.BusType @@ -643,13 +633,6 @@ func (x *StreamBusVideoRequest) GetVideoChunk() []byte { return nil } -func (x *StreamBusVideoRequest) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - type StreamBusVideoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -713,154 +696,143 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x12, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x3e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, - 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, - 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x12, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x3e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, + 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, - 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, - 0x22, 0xaa, 0x01, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x20, 0x0a, - 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, - 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, - 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, - 0x73, 0x49, 0x64, 0x22, 0xa7, 0x01, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xff, 0x01, - 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x36, - 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, - 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, + 0x75, 0x73, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, + 0x70, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, + 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0xe4, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, + 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x70, 0x0a, + 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, - 0x75, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, - 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, - 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, - 0x6e, 0x32, 0xb6, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x32, + 0xb6, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, + 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, + 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, - 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, - 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, - 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, - 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, - 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, - 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, - 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, + 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, - 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, - 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, - 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, - 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, - 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, + 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, + 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, + 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -891,39 +863,35 @@ var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ (*StreamBusVideoResponse)(nil), // 11: where_child_bus.v1.StreamBusVideoResponse (*Bus)(nil), // 12: where_child_bus.v1.Bus (Status)(0), // 13: where_child_bus.v1.Status - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp - (BusType)(0), // 15: where_child_bus.v1.BusType - (VideoType)(0), // 16: where_child_bus.v1.VideoType - (*Child)(nil), // 17: where_child_bus.v1.Child + (BusType)(0), // 14: where_child_bus.v1.BusType + (VideoType)(0), // 15: where_child_bus.v1.VideoType + (*Child)(nil), // 16: where_child_bus.v1.Child } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ 12, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus 12, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus 13, // 2: where_child_bus.v1.ChangeBusStatusRequest.status:type_name -> where_child_bus.v1.Status 12, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus - 14, // 4: where_child_bus.v1.SendLocationContinuousRequest.timestamp:type_name -> google.protobuf.Timestamp - 14, // 5: where_child_bus.v1.TrackBusContinuousResponse.timestamp:type_name -> google.protobuf.Timestamp - 15, // 6: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType - 16, // 7: where_child_bus.v1.StreamBusVideoRequest.video_type:type_name -> where_child_bus.v1.VideoType - 14, // 8: where_child_bus.v1.StreamBusVideoRequest.timestamp:type_name -> google.protobuf.Timestamp - 17, // 9: where_child_bus.v1.StreamBusVideoResponse.children:type_name -> where_child_bus.v1.Child - 0, // 10: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest - 2, // 11: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 4, // 12: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest - 6, // 13: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest - 8, // 14: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest - 10, // 15: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest - 1, // 16: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 17: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 5, // 18: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse - 7, // 19: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse - 9, // 20: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse - 11, // 21: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse - 16, // [16:22] is the sub-list for method output_type - 10, // [10:16] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 14, // 4: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType + 15, // 5: where_child_bus.v1.StreamBusVideoRequest.video_type:type_name -> where_child_bus.v1.VideoType + 16, // 6: where_child_bus.v1.StreamBusVideoResponse.children:type_name -> where_child_bus.v1.Child + 0, // 7: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 8: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 4, // 9: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest + 6, // 10: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest + 8, // 11: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest + 10, // 12: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest + 1, // 13: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 14: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 5, // 15: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse + 7, // 16: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse + 9, // 17: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse + 11, // 18: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse + 13, // [13:19] is the sub-list for method output_type + 7, // [7:13] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index 6b07cd3f..dbe83a4d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -13,7 +13,6 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/timestamp.pb.dart' as $7; import 'resources.pb.dart' as $8; import 'resources.pbenum.dart' as $8; @@ -379,7 +378,6 @@ class SendLocationContinuousRequest extends $pb.GeneratedMessage { $core.String? busId, $core.double? latitude, $core.double? longitude, - $7.Timestamp? timestamp, }) { final $result = create(); if (busId != null) { @@ -391,9 +389,6 @@ class SendLocationContinuousRequest extends $pb.GeneratedMessage { if (longitude != null) { $result.longitude = longitude; } - if (timestamp != null) { - $result.timestamp = timestamp; - } return $result; } SendLocationContinuousRequest._() : super(); @@ -404,7 +399,6 @@ class SendLocationContinuousRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'busId') ..a<$core.double>(2, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(3, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$7.Timestamp>(4, _omitFieldNames ? '' : 'timestamp', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -455,17 +449,6 @@ class SendLocationContinuousRequest extends $pb.GeneratedMessage { $core.bool hasLongitude() => $_has(2); @$pb.TagNumber(3) void clearLongitude() => clearField(3); - - @$pb.TagNumber(4) - $7.Timestamp get timestamp => $_getN(3); - @$pb.TagNumber(4) - set timestamp($7.Timestamp v) { setField(4, v); } - @$pb.TagNumber(4) - $core.bool hasTimestamp() => $_has(3); - @$pb.TagNumber(4) - void clearTimestamp() => clearField(4); - @$pb.TagNumber(4) - $7.Timestamp ensureTimestamp() => $_ensure(3); } class SendLocationContinuousResponse extends $pb.GeneratedMessage { @@ -555,7 +538,6 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { $core.String? busId, $core.double? latitude, $core.double? longitude, - $7.Timestamp? timestamp, }) { final $result = create(); if (busId != null) { @@ -567,9 +549,6 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { if (longitude != null) { $result.longitude = longitude; } - if (timestamp != null) { - $result.timestamp = timestamp; - } return $result; } TrackBusContinuousResponse._() : super(); @@ -580,7 +559,6 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'busId') ..a<$core.double>(2, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(3, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$7.Timestamp>(4, _omitFieldNames ? '' : 'timestamp', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -631,31 +609,23 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { $core.bool hasLongitude() => $_has(2); @$pb.TagNumber(3) void clearLongitude() => clearField(3); - - @$pb.TagNumber(4) - $7.Timestamp get timestamp => $_getN(3); - @$pb.TagNumber(4) - set timestamp($7.Timestamp v) { setField(4, v); } - @$pb.TagNumber(4) - $core.bool hasTimestamp() => $_has(3); - @$pb.TagNumber(4) - void clearTimestamp() => clearField(4); - @$pb.TagNumber(4) - $7.Timestamp ensureTimestamp() => $_ensure(3); } class StreamBusVideoRequest extends $pb.GeneratedMessage { factory StreamBusVideoRequest({ $core.String? busId, + $core.String? nurseryId, $8.BusType? busType, $8.VideoType? videoType, $core.List<$core.int>? videoChunk, - $7.Timestamp? timestamp, }) { final $result = create(); if (busId != null) { $result.busId = busId; } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } if (busType != null) { $result.busType = busType; } @@ -665,9 +635,6 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { if (videoChunk != null) { $result.videoChunk = videoChunk; } - if (timestamp != null) { - $result.timestamp = timestamp; - } return $result; } StreamBusVideoRequest._() : super(); @@ -676,10 +643,10 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StreamBusVideoRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') - ..e<$8.BusType>(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) - ..e<$8.VideoType>(3, _omitFieldNames ? '' : 'videoType', $pb.PbFieldType.OE, defaultOrMaker: $8.VideoType.VIDEO_TYPE_UNSPECIFIED, valueOf: $8.VideoType.valueOf, enumValues: $8.VideoType.values) - ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) - ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $7.Timestamp.create) + ..aOS(2, _omitFieldNames ? '' : 'nurseryId') + ..e<$8.BusType>(3, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) + ..e<$8.VideoType>(4, _omitFieldNames ? '' : 'videoType', $pb.PbFieldType.OE, defaultOrMaker: $8.VideoType.VIDEO_TYPE_UNSPECIFIED, valueOf: $8.VideoType.valueOf, enumValues: $8.VideoType.values) + ..a<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) ..hasRequiredFields = false ; @@ -714,42 +681,40 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { void clearBusId() => clearField(1); @$pb.TagNumber(2) - $8.BusType get busType => $_getN(1); + $core.String get nurseryId => $_getSZ(1); @$pb.TagNumber(2) - set busType($8.BusType v) { setField(2, v); } + set nurseryId($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) - $core.bool hasBusType() => $_has(1); + $core.bool hasNurseryId() => $_has(1); @$pb.TagNumber(2) - void clearBusType() => clearField(2); + void clearNurseryId() => clearField(2); @$pb.TagNumber(3) - $8.VideoType get videoType => $_getN(2); + $8.BusType get busType => $_getN(2); @$pb.TagNumber(3) - set videoType($8.VideoType v) { setField(3, v); } + set busType($8.BusType v) { setField(3, v); } @$pb.TagNumber(3) - $core.bool hasVideoType() => $_has(2); + $core.bool hasBusType() => $_has(2); @$pb.TagNumber(3) - void clearVideoType() => clearField(3); + void clearBusType() => clearField(3); @$pb.TagNumber(4) - $core.List<$core.int> get videoChunk => $_getN(3); + $8.VideoType get videoType => $_getN(3); @$pb.TagNumber(4) - set videoChunk($core.List<$core.int> v) { $_setBytes(3, v); } + set videoType($8.VideoType v) { setField(4, v); } @$pb.TagNumber(4) - $core.bool hasVideoChunk() => $_has(3); + $core.bool hasVideoType() => $_has(3); @$pb.TagNumber(4) - void clearVideoChunk() => clearField(4); + void clearVideoType() => clearField(4); @$pb.TagNumber(5) - $7.Timestamp get timestamp => $_getN(4); - @$pb.TagNumber(5) - set timestamp($7.Timestamp v) { setField(5, v); } + $core.List<$core.int> get videoChunk => $_getN(4); @$pb.TagNumber(5) - $core.bool hasTimestamp() => $_has(4); + set videoChunk($core.List<$core.int> v) { $_setBytes(4, v); } @$pb.TagNumber(5) - void clearTimestamp() => clearField(5); + $core.bool hasVideoChunk() => $_has(4); @$pb.TagNumber(5) - $7.Timestamp ensureTimestamp() => $_ensure(4); + void clearVideoChunk() => clearField(5); } class StreamBusVideoResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index b8ef15b9..14b7cc96 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -105,7 +105,6 @@ const SendLocationContinuousRequest$json = { {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, {'1': 'latitude', '3': 2, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 3, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'timestamp', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timestamp'}, ], }; @@ -113,8 +112,7 @@ const SendLocationContinuousRequest$json = { final $typed_data.Uint8List sendLocationContinuousRequestDescriptor = $convert.base64Decode( 'Ch1TZW5kTG9jYXRpb25Db250aW51b3VzUmVxdWVzdBIVCgZidXNfaWQYASABKAlSBWJ1c0lkEh' 'oKCGxhdGl0dWRlGAIgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYAyABKAFSCWxvbmdpdHVk' - 'ZRI4Cgl0aW1lc3RhbXAYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl0aW1lc3' - 'RhbXA='); + 'ZQ=='); @$core.Deprecated('Use sendLocationContinuousResponseDescriptor instead') const SendLocationContinuousResponse$json = { @@ -144,36 +142,33 @@ const TrackBusContinuousResponse$json = { {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, {'1': 'latitude', '3': 2, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 3, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'timestamp', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timestamp'}, ], }; /// Descriptor for `TrackBusContinuousResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List trackBusContinuousResponseDescriptor = $convert.base64Decode( 'ChpUcmFja0J1c0NvbnRpbnVvdXNSZXNwb25zZRIVCgZidXNfaWQYASABKAlSBWJ1c0lkEhoKCG' - 'xhdGl0dWRlGAIgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYAyABKAFSCWxvbmdpdHVkZRI4' - 'Cgl0aW1lc3RhbXAYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl0aW1lc3RhbX' - 'A='); + 'xhdGl0dWRlGAIgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYAyABKAFSCWxvbmdpdHVkZQ=='); @$core.Deprecated('Use streamBusVideoRequestDescriptor instead') const StreamBusVideoRequest$json = { '1': 'StreamBusVideoRequest', '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'bus_type', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, - {'1': 'video_type', '3': 3, '4': 1, '5': 14, '6': '.where_child_bus.v1.VideoType', '10': 'videoType'}, - {'1': 'video_chunk', '3': 4, '4': 1, '5': 12, '10': 'videoChunk'}, - {'1': 'timestamp', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timestamp'}, + {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'bus_type', '3': 3, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, + {'1': 'video_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.VideoType', '10': 'videoType'}, + {'1': 'video_chunk', '3': 5, '4': 1, '5': 12, '10': 'videoChunk'}, ], }; /// Descriptor for `StreamBusVideoRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Decode( - 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI2CghidXNfdH' - 'lwZRgCIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBlEjwKCnZpZGVv' - 'X3R5cGUYAyABKA4yHS53aGVyZV9jaGlsZF9idXMudjEuVmlkZW9UeXBlUgl2aWRlb1R5cGUSHw' - 'oLdmlkZW9fY2h1bmsYBCABKAxSCnZpZGVvQ2h1bmsSOAoJdGltZXN0YW1wGAUgASgLMhouZ29v' - 'Z2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdGltZXN0YW1w'); + 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBIdCgpudXJzZX' + 'J5X2lkGAIgASgJUgludXJzZXJ5SWQSNgoIYnVzX3R5cGUYAyABKA4yGy53aGVyZV9jaGlsZF9i' + 'dXMudjEuQnVzVHlwZVIHYnVzVHlwZRI8Cgp2aWRlb190eXBlGAQgASgOMh0ud2hlcmVfY2hpbG' + 'RfYnVzLnYxLlZpZGVvVHlwZVIJdmlkZW9UeXBlEh8KC3ZpZGVvX2NodW5rGAUgASgMUgp2aWRl' + 'b0NodW5r'); @$core.Deprecated('Use streamBusVideoResponseDescriptor instead') const StreamBusVideoResponse$json = { diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py index 608bdfa6..68f8f6bb 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py @@ -7,44 +7,33 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from generated.where_child_bus.v1 import ( - bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2, -) -from generated.where_child_bus.v1 import ( - resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, -) +from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xb6\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' -) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a\"where_child_bus/v1/resources.proto\"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xb6\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "machine_learning.v1.machine_learning_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'machine_learning.v1.machine_learning_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals["DESCRIPTOR"]._serialized_options = ( - b"\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" - ) - _globals["_TRAINREQUEST"]._serialized_start = 134 - _globals["_TRAINREQUEST"]._serialized_end = 287 - _globals["_TRAINRESPONSE"]._serialized_start = 289 - _globals["_TRAINRESPONSE"]._serialized_end = 335 - _globals["_PREDRESPONSE"]._serialized_start = 337 - _globals["_PREDRESPONSE"]._serialized_end = 413 - _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_start = 415 - _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_end = 499 - _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_start = 501 - _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_end = 559 - _globals["_MACHINELEARNINGSERVICE"]._serialized_start = 562 - _globals["_MACHINELEARNINGSERVICE"]._serialized_end = 872 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' + _globals['_TRAINREQUEST']._serialized_start=134 + _globals['_TRAINREQUEST']._serialized_end=287 + _globals['_TRAINRESPONSE']._serialized_start=289 + _globals['_TRAINRESPONSE']._serialized_end=335 + _globals['_PREDRESPONSE']._serialized_start=337 + _globals['_PREDRESPONSE']._serialized_end=413 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=415 + _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=499 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=501 + _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=559 + _globals['_MACHINELEARNINGSERVICE']._serialized_start=562 + _globals['_MACHINELEARNINGSERVICE']._serialized_end=872 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py index 699c2f1a..7d9fccc4 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py @@ -2,12 +2,8 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from generated.machine_learning.v1 import ( - machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2, -) -from generated.where_child_bus.v1 import ( - bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2, -) +from machine_learning.v1 import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 +from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 class MachineLearningServiceStub(object): @@ -20,20 +16,20 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Train = channel.unary_unary( - "/machine_learning.v1.MachineLearningService/Train", - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - ) + '/machine_learning.v1.MachineLearningService/Train', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, + ) self.Pred = channel.stream_stream( - "/machine_learning.v1.MachineLearningService/Pred", - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - ) + '/machine_learning.v1.MachineLearningService/Pred', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, + ) self.FaceDetectAndClip = channel.unary_unary( - "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - ) + '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, + ) class MachineLearningServiceServicer(object): @@ -42,133 +38,96 @@ class MachineLearningServiceServicer(object): def Train(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def Pred(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def FaceDetectAndClip(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_MachineLearningServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "Train": grpc.unary_unary_rpc_method_handler( - servicer.Train, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, - ), - "Pred": grpc.stream_stream_rpc_method_handler( - servicer.Pred, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, - ), - "FaceDetectAndClip": grpc.unary_unary_rpc_method_handler( - servicer.FaceDetectAndClip, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, - ), + 'Train': grpc.unary_unary_rpc_method_handler( + servicer.Train, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, + ), + 'Pred': grpc.stream_stream_rpc_method_handler( + servicer.Pred, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, + ), + 'FaceDetectAndClip': grpc.unary_unary_rpc_method_handler( + servicer.FaceDetectAndClip, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "machine_learning.v1.MachineLearningService", rpc_method_handlers - ) + 'machine_learning.v1.MachineLearningService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class MachineLearningService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Train( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def Train(request, target, - "/machine_learning.v1.MachineLearningService/Train", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/Train', machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def Pred( - request_iterator, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.stream_stream( - request_iterator, + def Pred(request_iterator, target, - "/machine_learning.v1.MachineLearningService/Pred", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/machine_learning.v1.MachineLearningService/Pred', where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def FaceDetectAndClip( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def FaceDetectAndClip(request, target, - "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index afa610b6..39783698 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -7,56 +7,46 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from generated.where_child_bus.v1 import ( - resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, -) -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"\xaa\x01\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp" \n\x1eSendLocationContinuousResponse"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"\xa7\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp"\xff\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12<\n\nvideo_type\x18\x03 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x04 \x01(\x0cR\nvideoChunk\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' -) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xe4\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12<\n\nvideo_type\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x05 \x01(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.bus_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.bus_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals["DESCRIPTOR"]._serialized_options = ( - b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - ) - _globals["_CREATEBUSREQUEST"]._serialized_start = 122 - _globals["_CREATEBUSREQUEST"]._serialized_end = 326 - _globals["_CREATEBUSRESPONSE"]._serialized_start = 328 - _globals["_CREATEBUSRESPONSE"]._serialized_end = 390 - _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_start = 392 - _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_end = 453 - _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_start = 455 - _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_end = 533 - _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_start = 535 - _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_end = 634 - _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_start = 636 - _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_end = 704 - _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_start = 707 - _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_end = 877 - _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_start = 879 - _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_end = 911 - _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_start = 913 - _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_end = 963 - _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_start = 966 - _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_end = 1133 - _globals["_STREAMBUSVIDEOREQUEST"]._serialized_start = 1136 - _globals["_STREAMBUSVIDEOREQUEST"]._serialized_end = 1391 - _globals["_STREAMBUSVIDEORESPONSE"]._serialized_start = 1393 - _globals["_STREAMBUSVIDEORESPONSE"]._serialized_end = 1505 - _globals["_BUSSERVICE"]._serialized_start = 1508 - _globals["_BUSSERVICE"]._serialized_end = 2202 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_CREATEBUSREQUEST']._serialized_start=89 + _globals['_CREATEBUSREQUEST']._serialized_end=293 + _globals['_CREATEBUSRESPONSE']._serialized_start=295 + _globals['_CREATEBUSRESPONSE']._serialized_end=357 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=359 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=420 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=422 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=500 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=502 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=601 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=603 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=671 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=673 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=785 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=787 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=819 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=821 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=871 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=873 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=982 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=985 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1213 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1215 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1327 + _globals['_BUSSERVICE']._serialized_start=1330 + _globals['_BUSSERVICE']._serialized_end=2024 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index c0e85f05..55409f2a 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -1,5 +1,4 @@ from where_child_bus.v1 import resources_pb2 as _resources_pb2 -from google.protobuf import timestamp_pb2 as _timestamp_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -54,16 +53,14 @@ class ChangeBusStatusResponse(_message.Message): def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... class SendLocationContinuousRequest(_message.Message): - __slots__ = ("bus_id", "latitude", "longitude", "timestamp") + __slots__ = ("bus_id", "latitude", "longitude") BUS_ID_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] bus_id: str latitude: float longitude: float - timestamp: _timestamp_pb2.Timestamp - def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ...) -> None: ... class SendLocationContinuousResponse(_message.Message): __slots__ = () @@ -76,30 +73,28 @@ class TrackBusContinuousRequest(_message.Message): def __init__(self, bus_id: _Optional[str] = ...) -> None: ... class TrackBusContinuousResponse(_message.Message): - __slots__ = ("bus_id", "latitude", "longitude", "timestamp") + __slots__ = ("bus_id", "latitude", "longitude") BUS_ID_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] bus_id: str latitude: float longitude: float - timestamp: _timestamp_pb2.Timestamp - def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ...) -> None: ... class StreamBusVideoRequest(_message.Message): - __slots__ = ("bus_id", "bus_type", "video_type", "video_chunk", "timestamp") + __slots__ = ("bus_id", "nursery_id", "bus_type", "video_type", "video_chunk") BUS_ID_FIELD_NUMBER: _ClassVar[int] + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] BUS_TYPE_FIELD_NUMBER: _ClassVar[int] VIDEO_TYPE_FIELD_NUMBER: _ClassVar[int] VIDEO_CHUNK_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] bus_id: str + nursery_id: str bus_type: _resources_pb2.BusType video_type: _resources_pb2.VideoType video_chunk: bytes - timestamp: _timestamp_pb2.Timestamp - def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., video_type: _Optional[_Union[_resources_pb2.VideoType, str]] = ..., video_chunk: _Optional[bytes] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., video_type: _Optional[_Union[_resources_pb2.VideoType, str]] = ..., video_chunk: _Optional[bytes] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = ("is_detected", "children") diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 60ed2d06..1bb0068e 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -3,7 +3,6 @@ syntax = "proto3"; package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; -import "google/protobuf/timestamp.proto"; service BusService { rpc CreateBus(CreateBusRequest) returns (CreateBusResponse); @@ -49,7 +48,6 @@ message SendLocationContinuousRequest { string bus_id = 1; double latitude = 2; double longitude = 3; - google.protobuf.Timestamp timestamp = 4; // Unix timestamp } message SendLocationContinuousResponse { @@ -64,15 +62,14 @@ message TrackBusContinuousResponse { string bus_id = 1; double latitude = 2; double longitude = 3; - google.protobuf.Timestamp timestamp = 4; // Unix timestamp } message StreamBusVideoRequest { string bus_id = 1; - BusType bus_type = 2; - VideoType video_type = 3; - bytes video_chunk = 4; // Chunk of video data - google.protobuf.Timestamp timestamp = 5; // Unix timestamp + string nursery_id = 2; + BusType bus_type = 3; + VideoType video_type = 4; + bytes video_chunk = 5; // Chunk of video data } message StreamBusVideoResponse { From 4c1692a6050f2f891b36b1fd4a206ebd4dafb57f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 01:04:39 +0900 Subject: [PATCH 487/771] =?UTF-8?q?refactor:=20=E5=91=BD=E5=90=8D=E3=82=92?= =?UTF-8?q?=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 246 ++++++----- .../go/where_child_bus/v1/resources.pb.go | 418 +++++++++--------- .../proto-gen/where_child_bus/v1/bus.pb.dart | 32 +- .../where_child_bus/v1/bus.pbjson.dart | 14 +- .../where_child_bus/v1/resources.pb.dart | 16 +- .../where_child_bus/v1/resources.pbenum.dart | 50 +-- .../where_child_bus/v1/resources.pbjson.dart | 59 +-- .../generated/where_child_bus/v1/bus_pb2.py | 36 +- .../generated/where_child_bus/v1/bus_pb2.pyi | 16 +- .../where_child_bus/v1/resources_pb2.py | 44 +- .../where_child_bus/v1/resources_pb2.pyi | 40 +- proto/where_child_bus/v1/bus.proto | 4 +- proto/where_child_bus/v1/resources.proto | 20 +- 13 files changed, 500 insertions(+), 495 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 66c9015e..87654a44 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -245,8 +245,8 @@ type ChangeBusStatusRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=where_child_bus.v1.Status" json:"status,omitempty"` + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + BusStatus BusStatus `protobuf:"varint,2,opt,name=bus_status,json=busStatus,proto3,enum=where_child_bus.v1.BusStatus" json:"bus_status,omitempty"` } func (x *ChangeBusStatusRequest) Reset() { @@ -288,11 +288,11 @@ func (x *ChangeBusStatusRequest) GetBusId() string { return "" } -func (x *ChangeBusStatusRequest) GetStatus() Status { +func (x *ChangeBusStatusRequest) GetBusStatus() BusStatus { if x != nil { - return x.Status + return x.BusStatus } - return Status_STATUS_UNSPECIFIED + return BusStatus_BUS_STATUS_UNSPECIFIED } type ChangeBusStatusResponse struct { @@ -559,11 +559,11 @@ type StreamBusVideoRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - BusType BusType `protobuf:"varint,3,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` - VideoType VideoType `protobuf:"varint,4,opt,name=video_type,json=videoType,proto3,enum=where_child_bus.v1.VideoType" json:"video_type,omitempty"` - VideoChunk []byte `protobuf:"bytes,5,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + BusType BusType `protobuf:"varint,3,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` + VehicleEvent VehicleEvent `protobuf:"varint,4,opt,name=vehicle_event,json=vehicleEvent,proto3,enum=where_child_bus.v1.VehicleEvent" json:"vehicle_event,omitempty"` + VideoChunk []byte `protobuf:"bytes,5,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data } func (x *StreamBusVideoRequest) Reset() { @@ -619,11 +619,11 @@ func (x *StreamBusVideoRequest) GetBusType() BusType { return BusType_BUS_TYPE_UNSPECIFIED } -func (x *StreamBusVideoRequest) GetVideoType() VideoType { +func (x *StreamBusVideoRequest) GetVehicleEvent() VehicleEvent { if x != nil { - return x.VideoType + return x.VehicleEvent } - return VideoType_VIDEO_TYPE_UNSPECIFIED + return VehicleEvent_VEHICLE_EVENT_UNSPECIFIED } func (x *StreamBusVideoRequest) GetVideoChunk() []byte { @@ -722,117 +722,119 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, + 0x75, 0x73, 0x65, 0x73, 0x22, 0x6d, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, - 0x70, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, - 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, - 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0xe4, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, - 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x09, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x70, 0x0a, - 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, - 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x32, - 0xb6, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, - 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, - 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, + 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x70, 0x0a, 0x1d, 0x53, 0x65, 0x6e, + 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, + 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x53, + 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, + 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, + 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, + 0x64, 0x22, 0x6d, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x22, 0xed, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, + 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, + 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x76, 0x65, 0x68, 0x69, + 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, + 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, - 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, + 0x65, 0x6e, 0x32, 0xb6, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, - 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, - 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, - 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, - 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, + 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, + 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, + 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, + 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, - 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, + 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, + 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, + 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, + 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, + 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -862,18 +864,18 @@ var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ (*StreamBusVideoRequest)(nil), // 10: where_child_bus.v1.StreamBusVideoRequest (*StreamBusVideoResponse)(nil), // 11: where_child_bus.v1.StreamBusVideoResponse (*Bus)(nil), // 12: where_child_bus.v1.Bus - (Status)(0), // 13: where_child_bus.v1.Status + (BusStatus)(0), // 13: where_child_bus.v1.BusStatus (BusType)(0), // 14: where_child_bus.v1.BusType - (VideoType)(0), // 15: where_child_bus.v1.VideoType + (VehicleEvent)(0), // 15: where_child_bus.v1.VehicleEvent (*Child)(nil), // 16: where_child_bus.v1.Child } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ 12, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus 12, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus - 13, // 2: where_child_bus.v1.ChangeBusStatusRequest.status:type_name -> where_child_bus.v1.Status + 13, // 2: where_child_bus.v1.ChangeBusStatusRequest.bus_status:type_name -> where_child_bus.v1.BusStatus 12, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus 14, // 4: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType - 15, // 5: where_child_bus.v1.StreamBusVideoRequest.video_type:type_name -> where_child_bus.v1.VideoType + 15, // 5: where_child_bus.v1.StreamBusVideoRequest.vehicle_event:type_name -> where_child_bus.v1.VehicleEvent 16, // 6: where_child_bus.v1.StreamBusVideoResponse.children:type_name -> where_child_bus.v1.Child 0, // 7: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest 2, // 8: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 4a4707e5..4c3afbf7 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -21,104 +21,104 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type Status int32 +type BusStatus int32 const ( - Status_STATUS_UNSPECIFIED Status = 0 - Status_STATUS_STOPPED Status = 1 - Status_STATUS_RUNNING Status = 2 - Status_STATUS_MAINTEINANCE Status = 3 + BusStatus_BUS_STATUS_UNSPECIFIED BusStatus = 0 + BusStatus_BUS_STATUS_STOPPED BusStatus = 1 + BusStatus_BUS_STATUS_RUNNING BusStatus = 2 + BusStatus_BUS_STATUS_MAINTENANCE BusStatus = 3 ) -// Enum value maps for Status. +// Enum value maps for BusStatus. var ( - Status_name = map[int32]string{ - 0: "STATUS_UNSPECIFIED", - 1: "STATUS_STOPPED", - 2: "STATUS_RUNNING", - 3: "STATUS_MAINTEINANCE", - } - Status_value = map[string]int32{ - "STATUS_UNSPECIFIED": 0, - "STATUS_STOPPED": 1, - "STATUS_RUNNING": 2, - "STATUS_MAINTEINANCE": 3, + BusStatus_name = map[int32]string{ + 0: "BUS_STATUS_UNSPECIFIED", + 1: "BUS_STATUS_STOPPED", + 2: "BUS_STATUS_RUNNING", + 3: "BUS_STATUS_MAINTENANCE", + } + BusStatus_value = map[string]int32{ + "BUS_STATUS_UNSPECIFIED": 0, + "BUS_STATUS_STOPPED": 1, + "BUS_STATUS_RUNNING": 2, + "BUS_STATUS_MAINTENANCE": 3, } ) -func (x Status) Enum() *Status { - p := new(Status) +func (x BusStatus) Enum() *BusStatus { + p := new(BusStatus) *p = x return p } -func (x Status) String() string { +func (x BusStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (Status) Descriptor() protoreflect.EnumDescriptor { +func (BusStatus) Descriptor() protoreflect.EnumDescriptor { return file_where_child_bus_v1_resources_proto_enumTypes[0].Descriptor() } -func (Status) Type() protoreflect.EnumType { +func (BusStatus) Type() protoreflect.EnumType { return &file_where_child_bus_v1_resources_proto_enumTypes[0] } -func (x Status) Number() protoreflect.EnumNumber { +func (x BusStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use Status.Descriptor instead. -func (Status) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use BusStatus.Descriptor instead. +func (BusStatus) EnumDescriptor() ([]byte, []int) { return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{0} } -type VideoType int32 +type VehicleEvent int32 const ( - VideoType_VIDEO_TYPE_UNSPECIFIED VideoType = 0 - VideoType_VIDEO_TYPE_GET_ON VideoType = 1 - VideoType_VIDEO_TYPE_GET_OFF VideoType = 2 + VehicleEvent_VEHICLE_EVENT_UNSPECIFIED VehicleEvent = 0 + VehicleEvent_VEHICLE_EVENT_GET_ON VehicleEvent = 1 + VehicleEvent_VEHICLE_EVENT_GET_OFF VehicleEvent = 2 ) -// Enum value maps for VideoType. +// Enum value maps for VehicleEvent. var ( - VideoType_name = map[int32]string{ - 0: "VIDEO_TYPE_UNSPECIFIED", - 1: "VIDEO_TYPE_GET_ON", - 2: "VIDEO_TYPE_GET_OFF", + VehicleEvent_name = map[int32]string{ + 0: "VEHICLE_EVENT_UNSPECIFIED", + 1: "VEHICLE_EVENT_GET_ON", + 2: "VEHICLE_EVENT_GET_OFF", } - VideoType_value = map[string]int32{ - "VIDEO_TYPE_UNSPECIFIED": 0, - "VIDEO_TYPE_GET_ON": 1, - "VIDEO_TYPE_GET_OFF": 2, + VehicleEvent_value = map[string]int32{ + "VEHICLE_EVENT_UNSPECIFIED": 0, + "VEHICLE_EVENT_GET_ON": 1, + "VEHICLE_EVENT_GET_OFF": 2, } ) -func (x VideoType) Enum() *VideoType { - p := new(VideoType) +func (x VehicleEvent) Enum() *VehicleEvent { + p := new(VehicleEvent) *p = x return p } -func (x VideoType) String() string { +func (x VehicleEvent) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (VideoType) Descriptor() protoreflect.EnumDescriptor { +func (VehicleEvent) Descriptor() protoreflect.EnumDescriptor { return file_where_child_bus_v1_resources_proto_enumTypes[1].Descriptor() } -func (VideoType) Type() protoreflect.EnumType { +func (VehicleEvent) Type() protoreflect.EnumType { return &file_where_child_bus_v1_resources_proto_enumTypes[1] } -func (x VideoType) Number() protoreflect.EnumNumber { +func (x VehicleEvent) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use VideoType.Descriptor instead. -func (VideoType) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use VehicleEvent.Descriptor instead. +func (VehicleEvent) EnumDescriptor() ([]byte, []int) { return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{1} } @@ -674,11 +674,11 @@ type Bus struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - PlateNumber string `protobuf:"bytes,4,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` - Status Status `protobuf:"varint,5,opt,name=status,proto3,enum=where_child_bus.v1.Status" json:"status,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + PlateNumber string `protobuf:"bytes,4,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` + BusStatus BusStatus `protobuf:"varint,5,opt,name=bus_status,json=busStatus,proto3,enum=where_child_bus.v1.BusStatus" json:"bus_status,omitempty"` // 緯度経度 Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` @@ -747,11 +747,11 @@ func (x *Bus) GetPlateNumber() string { return "" } -func (x *Bus) GetStatus() Status { +func (x *Bus) GetBusStatus() BusStatus { if x != nil { - return x.Status + return x.BusStatus } - return Status_STATUS_UNSPECIFIED + return BusStatus_BUS_STATUS_UNSPECIFIED } func (x *Bus) GetLatitude() float64 { @@ -1436,165 +1436,167 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x87, 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x91, 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, - 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, - 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, - 0xfc, 0x03, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, - 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, - 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, - 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, - 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, - 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, - 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, - 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, - 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x62, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xa2, - 0x03, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x6d, - 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x6f, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x78, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, - 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, - 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, - 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, - 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, - 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, - 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x09, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, + 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xfc, 0x03, 0x0a, 0x05, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, + 0x03, 0x73, 0x65, 0x78, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, + 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, + 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, + 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, + 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, + 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, + 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, + 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, + 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, + 0x6c, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, + 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, + 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, + 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, - 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, - 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, - 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, 0x0a, - 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x49, 0x4e, - 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x56, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x15, 0x0a, 0x11, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, - 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, - 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, - 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, - 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, - 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, - 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, - 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, - 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, - 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, - 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xa2, 0x03, 0x0a, 0x07, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4e, + 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, + 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x65, + 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, + 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x8f, 0x01, + 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xcc, + 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x68, 0x6f, 0x74, + 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x68, + 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, + 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, + 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x73, 0x0a, + 0x09, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, + 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, + 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, + 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, + 0x10, 0x03, 0x2a, 0x62, 0x0a, 0x0c, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x56, + 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, + 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, + 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, + 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, + 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, + 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, + 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, + 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, + 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, + 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1612,8 +1614,8 @@ func file_where_child_bus_v1_resources_proto_rawDescGZIP() []byte { var file_where_child_bus_v1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_where_child_bus_v1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_where_child_bus_v1_resources_proto_goTypes = []interface{}{ - (Status)(0), // 0: where_child_bus.v1.Status - (VideoType)(0), // 1: where_child_bus.v1.VideoType + (BusStatus)(0), // 0: where_child_bus.v1.BusStatus + (VehicleEvent)(0), // 1: where_child_bus.v1.VehicleEvent (Sex)(0), // 2: where_child_bus.v1.Sex (BusType)(0), // 3: where_child_bus.v1.BusType (*Nursery)(nil), // 4: where_child_bus.v1.Nursery @@ -1638,7 +1640,7 @@ var file_where_child_bus_v1_resources_proto_depIdxs = []int32{ 15, // 5: where_child_bus.v1.Guardian.updated_at:type_name -> google.protobuf.Timestamp 15, // 6: where_child_bus.v1.GuardianResponse.created_at:type_name -> google.protobuf.Timestamp 15, // 7: where_child_bus.v1.GuardianResponse.updated_at:type_name -> google.protobuf.Timestamp - 0, // 8: where_child_bus.v1.Bus.status:type_name -> where_child_bus.v1.Status + 0, // 8: where_child_bus.v1.Bus.bus_status:type_name -> where_child_bus.v1.BusStatus 15, // 9: where_child_bus.v1.Bus.created_at:type_name -> google.protobuf.Timestamp 15, // 10: where_child_bus.v1.Bus.updated_at:type_name -> google.protobuf.Timestamp 2, // 11: where_child_bus.v1.Child.sex:type_name -> where_child_bus.v1.Sex diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index dbe83a4d..749aa3e3 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -259,14 +259,14 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { class ChangeBusStatusRequest extends $pb.GeneratedMessage { factory ChangeBusStatusRequest({ $core.String? busId, - $8.Status? status, + $8.BusStatus? busStatus, }) { final $result = create(); if (busId != null) { $result.busId = busId; } - if (status != null) { - $result.status = status; + if (busStatus != null) { + $result.busStatus = busStatus; } return $result; } @@ -276,7 +276,7 @@ class ChangeBusStatusRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChangeBusStatusRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') - ..e<$8.Status>(2, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: $8.Status.STATUS_UNSPECIFIED, valueOf: $8.Status.valueOf, enumValues: $8.Status.values) + ..e<$8.BusStatus>(2, _omitFieldNames ? '' : 'busStatus', $pb.PbFieldType.OE, defaultOrMaker: $8.BusStatus.BUS_STATUS_UNSPECIFIED, valueOf: $8.BusStatus.valueOf, enumValues: $8.BusStatus.values) ..hasRequiredFields = false ; @@ -311,13 +311,13 @@ class ChangeBusStatusRequest extends $pb.GeneratedMessage { void clearBusId() => clearField(1); @$pb.TagNumber(2) - $8.Status get status => $_getN(1); + $8.BusStatus get busStatus => $_getN(1); @$pb.TagNumber(2) - set status($8.Status v) { setField(2, v); } + set busStatus($8.BusStatus v) { setField(2, v); } @$pb.TagNumber(2) - $core.bool hasStatus() => $_has(1); + $core.bool hasBusStatus() => $_has(1); @$pb.TagNumber(2) - void clearStatus() => clearField(2); + void clearBusStatus() => clearField(2); } class ChangeBusStatusResponse extends $pb.GeneratedMessage { @@ -616,7 +616,7 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { $core.String? busId, $core.String? nurseryId, $8.BusType? busType, - $8.VideoType? videoType, + $8.VehicleEvent? vehicleEvent, $core.List<$core.int>? videoChunk, }) { final $result = create(); @@ -629,8 +629,8 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { if (busType != null) { $result.busType = busType; } - if (videoType != null) { - $result.videoType = videoType; + if (vehicleEvent != null) { + $result.vehicleEvent = vehicleEvent; } if (videoChunk != null) { $result.videoChunk = videoChunk; @@ -645,7 +645,7 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'busId') ..aOS(2, _omitFieldNames ? '' : 'nurseryId') ..e<$8.BusType>(3, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) - ..e<$8.VideoType>(4, _omitFieldNames ? '' : 'videoType', $pb.PbFieldType.OE, defaultOrMaker: $8.VideoType.VIDEO_TYPE_UNSPECIFIED, valueOf: $8.VideoType.valueOf, enumValues: $8.VideoType.values) + ..e<$8.VehicleEvent>(4, _omitFieldNames ? '' : 'vehicleEvent', $pb.PbFieldType.OE, defaultOrMaker: $8.VehicleEvent.VEHICLE_EVENT_UNSPECIFIED, valueOf: $8.VehicleEvent.valueOf, enumValues: $8.VehicleEvent.values) ..a<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) ..hasRequiredFields = false ; @@ -699,13 +699,13 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { void clearBusType() => clearField(3); @$pb.TagNumber(4) - $8.VideoType get videoType => $_getN(3); + $8.VehicleEvent get vehicleEvent => $_getN(3); @$pb.TagNumber(4) - set videoType($8.VideoType v) { setField(4, v); } + set vehicleEvent($8.VehicleEvent v) { setField(4, v); } @$pb.TagNumber(4) - $core.bool hasVideoType() => $_has(3); + $core.bool hasVehicleEvent() => $_has(3); @$pb.TagNumber(4) - void clearVideoType() => clearField(4); + void clearVehicleEvent() => clearField(4); @$pb.TagNumber(5) $core.List<$core.int> get videoChunk => $_getN(4); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 14b7cc96..8ca0aae4 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -76,14 +76,14 @@ const ChangeBusStatusRequest$json = { '1': 'ChangeBusStatusRequest', '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'status', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.Status', '10': 'status'}, + {'1': 'bus_status', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusStatus', '10': 'busStatus'}, ], }; /// Descriptor for `ChangeBusStatusRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List changeBusStatusRequestDescriptor = $convert.base64Decode( - 'ChZDaGFuZ2VCdXNTdGF0dXNSZXF1ZXN0EhUKBmJ1c19pZBgBIAEoCVIFYnVzSWQSMgoGc3RhdH' - 'VzGAIgASgOMhoud2hlcmVfY2hpbGRfYnVzLnYxLlN0YXR1c1IGc3RhdHVz'); + 'ChZDaGFuZ2VCdXNTdGF0dXNSZXF1ZXN0EhUKBmJ1c19pZBgBIAEoCVIFYnVzSWQSPAoKYnVzX3' + 'N0YXR1cxgCIAEoDjIdLndoZXJlX2NoaWxkX2J1cy52MS5CdXNTdGF0dXNSCWJ1c1N0YXR1cw=='); @$core.Deprecated('Use changeBusStatusResponseDescriptor instead') const ChangeBusStatusResponse$json = { @@ -157,7 +157,7 @@ const StreamBusVideoRequest$json = { {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, {'1': 'bus_type', '3': 3, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, - {'1': 'video_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.VideoType', '10': 'videoType'}, + {'1': 'vehicle_event', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.VehicleEvent', '10': 'vehicleEvent'}, {'1': 'video_chunk', '3': 5, '4': 1, '5': 12, '10': 'videoChunk'}, ], }; @@ -166,9 +166,9 @@ const StreamBusVideoRequest$json = { final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Decode( 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBIdCgpudXJzZX' 'J5X2lkGAIgASgJUgludXJzZXJ5SWQSNgoIYnVzX3R5cGUYAyABKA4yGy53aGVyZV9jaGlsZF9i' - 'dXMudjEuQnVzVHlwZVIHYnVzVHlwZRI8Cgp2aWRlb190eXBlGAQgASgOMh0ud2hlcmVfY2hpbG' - 'RfYnVzLnYxLlZpZGVvVHlwZVIJdmlkZW9UeXBlEh8KC3ZpZGVvX2NodW5rGAUgASgMUgp2aWRl' - 'b0NodW5r'); + 'dXMudjEuQnVzVHlwZVIHYnVzVHlwZRJFCg12ZWhpY2xlX2V2ZW50GAQgASgOMiAud2hlcmVfY2' + 'hpbGRfYnVzLnYxLlZlaGljbGVFdmVudFIMdmVoaWNsZUV2ZW50Eh8KC3ZpZGVvX2NodW5rGAUg' + 'ASgMUgp2aWRlb0NodW5r'); @$core.Deprecated('Use streamBusVideoResponseDescriptor instead') const StreamBusVideoResponse$json = { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index a851ac96..57257984 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -690,7 +690,7 @@ class Bus extends $pb.GeneratedMessage { $core.String? nurseryId, $core.String? name, $core.String? plateNumber, - Status? status, + BusStatus? busStatus, $core.double? latitude, $core.double? longitude, $core.bool? enableFaceRecognition, @@ -710,8 +710,8 @@ class Bus extends $pb.GeneratedMessage { if (plateNumber != null) { $result.plateNumber = plateNumber; } - if (status != null) { - $result.status = status; + if (busStatus != null) { + $result.busStatus = busStatus; } if (latitude != null) { $result.latitude = latitude; @@ -739,7 +739,7 @@ class Bus extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'nurseryId') ..aOS(3, _omitFieldNames ? '' : 'name') ..aOS(4, _omitFieldNames ? '' : 'plateNumber') - ..e(5, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Status.STATUS_UNSPECIFIED, valueOf: Status.valueOf, enumValues: Status.values) + ..e(5, _omitFieldNames ? '' : 'busStatus', $pb.PbFieldType.OE, defaultOrMaker: BusStatus.BUS_STATUS_UNSPECIFIED, valueOf: BusStatus.valueOf, enumValues: BusStatus.values) ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..aOB(8, _omitFieldNames ? '' : 'enableFaceRecognition') @@ -806,13 +806,13 @@ class Bus extends $pb.GeneratedMessage { void clearPlateNumber() => clearField(4); @$pb.TagNumber(5) - Status get status => $_getN(4); + BusStatus get busStatus => $_getN(4); @$pb.TagNumber(5) - set status(Status v) { setField(5, v); } + set busStatus(BusStatus v) { setField(5, v); } @$pb.TagNumber(5) - $core.bool hasStatus() => $_has(4); + $core.bool hasBusStatus() => $_has(4); @$pb.TagNumber(5) - void clearStatus() => clearField(5); + void clearBusStatus() => clearField(5); /// 緯度経度 @$pb.TagNumber(6) diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart index dee62498..969ec858 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbenum.dart @@ -13,40 +13,40 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -class Status extends $pb.ProtobufEnum { - static const Status STATUS_UNSPECIFIED = Status._(0, _omitEnumNames ? '' : 'STATUS_UNSPECIFIED'); - static const Status STATUS_STOPPED = Status._(1, _omitEnumNames ? '' : 'STATUS_STOPPED'); - static const Status STATUS_RUNNING = Status._(2, _omitEnumNames ? '' : 'STATUS_RUNNING'); - static const Status STATUS_MAINTEINANCE = Status._(3, _omitEnumNames ? '' : 'STATUS_MAINTEINANCE'); - - static const $core.List values = [ - STATUS_UNSPECIFIED, - STATUS_STOPPED, - STATUS_RUNNING, - STATUS_MAINTEINANCE, +class BusStatus extends $pb.ProtobufEnum { + static const BusStatus BUS_STATUS_UNSPECIFIED = BusStatus._(0, _omitEnumNames ? '' : 'BUS_STATUS_UNSPECIFIED'); + static const BusStatus BUS_STATUS_STOPPED = BusStatus._(1, _omitEnumNames ? '' : 'BUS_STATUS_STOPPED'); + static const BusStatus BUS_STATUS_RUNNING = BusStatus._(2, _omitEnumNames ? '' : 'BUS_STATUS_RUNNING'); + static const BusStatus BUS_STATUS_MAINTENANCE = BusStatus._(3, _omitEnumNames ? '' : 'BUS_STATUS_MAINTENANCE'); + + static const $core.List values = [ + BUS_STATUS_UNSPECIFIED, + BUS_STATUS_STOPPED, + BUS_STATUS_RUNNING, + BUS_STATUS_MAINTENANCE, ]; - static final $core.Map<$core.int, Status> _byValue = $pb.ProtobufEnum.initByValue(values); - static Status? valueOf($core.int value) => _byValue[value]; + static final $core.Map<$core.int, BusStatus> _byValue = $pb.ProtobufEnum.initByValue(values); + static BusStatus? valueOf($core.int value) => _byValue[value]; - const Status._($core.int v, $core.String n) : super(v, n); + const BusStatus._($core.int v, $core.String n) : super(v, n); } -class VideoType extends $pb.ProtobufEnum { - static const VideoType VIDEO_TYPE_UNSPECIFIED = VideoType._(0, _omitEnumNames ? '' : 'VIDEO_TYPE_UNSPECIFIED'); - static const VideoType VIDEO_TYPE_GET_ON = VideoType._(1, _omitEnumNames ? '' : 'VIDEO_TYPE_GET_ON'); - static const VideoType VIDEO_TYPE_GET_OFF = VideoType._(2, _omitEnumNames ? '' : 'VIDEO_TYPE_GET_OFF'); +class VehicleEvent extends $pb.ProtobufEnum { + static const VehicleEvent VEHICLE_EVENT_UNSPECIFIED = VehicleEvent._(0, _omitEnumNames ? '' : 'VEHICLE_EVENT_UNSPECIFIED'); + static const VehicleEvent VEHICLE_EVENT_GET_ON = VehicleEvent._(1, _omitEnumNames ? '' : 'VEHICLE_EVENT_GET_ON'); + static const VehicleEvent VEHICLE_EVENT_GET_OFF = VehicleEvent._(2, _omitEnumNames ? '' : 'VEHICLE_EVENT_GET_OFF'); - static const $core.List values = [ - VIDEO_TYPE_UNSPECIFIED, - VIDEO_TYPE_GET_ON, - VIDEO_TYPE_GET_OFF, + static const $core.List values = [ + VEHICLE_EVENT_UNSPECIFIED, + VEHICLE_EVENT_GET_ON, + VEHICLE_EVENT_GET_OFF, ]; - static final $core.Map<$core.int, VideoType> _byValue = $pb.ProtobufEnum.initByValue(values); - static VideoType? valueOf($core.int value) => _byValue[value]; + static final $core.Map<$core.int, VehicleEvent> _byValue = $pb.ProtobufEnum.initByValue(values); + static VehicleEvent? valueOf($core.int value) => _byValue[value]; - const VideoType._($core.int v, $core.String n) : super(v, n); + const VehicleEvent._($core.int v, $core.String n) : super(v, n); } class Sex extends $pb.ProtobufEnum { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 0d682ded..95dcc217 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -13,36 +13,37 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use statusDescriptor instead') -const Status$json = { - '1': 'Status', +@$core.Deprecated('Use busStatusDescriptor instead') +const BusStatus$json = { + '1': 'BusStatus', '2': [ - {'1': 'STATUS_UNSPECIFIED', '2': 0}, - {'1': 'STATUS_STOPPED', '2': 1}, - {'1': 'STATUS_RUNNING', '2': 2}, - {'1': 'STATUS_MAINTEINANCE', '2': 3}, + {'1': 'BUS_STATUS_UNSPECIFIED', '2': 0}, + {'1': 'BUS_STATUS_STOPPED', '2': 1}, + {'1': 'BUS_STATUS_RUNNING', '2': 2}, + {'1': 'BUS_STATUS_MAINTENANCE', '2': 3}, ], }; -/// Descriptor for `Status`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List statusDescriptor = $convert.base64Decode( - 'CgZTdGF0dXMSFgoSU1RBVFVTX1VOU1BFQ0lGSUVEEAASEgoOU1RBVFVTX1NUT1BQRUQQARISCg' - '5TVEFUVVNfUlVOTklORxACEhcKE1NUQVRVU19NQUlOVEVJTkFOQ0UQAw=='); +/// Descriptor for `BusStatus`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List busStatusDescriptor = $convert.base64Decode( + 'CglCdXNTdGF0dXMSGgoWQlVTX1NUQVRVU19VTlNQRUNJRklFRBAAEhYKEkJVU19TVEFUVVNfU1' + 'RPUFBFRBABEhYKEkJVU19TVEFUVVNfUlVOTklORxACEhoKFkJVU19TVEFUVVNfTUFJTlRFTkFO' + 'Q0UQAw=='); -@$core.Deprecated('Use videoTypeDescriptor instead') -const VideoType$json = { - '1': 'VideoType', +@$core.Deprecated('Use vehicleEventDescriptor instead') +const VehicleEvent$json = { + '1': 'VehicleEvent', '2': [ - {'1': 'VIDEO_TYPE_UNSPECIFIED', '2': 0}, - {'1': 'VIDEO_TYPE_GET_ON', '2': 1}, - {'1': 'VIDEO_TYPE_GET_OFF', '2': 2}, + {'1': 'VEHICLE_EVENT_UNSPECIFIED', '2': 0}, + {'1': 'VEHICLE_EVENT_GET_ON', '2': 1}, + {'1': 'VEHICLE_EVENT_GET_OFF', '2': 2}, ], }; -/// Descriptor for `VideoType`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List videoTypeDescriptor = $convert.base64Decode( - 'CglWaWRlb1R5cGUSGgoWVklERU9fVFlQRV9VTlNQRUNJRklFRBAAEhUKEVZJREVPX1RZUEVfR0' - 'VUX09OEAESFgoSVklERU9fVFlQRV9HRVRfT0ZGEAI='); +/// Descriptor for `VehicleEvent`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List vehicleEventDescriptor = $convert.base64Decode( + 'CgxWZWhpY2xlRXZlbnQSHQoZVkVISUNMRV9FVkVOVF9VTlNQRUNJRklFRBAAEhgKFFZFSElDTE' + 'VfRVZFTlRfR0VUX09OEAESGQoVVkVISUNMRV9FVkVOVF9HRVRfT0ZGEAI='); @$core.Deprecated('Use sexDescriptor instead') const Sex$json = { @@ -185,7 +186,7 @@ const Bus$json = { {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, {'1': 'plate_number', '3': 4, '4': 1, '5': 9, '10': 'plateNumber'}, - {'1': 'status', '3': 5, '4': 1, '5': 14, '6': '.where_child_bus.v1.Status', '10': 'status'}, + {'1': 'bus_status', '3': 5, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusStatus', '10': 'busStatus'}, {'1': 'latitude', '3': 6, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 7, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'enable_face_recognition', '3': 8, '4': 1, '5': 8, '10': 'enableFaceRecognition'}, @@ -197,13 +198,13 @@ const Bus$json = { /// Descriptor for `Bus`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List busDescriptor = $convert.base64Decode( 'CgNCdXMSDgoCaWQYASABKAlSAmlkEh0KCm51cnNlcnlfaWQYAiABKAlSCW51cnNlcnlJZBISCg' - 'RuYW1lGAMgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgEIAEoCVILcGxhdGVOdW1iZXISMgoG' - 'c3RhdHVzGAUgASgOMhoud2hlcmVfY2hpbGRfYnVzLnYxLlN0YXR1c1IGc3RhdHVzEhoKCGxhdG' - 'l0dWRlGAYgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYByABKAFSCWxvbmdpdHVkZRI2Chdl' - 'bmFibGVfZmFjZV9yZWNvZ25pdGlvbhgIIAEoCFIVZW5hYmxlRmFjZVJlY29nbml0aW9uEjkKCm' - 'NyZWF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQS' - 'OQoKdXBkYXRlZF9hdBgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZW' - 'RBdA=='); + 'RuYW1lGAMgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgEIAEoCVILcGxhdGVOdW1iZXISPAoK' + 'YnVzX3N0YXR1cxgFIAEoDjIdLndoZXJlX2NoaWxkX2J1cy52MS5CdXNTdGF0dXNSCWJ1c1N0YX' + 'R1cxIaCghsYXRpdHVkZRgGIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAcgASgBUglsb25n' + 'aXR1ZGUSNgoXZW5hYmxlX2ZhY2VfcmVjb2duaXRpb24YCCABKAhSFWVuYWJsZUZhY2VSZWNvZ2' + '5pdGlvbhI5CgpjcmVhdGVkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJ' + 'Y3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW' + '1wUgl1cGRhdGVkQXQ='); @$core.Deprecated('Use childDescriptor instead') const Child$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index 39783698..fb8988c7 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"c\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xe4\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12<\n\nvideo_type\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.VideoTypeR\tvideoType\x12\x1f\n\x0bvideo_chunk\x18\x05 \x01(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x01(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -32,21 +32,21 @@ _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=422 _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=500 _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=502 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=601 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=603 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=671 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=673 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=785 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=787 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=819 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=821 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=871 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=873 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=982 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=985 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1213 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1215 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1327 - _globals['_BUSSERVICE']._serialized_start=1330 - _globals['_BUSSERVICE']._serialized_end=2024 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=611 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=613 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=681 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=683 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=795 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=797 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=829 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=831 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=881 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=883 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=992 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=995 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1232 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1234 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1346 + _globals['_BUSSERVICE']._serialized_start=1349 + _globals['_BUSSERVICE']._serialized_end=2043 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index 55409f2a..e0a4324f 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -39,12 +39,12 @@ class GetBusListByNurseryIdResponse(_message.Message): def __init__(self, buses: _Optional[_Iterable[_Union[_resources_pb2.Bus, _Mapping]]] = ...) -> None: ... class ChangeBusStatusRequest(_message.Message): - __slots__ = ("bus_id", "status") + __slots__ = ("bus_id", "bus_status") BUS_ID_FIELD_NUMBER: _ClassVar[int] - STATUS_FIELD_NUMBER: _ClassVar[int] + BUS_STATUS_FIELD_NUMBER: _ClassVar[int] bus_id: str - status: _resources_pb2.Status - def __init__(self, bus_id: _Optional[str] = ..., status: _Optional[_Union[_resources_pb2.Status, str]] = ...) -> None: ... + bus_status: _resources_pb2.BusStatus + def __init__(self, bus_id: _Optional[str] = ..., bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ...) -> None: ... class ChangeBusStatusResponse(_message.Message): __slots__ = ("bus",) @@ -83,18 +83,18 @@ class TrackBusContinuousResponse(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ...) -> None: ... class StreamBusVideoRequest(_message.Message): - __slots__ = ("bus_id", "nursery_id", "bus_type", "video_type", "video_chunk") + __slots__ = ("bus_id", "nursery_id", "bus_type", "vehicle_event", "video_chunk") BUS_ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] BUS_TYPE_FIELD_NUMBER: _ClassVar[int] - VIDEO_TYPE_FIELD_NUMBER: _ClassVar[int] + VEHICLE_EVENT_FIELD_NUMBER: _ClassVar[int] VIDEO_CHUNK_FIELD_NUMBER: _ClassVar[int] bus_id: str nursery_id: str bus_type: _resources_pb2.BusType - video_type: _resources_pb2.VideoType + vehicle_event: _resources_pb2.VehicleEvent video_chunk: bytes - def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., video_type: _Optional[_Union[_resources_pb2.VideoType, str]] = ..., video_chunk: _Optional[bytes] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[bytes] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = ("is_detected", "children") diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py index 966efcdb..834b49b2 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x87\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12\x32\n\x06status\x18\x05 \x01(\x0e\x32\x1a.where_child_bus.v1.StatusR\x06status\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*a\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_STOPPED\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x17\n\x13STATUS_MAINTEINANCE\x10\x03*V\n\tVideoType\x12\x1a\n\x16VIDEO_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11VIDEO_TYPE_GET_ON\x10\x01\x12\x16\n\x12VIDEO_TYPE_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x91\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_STATUS']._serialized_start=3381 - _globals['_STATUS']._serialized_end=3478 - _globals['_VIDEOTYPE']._serialized_start=3480 - _globals['_VIDEOTYPE']._serialized_end=3566 - _globals['_SEX']._serialized_start=3568 - _globals['_SEX']._serialized_end=3637 - _globals['_BUSTYPE']._serialized_start=3639 - _globals['_BUSTYPE']._serialized_end=3718 + _globals['_BUSSTATUS']._serialized_start=3391 + _globals['_BUSSTATUS']._serialized_end=3506 + _globals['_VEHICLEEVENT']._serialized_start=3508 + _globals['_VEHICLEEVENT']._serialized_end=3606 + _globals['_SEX']._serialized_start=3608 + _globals['_SEX']._serialized_end=3677 + _globals['_BUSTYPE']._serialized_start=3679 + _globals['_BUSTYPE']._serialized_end=3758 _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=414 _globals['_NURSERYRESPONSE']._serialized_start=417 @@ -40,17 +40,17 @@ _globals['_GUARDIANRESPONSE']._serialized_start=1095 _globals['_GUARDIANRESPONSE']._serialized_end=1445 _globals['_BUS']._serialized_start=1448 - _globals['_BUS']._serialized_end=1839 - _globals['_CHILD']._serialized_start=1842 - _globals['_CHILD']._serialized_end=2350 - _globals['_STATION']._serialized_start=2353 - _globals['_STATION']._serialized_end=2771 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2774 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2917 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=2919 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=2996 - _globals['_CHILDPHOTO']._serialized_start=2999 - _globals['_CHILDPHOTO']._serialized_end=3203 - _globals['_BOARDINGRECORD']._serialized_start=3206 - _globals['_BOARDINGRECORD']._serialized_end=3379 + _globals['_BUS']._serialized_end=1849 + _globals['_CHILD']._serialized_start=1852 + _globals['_CHILD']._serialized_end=2360 + _globals['_STATION']._serialized_start=2363 + _globals['_STATION']._serialized_end=2781 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2784 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2927 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=2929 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=3006 + _globals['_CHILDPHOTO']._serialized_start=3009 + _globals['_CHILDPHOTO']._serialized_end=3213 + _globals['_BOARDINGRECORD']._serialized_start=3216 + _globals['_BOARDINGRECORD']._serialized_end=3389 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi index cd71a07c..b5056a46 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi @@ -6,18 +6,18 @@ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Opti DESCRIPTOR: _descriptor.FileDescriptor -class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): +class BusStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () - STATUS_UNSPECIFIED: _ClassVar[Status] - STATUS_STOPPED: _ClassVar[Status] - STATUS_RUNNING: _ClassVar[Status] - STATUS_MAINTEINANCE: _ClassVar[Status] + BUS_STATUS_UNSPECIFIED: _ClassVar[BusStatus] + BUS_STATUS_STOPPED: _ClassVar[BusStatus] + BUS_STATUS_RUNNING: _ClassVar[BusStatus] + BUS_STATUS_MAINTENANCE: _ClassVar[BusStatus] -class VideoType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): +class VehicleEvent(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () - VIDEO_TYPE_UNSPECIFIED: _ClassVar[VideoType] - VIDEO_TYPE_GET_ON: _ClassVar[VideoType] - VIDEO_TYPE_GET_OFF: _ClassVar[VideoType] + VEHICLE_EVENT_UNSPECIFIED: _ClassVar[VehicleEvent] + VEHICLE_EVENT_GET_ON: _ClassVar[VehicleEvent] + VEHICLE_EVENT_GET_OFF: _ClassVar[VehicleEvent] class Sex(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () @@ -31,13 +31,13 @@ class BusType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): BUS_TYPE_UNSPECIFIED: _ClassVar[BusType] BUS_TYPE_MORNING: _ClassVar[BusType] BUS_TYPE_EVENING: _ClassVar[BusType] -STATUS_UNSPECIFIED: Status -STATUS_STOPPED: Status -STATUS_RUNNING: Status -STATUS_MAINTEINANCE: Status -VIDEO_TYPE_UNSPECIFIED: VideoType -VIDEO_TYPE_GET_ON: VideoType -VIDEO_TYPE_GET_OFF: VideoType +BUS_STATUS_UNSPECIFIED: BusStatus +BUS_STATUS_STOPPED: BusStatus +BUS_STATUS_RUNNING: BusStatus +BUS_STATUS_MAINTENANCE: BusStatus +VEHICLE_EVENT_UNSPECIFIED: VehicleEvent +VEHICLE_EVENT_GET_ON: VehicleEvent +VEHICLE_EVENT_GET_OFF: VehicleEvent SEX_UNSPECIFIED: Sex SEX_MAN: Sex SEX_WOMAN: Sex @@ -135,12 +135,12 @@ class GuardianResponse(_message.Message): def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Bus(_message.Message): - __slots__ = ("id", "nursery_id", "name", "plate_number", "status", "latitude", "longitude", "enable_face_recognition", "created_at", "updated_at") + __slots__ = ("id", "nursery_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] - STATUS_FIELD_NUMBER: _ClassVar[int] + BUS_STATUS_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] ENABLE_FACE_RECOGNITION_FIELD_NUMBER: _ClassVar[int] @@ -150,13 +150,13 @@ class Bus(_message.Message): nursery_id: str name: str plate_number: str - status: Status + bus_status: BusStatus latitude: float longitude: float enable_face_recognition: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., status: _Optional[_Union[Status, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Child(_message.Message): __slots__ = ("id", "nursery_id", "guardian_id", "name", "age", "sex", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "created_at", "updated_at") diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 1bb0068e..6ee7becd 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -36,7 +36,7 @@ message GetBusListByNurseryIdResponse { message ChangeBusStatusRequest { string bus_id = 1; - Status status = 2; + BusStatus bus_status = 2; } message ChangeBusStatusResponse { @@ -68,7 +68,7 @@ message StreamBusVideoRequest { string bus_id = 1; string nursery_id = 2; BusType bus_type = 3; - VideoType video_type = 4; + VehicleEvent vehicle_event = 4; bytes video_chunk = 5; // Chunk of video data } diff --git a/proto/where_child_bus/v1/resources.proto b/proto/where_child_bus/v1/resources.proto index a817fb08..e1fe78ef 100644 --- a/proto/where_child_bus/v1/resources.proto +++ b/proto/where_child_bus/v1/resources.proto @@ -54,17 +54,17 @@ message GuardianResponse { google.protobuf.Timestamp updated_at = 9; } -enum Status { - STATUS_UNSPECIFIED = 0; - STATUS_STOPPED = 1; - STATUS_RUNNING = 2; - STATUS_MAINTEINANCE = 3; +enum BusStatus { + BUS_STATUS_UNSPECIFIED = 0; + BUS_STATUS_STOPPED = 1; + BUS_STATUS_RUNNING = 2; + BUS_STATUS_MAINTENANCE = 3; } -enum VideoType { - VIDEO_TYPE_UNSPECIFIED = 0; - VIDEO_TYPE_GET_ON = 1; - VIDEO_TYPE_GET_OFF = 2; +enum VehicleEvent { + VEHICLE_EVENT_UNSPECIFIED = 0; + VEHICLE_EVENT_GET_ON = 1; + VEHICLE_EVENT_GET_OFF = 2; } message Bus { @@ -72,7 +72,7 @@ message Bus { string nursery_id = 2; string name = 3; string plate_number = 4; - Status status = 5; + BusStatus bus_status = 5; //緯度経度 double latitude = 6; double longitude = 7; From 88f00736a09f11bd6f3ca80695a0712b9a7ac854 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 01:26:31 +0900 Subject: [PATCH 488/771] =?UTF-8?q?feat:=20proto=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=81=AB=E4=BC=B4=E3=81=86=E4=B8=8D=E5=85=B7=E5=90=88=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 28 ++++++++++------------------ backend/usecases/utils/utils.go | 18 +++++++++--------- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index a8775d27..26b4d973 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -9,7 +9,6 @@ import ( "github.com/google/uuid" "golang.org/x/exp/slog" - "google.golang.org/protobuf/types/known/timestamppb" "context" @@ -215,7 +214,7 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu return nil, err } - status, err := utils.ConvertPbStatusToEntStatus(req.Status) + status, err := utils.ConvertPbStatusToEntStatus(req.BusStatus) if err != nil { i.logger.Error("failed to convert status", "error", err) return nil, err @@ -314,7 +313,6 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea BusId: req.BusId, Latitude: bus.Latitude, Longitude: bus.Longitude, - Timestamp: ×tamppb.Timestamp{Seconds: time.Now().Unix()}, }); err != nil { return fmt.Errorf("failed to send bus: %w", err) } @@ -328,7 +326,7 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e } var busID string - var videoType pb.VideoType + var vehicleEvent pb.VehicleEvent // Go サーバーから受け取ったメッセージをPythonサーバーに転送 for { @@ -343,16 +341,10 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e // バスID、バスタイプ、ビデオタイプを保持 busID = in.BusId - videoType = in.VideoType - - // Python サーバーへ送信 - err = MLStream.Send(&pb.StreamBusVideoRequest{ - BusId: in.BusId, - BusType: in.BusType, - VideoType: in.VideoType, - VideoChunk: in.VideoChunk, - Timestamp: in.Timestamp, - }) + vehicleEvent = in.VehicleEvent + + // Python サーバーへそのまま転送 + err = MLStream.Send(in) if err != nil { return err } @@ -405,8 +397,8 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e // レコード作成成功 } - switch videoType { - case pb.VideoType_VIDEO_TYPE_GET_ON: + switch vehicleEvent { + case pb.VehicleEvent_VEHICLE_EVENT_GET_ON: // 乗車時の検出の場合 _, err = i.entClient.BoardingRecord.Update(). Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). // 乗車レコードを更新 @@ -414,7 +406,7 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e SetIsBoarding(true). // 乗車フラグを立てる SetTimestamp(time.Now()). // 乗車時刻を記録 Save(context.Background()) - case pb.VideoType_VIDEO_TYPE_GET_OFF: + case pb.VehicleEvent_VEHICLE_EVENT_GET_OFF: // 降車時の検出の場合 _, err = i.entClient.BoardingRecord.Update(). Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). // 降車レコードを更新 @@ -423,7 +415,7 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e SetTimestamp(time.Now()). // 降車時刻を記録 Save(context.Background()) default: - return fmt.Errorf("invalid video type: %v", videoType) + return fmt.Errorf("invalid video type: %v", vehicleEvent) } if err != nil { diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 6a14fccc..b3e2a02b 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -47,12 +47,12 @@ func convertSexToPbSex(sex child.Sex) pb.Sex { } } -func ConvertPbStatusToEntStatus(pbStatus pb.Status) (*bus.Status, error) { +func ConvertPbStatusToEntStatus(pbStatus pb.BusStatus) (*bus.Status, error) { switch pbStatus { - case pb.Status_STATUS_RUNNING: + case pb.BusStatus_BUS_STATUS_RUNNING: status := bus.StatusRunning return &status, nil - case pb.Status_STATUS_STOPPED: + case pb.BusStatus_BUS_STATUS_STOPPED: status := bus.StatusStopped return &status, nil default: @@ -62,13 +62,13 @@ func ConvertPbStatusToEntStatus(pbStatus pb.Status) (*bus.Status, error) { } func ToPbBus(t *ent.Bus) *pb.Bus { - status := convertStatusToPbStatus(t.Status) + busStatus := convertStatusToPbStatus(t.Status) return &pb.Bus{ Id: t.ID.String(), NurseryId: t.Edges.Nursery.ID.String(), Name: t.Name, PlateNumber: t.PlateNumber, - Status: status, + BusStatus: busStatus, Latitude: t.Latitude, Longitude: t.Longitude, EnableFaceRecognition: t.EnableFaceRecognition, @@ -94,14 +94,14 @@ func ConvertPbSexToEntSex(pbSex pb.Sex) (*child.Sex, error) { } } -func convertStatusToPbStatus(status bus.Status) pb.Status { +func convertStatusToPbStatus(status bus.Status) pb.BusStatus { switch status { case bus.StatusRunning: - return pb.Status_STATUS_RUNNING + return pb.BusStatus_BUS_STATUS_STOPPED case bus.StatusStopped: - return pb.Status_STATUS_STOPPED + return pb.BusStatus_BUS_STATUS_STOPPED default: - return pb.Status_STATUS_UNSPECIFIED + return pb.BusStatus_BUS_STATUS_STOPPED } } From f2c561fa84c60cce6cc46416bfc5caf55ca7b607 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 01:26:59 +0900 Subject: [PATCH 489/771] =?UTF-8?q?feat:=20=E5=AD=90=E4=BE=9B=E3=81=AE?= =?UTF-8?q?=E4=B9=97=E8=BB=8A=E7=8A=B6=E6=B3=81=E3=82=92=E7=A2=BA=E8=AA=8D?= =?UTF-8?q?=E3=81=99=E3=82=8BAPI=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/child.go | 5 + .../go/where_child_bus/v1/child.pb.go | 208 +++++++++++++++--- .../go/where_child_bus/v1/child_grpc.pb.go | 37 ++++ backend/usecases/child/child.go | 29 +++ .../where_child_bus/v1/child.pb.dart | 100 +++++++++ .../where_child_bus/v1/child.pbgrpc.dart | 20 ++ .../where_child_bus/v1/child.pbjson.dart | 25 +++ .../generated/where_child_bus/v1/child_pb2.py | 10 +- .../where_child_bus/v1/child_pb2.pyi | 12 + .../where_child_bus/v1/child_pb2_grpc.py | 33 +++ proto/where_child_bus/v1/child.proto | 9 + 11 files changed, 449 insertions(+), 39 deletions(-) diff --git a/backend/interfaces/child.go b/backend/interfaces/child.go index db7b6d3d..99019fbf 100644 --- a/backend/interfaces/child.go +++ b/backend/interfaces/child.go @@ -15,6 +15,11 @@ func NewChildServiceServer(interactor *child.Interactor) pb.ChildServiceServer { return &childServiceServer{interactor} } +// CheckIsChildInBus implements where_child_busv1.ChildServiceServer. +func (s *childServiceServer) CheckIsChildInBus(ctx context.Context, req *pb.CheckIsChildInBusRequest) (*pb.CheckIsChildInBusResponse, error) { + return s.interactor.CheckIsChildInBus(ctx, req) +} + // GetChildListByBusID implements where_child_busv1.ChildServiceServer. func (s *childServiceServer) GetChildListByBusID(ctx context.Context, req *pb.GetChildListByBusIDRequest) (*pb.GetChildListByBusIDResponse, error) { return s.interactor.GetChildListByBusID(ctx, req) diff --git a/backend/proto-gen/go/where_child_bus/v1/child.pb.go b/backend/proto-gen/go/where_child_bus/v1/child.pb.go index e55c313f..d9c19644 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child.pb.go @@ -460,6 +460,100 @@ func (x *GetChildListByBusIDResponse) GetPhotos() []*ChildPhoto { return nil } +type CheckIsChildInBusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChildId string `protobuf:"bytes,1,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` +} + +func (x *CheckIsChildInBusRequest) Reset() { + *x = CheckIsChildInBusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckIsChildInBusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckIsChildInBusRequest) ProtoMessage() {} + +func (x *CheckIsChildInBusRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckIsChildInBusRequest.ProtoReflect.Descriptor instead. +func (*CheckIsChildInBusRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{8} +} + +func (x *CheckIsChildInBusRequest) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +type CheckIsChildInBusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsInBus bool `protobuf:"varint,1,opt,name=is_in_bus,json=isInBus,proto3" json:"is_in_bus,omitempty"` +} + +func (x *CheckIsChildInBusResponse) Reset() { + *x = CheckIsChildInBusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckIsChildInBusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckIsChildInBusResponse) ProtoMessage() {} + +func (x *CheckIsChildInBusResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckIsChildInBusResponse.ProtoReflect.Descriptor instead. +func (*CheckIsChildInBusResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{9} +} + +func (x *CheckIsChildInBusResponse) GetIsInBus() bool { + if x != nil { + return x.IsInBus + } + return false +} + var File_where_child_bus_v1_child_proto protoreflect.FileDescriptor var file_where_child_bus_v1_child_proto_rawDesc = []byte{ @@ -524,7 +618,14 @@ var file_where_child_bus_v1_child_proto_rawDesc = []byte{ 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, - 0x32, 0xf3, 0x03, 0x0a, 0x0c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x22, 0x35, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x49, 0x6e, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x19, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x49, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x62, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x49, 0x6e, 0x42, 0x75, 0x73, + 0x32, 0xe5, 0x04, 0x0a, 0x0c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, @@ -555,22 +656,29 @@ var file_where_child_bus_v1_child_proto_rawDesc = []byte{ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, - 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, + 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, + 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, + 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, + 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, + 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -585,7 +693,7 @@ func file_where_child_bus_v1_child_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_child_proto_rawDescData } -var file_where_child_bus_v1_child_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_where_child_bus_v1_child_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ (*CreateChildRequest)(nil), // 0: where_child_bus.v1.CreateChildRequest (*CreateChildResponse)(nil), // 1: where_child_bus.v1.CreateChildResponse @@ -595,29 +703,33 @@ var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ (*GetChildListByGuardianIDResponse)(nil), // 5: where_child_bus.v1.GetChildListByGuardianIDResponse (*GetChildListByBusIDRequest)(nil), // 6: where_child_bus.v1.GetChildListByBusIDRequest (*GetChildListByBusIDResponse)(nil), // 7: where_child_bus.v1.GetChildListByBusIDResponse - (Sex)(0), // 8: where_child_bus.v1.Sex - (*Child)(nil), // 9: where_child_bus.v1.Child - (*ChildPhoto)(nil), // 10: where_child_bus.v1.ChildPhoto + (*CheckIsChildInBusRequest)(nil), // 8: where_child_bus.v1.CheckIsChildInBusRequest + (*CheckIsChildInBusResponse)(nil), // 9: where_child_bus.v1.CheckIsChildInBusResponse + (Sex)(0), // 10: where_child_bus.v1.Sex + (*Child)(nil), // 11: where_child_bus.v1.Child + (*ChildPhoto)(nil), // 12: where_child_bus.v1.ChildPhoto } var file_where_child_bus_v1_child_proto_depIdxs = []int32{ - 8, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex - 9, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child - 9, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child - 10, // 3: where_child_bus.v1.GetChildListByNurseryIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto - 9, // 4: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child - 10, // 5: where_child_bus.v1.GetChildListByGuardianIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto - 9, // 6: where_child_bus.v1.GetChildListByBusIDResponse.children:type_name -> where_child_bus.v1.Child - 10, // 7: where_child_bus.v1.GetChildListByBusIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 10, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex + 11, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child + 11, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child + 12, // 3: where_child_bus.v1.GetChildListByNurseryIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 11, // 4: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child + 12, // 5: where_child_bus.v1.GetChildListByGuardianIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 11, // 6: where_child_bus.v1.GetChildListByBusIDResponse.children:type_name -> where_child_bus.v1.Child + 12, // 7: where_child_bus.v1.GetChildListByBusIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto 0, // 8: where_child_bus.v1.ChildService.CreateChild:input_type -> where_child_bus.v1.CreateChildRequest 2, // 9: where_child_bus.v1.ChildService.GetChildListByNurseryID:input_type -> where_child_bus.v1.GetChildListByNurseryIDRequest 4, // 10: where_child_bus.v1.ChildService.GetChildListByGuardianID:input_type -> where_child_bus.v1.GetChildListByGuardianIDRequest 6, // 11: where_child_bus.v1.ChildService.GetChildListByBusID:input_type -> where_child_bus.v1.GetChildListByBusIDRequest - 1, // 12: where_child_bus.v1.ChildService.CreateChild:output_type -> where_child_bus.v1.CreateChildResponse - 3, // 13: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse - 5, // 14: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse - 7, // 15: where_child_bus.v1.ChildService.GetChildListByBusID:output_type -> where_child_bus.v1.GetChildListByBusIDResponse - 12, // [12:16] is the sub-list for method output_type - 8, // [8:12] is the sub-list for method input_type + 8, // 12: where_child_bus.v1.ChildService.CheckIsChildInBus:input_type -> where_child_bus.v1.CheckIsChildInBusRequest + 1, // 13: where_child_bus.v1.ChildService.CreateChild:output_type -> where_child_bus.v1.CreateChildResponse + 3, // 14: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse + 5, // 15: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse + 7, // 16: where_child_bus.v1.ChildService.GetChildListByBusID:output_type -> where_child_bus.v1.GetChildListByBusIDResponse + 9, // 17: where_child_bus.v1.ChildService.CheckIsChildInBus:output_type -> where_child_bus.v1.CheckIsChildInBusResponse + 13, // [13:18] is the sub-list for method output_type + 8, // [8:13] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name @@ -726,6 +838,30 @@ func file_where_child_bus_v1_child_proto_init() { return nil } } + file_where_child_bus_v1_child_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckIsChildInBusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckIsChildInBusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -733,7 +869,7 @@ func file_where_child_bus_v1_child_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_child_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go index 206fea4f..5890a085 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go @@ -23,6 +23,7 @@ const ( ChildService_GetChildListByNurseryID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByNurseryID" ChildService_GetChildListByGuardianID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByGuardianID" ChildService_GetChildListByBusID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByBusID" + ChildService_CheckIsChildInBus_FullMethodName = "/where_child_bus.v1.ChildService/CheckIsChildInBus" ) // ChildServiceClient is the client API for ChildService service. @@ -33,6 +34,7 @@ type ChildServiceClient interface { GetChildListByNurseryID(ctx context.Context, in *GetChildListByNurseryIDRequest, opts ...grpc.CallOption) (*GetChildListByNurseryIDResponse, error) GetChildListByGuardianID(ctx context.Context, in *GetChildListByGuardianIDRequest, opts ...grpc.CallOption) (*GetChildListByGuardianIDResponse, error) GetChildListByBusID(ctx context.Context, in *GetChildListByBusIDRequest, opts ...grpc.CallOption) (*GetChildListByBusIDResponse, error) + CheckIsChildInBus(ctx context.Context, in *CheckIsChildInBusRequest, opts ...grpc.CallOption) (*CheckIsChildInBusResponse, error) } type childServiceClient struct { @@ -79,6 +81,15 @@ func (c *childServiceClient) GetChildListByBusID(ctx context.Context, in *GetChi return out, nil } +func (c *childServiceClient) CheckIsChildInBus(ctx context.Context, in *CheckIsChildInBusRequest, opts ...grpc.CallOption) (*CheckIsChildInBusResponse, error) { + out := new(CheckIsChildInBusResponse) + err := c.cc.Invoke(ctx, ChildService_CheckIsChildInBus_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ChildServiceServer is the server API for ChildService service. // All implementations should embed UnimplementedChildServiceServer // for forward compatibility @@ -87,6 +98,7 @@ type ChildServiceServer interface { GetChildListByNurseryID(context.Context, *GetChildListByNurseryIDRequest) (*GetChildListByNurseryIDResponse, error) GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) GetChildListByBusID(context.Context, *GetChildListByBusIDRequest) (*GetChildListByBusIDResponse, error) + CheckIsChildInBus(context.Context, *CheckIsChildInBusRequest) (*CheckIsChildInBusResponse, error) } // UnimplementedChildServiceServer should be embedded to have forward compatible implementations. @@ -105,6 +117,9 @@ func (UnimplementedChildServiceServer) GetChildListByGuardianID(context.Context, func (UnimplementedChildServiceServer) GetChildListByBusID(context.Context, *GetChildListByBusIDRequest) (*GetChildListByBusIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetChildListByBusID not implemented") } +func (UnimplementedChildServiceServer) CheckIsChildInBus(context.Context, *CheckIsChildInBusRequest) (*CheckIsChildInBusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckIsChildInBus not implemented") +} // UnsafeChildServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ChildServiceServer will @@ -189,6 +204,24 @@ func _ChildService_GetChildListByBusID_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _ChildService_CheckIsChildInBus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckIsChildInBusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChildServiceServer).CheckIsChildInBus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChildService_CheckIsChildInBus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChildServiceServer).CheckIsChildInBus(ctx, req.(*CheckIsChildInBusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ChildService_ServiceDesc is the grpc.ServiceDesc for ChildService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -212,6 +245,10 @@ var ChildService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetChildListByBusID", Handler: _ChildService_GetChildListByBusID_Handler, }, + { + MethodName: "CheckIsChildInBus", + Handler: _ChildService_CheckIsChildInBus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/child.proto", diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index ed8c26be..fa37aebf 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -14,6 +14,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + boardingRecordRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childBusAssociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" @@ -147,6 +148,34 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest }, nil } +func (i *Interactor) CheckIsChildInBus(ctx context.Context, req *pb.CheckIsChildInBusRequest) (*pb.CheckIsChildInBusResponse, error) { + childID, err := uuid.Parse(req.ChildId) + if err != nil { + i.logger.Error("failed to parse child ID", "error", err) + return nil, err + + } + + boardingRecord, err := i.entClient.BoardingRecord.Query(). + Where(boardingRecordRepo.HasChildWith(childRepo.IDEQ(childID))). + Only(ctx) + + if err != nil { + if ent.IsNotFound(err) { + return &pb.CheckIsChildInBusResponse{ + IsInBus: false, + }, nil + } else { + i.logger.Error("failed to check if child is in bus", "error", err) + return nil, err + } + } + + return &pb.CheckIsChildInBusResponse{ + IsInBus: boardingRecord.IsBoarding, + }, nil +} + func (i *Interactor) GetChildListByGuardianID(ctx context.Context, req *pb.GetChildListByGuardianIDRequest) (*pb.GetChildListByGuardianIDResponse, error) { guardianID, err := uuid.Parse(req.GuardianId) if err != nil { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart index 889bdf38..d318b78d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -488,6 +488,106 @@ class GetChildListByBusIDResponse extends $pb.GeneratedMessage { $core.List<$8.ChildPhoto> get photos => $_getList(1); } +class CheckIsChildInBusRequest extends $pb.GeneratedMessage { + factory CheckIsChildInBusRequest({ + $core.String? childId, + }) { + final $result = create(); + if (childId != null) { + $result.childId = childId; + } + return $result; + } + CheckIsChildInBusRequest._() : super(); + factory CheckIsChildInBusRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CheckIsChildInBusRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CheckIsChildInBusRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'childId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CheckIsChildInBusRequest clone() => CheckIsChildInBusRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CheckIsChildInBusRequest copyWith(void Function(CheckIsChildInBusRequest) updates) => super.copyWith((message) => updates(message as CheckIsChildInBusRequest)) as CheckIsChildInBusRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CheckIsChildInBusRequest create() => CheckIsChildInBusRequest._(); + CheckIsChildInBusRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CheckIsChildInBusRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CheckIsChildInBusRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get childId => $_getSZ(0); + @$pb.TagNumber(1) + set childId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasChildId() => $_has(0); + @$pb.TagNumber(1) + void clearChildId() => clearField(1); +} + +class CheckIsChildInBusResponse extends $pb.GeneratedMessage { + factory CheckIsChildInBusResponse({ + $core.bool? isInBus, + }) { + final $result = create(); + if (isInBus != null) { + $result.isInBus = isInBus; + } + return $result; + } + CheckIsChildInBusResponse._() : super(); + factory CheckIsChildInBusResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CheckIsChildInBusResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CheckIsChildInBusResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'isInBus') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CheckIsChildInBusResponse clone() => CheckIsChildInBusResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CheckIsChildInBusResponse copyWith(void Function(CheckIsChildInBusResponse) updates) => super.copyWith((message) => updates(message as CheckIsChildInBusResponse)) as CheckIsChildInBusResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CheckIsChildInBusResponse create() => CheckIsChildInBusResponse._(); + CheckIsChildInBusResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CheckIsChildInBusResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CheckIsChildInBusResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get isInBus => $_getBF(0); + @$pb.TagNumber(1) + set isInBus($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasIsInBus() => $_has(0); + @$pb.TagNumber(1) + void clearIsInBus() => clearField(1); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart index 310deac9..b0d63ed1 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart @@ -37,6 +37,10 @@ class ChildServiceClient extends $grpc.Client { '/where_child_bus.v1.ChildService/GetChildListByBusID', ($1.GetChildListByBusIDRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $1.GetChildListByBusIDResponse.fromBuffer(value)); + static final _$checkIsChildInBus = $grpc.ClientMethod<$1.CheckIsChildInBusRequest, $1.CheckIsChildInBusResponse>( + '/where_child_bus.v1.ChildService/CheckIsChildInBus', + ($1.CheckIsChildInBusRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.CheckIsChildInBusResponse.fromBuffer(value)); ChildServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -59,6 +63,10 @@ class ChildServiceClient extends $grpc.Client { $grpc.ResponseFuture<$1.GetChildListByBusIDResponse> getChildListByBusID($1.GetChildListByBusIDRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getChildListByBusID, request, options: options); } + + $grpc.ResponseFuture<$1.CheckIsChildInBusResponse> checkIsChildInBus($1.CheckIsChildInBusRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$checkIsChildInBus, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.ChildService') @@ -94,6 +102,13 @@ abstract class ChildServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $1.GetChildListByBusIDRequest.fromBuffer(value), ($1.GetChildListByBusIDResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.CheckIsChildInBusRequest, $1.CheckIsChildInBusResponse>( + 'CheckIsChildInBus', + checkIsChildInBus_Pre, + false, + false, + ($core.List<$core.int> value) => $1.CheckIsChildInBusRequest.fromBuffer(value), + ($1.CheckIsChildInBusResponse value) => value.writeToBuffer())); } $async.Future<$1.CreateChildResponse> createChild_Pre($grpc.ServiceCall call, $async.Future<$1.CreateChildRequest> request) async { @@ -112,8 +127,13 @@ abstract class ChildServiceBase extends $grpc.Service { return getChildListByBusID(call, await request); } + $async.Future<$1.CheckIsChildInBusResponse> checkIsChildInBus_Pre($grpc.ServiceCall call, $async.Future<$1.CheckIsChildInBusRequest> request) async { + return checkIsChildInBus(call, await request); + } + $async.Future<$1.CreateChildResponse> createChild($grpc.ServiceCall call, $1.CreateChildRequest request); $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($grpc.ServiceCall call, $1.GetChildListByGuardianIDRequest request); $async.Future<$1.GetChildListByBusIDResponse> getChildListByBusID($grpc.ServiceCall call, $1.GetChildListByBusIDRequest request); + $async.Future<$1.CheckIsChildInBusResponse> checkIsChildInBus($grpc.ServiceCall call, $1.CheckIsChildInBusRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart index 17a3fcca..23f23a32 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -129,3 +129,28 @@ final $typed_data.Uint8List getChildListByBusIDResponseDescriptor = $convert.bas '9jaGlsZF9idXMudjEuQ2hpbGRSCGNoaWxkcmVuEjYKBnBob3RvcxgCIAMoCzIeLndoZXJlX2No' 'aWxkX2J1cy52MS5DaGlsZFBob3RvUgZwaG90b3M='); +@$core.Deprecated('Use checkIsChildInBusRequestDescriptor instead') +const CheckIsChildInBusRequest$json = { + '1': 'CheckIsChildInBusRequest', + '2': [ + {'1': 'child_id', '3': 1, '4': 1, '5': 9, '10': 'childId'}, + ], +}; + +/// Descriptor for `CheckIsChildInBusRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List checkIsChildInBusRequestDescriptor = $convert.base64Decode( + 'ChhDaGVja0lzQ2hpbGRJbkJ1c1JlcXVlc3QSGQoIY2hpbGRfaWQYASABKAlSB2NoaWxkSWQ='); + +@$core.Deprecated('Use checkIsChildInBusResponseDescriptor instead') +const CheckIsChildInBusResponse$json = { + '1': 'CheckIsChildInBusResponse', + '2': [ + {'1': 'is_in_bus', '3': 1, '4': 1, '5': 8, '10': 'isInBus'}, + ], +}; + +/// Descriptor for `CheckIsChildInBusResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List checkIsChildInBusResponseDescriptor = $convert.base64Decode( + 'ChlDaGVja0lzQ2hpbGRJbkJ1c1Jlc3BvbnNlEhoKCWlzX2luX2J1cxgBIAEoCFIHaXNJbkJ1cw' + '=='); + diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2.py b/machine_learning/src/generated/where_child_bus/v1/child_pb2.py index 86188c57..7b232590 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos2\xf3\x03\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"5\n\x18\x43heckIsChildInBusRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"7\n\x19\x43heckIsChildInBusResponse\x12\x1a\n\tis_in_bus\x18\x01 \x01(\x08R\x07isInBus2\xe5\x04\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponse\x12p\n\x11\x43heckIsChildInBus\x12,.where_child_bus.v1.CheckIsChildInBusRequest\x1a-.where_child_bus.v1.CheckIsChildInBusResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -39,6 +39,10 @@ _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=833 _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=836 _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=976 - _globals['_CHILDSERVICE']._serialized_start=979 - _globals['_CHILDSERVICE']._serialized_end=1478 + _globals['_CHECKISCHILDINBUSREQUEST']._serialized_start=978 + _globals['_CHECKISCHILDINBUSREQUEST']._serialized_end=1031 + _globals['_CHECKISCHILDINBUSRESPONSE']._serialized_start=1033 + _globals['_CHECKISCHILDINBUSRESPONSE']._serialized_end=1088 + _globals['_CHILDSERVICE']._serialized_start=1091 + _globals['_CHILDSERVICE']._serialized_end=1704 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi index 410879ad..ae65323f 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi @@ -69,3 +69,15 @@ class GetChildListByBusIDResponse(_message.Message): children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... + +class CheckIsChildInBusRequest(_message.Message): + __slots__ = ("child_id",) + CHILD_ID_FIELD_NUMBER: _ClassVar[int] + child_id: str + def __init__(self, child_id: _Optional[str] = ...) -> None: ... + +class CheckIsChildInBusResponse(_message.Message): + __slots__ = ("is_in_bus",) + IS_IN_BUS_FIELD_NUMBER: _ClassVar[int] + is_in_bus: bool + def __init__(self, is_in_bus: bool = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py index d76d8ecb..0a31aeb9 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py @@ -34,6 +34,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.FromString, ) + self.CheckIsChildInBus = channel.unary_unary( + '/where_child_bus.v1.ChildService/CheckIsChildInBus', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.FromString, + ) class ChildServiceServicer(object): @@ -63,6 +68,12 @@ def GetChildListByBusID(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def CheckIsChildInBus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_ChildServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -86,6 +97,11 @@ def add_ChildServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.SerializeToString, ), + 'CheckIsChildInBus': grpc.unary_unary_rpc_method_handler( + servicer.CheckIsChildInBus, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.ChildService', rpc_method_handlers) @@ -163,3 +179,20 @@ def GetChildListByBusID(request, where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CheckIsChildInBus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/CheckIsChildInBus', + where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.SerializeToString, + where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/child.proto b/proto/where_child_bus/v1/child.proto index 9a625ba0..cd2ae8b9 100644 --- a/proto/where_child_bus/v1/child.proto +++ b/proto/where_child_bus/v1/child.proto @@ -9,6 +9,7 @@ service ChildService { rpc GetChildListByNurseryID(GetChildListByNurseryIDRequest) returns (GetChildListByNurseryIDResponse); rpc GetChildListByGuardianID(GetChildListByGuardianIDRequest) returns (GetChildListByGuardianIDResponse); rpc GetChildListByBusID(GetChildListByBusIDRequest) returns (GetChildListByBusIDResponse); + rpc CheckIsChildInBus(CheckIsChildInBusRequest) returns (CheckIsChildInBusResponse); } message CreateChildRequest { @@ -50,3 +51,11 @@ message GetChildListByBusIDResponse { repeated Child children = 1; repeated ChildPhoto photos = 2; } + +message CheckIsChildInBusRequest { + string child_id = 1; +} + +message CheckIsChildInBusResponse { + bool is_in_bus = 1; +} From f7d0f3b8776c2b3986c93a86a7f471bd4748eaad Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 01:37:53 +0900 Subject: [PATCH 490/771] =?UTF-8?q?feat:=20=E3=83=93=E3=83=87=E3=82=AA?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC=E3=83=A0=E3=81=AEbytes?= =?UTF-8?q?=E3=82=92repeated=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/proto-gen/go/where_child_bus/v1/bus.pb.go | 6 +++--- .../lib/proto-gen/where_child_bus/v1/bus.pb.dart | 14 ++++---------- .../proto-gen/where_child_bus/v1/bus.pbjson.dart | 4 ++-- .../src/generated/where_child_bus/v1/bus_pb2.py | 2 +- .../src/generated/where_child_bus/v1/bus_pb2.pyi | 4 ++-- proto/where_child_bus/v1/bus.proto | 2 +- 6 files changed, 13 insertions(+), 19 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 87654a44..983a6bb7 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -563,7 +563,7 @@ type StreamBusVideoRequest struct { NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` BusType BusType `protobuf:"varint,3,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` VehicleEvent VehicleEvent `protobuf:"varint,4,opt,name=vehicle_event,json=vehicleEvent,proto3,enum=where_child_bus.v1.VehicleEvent" json:"vehicle_event,omitempty"` - VideoChunk []byte `protobuf:"bytes,5,opt,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data + VideoChunk [][]byte `protobuf:"bytes,5,rep,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data } func (x *StreamBusVideoRequest) Reset() { @@ -626,7 +626,7 @@ func (x *StreamBusVideoRequest) GetVehicleEvent() VehicleEvent { return VehicleEvent_VEHICLE_EVENT_UNSPECIFIED } -func (x *StreamBusVideoRequest) GetVideoChunk() []byte { +func (x *StreamBusVideoRequest) GetVideoChunk() [][]byte { if x != nil { return x.VideoChunk } @@ -767,7 +767,7 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index 749aa3e3..29678f0c 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -617,7 +617,7 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { $core.String? nurseryId, $8.BusType? busType, $8.VehicleEvent? vehicleEvent, - $core.List<$core.int>? videoChunk, + $core.Iterable<$core.List<$core.int>>? videoChunk, }) { final $result = create(); if (busId != null) { @@ -633,7 +633,7 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { $result.vehicleEvent = vehicleEvent; } if (videoChunk != null) { - $result.videoChunk = videoChunk; + $result.videoChunk.addAll(videoChunk); } return $result; } @@ -646,7 +646,7 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'nurseryId') ..e<$8.BusType>(3, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) ..e<$8.VehicleEvent>(4, _omitFieldNames ? '' : 'vehicleEvent', $pb.PbFieldType.OE, defaultOrMaker: $8.VehicleEvent.VEHICLE_EVENT_UNSPECIFIED, valueOf: $8.VehicleEvent.valueOf, enumValues: $8.VehicleEvent.values) - ..a<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.OY) + ..p<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.PY) ..hasRequiredFields = false ; @@ -708,13 +708,7 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { void clearVehicleEvent() => clearField(4); @$pb.TagNumber(5) - $core.List<$core.int> get videoChunk => $_getN(4); - @$pb.TagNumber(5) - set videoChunk($core.List<$core.int> v) { $_setBytes(4, v); } - @$pb.TagNumber(5) - $core.bool hasVideoChunk() => $_has(4); - @$pb.TagNumber(5) - void clearVideoChunk() => clearField(5); + $core.List<$core.List<$core.int>> get videoChunk => $_getList(4); } class StreamBusVideoResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 8ca0aae4..52d96a64 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -158,7 +158,7 @@ const StreamBusVideoRequest$json = { {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, {'1': 'bus_type', '3': 3, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, {'1': 'vehicle_event', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.VehicleEvent', '10': 'vehicleEvent'}, - {'1': 'video_chunk', '3': 5, '4': 1, '5': 12, '10': 'videoChunk'}, + {'1': 'video_chunk', '3': 5, '4': 3, '5': 12, '10': 'videoChunk'}, ], }; @@ -168,7 +168,7 @@ final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Dec 'J5X2lkGAIgASgJUgludXJzZXJ5SWQSNgoIYnVzX3R5cGUYAyABKA4yGy53aGVyZV9jaGlsZF9i' 'dXMudjEuQnVzVHlwZVIHYnVzVHlwZRJFCg12ZWhpY2xlX2V2ZW50GAQgASgOMiAud2hlcmVfY2' 'hpbGRfYnVzLnYxLlZlaGljbGVFdmVudFIMdmVoaWNsZUV2ZW50Eh8KC3ZpZGVvX2NodW5rGAUg' - 'ASgMUgp2aWRlb0NodW5r'); + 'AygMUgp2aWRlb0NodW5r'); @$core.Deprecated('Use streamBusVideoResponseDescriptor instead') const StreamBusVideoResponse$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index fb8988c7..45fdd0ab 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x01(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index e0a4324f..db7a762a 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -93,8 +93,8 @@ class StreamBusVideoRequest(_message.Message): nursery_id: str bus_type: _resources_pb2.BusType vehicle_event: _resources_pb2.VehicleEvent - video_chunk: bytes - def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[bytes] = ...) -> None: ... + video_chunk: _containers.RepeatedScalarFieldContainer[bytes] + def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[_Iterable[bytes]] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = ("is_detected", "children") diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 6ee7becd..42b1593a 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -69,7 +69,7 @@ message StreamBusVideoRequest { string nursery_id = 2; BusType bus_type = 3; VehicleEvent vehicle_event = 4; - bytes video_chunk = 5; // Chunk of video data + repeated bytes video_chunk = 5; // Chunk of video data } message StreamBusVideoResponse { From 2ea16856212a6fe0b91b9519107e147ae9550d2b Mon Sep 17 00:00:00 2001 From: koto623 Date: Mon, 19 Feb 2024 01:48:02 +0900 Subject: [PATCH 491/771] =?UTF-8?q?fix:=E5=9C=92=E5=85=90=E3=81=AE?= =?UTF-8?q?=E6=95=B0=E3=81=8B1=E4=BB=A5=E4=B8=8B=E3=81=AE=E6=99=82?= =?UTF-8?q?=E3=80=81=E3=82=B9=E3=82=AF=E3=83=AD=E3=83=BC=E3=83=AB=E3=81=97?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/daily_page/components/daily_record_slider.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart index d83797cb..2141cdee 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart @@ -46,7 +46,7 @@ class _DailyRecordSlider extends State { initialPage: 0, autoPlay: false, viewportFraction: 1, - enableInfiniteScroll: true, + enableInfiniteScroll: recordList.length > 1 ? true : false, onPageChanged: ((index, reason) { setState(() { currentIndex = index; From 69ccc2e97f4e64cd28e9b76a7ef8ac084f2a152c Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 01:54:26 +0900 Subject: [PATCH 492/771] fix: docker --- backend/Dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index b46621d5..461e62ae 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -57,10 +57,15 @@ FROM alpine:latest # 必要なパッケージをインストール RUN apk --no-cache add ca-certificates -# ビルドステージからバイナリと.envファイルをコピー +# ビルドステージからバイナリファイルをコピー COPY --from=builder /go/bin/server /server -COPY --from=builder /srv/grpc/.env ./.env + +# .envファイルをカレントディレクトリにコピー +COPY --from=builder /srv/grpc/.env ./ + +# secretsディレクトリをコピー COPY --from=builder /srv/grpc/secrets /secrets -# アプリケーションの起動 -ENTRYPOINT ["/server"] + +WORKDIR /app +ENTRYPOINT ["/server"] \ No newline at end of file From 9f29684911c34d67ceef51c95230e8d32ebbbf3f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 01:59:59 +0900 Subject: [PATCH 493/771] fix: Docker --- backend/Dockerfile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 461e62ae..fb8968aa 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -52,20 +52,23 @@ RUN CGO_ENABLED=0 GOOS=linux \ # Final stage: runtime environment # CA証明書が必要なので、alpineをベースにする +# Final stage: runtime environment FROM alpine:latest # 必要なパッケージをインストール RUN apk --no-cache add ca-certificates -# ビルドステージからバイナリファイルをコピー -COPY --from=builder /go/bin/server /server +# アプリケーション実行用のディレクトリを設定 +WORKDIR /app -# .envファイルをカレントディレクトリにコピー -COPY --from=builder /srv/grpc/.env ./ +# ビルドステージからバイナリファイルをコピー +COPY --from=builder /go/bin/server /app/server -# secretsディレクトリをコピー -COPY --from=builder /srv/grpc/secrets /secrets +# .envファイルを/appディレクトリにコピー +COPY --from=builder /srv/grpc/.env /app/.env +# secretsディレクトリを/appディレクトリにコピー +COPY --from=builder /srv/grpc/secrets /app/secrets -WORKDIR /app -ENTRYPOINT ["/server"] \ No newline at end of file +# アプリケーションの起動 +ENTRYPOINT ["/app/server"] From 318bd73fb0c4ed1e2a5f038ec9112f91c4ad0b23 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 02:36:08 +0900 Subject: [PATCH 494/771] =?UTF-8?q?refactor(ml):=20dataset=E3=81=AB?= =?UTF-8?q?=E3=81=8A=E3=81=91=E3=82=8Btransfom=E3=81=AE=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=82=92util.py=E3=81=AB=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/faceDetectDataset.py | 38 ++----------- .../src/face_detect_model/util.py | 53 ++++++++++++++++++- 2 files changed, 54 insertions(+), 37 deletions(-) diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index b69dab70..d65a27f3 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -2,13 +2,13 @@ import torch from PIL import Image -from torchvision import transforms from face_detect_model.util import ( load_image_from_remote, ) from face_detect_model.gcp_util import get_bucket, get_blobs +from face_detect_model.util import get_augment_transform, get_default_transforms # (child_id, image)のタプルを返す @@ -18,7 +18,7 @@ def __init__(self, args, config, client): self.args = args self.config = config - default_transform = self.get_default_transforms() + default_transform = get_default_transforms() bucket_name = os.environ.get("BUCKET_NAME") bucket = get_bucket(client, bucket_name) @@ -62,41 +62,9 @@ def _add_label(self, label: str): self.name_label_dict[label] = self.label_num self.label_num += 1 - def get_default_transforms(self): - return transforms.Compose( - [ - transforms.ToTensor(), - transforms.Normalize( - mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225] - ), - ] - ) - - def get_augment_transform(self): - return transforms.Compose( - [ - transforms.RandomCrop((100, 100)), - transforms.RandomHorizontalFlip(p=0.5), - transforms.RandomVerticalFlip(p=0.5), - transforms.RandomApply([transforms.RandomRotation(degrees=180)], p=0.5), - transforms.RandomApply( - [ - transforms.RandomAffine( - degrees=0, translate=(0.1, 0.1), scale=(0.8, 1.2) - ) - ], - p=0.5, - ), - transforms.ToTensor(), - transforms.Normalize( - mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225] - ), - ] - ) - def augment_image(self, image, num_variations=100): # ランダムな変換を適用するための拡張設定を強化 - transformations = self.get_augment_transform() + transformations = get_augment_transform() augmented_images = [] for _ in range(num_variations): augmented_image = transformations(image) diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index 780b3266..ea1bb7f5 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -4,6 +4,7 @@ import random import torch from google.cloud.storage import Bucket +from torchvision import transforms import os import numpy as np @@ -72,14 +73,62 @@ def load_image_from_remote(blobs: list): return images +def load_image_from_binary(binary: bytes): + image_array = np.frombuffer(binary, dtype=np.uint8) + image = cv2.imdecode(image_array, cv2.IMREAD_COLOR) + image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # BGRからRGBに変換 + if image is None: + raise ValueError("Can not load image from binary.") + return image + + +def get_default_transforms(): + return transforms.Compose( + [ + transforms.ToTensor(), + transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), + ] + ) + + +def get_augment_transform(): + return transforms.Compose( + [ + transforms.RandomCrop((100, 100)), + transforms.RandomHorizontalFlip(p=0.5), + transforms.RandomVerticalFlip(p=0.5), + transforms.RandomApply([transforms.RandomRotation(degrees=180)], p=0.5), + transforms.RandomApply( + [ + transforms.RandomAffine( + degrees=0, translate=(0.1, 0.1), scale=(0.8, 1.2) + ) + ], + p=0.5, + ), + transforms.ToTensor(), + transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), + ] + ) + + def _is_valid_file(file_name): VALID_EXTENSIONS = {".png"} return os.path.splitext(file_name)[1].lower() in VALID_EXTENSIONS def save_pickle_to_gcs(bucket: Bucket, upload_model_path: str, obj: object): - logger.info(f"Saving model to {upload_model_path}") + logger.info(f"Saving pickle to {upload_model_path}") blob = bucket.blob(upload_model_path) with blob.open("wb", ignore_flush=True) as f: torch.save(obj, f) - logger.info(f"Model saved to {upload_model_path}") + logger.info(f"pickle saved to {upload_model_path}") + + +def load_pickle_to_gcs(bucket: Bucket, obj_path: str) -> object: + logger.info(f"Loading pickle from {obj_path}") + blob = bucket.blob(obj_path) + with blob.open("rb") as f: + model = torch.load(f) + logger.info(f"pickle loaded from {obj_path}") + return model From 0fecbf9fae557c8af2500f518145668ca953929c Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 02:37:07 +0900 Subject: [PATCH 495/771] =?UTF-8?q?fix(ml):=20=E5=BC=95=E6=95=B0=E3=81=AEb?= =?UTF-8?q?us=5Ftype=E3=82=92str=E3=81=8B=E3=82=89int=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index c7edb50b..16ebd897 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -37,11 +37,6 @@ def TrainAndTest(args: argparse.Namespace, config: dict): ], ) - # modelの読み込み - logger.info("model Initializing") - num_classes = dataset.get_label_num() - image_shape = dataset.get_image_shape() - idx_to_label = dataset.get_idx_label_dict() if args.mode == "train": bucket = get_bucket( @@ -55,6 +50,11 @@ def TrainAndTest(args: argparse.Namespace, config: dict): ) logger.info("idx_to_label is saved") + # modelの読み込み + logger.info("model Initializing") + num_classes = dataset.get_label_num() + image_shape = dataset.get_image_shape() + face_detect_model = FaceDetectModel( config, num_classes=num_classes, input_dim=image_shape ) @@ -100,7 +100,7 @@ def main(args: argparse.Namespace): nargs="*", ) parser.add_argument("--bus_id", type=str) - parser.add_argument("--bus_type", type=str) + parser.add_argument("--bus_type", type=int) args = parser.parse_args() From 37b148c069a2528d1fbddf71f0b7b7204c0c63f1 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 02:37:08 +0900 Subject: [PATCH 496/771] chore: add debug echo --- backend/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index fb8968aa..d52f13de 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -70,5 +70,8 @@ COPY --from=builder /srv/grpc/.env /app/.env # secretsディレクトリを/appディレクトリにコピー COPY --from=builder /srv/grpc/secrets /app/secrets +RUN ls -la /app/secrets +RUN echo "gcp-credentials.json is: $(cat /app/secrets/gcp-credentials.json)" + # アプリケーションの起動 ENTRYPOINT ["/app/server"] From 89aaa439ec9f3489e25e5b864efb22a06a64c830 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 02:37:26 +0900 Subject: [PATCH 497/771] =?UTF-8?q?feat(ml):=20=E3=83=91=E3=83=A9=E3=83=A1?= =?UTF-8?q?=E3=83=BC=E3=82=BF=E3=83=BC=E3=83=81=E3=83=A5=E3=83=BC=E3=83=8B?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E3=82=92=E5=AE=9F=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index f31778a2..2ed75ed3 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -16,14 +16,14 @@ face_detect: clip_size: { width: 100, height: 100 } dataset: augmentation: - num_variations: 10 + num_variations: 15 ratio: train: 0.8 valid: 0.1 test: 0.1 train: epoch: 3 - learning_rate: 0.001 + learning_rate: 0.0005 train_batch_size: 1 valid_batch_size: 1 test_batch_size: 1 From f22fd844dc6f3631d09f3aa8ce9af8cd9bb29b17 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 02:54:05 +0900 Subject: [PATCH 498/771] =?UTF-8?q?feat(ml):=20GCS=E3=81=AB=E3=82=A2?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=83=AD=E3=83=BC=E3=83=89=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9Fmodel=E3=81=8B=E3=82=89=E5=AD=90=E4=BE=9B=E3=82=92?= =?UTF-8?q?=E6=8E=A8=E8=AB=96=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/pred.py | 164 +++++++++++++++++- 1 file changed, 161 insertions(+), 3 deletions(-) diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index 843d3f1a..565ed5e3 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -1,4 +1,162 @@ -def main(): - gray = cv2.cvtColor(captureBuffer, cv2.COLOR_BGR2GRAY) - pred_child_ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +import os +import argparse +from dotenv import load_dotenv +import yaml +import torch + +load_dotenv("secrets/.env") + +from face_detect_model.util import ( + load_image_from_binary, + switch_to_bus_type, + load_pickle_to_gcs, + get_default_transforms, +) +from face_detect_model.gcp_util import init_client, get_bucket +from face_detect_model.model.faceDetectModel import FaceDetectModel +from face_detect_model.DetectFaceAndClip.detectFaceUtil import ( + detect_face, + load_cascade, + clip_and_resize_face, +) + + +def load_model(model_pickle, config, num_classes, input_shape) -> FaceDetectModel: + try: + model = FaceDetectModel(config, num_classes, input_shape) + model.load_state_dict(model_pickle) + except Exception as e: + raise ValueError(f"Failed to load model due to an error: {e}") + return model + + +def get_clipped_face(image, faces, image_size): + clipped_faces = [] + for face in faces: + clipped_face = clip_and_resize_face(face, image, image_size) + clipped_faces.append(clipped_face) + return clipped_faces + + +def detect_face_and_clip_from_image(image, config): + face_cascade_path = config["face_detect"]["cascade_path"] + image_size = ( + config["face_detect"]["clip_size"]["height"], + config["face_detect"]["clip_size"]["width"], + ) + + # Haar Cascadeの読み込み + face_cascade = load_cascade(face_cascade_path) + + faces = detect_face( + image, + face_cascade, + scaleFactor=config["face_detect"]["scale_factor"], + minNeighbors=config["face_detect"]["min_neighbors"], + minSize=( + config["face_detect"]["min_size"]["height"], + config["face_detect"]["min_size"]["width"], + ), + ) + + clipped_faces = get_clipped_face(image, faces, image_size) + return clipped_faces + + +def convert_to_tensor_from_images(cliped_face_images): + transforms = get_default_transforms() + image_tensors = [] + for cliped_face_image in cliped_face_images: + image_tensor = transforms(cliped_face_image) + image_tensors.append(image_tensor) + return image_tensors + + +def get_cliped_faces_from_images(video_chunk_list, config): + all_faces = [] + for video_chunk in video_chunk_list: + image = load_image_from_binary(video_chunk) + clipped_faces = detect_face_and_clip_from_image(image, config) + all_faces.extend(clipped_faces) + return all_faces + + +def get_model_input_shape(tensor): + return tensor.shape + + +def pred_child_from_tensor(model, input_image_tensor): + output = model(input_image_tensor.unsqueeze(0)) + print(torch.nn.functional.softmax(output, dim=1)) + pred = output.argmax(dim=1) + return pred + + +def get_pred_child(model, input_image_tensors, idx_to_label_dict): + pred_child_ids = set() + + # TODO: 複数枚をバッチで処理する + for input_image_tensor in input_image_tensors: + pred = pred_child_from_tensor(model, input_image_tensor) + print(pred) + child_id = idx_to_label_dict[pred.item()] + print(child_id) + pred_child_ids.add(child_id) + return pred_child_ids + + +def pred_child_from_images(args, config): + client = init_client() + bucket_name = os.environ.get("BUCKET_NAME_FOR_MODEL") + bucket = get_bucket(client, bucket_name) + idx_to_label_dict_bucket_path = f"{args.nursery_id}/{args.bus_id}/idx_to_label_{switch_to_bus_type(args.bus_type)}.pth" + + idx_to_label_dict = load_pickle_to_gcs(bucket, idx_to_label_dict_bucket_path) + model_class_num = len(idx_to_label_dict) + + clipped_faces = get_cliped_faces_from_images(args.video_chunks, config) + input_image_tensors = convert_to_tensor_from_images(clipped_faces) + for input_image_tensor in input_image_tensors: + print(input_image_tensor.shape) + + model_bucket_path = ( + f"{args.nursery_id}/{args.bus_id}/model_{switch_to_bus_type(args.bus_type)}.pth" + ) + input_shape = get_model_input_shape(input_image_tensors[0]) + model_pickle = load_pickle_to_gcs(bucket, model_bucket_path) + model = load_model( + model_pickle=model_pickle, + config=config, + num_classes=model_class_num, + input_shape=input_shape, + ) + # model.eval() + + pred_child_ids = get_pred_child(model, input_image_tensors, idx_to_label_dict) + print(pred_child_ids) + + return pred_child_ids + + +def main(args): + with open("src/face_detect_model/config.yaml", "r") as f: + config = yaml.safe_load(f) + pred_child_from_images(args, config) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--nursery_id", type=str, required=True) + parser.add_argument("--bus_id", type=str, required=True) + parser.add_argument("--bus_type", type=int, required=True) + + args = parser.parse_args() + + # DEBUG + args.video_chunks = [ + open("/Users/mizuki/Desktop/test.jpg", "rb").read(), + open("/Users/mizuki/Desktop/test1.jpg", "rb").read(), + ] + + main(args) From 4209df265e89f7468c0aad05fcccd458a4d70544 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 02:54:43 +0900 Subject: [PATCH 499/771] =?UTF-8?q?refactor(ml):=20=E9=81=A9=E5=88=87?= =?UTF-8?q?=E3=81=AAlogging=E3=81=AE=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/pred.py | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index 565ed5e3..50cc7ebb 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -11,6 +11,7 @@ switch_to_bus_type, load_pickle_to_gcs, get_default_transforms, + logger, ) from face_detect_model.gcp_util import init_client, get_bucket from face_detect_model.model.faceDetectModel import FaceDetectModel @@ -87,7 +88,6 @@ def get_model_input_shape(tensor): def pred_child_from_tensor(model, input_image_tensor): output = model(input_image_tensor.unsqueeze(0)) - print(torch.nn.functional.softmax(output, dim=1)) pred = output.argmax(dim=1) return pred @@ -98,9 +98,8 @@ def get_pred_child(model, input_image_tensors, idx_to_label_dict): # TODO: 複数枚をバッチで処理する for input_image_tensor in input_image_tensors: pred = pred_child_from_tensor(model, input_image_tensor) - print(pred) child_id = idx_to_label_dict[pred.item()] - print(child_id) + logger.info(f"Predicted child id: {child_id}") pred_child_ids.add(child_id) return pred_child_ids @@ -117,8 +116,6 @@ def pred_child_from_images(args, config): clipped_faces = get_cliped_faces_from_images(args.video_chunks, config) input_image_tensors = convert_to_tensor_from_images(clipped_faces) - for input_image_tensor in input_image_tensors: - print(input_image_tensor.shape) model_bucket_path = ( f"{args.nursery_id}/{args.bus_id}/model_{switch_to_bus_type(args.bus_type)}.pth" @@ -131,18 +128,21 @@ def pred_child_from_images(args, config): num_classes=model_class_num, input_shape=input_shape, ) - # model.eval() + model.eval() + logger.info("Start predicting child id") pred_child_ids = get_pred_child(model, input_image_tensors, idx_to_label_dict) - print(pred_child_ids) + logger.info(f"Predicted child ids: {pred_child_ids}") + logger.info("Done") - return pred_child_ids + return list(pred_child_ids) def main(args): with open("src/face_detect_model/config.yaml", "r") as f: config = yaml.safe_load(f) - pred_child_from_images(args, config) + pred_child_ids_list = pred_child_from_images(args, config) + return pred_child_ids_list if __name__ == "__main__": @@ -152,11 +152,10 @@ def main(args): parser.add_argument("--bus_type", type=int, required=True) args = parser.parse_args() - - # DEBUG args.video_chunks = [ open("/Users/mizuki/Desktop/test.jpg", "rb").read(), open("/Users/mizuki/Desktop/test1.jpg", "rb").read(), ] + # TODO: main関数に対してmodelを渡すように実装を変換 main(args) From 748c01f4db13bcf1a115a08b758a01574346f71c Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 02:57:06 +0900 Subject: [PATCH 500/771] =?UTF-8?q?fix(ml):=20import=20path=E3=81=AE?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/proto-gen/machine_learning/v1/server.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 0fd61bc8..28ee9e14 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -5,11 +5,12 @@ import grpc from grpc_reflection.v1alpha import reflection -import health_check_pb2 -import health_check_pb2_grpc -import machine_learning_pb2 -import machine_learning_pb2_grpc +from generated.machine_learning.v1 import health_check_pb2 +from generated.machine_learning.v1 import health_check_pb2_grpc +from generated.machine_learning.v1 import machine_learning_pb2 +from generated.machine_learning.v1 import machine_learning_pb2_grpc +from generated.where_child_bus.v1 import bus_pb2 import logging from concurrent import futures @@ -39,7 +40,6 @@ def Ping(self, request: health_check_pb2.PingRequest, context): class MachineLearningServiceServicer( machine_learning_pb2_grpc.MachineLearningServiceServicer ): - # TODO: implement Predict def Predict(self, request_iterator: machine_learning_pb2.PredRequest, context): for req in request_iterator: parser = argparse.ArgumentParser() From 7e1a707191ac33f064c90fb62b6ad7a9ee40d270 Mon Sep 17 00:00:00 2001 From: koto623 Date: Mon, 19 Feb 2024 02:58:58 +0900 Subject: [PATCH 501/771] =?UTF-8?q?feat:=E5=9C=92=E5=85=90=E3=81=AE?= =?UTF-8?q?=E4=B9=97=E9=99=8D=E7=8A=B6=E6=85=8B=E3=82=92=E5=8F=96=E5=BE=97?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/daily_record_body.dart | 36 ++++++++++++++++--- .../components/daily_record_slider.dart | 4 +-- .../lib/service/check_is_child_in_bus.dart | 12 +++++++ .../lib/util/api/child.dart | 7 ++++ 4 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/service/check_is_child_in_bus.dart diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 9de6910c..952e9f11 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -1,4 +1,8 @@ +import "dart:developer" as developer; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pb.dart'; +import 'package:where_child_bus_guardian/service/check_is_child_in_bus.dart'; import '../styles/styles.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'package:where_child_bus_guardian/components/utils/image_from_byte.dart'; @@ -7,16 +11,40 @@ class DailyRecordBody extends StatefulWidget { final Child child; final ChildPhoto image; - const DailyRecordBody({Key? key, required this.child, required this.image}) - : super(key: key); + const DailyRecordBody({ + Key? key, + required this.child, + required this.image, + }) : super(key: key); @override State createState() => _DailyRecordBody(); } class _DailyRecordBody extends State { - //TODO: 将来的にAPIからデータを受け取る - var isBoarding = false; + bool isBoarding = false; + + @override + void initState() { + super.initState(); + _loadBoardingStatus(); + } + + Future _loadBoardingStatus() async { + try { + CheckIsChildInBusResponse res = + await checkIsChildInBusService(widget.child.id); + if (mounted) { + setState(() { + isBoarding = res.isInBus; + }); + } + } catch (e) { + if (kDebugMode) { + developer.log("乗降状態のロード中にエラーが発生しました: $e"); + } + } + } @override Widget build(BuildContext context) { diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart index 2141cdee..b7530448 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart @@ -22,10 +22,10 @@ class _DailyRecordSlider extends State { @override Widget build(BuildContext context) { List recordList = widget.children.map((child) { - int imageIndex = widget.children.indexOf(child); + int index = widget.children.indexOf(child); return DailyRecordBody( child: child, - image: widget.images[imageIndex], + image: widget.images[index], ); }).toList(); diff --git a/frontend/where_child_bus_guardian/lib/service/check_is_child_in_bus.dart b/frontend/where_child_bus_guardian/lib/service/check_is_child_in_bus.dart new file mode 100644 index 00000000..cb8fa172 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/service/check_is_child_in_bus.dart @@ -0,0 +1,12 @@ +import 'package:where_child_bus_guardian/util/api/child.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pb.dart'; + +Future checkIsChildInBusService( + String childId) async { + try { + var res = await checkIsChildInBus(childId); + return res; + } catch (error) { + return Future.error(error); + } +} diff --git a/frontend/where_child_bus_guardian/lib/util/api/child.dart b/frontend/where_child_bus_guardian/lib/util/api/child.dart index 2794a945..c44670e4 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/child.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/child.dart @@ -31,3 +31,10 @@ Future getChildListByGuardianId( return client.getChildListByGuardianID(req); }); } + +Future checkIsChildInBus(String childId) async { + return performGrpcCall((client) async { + var req = CheckIsChildInBusRequest(childId: childId); + return client.checkIsChildInBus(req); + }); +} From 06f1fdbac807e2206b1c57af878178fd4d52b1e3 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 03:00:18 +0900 Subject: [PATCH 502/771] chore: add debug --- backend/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index d52f13de..c2d4b25c 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -73,5 +73,9 @@ COPY --from=builder /srv/grpc/secrets /app/secrets RUN ls -la /app/secrets RUN echo "gcp-credentials.json is: $(cat /app/secrets/gcp-credentials.json)" +# /appディレクトリ以下の全てのサブファイルディレクトリも含めた構造を出力 +RUN ls -laR /app + + # アプリケーションの起動 ENTRYPOINT ["/app/server"] From 5678f7cb30e9392421feb572092668f7c1e300dc Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 03:07:54 +0900 Subject: [PATCH 503/771] chore: setenv --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index c2d4b25c..49ccbd61 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -75,7 +75,7 @@ RUN echo "gcp-credentials.json is: $(cat /app/secrets/gcp-credentials.json)" # /appディレクトリ以下の全てのサブファイルディレクトリも含めた構造を出力 RUN ls -laR /app - +ENV GOOGLE_APPLICATION_CREDENTIALS=/app/secrets/gcp-credentials.json # アプリケーションの起動 ENTRYPOINT ["/app/server"] From 05712e9e4b23d8b4281aa98dc13cf3c2b7ec99fb Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 03:14:45 +0900 Subject: [PATCH 504/771] =?UTF-8?q?refactor(ml):=20=E5=90=84=E9=96=A2?= =?UTF-8?q?=E6=95=B0=E3=82=92=5F=5Finit=5F=5F=E6=99=82=E7=82=B9=E3=81=A7?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=B9=E3=82=BF=E3=83=B3=E3=82=B9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/proto-gen/machine_learning/v1/server.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 28ee9e14..e5ba9f65 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -40,7 +40,12 @@ def Ping(self, request: health_check_pb2.PingRequest, context): class MachineLearningServiceServicer( machine_learning_pb2_grpc.MachineLearningServiceServicer ): - def Predict(self, request_iterator: machine_learning_pb2.PredRequest, context): + def __init__(self): + self.pred_fn = pred_fn + self.train_fn = train_fn + self.detect_face_and_clip_fn = detect_face_and_clip_fn + + def Predict(self, request_iterator: bus_pb2.StreamBusVideoRequest, context): for req in request_iterator: parser = argparse.ArgumentParser() args = parser.parse_args() @@ -52,7 +57,7 @@ def Predict(self, request_iterator: machine_learning_pb2.PredRequest, context): args.timestamp = req.timestamp try: - child_ids = pred_fn(args) + child_ids = self.pred_fn(args) except Exception as e: logging.error(e) child_ids = [] @@ -70,7 +75,7 @@ def Train(self, request: machine_learning_pb2.TrainRequest, context): args.mode = "train" # mainメソッドを別スレッドで実行 try: - thread = threading.Thread(target=train_fn, args=(args,)) + thread = threading.Thread(target=self.train_fn, args=(args,)) thread.start() is_started = True except Exception as e: @@ -92,7 +97,7 @@ def FaceDetectAndClip( args.env = "remote" # mainメソッドを別スレッドで実行 try: - thread = threading.Thread(target=detect_face_and_clip_fn, args=(args,)) + thread = threading.Thread(target=self.detect_face_and_clip_fn, args=(args,)) thread.start() is_started = True except Exception as e: From ec725692afd51a628e84b8e89215fa8913ab7016 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 03:48:50 +0900 Subject: [PATCH 505/771] =?UTF-8?q?fix(ml):=20=E6=AD=A3=E3=81=97=E3=81=84i?= =?UTF-8?q?mport=20path=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning_pb2.py | 47 +++-- .../v1/machine_learning_pb2_grpc.py | 187 +++++++++++------- .../generated/where_child_bus/v1/bus_pb2.py | 71 ++++--- 3 files changed, 183 insertions(+), 122 deletions(-) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py index 68f8f6bb..608bdfa6 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py @@ -7,33 +7,44 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 -from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from generated.where_child_bus.v1 import ( + bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2, +) +from generated.where_child_bus.v1 import ( + resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, +) -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a\"where_child_bus/v1/resources.proto\"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted\"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds\"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xb6\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a\".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xb6\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'machine_learning.v1.machine_learning_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "machine_learning.v1.machine_learning_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' - _globals['_TRAINREQUEST']._serialized_start=134 - _globals['_TRAINREQUEST']._serialized_end=287 - _globals['_TRAINRESPONSE']._serialized_start=289 - _globals['_TRAINRESPONSE']._serialized_end=335 - _globals['_PREDRESPONSE']._serialized_start=337 - _globals['_PREDRESPONSE']._serialized_end=413 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_start=415 - _globals['_FACEDETECTANDCLIPREQUEST']._serialized_end=499 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_start=501 - _globals['_FACEDETECTANDCLIPRESPONSE']._serialized_end=559 - _globals['_MACHINELEARNINGSERVICE']._serialized_start=562 - _globals['_MACHINELEARNINGSERVICE']._serialized_end=872 + _globals["DESCRIPTOR"]._options = None + _globals["DESCRIPTOR"]._serialized_options = ( + b"\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" + ) + _globals["_TRAINREQUEST"]._serialized_start = 134 + _globals["_TRAINREQUEST"]._serialized_end = 287 + _globals["_TRAINRESPONSE"]._serialized_start = 289 + _globals["_TRAINRESPONSE"]._serialized_end = 335 + _globals["_PREDRESPONSE"]._serialized_start = 337 + _globals["_PREDRESPONSE"]._serialized_end = 413 + _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_start = 415 + _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_end = 499 + _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_start = 501 + _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_end = 559 + _globals["_MACHINELEARNINGSERVICE"]._serialized_start = 562 + _globals["_MACHINELEARNINGSERVICE"]._serialized_end = 872 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py index 7d9fccc4..699c2f1a 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py @@ -2,8 +2,12 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from machine_learning.v1 import machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2 -from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 +from generated.machine_learning.v1 import ( + machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2, +) +from generated.where_child_bus.v1 import ( + bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2, +) class MachineLearningServiceStub(object): @@ -16,20 +20,20 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Train = channel.unary_unary( - '/machine_learning.v1.MachineLearningService/Train', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/Train", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, + ) self.Pred = channel.stream_stream( - '/machine_learning.v1.MachineLearningService/Pred', - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/Pred", + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, + ) self.FaceDetectAndClip = channel.unary_unary( - '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', - request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, - response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - ) + "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", + request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, + response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, + ) class MachineLearningServiceServicer(object): @@ -38,96 +42,133 @@ class MachineLearningServiceServicer(object): def Train(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def Pred(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def FaceDetectAndClip(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_MachineLearningServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'Train': grpc.unary_unary_rpc_method_handler( - servicer.Train, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, - ), - 'Pred': grpc.stream_stream_rpc_method_handler( - servicer.Pred, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, - ), - 'FaceDetectAndClip': grpc.unary_unary_rpc_method_handler( - servicer.FaceDetectAndClip, - request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, - response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, - ), + "Train": grpc.unary_unary_rpc_method_handler( + servicer.Train, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, + ), + "Pred": grpc.stream_stream_rpc_method_handler( + servicer.Pred, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, + ), + "FaceDetectAndClip": grpc.unary_unary_rpc_method_handler( + servicer.FaceDetectAndClip, + request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, + response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'machine_learning.v1.MachineLearningService', rpc_method_handlers) + "machine_learning.v1.MachineLearningService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class MachineLearningService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Train(request, + def Train( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/Train', + "/machine_learning.v1.MachineLearningService/Train", machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def Pred(request_iterator, + def Pred( + request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.stream_stream( + request_iterator, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.stream_stream(request_iterator, target, '/machine_learning.v1.MachineLearningService/Pred', + "/machine_learning.v1.MachineLearningService/Pred", where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def FaceDetectAndClip(request, + def FaceDetectAndClip( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/machine_learning.v1.MachineLearningService/FaceDetectAndClip', + "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index 45fdd0ab..bf16a93b 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -7,46 +7,55 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from generated.where_child_bus.v1 import ( + resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, +) -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude" \n\x1eSendLocationContinuousResponse"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.bus_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.bus_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATEBUSREQUEST']._serialized_start=89 - _globals['_CREATEBUSREQUEST']._serialized_end=293 - _globals['_CREATEBUSRESPONSE']._serialized_start=295 - _globals['_CREATEBUSRESPONSE']._serialized_end=357 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=359 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=420 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=422 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=500 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=502 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=611 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=613 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=681 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=683 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=795 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=797 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=829 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=831 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=881 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=883 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=992 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=995 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1232 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1234 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1346 - _globals['_BUSSERVICE']._serialized_start=1349 - _globals['_BUSSERVICE']._serialized_end=2043 + _globals["DESCRIPTOR"]._options = None + _globals["DESCRIPTOR"]._serialized_options = ( + b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + ) + _globals["_CREATEBUSREQUEST"]._serialized_start = 89 + _globals["_CREATEBUSREQUEST"]._serialized_end = 293 + _globals["_CREATEBUSRESPONSE"]._serialized_start = 295 + _globals["_CREATEBUSRESPONSE"]._serialized_end = 357 + _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_start = 359 + _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_end = 420 + _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_start = 422 + _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_end = 500 + _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_start = 502 + _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_end = 611 + _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_start = 613 + _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_end = 681 + _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_start = 683 + _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_end = 795 + _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_start = 797 + _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_end = 829 + _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_start = 831 + _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_end = 881 + _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_start = 883 + _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_end = 992 + _globals["_STREAMBUSVIDEOREQUEST"]._serialized_start = 995 + _globals["_STREAMBUSVIDEOREQUEST"]._serialized_end = 1232 + _globals["_STREAMBUSVIDEORESPONSE"]._serialized_start = 1234 + _globals["_STREAMBUSVIDEORESPONSE"]._serialized_end = 1346 + _globals["_BUSSERVICE"]._serialized_start = 1349 + _globals["_BUSSERVICE"]._serialized_end = 2043 # @@protoc_insertion_point(module_scope) From 013054ec18526dd5b4c40804eb8a58271ee96dbd Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 05:17:55 +0900 Subject: [PATCH 506/771] =?UTF-8?q?fix(ml):=20argument=E3=81=AE=E6=92=A4?= =?UTF-8?q?=E5=9B=9E=E3=83=BBdataclass=E3=82=92=E5=88=A9=E7=94=A8=E3=81=99?= =?UTF-8?q?=E3=82=8B=E5=BD=A2=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../machine_learning/v1/func_args.py | 27 +++++++++ .../proto-gen/machine_learning/v1/server.py | 55 +++++++++---------- 2 files changed, 52 insertions(+), 30 deletions(-) create mode 100644 machine_learning/src/generated/machine_learning/v1/func_args.py diff --git a/machine_learning/src/generated/machine_learning/v1/func_args.py b/machine_learning/src/generated/machine_learning/v1/func_args.py new file mode 100644 index 00000000..282263cf --- /dev/null +++ b/machine_learning/src/generated/machine_learning/v1/func_args.py @@ -0,0 +1,27 @@ +from dataclasses import dataclass + + +@dataclass +class Pred_Args: + nursery_id: str + bus_id: str + bus_type: int + video_chunk: str + vehicle_event: str + + +@dataclass +class Train_Args: + nursery_id: str + child_ids: str + bus_id: str + bus_type: int + seed: int + mode: str + + +@dataclass +class FaceDetectAndClip_Args: + nursery_id: str + child_id: str + env: str diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index e5ba9f65..92f51d4d 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -45,38 +45,35 @@ def __init__(self): self.train_fn = train_fn self.detect_face_and_clip_fn = detect_face_and_clip_fn - def Predict(self, request_iterator: bus_pb2.StreamBusVideoRequest, context): - for req in request_iterator: - parser = argparse.ArgumentParser() - args = parser.parse_args() - - args.bus_id = req.bus_id - args.bus_type = req.bus_type - args.video_type = req.video_type - args.video_chunk = req.video_chunk - args.timestamp = req.timestamp + def Pred(self, request_iterator: bus_pb2.StreamBusVideoRequest, context): + for request in request_iterator: + params = { + "bus_id": request.bus_id, + "bus_type": request.bus_type, + "video_type": request.video_type, + "video_chunk": request.video_chunk, + "timestamp": request.timestamp, + } try: - child_ids = self.pred_fn(args) + child_ids = self.pred_fn(params) except Exception as e: logging.error(e) child_ids = [] yield machine_learning_pb2.PredResponse(child_ids=child_ids) def Train(self, request: machine_learning_pb2.TrainRequest, context): - parser = argparse.ArgumentParser() - args = parser.parse_args() - - args.nursery_id = request.nursery_id - args.child_ids = request.child_ids - args.bus_id = request.bus_id - args.bus_type = request.bus_type - args.seed = 42 - args.mode = "train" + params = { + "nursery_id": request.nursery_id, + "child_ids": request.child_ids, + "bus_id": request.bus_id, + "bus_type": request.bus_type, + "seed": 42, + "mode": "train", + } # mainメソッドを別スレッドで実行 try: - thread = threading.Thread(target=self.train_fn, args=(args,)) - thread.start() + self.train_fn(params) is_started = True except Exception as e: logging.error(e) @@ -89,16 +86,14 @@ def FaceDetectAndClip( request: machine_learning_pb2.FaceDetectAndClipRequest, context, ): - parser = argparse.ArgumentParser() - args = parser.parse_args() - - args.nursery_id = request.nursery_id - args.child_id = request.child_id - args.env = "remote" + params = { + "nursery_id": request.nursery_id, + "child_id": request.child_id, + "env": "remote", + } # mainメソッドを別スレッドで実行 try: - thread = threading.Thread(target=self.detect_face_and_clip_fn, args=(args,)) - thread.start() + self.detect_face_and_clip_fn(params) is_started = True except Exception as e: logging.error(e) From e6e39c76d0dbf605ca6b21dcab8f07616f5be7dd Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 05:18:21 +0900 Subject: [PATCH 507/771] =?UTF-8?q?refactor(ml):=20=E3=83=91=E3=83=A9?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=82=BF=E3=83=BC=E3=83=81=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=83=8B=E3=83=B3=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index 2ed75ed3..655dab0e 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -16,17 +16,17 @@ face_detect: clip_size: { width: 100, height: 100 } dataset: augmentation: - num_variations: 15 + num_variations: 30 ratio: train: 0.8 valid: 0.1 test: 0.1 train: - epoch: 3 + epoch: 5 learning_rate: 0.0005 train_batch_size: 1 valid_batch_size: 1 test_batch_size: 1 - validate_interval: 3 + validate_interval: 6 save_model_dir: "src/face_detect_model/pickle/mock_model/" test_model_path: "src/face_detect_model/pickle/mock_model/best_model.pth" From 8cbaf32115d2f55f5ba22ba666aca83e2c7b4207 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 05:19:16 +0900 Subject: [PATCH 508/771] =?UTF-8?q?fix(ml):=20threding=E3=81=AE=E6=92=A4?= =?UTF-8?q?=E5=BB=83=E3=83=BBdataclass=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B?= =?UTF-8?q?import=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/machine_learning/v1/server.py | 60 ++++++++++--------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 92f51d4d..e68a3292 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -1,7 +1,6 @@ -import argparse import logging -import threading from concurrent import futures +from typing import Iterable import grpc from grpc_reflection.v1alpha import reflection @@ -11,6 +10,11 @@ from generated.machine_learning.v1 import machine_learning_pb2 from generated.machine_learning.v1 import machine_learning_pb2_grpc from generated.where_child_bus.v1 import bus_pb2 +from generated.machine_learning.v1.func_args import ( + FaceDetectAndClip_Args, + Pred_Args, + Train_Args, +) import logging from concurrent import futures @@ -37,6 +41,8 @@ def Ping(self, request: health_check_pb2.PingRequest, context): return health_check_pb2.PingResponse(message=message) +# TODO: error handling +# TODO: 非同期処理 class MachineLearningServiceServicer( machine_learning_pb2_grpc.MachineLearningServiceServicer ): @@ -45,33 +51,34 @@ def __init__(self): self.train_fn = train_fn self.detect_face_and_clip_fn = detect_face_and_clip_fn - def Pred(self, request_iterator: bus_pb2.StreamBusVideoRequest, context): + def Pred(self, request_iterator: Iterable[bus_pb2.StreamBusVideoRequest], context): for request in request_iterator: - params = { - "bus_id": request.bus_id, - "bus_type": request.bus_type, - "video_type": request.video_type, - "video_chunk": request.video_chunk, - "timestamp": request.timestamp, - } - + params = Pred_Args( + nursery_id=request.nursery_id, + bus_id=request.bus_id, + bus_type=request.bus_type, + video_chunk=request.video_chunk, + vehicle_event=request.vehicle_event, + ) try: child_ids = self.pred_fn(params) except Exception as e: logging.error(e) child_ids = [] - yield machine_learning_pb2.PredResponse(child_ids=child_ids) + is_detected = len(child_ids) > 0 + yield machine_learning_pb2.PredResponse( + is_detected=is_detected, child_ids=child_ids + ) def Train(self, request: machine_learning_pb2.TrainRequest, context): - params = { - "nursery_id": request.nursery_id, - "child_ids": request.child_ids, - "bus_id": request.bus_id, - "bus_type": request.bus_type, - "seed": 42, - "mode": "train", - } - # mainメソッドを別スレッドで実行 + params = Train_Args( + nursery_id=request.nursery_id, + child_ids=request.child_ids, + bus_id=request.bus_id, + bus_type=request.bus_type, + seed=42, + mode="train", + ) try: self.train_fn(params) is_started = True @@ -86,12 +93,11 @@ def FaceDetectAndClip( request: machine_learning_pb2.FaceDetectAndClipRequest, context, ): - params = { - "nursery_id": request.nursery_id, - "child_id": request.child_id, - "env": "remote", - } - # mainメソッドを別スレッドで実行 + params = FaceDetectAndClip_Args( + nursery_id=request.nursery_id, + child_id=request.child_id, + env="remote", + ) try: self.detect_face_and_clip_fn(params) is_started = True From 3822ba3dff9189570707bc2d7bbaac70a06873f5 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 05:19:58 +0900 Subject: [PATCH 509/771] =?UTF-8?q?refactor(ml):=20TODO=E3=81=AE=E5=89=8A?= =?UTF-8?q?=E9=99=A4=E3=83=BBlog=E3=81=AE=E8=BF=BD=E5=8A=A0=E3=83=BB?= =?UTF-8?q?=E3=83=AA=E3=83=8D=E3=83=BC=E3=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/pred.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index 50cc7ebb..01a48a3b 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -88,6 +88,7 @@ def get_model_input_shape(tensor): def pred_child_from_tensor(model, input_image_tensor): output = model(input_image_tensor.unsqueeze(0)) + logger.info(f"Predicted present: {torch.nn.functional.softmax(output, dim=1)}") pred = output.argmax(dim=1) return pred @@ -114,7 +115,7 @@ def pred_child_from_images(args, config): idx_to_label_dict = load_pickle_to_gcs(bucket, idx_to_label_dict_bucket_path) model_class_num = len(idx_to_label_dict) - clipped_faces = get_cliped_faces_from_images(args.video_chunks, config) + clipped_faces = get_cliped_faces_from_images(args.video_chunk, config) input_image_tensors = convert_to_tensor_from_images(clipped_faces) model_bucket_path = ( @@ -152,10 +153,9 @@ def main(args): parser.add_argument("--bus_type", type=int, required=True) args = parser.parse_args() - args.video_chunks = [ + args.video_chunk = [ open("/Users/mizuki/Desktop/test.jpg", "rb").read(), open("/Users/mizuki/Desktop/test1.jpg", "rb").read(), ] - # TODO: main関数に対してmodelを渡すように実装を変換 main(args) From f743e3c18ce4c45be0979739bc08a7ac255d87cc Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 05:49:54 +0900 Subject: [PATCH 510/771] =?UTF-8?q?fix(ml):=20Authenticate=20Docker=20to?= =?UTF-8?q?=20GCP=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_cloudrun_machine_learning.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 75dc6d67..7d6eadf9 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -28,6 +28,9 @@ jobs: --file=./machine_learning/Dockerfile \ --platform linux/amd64 ./machine_learning + - name: Authenticate Docker to GCP + run: gcloud auth configure-docker + - name: Push Docker image to Artifact Registry run: | docker push gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest From cf59ed3e62f4e7d47f1d4c4354f7a71c3fd185a6 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 19 Feb 2024 05:51:02 +0900 Subject: [PATCH 511/771] =?UTF-8?q?feat:=E5=8B=95=E7=94=BB=E3=81=AE?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC=E3=83=9F=E3=83=B3=E3=82=B0?= =?UTF-8?q?=E3=82=92=E4=BD=8E=E9=80=9F=E3=81=A7=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/bus_list_page/bottom_sheet.dart | 6 +- .../pages/bus_list_page/bus_list_page.dart | 16 ++-- .../lib/pages/camera_page/camera_page.dart | 92 +++++++++++++++---- .../where_child_bus/lib/util/api/bus.dart | 25 +++++ frontend/where_child_bus/pubspec.lock | 24 +++++ frontend/where_child_bus/pubspec.yaml | 1 + 6 files changed, 137 insertions(+), 27 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index c803204e..d9db0c99 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -132,7 +132,7 @@ class _BottomSheetWidgetState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - busThumbnail(widget.bus.status), + busThumbnail(widget.bus.busStatus), courseAndOperator(busCourseName, busOperatorName), ], ), @@ -185,9 +185,9 @@ class _BottomSheetWidgetState extends State { )); } - Widget busThumbnail(Status busStatus) { + Widget busThumbnail(BusStatus busStatus) { late String imagePath; - if (busStatus == Status.STATUS_RUNNING) { + if (busStatus == BusStatus.BUS_STATUS_RUNNING) { imagePath = "assets/images/bus_operating.png"; } else { imagePath = "assets/images/bus_not_operating.png"; diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 4c32487e..342c127c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -129,8 +129,8 @@ class _BusListPageState extends State { }, child: Row( children: [ - busPhoto(bus.status), - busNameAndDescription(bus.name, bus.status), + busPhoto(bus.busStatus), + busNameAndDescription(bus.name, bus.busStatus), ], ), ), @@ -139,9 +139,9 @@ class _BusListPageState extends State { ); } - Widget busPhoto(Status busStatus) { + Widget busPhoto(BusStatus busStatus) { late String imagePath; - if (busStatus == Status.STATUS_RUNNING) { + if (busStatus == BusStatus.BUS_STATUS_RUNNING) { imagePath = "assets/images/bus_operating.png"; } else { imagePath = "assets/images/bus_not_operating.png"; @@ -170,11 +170,11 @@ class _BusListPageState extends State { ); } - Widget busDescription(Status busStatus) { + Widget busDescription(BusStatus busStatus) { late String description; - if (busStatus == Status.STATUS_RUNNING) { + if (busStatus == BusStatus.BUS_STATUS_RUNNING) { description = "運行中"; - } else if (busStatus == Status.STATUS_MAINTEINANCE) { + } else if (busStatus == BusStatus.BUS_STATUS_MAINTENANCE) { description = "メンテナンス中"; } else { description = "停止中"; @@ -190,7 +190,7 @@ class _BusListPageState extends State { ); } - Widget busNameAndDescription(String name, Status busStatus) { + Widget busNameAndDescription(String name, BusStatus busStatus) { return Padding( padding: const EdgeInsets.all(10), child: Column( diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index a6b52aac..d054cf7c 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -1,14 +1,16 @@ -import 'dart:io'; -import "dart:developer" as developer; -import 'package:camera/camera.dart'; -import 'package:flutter/material.dart'; import 'dart:async'; +import 'dart:developer' as developer; +import 'package:flutter/material.dart'; +import 'package:camera/camera.dart'; +import 'package:grpc/grpc.dart'; +import 'package:where_child_bus/config/config.dart'; +import 'package:where_child_bus/util/api/bus.dart'; +import 'package:where_child_bus/util/nursery_data.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; import "package:where_child_bus/main.dart" as where_child_bus; class CameraPage extends StatefulWidget { - const CameraPage({ - Key? key, - }) : super(key: key); + const CameraPage({Key? key}) : super(key: key); @override _CameraPageState createState() => _CameraPageState(); @@ -16,32 +18,90 @@ class CameraPage extends StatefulWidget { class _CameraPageState extends State { late CameraController _controller; + final StreamController _streamController = + StreamController.broadcast(); @override void initState() { super.initState(); - _controller = CameraController( - where_child_bus.cameras.first, - ResolutionPreset.medium, + _initializeCamera(); + } + + void _initializeCamera() async { + final firstCamera = where_child_bus.cameras.first; + _controller = CameraController(firstCamera, ResolutionPreset.medium); + + try { + await _controller.initialize(); + if (!mounted) return; + setState(() {}); + _startImageStream(); + developer.log("Start streaming video to server", name: "CameraPage"); + // _streamVideoToServer(); + streamBusVideo(_streamController.stream); + developer.log("Finish streaming video to server", name: "CameraPage"); + } catch (e) { + developer.log('Failed to initialize camera: $e'); + } + } + + Future streamBusVideo( + Stream requestStream) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + options: const ChannelOptions(), ); - _controller.initialize().then((_) { - if (!mounted) { - return; + final grpcClient = BusServiceClient(channel); + developer.log("ServiceClient created"); + final res = grpcClient.streamBusVideo(requestStream); + + try { + developer.log("Streamed video to server"); + await for (var response in res.asStream()) { + developer.log("Received response: $response"); } - setState(() {}); - }); + } catch (error) { + developer.log("Caught Error:", error: error.toString()); + } finally { + await channel.shutdown(); + } + } + + void _startImageStream() { + List> videoChunks = []; + if (!_controller.value.isStreamingImages) { + int frameCounter = 0; + _controller.startImageStream((CameraImage image) { + frameCounter++; + if (frameCounter % 60 == 0) { + videoChunks.add(image.planes[0].bytes); + _streamController.add(StreamBusVideoRequest( + nurseryId: NurseryData().getNursery().id, + videoChunk: videoChunks)); + developer.log("Received image frame", name: "CameraPage"); + videoChunks = []; + } + }); + } + } + + void _streamVideoToServer() async { + final stream = _streamController.stream; + await streamBusVideo(stream); } @override void dispose() { _controller.dispose(); + _streamController.close(); super.dispose(); } @override Widget build(BuildContext context) { if (!_controller.value.isInitialized) { - return Container(); + return const SizedBox.shrink(); // カメラが初期化されていない場合は何も表示しない } return Scaffold( body: CameraPreview(_controller), diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index ac2fdafa..ad769185 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -1,8 +1,11 @@ import "dart:developer" as developer; +import "package:camera/camera.dart"; import "package:flutter/foundation.dart"; import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus/util/nursery_data.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; Future performGrpcCall( Future Function(BusServiceClient) grpcCall) async { @@ -51,3 +54,25 @@ Future createBus( return client.createBus(req); }); } + +Future streamBusVideo(Stream requestStream) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + options: const ChannelOptions(), + ); + final grpcClient = BusServiceClient(channel); + developer.log("ServiceClient created"); + final res = grpcClient.streamBusVideo(requestStream); + + try { + developer.log("Streamed video to server"); + await for (var response in res.asStream()) { + developer.log("Received response: $response"); + } + } catch (error) { + developer.log("Caught Error:", error: error.toString()); + } finally { + await channel.shutdown(); + } +} diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index 84f4a268..0fc28f97 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -280,6 +280,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image: + dependency: "direct main" + description: + name: image + sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e" + url: "https://pub.dev" + source: hosted + version: "4.1.7" image_picker: dependency: "direct main" description: @@ -448,6 +456,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" platform: dependency: transitive description: @@ -636,6 +652,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" sdks: dart: ">=3.2.6 <4.0.0" flutter: ">=3.16.6" diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 0aa0c0d2..6fe2d681 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -16,6 +16,7 @@ dependencies: image_picker: ^1.0.7 flutter_cache_manager: ^3.3.1 camera: ^0.10.5+9 + image: ^4.1.7 where_child_bus_api: path: ../where_child_bus_api From f0d172157e9aa7300350f72a5fb0bb7fe0c78419 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 05:52:48 +0900 Subject: [PATCH 512/771] =?UTF-8?q?chore(ml):=20--quiet=20option=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_cloudrun_machine_learning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 7d6eadf9..bd513254 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -29,7 +29,7 @@ jobs: --platform linux/amd64 ./machine_learning - name: Authenticate Docker to GCP - run: gcloud auth configure-docker + run: gcloud auth configure-docker --quiet - name: Push Docker image to Artifact Registry run: | From f78bf2753eb644e69921b90c3895f112cc5c7c27 Mon Sep 17 00:00:00 2001 From: koto623 Date: Mon, 19 Feb 2024 05:56:23 +0900 Subject: [PATCH 513/771] =?UTF-8?q?feat:=E5=BF=98=E3=82=8C=E7=89=A9?= =?UTF-8?q?=E3=81=AE=E7=A2=BA=E8=AA=8D=E3=83=88=E3=82=B0=E3=83=AB=E3=83=9C?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/daily_record_body.dart | 51 +++++++++++-------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 952e9f11..9e7ac7dd 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -123,6 +123,7 @@ class _DailyRecordBody extends State { Widget childItemList(BuildContext context) { return SizedBox( width: MediaQuery.of(context).size.width * 0.5, + height: MediaQuery.of(context).size.height * 0.14, child: Wrap( direction: Axis.horizontal, alignment: WrapAlignment.spaceBetween, @@ -139,25 +140,35 @@ class _DailyRecordBody extends State { } Widget itemText(String itemName, bool hasItem) { - return SizedBox( - width: MediaQuery.of(context).size.width * 0.24, - child: Padding( - padding: const EdgeInsets.only(top: 5.0, bottom: 5.0), - child: Row( - children: [ - SizedBox( - width: 20, - child: hasItem - ? const Icon(Icons.check, color: Colors.green) - : const Icon(Icons.error_outline, color: Colors.red), - ), - const SizedBox(width: 8), - Text( - itemName, - style: statusFieldTextStyle(hasItem), - textAlign: TextAlign.center, - ), - ], - ))); + return Material( + color: hasItem ? Colors.green[100] : Colors.red[100], + borderRadius: BorderRadius.circular(5), + elevation: 5, + child: InkWell( + onTap: () { + //TODO: ここにアイテムの所持状況を変更する処理を追加 + }, + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.24, + child: Padding( + padding: const EdgeInsets.only( + top: 10.0, bottom: 10.0, left: 8.0), + child: Row( + children: [ + SizedBox( + width: 20, + child: hasItem + ? const Icon(Icons.check, color: Colors.green) + : const Icon(Icons.error_outline, + color: Colors.red), + ), + const SizedBox(width: 8), + Text( + itemName, + style: statusFieldTextStyle(hasItem), + textAlign: TextAlign.center, + ), + ], + ))))); } } From b4b3a0392887a167dfd045d5639e8cc633b9a10e Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 05:56:32 +0900 Subject: [PATCH 514/771] refactor(ml) --- .github/workflows/deploy_cloudrun_machine_learning.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index bd513254..85987f6f 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -31,6 +31,10 @@ jobs: - name: Authenticate Docker to GCP run: gcloud auth configure-docker --quiet + - name: Authenticate Docker with GCP + run: | + gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://gcr.io + - name: Push Docker image to Artifact Registry run: | docker push gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest From acf4ad26e3a0094738132cd3545b70c7577fe127 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 10:33:35 +0900 Subject: [PATCH 515/771] =?UTF-8?q?feat:=20=20main.go=E3=81=AE=E5=A4=89?= =?UTF-8?q?=E6=9B=B4:=20ML=E3=82=AF=E3=83=A9=E3=82=A4=E3=82=A2=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/server/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index dbcb07c9..dd7e89a8 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -117,6 +117,7 @@ func main() { grpc_server.WithReflection(config.ModeDev), grpc_server.WithStorageClient(storageClient), grpc_server.WithBucketName(config.StorageBucketName), + grpc_server.WithMLClient(mlv1.NewMachineLearningServiceClient(conn)), ) lsnr, err := net.Listen("tcp", ":"+config.GrpcPort) if err != nil { From 93e6c6a94de3f025fac1faa6dd06981d2fe51fd3 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 11:33:56 +0900 Subject: [PATCH 516/771] refactor(ml) --- .github/workflows/deploy_cloudrun_machine_learning.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 85987f6f..bd513254 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -31,10 +31,6 @@ jobs: - name: Authenticate Docker to GCP run: gcloud auth configure-docker --quiet - - name: Authenticate Docker with GCP - run: | - gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://gcr.io - - name: Push Docker image to Artifact Registry run: | docker push gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest From a99927ca3514e95b08e50301e0f918e76fcf92fc Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 11:51:50 +0900 Subject: [PATCH 517/771] refactor(ml) --- .../deploy_cloudrun_machine_learning.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index bd513254..231ab739 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -13,12 +13,26 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Cloud SDK - uses: "google-github-actions/setup-gcloud@v2" + - name: Setup gcloud CLI + uses: google-github-actions/setup-gcloud@v2 + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + skip_install: false + version: latest + + # gcloud CLIを認証するステップを追加 + - name: Auth + uses: google-github-actions/auth@v0.4.0 with: workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.SERVICE_ACCOUNT }} + # - name: Set up Cloud SDK + # uses: "google-github-actions/setup-gcloud@v2" + # with: + # workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} + # service_account: ${{ secrets.SERVICE_ACCOUNT }} + - name: Build Docker image run: | docker build \ From 7741a1968569e7bd9d7ca26625de322a810a5737 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 11:55:18 +0900 Subject: [PATCH 518/771] refactor(ml) --- .github/workflows/deploy_cloudrun_machine_learning.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 231ab739..234cfd78 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -6,6 +6,11 @@ on: - develop - feature/machine-learning/cicd +permissions: + contents: read + pages: write + id-token: write + jobs: deploy: runs-on: ubuntu-latest From e7991f714db52d535c8242a196623f1aee1e4afc Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 12:01:05 +0900 Subject: [PATCH 519/771] refactor(ml) --- .github/workflows/deploy_cloudrun_machine_learning.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 234cfd78..eb18b269 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -32,12 +32,6 @@ jobs: workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.SERVICE_ACCOUNT }} - # - name: Set up Cloud SDK - # uses: "google-github-actions/setup-gcloud@v2" - # with: - # workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} - # service_account: ${{ secrets.SERVICE_ACCOUNT }} - - name: Build Docker image run: | docker build \ From 161e8e67792a0bf135f43c36daa430328d73797e Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 12:35:35 +0900 Subject: [PATCH 520/771] refactor(ml) --- .github/workflows/deploy_cloudrun_machine_learning.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index eb18b269..a0e79ba1 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -31,6 +31,12 @@ jobs: with: workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.SERVICE_ACCOUNT }} + access_token_lifetime: 1200s + create_credentials_file: "true" + + - name: gcloud auth login by workload identity + run: |- + gcloud auth login --brief --cred-file="${{ steps.Auth.outputs.credentials_file_path }}" - name: Build Docker image run: | From a5efa18b584a72cfc2b7faf0362139cc89c7f93d Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 12:38:04 +0900 Subject: [PATCH 521/771] refactor(ml) --- .github/workflows/deploy_cloudrun_machine_learning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index a0e79ba1..9c01bdd3 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -36,7 +36,7 @@ jobs: - name: gcloud auth login by workload identity run: |- - gcloud auth login --brief --cred-file="${{ steps.Auth.outputs.credentials_file_path }}" + gcloud auth login --brief --no-launch-browser --cred-file="${{ steps.Auth.outputs.credentials_file_path }}" - name: Build Docker image run: | From 4ff8f7374fd6f3af00b617947dcee14b0dca13ef Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 12:49:41 +0900 Subject: [PATCH 522/771] refactor(ml) --- .github/workflows/deploy_cloudrun_machine_learning.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 9c01bdd3..74af5daa 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -32,11 +32,6 @@ jobs: workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.SERVICE_ACCOUNT }} access_token_lifetime: 1200s - create_credentials_file: "true" - - - name: gcloud auth login by workload identity - run: |- - gcloud auth login --brief --no-launch-browser --cred-file="${{ steps.Auth.outputs.credentials_file_path }}" - name: Build Docker image run: | From 1e9fe1b8c2125ca0febf2b0c55b491aff40ce741 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 12:58:18 +0900 Subject: [PATCH 523/771] =?UTF-8?q?feat(ml):=20=E5=8B=95=E4=BD=9C=E3=81=99?= =?UTF-8?q?=E3=82=8BGithub=20Actions=20workflow=E3=81=AE=E6=A7=8B=E7=AF=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_cloudrun_machine_learning.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 74af5daa..e2ba527a 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -5,6 +5,8 @@ on: branches: - develop - feature/machine-learning/cicd + paths: + - "machine-learning/**" permissions: contents: read From bca44c6f67dff07633f38a8c520032ef103ba8fe Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 13:09:19 +0900 Subject: [PATCH 524/771] =?UTF-8?q?feat:=20=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=81=A8=E5=AD=90=E4=BE=9B=E3=81=AE=E3=82=A2=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=83=87=E3=83=BC=E3=83=88API=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/child.go | 5 + backend/interfaces/guardian.go | 7 +- .../go/where_child_bus/v1/child.pb.go | 528 +++++++++++++----- .../go/where_child_bus/v1/child_grpc.pb.go | 37 ++ .../go/where_child_bus/v1/guardian.pb.go | 487 +++++++++++----- .../go/where_child_bus/v1/guardian_grpc.pb.go | 37 ++ backend/usecases/child/child.go | 76 +++ backend/usecases/guardian/guardian.go | 60 ++ .../where_child_bus/v1/child.pb.dart | 245 ++++++++ .../where_child_bus/v1/child.pbgrpc.dart | 20 + .../where_child_bus/v1/child.pbjson.dart | 42 ++ .../where_child_bus/v1/guardian.pb.dart | 189 +++++++ .../where_child_bus/v1/guardian.pbgrpc.dart | 20 + .../where_child_bus/v1/guardian.pbjson.dart | 36 ++ .../generated/where_child_bus/v1/child_pb2.py | 51 +- .../where_child_bus/v1/child_pb2.pyi | 33 ++ .../where_child_bus/v1/child_pb2_grpc.py | 33 ++ .../where_child_bus/v1/guardian_pb2.py | 51 +- .../where_child_bus/v1/guardian_pb2.pyi | 25 + .../where_child_bus/v1/guardian_pb2_grpc.py | 33 ++ proto/where_child_bus/v1/child.proto | 23 + proto/where_child_bus/v1/guardian.proto | 18 +- 22 files changed, 1727 insertions(+), 329 deletions(-) diff --git a/backend/interfaces/child.go b/backend/interfaces/child.go index 99019fbf..9813be83 100644 --- a/backend/interfaces/child.go +++ b/backend/interfaces/child.go @@ -39,3 +39,8 @@ func (s *childServiceServer) GetChildListByGuardianID(ctx context.Context, req * func (s *childServiceServer) GetChildListByNurseryID(ctx context.Context, req *pb.GetChildListByNurseryIDRequest) (*pb.GetChildListByNurseryIDResponse, error) { return s.interactor.GetChildListByNurseryID(ctx, req) } + +// UpdateChild implements where_child_busv1.ChildServiceServer. +func (s *childServiceServer) UpdateChild(ctx context.Context, req *pb.UpdateChildRequest) (*pb.UpdateChildResponse, error) { + return s.interactor.UpdateChild(ctx, req) +} diff --git a/backend/interfaces/guardian.go b/backend/interfaces/guardian.go index f5b962d0..eeb2d593 100644 --- a/backend/interfaces/guardian.go +++ b/backend/interfaces/guardian.go @@ -38,4 +38,9 @@ func (s *guardianServiceServer) GetGuardianByChildId(ctx context.Context, req *p // GetGuardianListByNurseryId implements where_child_busv1.GuardianServiceServer. func (s *guardianServiceServer) GetGuardianListByNurseryId(ctx context.Context, req *pb.GetGuardianListByNurseryIdRequest) (*pb.GetGuardianListByNurseryIdResponse, error) { return s.interactor.GetGuardianListByNurseryID(ctx, req) -} \ No newline at end of file +} + +// UpdateGuardian implements where_child_busv1.GuardianServiceServer. +func (s *guardianServiceServer) UpdateGuardian(ctx context.Context, req *pb.UpdateGuardianRequest) (*pb.UpdateGuardianResponse, error) { + return s.interactor.UpdateGuardian(ctx, req) +} diff --git a/backend/proto-gen/go/where_child_bus/v1/child.pb.go b/backend/proto-gen/go/where_child_bus/v1/child.pb.go index d9c19644..539fc52d 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child.pb.go @@ -9,6 +9,7 @@ package where_child_busv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" reflect "reflect" sync "sync" ) @@ -554,6 +555,180 @@ func (x *CheckIsChildInBusResponse) GetIsInBus() bool { return false } +type UpdateChildRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChildId string `protobuf:"bytes,1,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"` + Sex Sex `protobuf:"varint,4,opt,name=sex,proto3,enum=where_child_bus.v1.Sex" json:"sex,omitempty"` + CheckForMissingItems bool `protobuf:"varint,5,opt,name=check_for_missing_items,json=checkForMissingItems,proto3" json:"check_for_missing_items,omitempty"` + HasBag bool `protobuf:"varint,6,opt,name=has_bag,json=hasBag,proto3" json:"has_bag,omitempty"` + HasLunchBox bool `protobuf:"varint,7,opt,name=has_lunch_box,json=hasLunchBox,proto3" json:"has_lunch_box,omitempty"` + HasWaterBottle bool `protobuf:"varint,8,opt,name=has_water_bottle,json=hasWaterBottle,proto3" json:"has_water_bottle,omitempty"` + HasUmbrella bool `protobuf:"varint,9,opt,name=has_umbrella,json=hasUmbrella,proto3" json:"has_umbrella,omitempty"` + HasOther bool `protobuf:"varint,10,opt,name=has_other,json=hasOther,proto3" json:"has_other,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,11,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateChildRequest) Reset() { + *x = UpdateChildRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateChildRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateChildRequest) ProtoMessage() {} + +func (x *UpdateChildRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateChildRequest.ProtoReflect.Descriptor instead. +func (*UpdateChildRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateChildRequest) GetChildId() string { + if x != nil { + return x.ChildId + } + return "" +} + +func (x *UpdateChildRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateChildRequest) GetAge() int32 { + if x != nil { + return x.Age + } + return 0 +} + +func (x *UpdateChildRequest) GetSex() Sex { + if x != nil { + return x.Sex + } + return Sex_SEX_UNSPECIFIED +} + +func (x *UpdateChildRequest) GetCheckForMissingItems() bool { + if x != nil { + return x.CheckForMissingItems + } + return false +} + +func (x *UpdateChildRequest) GetHasBag() bool { + if x != nil { + return x.HasBag + } + return false +} + +func (x *UpdateChildRequest) GetHasLunchBox() bool { + if x != nil { + return x.HasLunchBox + } + return false +} + +func (x *UpdateChildRequest) GetHasWaterBottle() bool { + if x != nil { + return x.HasWaterBottle + } + return false +} + +func (x *UpdateChildRequest) GetHasUmbrella() bool { + if x != nil { + return x.HasUmbrella + } + return false +} + +func (x *UpdateChildRequest) GetHasOther() bool { + if x != nil { + return x.HasOther + } + return false +} + +func (x *UpdateChildRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type UpdateChildResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Child *Child `protobuf:"bytes,1,opt,name=child,proto3" json:"child,omitempty"` +} + +func (x *UpdateChildResponse) Reset() { + *x = UpdateChildResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_child_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateChildResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateChildResponse) ProtoMessage() {} + +func (x *UpdateChildResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_child_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateChildResponse.ProtoReflect.Descriptor instead. +func (*UpdateChildResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_child_proto_rawDescGZIP(), []int{11} +} + +func (x *UpdateChildResponse) GetChild() *Child { + if x != nil { + return x.Child + } + return nil +} + var File_where_child_bus_v1_child_proto protoreflect.FileDescriptor var file_where_child_bus_v1_child_proto_rawDesc = []byte{ @@ -562,123 +737,162 @@ var file_where_child_bus_v1_child_proto_rawDesc = []byte{ 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0c, - 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x46, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2f, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x01, 0x0a, 0x12, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, + 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x46, 0x0a, 0x13, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x22, 0x3f, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x22, 0x90, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, + 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x22, 0x3f, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x22, 0x90, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, - 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, - 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, - 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x42, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x91, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, - 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x33, 0x0a, 0x1a, - 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, - 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, - 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, - 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, - 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, - 0x22, 0x35, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x49, 0x6e, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x19, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x49, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x62, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x49, 0x6e, 0x42, 0x75, 0x73, - 0x32, 0xe5, 0x04, 0x0a, 0x0c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, + 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x42, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x91, 0x01, 0x0a, 0x20, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x33, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, + 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, + 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, + 0x73, 0x49, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, + 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, + 0x6f, 0x73, 0x22, 0x35, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x49, 0x6e, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x19, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x49, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x5f, + 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x49, 0x6e, 0x42, + 0x75, 0x73, 0x22, 0x9b, 0x03, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, + 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, + 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, + 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, + 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, + 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, + 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, + 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, + 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, + 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, + 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, + 0x6c, 0x6c, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x55, 0x6d, + 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, + 0x68, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, + 0x68, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, + 0x22, 0x46, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x32, 0xc5, 0x05, 0x0a, 0x0c, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, 0x32, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, - 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, - 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, - 0x42, 0x75, 0x73, 0x49, 0x44, 0x12, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x49, 0x44, 0x12, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, - 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x77, 0x68, + 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, + 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, - 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, - 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, - 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, - 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x44, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x12, 0x2e, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, + 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, + 0x42, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5e, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, + 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0xed, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -693,7 +907,7 @@ func file_where_child_bus_v1_child_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_child_proto_rawDescData } -var file_where_child_bus_v1_child_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_where_child_bus_v1_child_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ (*CreateChildRequest)(nil), // 0: where_child_bus.v1.CreateChildRequest (*CreateChildResponse)(nil), // 1: where_child_bus.v1.CreateChildResponse @@ -705,34 +919,42 @@ var file_where_child_bus_v1_child_proto_goTypes = []interface{}{ (*GetChildListByBusIDResponse)(nil), // 7: where_child_bus.v1.GetChildListByBusIDResponse (*CheckIsChildInBusRequest)(nil), // 8: where_child_bus.v1.CheckIsChildInBusRequest (*CheckIsChildInBusResponse)(nil), // 9: where_child_bus.v1.CheckIsChildInBusResponse - (Sex)(0), // 10: where_child_bus.v1.Sex - (*Child)(nil), // 11: where_child_bus.v1.Child - (*ChildPhoto)(nil), // 12: where_child_bus.v1.ChildPhoto + (*UpdateChildRequest)(nil), // 10: where_child_bus.v1.UpdateChildRequest + (*UpdateChildResponse)(nil), // 11: where_child_bus.v1.UpdateChildResponse + (Sex)(0), // 12: where_child_bus.v1.Sex + (*Child)(nil), // 13: where_child_bus.v1.Child + (*ChildPhoto)(nil), // 14: where_child_bus.v1.ChildPhoto + (*fieldmaskpb.FieldMask)(nil), // 15: google.protobuf.FieldMask } var file_where_child_bus_v1_child_proto_depIdxs = []int32{ - 10, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex - 11, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child - 11, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child - 12, // 3: where_child_bus.v1.GetChildListByNurseryIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto - 11, // 4: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child - 12, // 5: where_child_bus.v1.GetChildListByGuardianIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto - 11, // 6: where_child_bus.v1.GetChildListByBusIDResponse.children:type_name -> where_child_bus.v1.Child - 12, // 7: where_child_bus.v1.GetChildListByBusIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto - 0, // 8: where_child_bus.v1.ChildService.CreateChild:input_type -> where_child_bus.v1.CreateChildRequest - 2, // 9: where_child_bus.v1.ChildService.GetChildListByNurseryID:input_type -> where_child_bus.v1.GetChildListByNurseryIDRequest - 4, // 10: where_child_bus.v1.ChildService.GetChildListByGuardianID:input_type -> where_child_bus.v1.GetChildListByGuardianIDRequest - 6, // 11: where_child_bus.v1.ChildService.GetChildListByBusID:input_type -> where_child_bus.v1.GetChildListByBusIDRequest - 8, // 12: where_child_bus.v1.ChildService.CheckIsChildInBus:input_type -> where_child_bus.v1.CheckIsChildInBusRequest - 1, // 13: where_child_bus.v1.ChildService.CreateChild:output_type -> where_child_bus.v1.CreateChildResponse - 3, // 14: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse - 5, // 15: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse - 7, // 16: where_child_bus.v1.ChildService.GetChildListByBusID:output_type -> where_child_bus.v1.GetChildListByBusIDResponse - 9, // 17: where_child_bus.v1.ChildService.CheckIsChildInBus:output_type -> where_child_bus.v1.CheckIsChildInBusResponse - 13, // [13:18] is the sub-list for method output_type - 8, // [8:13] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 12, // 0: where_child_bus.v1.CreateChildRequest.sex:type_name -> where_child_bus.v1.Sex + 13, // 1: where_child_bus.v1.CreateChildResponse.child:type_name -> where_child_bus.v1.Child + 13, // 2: where_child_bus.v1.GetChildListByNurseryIDResponse.children:type_name -> where_child_bus.v1.Child + 14, // 3: where_child_bus.v1.GetChildListByNurseryIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 13, // 4: where_child_bus.v1.GetChildListByGuardianIDResponse.children:type_name -> where_child_bus.v1.Child + 14, // 5: where_child_bus.v1.GetChildListByGuardianIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 13, // 6: where_child_bus.v1.GetChildListByBusIDResponse.children:type_name -> where_child_bus.v1.Child + 14, // 7: where_child_bus.v1.GetChildListByBusIDResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 12, // 8: where_child_bus.v1.UpdateChildRequest.sex:type_name -> where_child_bus.v1.Sex + 15, // 9: where_child_bus.v1.UpdateChildRequest.update_mask:type_name -> google.protobuf.FieldMask + 13, // 10: where_child_bus.v1.UpdateChildResponse.child:type_name -> where_child_bus.v1.Child + 0, // 11: where_child_bus.v1.ChildService.CreateChild:input_type -> where_child_bus.v1.CreateChildRequest + 2, // 12: where_child_bus.v1.ChildService.GetChildListByNurseryID:input_type -> where_child_bus.v1.GetChildListByNurseryIDRequest + 4, // 13: where_child_bus.v1.ChildService.GetChildListByGuardianID:input_type -> where_child_bus.v1.GetChildListByGuardianIDRequest + 6, // 14: where_child_bus.v1.ChildService.GetChildListByBusID:input_type -> where_child_bus.v1.GetChildListByBusIDRequest + 8, // 15: where_child_bus.v1.ChildService.CheckIsChildInBus:input_type -> where_child_bus.v1.CheckIsChildInBusRequest + 10, // 16: where_child_bus.v1.ChildService.UpdateChild:input_type -> where_child_bus.v1.UpdateChildRequest + 1, // 17: where_child_bus.v1.ChildService.CreateChild:output_type -> where_child_bus.v1.CreateChildResponse + 3, // 18: where_child_bus.v1.ChildService.GetChildListByNurseryID:output_type -> where_child_bus.v1.GetChildListByNurseryIDResponse + 5, // 19: where_child_bus.v1.ChildService.GetChildListByGuardianID:output_type -> where_child_bus.v1.GetChildListByGuardianIDResponse + 7, // 20: where_child_bus.v1.ChildService.GetChildListByBusID:output_type -> where_child_bus.v1.GetChildListByBusIDResponse + 9, // 21: where_child_bus.v1.ChildService.CheckIsChildInBus:output_type -> where_child_bus.v1.CheckIsChildInBusResponse + 11, // 22: where_child_bus.v1.ChildService.UpdateChild:output_type -> where_child_bus.v1.UpdateChildResponse + 17, // [17:23] is the sub-list for method output_type + 11, // [11:17] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_where_child_bus_v1_child_proto_init() } @@ -862,6 +1084,30 @@ func file_where_child_bus_v1_child_proto_init() { return nil } } + file_where_child_bus_v1_child_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateChildRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_child_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateChildResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -869,7 +1115,7 @@ func file_where_child_bus_v1_child_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_child_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go index 5890a085..c2234933 100644 --- a/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/child_grpc.pb.go @@ -24,6 +24,7 @@ const ( ChildService_GetChildListByGuardianID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByGuardianID" ChildService_GetChildListByBusID_FullMethodName = "/where_child_bus.v1.ChildService/GetChildListByBusID" ChildService_CheckIsChildInBus_FullMethodName = "/where_child_bus.v1.ChildService/CheckIsChildInBus" + ChildService_UpdateChild_FullMethodName = "/where_child_bus.v1.ChildService/UpdateChild" ) // ChildServiceClient is the client API for ChildService service. @@ -35,6 +36,7 @@ type ChildServiceClient interface { GetChildListByGuardianID(ctx context.Context, in *GetChildListByGuardianIDRequest, opts ...grpc.CallOption) (*GetChildListByGuardianIDResponse, error) GetChildListByBusID(ctx context.Context, in *GetChildListByBusIDRequest, opts ...grpc.CallOption) (*GetChildListByBusIDResponse, error) CheckIsChildInBus(ctx context.Context, in *CheckIsChildInBusRequest, opts ...grpc.CallOption) (*CheckIsChildInBusResponse, error) + UpdateChild(ctx context.Context, in *UpdateChildRequest, opts ...grpc.CallOption) (*UpdateChildResponse, error) } type childServiceClient struct { @@ -90,6 +92,15 @@ func (c *childServiceClient) CheckIsChildInBus(ctx context.Context, in *CheckIsC return out, nil } +func (c *childServiceClient) UpdateChild(ctx context.Context, in *UpdateChildRequest, opts ...grpc.CallOption) (*UpdateChildResponse, error) { + out := new(UpdateChildResponse) + err := c.cc.Invoke(ctx, ChildService_UpdateChild_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ChildServiceServer is the server API for ChildService service. // All implementations should embed UnimplementedChildServiceServer // for forward compatibility @@ -99,6 +110,7 @@ type ChildServiceServer interface { GetChildListByGuardianID(context.Context, *GetChildListByGuardianIDRequest) (*GetChildListByGuardianIDResponse, error) GetChildListByBusID(context.Context, *GetChildListByBusIDRequest) (*GetChildListByBusIDResponse, error) CheckIsChildInBus(context.Context, *CheckIsChildInBusRequest) (*CheckIsChildInBusResponse, error) + UpdateChild(context.Context, *UpdateChildRequest) (*UpdateChildResponse, error) } // UnimplementedChildServiceServer should be embedded to have forward compatible implementations. @@ -120,6 +132,9 @@ func (UnimplementedChildServiceServer) GetChildListByBusID(context.Context, *Get func (UnimplementedChildServiceServer) CheckIsChildInBus(context.Context, *CheckIsChildInBusRequest) (*CheckIsChildInBusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckIsChildInBus not implemented") } +func (UnimplementedChildServiceServer) UpdateChild(context.Context, *UpdateChildRequest) (*UpdateChildResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateChild not implemented") +} // UnsafeChildServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ChildServiceServer will @@ -222,6 +237,24 @@ func _ChildService_CheckIsChildInBus_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _ChildService_UpdateChild_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateChildRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChildServiceServer).UpdateChild(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChildService_UpdateChild_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChildServiceServer).UpdateChild(ctx, req.(*UpdateChildRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ChildService_ServiceDesc is the grpc.ServiceDesc for ChildService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -249,6 +282,10 @@ var ChildService_ServiceDesc = grpc.ServiceDesc{ MethodName: "CheckIsChildInBus", Handler: _ChildService_CheckIsChildInBus_Handler, }, + { + MethodName: "UpdateChild", + Handler: _ChildService_UpdateChild_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/child.proto", diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go index b86deeb0..75c780cb 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian.pb.go @@ -9,6 +9,7 @@ package where_child_busv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" reflect "reflect" sync "sync" ) @@ -546,6 +547,148 @@ func (x *GetGuardianListByNurseryIdResponse) GetGuardians() []*GuardianResponse return nil } +type UpdateGuardianRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GuardianId string `protobuf:"bytes,1,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + IsUseMorningBus bool `protobuf:"varint,5,opt,name=is_use_morning_bus,json=isUseMorningBus,proto3" json:"is_use_morning_bus,omitempty"` + IsUseEveningBus bool `protobuf:"varint,6,opt,name=is_use_evening_bus,json=isUseEveningBus,proto3" json:"is_use_evening_bus,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,11,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateGuardianRequest) Reset() { + *x = UpdateGuardianRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGuardianRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGuardianRequest) ProtoMessage() {} + +func (x *UpdateGuardianRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateGuardianRequest.ProtoReflect.Descriptor instead. +func (*UpdateGuardianRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateGuardianRequest) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +func (x *UpdateGuardianRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateGuardianRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *UpdateGuardianRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *UpdateGuardianRequest) GetIsUseMorningBus() bool { + if x != nil { + return x.IsUseMorningBus + } + return false +} + +func (x *UpdateGuardianRequest) GetIsUseEveningBus() bool { + if x != nil { + return x.IsUseEveningBus + } + return false +} + +func (x *UpdateGuardianRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type UpdateGuardianResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Guardian *GuardianResponse `protobuf:"bytes,1,opt,name=guardian,proto3" json:"guardian,omitempty"` +} + +func (x *UpdateGuardianResponse) Reset() { + *x = UpdateGuardianResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGuardianResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGuardianResponse) ProtoMessage() {} + +func (x *UpdateGuardianResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_guardian_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateGuardianResponse.ProtoReflect.Descriptor instead. +func (*UpdateGuardianResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_guardian_proto_rawDescGZIP(), []int{11} +} + +func (x *UpdateGuardianResponse) GetGuardian() *GuardianResponse { + if x != nil { + return x.Guardian + } + return nil +} + var File_where_child_bus_v1_guardian_proto protoreflect.FileDescriptor var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ @@ -554,124 +697,157 @@ var file_where_child_bus_v1_guardian_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x01, 0x0a, 0x15, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x22, 0x5a, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x22, 0x48, 0x0a, - 0x14, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xb2, 0x01, 0x0a, 0x15, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x08, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x3d, 0x0a, - 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x22, 0x36, 0x0a, 0x1d, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x01, + 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x22, 0x5a, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, + 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x22, + 0x48, 0x0a, 0x14, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xb2, 0x01, 0x0a, 0x15, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, + 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, + 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x22, 0x36, + 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x22, 0x38, 0x0a, 0x1b, + 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x22, 0x42, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x68, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, - 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x22, 0x9c, 0x02, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, + 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x62, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x55, 0x73, + 0x65, 0x4d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x12, 0x69, + 0x73, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x55, 0x73, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x5a, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x40, 0x0a, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x32, 0xd3, 0x05, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, + 0x0a, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, + 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x22, 0x38, 0x0a, 0x1b, 0x47, 0x65, - 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x22, 0x42, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x68, 0x0a, 0x22, 0x47, 0x65, - 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x73, 0x32, 0xea, 0x04, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, - 0x64, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x47, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, - 0x12, 0x2f, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x31, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x49, 0x64, 0x12, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, - 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, - 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, - 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x2f, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x42, 0x79, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x42, + 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, + 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, + 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x42, 0x0d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, + 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, + 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, + 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -686,7 +862,7 @@ func file_where_child_bus_v1_guardian_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_guardian_proto_rawDescData } -var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_where_child_bus_v1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_where_child_bus_v1_guardian_proto_goTypes = []interface{}{ (*CreateGuardianRequest)(nil), // 0: where_child_bus.v1.CreateGuardianRequest (*CreateGuardianResponse)(nil), // 1: where_child_bus.v1.CreateGuardianResponse @@ -698,31 +874,38 @@ var file_where_child_bus_v1_guardian_proto_goTypes = []interface{}{ (*GetGuardianByChildIdResponse)(nil), // 7: where_child_bus.v1.GetGuardianByChildIdResponse (*GetGuardianListByNurseryIdRequest)(nil), // 8: where_child_bus.v1.GetGuardianListByNurseryIdRequest (*GetGuardianListByNurseryIdResponse)(nil), // 9: where_child_bus.v1.GetGuardianListByNurseryIdResponse - (*GuardianResponse)(nil), // 10: where_child_bus.v1.GuardianResponse - (*NurseryResponse)(nil), // 11: where_child_bus.v1.NurseryResponse + (*UpdateGuardianRequest)(nil), // 10: where_child_bus.v1.UpdateGuardianRequest + (*UpdateGuardianResponse)(nil), // 11: where_child_bus.v1.UpdateGuardianResponse + (*GuardianResponse)(nil), // 12: where_child_bus.v1.GuardianResponse + (*NurseryResponse)(nil), // 13: where_child_bus.v1.NurseryResponse + (*fieldmaskpb.FieldMask)(nil), // 14: google.protobuf.FieldMask } var file_where_child_bus_v1_guardian_proto_depIdxs = []int32{ - 10, // 0: where_child_bus.v1.CreateGuardianResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 10, // 1: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 11, // 2: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 10, // 3: where_child_bus.v1.GetGuardianListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse - 10, // 4: where_child_bus.v1.GetGuardianByChildIdResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse - 10, // 5: where_child_bus.v1.GetGuardianListByNurseryIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse - 0, // 6: where_child_bus.v1.GuardianService.CreateGuardian:input_type -> where_child_bus.v1.CreateGuardianRequest - 2, // 7: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest - 4, // 8: where_child_bus.v1.GuardianService.GetGuardianListByBusId:input_type -> where_child_bus.v1.GetGuardianListByBusIdRequest - 6, // 9: where_child_bus.v1.GuardianService.GetGuardianByChildId:input_type -> where_child_bus.v1.GetGuardianByChildIdRequest - 8, // 10: where_child_bus.v1.GuardianService.GetGuardianListByNurseryId:input_type -> where_child_bus.v1.GetGuardianListByNurseryIdRequest - 1, // 11: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse - 3, // 12: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse - 5, // 13: where_child_bus.v1.GuardianService.GetGuardianListByBusId:output_type -> where_child_bus.v1.GetGuardianListByBusIdResponse - 7, // 14: where_child_bus.v1.GuardianService.GetGuardianByChildId:output_type -> where_child_bus.v1.GetGuardianByChildIdResponse - 9, // 15: where_child_bus.v1.GuardianService.GetGuardianListByNurseryId:output_type -> where_child_bus.v1.GetGuardianListByNurseryIdResponse - 11, // [11:16] is the sub-list for method output_type - 6, // [6:11] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 12, // 0: where_child_bus.v1.CreateGuardianResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 12, // 1: where_child_bus.v1.GuardianLoginResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 13, // 2: where_child_bus.v1.GuardianLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 12, // 3: where_child_bus.v1.GetGuardianListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 12, // 4: where_child_bus.v1.GetGuardianByChildIdResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 12, // 5: where_child_bus.v1.GetGuardianListByNurseryIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 14, // 6: where_child_bus.v1.UpdateGuardianRequest.update_mask:type_name -> google.protobuf.FieldMask + 12, // 7: where_child_bus.v1.UpdateGuardianResponse.guardian:type_name -> where_child_bus.v1.GuardianResponse + 0, // 8: where_child_bus.v1.GuardianService.CreateGuardian:input_type -> where_child_bus.v1.CreateGuardianRequest + 2, // 9: where_child_bus.v1.GuardianService.GuardianLogin:input_type -> where_child_bus.v1.GuardianLoginRequest + 4, // 10: where_child_bus.v1.GuardianService.GetGuardianListByBusId:input_type -> where_child_bus.v1.GetGuardianListByBusIdRequest + 6, // 11: where_child_bus.v1.GuardianService.GetGuardianByChildId:input_type -> where_child_bus.v1.GetGuardianByChildIdRequest + 8, // 12: where_child_bus.v1.GuardianService.GetGuardianListByNurseryId:input_type -> where_child_bus.v1.GetGuardianListByNurseryIdRequest + 10, // 13: where_child_bus.v1.GuardianService.UpdateGuardian:input_type -> where_child_bus.v1.UpdateGuardianRequest + 1, // 14: where_child_bus.v1.GuardianService.CreateGuardian:output_type -> where_child_bus.v1.CreateGuardianResponse + 3, // 15: where_child_bus.v1.GuardianService.GuardianLogin:output_type -> where_child_bus.v1.GuardianLoginResponse + 5, // 16: where_child_bus.v1.GuardianService.GetGuardianListByBusId:output_type -> where_child_bus.v1.GetGuardianListByBusIdResponse + 7, // 17: where_child_bus.v1.GuardianService.GetGuardianByChildId:output_type -> where_child_bus.v1.GetGuardianByChildIdResponse + 9, // 18: where_child_bus.v1.GuardianService.GetGuardianListByNurseryId:output_type -> where_child_bus.v1.GetGuardianListByNurseryIdResponse + 11, // 19: where_child_bus.v1.GuardianService.UpdateGuardian:output_type -> where_child_bus.v1.UpdateGuardianResponse + 14, // [14:20] is the sub-list for method output_type + 8, // [8:14] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_where_child_bus_v1_guardian_proto_init() } @@ -852,6 +1035,30 @@ func file_where_child_bus_v1_guardian_proto_init() { return nil } } + file_where_child_bus_v1_guardian_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGuardianRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_guardian_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGuardianResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -859,7 +1066,7 @@ func file_where_child_bus_v1_guardian_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_guardian_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go index 22ce80ab..32ca6380 100644 --- a/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/guardian_grpc.pb.go @@ -24,6 +24,7 @@ const ( GuardianService_GetGuardianListByBusId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianListByBusId" GuardianService_GetGuardianByChildId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianByChildId" GuardianService_GetGuardianListByNurseryId_FullMethodName = "/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId" + GuardianService_UpdateGuardian_FullMethodName = "/where_child_bus.v1.GuardianService/UpdateGuardian" ) // GuardianServiceClient is the client API for GuardianService service. @@ -35,6 +36,7 @@ type GuardianServiceClient interface { GetGuardianListByBusId(ctx context.Context, in *GetGuardianListByBusIdRequest, opts ...grpc.CallOption) (*GetGuardianListByBusIdResponse, error) GetGuardianByChildId(ctx context.Context, in *GetGuardianByChildIdRequest, opts ...grpc.CallOption) (*GetGuardianByChildIdResponse, error) GetGuardianListByNurseryId(ctx context.Context, in *GetGuardianListByNurseryIdRequest, opts ...grpc.CallOption) (*GetGuardianListByNurseryIdResponse, error) + UpdateGuardian(ctx context.Context, in *UpdateGuardianRequest, opts ...grpc.CallOption) (*UpdateGuardianResponse, error) } type guardianServiceClient struct { @@ -90,6 +92,15 @@ func (c *guardianServiceClient) GetGuardianListByNurseryId(ctx context.Context, return out, nil } +func (c *guardianServiceClient) UpdateGuardian(ctx context.Context, in *UpdateGuardianRequest, opts ...grpc.CallOption) (*UpdateGuardianResponse, error) { + out := new(UpdateGuardianResponse) + err := c.cc.Invoke(ctx, GuardianService_UpdateGuardian_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // GuardianServiceServer is the server API for GuardianService service. // All implementations should embed UnimplementedGuardianServiceServer // for forward compatibility @@ -99,6 +110,7 @@ type GuardianServiceServer interface { GetGuardianListByBusId(context.Context, *GetGuardianListByBusIdRequest) (*GetGuardianListByBusIdResponse, error) GetGuardianByChildId(context.Context, *GetGuardianByChildIdRequest) (*GetGuardianByChildIdResponse, error) GetGuardianListByNurseryId(context.Context, *GetGuardianListByNurseryIdRequest) (*GetGuardianListByNurseryIdResponse, error) + UpdateGuardian(context.Context, *UpdateGuardianRequest) (*UpdateGuardianResponse, error) } // UnimplementedGuardianServiceServer should be embedded to have forward compatible implementations. @@ -120,6 +132,9 @@ func (UnimplementedGuardianServiceServer) GetGuardianByChildId(context.Context, func (UnimplementedGuardianServiceServer) GetGuardianListByNurseryId(context.Context, *GetGuardianListByNurseryIdRequest) (*GetGuardianListByNurseryIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGuardianListByNurseryId not implemented") } +func (UnimplementedGuardianServiceServer) UpdateGuardian(context.Context, *UpdateGuardianRequest) (*UpdateGuardianResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGuardian not implemented") +} // UnsafeGuardianServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GuardianServiceServer will @@ -222,6 +237,24 @@ func _GuardianService_GetGuardianListByNurseryId_Handler(srv interface{}, ctx co return interceptor(ctx, in, info, handler) } +func _GuardianService_UpdateGuardian_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGuardianRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuardianServiceServer).UpdateGuardian(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GuardianService_UpdateGuardian_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuardianServiceServer).UpdateGuardian(ctx, req.(*UpdateGuardianRequest)) + } + return interceptor(ctx, in, info, handler) +} + // GuardianService_ServiceDesc is the grpc.ServiceDesc for GuardianService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -249,6 +282,10 @@ var GuardianService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetGuardianListByNurseryId", Handler: _GuardianService_GetGuardianListByNurseryId_Handler, }, + { + MethodName: "UpdateGuardian", + Handler: _GuardianService_UpdateGuardian_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/guardian.proto", diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index fa37aebf..e566585d 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -16,6 +16,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" boardingRecordRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childBusAssociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" childPhotoRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" @@ -353,6 +354,81 @@ func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildLi }, nil } +func (i *Interactor) UpdateChild(ctx context.Context, req *pb.UpdateChildRequest) (*pb.UpdateChildResponse, error) { + // child_idのパース + childID, err := uuid.Parse(req.ChildId) + if err != nil { + i.logger.Error("failed to parse child ID", "error", err) + return nil, err + } + + // トランザクションの開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + i.logger.Error("failed to start transaction", "error", err) + return nil, err + } + defer utils.RollbackTx(tx, i.logger) + + // 更新処理のビルダー + update := tx.Child.Update().Where(child.IDEQ(childID)) + for _, path := range req.UpdateMask.Paths { + switch path { + case "name": + update.SetName(req.Name) + case "age": + update.SetAge(int(req.Age)) + case "sex": + sex, err := utils.ConvertPbSexToEntSex(req.Sex) // 仮に性別変換用の関数を想定 + if err != nil { + i.logger.Error("failed to convert sex", "error", err) + return nil, err + } + update.SetSex(*sex) + case "check_for_missing_items": + update.SetCheckForMissingItems(req.CheckForMissingItems) + case "has_bag": + update.SetHasBag(req.HasBag) + case "has_lunch_box": + update.SetHasLunchBox(req.HasLunchBox) + case "has_water_bottle": + update.SetHasWaterBottle(req.HasWaterBottle) + case "has_umbrella": + update.SetHasUmbrella(req.HasUmbrella) + case "has_other": + update.SetHasOther(req.HasOther) + } + } + + // 更新の実行 + _, err = update.Save(ctx) + if err != nil { + i.logger.Error("failed to update child", "error", err) + return nil, err + } + + // 更新されたエンティティの取得 + updatedChild, err := tx.Child.Query(). + Where(child.IDEQ(childID)). + WithGuardian(). + Only(ctx) + if err != nil { + i.logger.Error("failed to retrieve updated child", "error", err) + return nil, err + } + + // トランザクションのコミット + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + + // レスポンスの生成と返却 + return &pb.UpdateChildResponse{ + Child: utils.ToPbChild(updatedChild), // 仮にエンティティをProtobufメッセージに変換する関数を想定 + }, nil +} + // getChildList abstracts the common logic for fetching child lists. func (i *Interactor) getChildList(ctx context.Context, queryFunc func(*ent.Tx) (*ent.ChildQuery, error)) ([]*pb.Child, error) { tx, err := i.entClient.Tx(ctx) diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 39502d7d..6da63183 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -8,6 +8,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" @@ -248,3 +249,62 @@ func (i *Interactor) GetGuardianListByNurseryID(ctx context.Context, req *pb.Get return &pb.GetGuardianListByNurseryIdResponse{Guardians: pbGuardians}, nil } + +func (i *Interactor) UpdateGuardian(ctx context.Context, req *pb.UpdateGuardianRequest) (*pb.UpdateGuardianResponse, error) { + guardianID, err := uuid.Parse(req.GuardianId) + if err != nil { + i.logger.Error("failed to parse guardian ID", "error", err) + return nil, err + } + + tx, err := i.entClient.Tx(ctx) + if err != nil { + i.logger.Error("failed to start transaction", "error", err) + return nil, err + } + defer utils.RollbackTx(tx, i.logger) + + // 更新処理のビルダー + update := tx.Guardian.UpdateOneID(guardianID) + + // FieldMaskの解析とフィールドの更新 + for _, path := range req.UpdateMask.Paths { + switch path { + case "name": + update.SetName(req.Name) + case "email": + update.SetEmail(req.Email) + case "phone_number": + update.SetPhoneNumber(req.PhoneNumber) + case "is_use_morning_bus": + update.SetIsUseMorningBus(req.IsUseMorningBus) + case "is_use_evening_bus": + update.SetIsUseEveningBus(req.IsUseEveningBus) + } + } + + // 更新の実行 + _, err = update.Save(ctx) + if err != nil { + i.logger.Error("failed to update guardian", "error", err) + return nil, err + } + + // 更新されたエンティティの取得 + guardian, err := tx.Guardian.Query().Where(guardian.IDEQ(guardianID)).WithNursery().Only(ctx) + if err != nil { + i.logger.Error("failed to get guardian", "error", err) + return nil, err + } + + // トランザクションのコミット + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + + // レスポンスの生成と返却 + return &pb.UpdateGuardianResponse{ + Guardian: utils.ToPbGuardianResponse(guardian), // 仮にエンティティをProtobufメッセージに変換する関数を想定 + }, nil +} diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart index d318b78d..2a5941a6 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -13,6 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +import '../../google/protobuf/field_mask.pb.dart' as $9; import 'resources.pb.dart' as $8; import 'resources.pbenum.dart' as $8; @@ -588,6 +589,250 @@ class CheckIsChildInBusResponse extends $pb.GeneratedMessage { void clearIsInBus() => clearField(1); } +class UpdateChildRequest extends $pb.GeneratedMessage { + factory UpdateChildRequest({ + $core.String? childId, + $core.String? name, + $core.int? age, + $8.Sex? sex, + $core.bool? checkForMissingItems, + $core.bool? hasBag, + $core.bool? hasLunchBox, + $core.bool? hasWaterBottle, + $core.bool? hasUmbrella, + $core.bool? hasOther, + $9.FieldMask? updateMask, + }) { + final $result = create(); + if (childId != null) { + $result.childId = childId; + } + if (name != null) { + $result.name = name; + } + if (age != null) { + $result.age = age; + } + if (sex != null) { + $result.sex = sex; + } + if (checkForMissingItems != null) { + $result.checkForMissingItems = checkForMissingItems; + } + if (hasBag != null) { + $result.hasBag = hasBag; + } + if (hasLunchBox != null) { + $result.hasLunchBox = hasLunchBox; + } + if (hasWaterBottle != null) { + $result.hasWaterBottle = hasWaterBottle; + } + if (hasUmbrella != null) { + $result.hasUmbrella = hasUmbrella; + } + if (hasOther != null) { + $result.hasOther = hasOther; + } + if (updateMask != null) { + $result.updateMask = updateMask; + } + return $result; + } + UpdateChildRequest._() : super(); + factory UpdateChildRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateChildRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateChildRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'childId') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..a<$core.int>(3, _omitFieldNames ? '' : 'age', $pb.PbFieldType.O3) + ..e<$8.Sex>(4, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: $8.Sex.SEX_UNSPECIFIED, valueOf: $8.Sex.valueOf, enumValues: $8.Sex.values) + ..aOB(5, _omitFieldNames ? '' : 'checkForMissingItems') + ..aOB(6, _omitFieldNames ? '' : 'hasBag') + ..aOB(7, _omitFieldNames ? '' : 'hasLunchBox') + ..aOB(8, _omitFieldNames ? '' : 'hasWaterBottle') + ..aOB(9, _omitFieldNames ? '' : 'hasUmbrella') + ..aOB(10, _omitFieldNames ? '' : 'hasOther') + ..aOM<$9.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateChildRequest clone() => UpdateChildRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateChildRequest copyWith(void Function(UpdateChildRequest) updates) => super.copyWith((message) => updates(message as UpdateChildRequest)) as UpdateChildRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateChildRequest create() => UpdateChildRequest._(); + UpdateChildRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateChildRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateChildRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get childId => $_getSZ(0); + @$pb.TagNumber(1) + set childId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasChildId() => $_has(0); + @$pb.TagNumber(1) + void clearChildId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.int get age => $_getIZ(2); + @$pb.TagNumber(3) + set age($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasAge() => $_has(2); + @$pb.TagNumber(3) + void clearAge() => clearField(3); + + @$pb.TagNumber(4) + $8.Sex get sex => $_getN(3); + @$pb.TagNumber(4) + set sex($8.Sex v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasSex() => $_has(3); + @$pb.TagNumber(4) + void clearSex() => clearField(4); + + @$pb.TagNumber(5) + $core.bool get checkForMissingItems => $_getBF(4); + @$pb.TagNumber(5) + set checkForMissingItems($core.bool v) { $_setBool(4, v); } + @$pb.TagNumber(5) + $core.bool hasCheckForMissingItems() => $_has(4); + @$pb.TagNumber(5) + void clearCheckForMissingItems() => clearField(5); + + @$pb.TagNumber(6) + $core.bool get hasBag => $_getBF(5); + @$pb.TagNumber(6) + set hasBag($core.bool v) { $_setBool(5, v); } + @$pb.TagNumber(6) + $core.bool hasHasBag() => $_has(5); + @$pb.TagNumber(6) + void clearHasBag() => clearField(6); + + @$pb.TagNumber(7) + $core.bool get hasLunchBox => $_getBF(6); + @$pb.TagNumber(7) + set hasLunchBox($core.bool v) { $_setBool(6, v); } + @$pb.TagNumber(7) + $core.bool hasHasLunchBox() => $_has(6); + @$pb.TagNumber(7) + void clearHasLunchBox() => clearField(7); + + @$pb.TagNumber(8) + $core.bool get hasWaterBottle => $_getBF(7); + @$pb.TagNumber(8) + set hasWaterBottle($core.bool v) { $_setBool(7, v); } + @$pb.TagNumber(8) + $core.bool hasHasWaterBottle() => $_has(7); + @$pb.TagNumber(8) + void clearHasWaterBottle() => clearField(8); + + @$pb.TagNumber(9) + $core.bool get hasUmbrella => $_getBF(8); + @$pb.TagNumber(9) + set hasUmbrella($core.bool v) { $_setBool(8, v); } + @$pb.TagNumber(9) + $core.bool hasHasUmbrella() => $_has(8); + @$pb.TagNumber(9) + void clearHasUmbrella() => clearField(9); + + @$pb.TagNumber(10) + $core.bool get hasOther => $_getBF(9); + @$pb.TagNumber(10) + set hasOther($core.bool v) { $_setBool(9, v); } + @$pb.TagNumber(10) + $core.bool hasHasOther() => $_has(9); + @$pb.TagNumber(10) + void clearHasOther() => clearField(10); + + @$pb.TagNumber(11) + $9.FieldMask get updateMask => $_getN(10); + @$pb.TagNumber(11) + set updateMask($9.FieldMask v) { setField(11, v); } + @$pb.TagNumber(11) + $core.bool hasUpdateMask() => $_has(10); + @$pb.TagNumber(11) + void clearUpdateMask() => clearField(11); + @$pb.TagNumber(11) + $9.FieldMask ensureUpdateMask() => $_ensure(10); +} + +class UpdateChildResponse extends $pb.GeneratedMessage { + factory UpdateChildResponse({ + $8.Child? child, + }) { + final $result = create(); + if (child != null) { + $result.child = child; + } + return $result; + } + UpdateChildResponse._() : super(); + factory UpdateChildResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateChildResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateChildResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.Child>(1, _omitFieldNames ? '' : 'child', subBuilder: $8.Child.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateChildResponse clone() => UpdateChildResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateChildResponse copyWith(void Function(UpdateChildResponse) updates) => super.copyWith((message) => updates(message as UpdateChildResponse)) as UpdateChildResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateChildResponse create() => UpdateChildResponse._(); + UpdateChildResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateChildResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateChildResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.Child get child => $_getN(0); + @$pb.TagNumber(1) + set child($8.Child v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasChild() => $_has(0); + @$pb.TagNumber(1) + void clearChild() => clearField(1); + @$pb.TagNumber(1) + $8.Child ensureChild() => $_ensure(0); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart index b0d63ed1..b6c9699a 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart @@ -41,6 +41,10 @@ class ChildServiceClient extends $grpc.Client { '/where_child_bus.v1.ChildService/CheckIsChildInBus', ($1.CheckIsChildInBusRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $1.CheckIsChildInBusResponse.fromBuffer(value)); + static final _$updateChild = $grpc.ClientMethod<$1.UpdateChildRequest, $1.UpdateChildResponse>( + '/where_child_bus.v1.ChildService/UpdateChild', + ($1.UpdateChildRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.UpdateChildResponse.fromBuffer(value)); ChildServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -67,6 +71,10 @@ class ChildServiceClient extends $grpc.Client { $grpc.ResponseFuture<$1.CheckIsChildInBusResponse> checkIsChildInBus($1.CheckIsChildInBusRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$checkIsChildInBus, request, options: options); } + + $grpc.ResponseFuture<$1.UpdateChildResponse> updateChild($1.UpdateChildRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$updateChild, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.ChildService') @@ -109,6 +117,13 @@ abstract class ChildServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $1.CheckIsChildInBusRequest.fromBuffer(value), ($1.CheckIsChildInBusResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.UpdateChildRequest, $1.UpdateChildResponse>( + 'UpdateChild', + updateChild_Pre, + false, + false, + ($core.List<$core.int> value) => $1.UpdateChildRequest.fromBuffer(value), + ($1.UpdateChildResponse value) => value.writeToBuffer())); } $async.Future<$1.CreateChildResponse> createChild_Pre($grpc.ServiceCall call, $async.Future<$1.CreateChildRequest> request) async { @@ -131,9 +146,14 @@ abstract class ChildServiceBase extends $grpc.Service { return checkIsChildInBus(call, await request); } + $async.Future<$1.UpdateChildResponse> updateChild_Pre($grpc.ServiceCall call, $async.Future<$1.UpdateChildRequest> request) async { + return updateChild(call, await request); + } + $async.Future<$1.CreateChildResponse> createChild($grpc.ServiceCall call, $1.CreateChildRequest request); $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($grpc.ServiceCall call, $1.GetChildListByGuardianIDRequest request); $async.Future<$1.GetChildListByBusIDResponse> getChildListByBusID($grpc.ServiceCall call, $1.GetChildListByBusIDRequest request); $async.Future<$1.CheckIsChildInBusResponse> checkIsChildInBus($grpc.ServiceCall call, $1.CheckIsChildInBusRequest request); + $async.Future<$1.UpdateChildResponse> updateChild($grpc.ServiceCall call, $1.UpdateChildRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart index 23f23a32..54ce6a39 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbjson.dart @@ -154,3 +154,45 @@ final $typed_data.Uint8List checkIsChildInBusResponseDescriptor = $convert.base6 'ChlDaGVja0lzQ2hpbGRJbkJ1c1Jlc3BvbnNlEhoKCWlzX2luX2J1cxgBIAEoCFIHaXNJbkJ1cw' '=='); +@$core.Deprecated('Use updateChildRequestDescriptor instead') +const UpdateChildRequest$json = { + '1': 'UpdateChildRequest', + '2': [ + {'1': 'child_id', '3': 1, '4': 1, '5': 9, '10': 'childId'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'age', '3': 3, '4': 1, '5': 5, '10': 'age'}, + {'1': 'sex', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.Sex', '10': 'sex'}, + {'1': 'check_for_missing_items', '3': 5, '4': 1, '5': 8, '10': 'checkForMissingItems'}, + {'1': 'has_bag', '3': 6, '4': 1, '5': 8, '10': 'hasBag'}, + {'1': 'has_lunch_box', '3': 7, '4': 1, '5': 8, '10': 'hasLunchBox'}, + {'1': 'has_water_bottle', '3': 8, '4': 1, '5': 8, '10': 'hasWaterBottle'}, + {'1': 'has_umbrella', '3': 9, '4': 1, '5': 8, '10': 'hasUmbrella'}, + {'1': 'has_other', '3': 10, '4': 1, '5': 8, '10': 'hasOther'}, + {'1': 'update_mask', '3': 11, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, + ], +}; + +/// Descriptor for `UpdateChildRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateChildRequestDescriptor = $convert.base64Decode( + 'ChJVcGRhdGVDaGlsZFJlcXVlc3QSGQoIY2hpbGRfaWQYASABKAlSB2NoaWxkSWQSEgoEbmFtZR' + 'gCIAEoCVIEbmFtZRIQCgNhZ2UYAyABKAVSA2FnZRIpCgNzZXgYBCABKA4yFy53aGVyZV9jaGls' + 'ZF9idXMudjEuU2V4UgNzZXgSNQoXY2hlY2tfZm9yX21pc3NpbmdfaXRlbXMYBSABKAhSFGNoZW' + 'NrRm9yTWlzc2luZ0l0ZW1zEhcKB2hhc19iYWcYBiABKAhSBmhhc0JhZxIiCg1oYXNfbHVuY2hf' + 'Ym94GAcgASgIUgtoYXNMdW5jaEJveBIoChBoYXNfd2F0ZXJfYm90dGxlGAggASgIUg5oYXNXYX' + 'RlckJvdHRsZRIhCgxoYXNfdW1icmVsbGEYCSABKAhSC2hhc1VtYnJlbGxhEhsKCWhhc19vdGhl' + 'chgKIAEoCFIIaGFzT3RoZXISOwoLdXBkYXRlX21hc2sYCyABKAsyGi5nb29nbGUucHJvdG9idW' + 'YuRmllbGRNYXNrUgp1cGRhdGVNYXNr'); + +@$core.Deprecated('Use updateChildResponseDescriptor instead') +const UpdateChildResponse$json = { + '1': 'UpdateChildResponse', + '2': [ + {'1': 'child', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Child', '10': 'child'}, + ], +}; + +/// Descriptor for `UpdateChildResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateChildResponseDescriptor = $convert.base64Decode( + 'ChNVcGRhdGVDaGlsZFJlc3BvbnNlEi8KBWNoaWxkGAEgASgLMhkud2hlcmVfY2hpbGRfYnVzLn' + 'YxLkNoaWxkUgVjaGlsZA=='); + diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 4785e75f..8e2d960d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -13,6 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +import '../../google/protobuf/field_mask.pb.dart' as $9; import 'resources.pb.dart' as $8; class CreateGuardianRequest extends $pb.GeneratedMessage { @@ -609,6 +610,194 @@ class GetGuardianListByNurseryIdResponse extends $pb.GeneratedMessage { $core.List<$8.GuardianResponse> get guardians => $_getList(0); } +class UpdateGuardianRequest extends $pb.GeneratedMessage { + factory UpdateGuardianRequest({ + $core.String? guardianId, + $core.String? name, + $core.String? email, + $core.String? phoneNumber, + $core.bool? isUseMorningBus, + $core.bool? isUseEveningBus, + $9.FieldMask? updateMask, + }) { + final $result = create(); + if (guardianId != null) { + $result.guardianId = guardianId; + } + if (name != null) { + $result.name = name; + } + if (email != null) { + $result.email = email; + } + if (phoneNumber != null) { + $result.phoneNumber = phoneNumber; + } + if (isUseMorningBus != null) { + $result.isUseMorningBus = isUseMorningBus; + } + if (isUseEveningBus != null) { + $result.isUseEveningBus = isUseEveningBus; + } + if (updateMask != null) { + $result.updateMask = updateMask; + } + return $result; + } + UpdateGuardianRequest._() : super(); + factory UpdateGuardianRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateGuardianRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateGuardianRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'guardianId') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..aOS(3, _omitFieldNames ? '' : 'email') + ..aOS(4, _omitFieldNames ? '' : 'phoneNumber') + ..aOB(5, _omitFieldNames ? '' : 'isUseMorningBus') + ..aOB(6, _omitFieldNames ? '' : 'isUseEveningBus') + ..aOM<$9.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateGuardianRequest clone() => UpdateGuardianRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateGuardianRequest copyWith(void Function(UpdateGuardianRequest) updates) => super.copyWith((message) => updates(message as UpdateGuardianRequest)) as UpdateGuardianRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateGuardianRequest create() => UpdateGuardianRequest._(); + UpdateGuardianRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateGuardianRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateGuardianRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get guardianId => $_getSZ(0); + @$pb.TagNumber(1) + set guardianId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasGuardianId() => $_has(0); + @$pb.TagNumber(1) + void clearGuardianId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get email => $_getSZ(2); + @$pb.TagNumber(3) + set email($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasEmail() => $_has(2); + @$pb.TagNumber(3) + void clearEmail() => clearField(3); + + @$pb.TagNumber(4) + $core.String get phoneNumber => $_getSZ(3); + @$pb.TagNumber(4) + set phoneNumber($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPhoneNumber() => $_has(3); + @$pb.TagNumber(4) + void clearPhoneNumber() => clearField(4); + + @$pb.TagNumber(5) + $core.bool get isUseMorningBus => $_getBF(4); + @$pb.TagNumber(5) + set isUseMorningBus($core.bool v) { $_setBool(4, v); } + @$pb.TagNumber(5) + $core.bool hasIsUseMorningBus() => $_has(4); + @$pb.TagNumber(5) + void clearIsUseMorningBus() => clearField(5); + + @$pb.TagNumber(6) + $core.bool get isUseEveningBus => $_getBF(5); + @$pb.TagNumber(6) + set isUseEveningBus($core.bool v) { $_setBool(5, v); } + @$pb.TagNumber(6) + $core.bool hasIsUseEveningBus() => $_has(5); + @$pb.TagNumber(6) + void clearIsUseEveningBus() => clearField(6); + + @$pb.TagNumber(11) + $9.FieldMask get updateMask => $_getN(6); + @$pb.TagNumber(11) + set updateMask($9.FieldMask v) { setField(11, v); } + @$pb.TagNumber(11) + $core.bool hasUpdateMask() => $_has(6); + @$pb.TagNumber(11) + void clearUpdateMask() => clearField(11); + @$pb.TagNumber(11) + $9.FieldMask ensureUpdateMask() => $_ensure(6); +} + +class UpdateGuardianResponse extends $pb.GeneratedMessage { + factory UpdateGuardianResponse({ + $8.GuardianResponse? guardian, + }) { + final $result = create(); + if (guardian != null) { + $result.guardian = guardian; + } + return $result; + } + UpdateGuardianResponse._() : super(); + factory UpdateGuardianResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateGuardianResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateGuardianResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateGuardianResponse clone() => UpdateGuardianResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateGuardianResponse copyWith(void Function(UpdateGuardianResponse) updates) => super.copyWith((message) => updates(message as UpdateGuardianResponse)) as UpdateGuardianResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateGuardianResponse create() => UpdateGuardianResponse._(); + UpdateGuardianResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateGuardianResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateGuardianResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.GuardianResponse get guardian => $_getN(0); + @$pb.TagNumber(1) + set guardian($8.GuardianResponse v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasGuardian() => $_has(0); + @$pb.TagNumber(1) + void clearGuardian() => clearField(1); + @$pb.TagNumber(1) + $8.GuardianResponse ensureGuardian() => $_ensure(0); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart index 14bf2ff9..9601fae9 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart @@ -41,6 +41,10 @@ class GuardianServiceClient extends $grpc.Client { '/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId', ($3.GetGuardianListByNurseryIdRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $3.GetGuardianListByNurseryIdResponse.fromBuffer(value)); + static final _$updateGuardian = $grpc.ClientMethod<$3.UpdateGuardianRequest, $3.UpdateGuardianResponse>( + '/where_child_bus.v1.GuardianService/UpdateGuardian', + ($3.UpdateGuardianRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.UpdateGuardianResponse.fromBuffer(value)); GuardianServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -67,6 +71,10 @@ class GuardianServiceClient extends $grpc.Client { $grpc.ResponseFuture<$3.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId($3.GetGuardianListByNurseryIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getGuardianListByNurseryId, request, options: options); } + + $grpc.ResponseFuture<$3.UpdateGuardianResponse> updateGuardian($3.UpdateGuardianRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$updateGuardian, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.GuardianService') @@ -109,6 +117,13 @@ abstract class GuardianServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $3.GetGuardianListByNurseryIdRequest.fromBuffer(value), ($3.GetGuardianListByNurseryIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$3.UpdateGuardianRequest, $3.UpdateGuardianResponse>( + 'UpdateGuardian', + updateGuardian_Pre, + false, + false, + ($core.List<$core.int> value) => $3.UpdateGuardianRequest.fromBuffer(value), + ($3.UpdateGuardianResponse value) => value.writeToBuffer())); } $async.Future<$3.CreateGuardianResponse> createGuardian_Pre($grpc.ServiceCall call, $async.Future<$3.CreateGuardianRequest> request) async { @@ -131,9 +146,14 @@ abstract class GuardianServiceBase extends $grpc.Service { return getGuardianListByNurseryId(call, await request); } + $async.Future<$3.UpdateGuardianResponse> updateGuardian_Pre($grpc.ServiceCall call, $async.Future<$3.UpdateGuardianRequest> request) async { + return updateGuardian(call, await request); + } + $async.Future<$3.CreateGuardianResponse> createGuardian($grpc.ServiceCall call, $3.CreateGuardianRequest request); $async.Future<$3.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $3.GuardianLoginRequest request); $async.Future<$3.GetGuardianListByBusIdResponse> getGuardianListByBusId($grpc.ServiceCall call, $3.GetGuardianListByBusIdRequest request); $async.Future<$3.GetGuardianByChildIdResponse> getGuardianByChildId($grpc.ServiceCall call, $3.GetGuardianByChildIdRequest request); $async.Future<$3.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId($grpc.ServiceCall call, $3.GetGuardianListByNurseryIdRequest request); + $async.Future<$3.UpdateGuardianResponse> updateGuardian($grpc.ServiceCall call, $3.UpdateGuardianRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart index ede2bf70..7a56eb62 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbjson.dart @@ -152,3 +152,39 @@ final $typed_data.Uint8List getGuardianListByNurseryIdResponseDescriptor = $conv 'CiJHZXRHdWFyZGlhbkxpc3RCeU51cnNlcnlJZFJlc3BvbnNlEkIKCWd1YXJkaWFucxgBIAMoCz' 'IkLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhblJlc3BvbnNlUglndWFyZGlhbnM='); +@$core.Deprecated('Use updateGuardianRequestDescriptor instead') +const UpdateGuardianRequest$json = { + '1': 'UpdateGuardianRequest', + '2': [ + {'1': 'guardian_id', '3': 1, '4': 1, '5': 9, '10': 'guardianId'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'email', '3': 3, '4': 1, '5': 9, '10': 'email'}, + {'1': 'phone_number', '3': 4, '4': 1, '5': 9, '10': 'phoneNumber'}, + {'1': 'is_use_morning_bus', '3': 5, '4': 1, '5': 8, '10': 'isUseMorningBus'}, + {'1': 'is_use_evening_bus', '3': 6, '4': 1, '5': 8, '10': 'isUseEveningBus'}, + {'1': 'update_mask', '3': 11, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, + ], +}; + +/// Descriptor for `UpdateGuardianRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateGuardianRequestDescriptor = $convert.base64Decode( + 'ChVVcGRhdGVHdWFyZGlhblJlcXVlc3QSHwoLZ3VhcmRpYW5faWQYASABKAlSCmd1YXJkaWFuSW' + 'QSEgoEbmFtZRgCIAEoCVIEbmFtZRIUCgVlbWFpbBgDIAEoCVIFZW1haWwSIQoMcGhvbmVfbnVt' + 'YmVyGAQgASgJUgtwaG9uZU51bWJlchIrChJpc191c2VfbW9ybmluZ19idXMYBSABKAhSD2lzVX' + 'NlTW9ybmluZ0J1cxIrChJpc191c2VfZXZlbmluZ19idXMYBiABKAhSD2lzVXNlRXZlbmluZ0J1' + 'cxI7Cgt1cGRhdGVfbWFzaxgLIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tSCnVwZG' + 'F0ZU1hc2s='); + +@$core.Deprecated('Use updateGuardianResponseDescriptor instead') +const UpdateGuardianResponse$json = { + '1': 'UpdateGuardianResponse', + '2': [ + {'1': 'guardian', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.GuardianResponse', '10': 'guardian'}, + ], +}; + +/// Descriptor for `UpdateGuardianResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateGuardianResponseDescriptor = $convert.base64Decode( + 'ChZVcGRhdGVHdWFyZGlhblJlc3BvbnNlEkAKCGd1YXJkaWFuGAEgASgLMiQud2hlcmVfY2hpbG' + 'RfYnVzLnYxLkd1YXJkaWFuUmVzcG9uc2VSCGd1YXJkaWFu'); + diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2.py b/machine_learning/src/generated/where_child_bus/v1/child_pb2.py index 7b232590..febe4511 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2.py @@ -13,9 +13,10 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"5\n\x18\x43heckIsChildInBusRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"7\n\x19\x43heckIsChildInBusResponse\x12\x1a\n\tis_in_bus\x18\x01 \x01(\x08R\x07isInBus2\xe5\x04\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponse\x12p\n\x11\x43heckIsChildInBus\x12,.where_child_bus.v1.CheckIsChildInBusRequest\x1a-.where_child_bus.v1.CheckIsChildInBusResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"5\n\x18\x43heckIsChildInBusRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"7\n\x19\x43heckIsChildInBusResponse\x12\x1a\n\tis_in_bus\x18\x01 \x01(\x08R\x07isInBus\"\x9b\x03\n\x12UpdateChildRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x03 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x04 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x05 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x06 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x07 \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x08 \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\t \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\n \x01(\x08R\x08hasOther\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"F\n\x13UpdateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild2\xc5\x05\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponse\x12p\n\x11\x43heckIsChildInBus\x12,.where_child_bus.v1.CheckIsChildInBusRequest\x1a-.where_child_bus.v1.CheckIsChildInBusResponse\x12^\n\x0bUpdateChild\x12&.where_child_bus.v1.UpdateChildRequest\x1a\'.where_child_bus.v1.UpdateChildResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,26 +24,30 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\nChildProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATECHILDREQUEST']._serialized_start=91 - _globals['_CREATECHILDREQUEST']._serialized_end=280 - _globals['_CREATECHILDRESPONSE']._serialized_start=282 - _globals['_CREATECHILDRESPONSE']._serialized_end=352 - _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=354 - _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=417 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=420 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=564 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=566 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=632 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=635 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=780 - _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=782 - _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=833 - _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=836 - _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=976 - _globals['_CHECKISCHILDINBUSREQUEST']._serialized_start=978 - _globals['_CHECKISCHILDINBUSREQUEST']._serialized_end=1031 - _globals['_CHECKISCHILDINBUSRESPONSE']._serialized_start=1033 - _globals['_CHECKISCHILDINBUSRESPONSE']._serialized_end=1088 - _globals['_CHILDSERVICE']._serialized_start=1091 - _globals['_CHILDSERVICE']._serialized_end=1704 + _globals['_CREATECHILDREQUEST']._serialized_start=125 + _globals['_CREATECHILDREQUEST']._serialized_end=314 + _globals['_CREATECHILDRESPONSE']._serialized_start=316 + _globals['_CREATECHILDRESPONSE']._serialized_end=386 + _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=388 + _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=451 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=454 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=598 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=600 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=666 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=669 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=814 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=816 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=867 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=870 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=1010 + _globals['_CHECKISCHILDINBUSREQUEST']._serialized_start=1012 + _globals['_CHECKISCHILDINBUSREQUEST']._serialized_end=1065 + _globals['_CHECKISCHILDINBUSRESPONSE']._serialized_start=1067 + _globals['_CHECKISCHILDINBUSRESPONSE']._serialized_end=1122 + _globals['_UPDATECHILDREQUEST']._serialized_start=1125 + _globals['_UPDATECHILDREQUEST']._serialized_end=1536 + _globals['_UPDATECHILDRESPONSE']._serialized_start=1538 + _globals['_UPDATECHILDRESPONSE']._serialized_end=1608 + _globals['_CHILDSERVICE']._serialized_start=1611 + _globals['_CHILDSERVICE']._serialized_end=2320 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi index ae65323f..affd722c 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi @@ -1,4 +1,5 @@ from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import field_mask_pb2 as _field_mask_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -81,3 +82,35 @@ class CheckIsChildInBusResponse(_message.Message): IS_IN_BUS_FIELD_NUMBER: _ClassVar[int] is_in_bus: bool def __init__(self, is_in_bus: bool = ...) -> None: ... + +class UpdateChildRequest(_message.Message): + __slots__ = ("child_id", "name", "age", "sex", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "update_mask") + CHILD_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + AGE_FIELD_NUMBER: _ClassVar[int] + SEX_FIELD_NUMBER: _ClassVar[int] + CHECK_FOR_MISSING_ITEMS_FIELD_NUMBER: _ClassVar[int] + HAS_BAG_FIELD_NUMBER: _ClassVar[int] + HAS_LUNCH_BOX_FIELD_NUMBER: _ClassVar[int] + HAS_WATER_BOTTLE_FIELD_NUMBER: _ClassVar[int] + HAS_UMBRELLA_FIELD_NUMBER: _ClassVar[int] + HAS_OTHER_FIELD_NUMBER: _ClassVar[int] + UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] + child_id: str + name: str + age: int + sex: _resources_pb2.Sex + check_for_missing_items: bool + has_bag: bool + has_lunch_box: bool + has_water_bottle: bool + has_umbrella: bool + has_other: bool + update_mask: _field_mask_pb2.FieldMask + def __init__(self, child_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[_resources_pb2.Sex, str]] = ..., check_for_missing_items: bool = ..., has_bag: bool = ..., has_lunch_box: bool = ..., has_water_bottle: bool = ..., has_umbrella: bool = ..., has_other: bool = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + +class UpdateChildResponse(_message.Message): + __slots__ = ("child",) + CHILD_FIELD_NUMBER: _ClassVar[int] + child: _resources_pb2.Child + def __init__(self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py index 0a31aeb9..d46ec0d9 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py @@ -39,6 +39,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.FromString, ) + self.UpdateChild = channel.unary_unary( + '/where_child_bus.v1.ChildService/UpdateChild', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.FromString, + ) class ChildServiceServicer(object): @@ -74,6 +79,12 @@ def CheckIsChildInBus(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def UpdateChild(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_ChildServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -102,6 +113,11 @@ def add_ChildServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.SerializeToString, ), + 'UpdateChild': grpc.unary_unary_rpc_method_handler( + servicer.UpdateChild, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.ChildService', rpc_method_handlers) @@ -196,3 +212,20 @@ def CheckIsChildInBus(request, where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateChild(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/UpdateChild', + where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.SerializeToString, + where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py index 587538d5..ac939a62 100644 --- a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py @@ -13,9 +13,10 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"B\n!GetGuardianListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"h\n\"GetGuardianListByNurseryIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians2\xea\x04\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponse\x12y\n\x14GetGuardianByChildId\x12/.where_child_bus.v1.GetGuardianByChildIdRequest\x1a\x30.where_child_bus.v1.GetGuardianByChildIdResponse\x12\x8b\x01\n\x1aGetGuardianListByNurseryId\x12\x35.where_child_bus.v1.GetGuardianListByNurseryIdRequest\x1a\x36.where_child_bus.v1.GetGuardianListByNurseryIdResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"B\n!GetGuardianListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"h\n\"GetGuardianListByNurseryIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"\x9c\x02\n\x15UpdateGuardianRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x03 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x05 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x06 \x01(\x08R\x0fisUseEveningBus\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"Z\n\x16UpdateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian2\xd3\x05\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponse\x12y\n\x14GetGuardianByChildId\x12/.where_child_bus.v1.GetGuardianByChildIdRequest\x1a\x30.where_child_bus.v1.GetGuardianByChildIdResponse\x12\x8b\x01\n\x1aGetGuardianListByNurseryId\x12\x35.where_child_bus.v1.GetGuardianListByNurseryIdRequest\x1a\x36.where_child_bus.v1.GetGuardianListByNurseryIdResponse\x12g\n\x0eUpdateGuardian\x12).where_child_bus.v1.UpdateGuardianRequest\x1a*.where_child_bus.v1.UpdateGuardianResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,26 +24,30 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\rGuardianProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATEGUARDIANREQUEST']._serialized_start=94 - _globals['_CREATEGUARDIANREQUEST']._serialized_end=257 - _globals['_CREATEGUARDIANRESPONSE']._serialized_start=259 - _globals['_CREATEGUARDIANRESPONSE']._serialized_end=349 - _globals['_GUARDIANLOGINREQUEST']._serialized_start=351 - _globals['_GUARDIANLOGINREQUEST']._serialized_end=423 - _globals['_GUARDIANLOGINRESPONSE']._serialized_start=426 - _globals['_GUARDIANLOGINRESPONSE']._serialized_end=604 - _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_start=606 - _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_end=660 - _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_start=662 - _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_end=762 - _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_start=764 - _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_end=820 - _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_start=822 - _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_end=918 - _globals['_GETGUARDIANLISTBYNURSERYIDREQUEST']._serialized_start=920 - _globals['_GETGUARDIANLISTBYNURSERYIDREQUEST']._serialized_end=986 - _globals['_GETGUARDIANLISTBYNURSERYIDRESPONSE']._serialized_start=988 - _globals['_GETGUARDIANLISTBYNURSERYIDRESPONSE']._serialized_end=1092 - _globals['_GUARDIANSERVICE']._serialized_start=1095 - _globals['_GUARDIANSERVICE']._serialized_end=1713 + _globals['_CREATEGUARDIANREQUEST']._serialized_start=128 + _globals['_CREATEGUARDIANREQUEST']._serialized_end=291 + _globals['_CREATEGUARDIANRESPONSE']._serialized_start=293 + _globals['_CREATEGUARDIANRESPONSE']._serialized_end=383 + _globals['_GUARDIANLOGINREQUEST']._serialized_start=385 + _globals['_GUARDIANLOGINREQUEST']._serialized_end=457 + _globals['_GUARDIANLOGINRESPONSE']._serialized_start=460 + _globals['_GUARDIANLOGINRESPONSE']._serialized_end=638 + _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_start=640 + _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_end=694 + _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_start=696 + _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_end=796 + _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_start=798 + _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_end=854 + _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_start=856 + _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_end=952 + _globals['_GETGUARDIANLISTBYNURSERYIDREQUEST']._serialized_start=954 + _globals['_GETGUARDIANLISTBYNURSERYIDREQUEST']._serialized_end=1020 + _globals['_GETGUARDIANLISTBYNURSERYIDRESPONSE']._serialized_start=1022 + _globals['_GETGUARDIANLISTBYNURSERYIDRESPONSE']._serialized_end=1126 + _globals['_UPDATEGUARDIANREQUEST']._serialized_start=1129 + _globals['_UPDATEGUARDIANREQUEST']._serialized_end=1413 + _globals['_UPDATEGUARDIANRESPONSE']._serialized_start=1415 + _globals['_UPDATEGUARDIANRESPONSE']._serialized_end=1505 + _globals['_GUARDIANSERVICE']._serialized_start=1508 + _globals['_GUARDIANSERVICE']._serialized_end=2231 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi index 29a256e1..5d451be4 100644 --- a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi @@ -1,4 +1,5 @@ from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import field_mask_pb2 as _field_mask_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -79,3 +80,27 @@ class GetGuardianListByNurseryIdResponse(_message.Message): GUARDIANS_FIELD_NUMBER: _ClassVar[int] guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] def __init__(self, guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... + +class UpdateGuardianRequest(_message.Message): + __slots__ = ("guardian_id", "name", "email", "phone_number", "is_use_morning_bus", "is_use_evening_bus", "update_mask") + GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + EMAIL_FIELD_NUMBER: _ClassVar[int] + PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + IS_USE_MORNING_BUS_FIELD_NUMBER: _ClassVar[int] + IS_USE_EVENING_BUS_FIELD_NUMBER: _ClassVar[int] + UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] + guardian_id: str + name: str + email: str + phone_number: str + is_use_morning_bus: bool + is_use_evening_bus: bool + update_mask: _field_mask_pb2.FieldMask + def __init__(self, guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + +class UpdateGuardianResponse(_message.Message): + __slots__ = ("guardian",) + GUARDIAN_FIELD_NUMBER: _ClassVar[int] + guardian: _resources_pb2.GuardianResponse + def __init__(self, guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py index 311d95dc..0de6966e 100644 --- a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py @@ -39,6 +39,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.FromString, ) + self.UpdateGuardian = channel.unary_unary( + '/where_child_bus.v1.GuardianService/UpdateGuardian', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.FromString, + ) class GuardianServiceServicer(object): @@ -74,6 +79,12 @@ def GetGuardianListByNurseryId(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def UpdateGuardian(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_GuardianServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -102,6 +113,11 @@ def add_GuardianServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.SerializeToString, ), + 'UpdateGuardian': grpc.unary_unary_rpc_method_handler( + servicer.UpdateGuardian, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.GuardianService', rpc_method_handlers) @@ -196,3 +212,20 @@ def GetGuardianListByNurseryId(request, where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateGuardian(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/UpdateGuardian', + where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.SerializeToString, + where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/child.proto b/proto/where_child_bus/v1/child.proto index cd2ae8b9..9665b390 100644 --- a/proto/where_child_bus/v1/child.proto +++ b/proto/where_child_bus/v1/child.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; +import "google/protobuf/field_mask.proto"; service ChildService { rpc CreateChild(CreateChildRequest) returns (CreateChildResponse); @@ -10,8 +11,10 @@ service ChildService { rpc GetChildListByGuardianID(GetChildListByGuardianIDRequest) returns (GetChildListByGuardianIDResponse); rpc GetChildListByBusID(GetChildListByBusIDRequest) returns (GetChildListByBusIDResponse); rpc CheckIsChildInBus(CheckIsChildInBusRequest) returns (CheckIsChildInBusResponse); + rpc UpdateChild(UpdateChildRequest) returns (UpdateChildResponse); } + message CreateChildRequest { string nursery_id = 1; string guardian_id = 2; @@ -59,3 +62,23 @@ message CheckIsChildInBusRequest { message CheckIsChildInBusResponse { bool is_in_bus = 1; } + +message UpdateChildRequest { + string child_id = 1; + string name = 2; + int32 age = 3; + Sex sex = 4; + bool check_for_missing_items = 5; + bool has_bag = 6; + bool has_lunch_box = 7; + bool has_water_bottle = 8; + bool has_umbrella = 9; + bool has_other = 10; + google.protobuf.FieldMask update_mask = 11; +} + + +message UpdateChildResponse { + Child child = 1; +} + diff --git a/proto/where_child_bus/v1/guardian.proto b/proto/where_child_bus/v1/guardian.proto index f4f0e61c..2fb4a3f0 100644 --- a/proto/where_child_bus/v1/guardian.proto +++ b/proto/where_child_bus/v1/guardian.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; +import "google/protobuf/field_mask.proto"; service GuardianService { rpc CreateGuardian(CreateGuardianRequest) returns (CreateGuardianResponse); @@ -10,6 +11,7 @@ service GuardianService { rpc GetGuardianListByBusId(GetGuardianListByBusIdRequest) returns (GetGuardianListByBusIdResponse); rpc GetGuardianByChildId(GetGuardianByChildIdRequest) returns (GetGuardianByChildIdResponse); rpc GetGuardianListByNurseryId(GetGuardianListByNurseryIdRequest) returns (GetGuardianListByNurseryIdResponse); + rpc UpdateGuardian(UpdateGuardianRequest) returns (UpdateGuardianResponse); } message CreateGuardianRequest { @@ -57,4 +59,18 @@ message GetGuardianListByNurseryIdRequest { message GetGuardianListByNurseryIdResponse { repeated GuardianResponse guardians = 1; -} \ No newline at end of file +} + +message UpdateGuardianRequest { + string guardian_id = 1; + string name = 2; + string email = 3; + string phone_number = 4; + bool is_use_morning_bus = 5; + bool is_use_evening_bus = 6; + google.protobuf.FieldMask update_mask = 11; +} + +message UpdateGuardianResponse { + GuardianResponse guardian = 1; +} From 015c779fd5842e65ab498474184b73bf44ecf0ce Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 13:11:22 +0900 Subject: [PATCH 525/771] =?UTF-8?q?fix:=20=E8=A4=87=E6=95=B0=E3=81=AE?= =?UTF-8?q?=E6=83=85=E5=A0=B1=E3=82=92secrets=E3=81=8B=E3=82=89=E5=8F=96?= =?UTF-8?q?=E5=BE=97=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-to-gcloud.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 711b654b..f206052d 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -16,16 +16,21 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: google-github-actions/auth@v2 + - name: Setup gcloud CLI + uses: google-github-actions/setup-gcloud@v2 with: project_id: ${{ secrets.GCP_PROJECT_ID }} - workload_identity_provider: "projects/484440918227/locations/global/workloadIdentityPools/github-action-pool/providers/github-action-provider" - service_account: "grpc-server-sa@wherechildbus.iam.gserviceaccount.com" + skip_install: false + version: ">= 363.0.0" - - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@v2 + + - name: Auth + uses: google-github-actions/auth@v2 with: - version: ">= 363.0.0" + workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} + service_account: ${{ secrets.SERVICE_ACCOUNT }} + access_token_lifetime: 1200s + - name: Configure Docker to use the gcloud command-line tool as a credential helper for the us region run: gcloud auth configure-docker us-docker.pkg.dev --quiet @@ -54,4 +59,4 @@ jobs: - name: Deploy to Cloud Run run: | - gcloud run deploy ${{ secrets.GCP_CLOUD_RUN_NAME }} --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_DOCKER_IMAGE_NAME }}:latest --platform=managed --allow-unauthenticated --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.GCP_REGION }} + gcloud run deploy ${{ secrets.GCP_CLOUD_RUN_NAME }} --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_DOCKER_IMAGE_NAME }}:latest --platform=managed --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.GCP_REGION }} From 77a220c724f9d0e585f4198684a3d52b7259e516 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 13:11:58 +0900 Subject: [PATCH 526/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E5=8B=95?= =?UTF-8?q?=E7=94=BB=E3=81=AE=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC=E3=83=9F?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E3=81=8C=E5=8F=8C=E6=96=B9=E3=81=AB=E3=81=A8?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E9=9D=9E=E5=90=8C=E6=9C=9F=E3=81=A7=E8=A1=8C?= =?UTF-8?q?=E3=82=8F=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 46 ++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 26b4d973..44466790 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -329,30 +329,41 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e var vehicleEvent pb.VehicleEvent // Go サーバーから受け取ったメッセージをPythonサーバーに転送 - for { - in, err := stream.Recv() - if err == io.EOF { - // ストリームの終了 - break - } - if err != nil { - return err - } + go func() { + for { + in, err := stream.Recv() + i.logger.Info("received from client") + i.logger.Info("img", in.VideoChunk[0]) + + if err == io.EOF { + // ストリームの終了 + break + } + if err != nil { + return + } - // バスID、バスタイプ、ビデオタイプを保持 - busID = in.BusId - vehicleEvent = in.VehicleEvent + // ! 治す + in.BusId = "83bd2da8-8d15-4c05-bb26-ed992334d9c6" + in.VehicleEvent = pb.VehicleEvent_VEHICLE_EVENT_GET_ON + in.BusType = pb.BusType_BUS_TYPE_MORNING - // Python サーバーへそのまま転送 - err = MLStream.Send(in) - if err != nil { - return err + // バスID、バスタイプ、ビデオタイプを保持 + busID = in.BusId + vehicleEvent = in.VehicleEvent + + // Python サーバーへそのまま転送 + err = MLStream.Send(in) + if err != nil { + return + } } - } + }() // Python サーバーからのレスポンスを待つ for { resp, err := MLStream.Recv() + i.logger.Info("received from ML server") if err == io.EOF { // ストリームの終了 break @@ -444,7 +455,6 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e return err } } - return nil } From 4b17c51a05781f063a86a37834abb78eb4246919 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 13:14:38 +0900 Subject: [PATCH 527/771] fix: yaml format --- .github/workflows/deploy-to-gcloud.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index f206052d..42eae021 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -16,22 +16,20 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup gcloud CLI + - name: Setup gcloud CLI uses: google-github-actions/setup-gcloud@v2 with: project_id: ${{ secrets.GCP_PROJECT_ID }} skip_install: false version: ">= 363.0.0" - - - name: Auth - uses: google-github-actions/auth@v2 + - name: Auth + uses: google-github-actions/auth@v2 with: workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.SERVICE_ACCOUNT }} access_token_lifetime: 1200s - - name: Configure Docker to use the gcloud command-line tool as a credential helper for the us region run: gcloud auth configure-docker us-docker.pkg.dev --quiet From aebe201b6e7afb4ab8d71ed9bcfe5163b018da18 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 13:15:48 +0900 Subject: [PATCH 528/771] =?UTF-8?q?fix:=20=E3=82=B3=E3=83=9F=E3=83=83?= =?UTF-8?q?=E3=83=88=E6=B8=88=E3=81=BFTransaction=E3=82=92=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=90=E3=83=83=E3=82=AF=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=82=82=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E5=87=BA=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/utils/utils.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index b3e2a02b..7f8edb0a 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -1,6 +1,7 @@ package utils import ( + "database/sql" "fmt" "golang.org/x/exp/slog" @@ -181,7 +182,14 @@ func CheckPassword(hashedPassword string, plainPassword string) bool { // RollbackTx はトランザクションのロールバックを試み、エラーがあればロギングします。 func RollbackTx(tx *ent.Tx, logger *slog.Logger) { + // txがコミット済みの場合はロールバックしない + if tx == nil { + logger.Error("failed to rollback transaction", "error", "tx is nil") + return + } if err := tx.Rollback(); err != nil { - logger.Error("failed to rollback transaction", "error", err) + if err != sql.ErrTxDone { + logger.Error("failed to rollback transaction", "error", err) + } } } From cd574102e6155ab380827606bb9a2232b2605f23 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 13:18:15 +0900 Subject: [PATCH 529/771] refactor --- .github/workflows/deploy-to-gcloud.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 42eae021..17de6907 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -30,9 +30,6 @@ jobs: service_account: ${{ secrets.SERVICE_ACCOUNT }} access_token_lifetime: 1200s - - name: Configure Docker to use the gcloud command-line tool as a credential helper for the us region - run: gcloud auth configure-docker us-docker.pkg.dev --quiet - - name: Build Docker Image run: | docker build --tag=gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_DOCKER_IMAGE_NAME }}:latest \ @@ -51,6 +48,9 @@ jobs: --build-arg ML_ADDR="${{ secrets.ML_ADDR }}" \ --build-arg INSIDE_OF_CREDENTIALS="${{ secrets.INSIDE_OF_CREDENTIALS }}" + - name: Configure Docker to use the gcloud command-line tool as a credential helper for the us region + run: gcloud auth configure-docker us-docker.pkg.dev --quiet + - name: Push Docker Image to Google Container Registry run: | docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_DOCKER_IMAGE_NAME }}:latest From ccd2c8e580a810f85775dab3c14f72098ef452b7 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 13:20:37 +0900 Subject: [PATCH 530/771] refactor --- .github/workflows/deploy-to-gcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 17de6907..8bf36f38 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -49,7 +49,7 @@ jobs: --build-arg INSIDE_OF_CREDENTIALS="${{ secrets.INSIDE_OF_CREDENTIALS }}" - name: Configure Docker to use the gcloud command-line tool as a credential helper for the us region - run: gcloud auth configure-docker us-docker.pkg.dev --quiet + run: gcloud auth configure-docker --quiet - name: Push Docker Image to Google Container Registry run: | From 7b409c4a970d321895d794fad82ea2a2ee364b75 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 13:27:54 +0900 Subject: [PATCH 531/771] refactor --- .github/workflows/deploy-to-gcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 8bf36f38..16db7203 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -57,4 +57,4 @@ jobs: - name: Deploy to Cloud Run run: | - gcloud run deploy ${{ secrets.GCP_CLOUD_RUN_NAME }} --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_DOCKER_IMAGE_NAME }}:latest --platform=managed --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.GCP_REGION }} + gcloud run deploy ${{ secrets.GCP_CLOUD_RUN_NAME }} --image=gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_DOCKER_IMAGE_NAME }}:latest --platform=managed --project=${{ secrets.GCP_PROJECT_ID }} --region=${{ secrets.REGION }} From 56bb35596f925cb95b7d0ea8f55e0c6ff2ace805 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 14:02:37 +0900 Subject: [PATCH 532/771] fix: Docker --- backend/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 49ccbd61..a8b8eaba 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -75,7 +75,6 @@ RUN echo "gcp-credentials.json is: $(cat /app/secrets/gcp-credentials.json)" # /appディレクトリ以下の全てのサブファイルディレクトリも含めた構造を出力 RUN ls -laR /app -ENV GOOGLE_APPLICATION_CREDENTIALS=/app/secrets/gcp-credentials.json # アプリケーションの起動 ENTRYPOINT ["/app/server"] From 9212eb2316d51954838f08e9b457840cf00b1838 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 14:34:34 +0900 Subject: [PATCH 533/771] =?UTF-8?q?fix:=20=E3=82=AF=E3=83=AC=E3=83=87?= =?UTF-8?q?=E3=83=B3=E3=82=B7=E3=83=A3=E3=83=AB=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E8=AA=AD=E3=81=BF=E8=BE=BC=E3=81=BF=E6=96=B9?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/server/main.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index dbcb07c9..dfc8de9c 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -15,6 +15,7 @@ import ( mlv1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1" "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql" + "google.golang.org/api/option" "google.golang.org/grpc" "google.golang.org/grpc/credentials" @@ -73,7 +74,16 @@ func main() { // Cloud Storageへの接続を開始 log.Println("Connecting to Cloud Storage...") ctx := context.Background() - storageClient, err := storage.NewClient(ctx) + credPath := "./secrets/gcp-credentials.json" + // パスのファイルの中身を出力 + data, err := os.ReadFile(credPath) + if err != nil { + log.Fatalf("Failed to read credentials file: %v", err) + } + + log.Printf("Credentials file: %s", data) + + storageClient, err := storage.NewClient(ctx, option.WithCredentialsFile(credPath)) if err != nil { log.Fatalf("Failed to create Cloud Storage client: %v", err) } From 23bd6462a101ee981a4246eef66c57d46b61c3ac Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 14:53:40 +0900 Subject: [PATCH 534/771] =?UTF-8?q?ci:=20=E6=9C=80=E7=B5=82=E8=AA=BF?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Dockerfile | 9 --------- backend/cmd/server/main.go | 8 -------- 2 files changed, 17 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index a8b8eaba..b7dc00f7 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -19,9 +19,6 @@ ARG ML_ADDR ARG INSIDE_OF_CREDENTIALS -RUN echo "Port is: $PORT" && echo "Mode is: $MODE_DEV" - - # .env ファイルを生成 RUN echo "DSN=$DSN" > .env \ && echo "DB_USER_NAME=$DB_USER_NAME" >> .env \ @@ -70,11 +67,5 @@ COPY --from=builder /srv/grpc/.env /app/.env # secretsディレクトリを/appディレクトリにコピー COPY --from=builder /srv/grpc/secrets /app/secrets -RUN ls -la /app/secrets -RUN echo "gcp-credentials.json is: $(cat /app/secrets/gcp-credentials.json)" - -# /appディレクトリ以下の全てのサブファイルディレクトリも含めた構造を出力 -RUN ls -laR /app - # アプリケーションの起動 ENTRYPOINT ["/app/server"] diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index dfc8de9c..7f83e580 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -75,14 +75,6 @@ func main() { log.Println("Connecting to Cloud Storage...") ctx := context.Background() credPath := "./secrets/gcp-credentials.json" - // パスのファイルの中身を出力 - data, err := os.ReadFile(credPath) - if err != nil { - log.Fatalf("Failed to read credentials file: %v", err) - } - - log.Printf("Credentials file: %s", data) - storageClient, err := storage.NewClient(ctx, option.WithCredentialsFile(credPath)) if err != nil { log.Fatalf("Failed to create Cloud Storage client: %v", err) From 6536ca198f9ecadbb64497e20e3553fdffdf87c9 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 14:55:23 +0900 Subject: [PATCH 535/771] =?UTF-8?q?ci:=20yaml=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-to-gcloud.yml | 4 +++- .github/workflows/deploy_cloudrun_machine_learning.yml | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 16db7203..dd4c7c7d 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -6,7 +6,9 @@ permissions: on: push: branches: - - ci/backend # デプロイをトリガーするブランチを指定 + - develop + paths: + - "backend/**" jobs: setup-build-deploy: diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index e2ba527a..4b3a4938 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -4,7 +4,6 @@ on: push: branches: - develop - - feature/machine-learning/cicd paths: - "machine-learning/**" From db3d904791984e11b7ebc8edf1aa4c75f594b487 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 15:08:33 +0900 Subject: [PATCH 536/771] =?UTF-8?q?chore(ml):=20=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E5=90=8D=E3=81=AE=E5=A4=89=E6=9B=B4=E3=83=BB?= =?UTF-8?q?pip=E3=81=AE=E3=82=A2=E3=83=83=E3=83=97=E3=82=B0=E3=83=AC?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/{dockerfile => Dockerfile} | 3 +++ 1 file changed, 3 insertions(+) rename machine_learning/{dockerfile => Dockerfile} (94%) diff --git a/machine_learning/dockerfile b/machine_learning/Dockerfile similarity index 94% rename from machine_learning/dockerfile rename to machine_learning/Dockerfile index d14bd27b..c4565789 100644 --- a/machine_learning/dockerfile +++ b/machine_learning/Dockerfile @@ -8,6 +8,9 @@ ARG BUCKET_NAME_FOR_ML # 作業ディレクトリの設定 WORKDIR /machine-learning +# pipのアップグレード +RUN pip install --upgrade pip + # 必要なパッケージのインストール COPY ./requirements.lock /machine-learning/ From a3d11f92edf0a9f4ce3f9e5257b99b35564f937c Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 15:18:03 +0900 Subject: [PATCH 537/771] =?UTF-8?q?fix(ml):=20workflow=E3=81=AE=E7=9B=A3?= =?UTF-8?q?=E8=A6=96=E5=AF=BE=E8=B1=A1=E3=81=AB=E3=81=AA=E3=82=8B=E3=83=87?= =?UTF-8?q?=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=81=AE=E6=AD=A3?= =?UTF-8?q?=E3=81=97=E3=81=84=E3=83=91=E3=82=B9=E3=81=8C=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E3=81=A8?= =?UTF-8?q?=E3=81=93=E3=82=8D=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_cloudrun_machine_learning.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index e2ba527a..69143f1c 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -4,9 +4,8 @@ on: push: branches: - develop - - feature/machine-learning/cicd paths: - - "machine-learning/**" + - "machine_learning/**" permissions: contents: read From 71c5c5f91cad45bbc2cb886ff6a341b130a47b37 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 15:24:37 +0900 Subject: [PATCH 538/771] fix --- .github/workflows/deploy-to-gcloud.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 711b654b..b4b43093 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -48,6 +48,9 @@ jobs: --build-arg ML_ADDR="${{ secrets.ML_ADDR }}" \ --build-arg INSIDE_OF_CREDENTIALS="${{ secrets.INSIDE_OF_CREDENTIALS }}" + - name: Configure Docker to use the gcloud command-line tool as a credential helper for the us region + run: gcloud auth configure-docker --quiet + - name: Push Docker Image to Google Container Registry run: | docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_DOCKER_IMAGE_NAME }}:latest From ba7916249a762145f38cb06ee1fe7ecf5c01f986 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 15:53:39 +0900 Subject: [PATCH 539/771] chore: Google Protocol Buffers: Add generated code for FieldMask --- .../google/protobuf/field_mask.pb.dart | 263 ++++++++++++++++++ .../google/protobuf/field_mask.pbenum.dart | 11 + .../google/protobuf/field_mask.pbjson.dart | 27 ++ .../google/protobuf/field_mask.pbserver.dart | 14 + 4 files changed, 315 insertions(+) create mode 100644 frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pb.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbenum.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbjson.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbserver.dart diff --git a/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pb.dart new file mode 100644 index 00000000..12037c68 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pb.dart @@ -0,0 +1,263 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/field_mask.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; +import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; + +/// `FieldMask` represents a set of symbolic field paths, for example: +/// +/// paths: "f.a" +/// paths: "f.b.d" +/// +/// Here `f` represents a field in some root message, `a` and `b` +/// fields in the message found in `f`, and `d` a field found in the +/// message in `f.b`. +/// +/// Field masks are used to specify a subset of fields that should be +/// returned by a get operation or modified by an update operation. +/// Field masks also have a custom JSON encoding (see below). +/// +/// # Field Masks in Projections +/// +/// When used in the context of a projection, a response message or +/// sub-message is filtered by the API to only contain those fields as +/// specified in the mask. For example, if the mask in the previous +/// example is applied to a response message as follows: +/// +/// f { +/// a : 22 +/// b { +/// d : 1 +/// x : 2 +/// } +/// y : 13 +/// } +/// z: 8 +/// +/// The result will not contain specific values for fields x,y and z +/// (their value will be set to the default, and omitted in proto text +/// output): +/// +/// +/// f { +/// a : 22 +/// b { +/// d : 1 +/// } +/// } +/// +/// A repeated field is not allowed except at the last position of a +/// paths string. +/// +/// If a FieldMask object is not present in a get operation, the +/// operation applies to all fields (as if a FieldMask of all fields +/// had been specified). +/// +/// Note that a field mask does not necessarily apply to the +/// top-level response message. In case of a REST get operation, the +/// field mask applies directly to the response, but in case of a REST +/// list operation, the mask instead applies to each individual message +/// in the returned resource list. In case of a REST custom method, +/// other definitions may be used. Where the mask applies will be +/// clearly documented together with its declaration in the API. In +/// any case, the effect on the returned resource/resources is required +/// behavior for APIs. +/// +/// # Field Masks in Update Operations +/// +/// A field mask in update operations specifies which fields of the +/// targeted resource are going to be updated. The API is required +/// to only change the values of the fields as specified in the mask +/// and leave the others untouched. If a resource is passed in to +/// describe the updated values, the API ignores the values of all +/// fields not covered by the mask. +/// +/// If a repeated field is specified for an update operation, new values will +/// be appended to the existing repeated field in the target resource. Note that +/// a repeated field is only allowed in the last position of a `paths` string. +/// +/// If a sub-message is specified in the last position of the field mask for an +/// update operation, then new value will be merged into the existing sub-message +/// in the target resource. +/// +/// For example, given the target message: +/// +/// f { +/// b { +/// d: 1 +/// x: 2 +/// } +/// c: [1] +/// } +/// +/// And an update message: +/// +/// f { +/// b { +/// d: 10 +/// } +/// c: [2] +/// } +/// +/// then if the field mask is: +/// +/// paths: ["f.b", "f.c"] +/// +/// then the result will be: +/// +/// f { +/// b { +/// d: 10 +/// x: 2 +/// } +/// c: [1, 2] +/// } +/// +/// An implementation may provide options to override this default behavior for +/// repeated and message fields. +/// +/// In order to reset a field's value to the default, the field must +/// be in the mask and set to the default value in the provided resource. +/// Hence, in order to reset all fields of a resource, provide a default +/// instance of the resource and set all fields in the mask, or do +/// not provide a mask as described below. +/// +/// If a field mask is not present on update, the operation applies to +/// all fields (as if a field mask of all fields has been specified). +/// Note that in the presence of schema evolution, this may mean that +/// fields the client does not know and has therefore not filled into +/// the request will be reset to their default. If this is unwanted +/// behavior, a specific service may require a client to always specify +/// a field mask, producing an error if not. +/// +/// As with get operations, the location of the resource which +/// describes the updated values in the request message depends on the +/// operation kind. In any case, the effect of the field mask is +/// required to be honored by the API. +/// +/// ## Considerations for HTTP REST +/// +/// The HTTP kind of an update operation which uses a field mask must +/// be set to PATCH instead of PUT in order to satisfy HTTP semantics +/// (PUT must only be used for full updates). +/// +/// # JSON Encoding of Field Masks +/// +/// In JSON, a field mask is encoded as a single string where paths are +/// separated by a comma. Fields name in each path are converted +/// to/from lower-camel naming conventions. +/// +/// As an example, consider the following message declarations: +/// +/// message Profile { +/// User user = 1; +/// Photo photo = 2; +/// } +/// message User { +/// string display_name = 1; +/// string address = 2; +/// } +/// +/// In proto a field mask for `Profile` may look as such: +/// +/// mask { +/// paths: "user.display_name" +/// paths: "photo" +/// } +/// +/// In JSON, the same mask is represented as below: +/// +/// { +/// mask: "user.displayName,photo" +/// } +/// +/// # Field Masks and Oneof Fields +/// +/// Field masks treat fields in oneofs just as regular fields. Consider the +/// following message: +/// +/// message SampleMessage { +/// oneof test_oneof { +/// string name = 4; +/// SubMessage sub_message = 9; +/// } +/// } +/// +/// The field mask can be: +/// +/// mask { +/// paths: "name" +/// } +/// +/// Or: +/// +/// mask { +/// paths: "sub_message" +/// } +/// +/// Note that oneof type names ("test_oneof" in this case) cannot be used in +/// paths. +/// +/// ## Field Mask Verification +/// +/// The implementation of any API method which has a FieldMask type field in the +/// request should verify the included field paths, and return an +/// `INVALID_ARGUMENT` error if any path is unmappable. +class FieldMask extends $pb.GeneratedMessage with $mixin.FieldMaskMixin { + factory FieldMask({ + $core.Iterable<$core.String>? paths, + }) { + final $result = create(); + if (paths != null) { + $result.paths.addAll(paths); + } + return $result; + } + FieldMask._() : super(); + factory FieldMask.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FieldMask.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FieldMask', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.FieldMaskMixin.toProto3JsonHelper, fromProto3Json: $mixin.FieldMaskMixin.fromProto3JsonHelper) + ..pPS(1, _omitFieldNames ? '' : 'paths') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FieldMask clone() => FieldMask()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FieldMask copyWith(void Function(FieldMask) updates) => super.copyWith((message) => updates(message as FieldMask)) as FieldMask; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FieldMask create() => FieldMask._(); + FieldMask createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FieldMask getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FieldMask? _defaultInstance; + + /// The set of field mask paths. + @$pb.TagNumber(1) + $core.List<$core.String> get paths => $_getList(0); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbenum.dart new file mode 100644 index 00000000..97d02b53 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/field_mask.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbjson.dart new file mode 100644 index 00000000..cc50b089 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbjson.dart @@ -0,0 +1,27 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/field_mask.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use fieldMaskDescriptor instead') +const FieldMask$json = { + '1': 'FieldMask', + '2': [ + {'1': 'paths', '3': 1, '4': 3, '5': 9, '10': 'paths'}, + ], +}; + +/// Descriptor for `FieldMask`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List fieldMaskDescriptor = $convert.base64Decode( + 'CglGaWVsZE1hc2sSFAoFcGF0aHMYASADKAlSBXBhdGhz'); + diff --git a/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbserver.dart b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbserver.dart new file mode 100644 index 00000000..877c5017 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/google/protobuf/field_mask.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/field_mask.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'field_mask.pb.dart'; + From b6dc54cd42316de7068983f81102b0213233f70f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 17:43:14 +0900 Subject: [PATCH 540/771] =?UTF-8?q?feat:=20update=E7=B3=BB=E3=81=AEproto?= =?UTF-8?q?=E3=82=92=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 459 +++++++++++++----- .../go/where_child_bus/v1/bus_grpc.pb.go | 30 +- .../go/where_child_bus/v1/nursery.pb.go | 337 ++++++++++--- .../go/where_child_bus/v1/nursery_grpc.pb.go | 37 ++ .../go/where_child_bus/v1/station.pb.go | 396 +++++++++++---- .../go/where_child_bus/v1/station_grpc.pb.go | 37 ++ .../proto-gen/where_child_bus/v1/bus.pb.dart | 203 ++++++++ .../where_child_bus/v1/bus.pbgrpc.dart | 28 +- .../where_child_bus/v1/bus.pbjson.dart | 37 ++ .../where_child_bus/v1/nursery.pb.dart | 189 ++++++++ .../where_child_bus/v1/nursery.pbgrpc.dart | 20 + .../where_child_bus/v1/nursery.pbjson.dart | 35 ++ .../where_child_bus/v1/station.pb.dart | 203 ++++++++ .../where_child_bus/v1/station.pbgrpc.dart | 20 + .../where_child_bus/v1/station.pbjson.dart | 38 ++ .../generated/where_child_bus/v1/bus_pb2.py | 76 ++- .../generated/where_child_bus/v1/bus_pb2.pyi | 27 ++ .../where_child_bus/v1/bus_pb2_grpc.py | 26 +- .../where_child_bus/v1/nursery_pb2.py | 27 +- .../where_child_bus/v1/nursery_pb2.pyi | 25 + .../where_child_bus/v1/nursery_pb2_grpc.py | 33 ++ .../where_child_bus/v1/station_pb2.py | 27 +- .../where_child_bus/v1/station_pb2.pyi | 27 ++ .../where_child_bus/v1/station_pb2_grpc.py | 33 ++ proto/where_child_bus/v1/bus.proto | 18 +- proto/where_child_bus/v1/child_photo.proto | 1 - proto/where_child_bus/v1/nursery.proto | 19 +- proto/where_child_bus/v1/station.proto | 17 + 28 files changed, 2036 insertions(+), 389 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 983a6bb7..38ae8989 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -9,6 +9,7 @@ package where_child_busv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" reflect "reflect" sync "sync" ) @@ -688,6 +689,156 @@ func (x *StreamBusVideoResponse) GetChildren() []*Child { return nil } +type UpdateBusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + PlateNumber string `protobuf:"bytes,3,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` + BusStatus BusStatus `protobuf:"varint,4,opt,name=bus_status,json=busStatus,proto3,enum=where_child_bus.v1.BusStatus" json:"bus_status,omitempty"` + Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` + EnableFaceRecognition bool `protobuf:"varint,7,opt,name=enable_face_recognition,json=enableFaceRecognition,proto3" json:"enable_face_recognition,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,8,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateBusRequest) Reset() { + *x = UpdateBusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateBusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBusRequest) ProtoMessage() {} + +func (x *UpdateBusRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateBusRequest.ProtoReflect.Descriptor instead. +func (*UpdateBusRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateBusRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *UpdateBusRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateBusRequest) GetPlateNumber() string { + if x != nil { + return x.PlateNumber + } + return "" +} + +func (x *UpdateBusRequest) GetBusStatus() BusStatus { + if x != nil { + return x.BusStatus + } + return BusStatus_BUS_STATUS_UNSPECIFIED +} + +func (x *UpdateBusRequest) GetLatitude() float64 { + if x != nil { + return x.Latitude + } + return 0 +} + +func (x *UpdateBusRequest) GetLongitude() float64 { + if x != nil { + return x.Longitude + } + return 0 +} + +func (x *UpdateBusRequest) GetEnableFaceRecognition() bool { + if x != nil { + return x.EnableFaceRecognition + } + return false +} + +func (x *UpdateBusRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type UpdateBusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bus *Bus `protobuf:"bytes,1,opt,name=bus,proto3" json:"bus,omitempty"` +} + +func (x *UpdateBusResponse) Reset() { + *x = UpdateBusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateBusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBusResponse) ProtoMessage() {} + +func (x *UpdateBusResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateBusResponse.ProtoReflect.Descriptor instead. +func (*UpdateBusResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{13} +} + +func (x *UpdateBusResponse) GetBus() *Bus { + if x != nil { + return x.Bus + } + return nil +} + var File_where_child_bus_v1_bus_proto protoreflect.FileDescriptor var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ @@ -696,106 +847,132 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x12, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x3e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, - 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x65, 0x73, 0x22, 0x6d, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, - 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x12, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x3e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, + 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, - 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, + 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, + 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x22, 0x6d, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x70, 0x0a, 0x1d, 0x53, 0x65, 0x6e, - 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, - 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, - 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x53, - 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, - 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, - 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, - 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, - 0x64, 0x22, 0x6d, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x22, 0xed, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, - 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, - 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x76, 0x65, 0x68, 0x69, - 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, - 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, - 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, - 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, + 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, - 0x65, 0x6e, 0x32, 0xb6, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x70, 0x0a, 0x1d, 0x53, + 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, + 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, + 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x20, 0x0a, + 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, + 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, + 0x73, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x22, 0xed, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, + 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, + 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x76, 0x65, + 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcd, 0x02, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, + 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, + 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, + 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, + 0x03, 0x62, 0x75, 0x73, 0x32, 0xa4, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, + 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, @@ -849,7 +1026,7 @@ func file_where_child_bus_v1_bus_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_bus_proto_rawDescData } -var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ (*CreateBusRequest)(nil), // 0: where_child_bus.v1.CreateBusRequest (*CreateBusResponse)(nil), // 1: where_child_bus.v1.CreateBusResponse @@ -863,37 +1040,43 @@ var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ (*TrackBusContinuousResponse)(nil), // 9: where_child_bus.v1.TrackBusContinuousResponse (*StreamBusVideoRequest)(nil), // 10: where_child_bus.v1.StreamBusVideoRequest (*StreamBusVideoResponse)(nil), // 11: where_child_bus.v1.StreamBusVideoResponse - (*Bus)(nil), // 12: where_child_bus.v1.Bus - (BusStatus)(0), // 13: where_child_bus.v1.BusStatus - (BusType)(0), // 14: where_child_bus.v1.BusType - (VehicleEvent)(0), // 15: where_child_bus.v1.VehicleEvent - (*Child)(nil), // 16: where_child_bus.v1.Child + (*UpdateBusRequest)(nil), // 12: where_child_bus.v1.UpdateBusRequest + (*UpdateBusResponse)(nil), // 13: where_child_bus.v1.UpdateBusResponse + (*Bus)(nil), // 14: where_child_bus.v1.Bus + (BusStatus)(0), // 15: where_child_bus.v1.BusStatus + (BusType)(0), // 16: where_child_bus.v1.BusType + (VehicleEvent)(0), // 17: where_child_bus.v1.VehicleEvent + (*Child)(nil), // 18: where_child_bus.v1.Child + (*fieldmaskpb.FieldMask)(nil), // 19: google.protobuf.FieldMask } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ - 12, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus - 12, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus - 13, // 2: where_child_bus.v1.ChangeBusStatusRequest.bus_status:type_name -> where_child_bus.v1.BusStatus - 12, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus - 14, // 4: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType - 15, // 5: where_child_bus.v1.StreamBusVideoRequest.vehicle_event:type_name -> where_child_bus.v1.VehicleEvent - 16, // 6: where_child_bus.v1.StreamBusVideoResponse.children:type_name -> where_child_bus.v1.Child - 0, // 7: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest - 2, // 8: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 4, // 9: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest - 6, // 10: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest - 8, // 11: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest - 10, // 12: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest - 1, // 13: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 14: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 5, // 15: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse - 7, // 16: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse - 9, // 17: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse - 11, // 18: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse - 13, // [13:19] is the sub-list for method output_type - 7, // [7:13] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 14, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus + 14, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus + 15, // 2: where_child_bus.v1.ChangeBusStatusRequest.bus_status:type_name -> where_child_bus.v1.BusStatus + 14, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus + 16, // 4: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType + 17, // 5: where_child_bus.v1.StreamBusVideoRequest.vehicle_event:type_name -> where_child_bus.v1.VehicleEvent + 18, // 6: where_child_bus.v1.StreamBusVideoResponse.children:type_name -> where_child_bus.v1.Child + 15, // 7: where_child_bus.v1.UpdateBusRequest.bus_status:type_name -> where_child_bus.v1.BusStatus + 19, // 8: where_child_bus.v1.UpdateBusRequest.update_mask:type_name -> google.protobuf.FieldMask + 14, // 9: where_child_bus.v1.UpdateBusResponse.bus:type_name -> where_child_bus.v1.Bus + 0, // 10: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 11: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 12, // 12: where_child_bus.v1.BusService.UpdateBus:input_type -> where_child_bus.v1.UpdateBusRequest + 6, // 13: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest + 8, // 14: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest + 10, // 15: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest + 1, // 16: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 17: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 13, // 18: where_child_bus.v1.BusService.UpdateBus:output_type -> where_child_bus.v1.UpdateBusResponse + 7, // 19: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse + 9, // 20: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse + 11, // 21: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse + 16, // [16:22] is the sub-list for method output_type + 10, // [10:16] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } @@ -1047,6 +1230,30 @@ func file_where_child_bus_v1_bus_proto_init() { return nil } } + file_where_child_bus_v1_bus_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1054,7 +1261,7 @@ func file_where_child_bus_v1_bus_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_bus_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go index ff76ce9c..322e7bff 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go @@ -21,7 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( BusService_CreateBus_FullMethodName = "/where_child_bus.v1.BusService/CreateBus" BusService_GetBusListByNurseryId_FullMethodName = "/where_child_bus.v1.BusService/GetBusListByNurseryId" - BusService_ChangeBusStatus_FullMethodName = "/where_child_bus.v1.BusService/ChangeBusStatus" + BusService_UpdateBus_FullMethodName = "/where_child_bus.v1.BusService/UpdateBus" BusService_SendLocationContinuous_FullMethodName = "/where_child_bus.v1.BusService/SendLocationContinuous" BusService_TrackBusContinuous_FullMethodName = "/where_child_bus.v1.BusService/TrackBusContinuous" BusService_StreamBusVideo_FullMethodName = "/where_child_bus.v1.BusService/StreamBusVideo" @@ -33,7 +33,7 @@ const ( type BusServiceClient interface { CreateBus(ctx context.Context, in *CreateBusRequest, opts ...grpc.CallOption) (*CreateBusResponse, error) GetBusListByNurseryId(ctx context.Context, in *GetBusListByNurseryIdRequest, opts ...grpc.CallOption) (*GetBusListByNurseryIdResponse, error) - ChangeBusStatus(ctx context.Context, in *ChangeBusStatusRequest, opts ...grpc.CallOption) (*ChangeBusStatusResponse, error) + UpdateBus(ctx context.Context, in *UpdateBusRequest, opts ...grpc.CallOption) (*UpdateBusResponse, error) SendLocationContinuous(ctx context.Context, opts ...grpc.CallOption) (BusService_SendLocationContinuousClient, error) TrackBusContinuous(ctx context.Context, in *TrackBusContinuousRequest, opts ...grpc.CallOption) (BusService_TrackBusContinuousClient, error) StreamBusVideo(ctx context.Context, opts ...grpc.CallOption) (BusService_StreamBusVideoClient, error) @@ -65,9 +65,9 @@ func (c *busServiceClient) GetBusListByNurseryId(ctx context.Context, in *GetBus return out, nil } -func (c *busServiceClient) ChangeBusStatus(ctx context.Context, in *ChangeBusStatusRequest, opts ...grpc.CallOption) (*ChangeBusStatusResponse, error) { - out := new(ChangeBusStatusResponse) - err := c.cc.Invoke(ctx, BusService_ChangeBusStatus_FullMethodName, in, out, opts...) +func (c *busServiceClient) UpdateBus(ctx context.Context, in *UpdateBusRequest, opts ...grpc.CallOption) (*UpdateBusResponse, error) { + out := new(UpdateBusResponse) + err := c.cc.Invoke(ctx, BusService_UpdateBus_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -180,7 +180,7 @@ func (x *busServiceStreamBusVideoClient) CloseAndRecv() (*StreamBusVideoResponse type BusServiceServer interface { CreateBus(context.Context, *CreateBusRequest) (*CreateBusResponse, error) GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) - ChangeBusStatus(context.Context, *ChangeBusStatusRequest) (*ChangeBusStatusResponse, error) + UpdateBus(context.Context, *UpdateBusRequest) (*UpdateBusResponse, error) SendLocationContinuous(BusService_SendLocationContinuousServer) error TrackBusContinuous(*TrackBusContinuousRequest, BusService_TrackBusContinuousServer) error StreamBusVideo(BusService_StreamBusVideoServer) error @@ -196,8 +196,8 @@ func (UnimplementedBusServiceServer) CreateBus(context.Context, *CreateBusReques func (UnimplementedBusServiceServer) GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBusListByNurseryId not implemented") } -func (UnimplementedBusServiceServer) ChangeBusStatus(context.Context, *ChangeBusStatusRequest) (*ChangeBusStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ChangeBusStatus not implemented") +func (UnimplementedBusServiceServer) UpdateBus(context.Context, *UpdateBusRequest) (*UpdateBusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBus not implemented") } func (UnimplementedBusServiceServer) SendLocationContinuous(BusService_SendLocationContinuousServer) error { return status.Errorf(codes.Unimplemented, "method SendLocationContinuous not implemented") @@ -256,20 +256,20 @@ func _BusService_GetBusListByNurseryId_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } -func _BusService_ChangeBusStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangeBusStatusRequest) +func _BusService_UpdateBus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateBusRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BusServiceServer).ChangeBusStatus(ctx, in) + return srv.(BusServiceServer).UpdateBus(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: BusService_ChangeBusStatus_FullMethodName, + FullMethod: BusService_UpdateBus_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusServiceServer).ChangeBusStatus(ctx, req.(*ChangeBusStatusRequest)) + return srv.(BusServiceServer).UpdateBus(ctx, req.(*UpdateBusRequest)) } return interceptor(ctx, in, info, handler) } @@ -363,8 +363,8 @@ var BusService_ServiceDesc = grpc.ServiceDesc{ Handler: _BusService_GetBusListByNurseryId_Handler, }, { - MethodName: "ChangeBusStatus", - Handler: _BusService_ChangeBusStatus_Handler, + MethodName: "UpdateBus", + Handler: _BusService_UpdateBus_Handler, }, }, Streams: []grpc.StreamDesc{ diff --git a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go index 24959719..f12bf6d3 100644 --- a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go @@ -9,6 +9,7 @@ package where_child_busv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" reflect "reflect" sync "sync" ) @@ -256,6 +257,148 @@ func (x *NurseryLoginResponse) GetNursery() *NurseryResponse { return nil } +type UpdateNurseryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Adress string `protobuf:"bytes,3,opt,name=adress,proto3" json:"adress,omitempty"` + PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` + Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,7,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateNurseryRequest) Reset() { + *x = UpdateNurseryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNurseryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNurseryRequest) ProtoMessage() {} + +func (x *UpdateNurseryRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateNurseryRequest.ProtoReflect.Descriptor instead. +func (*UpdateNurseryRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateNurseryRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateNurseryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateNurseryRequest) GetAdress() string { + if x != nil { + return x.Adress + } + return "" +} + +func (x *UpdateNurseryRequest) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *UpdateNurseryRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *UpdateNurseryRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *UpdateNurseryRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type UpdateNurseryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nursery *NurseryResponse `protobuf:"bytes,1,opt,name=nursery,proto3" json:"nursery,omitempty"` +} + +func (x *UpdateNurseryResponse) Reset() { + *x = UpdateNurseryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNurseryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNurseryResponse) ProtoMessage() {} + +func (x *UpdateNurseryResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateNurseryResponse.ProtoReflect.Descriptor instead. +func (*UpdateNurseryResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateNurseryResponse) GetNursery() *NurseryResponse { + if x != nil { + return x.Nursery + } + return nil +} + var File_where_child_bus_v1_nursery_proto protoreflect.FileDescriptor var file_where_child_bus_v1_nursery_proto_rawDesc = []byte{ @@ -264,63 +407,92 @@ var file_where_child_bus_v1_nursery_proto_rawDesc = []byte{ 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, 0x14, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x56, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x22, 0x47, - 0x0a, 0x13, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, + 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x6f, 0x0a, 0x14, 0x4e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0xd9, 0x01, 0x0a, 0x0e, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x56, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x61, 0x0a, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x12, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, - 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, - 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, - 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x22, 0x47, 0x0a, 0x13, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x6f, 0x0a, 0x14, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x22, 0xe4, 0x01, 0x0a, 0x14, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, + 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, + 0x6b, 0x22, 0x56, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0xbf, 0x02, 0x0a, 0x0e, 0x4e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x28, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x12, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -335,26 +507,33 @@ func file_where_child_bus_v1_nursery_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_nursery_proto_rawDescData } -var file_where_child_bus_v1_nursery_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_where_child_bus_v1_nursery_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_where_child_bus_v1_nursery_proto_goTypes = []interface{}{ (*CreateNurseryRequest)(nil), // 0: where_child_bus.v1.CreateNurseryRequest (*CreateNurseryResponse)(nil), // 1: where_child_bus.v1.CreateNurseryResponse (*NurseryLoginRequest)(nil), // 2: where_child_bus.v1.NurseryLoginRequest (*NurseryLoginResponse)(nil), // 3: where_child_bus.v1.NurseryLoginResponse - (*NurseryResponse)(nil), // 4: where_child_bus.v1.NurseryResponse + (*UpdateNurseryRequest)(nil), // 4: where_child_bus.v1.UpdateNurseryRequest + (*UpdateNurseryResponse)(nil), // 5: where_child_bus.v1.UpdateNurseryResponse + (*NurseryResponse)(nil), // 6: where_child_bus.v1.NurseryResponse + (*fieldmaskpb.FieldMask)(nil), // 7: google.protobuf.FieldMask } var file_where_child_bus_v1_nursery_proto_depIdxs = []int32{ - 4, // 0: where_child_bus.v1.CreateNurseryResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 4, // 1: where_child_bus.v1.NurseryLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 0, // 2: where_child_bus.v1.NurseryService.CreateNursery:input_type -> where_child_bus.v1.CreateNurseryRequest - 2, // 3: where_child_bus.v1.NurseryService.NurseryLogin:input_type -> where_child_bus.v1.NurseryLoginRequest - 1, // 4: where_child_bus.v1.NurseryService.CreateNursery:output_type -> where_child_bus.v1.CreateNurseryResponse - 3, // 5: where_child_bus.v1.NurseryService.NurseryLogin:output_type -> where_child_bus.v1.NurseryLoginResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 6, // 0: where_child_bus.v1.CreateNurseryResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 6, // 1: where_child_bus.v1.NurseryLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 7, // 2: where_child_bus.v1.UpdateNurseryRequest.update_mask:type_name -> google.protobuf.FieldMask + 6, // 3: where_child_bus.v1.UpdateNurseryResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 0, // 4: where_child_bus.v1.NurseryService.CreateNursery:input_type -> where_child_bus.v1.CreateNurseryRequest + 2, // 5: where_child_bus.v1.NurseryService.NurseryLogin:input_type -> where_child_bus.v1.NurseryLoginRequest + 4, // 6: where_child_bus.v1.NurseryService.UpdateNursery:input_type -> where_child_bus.v1.UpdateNurseryRequest + 1, // 7: where_child_bus.v1.NurseryService.CreateNursery:output_type -> where_child_bus.v1.CreateNurseryResponse + 3, // 8: where_child_bus.v1.NurseryService.NurseryLogin:output_type -> where_child_bus.v1.NurseryLoginResponse + 5, // 9: where_child_bus.v1.NurseryService.UpdateNursery:output_type -> where_child_bus.v1.UpdateNurseryResponse + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_where_child_bus_v1_nursery_proto_init() } @@ -412,6 +591,30 @@ func file_where_child_bus_v1_nursery_proto_init() { return nil } } + file_where_child_bus_v1_nursery_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNurseryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_nursery_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNurseryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -419,7 +622,7 @@ func file_where_child_bus_v1_nursery_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_nursery_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go index 926a2a61..bbc27cdd 100644 --- a/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( NurseryService_CreateNursery_FullMethodName = "/where_child_bus.v1.NurseryService/CreateNursery" NurseryService_NurseryLogin_FullMethodName = "/where_child_bus.v1.NurseryService/NurseryLogin" + NurseryService_UpdateNursery_FullMethodName = "/where_child_bus.v1.NurseryService/UpdateNursery" ) // NurseryServiceClient is the client API for NurseryService service. @@ -29,6 +30,7 @@ const ( type NurseryServiceClient interface { CreateNursery(ctx context.Context, in *CreateNurseryRequest, opts ...grpc.CallOption) (*CreateNurseryResponse, error) NurseryLogin(ctx context.Context, in *NurseryLoginRequest, opts ...grpc.CallOption) (*NurseryLoginResponse, error) + UpdateNursery(ctx context.Context, in *UpdateNurseryRequest, opts ...grpc.CallOption) (*UpdateNurseryResponse, error) } type nurseryServiceClient struct { @@ -57,12 +59,22 @@ func (c *nurseryServiceClient) NurseryLogin(ctx context.Context, in *NurseryLogi return out, nil } +func (c *nurseryServiceClient) UpdateNursery(ctx context.Context, in *UpdateNurseryRequest, opts ...grpc.CallOption) (*UpdateNurseryResponse, error) { + out := new(UpdateNurseryResponse) + err := c.cc.Invoke(ctx, NurseryService_UpdateNursery_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // NurseryServiceServer is the server API for NurseryService service. // All implementations should embed UnimplementedNurseryServiceServer // for forward compatibility type NurseryServiceServer interface { CreateNursery(context.Context, *CreateNurseryRequest) (*CreateNurseryResponse, error) NurseryLogin(context.Context, *NurseryLoginRequest) (*NurseryLoginResponse, error) + UpdateNursery(context.Context, *UpdateNurseryRequest) (*UpdateNurseryResponse, error) } // UnimplementedNurseryServiceServer should be embedded to have forward compatible implementations. @@ -75,6 +87,9 @@ func (UnimplementedNurseryServiceServer) CreateNursery(context.Context, *CreateN func (UnimplementedNurseryServiceServer) NurseryLogin(context.Context, *NurseryLoginRequest) (*NurseryLoginResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NurseryLogin not implemented") } +func (UnimplementedNurseryServiceServer) UpdateNursery(context.Context, *UpdateNurseryRequest) (*UpdateNurseryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNursery not implemented") +} // UnsafeNurseryServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to NurseryServiceServer will @@ -123,6 +138,24 @@ func _NurseryService_NurseryLogin_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _NurseryService_UpdateNursery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNurseryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NurseryServiceServer).UpdateNursery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NurseryService_UpdateNursery_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NurseryServiceServer).UpdateNursery(ctx, req.(*UpdateNurseryRequest)) + } + return interceptor(ctx, in, info, handler) +} + // NurseryService_ServiceDesc is the grpc.ServiceDesc for NurseryService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -138,6 +171,10 @@ var NurseryService_ServiceDesc = grpc.ServiceDesc{ MethodName: "NurseryLogin", Handler: _NurseryService_NurseryLogin_Handler, }, + { + MethodName: "UpdateNursery", + Handler: _NurseryService_UpdateNursery_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/nursery.proto", diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index 38e8963b..2a3082d0 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -9,6 +9,7 @@ package where_child_busv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" reflect "reflect" sync "sync" ) @@ -248,6 +249,156 @@ func (x *GetStationListByBusIdResponse) GetPhotos() []*ChildPhoto { return nil } +type UpdateStationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + MorningNextStationId string `protobuf:"bytes,2,opt,name=morning_next_station_id,json=morningNextStationId,proto3" json:"morning_next_station_id,omitempty"` + MorningEveningStationId string `protobuf:"bytes,3,opt,name=morning_evening_station_id,json=morningEveningStationId,proto3" json:"morning_evening_station_id,omitempty"` + Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` + MorningOrder int32 `protobuf:"varint,7,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` + MorningEveningOrder int32 `protobuf:"varint,8,opt,name=morning_evening_order,json=morningEveningOrder,proto3" json:"morning_evening_order,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,9,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateStationRequest) Reset() { + *x = UpdateStationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_station_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateStationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateStationRequest) ProtoMessage() {} + +func (x *UpdateStationRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_station_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateStationRequest.ProtoReflect.Descriptor instead. +func (*UpdateStationRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateStationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateStationRequest) GetMorningNextStationId() string { + if x != nil { + return x.MorningNextStationId + } + return "" +} + +func (x *UpdateStationRequest) GetMorningEveningStationId() string { + if x != nil { + return x.MorningEveningStationId + } + return "" +} + +func (x *UpdateStationRequest) GetLatitude() float64 { + if x != nil { + return x.Latitude + } + return 0 +} + +func (x *UpdateStationRequest) GetLongitude() float64 { + if x != nil { + return x.Longitude + } + return 0 +} + +func (x *UpdateStationRequest) GetMorningOrder() int32 { + if x != nil { + return x.MorningOrder + } + return 0 +} + +func (x *UpdateStationRequest) GetMorningEveningOrder() int32 { + if x != nil { + return x.MorningEveningOrder + } + return 0 +} + +func (x *UpdateStationRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type UpdateStationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Station *Station `protobuf:"bytes,1,opt,name=station,proto3" json:"station,omitempty"` +} + +func (x *UpdateStationResponse) Reset() { + *x = UpdateStationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_station_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateStationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateStationResponse) ProtoMessage() {} + +func (x *UpdateStationResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_station_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateStationResponse.ProtoReflect.Descriptor instead. +func (*UpdateStationResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateStationResponse) GetStation() *Station { + if x != nil { + return x.Station + } + return nil +} + var File_where_child_bus_v1_station_proto protoreflect.FileDescriptor var file_where_child_bus_v1_station_proto_rawDesc = []byte{ @@ -256,77 +407,113 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x28, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, - 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x22, 0x62, 0x0a, 0x29, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x8b, 0x02, - 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x37, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, - 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x32, 0xb1, 0x02, 0x0a, 0x0e, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, - 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, + 0x28, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, + 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, + 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x22, 0x62, 0x0a, 0x29, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, - 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, - 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, + 0x8b, 0x02, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x12, 0x35, + 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0xea, 0x02, + 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, + 0x1a, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x17, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x69, 0x6e, + 0x67, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, + 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, + 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x6f, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x45, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x3b, 0x0a, + 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, 0x15, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x97, 0x03, 0x0a, 0x0e, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, + 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, + 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x3d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, + 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, + 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, + 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -341,32 +528,39 @@ func file_where_child_bus_v1_station_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_station_proto_rawDescData } -var file_where_child_bus_v1_station_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_where_child_bus_v1_station_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_where_child_bus_v1_station_proto_goTypes = []interface{}{ (*UpdateStationLocationByGuardianIdRequest)(nil), // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdRequest (*UpdateStationLocationByGuardianIdResponse)(nil), // 1: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse (*GetStationListByBusIdRequest)(nil), // 2: where_child_bus.v1.GetStationListByBusIdRequest (*GetStationListByBusIdResponse)(nil), // 3: where_child_bus.v1.GetStationListByBusIdResponse - (*Station)(nil), // 4: where_child_bus.v1.Station - (*GuardianResponse)(nil), // 5: where_child_bus.v1.GuardianResponse - (*Child)(nil), // 6: where_child_bus.v1.Child - (*ChildPhoto)(nil), // 7: where_child_bus.v1.ChildPhoto + (*UpdateStationRequest)(nil), // 4: where_child_bus.v1.UpdateStationRequest + (*UpdateStationResponse)(nil), // 5: where_child_bus.v1.UpdateStationResponse + (*Station)(nil), // 6: where_child_bus.v1.Station + (*GuardianResponse)(nil), // 7: where_child_bus.v1.GuardianResponse + (*Child)(nil), // 8: where_child_bus.v1.Child + (*ChildPhoto)(nil), // 9: where_child_bus.v1.ChildPhoto + (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask } var file_where_child_bus_v1_station_proto_depIdxs = []int32{ - 4, // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse.station:type_name -> where_child_bus.v1.Station - 4, // 1: where_child_bus.v1.GetStationListByBusIdResponse.stations:type_name -> where_child_bus.v1.Station - 5, // 2: where_child_bus.v1.GetStationListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse - 6, // 3: where_child_bus.v1.GetStationListByBusIdResponse.children:type_name -> where_child_bus.v1.Child - 7, // 4: where_child_bus.v1.GetStationListByBusIdResponse.photos:type_name -> where_child_bus.v1.ChildPhoto - 0, // 5: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:input_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdRequest - 2, // 6: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest - 1, // 7: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:output_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdResponse - 3, // 8: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse - 7, // [7:9] is the sub-list for method output_type - 5, // [5:7] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 6, // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse.station:type_name -> where_child_bus.v1.Station + 6, // 1: where_child_bus.v1.GetStationListByBusIdResponse.stations:type_name -> where_child_bus.v1.Station + 7, // 2: where_child_bus.v1.GetStationListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 8, // 3: where_child_bus.v1.GetStationListByBusIdResponse.children:type_name -> where_child_bus.v1.Child + 9, // 4: where_child_bus.v1.GetStationListByBusIdResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 10, // 5: where_child_bus.v1.UpdateStationRequest.update_mask:type_name -> google.protobuf.FieldMask + 6, // 6: where_child_bus.v1.UpdateStationResponse.station:type_name -> where_child_bus.v1.Station + 0, // 7: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:input_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdRequest + 2, // 8: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest + 4, // 9: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest + 1, // 10: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:output_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdResponse + 3, // 11: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse + 5, // 12: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse + 10, // [10:13] is the sub-list for method output_type + 7, // [7:10] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_where_child_bus_v1_station_proto_init() } @@ -424,6 +618,30 @@ func file_where_child_bus_v1_station_proto_init() { return nil } } + file_where_child_bus_v1_station_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateStationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_station_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateStationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -431,7 +649,7 @@ func file_where_child_bus_v1_station_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_station_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go index a5800c42..4898f99b 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( StationService_UpdateStationLocationByGuardianId_FullMethodName = "/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId" StationService_GetStationListByBusId_FullMethodName = "/where_child_bus.v1.StationService/GetStationListByBusId" + StationService_UpdateStation_FullMethodName = "/where_child_bus.v1.StationService/UpdateStation" ) // StationServiceClient is the client API for StationService service. @@ -29,6 +30,7 @@ const ( type StationServiceClient interface { UpdateStationLocationByGuardianId(ctx context.Context, in *UpdateStationLocationByGuardianIdRequest, opts ...grpc.CallOption) (*UpdateStationLocationByGuardianIdResponse, error) GetStationListByBusId(ctx context.Context, in *GetStationListByBusIdRequest, opts ...grpc.CallOption) (*GetStationListByBusIdResponse, error) + UpdateStation(ctx context.Context, in *UpdateStationRequest, opts ...grpc.CallOption) (*UpdateStationResponse, error) } type stationServiceClient struct { @@ -57,12 +59,22 @@ func (c *stationServiceClient) GetStationListByBusId(ctx context.Context, in *Ge return out, nil } +func (c *stationServiceClient) UpdateStation(ctx context.Context, in *UpdateStationRequest, opts ...grpc.CallOption) (*UpdateStationResponse, error) { + out := new(UpdateStationResponse) + err := c.cc.Invoke(ctx, StationService_UpdateStation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // StationServiceServer is the server API for StationService service. // All implementations should embed UnimplementedStationServiceServer // for forward compatibility type StationServiceServer interface { UpdateStationLocationByGuardianId(context.Context, *UpdateStationLocationByGuardianIdRequest) (*UpdateStationLocationByGuardianIdResponse, error) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) + UpdateStation(context.Context, *UpdateStationRequest) (*UpdateStationResponse, error) } // UnimplementedStationServiceServer should be embedded to have forward compatible implementations. @@ -75,6 +87,9 @@ func (UnimplementedStationServiceServer) UpdateStationLocationByGuardianId(conte func (UnimplementedStationServiceServer) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStationListByBusId not implemented") } +func (UnimplementedStationServiceServer) UpdateStation(context.Context, *UpdateStationRequest) (*UpdateStationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateStation not implemented") +} // UnsafeStationServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to StationServiceServer will @@ -123,6 +138,24 @@ func _StationService_GetStationListByBusId_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } +func _StationService_UpdateStation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateStationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StationServiceServer).UpdateStation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StationService_UpdateStation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StationServiceServer).UpdateStation(ctx, req.(*UpdateStationRequest)) + } + return interceptor(ctx, in, info, handler) +} + // StationService_ServiceDesc is the grpc.ServiceDesc for StationService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -138,6 +171,10 @@ var StationService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetStationListByBusId", Handler: _StationService_GetStationListByBusId_Handler, }, + { + MethodName: "UpdateStation", + Handler: _StationService_UpdateStation_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "where_child_bus/v1/station.proto", diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index 29678f0c..ac8590b4 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -13,6 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +import '../../google/protobuf/field_mask.pb.dart' as $9; import 'resources.pb.dart' as $8; import 'resources.pbenum.dart' as $8; @@ -769,6 +770,208 @@ class StreamBusVideoResponse extends $pb.GeneratedMessage { $core.List<$8.Child> get children => $_getList(1); } +class UpdateBusRequest extends $pb.GeneratedMessage { + factory UpdateBusRequest({ + $core.String? busId, + $core.String? name, + $core.String? plateNumber, + $8.BusStatus? busStatus, + $core.double? latitude, + $core.double? longitude, + $core.bool? enableFaceRecognition, + $9.FieldMask? updateMask, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + if (name != null) { + $result.name = name; + } + if (plateNumber != null) { + $result.plateNumber = plateNumber; + } + if (busStatus != null) { + $result.busStatus = busStatus; + } + if (latitude != null) { + $result.latitude = latitude; + } + if (longitude != null) { + $result.longitude = longitude; + } + if (enableFaceRecognition != null) { + $result.enableFaceRecognition = enableFaceRecognition; + } + if (updateMask != null) { + $result.updateMask = updateMask; + } + return $result; + } + UpdateBusRequest._() : super(); + factory UpdateBusRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateBusRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateBusRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..aOS(3, _omitFieldNames ? '' : 'plateNumber') + ..e<$8.BusStatus>(4, _omitFieldNames ? '' : 'busStatus', $pb.PbFieldType.OE, defaultOrMaker: $8.BusStatus.BUS_STATUS_UNSPECIFIED, valueOf: $8.BusStatus.valueOf, enumValues: $8.BusStatus.values) + ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..aOB(7, _omitFieldNames ? '' : 'enableFaceRecognition') + ..aOM<$9.FieldMask>(8, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateBusRequest clone() => UpdateBusRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateBusRequest copyWith(void Function(UpdateBusRequest) updates) => super.copyWith((message) => updates(message as UpdateBusRequest)) as UpdateBusRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateBusRequest create() => UpdateBusRequest._(); + UpdateBusRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateBusRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateBusRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get plateNumber => $_getSZ(2); + @$pb.TagNumber(3) + set plateNumber($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPlateNumber() => $_has(2); + @$pb.TagNumber(3) + void clearPlateNumber() => clearField(3); + + @$pb.TagNumber(4) + $8.BusStatus get busStatus => $_getN(3); + @$pb.TagNumber(4) + set busStatus($8.BusStatus v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasBusStatus() => $_has(3); + @$pb.TagNumber(4) + void clearBusStatus() => clearField(4); + + @$pb.TagNumber(5) + $core.double get latitude => $_getN(4); + @$pb.TagNumber(5) + set latitude($core.double v) { $_setDouble(4, v); } + @$pb.TagNumber(5) + $core.bool hasLatitude() => $_has(4); + @$pb.TagNumber(5) + void clearLatitude() => clearField(5); + + @$pb.TagNumber(6) + $core.double get longitude => $_getN(5); + @$pb.TagNumber(6) + set longitude($core.double v) { $_setDouble(5, v); } + @$pb.TagNumber(6) + $core.bool hasLongitude() => $_has(5); + @$pb.TagNumber(6) + void clearLongitude() => clearField(6); + + @$pb.TagNumber(7) + $core.bool get enableFaceRecognition => $_getBF(6); + @$pb.TagNumber(7) + set enableFaceRecognition($core.bool v) { $_setBool(6, v); } + @$pb.TagNumber(7) + $core.bool hasEnableFaceRecognition() => $_has(6); + @$pb.TagNumber(7) + void clearEnableFaceRecognition() => clearField(7); + + @$pb.TagNumber(8) + $9.FieldMask get updateMask => $_getN(7); + @$pb.TagNumber(8) + set updateMask($9.FieldMask v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasUpdateMask() => $_has(7); + @$pb.TagNumber(8) + void clearUpdateMask() => clearField(8); + @$pb.TagNumber(8) + $9.FieldMask ensureUpdateMask() => $_ensure(7); +} + +class UpdateBusResponse extends $pb.GeneratedMessage { + factory UpdateBusResponse({ + $8.Bus? bus, + }) { + final $result = create(); + if (bus != null) { + $result.bus = bus; + } + return $result; + } + UpdateBusResponse._() : super(); + factory UpdateBusResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateBusResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateBusResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $8.Bus.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateBusResponse clone() => UpdateBusResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateBusResponse copyWith(void Function(UpdateBusResponse) updates) => super.copyWith((message) => updates(message as UpdateBusResponse)) as UpdateBusResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateBusResponse create() => UpdateBusResponse._(); + UpdateBusResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateBusResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateBusResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.Bus get bus => $_getN(0); + @$pb.TagNumber(1) + set bus($8.Bus v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasBus() => $_has(0); + @$pb.TagNumber(1) + void clearBus() => clearField(1); + @$pb.TagNumber(1) + $8.Bus ensureBus() => $_ensure(0); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart index 227e31e8..12aa9a92 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart @@ -29,10 +29,10 @@ class BusServiceClient extends $grpc.Client { '/where_child_bus.v1.BusService/GetBusListByNurseryId', ($0.GetBusListByNurseryIdRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.GetBusListByNurseryIdResponse.fromBuffer(value)); - static final _$changeBusStatus = $grpc.ClientMethod<$0.ChangeBusStatusRequest, $0.ChangeBusStatusResponse>( - '/where_child_bus.v1.BusService/ChangeBusStatus', - ($0.ChangeBusStatusRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $0.ChangeBusStatusResponse.fromBuffer(value)); + static final _$updateBus = $grpc.ClientMethod<$0.UpdateBusRequest, $0.UpdateBusResponse>( + '/where_child_bus.v1.BusService/UpdateBus', + ($0.UpdateBusRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.UpdateBusResponse.fromBuffer(value)); static final _$sendLocationContinuous = $grpc.ClientMethod<$0.SendLocationContinuousRequest, $0.SendLocationContinuousResponse>( '/where_child_bus.v1.BusService/SendLocationContinuous', ($0.SendLocationContinuousRequest value) => value.writeToBuffer(), @@ -60,8 +60,8 @@ class BusServiceClient extends $grpc.Client { return $createUnaryCall(_$getBusListByNurseryId, request, options: options); } - $grpc.ResponseFuture<$0.ChangeBusStatusResponse> changeBusStatus($0.ChangeBusStatusRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$changeBusStatus, request, options: options); + $grpc.ResponseFuture<$0.UpdateBusResponse> updateBus($0.UpdateBusRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$updateBus, request, options: options); } $grpc.ResponseFuture<$0.SendLocationContinuousResponse> sendLocationContinuous($async.Stream<$0.SendLocationContinuousRequest> request, {$grpc.CallOptions? options}) { @@ -96,13 +96,13 @@ abstract class BusServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $0.GetBusListByNurseryIdRequest.fromBuffer(value), ($0.GetBusListByNurseryIdResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$0.ChangeBusStatusRequest, $0.ChangeBusStatusResponse>( - 'ChangeBusStatus', - changeBusStatus_Pre, + $addMethod($grpc.ServiceMethod<$0.UpdateBusRequest, $0.UpdateBusResponse>( + 'UpdateBus', + updateBus_Pre, false, false, - ($core.List<$core.int> value) => $0.ChangeBusStatusRequest.fromBuffer(value), - ($0.ChangeBusStatusResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $0.UpdateBusRequest.fromBuffer(value), + ($0.UpdateBusResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.SendLocationContinuousRequest, $0.SendLocationContinuousResponse>( 'SendLocationContinuous', sendLocationContinuous, @@ -134,8 +134,8 @@ abstract class BusServiceBase extends $grpc.Service { return getBusListByNurseryId(call, await request); } - $async.Future<$0.ChangeBusStatusResponse> changeBusStatus_Pre($grpc.ServiceCall call, $async.Future<$0.ChangeBusStatusRequest> request) async { - return changeBusStatus(call, await request); + $async.Future<$0.UpdateBusResponse> updateBus_Pre($grpc.ServiceCall call, $async.Future<$0.UpdateBusRequest> request) async { + return updateBus(call, await request); } $async.Stream<$0.TrackBusContinuousResponse> trackBusContinuous_Pre($grpc.ServiceCall call, $async.Future<$0.TrackBusContinuousRequest> request) async* { @@ -144,7 +144,7 @@ abstract class BusServiceBase extends $grpc.Service { $async.Future<$0.CreateBusResponse> createBus($grpc.ServiceCall call, $0.CreateBusRequest request); $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($grpc.ServiceCall call, $0.GetBusListByNurseryIdRequest request); - $async.Future<$0.ChangeBusStatusResponse> changeBusStatus($grpc.ServiceCall call, $0.ChangeBusStatusRequest request); + $async.Future<$0.UpdateBusResponse> updateBus($grpc.ServiceCall call, $0.UpdateBusRequest request); $async.Future<$0.SendLocationContinuousResponse> sendLocationContinuous($grpc.ServiceCall call, $async.Stream<$0.SendLocationContinuousRequest> request); $async.Stream<$0.TrackBusContinuousResponse> trackBusContinuous($grpc.ServiceCall call, $0.TrackBusContinuousRequest request); $async.Future<$0.StreamBusVideoResponse> streamBusVideo($grpc.ServiceCall call, $async.Stream<$0.StreamBusVideoRequest> request); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 52d96a64..18749ce0 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -185,3 +185,40 @@ final $typed_data.Uint8List streamBusVideoResponseDescriptor = $convert.base64De 'VkEjUKCGNoaWxkcmVuGAIgAygLMhkud2hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJl' 'bg=='); +@$core.Deprecated('Use updateBusRequestDescriptor instead') +const UpdateBusRequest$json = { + '1': 'UpdateBusRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'plate_number', '3': 3, '4': 1, '5': 9, '10': 'plateNumber'}, + {'1': 'bus_status', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusStatus', '10': 'busStatus'}, + {'1': 'latitude', '3': 5, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 6, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'enable_face_recognition', '3': 7, '4': 1, '5': 8, '10': 'enableFaceRecognition'}, + {'1': 'update_mask', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, + ], +}; + +/// Descriptor for `UpdateBusRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateBusRequestDescriptor = $convert.base64Decode( + 'ChBVcGRhdGVCdXNSZXF1ZXN0EhUKBmJ1c19pZBgBIAEoCVIFYnVzSWQSEgoEbmFtZRgCIAEoCV' + 'IEbmFtZRIhCgxwbGF0ZV9udW1iZXIYAyABKAlSC3BsYXRlTnVtYmVyEjwKCmJ1c19zdGF0dXMY' + 'BCABKA4yHS53aGVyZV9jaGlsZF9idXMudjEuQnVzU3RhdHVzUglidXNTdGF0dXMSGgoIbGF0aX' + 'R1ZGUYBSABKAFSCGxhdGl0dWRlEhwKCWxvbmdpdHVkZRgGIAEoAVIJbG9uZ2l0dWRlEjYKF2Vu' + 'YWJsZV9mYWNlX3JlY29nbml0aW9uGAcgASgIUhVlbmFibGVGYWNlUmVjb2duaXRpb24SOwoLdX' + 'BkYXRlX21hc2sYCCABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrUgp1cGRhdGVNYXNr'); + +@$core.Deprecated('Use updateBusResponseDescriptor instead') +const UpdateBusResponse$json = { + '1': 'UpdateBusResponse', + '2': [ + {'1': 'bus', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Bus', '10': 'bus'}, + ], +}; + +/// Descriptor for `UpdateBusResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateBusResponseDescriptor = $convert.base64Decode( + 'ChFVcGRhdGVCdXNSZXNwb25zZRIpCgNidXMYASABKAsyFy53aGVyZV9jaGlsZF9idXMudjEuQn' + 'VzUgNidXM='); + diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart index 9dcb9ac3..aef485d8 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -13,6 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +import '../../google/protobuf/field_mask.pb.dart' as $9; import 'resources.pb.dart' as $8; class CreateNurseryRequest extends $pb.GeneratedMessage { @@ -303,6 +304,194 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { $8.NurseryResponse ensureNursery() => $_ensure(1); } +class UpdateNurseryRequest extends $pb.GeneratedMessage { + factory UpdateNurseryRequest({ + $core.String? id, + $core.String? name, + $core.String? adress, + $core.String? phoneNumber, + $core.String? email, + $core.String? password, + $9.FieldMask? updateMask, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (name != null) { + $result.name = name; + } + if (adress != null) { + $result.adress = adress; + } + if (phoneNumber != null) { + $result.phoneNumber = phoneNumber; + } + if (email != null) { + $result.email = email; + } + if (password != null) { + $result.password = password; + } + if (updateMask != null) { + $result.updateMask = updateMask; + } + return $result; + } + UpdateNurseryRequest._() : super(); + factory UpdateNurseryRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateNurseryRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateNurseryRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..aOS(3, _omitFieldNames ? '' : 'adress') + ..aOS(4, _omitFieldNames ? '' : 'phoneNumber') + ..aOS(5, _omitFieldNames ? '' : 'email') + ..aOS(6, _omitFieldNames ? '' : 'password') + ..aOM<$9.FieldMask>(7, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateNurseryRequest clone() => UpdateNurseryRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateNurseryRequest copyWith(void Function(UpdateNurseryRequest) updates) => super.copyWith((message) => updates(message as UpdateNurseryRequest)) as UpdateNurseryRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateNurseryRequest create() => UpdateNurseryRequest._(); + UpdateNurseryRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateNurseryRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateNurseryRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get adress => $_getSZ(2); + @$pb.TagNumber(3) + set adress($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasAdress() => $_has(2); + @$pb.TagNumber(3) + void clearAdress() => clearField(3); + + @$pb.TagNumber(4) + $core.String get phoneNumber => $_getSZ(3); + @$pb.TagNumber(4) + set phoneNumber($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPhoneNumber() => $_has(3); + @$pb.TagNumber(4) + void clearPhoneNumber() => clearField(4); + + @$pb.TagNumber(5) + $core.String get email => $_getSZ(4); + @$pb.TagNumber(5) + set email($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasEmail() => $_has(4); + @$pb.TagNumber(5) + void clearEmail() => clearField(5); + + @$pb.TagNumber(6) + $core.String get password => $_getSZ(5); + @$pb.TagNumber(6) + set password($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasPassword() => $_has(5); + @$pb.TagNumber(6) + void clearPassword() => clearField(6); + + @$pb.TagNumber(7) + $9.FieldMask get updateMask => $_getN(6); + @$pb.TagNumber(7) + set updateMask($9.FieldMask v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasUpdateMask() => $_has(6); + @$pb.TagNumber(7) + void clearUpdateMask() => clearField(7); + @$pb.TagNumber(7) + $9.FieldMask ensureUpdateMask() => $_ensure(6); +} + +class UpdateNurseryResponse extends $pb.GeneratedMessage { + factory UpdateNurseryResponse({ + $8.NurseryResponse? nursery, + }) { + final $result = create(); + if (nursery != null) { + $result.nursery = nursery; + } + return $result; + } + UpdateNurseryResponse._() : super(); + factory UpdateNurseryResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateNurseryResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateNurseryResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.NurseryResponse>(1, _omitFieldNames ? '' : 'nursery', subBuilder: $8.NurseryResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateNurseryResponse clone() => UpdateNurseryResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateNurseryResponse copyWith(void Function(UpdateNurseryResponse) updates) => super.copyWith((message) => updates(message as UpdateNurseryResponse)) as UpdateNurseryResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateNurseryResponse create() => UpdateNurseryResponse._(); + UpdateNurseryResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateNurseryResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateNurseryResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.NurseryResponse get nursery => $_getN(0); + @$pb.TagNumber(1) + set nursery($8.NurseryResponse v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasNursery() => $_has(0); + @$pb.TagNumber(1) + void clearNursery() => clearField(1); + @$pb.TagNumber(1) + $8.NurseryResponse ensureNursery() => $_ensure(0); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart index 4c71cd96..e15cb6e1 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart @@ -29,6 +29,10 @@ class NurseryServiceClient extends $grpc.Client { '/where_child_bus.v1.NurseryService/NurseryLogin', ($5.NurseryLoginRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $5.NurseryLoginResponse.fromBuffer(value)); + static final _$updateNursery = $grpc.ClientMethod<$5.UpdateNurseryRequest, $5.UpdateNurseryResponse>( + '/where_child_bus.v1.NurseryService/UpdateNursery', + ($5.UpdateNurseryRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $5.UpdateNurseryResponse.fromBuffer(value)); NurseryServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -43,6 +47,10 @@ class NurseryServiceClient extends $grpc.Client { $grpc.ResponseFuture<$5.NurseryLoginResponse> nurseryLogin($5.NurseryLoginRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$nurseryLogin, request, options: options); } + + $grpc.ResponseFuture<$5.UpdateNurseryResponse> updateNursery($5.UpdateNurseryRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$updateNursery, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.NurseryService') @@ -64,6 +72,13 @@ abstract class NurseryServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $5.NurseryLoginRequest.fromBuffer(value), ($5.NurseryLoginResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$5.UpdateNurseryRequest, $5.UpdateNurseryResponse>( + 'UpdateNursery', + updateNursery_Pre, + false, + false, + ($core.List<$core.int> value) => $5.UpdateNurseryRequest.fromBuffer(value), + ($5.UpdateNurseryResponse value) => value.writeToBuffer())); } $async.Future<$5.CreateNurseryResponse> createNursery_Pre($grpc.ServiceCall call, $async.Future<$5.CreateNurseryRequest> request) async { @@ -74,6 +89,11 @@ abstract class NurseryServiceBase extends $grpc.Service { return nurseryLogin(call, await request); } + $async.Future<$5.UpdateNurseryResponse> updateNursery_Pre($grpc.ServiceCall call, $async.Future<$5.UpdateNurseryRequest> request) async { + return updateNursery(call, await request); + } + $async.Future<$5.CreateNurseryResponse> createNursery($grpc.ServiceCall call, $5.CreateNurseryRequest request); $async.Future<$5.NurseryLoginResponse> nurseryLogin($grpc.ServiceCall call, $5.NurseryLoginRequest request); + $async.Future<$5.UpdateNurseryResponse> updateNursery($grpc.ServiceCall call, $5.UpdateNurseryRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart index 2526f3f5..cc719561 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart @@ -72,3 +72,38 @@ final $typed_data.Uint8List nurseryLoginResponseDescriptor = $convert.base64Deco 'ChROdXJzZXJ5TG9naW5SZXNwb25zZRIYCgdzdWNjZXNzGAEgASgIUgdzdWNjZXNzEj0KB251cn' 'NlcnkYAiABKAsyIy53aGVyZV9jaGlsZF9idXMudjEuTnVyc2VyeVJlc3BvbnNlUgdudXJzZXJ5'); +@$core.Deprecated('Use updateNurseryRequestDescriptor instead') +const UpdateNurseryRequest$json = { + '1': 'UpdateNurseryRequest', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'adress', '3': 3, '4': 1, '5': 9, '10': 'adress'}, + {'1': 'phone_number', '3': 4, '4': 1, '5': 9, '10': 'phoneNumber'}, + {'1': 'email', '3': 5, '4': 1, '5': 9, '10': 'email'}, + {'1': 'password', '3': 6, '4': 1, '5': 9, '10': 'password'}, + {'1': 'update_mask', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, + ], +}; + +/// Descriptor for `UpdateNurseryRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateNurseryRequestDescriptor = $convert.base64Decode( + 'ChRVcGRhdGVOdXJzZXJ5UmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSEgoEbmFtZRgCIAEoCVIEbm' + 'FtZRIWCgZhZHJlc3MYAyABKAlSBmFkcmVzcxIhCgxwaG9uZV9udW1iZXIYBCABKAlSC3Bob25l' + 'TnVtYmVyEhQKBWVtYWlsGAUgASgJUgVlbWFpbBIaCghwYXNzd29yZBgGIAEoCVIIcGFzc3dvcm' + 'QSOwoLdXBkYXRlX21hc2sYByABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrUgp1cGRh' + 'dGVNYXNr'); + +@$core.Deprecated('Use updateNurseryResponseDescriptor instead') +const UpdateNurseryResponse$json = { + '1': 'UpdateNurseryResponse', + '2': [ + {'1': 'nursery', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.NurseryResponse', '10': 'nursery'}, + ], +}; + +/// Descriptor for `UpdateNurseryResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateNurseryResponseDescriptor = $convert.base64Decode( + 'ChVVcGRhdGVOdXJzZXJ5UmVzcG9uc2USPQoHbnVyc2VyeRgBIAEoCzIjLndoZXJlX2NoaWxkX2' + 'J1cy52MS5OdXJzZXJ5UmVzcG9uc2VSB251cnNlcnk='); + diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart index a224d682..57b67cef 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -13,6 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +import '../../google/protobuf/field_mask.pb.dart' as $9; import 'resources.pb.dart' as $8; class UpdateStationLocationByGuardianIdRequest extends $pb.GeneratedMessage { @@ -263,6 +264,208 @@ class GetStationListByBusIdResponse extends $pb.GeneratedMessage { $core.List<$8.ChildPhoto> get photos => $_getList(3); } +class UpdateStationRequest extends $pb.GeneratedMessage { + factory UpdateStationRequest({ + $core.String? id, + $core.String? morningNextStationId, + $core.String? morningEveningStationId, + $core.double? latitude, + $core.double? longitude, + $core.int? morningOrder, + $core.int? morningEveningOrder, + $9.FieldMask? updateMask, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (morningNextStationId != null) { + $result.morningNextStationId = morningNextStationId; + } + if (morningEveningStationId != null) { + $result.morningEveningStationId = morningEveningStationId; + } + if (latitude != null) { + $result.latitude = latitude; + } + if (longitude != null) { + $result.longitude = longitude; + } + if (morningOrder != null) { + $result.morningOrder = morningOrder; + } + if (morningEveningOrder != null) { + $result.morningEveningOrder = morningEveningOrder; + } + if (updateMask != null) { + $result.updateMask = updateMask; + } + return $result; + } + UpdateStationRequest._() : super(); + factory UpdateStationRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateStationRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'morningNextStationId') + ..aOS(3, _omitFieldNames ? '' : 'morningEveningStationId') + ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..a<$core.int>(7, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) + ..a<$core.int>(8, _omitFieldNames ? '' : 'morningEveningOrder', $pb.PbFieldType.O3) + ..aOM<$9.FieldMask>(9, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateStationRequest clone() => UpdateStationRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateStationRequest copyWith(void Function(UpdateStationRequest) updates) => super.copyWith((message) => updates(message as UpdateStationRequest)) as UpdateStationRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateStationRequest create() => UpdateStationRequest._(); + UpdateStationRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateStationRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateStationRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get morningNextStationId => $_getSZ(1); + @$pb.TagNumber(2) + set morningNextStationId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasMorningNextStationId() => $_has(1); + @$pb.TagNumber(2) + void clearMorningNextStationId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get morningEveningStationId => $_getSZ(2); + @$pb.TagNumber(3) + set morningEveningStationId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasMorningEveningStationId() => $_has(2); + @$pb.TagNumber(3) + void clearMorningEveningStationId() => clearField(3); + + @$pb.TagNumber(5) + $core.double get latitude => $_getN(3); + @$pb.TagNumber(5) + set latitude($core.double v) { $_setDouble(3, v); } + @$pb.TagNumber(5) + $core.bool hasLatitude() => $_has(3); + @$pb.TagNumber(5) + void clearLatitude() => clearField(5); + + @$pb.TagNumber(6) + $core.double get longitude => $_getN(4); + @$pb.TagNumber(6) + set longitude($core.double v) { $_setDouble(4, v); } + @$pb.TagNumber(6) + $core.bool hasLongitude() => $_has(4); + @$pb.TagNumber(6) + void clearLongitude() => clearField(6); + + @$pb.TagNumber(7) + $core.int get morningOrder => $_getIZ(5); + @$pb.TagNumber(7) + set morningOrder($core.int v) { $_setSignedInt32(5, v); } + @$pb.TagNumber(7) + $core.bool hasMorningOrder() => $_has(5); + @$pb.TagNumber(7) + void clearMorningOrder() => clearField(7); + + @$pb.TagNumber(8) + $core.int get morningEveningOrder => $_getIZ(6); + @$pb.TagNumber(8) + set morningEveningOrder($core.int v) { $_setSignedInt32(6, v); } + @$pb.TagNumber(8) + $core.bool hasMorningEveningOrder() => $_has(6); + @$pb.TagNumber(8) + void clearMorningEveningOrder() => clearField(8); + + @$pb.TagNumber(9) + $9.FieldMask get updateMask => $_getN(7); + @$pb.TagNumber(9) + set updateMask($9.FieldMask v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasUpdateMask() => $_has(7); + @$pb.TagNumber(9) + void clearUpdateMask() => clearField(9); + @$pb.TagNumber(9) + $9.FieldMask ensureUpdateMask() => $_ensure(7); +} + +class UpdateStationResponse extends $pb.GeneratedMessage { + factory UpdateStationResponse({ + $8.Station? station, + }) { + final $result = create(); + if (station != null) { + $result.station = station; + } + return $result; + } + UpdateStationResponse._() : super(); + factory UpdateStationResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateStationResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.Station>(1, _omitFieldNames ? '' : 'station', subBuilder: $8.Station.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateStationResponse clone() => UpdateStationResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateStationResponse copyWith(void Function(UpdateStationResponse) updates) => super.copyWith((message) => updates(message as UpdateStationResponse)) as UpdateStationResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateStationResponse create() => UpdateStationResponse._(); + UpdateStationResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateStationResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateStationResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.Station get station => $_getN(0); + @$pb.TagNumber(1) + set station($8.Station v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasStation() => $_has(0); + @$pb.TagNumber(1) + void clearStation() => clearField(1); + @$pb.TagNumber(1) + $8.Station ensureStation() => $_ensure(0); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart index b6bd8f83..cdbbe30e 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart @@ -29,6 +29,10 @@ class StationServiceClient extends $grpc.Client { '/where_child_bus.v1.StationService/GetStationListByBusId', ($6.GetStationListByBusIdRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $6.GetStationListByBusIdResponse.fromBuffer(value)); + static final _$updateStation = $grpc.ClientMethod<$6.UpdateStationRequest, $6.UpdateStationResponse>( + '/where_child_bus.v1.StationService/UpdateStation', + ($6.UpdateStationRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.UpdateStationResponse.fromBuffer(value)); StationServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -43,6 +47,10 @@ class StationServiceClient extends $grpc.Client { $grpc.ResponseFuture<$6.GetStationListByBusIdResponse> getStationListByBusId($6.GetStationListByBusIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getStationListByBusId, request, options: options); } + + $grpc.ResponseFuture<$6.UpdateStationResponse> updateStation($6.UpdateStationRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$updateStation, request, options: options); + } } @$pb.GrpcServiceName('where_child_bus.v1.StationService') @@ -64,6 +72,13 @@ abstract class StationServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $6.GetStationListByBusIdRequest.fromBuffer(value), ($6.GetStationListByBusIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$6.UpdateStationRequest, $6.UpdateStationResponse>( + 'UpdateStation', + updateStation_Pre, + false, + false, + ($core.List<$core.int> value) => $6.UpdateStationRequest.fromBuffer(value), + ($6.UpdateStationResponse value) => value.writeToBuffer())); } $async.Future<$6.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId_Pre($grpc.ServiceCall call, $async.Future<$6.UpdateStationLocationByGuardianIdRequest> request) async { @@ -74,6 +89,11 @@ abstract class StationServiceBase extends $grpc.Service { return getStationListByBusId(call, await request); } + $async.Future<$6.UpdateStationResponse> updateStation_Pre($grpc.ServiceCall call, $async.Future<$6.UpdateStationRequest> request) async { + return updateStation(call, await request); + } + $async.Future<$6.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId($grpc.ServiceCall call, $6.UpdateStationLocationByGuardianIdRequest request); $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId($grpc.ServiceCall call, $6.GetStationListByBusIdRequest request); + $async.Future<$6.UpdateStationResponse> updateStation($grpc.ServiceCall call, $6.UpdateStationRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart index cfb593eb..f0a6a8b1 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -73,3 +73,41 @@ final $typed_data.Uint8List getStationListByBusIdResponseDescriptor = $convert.b 'VuGAMgAygLMhkud2hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJlbhI2CgZwaG90b3MY' 'BCADKAsyHi53aGVyZV9jaGlsZF9idXMudjEuQ2hpbGRQaG90b1IGcGhvdG9z'); +@$core.Deprecated('Use updateStationRequestDescriptor instead') +const UpdateStationRequest$json = { + '1': 'UpdateStationRequest', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'morning_next_station_id', '3': 2, '4': 1, '5': 9, '10': 'morningNextStationId'}, + {'1': 'morning_evening_station_id', '3': 3, '4': 1, '5': 9, '10': 'morningEveningStationId'}, + {'1': 'latitude', '3': 5, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 6, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'morning_order', '3': 7, '4': 1, '5': 5, '10': 'morningOrder'}, + {'1': 'morning_evening_order', '3': 8, '4': 1, '5': 5, '10': 'morningEveningOrder'}, + {'1': 'update_mask', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, + ], +}; + +/// Descriptor for `UpdateStationRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateStationRequestDescriptor = $convert.base64Decode( + 'ChRVcGRhdGVTdGF0aW9uUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSNQoXbW9ybmluZ19uZXh0X3' + 'N0YXRpb25faWQYAiABKAlSFG1vcm5pbmdOZXh0U3RhdGlvbklkEjsKGm1vcm5pbmdfZXZlbmlu' + 'Z19zdGF0aW9uX2lkGAMgASgJUhdtb3JuaW5nRXZlbmluZ1N0YXRpb25JZBIaCghsYXRpdHVkZR' + 'gFIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAYgASgBUglsb25naXR1ZGUSIwoNbW9ybmlu' + 'Z19vcmRlchgHIAEoBVIMbW9ybmluZ09yZGVyEjIKFW1vcm5pbmdfZXZlbmluZ19vcmRlchgIIA' + 'EoBVITbW9ybmluZ0V2ZW5pbmdPcmRlchI7Cgt1cGRhdGVfbWFzaxgJIAEoCzIaLmdvb2dsZS5w' + 'cm90b2J1Zi5GaWVsZE1hc2tSCnVwZGF0ZU1hc2s='); + +@$core.Deprecated('Use updateStationResponseDescriptor instead') +const UpdateStationResponse$json = { + '1': 'UpdateStationResponse', + '2': [ + {'1': 'station', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Station', '10': 'station'}, + ], +}; + +/// Descriptor for `UpdateStationResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateStationResponseDescriptor = $convert.base64Decode( + 'ChVVcGRhdGVTdGF0aW9uUmVzcG9uc2USNQoHc3RhdGlvbhgBIAEoCzIbLndoZXJlX2NoaWxkX2' + 'J1cy52MS5TdGF0aW9uUgdzdGF0aW9u'); + diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index bf16a93b..2be8f5c3 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -7,55 +7,51 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from generated.where_child_bus.v1 import ( - resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, -) +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude" \n\x1eSendLocationContinuousResponse"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren2\xb6\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' -) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xa4\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.bus_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.bus_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals["DESCRIPTOR"]._serialized_options = ( - b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - ) - _globals["_CREATEBUSREQUEST"]._serialized_start = 89 - _globals["_CREATEBUSREQUEST"]._serialized_end = 293 - _globals["_CREATEBUSRESPONSE"]._serialized_start = 295 - _globals["_CREATEBUSRESPONSE"]._serialized_end = 357 - _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_start = 359 - _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_end = 420 - _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_start = 422 - _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_end = 500 - _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_start = 502 - _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_end = 611 - _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_start = 613 - _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_end = 681 - _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_start = 683 - _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_end = 795 - _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_start = 797 - _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_end = 829 - _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_start = 831 - _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_end = 881 - _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_start = 883 - _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_end = 992 - _globals["_STREAMBUSVIDEOREQUEST"]._serialized_start = 995 - _globals["_STREAMBUSVIDEOREQUEST"]._serialized_end = 1232 - _globals["_STREAMBUSVIDEORESPONSE"]._serialized_start = 1234 - _globals["_STREAMBUSVIDEORESPONSE"]._serialized_end = 1346 - _globals["_BUSSERVICE"]._serialized_start = 1349 - _globals["_BUSSERVICE"]._serialized_end = 2043 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_CREATEBUSREQUEST']._serialized_start=123 + _globals['_CREATEBUSREQUEST']._serialized_end=327 + _globals['_CREATEBUSRESPONSE']._serialized_start=329 + _globals['_CREATEBUSRESPONSE']._serialized_end=391 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=393 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=454 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=456 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=534 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=536 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=645 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=647 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=715 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=717 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=829 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=831 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=863 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=865 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=915 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=917 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1026 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1029 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1266 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1268 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1380 + _globals['_UPDATEBUSREQUEST']._serialized_start=1383 + _globals['_UPDATEBUSREQUEST']._serialized_end=1716 + _globals['_UPDATEBUSRESPONSE']._serialized_start=1718 + _globals['_UPDATEBUSRESPONSE']._serialized_end=1780 + _globals['_BUSSERVICE']._serialized_start=1783 + _globals['_BUSSERVICE']._serialized_end=2459 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index db7a762a..ce23fb39 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -1,4 +1,5 @@ from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import field_mask_pb2 as _field_mask_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -103,3 +104,29 @@ class StreamBusVideoResponse(_message.Message): is_detected: bool children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] def __init__(self, is_detected: bool = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... + +class UpdateBusRequest(_message.Message): + __slots__ = ("bus_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "update_mask") + BUS_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] + BUS_STATUS_FIELD_NUMBER: _ClassVar[int] + LATITUDE_FIELD_NUMBER: _ClassVar[int] + LONGITUDE_FIELD_NUMBER: _ClassVar[int] + ENABLE_FACE_RECOGNITION_FIELD_NUMBER: _ClassVar[int] + UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] + bus_id: str + name: str + plate_number: str + bus_status: _resources_pb2.BusStatus + latitude: float + longitude: float + enable_face_recognition: bool + update_mask: _field_mask_pb2.FieldMask + def __init__(self, bus_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + +class UpdateBusResponse(_message.Message): + __slots__ = ("bus",) + BUS_FIELD_NUMBER: _ClassVar[int] + bus: _resources_pb2.Bus + def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py index ba60c094..05c27480 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py @@ -24,10 +24,10 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, ) - self.ChangeBusStatus = channel.unary_unary( - '/where_child_bus.v1.BusService/ChangeBusStatus', - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.FromString, + self.UpdateBus = channel.unary_unary( + '/where_child_bus.v1.BusService/UpdateBus', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.FromString, ) self.SendLocationContinuous = channel.stream_unary( '/where_child_bus.v1.BusService/SendLocationContinuous', @@ -61,7 +61,7 @@ def GetBusListByNurseryId(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def ChangeBusStatus(self, request, context): + def UpdateBus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -98,10 +98,10 @@ def add_BusServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.SerializeToString, ), - 'ChangeBusStatus': grpc.unary_unary_rpc_method_handler( - servicer.ChangeBusStatus, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.SerializeToString, + 'UpdateBus': grpc.unary_unary_rpc_method_handler( + servicer.UpdateBus, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.SerializeToString, ), 'SendLocationContinuous': grpc.stream_unary_rpc_method_handler( servicer.SendLocationContinuous, @@ -163,7 +163,7 @@ def GetBusListByNurseryId(request, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def ChangeBusStatus(request, + def UpdateBus(request, target, options=(), channel_credentials=None, @@ -173,9 +173,9 @@ def ChangeBusStatus(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/ChangeBusStatus', - where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.SerializeToString, - where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/UpdateBus', + where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py index c827e961..fd586875 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py @@ -13,9 +13,10 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xd9\x01\n\x0eNurseryService\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"\xe4\x01\n\x14UpdateNurseryRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x16\n\x06\x61\x64ress\x18\x03 \x01(\tR\x06\x61\x64ress\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x05 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x06 \x01(\tR\x08password\x12;\n\x0bupdate_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"V\n\x15UpdateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xbf\x02\n\x0eNurseryService\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponse\x12\x64\n\rUpdateNursery\x12(.where_child_bus.v1.UpdateNurseryRequest\x1a).where_child_bus.v1.UpdateNurseryResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +24,18 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014NurseryProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATENURSERYREQUEST']._serialized_start=93 - _globals['_CREATENURSERYREQUEST']._serialized_end=246 - _globals['_CREATENURSERYRESPONSE']._serialized_start=248 - _globals['_CREATENURSERYRESPONSE']._serialized_end=334 - _globals['_NURSERYLOGINREQUEST']._serialized_start=336 - _globals['_NURSERYLOGINREQUEST']._serialized_end=407 - _globals['_NURSERYLOGINRESPONSE']._serialized_start=409 - _globals['_NURSERYLOGINRESPONSE']._serialized_end=520 - _globals['_NURSERYSERVICE']._serialized_start=523 - _globals['_NURSERYSERVICE']._serialized_end=740 + _globals['_CREATENURSERYREQUEST']._serialized_start=127 + _globals['_CREATENURSERYREQUEST']._serialized_end=280 + _globals['_CREATENURSERYRESPONSE']._serialized_start=282 + _globals['_CREATENURSERYRESPONSE']._serialized_end=368 + _globals['_NURSERYLOGINREQUEST']._serialized_start=370 + _globals['_NURSERYLOGINREQUEST']._serialized_end=441 + _globals['_NURSERYLOGINRESPONSE']._serialized_start=443 + _globals['_NURSERYLOGINRESPONSE']._serialized_end=554 + _globals['_UPDATENURSERYREQUEST']._serialized_start=557 + _globals['_UPDATENURSERYREQUEST']._serialized_end=785 + _globals['_UPDATENURSERYRESPONSE']._serialized_start=787 + _globals['_UPDATENURSERYRESPONSE']._serialized_end=873 + _globals['_NURSERYSERVICE']._serialized_start=876 + _globals['_NURSERYSERVICE']._serialized_end=1195 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi index fbce8808..922b63ec 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi @@ -1,4 +1,5 @@ from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import field_mask_pb2 as _field_mask_pb2 from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union @@ -40,3 +41,27 @@ class NurseryLoginResponse(_message.Message): success: bool nursery: _resources_pb2.NurseryResponse def __init__(self, success: bool = ..., nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... + +class UpdateNurseryRequest(_message.Message): + __slots__ = ("id", "name", "adress", "phone_number", "email", "password", "update_mask") + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + ADRESS_FIELD_NUMBER: _ClassVar[int] + PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + EMAIL_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] + id: str + name: str + adress: str + phone_number: str + email: str + password: str + update_mask: _field_mask_pb2.FieldMask + def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., adress: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., password: _Optional[str] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + +class UpdateNurseryResponse(_message.Message): + __slots__ = ("nursery",) + NURSERY_FIELD_NUMBER: _ClassVar[int] + nursery: _resources_pb2.NurseryResponse + def __init__(self, nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py index 2d559ee0..df523dce 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py @@ -24,6 +24,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.FromString, ) + self.UpdateNursery = channel.unary_unary( + '/where_child_bus.v1.NurseryService/UpdateNursery', + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.FromString, + ) class NurseryServiceServicer(object): @@ -41,6 +46,12 @@ def NurseryLogin(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def UpdateNursery(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_NurseryServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -54,6 +65,11 @@ def add_NurseryServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.SerializeToString, ), + 'UpdateNursery': grpc.unary_unary_rpc_method_handler( + servicer.UpdateNursery, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.NurseryService', rpc_method_handlers) @@ -97,3 +113,20 @@ def NurseryLogin(request, where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateNursery(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/UpdateNursery', + where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.SerializeToString, + where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py index 39634376..31dbf5ab 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py @@ -13,9 +13,10 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos2\xb1\x02\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"\xea\x02\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x35\n\x17morning_next_station_id\x18\x02 \x01(\tR\x14morningNextStationId\x12;\n\x1amorning_evening_station_id\x18\x03 \x01(\tR\x17morningEveningStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12\x32\n\x15morning_evening_order\x18\x08 \x01(\x05R\x13morningEveningOrder\x12;\n\x0bupdate_mask\x18\t \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\x97\x03\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +24,18 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014StationProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDREQUEST']._serialized_start=93 - _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDREQUEST']._serialized_end=226 - _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDRESPONSE']._serialized_start=228 - _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDRESPONSE']._serialized_end=326 - _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_start=328 - _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_end=381 - _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=384 - _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=651 - _globals['_STATIONSERVICE']._serialized_start=654 - _globals['_STATIONSERVICE']._serialized_end=959 + _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDREQUEST']._serialized_start=127 + _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDREQUEST']._serialized_end=260 + _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDRESPONSE']._serialized_start=262 + _globals['_UPDATESTATIONLOCATIONBYGUARDIANIDRESPONSE']._serialized_end=360 + _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_start=362 + _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_end=415 + _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=418 + _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=685 + _globals['_UPDATESTATIONREQUEST']._serialized_start=688 + _globals['_UPDATESTATIONREQUEST']._serialized_end=1050 + _globals['_UPDATESTATIONRESPONSE']._serialized_start=1052 + _globals['_UPDATESTATIONRESPONSE']._serialized_end=1130 + _globals['_STATIONSERVICE']._serialized_start=1133 + _globals['_STATIONSERVICE']._serialized_end=1540 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi index d5ca97d3..2a4d9787 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi @@ -1,4 +1,5 @@ from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import field_mask_pb2 as _field_mask_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -39,3 +40,29 @@ class GetStationListByBusIdResponse(_message.Message): children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... + +class UpdateStationRequest(_message.Message): + __slots__ = ("id", "morning_next_station_id", "morning_evening_station_id", "latitude", "longitude", "morning_order", "morning_evening_order", "update_mask") + ID_FIELD_NUMBER: _ClassVar[int] + MORNING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] + MORNING_EVENING_STATION_ID_FIELD_NUMBER: _ClassVar[int] + LATITUDE_FIELD_NUMBER: _ClassVar[int] + LONGITUDE_FIELD_NUMBER: _ClassVar[int] + MORNING_ORDER_FIELD_NUMBER: _ClassVar[int] + MORNING_EVENING_ORDER_FIELD_NUMBER: _ClassVar[int] + UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] + id: str + morning_next_station_id: str + morning_evening_station_id: str + latitude: float + longitude: float + morning_order: int + morning_evening_order: int + update_mask: _field_mask_pb2.FieldMask + def __init__(self, id: _Optional[str] = ..., morning_next_station_id: _Optional[str] = ..., morning_evening_station_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., morning_order: _Optional[int] = ..., morning_evening_order: _Optional[int] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + +class UpdateStationResponse(_message.Message): + __slots__ = ("station",) + STATION_FIELD_NUMBER: _ClassVar[int] + station: _resources_pb2.Station + def __init__(self, station: _Optional[_Union[_resources_pb2.Station, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py index d1b97011..dceeb8e4 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py @@ -24,6 +24,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.FromString, ) + self.UpdateStation = channel.unary_unary( + '/where_child_bus.v1.StationService/UpdateStation', + request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, + ) class StationServiceServicer(object): @@ -41,6 +46,12 @@ def GetStationListByBusId(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def UpdateStation(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_StationServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -54,6 +65,11 @@ def add_StationServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.SerializeToString, ), + 'UpdateStation': grpc.unary_unary_rpc_method_handler( + servicer.UpdateStation, + request_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'where_child_bus.v1.StationService', rpc_method_handlers) @@ -97,3 +113,20 @@ def GetStationListByBusId(request, where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateStation(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/UpdateStation', + where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, + where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 42b1593a..78de2f68 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -3,11 +3,12 @@ syntax = "proto3"; package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; +import "google/protobuf/field_mask.proto"; service BusService { rpc CreateBus(CreateBusRequest) returns (CreateBusResponse); rpc GetBusListByNurseryId(GetBusListByNurseryIdRequest) returns (GetBusListByNurseryIdResponse); - rpc ChangeBusStatus(ChangeBusStatusRequest) returns (ChangeBusStatusResponse); + rpc UpdateBus(UpdateBusRequest) returns (UpdateBusResponse); rpc SendLocationContinuous(stream SendLocationContinuousRequest) returns (SendLocationContinuousResponse); rpc TrackBusContinuous(TrackBusContinuousRequest) returns (stream TrackBusContinuousResponse); @@ -76,3 +77,18 @@ message StreamBusVideoResponse { bool is_detected = 1; repeated Child children = 2; } + +message UpdateBusRequest { + string bus_id = 1; + string name = 2; + string plate_number = 3; + BusStatus bus_status = 4; + double latitude = 5; + double longitude = 6; + bool enable_face_recognition = 7; + google.protobuf.FieldMask update_mask = 8; +} + +message UpdateBusResponse { + Bus bus = 1; +} \ No newline at end of file diff --git a/proto/where_child_bus/v1/child_photo.proto b/proto/where_child_bus/v1/child_photo.proto index 6f2bf6b1..54d43166 100644 --- a/proto/where_child_bus/v1/child_photo.proto +++ b/proto/where_child_bus/v1/child_photo.proto @@ -18,7 +18,6 @@ message DuplicationCheckResponse { repeated bytes duplicated_photos = 3; } - message DeleteChildPhotoRequest { repeated string ids = 1; } diff --git a/proto/where_child_bus/v1/nursery.proto b/proto/where_child_bus/v1/nursery.proto index 7613f52b..8c0c48c2 100644 --- a/proto/where_child_bus/v1/nursery.proto +++ b/proto/where_child_bus/v1/nursery.proto @@ -3,10 +3,12 @@ syntax = "proto3"; package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; +import "google/protobuf/field_mask.proto"; service NurseryService { rpc CreateNursery(CreateNurseryRequest) returns (CreateNurseryResponse); rpc NurseryLogin(NurseryLoginRequest) returns (NurseryLoginResponse); + rpc UpdateNursery(UpdateNurseryRequest) returns (UpdateNurseryResponse); } message CreateNurseryRequest { @@ -29,4 +31,19 @@ message NurseryLoginRequest {; message NurseryLoginResponse { bool success = 1; NurseryResponse nursery = 2; -} \ No newline at end of file +} + +message UpdateNurseryRequest { + string id = 1; + string name = 2; + string adress = 3; + string phone_number = 4; + string email = 5; + string password = 6; + google.protobuf.FieldMask update_mask = 7; +} + +message UpdateNurseryResponse { + NurseryResponse nursery = 1; +} + diff --git a/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto index c05321b7..3b372f40 100644 --- a/proto/where_child_bus/v1/station.proto +++ b/proto/where_child_bus/v1/station.proto @@ -3,10 +3,12 @@ syntax = "proto3"; package where_child_bus.v1; import "where_child_bus/v1/resources.proto"; +import "google/protobuf/field_mask.proto"; service StationService { rpc UpdateStationLocationByGuardianId(UpdateStationLocationByGuardianIdRequest) returns (UpdateStationLocationByGuardianIdResponse); rpc GetStationListByBusId(GetStationListByBusIdRequest) returns (GetStationListByBusIdResponse); + rpc UpdateStation(UpdateStationRequest) returns (UpdateStationResponse); } message UpdateStationLocationByGuardianIdRequest { @@ -28,4 +30,19 @@ message GetStationListByBusIdResponse { repeated GuardianResponse guardians = 2; repeated Child children = 3; repeated ChildPhoto photos = 4; +} + +message UpdateStationRequest { + string id = 1; + string morning_next_station_id = 2; + string morning_evening_station_id = 3; + double latitude = 5; + double longitude = 6; + int32 morning_order = 7; + int32 morning_evening_order = 8; + google.protobuf.FieldMask update_mask = 9; +} + +message UpdateStationResponse { + Station station = 1; } \ No newline at end of file From e1ae7a82e3b281227636d062623c863ff21a9fe4 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 17:55:13 +0900 Subject: [PATCH 541/771] =?UTF-8?q?feat:=20interface=E5=B1=A4=E3=81=A8usec?= =?UTF-8?q?ase=E3=81=AE=E3=82=A8=E3=83=B3=E3=83=88=E3=83=AA=E3=83=9D?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=88=E3=81=A0=E3=81=91=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/bus.go | 5 +++++ backend/interfaces/nursery.go | 5 +++++ backend/interfaces/station.go | 5 +++++ backend/usecases/bus/bus.go | 5 +++++ backend/usecases/nursery/nursery.go | 5 +++++ backend/usecases/station/station.go | 7 ++++++- 6 files changed, 31 insertions(+), 1 deletion(-) diff --git a/backend/interfaces/bus.go b/backend/interfaces/bus.go index 5625bcbd..2cdf2561 100644 --- a/backend/interfaces/bus.go +++ b/backend/interfaces/bus.go @@ -15,6 +15,11 @@ func NewBusServiceServer(interactor *bus.Interactor) pb.BusServiceServer { return &busServiceServer{interactor} } +// UpdateBus implements where_child_busv1.BusServiceServer. +func (s *busServiceServer) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (*pb.UpdateBusResponse, error) { + return s.interactor.UpdateBus(ctx, req) +} + // SendLocationContinuous implements where_child_busv1.BusServiceServer. func (s *busServiceServer) SendLocationContinuous(stream pb.BusService_SendLocationContinuousServer) error { return s.interactor.SendLocationContinuous(stream) diff --git a/backend/interfaces/nursery.go b/backend/interfaces/nursery.go index db46afab..16a72a32 100644 --- a/backend/interfaces/nursery.go +++ b/backend/interfaces/nursery.go @@ -20,6 +20,11 @@ func (s *nurseryServiceServer) CreateNursery(ctx context.Context, req *pb.Create return s.interactor.CreateNursery(ctx, req) } +// UpdateNursery implements where_child_busv1.NurseryServiceServer. +func (s *nurseryServiceServer) UpdateNursery(ctx context.Context, req *pb.UpdateNurseryRequest) (*pb.UpdateNurseryResponse, error) { + return s.interactor.UpdateNursery(ctx, req) +} + func (s *nurseryServiceServer) NurseryLogin(ctx context.Context, req *pb.NurseryLoginRequest) (*pb.NurseryLoginResponse, error) { return s.interactor.NurseryLogin(ctx, req) } diff --git a/backend/interfaces/station.go b/backend/interfaces/station.go index ce65a866..01cfc740 100644 --- a/backend/interfaces/station.go +++ b/backend/interfaces/station.go @@ -15,6 +15,11 @@ func NewStationServiceServer(interactor *station.Interactor) pb.StationServiceSe return &stationServiceServer{interactor} } +// UpdateStation implements where_child_busv1.StationServiceServer. +func (s *stationServiceServer) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { + return s.interactor.UpdateStation(ctx, req) +} + // UpdateStationLocationByGuardianId implements where_child_busv1.StationServiceServer. func (s *stationServiceServer) UpdateStationLocationByGuardianId(ctx context.Context, req *pb.UpdateStationLocationByGuardianIdRequest) (*pb.UpdateStationLocationByGuardianIdResponse, error) { return s.interactor.UpdateStationLocationByGuardianID(ctx, req) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 44466790..79d5ec3a 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -259,6 +259,11 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu return &pb.ChangeBusStatusResponse{Bus: utils.ToPbBus(bus)}, nil } +func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (*pb.UpdateBusResponse, error) { + panic("unimplemented") + // TODO: 実装 +} + func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationContinuousServer) error { for { req, err := stream.Recv() diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index 9db015eb..e2c245a8 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -113,6 +113,11 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque }, nil } +func (i *Interactor) UpdateNursery(ctx context.Context, req *pb.UpdateNurseryRequest) (*pb.UpdateNurseryResponse, error) { + panic("unimplemented") + // TODO: 実装 +} + // コード生成 func generateCode() string { rnd := rand.New(rand.NewSource(time.Now().UnixNano())) diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index dcf6b550..05389c52 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -89,6 +89,11 @@ func (i *Interactor) UpdateStationLocationByGuardianID(ctx context.Context, req }, nil } +func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { + panic("unimplemented") + // TODO: 実装 +} + func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStationListByBusIdRequest) (*pb.GetStationListByBusIdResponse, error) { busID, err := uuid.Parse(req.BusId) if err != nil { @@ -99,7 +104,7 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati stations, err := i.entClient.Station.Query(). Where(stationRepo.HasBusWith(busRepo.ID(busID))). WithGuardian(func(q *ent.GuardianQuery) { - // Guardian に紐づく Children と Nursery も取得 + q.WithNursery() q.WithChildren() }). All(ctx) From 251fbdc8d3380d4d6eb83b38dcc52a71071c9731 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 19:02:32 +0900 Subject: [PATCH 542/771] =?UTF-8?q?feat:=20bus=E3=81=AE=E3=82=A2=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=83=87=E3=83=BC=E3=83=88=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 60 ++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 79d5ec3a..f98ecde8 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -17,6 +17,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" boardingrecordRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childbusassociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" @@ -260,8 +261,65 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu } func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (*pb.UpdateBusResponse, error) { - panic("unimplemented") // TODO: 実装 + // bus_idのパース + busID, err := uuid.Parse(req.BusId) + if err != nil { + i.logger.Error("failed to parse bus ID", "error", err) + return nil, err + } + + // トランザクションの開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + i.logger.Error("failed to start transction", "error", "err") + return nil, err + } + defer utils.RollbackTx(tx, i.logger) + + // 更新処理のビルダー + update := tx.Bus.Update().Where(bus.IDEQ(busID)) + for _, path := range req.UpdateMask.Paths { + switch path { + case "name": + update.SetName(req.Name) + case "plate_number": + update.SetNillablePlateNumber(&req.PlateNumber) + case "bus_status": + status := bus.Status(req.BusStatus) + update.SetNillableStatus(&status) + case "latitude": + update.SetNillableLatitude(&req.Latitude) + case "longitude": + update.SetNillableLongitude(&req.Longitude) + case "enable_face_recognition": + update.SetNillableEnableFaceRecognition(&req.EnableFaceRecognition) + } + } + + // 更新の実行 + _, err = update.Save(ctx) + if err != nil { + i.logger.Error("failed to update bus", "error", err) + return nil, err + } + + // 更新されたバスを取得 + updatedBus, err := tx.Bus.Query().Where(bus.IDEQ(busID)).Only(ctx) + if err != nil { + i.logger.Error("failed to retrieve updated bus", "error", err) + } + + // トランザクションのコミット + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transction", "error", err) + return nil, err + } + + // レスポンスの生成と返却 + return &pb.UpdateBusResponse{ + Bus: utils.ToPbBus(updatedBus), + }, nil } func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationContinuousServer) error { From 2e38895f5c2106bae27fbb15b8001157f518fa2a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Mon, 19 Feb 2024 19:58:01 +0900 Subject: [PATCH 543/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=83=AA=E3=83=BC=E3=83=A0=E3=81=AB=E3=83=93=E3=83=87?= =?UTF-8?q?=E3=82=AA=E3=81=AE=E7=B8=A6=E6=A8=AA=E5=B9=85=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 202 ++++++++++-------- backend/usecases/bus/bus.go | 5 - .../proto-gen/where_child_bus/v1/bus.pb.dart | 28 +++ .../where_child_bus/v1/bus.pbjson.dart | 5 +- .../generated/where_child_bus/v1/bus_pb2.py | 20 +- .../generated/where_child_bus/v1/bus_pb2.pyi | 8 +- proto/where_child_bus/v1/bus.proto | 2 + 7 files changed, 161 insertions(+), 109 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 38ae8989..bd06db10 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -565,6 +565,8 @@ type StreamBusVideoRequest struct { BusType BusType `protobuf:"varint,3,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` VehicleEvent VehicleEvent `protobuf:"varint,4,opt,name=vehicle_event,json=vehicleEvent,proto3,enum=where_child_bus.v1.VehicleEvent" json:"vehicle_event,omitempty"` VideoChunk [][]byte `protobuf:"bytes,5,rep,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data + PhotoHeight int32 `protobuf:"varint,6,opt,name=photo_height,json=photoHeight,proto3" json:"photo_height,omitempty"` + PhotoWidth int32 `protobuf:"varint,7,opt,name=photo_width,json=photoWidth,proto3" json:"photo_width,omitempty"` } func (x *StreamBusVideoRequest) Reset() { @@ -634,6 +636,20 @@ func (x *StreamBusVideoRequest) GetVideoChunk() [][]byte { return nil } +func (x *StreamBusVideoRequest) GetPhotoHeight() int32 { + if x != nil { + return x.PhotoHeight + } + return 0 +} + +func (x *StreamBusVideoRequest) GetPhotoWidth() int32 { + if x != nil { + return x.PhotoWidth + } + return 0 +} + type StreamBusVideoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -906,7 +922,7 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x22, 0xed, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, + 0x64, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, @@ -921,97 +937,101 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, - 0x6e, 0x6b, 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, - 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcd, 0x02, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, - 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, - 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, - 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, - 0x03, 0x62, 0x75, 0x73, 0x32, 0xa4, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, - 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, + 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x68, 0x6f, 0x74, + 0x6f, 0x57, 0x69, 0x64, 0x74, 0x68, 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcd, 0x02, 0x0a, 0x10, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, + 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0a, 0x62, + 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, + 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, + 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, + 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0xa4, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x58, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, + 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, - 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, - 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, - 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, - 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, - 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, - 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, - 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, - 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, - 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, - 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, - 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, + 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, + 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, + 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, + 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, + 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 79d5ec3a..b1900d77 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -348,11 +348,6 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e return } - // ! 治す - in.BusId = "83bd2da8-8d15-4c05-bb26-ed992334d9c6" - in.VehicleEvent = pb.VehicleEvent_VEHICLE_EVENT_GET_ON - in.BusType = pb.BusType_BUS_TYPE_MORNING - // バスID、バスタイプ、ビデオタイプを保持 busID = in.BusId vehicleEvent = in.VehicleEvent diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index ac8590b4..1ecc2532 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -619,6 +619,8 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { $8.BusType? busType, $8.VehicleEvent? vehicleEvent, $core.Iterable<$core.List<$core.int>>? videoChunk, + $core.int? photoHeight, + $core.int? photoWidth, }) { final $result = create(); if (busId != null) { @@ -636,6 +638,12 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { if (videoChunk != null) { $result.videoChunk.addAll(videoChunk); } + if (photoHeight != null) { + $result.photoHeight = photoHeight; + } + if (photoWidth != null) { + $result.photoWidth = photoWidth; + } return $result; } StreamBusVideoRequest._() : super(); @@ -648,6 +656,8 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { ..e<$8.BusType>(3, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) ..e<$8.VehicleEvent>(4, _omitFieldNames ? '' : 'vehicleEvent', $pb.PbFieldType.OE, defaultOrMaker: $8.VehicleEvent.VEHICLE_EVENT_UNSPECIFIED, valueOf: $8.VehicleEvent.valueOf, enumValues: $8.VehicleEvent.values) ..p<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.PY) + ..a<$core.int>(6, _omitFieldNames ? '' : 'photoHeight', $pb.PbFieldType.O3) + ..a<$core.int>(7, _omitFieldNames ? '' : 'photoWidth', $pb.PbFieldType.O3) ..hasRequiredFields = false ; @@ -710,6 +720,24 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.List<$core.List<$core.int>> get videoChunk => $_getList(4); + + @$pb.TagNumber(6) + $core.int get photoHeight => $_getIZ(5); + @$pb.TagNumber(6) + set photoHeight($core.int v) { $_setSignedInt32(5, v); } + @$pb.TagNumber(6) + $core.bool hasPhotoHeight() => $_has(5); + @$pb.TagNumber(6) + void clearPhotoHeight() => clearField(6); + + @$pb.TagNumber(7) + $core.int get photoWidth => $_getIZ(6); + @$pb.TagNumber(7) + set photoWidth($core.int v) { $_setSignedInt32(6, v); } + @$pb.TagNumber(7) + $core.bool hasPhotoWidth() => $_has(6); + @$pb.TagNumber(7) + void clearPhotoWidth() => clearField(7); } class StreamBusVideoResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 18749ce0..5040cfd4 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -159,6 +159,8 @@ const StreamBusVideoRequest$json = { {'1': 'bus_type', '3': 3, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, {'1': 'vehicle_event', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.VehicleEvent', '10': 'vehicleEvent'}, {'1': 'video_chunk', '3': 5, '4': 3, '5': 12, '10': 'videoChunk'}, + {'1': 'photo_height', '3': 6, '4': 1, '5': 5, '10': 'photoHeight'}, + {'1': 'photo_width', '3': 7, '4': 1, '5': 5, '10': 'photoWidth'}, ], }; @@ -168,7 +170,8 @@ final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Dec 'J5X2lkGAIgASgJUgludXJzZXJ5SWQSNgoIYnVzX3R5cGUYAyABKA4yGy53aGVyZV9jaGlsZF9i' 'dXMudjEuQnVzVHlwZVIHYnVzVHlwZRJFCg12ZWhpY2xlX2V2ZW50GAQgASgOMiAud2hlcmVfY2' 'hpbGRfYnVzLnYxLlZlaGljbGVFdmVudFIMdmVoaWNsZUV2ZW50Eh8KC3ZpZGVvX2NodW5rGAUg' - 'AygMUgp2aWRlb0NodW5r'); + 'AygMUgp2aWRlb0NodW5rEiEKDHBob3RvX2hlaWdodBgGIAEoBVILcGhvdG9IZWlnaHQSHwoLcG' + 'hvdG9fd2lkdGgYByABKAVSCnBob3RvV2lkdGg='); @$core.Deprecated('Use streamBusVideoResponseDescriptor instead') const StreamBusVideoResponse$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index 2be8f5c3..48d74e72 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xa4\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xa4\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -45,13 +45,13 @@ _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=917 _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1026 _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1029 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1266 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1268 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1380 - _globals['_UPDATEBUSREQUEST']._serialized_start=1383 - _globals['_UPDATEBUSREQUEST']._serialized_end=1716 - _globals['_UPDATEBUSRESPONSE']._serialized_start=1718 - _globals['_UPDATEBUSRESPONSE']._serialized_end=1780 - _globals['_BUSSERVICE']._serialized_start=1783 - _globals['_BUSSERVICE']._serialized_end=2459 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1334 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1336 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1448 + _globals['_UPDATEBUSREQUEST']._serialized_start=1451 + _globals['_UPDATEBUSREQUEST']._serialized_end=1784 + _globals['_UPDATEBUSRESPONSE']._serialized_start=1786 + _globals['_UPDATEBUSRESPONSE']._serialized_end=1848 + _globals['_BUSSERVICE']._serialized_start=1851 + _globals['_BUSSERVICE']._serialized_end=2527 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index ce23fb39..7a95dff7 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -84,18 +84,22 @@ class TrackBusContinuousResponse(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ...) -> None: ... class StreamBusVideoRequest(_message.Message): - __slots__ = ("bus_id", "nursery_id", "bus_type", "vehicle_event", "video_chunk") + __slots__ = ("bus_id", "nursery_id", "bus_type", "vehicle_event", "video_chunk", "photo_height", "photo_width") BUS_ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] BUS_TYPE_FIELD_NUMBER: _ClassVar[int] VEHICLE_EVENT_FIELD_NUMBER: _ClassVar[int] VIDEO_CHUNK_FIELD_NUMBER: _ClassVar[int] + PHOTO_HEIGHT_FIELD_NUMBER: _ClassVar[int] + PHOTO_WIDTH_FIELD_NUMBER: _ClassVar[int] bus_id: str nursery_id: str bus_type: _resources_pb2.BusType vehicle_event: _resources_pb2.VehicleEvent video_chunk: _containers.RepeatedScalarFieldContainer[bytes] - def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[_Iterable[bytes]] = ...) -> None: ... + photo_height: int + photo_width: int + def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[_Iterable[bytes]] = ..., photo_height: _Optional[int] = ..., photo_width: _Optional[int] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = ("is_detected", "children") diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 78de2f68..60175509 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -71,6 +71,8 @@ message StreamBusVideoRequest { BusType bus_type = 3; VehicleEvent vehicle_event = 4; repeated bytes video_chunk = 5; // Chunk of video data + int32 photo_height = 6; + int32 photo_width = 7; } message StreamBusVideoResponse { From f23bc3b8b6c19fa68f9bcdcf099e1cf08a0461ec Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 20:02:21 +0900 Subject: [PATCH 544/771] =?UTF-8?q?feat(ml):=20frontend=E3=81=8B=E3=82=89?= =?UTF-8?q?=E3=81=AE=E3=82=B0=E3=83=AC=E3=83=BC=E3=82=B9=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E7=94=BB=E5=83=8F=E3=82=92=E5=8F=97=E3=81=91=E5=8F=96?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E5=AE=9F=E8=A3=85=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectFaceAndClip/detectFaceUtil.py | 3 +-- machine_learning/src/face_detect_model/pred.py | 10 ++++++---- machine_learning/src/face_detect_model/util.py | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceUtil.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceUtil.py index a013be42..71db5e56 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceUtil.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceUtil.py @@ -10,9 +10,8 @@ def detect_face( image, face_cascade, scaleFactor=1.1, minNeighbors=15, minSize=(50, 50) ): """画像から顔を検出する""" - gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale( - gray, scaleFactor=scaleFactor, minNeighbors=minNeighbors, minSize=minSize + image, scaleFactor=scaleFactor, minNeighbors=minNeighbors, minSize=minSize ) return faces diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index 01a48a3b..292c72d2 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -116,6 +116,11 @@ def pred_child_from_images(args, config): model_class_num = len(idx_to_label_dict) clipped_faces = get_cliped_faces_from_images(args.video_chunk, config) + + if len(clipped_faces) == 0: + logger.info("No face detected.") + return [] + input_image_tensors = convert_to_tensor_from_images(clipped_faces) model_bucket_path = ( @@ -153,9 +158,6 @@ def main(args): parser.add_argument("--bus_type", type=int, required=True) args = parser.parse_args() - args.video_chunk = [ - open("/Users/mizuki/Desktop/test.jpg", "rb").read(), - open("/Users/mizuki/Desktop/test1.jpg", "rb").read(), - ] + args.video_chunk = [] main(args) diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index ea1bb7f5..9de0fca5 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -75,8 +75,8 @@ def load_image_from_remote(blobs: list): def load_image_from_binary(binary: bytes): image_array = np.frombuffer(binary, dtype=np.uint8) - image = cv2.imdecode(image_array, cv2.IMREAD_COLOR) - image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # BGRからRGBに変換 + # TODO: 画像サイズをgRPCのリクエストから受け取る + image = image_array.reshape((240, 320)) if image is None: raise ValueError("Can not load image from binary.") return image From 546e32a130124be31a695b796beb23fd64154fc8 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 19 Feb 2024 20:12:19 +0900 Subject: [PATCH 545/771] =?UTF-8?q?chore:=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E3=81=AE=E5=AD=90=E4=BE=9B=E3=82=92=E3=82=B7=E3=83=B3=E3=82=B0?= =?UTF-8?q?=E3=83=AB=E3=83=88=E3=83=B3=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/models/child_data.dart | 26 ++++++++++++++ .../lib/{util => models}/nursery_data.dart | 0 .../lib/pages/auth_page/auth_page.dart | 2 +- .../pages/bus_list_page/bus_list_page.dart | 2 +- .../lib/pages/camera_page/camera_page.dart | 20 +++++------ .../pages/register_page/register_page.dart | 2 +- .../components/utils/input_form_body.dart | 2 +- .../student_list_page/student_list_page.dart | 35 +++++++++++++------ .../where_child_bus/lib/util/api/bus.dart | 2 +- 9 files changed, 64 insertions(+), 27 deletions(-) create mode 100644 frontend/where_child_bus/lib/models/child_data.dart rename frontend/where_child_bus/lib/{util => models}/nursery_data.dart (100%) diff --git a/frontend/where_child_bus/lib/models/child_data.dart b/frontend/where_child_bus/lib/models/child_data.dart new file mode 100644 index 00000000..2fffa338 --- /dev/null +++ b/frontend/where_child_bus/lib/models/child_data.dart @@ -0,0 +1,26 @@ +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class NurseryChildListData { + static final NurseryChildListData _singleton = + NurseryChildListData._internal(); + GetChildListByNurseryIDResponse? _childList; + + factory NurseryChildListData() { + return _singleton; + } + + NurseryChildListData._internal(); + + void setChildListResponse(res) { + _childList = res; + } + + List getChildList() { + return _childList?.children ?? []; + } + + List getPhotos() { + return _childList?.photos ?? []; + } +} diff --git a/frontend/where_child_bus/lib/util/nursery_data.dart b/frontend/where_child_bus/lib/models/nursery_data.dart similarity index 100% rename from frontend/where_child_bus/lib/util/nursery_data.dart rename to frontend/where_child_bus/lib/models/nursery_data.dart diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index b8202b77..70a9dabc 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -2,7 +2,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; import 'package:where_child_bus/util/api/nursery_login.dart'; -import 'package:where_child_bus/util/nursery_data.dart'; +import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; enum NurseryLoginError { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 342c127c..a2849b08 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -5,7 +5,7 @@ import 'package:where_child_bus/models/bus_edit_page_type.dart'; import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; -import 'package:where_child_bus/util/nursery_data.dart'; +import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BusListPage extends StatefulWidget { diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index d054cf7c..2319df65 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -4,8 +4,7 @@ import 'package:flutter/material.dart'; import 'package:camera/camera.dart'; import 'package:grpc/grpc.dart'; import 'package:where_child_bus/config/config.dart'; -import 'package:where_child_bus/util/api/bus.dart'; -import 'package:where_child_bus/util/nursery_data.dart'; +import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; import "package:where_child_bus/main.dart" as where_child_bus; @@ -37,9 +36,7 @@ class _CameraPageState extends State { setState(() {}); _startImageStream(); developer.log("Start streaming video to server", name: "CameraPage"); - // _streamVideoToServer(); streamBusVideo(_streamController.stream); - developer.log("Finish streaming video to server", name: "CameraPage"); } catch (e) { developer.log('Failed to initialize camera: $e'); } @@ -62,7 +59,7 @@ class _CameraPageState extends State { developer.log("Received response: $response"); } } catch (error) { - developer.log("Caught Error:", error: error.toString()); + developer.log("Caught Error:", error: error); } finally { await channel.shutdown(); } @@ -75,22 +72,21 @@ class _CameraPageState extends State { _controller.startImageStream((CameraImage image) { frameCounter++; if (frameCounter % 60 == 0) { - videoChunks.add(image.planes[0].bytes); + videoChunks.add(image.planes[0].bytes.toList()); _streamController.add(StreamBusVideoRequest( nurseryId: NurseryData().getNursery().id, videoChunk: videoChunks)); - developer.log("Received image frame", name: "CameraPage"); + developer.log("Received image frame ${videoChunks}}", + name: "CameraPage"); + developer.log("widge ${image.width}", name: "CameraPage"); + developer.log("height ${image.height}", name: "CameraPage"); + videoChunks = []; } }); } } - void _streamVideoToServer() async { - final stream = _streamController.stream; - await streamBusVideo(stream); - } - @override void dispose() { _controller.dispose(); diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index 6d90b7ec..fc0b204f 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; import "dart:developer" as developer; import 'package:where_child_bus/util/api/nursery_create.dart'; -import 'package:where_child_bus/util/nursery_data.dart'; +import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus/util/validation/create_nursery_validation.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; import '../../models/create_nursery_error.dart'; diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index e2aace1b..873e48bd 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus/service/get_guardian_list_by_nursery_id.dart'; -import 'package:where_child_bus/util/nursery_data.dart'; +import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'input_value_label.dart'; import 'text_input_field.dart'; diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index a5acf594..d56912a1 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -2,9 +2,10 @@ import "dart:developer" as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/child_list.dart'; +import 'package:where_child_bus/models/child_data.dart'; import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; import 'package:where_child_bus/service/get_child_list_by_nursery_id.dart'; -import 'package:where_child_bus/util/nursery_data.dart'; +import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -32,18 +33,32 @@ class _ChildListPageState extends State { Future _loadChildren() async { try { _isLoading = true; - GetChildListByNurseryIDResponse res = - await getChildListByNurseryIdService(NurseryData().getNursery().id); - if (mounted) { - setState(() { - children = res.children; - photos = res.photos; - _isLoading = false; - }); + + // If the child list is already loaded, use it + if (NurseryChildListData().getChildList().isNotEmpty) { + if (mounted) { + setState(() { + children = NurseryChildListData().getChildList(); + photos = NurseryChildListData().getPhotos(); + _isLoading = false; + }); + } + return; + } else { + GetChildListByNurseryIDResponse res = + await getChildListByNurseryIdService(NurseryData().getNursery().id); + NurseryChildListData().setChildListResponse(res); + if (mounted) { + setState(() { + children = res.children; + photos = res.photos; + _isLoading = false; + }); + } } } catch (error) { if (kDebugMode) { - developer.log("子供のロード中にエラーが発生しました"); + developer.log("子供のロード中にエラーが発生しました", error: error); } if (mounted) { diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index ad769185..be7acd52 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -3,7 +3,7 @@ import "package:camera/camera.dart"; import "package:flutter/foundation.dart"; import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; -import "package:where_child_bus/util/nursery_data.dart"; +import 'package:where_child_bus/models/nursery_data.dart'; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; From 7b4c02725e757f86d853ec9af87a03948a34c827 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 19 Feb 2024 20:24:42 +0900 Subject: [PATCH 546/771] =?UTF-8?q?chore:=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E3=81=AE=E3=83=90=E3=82=B9=E3=82=92=E3=82=B7=E3=83=B3=E3=82=B0?= =?UTF-8?q?=E3=83=AB=E3=83=88=E3=83=B3=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/models/nursery_bus_data.dart | 21 ++++++++++++++ ...hild_data.dart => nursery_child_data.dart} | 0 .../pages/bus_list_page/bus_list_page.dart | 28 ++++++++++++++----- .../components/utils/input_form_body.dart | 25 +++++++++++------ .../student_list_page/student_list_page.dart | 2 +- .../service/get_bus_list_by_nursery_id.dart | 5 ++-- 6 files changed, 62 insertions(+), 19 deletions(-) create mode 100644 frontend/where_child_bus/lib/models/nursery_bus_data.dart rename frontend/where_child_bus/lib/models/{child_data.dart => nursery_child_data.dart} (100%) diff --git a/frontend/where_child_bus/lib/models/nursery_bus_data.dart b/frontend/where_child_bus/lib/models/nursery_bus_data.dart new file mode 100644 index 00000000..9e96719b --- /dev/null +++ b/frontend/where_child_bus/lib/models/nursery_bus_data.dart @@ -0,0 +1,21 @@ +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pb.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class NurseryBusData { + static final NurseryBusData _singleton = NurseryBusData._internal(); + GetBusListByNurseryIdResponse? _busList; + + NurseryBusData._internal(); + + factory NurseryBusData() { + return _singleton; + } + + void setBusListResponse(GetBusListByNurseryIdResponse res) { + _busList = res; + } + + List getBusList() { + return _busList?.buses ?? []; + } +} diff --git a/frontend/where_child_bus/lib/models/child_data.dart b/frontend/where_child_bus/lib/models/nursery_child_data.dart similarity index 100% rename from frontend/where_child_bus/lib/models/child_data.dart rename to frontend/where_child_bus/lib/models/nursery_child_data.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index a2849b08..3f251325 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -2,10 +2,12 @@ import "dart:developer" as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/models/bus_edit_page_type.dart'; +import 'package:where_child_bus/models/nursery_bus_data.dart'; import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus/models/nursery_data.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pb.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BusListPage extends StatefulWidget { @@ -30,19 +32,31 @@ class _BusListPageState extends State { Future _loadBusList() async { String nurseryId = NurseryData().getNursery().id; - List busList = await getBusList(nurseryId); - try { + + if (NurseryBusData().getBusList().isNotEmpty) { if (mounted) { setState(() { - buses = busList; + buses = NurseryBusData().getBusList(); _isLoading = false; }); } - } catch (e) { - if (kDebugMode) { - developer.log("バスリストのロード中にエラーが発生しました: $e"); + return; + } else { + GetBusListByNurseryIdResponse busList = await getBusList(nurseryId); + NurseryBusData().setBusListResponse(busList); + try { + if (mounted) { + setState(() { + buses = NurseryBusData().getBusList(); + _isLoading = false; + }); + } + } catch (e) { + if (kDebugMode) { + developer.log("バスリストのロード中にエラーが発生しました: $e"); + } + setState(() => {_isLoading = false, _isFailLoading = true}); } - setState(() => {_isLoading = false, _isFailLoading = true}); } } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index 873e48bd..eec784be 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -2,6 +2,7 @@ import 'dart:developer' as developer; import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; +import 'package:where_child_bus/models/nursery_bus_data.dart'; import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus/service/get_guardian_list_by_nursery_id.dart'; import 'package:where_child_bus/models/nursery_data.dart'; @@ -64,16 +65,24 @@ class _InputFormBodyState extends State { } Future _loadBuses() async { - try { - var res = await getBusList(NurseryData().getNursery().id); - setState(() { - buses = res; - }); - } catch (error) { - developer.log("Caught Error", error: error.toString()); + if (NurseryBusData().getBusList().isNotEmpty) { setState(() { - buses = []; + buses = NurseryBusData().getBusList(); }); + return; + } else { + try { + var res = await getBusList(NurseryData().getNursery().id); + NurseryBusData().setBusListResponse(res); + setState(() { + buses = NurseryBusData().getBusList(); + }); + } catch (error) { + developer.log("Caught Error", error: error.toString()); + setState(() { + buses = []; + }); + } } } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index d56912a1..91bc5753 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -2,7 +2,7 @@ import "dart:developer" as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/child_list.dart'; -import 'package:where_child_bus/models/child_data.dart'; +import 'package:where_child_bus/models/nursery_child_data.dart'; import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; import 'package:where_child_bus/service/get_child_list_by_nursery_id.dart'; import 'package:where_child_bus/models/nursery_data.dart'; diff --git a/frontend/where_child_bus/lib/service/get_bus_list_by_nursery_id.dart b/frontend/where_child_bus/lib/service/get_bus_list_by_nursery_id.dart index a31988f8..bc91c7ef 100644 --- a/frontend/where_child_bus/lib/service/get_bus_list_by_nursery_id.dart +++ b/frontend/where_child_bus/lib/service/get_bus_list_by_nursery_id.dart @@ -1,12 +1,11 @@ import 'package:where_child_bus/util/api/bus.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pb.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; -Future> getBusList(String nurseryId) async { +Future getBusList(String nurseryId) async { try { GetBusListByNurseryIdResponse busListResponse = await getBusListByNurseryId(nurseryId); - return busListResponse.buses; + return busListResponse; } catch (error) { return Future.error(error); } From 20f8dc70db1257deee45f38408ce48ca65aef1a4 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 20:26:37 +0900 Subject: [PATCH 547/771] fix: typo --- .../go/where_child_bus/v1/nursery.pb.go | 112 +++++++++--------- .../where_child_bus/v1/nursery.pb.dart | 16 +-- .../where_child_bus/v1/nursery.pbjson.dart | 10 +- proto/where_child_bus/v1/nursery.proto | 2 +- 4 files changed, 70 insertions(+), 70 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go index f12bf6d3..6c9fe5c2 100644 --- a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go @@ -264,7 +264,7 @@ type UpdateNurseryRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Adress string `protobuf:"bytes,3,opt,name=adress,proto3" json:"adress,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"` @@ -317,9 +317,9 @@ func (x *UpdateNurseryRequest) GetName() string { return "" } -func (x *UpdateNurseryRequest) GetAdress() string { +func (x *UpdateNurseryRequest) GetAddress() string { if x != nil { - return x.Adress + return x.Address } return "" } @@ -436,63 +436,63 @@ var file_where_child_bus_v1_nursery_proto_rawDesc = []byte{ 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x22, 0xe4, 0x01, 0x0a, 0x14, 0x55, + 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x22, 0xe6, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, - 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, - 0x6b, 0x22, 0x56, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0xbf, 0x02, 0x0a, 0x0e, 0x4e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x28, 0x2e, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, + 0x61, 0x73, 0x6b, 0x22, 0x56, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, + 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0xbf, 0x02, 0x0a, 0x0e, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, + 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, + 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x12, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, - 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, + 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart index aef485d8..4ecbe14c 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -308,7 +308,7 @@ class UpdateNurseryRequest extends $pb.GeneratedMessage { factory UpdateNurseryRequest({ $core.String? id, $core.String? name, - $core.String? adress, + $core.String? address, $core.String? phoneNumber, $core.String? email, $core.String? password, @@ -321,8 +321,8 @@ class UpdateNurseryRequest extends $pb.GeneratedMessage { if (name != null) { $result.name = name; } - if (adress != null) { - $result.adress = adress; + if (address != null) { + $result.address = address; } if (phoneNumber != null) { $result.phoneNumber = phoneNumber; @@ -345,7 +345,7 @@ class UpdateNurseryRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateNurseryRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'name') - ..aOS(3, _omitFieldNames ? '' : 'adress') + ..aOS(3, _omitFieldNames ? '' : 'address') ..aOS(4, _omitFieldNames ? '' : 'phoneNumber') ..aOS(5, _omitFieldNames ? '' : 'email') ..aOS(6, _omitFieldNames ? '' : 'password') @@ -393,13 +393,13 @@ class UpdateNurseryRequest extends $pb.GeneratedMessage { void clearName() => clearField(2); @$pb.TagNumber(3) - $core.String get adress => $_getSZ(2); + $core.String get address => $_getSZ(2); @$pb.TagNumber(3) - set adress($core.String v) { $_setString(2, v); } + set address($core.String v) { $_setString(2, v); } @$pb.TagNumber(3) - $core.bool hasAdress() => $_has(2); + $core.bool hasAddress() => $_has(2); @$pb.TagNumber(3) - void clearAdress() => clearField(3); + void clearAddress() => clearField(3); @$pb.TagNumber(4) $core.String get phoneNumber => $_getSZ(3); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart index cc719561..c8e70a9e 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart @@ -78,7 +78,7 @@ const UpdateNurseryRequest$json = { '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, - {'1': 'adress', '3': 3, '4': 1, '5': 9, '10': 'adress'}, + {'1': 'address', '3': 3, '4': 1, '5': 9, '10': 'address'}, {'1': 'phone_number', '3': 4, '4': 1, '5': 9, '10': 'phoneNumber'}, {'1': 'email', '3': 5, '4': 1, '5': 9, '10': 'email'}, {'1': 'password', '3': 6, '4': 1, '5': 9, '10': 'password'}, @@ -89,10 +89,10 @@ const UpdateNurseryRequest$json = { /// Descriptor for `UpdateNurseryRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List updateNurseryRequestDescriptor = $convert.base64Decode( 'ChRVcGRhdGVOdXJzZXJ5UmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSEgoEbmFtZRgCIAEoCVIEbm' - 'FtZRIWCgZhZHJlc3MYAyABKAlSBmFkcmVzcxIhCgxwaG9uZV9udW1iZXIYBCABKAlSC3Bob25l' - 'TnVtYmVyEhQKBWVtYWlsGAUgASgJUgVlbWFpbBIaCghwYXNzd29yZBgGIAEoCVIIcGFzc3dvcm' - 'QSOwoLdXBkYXRlX21hc2sYByABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrUgp1cGRh' - 'dGVNYXNr'); + 'FtZRIYCgdhZGRyZXNzGAMgASgJUgdhZGRyZXNzEiEKDHBob25lX251bWJlchgEIAEoCVILcGhv' + 'bmVOdW1iZXISFAoFZW1haWwYBSABKAlSBWVtYWlsEhoKCHBhc3N3b3JkGAYgASgJUghwYXNzd2' + '9yZBI7Cgt1cGRhdGVfbWFzaxgHIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tSCnVw' + 'ZGF0ZU1hc2s='); @$core.Deprecated('Use updateNurseryResponseDescriptor instead') const UpdateNurseryResponse$json = { diff --git a/proto/where_child_bus/v1/nursery.proto b/proto/where_child_bus/v1/nursery.proto index 8c0c48c2..ad364ca3 100644 --- a/proto/where_child_bus/v1/nursery.proto +++ b/proto/where_child_bus/v1/nursery.proto @@ -36,7 +36,7 @@ message NurseryLoginResponse { message UpdateNurseryRequest { string id = 1; string name = 2; - string adress = 3; + string address = 3; string phone_number = 4; string email = 5; string password = 6; From 1a916dc4960a5583bca415d741eacbfe6131f051 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 20:28:38 +0900 Subject: [PATCH 548/771] =?UTF-8?q?chore:=20Nillable=E3=81=A7=E3=81=AA?= =?UTF-8?q?=E3=81=84setter=E3=82=92=E5=88=A9=E7=94=A8=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index f98ecde8..1351e45f 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -284,16 +284,16 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* case "name": update.SetName(req.Name) case "plate_number": - update.SetNillablePlateNumber(&req.PlateNumber) + update.SetPlateNumber(req.PlateNumber) case "bus_status": status := bus.Status(req.BusStatus) - update.SetNillableStatus(&status) + update.SetStatus(status) case "latitude": - update.SetNillableLatitude(&req.Latitude) + update.SetLatitude(req.Latitude) case "longitude": - update.SetNillableLongitude(&req.Longitude) + update.SetLongitude(req.Longitude) case "enable_face_recognition": - update.SetNillableEnableFaceRecognition(&req.EnableFaceRecognition) + update.SetEnableFaceRecognition(req.EnableFaceRecognition) } } From d6eef70e08bd3257a699b1293fcf8f4249afed03 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 20:39:56 +0900 Subject: [PATCH 549/771] fix: typo --- .../go/where_child_bus/v1/station.pb.go | 149 +++++++++--------- .../where_child_bus/v1/station.pb.dart | 32 ++-- .../where_child_bus/v1/station.pbjson.dart | 16 +- .../where_child_bus/v1/nursery_pb2.py | 12 +- .../where_child_bus/v1/nursery_pb2.pyi | 8 +- .../where_child_bus/v1/station_pb2.py | 12 +- .../where_child_bus/v1/station_pb2.pyi | 12 +- proto/where_child_bus/v1/station.proto | 4 +- 8 files changed, 122 insertions(+), 123 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index 2a3082d0..5b5a10f3 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -254,14 +254,14 @@ type UpdateStationRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - MorningNextStationId string `protobuf:"bytes,2,opt,name=morning_next_station_id,json=morningNextStationId,proto3" json:"morning_next_station_id,omitempty"` - MorningEveningStationId string `protobuf:"bytes,3,opt,name=morning_evening_station_id,json=morningEveningStationId,proto3" json:"morning_evening_station_id,omitempty"` - Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` - MorningOrder int32 `protobuf:"varint,7,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` - MorningEveningOrder int32 `protobuf:"varint,8,opt,name=morning_evening_order,json=morningEveningOrder,proto3" json:"morning_evening_order,omitempty"` - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,9,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + MorningNextStationId string `protobuf:"bytes,2,opt,name=morning_next_station_id,json=morningNextStationId,proto3" json:"morning_next_station_id,omitempty"` + EveningNextStationId string `protobuf:"bytes,3,opt,name=evening_next_station_id,json=eveningNextStationId,proto3" json:"evening_next_station_id,omitempty"` + Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` + MorningOrder int32 `protobuf:"varint,7,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` + EveningOrder int32 `protobuf:"varint,8,opt,name=evening_order,json=eveningOrder,proto3" json:"evening_order,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,9,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } func (x *UpdateStationRequest) Reset() { @@ -310,9 +310,9 @@ func (x *UpdateStationRequest) GetMorningNextStationId() string { return "" } -func (x *UpdateStationRequest) GetMorningEveningStationId() string { +func (x *UpdateStationRequest) GetEveningNextStationId() string { if x != nil { - return x.MorningEveningStationId + return x.EveningNextStationId } return "" } @@ -338,9 +338,9 @@ func (x *UpdateStationRequest) GetMorningOrder() int32 { return 0 } -func (x *UpdateStationRequest) GetMorningEveningOrder() int32 { +func (x *UpdateStationRequest) GetEveningOrder() int32 { if x != nil { - return x.MorningEveningOrder + return x.EveningOrder } return 0 } @@ -444,76 +444,75 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0xea, 0x02, + 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0xd5, 0x02, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, - 0x1a, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x17, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x69, 0x6e, - 0x67, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, - 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x6f, 0x72, - 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x45, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x3b, 0x0a, - 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, 0x15, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x97, 0x03, 0x0a, 0x0e, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, - 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, + 0x17, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, + 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, + 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, + 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x97, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3c, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, - 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x3d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, - 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, - 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, - 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, - 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, + 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart index 57b67cef..cf769fff 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -268,11 +268,11 @@ class UpdateStationRequest extends $pb.GeneratedMessage { factory UpdateStationRequest({ $core.String? id, $core.String? morningNextStationId, - $core.String? morningEveningStationId, + $core.String? eveningNextStationId, $core.double? latitude, $core.double? longitude, $core.int? morningOrder, - $core.int? morningEveningOrder, + $core.int? eveningOrder, $9.FieldMask? updateMask, }) { final $result = create(); @@ -282,8 +282,8 @@ class UpdateStationRequest extends $pb.GeneratedMessage { if (morningNextStationId != null) { $result.morningNextStationId = morningNextStationId; } - if (morningEveningStationId != null) { - $result.morningEveningStationId = morningEveningStationId; + if (eveningNextStationId != null) { + $result.eveningNextStationId = eveningNextStationId; } if (latitude != null) { $result.latitude = latitude; @@ -294,8 +294,8 @@ class UpdateStationRequest extends $pb.GeneratedMessage { if (morningOrder != null) { $result.morningOrder = morningOrder; } - if (morningEveningOrder != null) { - $result.morningEveningOrder = morningEveningOrder; + if (eveningOrder != null) { + $result.eveningOrder = eveningOrder; } if (updateMask != null) { $result.updateMask = updateMask; @@ -309,11 +309,11 @@ class UpdateStationRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'morningNextStationId') - ..aOS(3, _omitFieldNames ? '' : 'morningEveningStationId') + ..aOS(3, _omitFieldNames ? '' : 'eveningNextStationId') ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.int>(7, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) - ..a<$core.int>(8, _omitFieldNames ? '' : 'morningEveningOrder', $pb.PbFieldType.O3) + ..a<$core.int>(8, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) ..aOM<$9.FieldMask>(9, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) ..hasRequiredFields = false ; @@ -358,13 +358,13 @@ class UpdateStationRequest extends $pb.GeneratedMessage { void clearMorningNextStationId() => clearField(2); @$pb.TagNumber(3) - $core.String get morningEveningStationId => $_getSZ(2); + $core.String get eveningNextStationId => $_getSZ(2); @$pb.TagNumber(3) - set morningEveningStationId($core.String v) { $_setString(2, v); } + set eveningNextStationId($core.String v) { $_setString(2, v); } @$pb.TagNumber(3) - $core.bool hasMorningEveningStationId() => $_has(2); + $core.bool hasEveningNextStationId() => $_has(2); @$pb.TagNumber(3) - void clearMorningEveningStationId() => clearField(3); + void clearEveningNextStationId() => clearField(3); @$pb.TagNumber(5) $core.double get latitude => $_getN(3); @@ -394,13 +394,13 @@ class UpdateStationRequest extends $pb.GeneratedMessage { void clearMorningOrder() => clearField(7); @$pb.TagNumber(8) - $core.int get morningEveningOrder => $_getIZ(6); + $core.int get eveningOrder => $_getIZ(6); @$pb.TagNumber(8) - set morningEveningOrder($core.int v) { $_setSignedInt32(6, v); } + set eveningOrder($core.int v) { $_setSignedInt32(6, v); } @$pb.TagNumber(8) - $core.bool hasMorningEveningOrder() => $_has(6); + $core.bool hasEveningOrder() => $_has(6); @$pb.TagNumber(8) - void clearMorningEveningOrder() => clearField(8); + void clearEveningOrder() => clearField(8); @$pb.TagNumber(9) $9.FieldMask get updateMask => $_getN(7); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart index f0a6a8b1..97970f81 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -79,11 +79,11 @@ const UpdateStationRequest$json = { '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'morning_next_station_id', '3': 2, '4': 1, '5': 9, '10': 'morningNextStationId'}, - {'1': 'morning_evening_station_id', '3': 3, '4': 1, '5': 9, '10': 'morningEveningStationId'}, + {'1': 'evening_next_station_id', '3': 3, '4': 1, '5': 9, '10': 'eveningNextStationId'}, {'1': 'latitude', '3': 5, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 6, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'morning_order', '3': 7, '4': 1, '5': 5, '10': 'morningOrder'}, - {'1': 'morning_evening_order', '3': 8, '4': 1, '5': 5, '10': 'morningEveningOrder'}, + {'1': 'evening_order', '3': 8, '4': 1, '5': 5, '10': 'eveningOrder'}, {'1': 'update_mask', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, ], }; @@ -91,12 +91,12 @@ const UpdateStationRequest$json = { /// Descriptor for `UpdateStationRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List updateStationRequestDescriptor = $convert.base64Decode( 'ChRVcGRhdGVTdGF0aW9uUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSNQoXbW9ybmluZ19uZXh0X3' - 'N0YXRpb25faWQYAiABKAlSFG1vcm5pbmdOZXh0U3RhdGlvbklkEjsKGm1vcm5pbmdfZXZlbmlu' - 'Z19zdGF0aW9uX2lkGAMgASgJUhdtb3JuaW5nRXZlbmluZ1N0YXRpb25JZBIaCghsYXRpdHVkZR' - 'gFIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAYgASgBUglsb25naXR1ZGUSIwoNbW9ybmlu' - 'Z19vcmRlchgHIAEoBVIMbW9ybmluZ09yZGVyEjIKFW1vcm5pbmdfZXZlbmluZ19vcmRlchgIIA' - 'EoBVITbW9ybmluZ0V2ZW5pbmdPcmRlchI7Cgt1cGRhdGVfbWFzaxgJIAEoCzIaLmdvb2dsZS5w' - 'cm90b2J1Zi5GaWVsZE1hc2tSCnVwZGF0ZU1hc2s='); + 'N0YXRpb25faWQYAiABKAlSFG1vcm5pbmdOZXh0U3RhdGlvbklkEjUKF2V2ZW5pbmdfbmV4dF9z' + 'dGF0aW9uX2lkGAMgASgJUhRldmVuaW5nTmV4dFN0YXRpb25JZBIaCghsYXRpdHVkZRgFIAEoAV' + 'IIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAYgASgBUglsb25naXR1ZGUSIwoNbW9ybmluZ19vcmRl' + 'chgHIAEoBVIMbW9ybmluZ09yZGVyEiMKDWV2ZW5pbmdfb3JkZXIYCCABKAVSDGV2ZW5pbmdPcm' + 'RlchI7Cgt1cGRhdGVfbWFzaxgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tSCnVw' + 'ZGF0ZU1hc2s='); @$core.Deprecated('Use updateStationResponseDescriptor instead') const UpdateStationResponse$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py index fd586875..d0d2e74b 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"\xe4\x01\n\x14UpdateNurseryRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x16\n\x06\x61\x64ress\x18\x03 \x01(\tR\x06\x61\x64ress\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x05 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x06 \x01(\tR\x08password\x12;\n\x0bupdate_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"V\n\x15UpdateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xbf\x02\n\x0eNurseryService\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponse\x12\x64\n\rUpdateNursery\x12(.where_child_bus.v1.UpdateNurseryRequest\x1a).where_child_bus.v1.UpdateNurseryResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"\xe6\x01\n\x14UpdateNurseryRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x05 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x06 \x01(\tR\x08password\x12;\n\x0bupdate_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"V\n\x15UpdateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xbf\x02\n\x0eNurseryService\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponse\x12\x64\n\rUpdateNursery\x12(.where_child_bus.v1.UpdateNurseryRequest\x1a).where_child_bus.v1.UpdateNurseryResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -33,9 +33,9 @@ _globals['_NURSERYLOGINRESPONSE']._serialized_start=443 _globals['_NURSERYLOGINRESPONSE']._serialized_end=554 _globals['_UPDATENURSERYREQUEST']._serialized_start=557 - _globals['_UPDATENURSERYREQUEST']._serialized_end=785 - _globals['_UPDATENURSERYRESPONSE']._serialized_start=787 - _globals['_UPDATENURSERYRESPONSE']._serialized_end=873 - _globals['_NURSERYSERVICE']._serialized_start=876 - _globals['_NURSERYSERVICE']._serialized_end=1195 + _globals['_UPDATENURSERYREQUEST']._serialized_end=787 + _globals['_UPDATENURSERYRESPONSE']._serialized_start=789 + _globals['_UPDATENURSERYRESPONSE']._serialized_end=875 + _globals['_NURSERYSERVICE']._serialized_start=878 + _globals['_NURSERYSERVICE']._serialized_end=1197 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi index 922b63ec..8cff8e93 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi @@ -43,22 +43,22 @@ class NurseryLoginResponse(_message.Message): def __init__(self, success: bool = ..., nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... class UpdateNurseryRequest(_message.Message): - __slots__ = ("id", "name", "adress", "phone_number", "email", "password", "update_mask") + __slots__ = ("id", "name", "address", "phone_number", "email", "password", "update_mask") ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] - ADRESS_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] EMAIL_FIELD_NUMBER: _ClassVar[int] PASSWORD_FIELD_NUMBER: _ClassVar[int] UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] id: str name: str - adress: str + address: str phone_number: str email: str password: str update_mask: _field_mask_pb2.FieldMask - def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., adress: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., password: _Optional[str] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., password: _Optional[str] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateNurseryResponse(_message.Message): __slots__ = ("nursery",) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py index 31dbf5ab..f183f9f6 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"\xea\x02\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x35\n\x17morning_next_station_id\x18\x02 \x01(\tR\x14morningNextStationId\x12;\n\x1amorning_evening_station_id\x18\x03 \x01(\tR\x17morningEveningStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12\x32\n\x15morning_evening_order\x18\x08 \x01(\x05R\x13morningEveningOrder\x12;\n\x0bupdate_mask\x18\t \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\x97\x03\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"\xd5\x02\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x35\n\x17morning_next_station_id\x18\x02 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x03 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12;\n\x0bupdate_mask\x18\t \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\x97\x03\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -33,9 +33,9 @@ _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=418 _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=685 _globals['_UPDATESTATIONREQUEST']._serialized_start=688 - _globals['_UPDATESTATIONREQUEST']._serialized_end=1050 - _globals['_UPDATESTATIONRESPONSE']._serialized_start=1052 - _globals['_UPDATESTATIONRESPONSE']._serialized_end=1130 - _globals['_STATIONSERVICE']._serialized_start=1133 - _globals['_STATIONSERVICE']._serialized_end=1540 + _globals['_UPDATESTATIONREQUEST']._serialized_end=1029 + _globals['_UPDATESTATIONRESPONSE']._serialized_start=1031 + _globals['_UPDATESTATIONRESPONSE']._serialized_end=1109 + _globals['_STATIONSERVICE']._serialized_start=1112 + _globals['_STATIONSERVICE']._serialized_end=1519 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi index 2a4d9787..3d4ff51e 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi @@ -42,24 +42,24 @@ class GetStationListByBusIdResponse(_message.Message): def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... class UpdateStationRequest(_message.Message): - __slots__ = ("id", "morning_next_station_id", "morning_evening_station_id", "latitude", "longitude", "morning_order", "morning_evening_order", "update_mask") + __slots__ = ("id", "morning_next_station_id", "evening_next_station_id", "latitude", "longitude", "morning_order", "evening_order", "update_mask") ID_FIELD_NUMBER: _ClassVar[int] MORNING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] - MORNING_EVENING_STATION_ID_FIELD_NUMBER: _ClassVar[int] + EVENING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] MORNING_ORDER_FIELD_NUMBER: _ClassVar[int] - MORNING_EVENING_ORDER_FIELD_NUMBER: _ClassVar[int] + EVENING_ORDER_FIELD_NUMBER: _ClassVar[int] UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] id: str morning_next_station_id: str - morning_evening_station_id: str + evening_next_station_id: str latitude: float longitude: float morning_order: int - morning_evening_order: int + evening_order: int update_mask: _field_mask_pb2.FieldMask - def __init__(self, id: _Optional[str] = ..., morning_next_station_id: _Optional[str] = ..., morning_evening_station_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., morning_order: _Optional[int] = ..., morning_evening_order: _Optional[int] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., morning_next_station_id: _Optional[str] = ..., evening_next_station_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., morning_order: _Optional[int] = ..., evening_order: _Optional[int] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateStationResponse(_message.Message): __slots__ = ("station",) diff --git a/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto index 3b372f40..c3aa3f5b 100644 --- a/proto/where_child_bus/v1/station.proto +++ b/proto/where_child_bus/v1/station.proto @@ -35,11 +35,11 @@ message GetStationListByBusIdResponse { message UpdateStationRequest { string id = 1; string morning_next_station_id = 2; - string morning_evening_station_id = 3; + string evening_next_station_id = 3; double latitude = 5; double longitude = 6; int32 morning_order = 7; - int32 morning_evening_order = 8; + int32 evening_order = 8; google.protobuf.FieldMask update_mask = 9; } From 6fecf7325310a18bd59178ab48293af25fe625fa Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 20:48:51 +0900 Subject: [PATCH 550/771] =?UTF-8?q?fix:=20morning=5Fnext=5Fstation=5Fid?= =?UTF-8?q?=E3=81=A8evening=5Fnext=5Fstation=5Fid=E3=82=92update=E3=81=8B?= =?UTF-8?q?=E3=82=89=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/where_child_bus/v1/station.pb.go | 145 ++++++++---------- .../where_child_bus/v1/station.pb.dart | 58 ++----- .../where_child_bus/v1/station.pbjson.dart | 14 +- .../where_child_bus/v1/station_pb2.py | 12 +- .../where_child_bus/v1/station_pb2.pyi | 8 +- proto/where_child_bus/v1/station.proto | 2 - 6 files changed, 89 insertions(+), 150 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index 5b5a10f3..0e38847d 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -254,14 +254,12 @@ type UpdateStationRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - MorningNextStationId string `protobuf:"bytes,2,opt,name=morning_next_station_id,json=morningNextStationId,proto3" json:"morning_next_station_id,omitempty"` - EveningNextStationId string `protobuf:"bytes,3,opt,name=evening_next_station_id,json=eveningNextStationId,proto3" json:"evening_next_station_id,omitempty"` - Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` - MorningOrder int32 `protobuf:"varint,7,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` - EveningOrder int32 `protobuf:"varint,8,opt,name=evening_order,json=eveningOrder,proto3" json:"evening_order,omitempty"` - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,9,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` + MorningOrder int32 `protobuf:"varint,7,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` + EveningOrder int32 `protobuf:"varint,8,opt,name=evening_order,json=eveningOrder,proto3" json:"evening_order,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,9,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } func (x *UpdateStationRequest) Reset() { @@ -303,20 +301,6 @@ func (x *UpdateStationRequest) GetId() string { return "" } -func (x *UpdateStationRequest) GetMorningNextStationId() string { - if x != nil { - return x.MorningNextStationId - } - return "" -} - -func (x *UpdateStationRequest) GetEveningNextStationId() string { - if x != nil { - return x.EveningNextStationId - } - return "" -} - func (x *UpdateStationRequest) GetLatitude() float64 { if x != nil { return x.Latitude @@ -444,75 +428,68 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0xd5, 0x02, + 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0xe7, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, - 0x17, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, - 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, - 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, - 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x97, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3c, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, + 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x97, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, + 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, - 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, - 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, + 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, + 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, + 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart index cf769fff..f100f40c 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -267,8 +267,6 @@ class GetStationListByBusIdResponse extends $pb.GeneratedMessage { class UpdateStationRequest extends $pb.GeneratedMessage { factory UpdateStationRequest({ $core.String? id, - $core.String? morningNextStationId, - $core.String? eveningNextStationId, $core.double? latitude, $core.double? longitude, $core.int? morningOrder, @@ -279,12 +277,6 @@ class UpdateStationRequest extends $pb.GeneratedMessage { if (id != null) { $result.id = id; } - if (morningNextStationId != null) { - $result.morningNextStationId = morningNextStationId; - } - if (eveningNextStationId != null) { - $result.eveningNextStationId = eveningNextStationId; - } if (latitude != null) { $result.latitude = latitude; } @@ -308,8 +300,6 @@ class UpdateStationRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'morningNextStationId') - ..aOS(3, _omitFieldNames ? '' : 'eveningNextStationId') ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..a<$core.int>(7, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) @@ -348,70 +338,52 @@ class UpdateStationRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearId() => clearField(1); - @$pb.TagNumber(2) - $core.String get morningNextStationId => $_getSZ(1); - @$pb.TagNumber(2) - set morningNextStationId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasMorningNextStationId() => $_has(1); - @$pb.TagNumber(2) - void clearMorningNextStationId() => clearField(2); - - @$pb.TagNumber(3) - $core.String get eveningNextStationId => $_getSZ(2); - @$pb.TagNumber(3) - set eveningNextStationId($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasEveningNextStationId() => $_has(2); - @$pb.TagNumber(3) - void clearEveningNextStationId() => clearField(3); - @$pb.TagNumber(5) - $core.double get latitude => $_getN(3); + $core.double get latitude => $_getN(1); @$pb.TagNumber(5) - set latitude($core.double v) { $_setDouble(3, v); } + set latitude($core.double v) { $_setDouble(1, v); } @$pb.TagNumber(5) - $core.bool hasLatitude() => $_has(3); + $core.bool hasLatitude() => $_has(1); @$pb.TagNumber(5) void clearLatitude() => clearField(5); @$pb.TagNumber(6) - $core.double get longitude => $_getN(4); + $core.double get longitude => $_getN(2); @$pb.TagNumber(6) - set longitude($core.double v) { $_setDouble(4, v); } + set longitude($core.double v) { $_setDouble(2, v); } @$pb.TagNumber(6) - $core.bool hasLongitude() => $_has(4); + $core.bool hasLongitude() => $_has(2); @$pb.TagNumber(6) void clearLongitude() => clearField(6); @$pb.TagNumber(7) - $core.int get morningOrder => $_getIZ(5); + $core.int get morningOrder => $_getIZ(3); @$pb.TagNumber(7) - set morningOrder($core.int v) { $_setSignedInt32(5, v); } + set morningOrder($core.int v) { $_setSignedInt32(3, v); } @$pb.TagNumber(7) - $core.bool hasMorningOrder() => $_has(5); + $core.bool hasMorningOrder() => $_has(3); @$pb.TagNumber(7) void clearMorningOrder() => clearField(7); @$pb.TagNumber(8) - $core.int get eveningOrder => $_getIZ(6); + $core.int get eveningOrder => $_getIZ(4); @$pb.TagNumber(8) - set eveningOrder($core.int v) { $_setSignedInt32(6, v); } + set eveningOrder($core.int v) { $_setSignedInt32(4, v); } @$pb.TagNumber(8) - $core.bool hasEveningOrder() => $_has(6); + $core.bool hasEveningOrder() => $_has(4); @$pb.TagNumber(8) void clearEveningOrder() => clearField(8); @$pb.TagNumber(9) - $9.FieldMask get updateMask => $_getN(7); + $9.FieldMask get updateMask => $_getN(5); @$pb.TagNumber(9) set updateMask($9.FieldMask v) { setField(9, v); } @$pb.TagNumber(9) - $core.bool hasUpdateMask() => $_has(7); + $core.bool hasUpdateMask() => $_has(5); @$pb.TagNumber(9) void clearUpdateMask() => clearField(9); @$pb.TagNumber(9) - $9.FieldMask ensureUpdateMask() => $_ensure(7); + $9.FieldMask ensureUpdateMask() => $_ensure(5); } class UpdateStationResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart index 97970f81..1da780a7 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -78,8 +78,6 @@ const UpdateStationRequest$json = { '1': 'UpdateStationRequest', '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'morning_next_station_id', '3': 2, '4': 1, '5': 9, '10': 'morningNextStationId'}, - {'1': 'evening_next_station_id', '3': 3, '4': 1, '5': 9, '10': 'eveningNextStationId'}, {'1': 'latitude', '3': 5, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 6, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'morning_order', '3': 7, '4': 1, '5': 5, '10': 'morningOrder'}, @@ -90,13 +88,11 @@ const UpdateStationRequest$json = { /// Descriptor for `UpdateStationRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List updateStationRequestDescriptor = $convert.base64Decode( - 'ChRVcGRhdGVTdGF0aW9uUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSNQoXbW9ybmluZ19uZXh0X3' - 'N0YXRpb25faWQYAiABKAlSFG1vcm5pbmdOZXh0U3RhdGlvbklkEjUKF2V2ZW5pbmdfbmV4dF9z' - 'dGF0aW9uX2lkGAMgASgJUhRldmVuaW5nTmV4dFN0YXRpb25JZBIaCghsYXRpdHVkZRgFIAEoAV' - 'IIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAYgASgBUglsb25naXR1ZGUSIwoNbW9ybmluZ19vcmRl' - 'chgHIAEoBVIMbW9ybmluZ09yZGVyEiMKDWV2ZW5pbmdfb3JkZXIYCCABKAVSDGV2ZW5pbmdPcm' - 'RlchI7Cgt1cGRhdGVfbWFzaxgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tSCnVw' - 'ZGF0ZU1hc2s='); + 'ChRVcGRhdGVTdGF0aW9uUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSGgoIbGF0aXR1ZGUYBSABKA' + 'FSCGxhdGl0dWRlEhwKCWxvbmdpdHVkZRgGIAEoAVIJbG9uZ2l0dWRlEiMKDW1vcm5pbmdfb3Jk' + 'ZXIYByABKAVSDG1vcm5pbmdPcmRlchIjCg1ldmVuaW5nX29yZGVyGAggASgFUgxldmVuaW5nT3' + 'JkZXISOwoLdXBkYXRlX21hc2sYCSABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrUgp1' + 'cGRhdGVNYXNr'); @$core.Deprecated('Use updateStationResponseDescriptor instead') const UpdateStationResponse$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py index f183f9f6..d13ac3df 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"\xd5\x02\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x35\n\x17morning_next_station_id\x18\x02 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x03 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12;\n\x0bupdate_mask\x18\t \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\x97\x03\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"\xe7\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12;\n\x0bupdate_mask\x18\t \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\x97\x03\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -33,9 +33,9 @@ _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=418 _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=685 _globals['_UPDATESTATIONREQUEST']._serialized_start=688 - _globals['_UPDATESTATIONREQUEST']._serialized_end=1029 - _globals['_UPDATESTATIONRESPONSE']._serialized_start=1031 - _globals['_UPDATESTATIONRESPONSE']._serialized_end=1109 - _globals['_STATIONSERVICE']._serialized_start=1112 - _globals['_STATIONSERVICE']._serialized_end=1519 + _globals['_UPDATESTATIONREQUEST']._serialized_end=919 + _globals['_UPDATESTATIONRESPONSE']._serialized_start=921 + _globals['_UPDATESTATIONRESPONSE']._serialized_end=999 + _globals['_STATIONSERVICE']._serialized_start=1002 + _globals['_STATIONSERVICE']._serialized_end=1409 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi index 3d4ff51e..256a2b93 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi @@ -42,24 +42,20 @@ class GetStationListByBusIdResponse(_message.Message): def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... class UpdateStationRequest(_message.Message): - __slots__ = ("id", "morning_next_station_id", "evening_next_station_id", "latitude", "longitude", "morning_order", "evening_order", "update_mask") + __slots__ = ("id", "latitude", "longitude", "morning_order", "evening_order", "update_mask") ID_FIELD_NUMBER: _ClassVar[int] - MORNING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] - EVENING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] MORNING_ORDER_FIELD_NUMBER: _ClassVar[int] EVENING_ORDER_FIELD_NUMBER: _ClassVar[int] UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] id: str - morning_next_station_id: str - evening_next_station_id: str latitude: float longitude: float morning_order: int evening_order: int update_mask: _field_mask_pb2.FieldMask - def __init__(self, id: _Optional[str] = ..., morning_next_station_id: _Optional[str] = ..., evening_next_station_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., morning_order: _Optional[int] = ..., evening_order: _Optional[int] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., morning_order: _Optional[int] = ..., evening_order: _Optional[int] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateStationResponse(_message.Message): __slots__ = ("station",) diff --git a/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto index c3aa3f5b..f3cfccb5 100644 --- a/proto/where_child_bus/v1/station.proto +++ b/proto/where_child_bus/v1/station.proto @@ -34,8 +34,6 @@ message GetStationListByBusIdResponse { message UpdateStationRequest { string id = 1; - string morning_next_station_id = 2; - string evening_next_station_id = 3; double latitude = 5; double longitude = 6; int32 morning_order = 7; From 380baf48480273dfbdecd4efe21d5638063b20cd Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 21:10:15 +0900 Subject: [PATCH 551/771] =?UTF-8?q?fix:=20morning=5Forder=E3=81=A8evening?= =?UTF-8?q?=5Forder=E3=82=92=E5=88=A9=E7=94=A8=E3=81=97=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/where_child_bus/v1/station.pb.go | 130 ++++++++---------- .../where_child_bus/v1/station.pb.dart | 76 ++++------ .../where_child_bus/v1/station.pbjson.dart | 16 +-- .../where_child_bus/v1/station_pb2.py | 12 +- .../where_child_bus/v1/station_pb2.pyi | 8 +- proto/where_child_bus/v1/station.proto | 8 +- 6 files changed, 96 insertions(+), 154 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index 0e38847d..e787950b 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -254,12 +254,10 @@ type UpdateStationRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` - MorningOrder int32 `protobuf:"varint,7,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` - EveningOrder int32 `protobuf:"varint,8,opt,name=evening_order,json=eveningOrder,proto3" json:"evening_order,omitempty"` - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,9,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,4,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } func (x *UpdateStationRequest) Reset() { @@ -315,20 +313,6 @@ func (x *UpdateStationRequest) GetLongitude() float64 { return 0 } -func (x *UpdateStationRequest) GetMorningOrder() int32 { - if x != nil { - return x.MorningOrder - } - return 0 -} - -func (x *UpdateStationRequest) GetEveningOrder() int32 { - if x != nil { - return x.EveningOrder - } - return 0 -} - func (x *UpdateStationRequest) GetUpdateMask() *fieldmaskpb.FieldMask { if x != nil { return x.UpdateMask @@ -428,68 +412,64 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0xe7, 0x01, + 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, - 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, - 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x97, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, - 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, + 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, + 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x97, 0x03, + 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, - 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, - 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, - 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, + 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, + 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, + 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart index f100f40c..ca5b25ef 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -269,8 +269,6 @@ class UpdateStationRequest extends $pb.GeneratedMessage { $core.String? id, $core.double? latitude, $core.double? longitude, - $core.int? morningOrder, - $core.int? eveningOrder, $9.FieldMask? updateMask, }) { final $result = create(); @@ -283,12 +281,6 @@ class UpdateStationRequest extends $pb.GeneratedMessage { if (longitude != null) { $result.longitude = longitude; } - if (morningOrder != null) { - $result.morningOrder = morningOrder; - } - if (eveningOrder != null) { - $result.eveningOrder = eveningOrder; - } if (updateMask != null) { $result.updateMask = updateMask; } @@ -300,11 +292,9 @@ class UpdateStationRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') - ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) - ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..a<$core.int>(7, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) - ..a<$core.int>(8, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) - ..aOM<$9.FieldMask>(9, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..a<$core.double>(2, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(3, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..aOM<$9.FieldMask>(4, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) ..hasRequiredFields = false ; @@ -338,52 +328,34 @@ class UpdateStationRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearId() => clearField(1); - @$pb.TagNumber(5) + @$pb.TagNumber(2) $core.double get latitude => $_getN(1); - @$pb.TagNumber(5) + @$pb.TagNumber(2) set latitude($core.double v) { $_setDouble(1, v); } - @$pb.TagNumber(5) + @$pb.TagNumber(2) $core.bool hasLatitude() => $_has(1); - @$pb.TagNumber(5) - void clearLatitude() => clearField(5); + @$pb.TagNumber(2) + void clearLatitude() => clearField(2); - @$pb.TagNumber(6) + @$pb.TagNumber(3) $core.double get longitude => $_getN(2); - @$pb.TagNumber(6) + @$pb.TagNumber(3) set longitude($core.double v) { $_setDouble(2, v); } - @$pb.TagNumber(6) + @$pb.TagNumber(3) $core.bool hasLongitude() => $_has(2); - @$pb.TagNumber(6) - void clearLongitude() => clearField(6); - - @$pb.TagNumber(7) - $core.int get morningOrder => $_getIZ(3); - @$pb.TagNumber(7) - set morningOrder($core.int v) { $_setSignedInt32(3, v); } - @$pb.TagNumber(7) - $core.bool hasMorningOrder() => $_has(3); - @$pb.TagNumber(7) - void clearMorningOrder() => clearField(7); - - @$pb.TagNumber(8) - $core.int get eveningOrder => $_getIZ(4); - @$pb.TagNumber(8) - set eveningOrder($core.int v) { $_setSignedInt32(4, v); } - @$pb.TagNumber(8) - $core.bool hasEveningOrder() => $_has(4); - @$pb.TagNumber(8) - void clearEveningOrder() => clearField(8); - - @$pb.TagNumber(9) - $9.FieldMask get updateMask => $_getN(5); - @$pb.TagNumber(9) - set updateMask($9.FieldMask v) { setField(9, v); } - @$pb.TagNumber(9) - $core.bool hasUpdateMask() => $_has(5); - @$pb.TagNumber(9) - void clearUpdateMask() => clearField(9); - @$pb.TagNumber(9) - $9.FieldMask ensureUpdateMask() => $_ensure(5); + @$pb.TagNumber(3) + void clearLongitude() => clearField(3); + + @$pb.TagNumber(4) + $9.FieldMask get updateMask => $_getN(3); + @$pb.TagNumber(4) + set updateMask($9.FieldMask v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasUpdateMask() => $_has(3); + @$pb.TagNumber(4) + void clearUpdateMask() => clearField(4); + @$pb.TagNumber(4) + $9.FieldMask ensureUpdateMask() => $_ensure(3); } class UpdateStationResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart index 1da780a7..b27c096b 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -78,21 +78,17 @@ const UpdateStationRequest$json = { '1': 'UpdateStationRequest', '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'latitude', '3': 5, '4': 1, '5': 1, '10': 'latitude'}, - {'1': 'longitude', '3': 6, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'morning_order', '3': 7, '4': 1, '5': 5, '10': 'morningOrder'}, - {'1': 'evening_order', '3': 8, '4': 1, '5': 5, '10': 'eveningOrder'}, - {'1': 'update_mask', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, + {'1': 'latitude', '3': 2, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 3, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'update_mask', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, ], }; /// Descriptor for `UpdateStationRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List updateStationRequestDescriptor = $convert.base64Decode( - 'ChRVcGRhdGVTdGF0aW9uUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSGgoIbGF0aXR1ZGUYBSABKA' - 'FSCGxhdGl0dWRlEhwKCWxvbmdpdHVkZRgGIAEoAVIJbG9uZ2l0dWRlEiMKDW1vcm5pbmdfb3Jk' - 'ZXIYByABKAVSDG1vcm5pbmdPcmRlchIjCg1ldmVuaW5nX29yZGVyGAggASgFUgxldmVuaW5nT3' - 'JkZXISOwoLdXBkYXRlX21hc2sYCSABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrUgp1' - 'cGRhdGVNYXNr'); + 'ChRVcGRhdGVTdGF0aW9uUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSGgoIbGF0aXR1ZGUYAiABKA' + 'FSCGxhdGl0dWRlEhwKCWxvbmdpdHVkZRgDIAEoAVIJbG9uZ2l0dWRlEjsKC3VwZGF0ZV9tYXNr' + 'GAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFza1IKdXBkYXRlTWFzaw=='); @$core.Deprecated('Use updateStationResponseDescriptor instead') const UpdateStationResponse$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py index d13ac3df..2ab39e73 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"\xe7\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12;\n\x0bupdate_mask\x18\t \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\x97\x03\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"\x9d\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\x97\x03\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -33,9 +33,9 @@ _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=418 _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=685 _globals['_UPDATESTATIONREQUEST']._serialized_start=688 - _globals['_UPDATESTATIONREQUEST']._serialized_end=919 - _globals['_UPDATESTATIONRESPONSE']._serialized_start=921 - _globals['_UPDATESTATIONRESPONSE']._serialized_end=999 - _globals['_STATIONSERVICE']._serialized_start=1002 - _globals['_STATIONSERVICE']._serialized_end=1409 + _globals['_UPDATESTATIONREQUEST']._serialized_end=845 + _globals['_UPDATESTATIONRESPONSE']._serialized_start=847 + _globals['_UPDATESTATIONRESPONSE']._serialized_end=925 + _globals['_STATIONSERVICE']._serialized_start=928 + _globals['_STATIONSERVICE']._serialized_end=1335 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi index 256a2b93..e1e321c3 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi @@ -42,20 +42,16 @@ class GetStationListByBusIdResponse(_message.Message): def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... class UpdateStationRequest(_message.Message): - __slots__ = ("id", "latitude", "longitude", "morning_order", "evening_order", "update_mask") + __slots__ = ("id", "latitude", "longitude", "update_mask") ID_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] - MORNING_ORDER_FIELD_NUMBER: _ClassVar[int] - EVENING_ORDER_FIELD_NUMBER: _ClassVar[int] UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] id: str latitude: float longitude: float - morning_order: int - evening_order: int update_mask: _field_mask_pb2.FieldMask - def __init__(self, id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., morning_order: _Optional[int] = ..., evening_order: _Optional[int] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateStationResponse(_message.Message): __slots__ = ("station",) diff --git a/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto index f3cfccb5..ff84d388 100644 --- a/proto/where_child_bus/v1/station.proto +++ b/proto/where_child_bus/v1/station.proto @@ -34,11 +34,9 @@ message GetStationListByBusIdResponse { message UpdateStationRequest { string id = 1; - double latitude = 5; - double longitude = 6; - int32 morning_order = 7; - int32 evening_order = 8; - google.protobuf.FieldMask update_mask = 9; + double latitude = 2; + double longitude = 3; + google.protobuf.FieldMask update_mask = 4; } message UpdateStationResponse { From b4879aa27c7234e6fc9e35e5a656b55c01e1bbc1 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 21:10:41 +0900 Subject: [PATCH 552/771] =?UTF-8?q?feat:=20nursery=E3=81=AEupdate=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/nursery/nursery.go | 66 ++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index e2c245a8..af89c79d 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -10,9 +10,11 @@ import ( "context" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" + "github.com/google/uuid" ) type Interactor struct { @@ -114,8 +116,70 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque } func (i *Interactor) UpdateNursery(ctx context.Context, req *pb.UpdateNurseryRequest) (*pb.UpdateNurseryResponse, error) { - panic("unimplemented") // TODO: 実装 + // requestからnurseryIDを取得 + nurseryID, err := uuid.Parse(req.NurseryId) + if err != nil { + i.logger.Error("failed to parse uuid", "error", err) + return nil, err + } + + // トランザクションを開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + i.logger.Error("failed to start transaction", "error", err) + return nil, err + } + defer utils.RollbackTx(tx, i.logger) + + // 更新処理を行うためのビルダーを構築 + update := tx.Nursery.Update().Where(nursery.IDEQ(nurseryID)) + for _, path := range req.UpdateMask.Paths { + switch path { + case "name": + update.SetName(req.Name) + case "email": + update.SetEmail(req.Email) + case "phoneNumber": + update.SetPhoneNumber(req.PhoneNumber) + case "address": + update.SetAddress(req.Address) + case "password": + hashedPassword, err := utils.HashPassword(req.Password) + if err != nil { + i.logger.Error("failed to hash password", "error", err) + return nil, err + } + update.SetHashedPassword(hashedPassword) + } + } + + // 更新の実行 + _, err = update.Save(ctx) + if err != nil { + i.logger.Error("failed to update nursery", "error", err) + return nil, err + } + + // 更新されたエンティティの取得 + uodatedNursery, err := tx.Nursery.Query(). + Where(nursery.IDEQ(nurseryID)). + Only(ctx) + if err != nil { + i.logger.Error("failed to get nursery", "error", err) + return nil, err + } + + // トランザクションをコミット + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + + // レスポンスの生成と返却 + return &pb.UpdateNurseryResponse{ + Nursery: utils.ToPbNurseryResponse(uodatedNursery), + }, nil } // コード生成 From 15965cd948cc6652a647e13e2e97a40bfb6f4944 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 21:10:56 +0900 Subject: [PATCH 553/771] =?UTF-8?q?feat:=20station=E3=81=AEupdate=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/station/station.go | 61 ++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 05389c52..47336dfa 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -8,6 +8,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" stationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" @@ -90,8 +91,66 @@ func (i *Interactor) UpdateStationLocationByGuardianID(ctx context.Context, req } func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { - panic("unimplemented") // TODO: 実装 + // station_idのパース + stationID, err := uuid.Parse(req.StationId) + if err != nil { + i.logger.Error("failed to parse station ID", "error", err) + return nil, err + } + + // トランザクションの開始 + tx, err := i.entClient.Tx(ctx) + if err != nil { + i.logger.Error("failed to start transaction", "error", err) + return nil, err + } + defer utils.RollbackTx(tx, i.logger) + + // 更新処理のビルダー + update := tx.Station.Update().Where(station.IDEQ(stationID)) + for _, path := range req.UpdateMask.Paths { + switch path { + case "latitude": + update = update.SetLatitude(req.Latitude) + case "longitude": + update = update.SetLongitude(req.Longitude) + } + } + + // 更新の実行 + _, err = update.Save(ctx) + if err != nil { + i.logger.Error("failed to update station", "error", err) + return nil, err + } + + // 更新されたエンティティの取得 + updateStation, err := tx.Station.Query(). + Where(station.IDEQ(stationID)). + Only(ctx) + if err != nil { + i.logger.Error("failed to get updated station", "error", err) + return nil, err + } + + // トランザクションのコミット + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + + // 次のバス停を取得 + morningNextStationID, eveningNextStationID, err := getNextStationIDs(*i.logger, ctx, updateStation) + if err != nil { + i.logger.Error("failed to get next station IDs", "error", err) + return nil, err + } + + // レスポンスの作成と返却 + return &pb.UpdateStationResponse{ + Station: utils.ToPbStation(updateStation, morningNextStationID, eveningNextStationID), + }, nil } func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStationListByBusIdRequest) (*pb.GetStationListByBusIdResponse, error) { From c9a76807cb51bbc8c7c3e6ac9fe73decfd28a1f8 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Mon, 19 Feb 2024 21:21:44 +0900 Subject: [PATCH 554/771] fix: typo --- backend/usecases/nursery/nursery.go | 2 +- backend/usecases/station/station.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index af89c79d..eea00189 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -118,7 +118,7 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque func (i *Interactor) UpdateNursery(ctx context.Context, req *pb.UpdateNurseryRequest) (*pb.UpdateNurseryResponse, error) { // TODO: 実装 // requestからnurseryIDを取得 - nurseryID, err := uuid.Parse(req.NurseryId) + nurseryID, err := uuid.Parse(req.Id) if err != nil { i.logger.Error("failed to parse uuid", "error", err) return nil, err diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 47336dfa..d935dec1 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -93,7 +93,7 @@ func (i *Interactor) UpdateStationLocationByGuardianID(ctx context.Context, req func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { // TODO: 実装 // station_idのパース - stationID, err := uuid.Parse(req.StationId) + stationID, err := uuid.Parse(req.Id) if err != nil { i.logger.Error("failed to parse station ID", "error", err) return nil, err From 080d1e0dcc0de167893ff4ddcdfc131a73da4cff Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 19 Feb 2024 21:27:45 +0900 Subject: [PATCH 555/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E3=81=A8?= =?UTF-8?q?=E3=83=90=E3=82=B9=E3=82=BF=E3=82=A4=E3=83=97=E3=82=92=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E3=81=99=E3=82=8B=E7=94=BB=E9=9D=A2=E3=82=92=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/app.dart | 7 +- .../util}/input_value_label.dart | 2 +- .../util}/select_value_box.dart | 8 +- .../camera_page/camera_bus_select_page.dart | 155 ++++++++++++++++++ .../lib/pages/camera_page/camera_page.dart | 16 +- .../components/bus_select_box.dart | 35 ++++ .../components/time_select_box.dart | 41 +++++ .../components/utils/input_form_body.dart | 4 +- 8 files changed, 254 insertions(+), 14 deletions(-) rename frontend/where_child_bus/lib/{pages/student_list_page/components/utils => components/util}/input_value_label.dart (85%) rename frontend/where_child_bus/lib/{pages/student_list_page/components/utils => components/util}/select_value_box.dart (79%) create mode 100644 frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart create mode 100644 frontend/where_child_bus/lib/pages/camera_page/components/bus_select_box.dart create mode 100644 frontend/where_child_bus/lib/pages/camera_page/components/time_select_box.dart diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index c2484a98..7b3f009d 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_list_page.dart'; +import 'package:where_child_bus/pages/camera_page/camera_bus_select_page.dart'; import 'package:where_child_bus/pages/camera_page/camera_page.dart'; import 'package:where_child_bus/pages/notification_page/notification_page.dart'; import 'package:where_child_bus/pages/student_list_page/student_list_page.dart'; @@ -24,10 +25,10 @@ class _AppState extends State { title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定', 'カメラ'][_selectedIndex]), ), body: [ - ChildListPage(), - BusListPage(), + const ChildListPage(), + const BusListPage(), const NotificationPage(), - CameraPage() + const BusSelectPage(), ][_selectedIndex], bottomNavigationBar: BottomNavigationBar( type: BottomNavigationBarType.fixed, diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_value_label.dart b/frontend/where_child_bus/lib/components/util/input_value_label.dart similarity index 85% rename from frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_value_label.dart rename to frontend/where_child_bus/lib/components/util/input_value_label.dart index e1319e40..546803ca 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_value_label.dart +++ b/frontend/where_child_bus/lib/components/util/input_value_label.dart @@ -8,7 +8,7 @@ class InputValueLabel extends StatelessWidget { @override Widget build(BuildContext context) { return Padding( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.only(top: 10, bottom: 4), child: Text( label, style: const TextStyle(color: Colors.black, fontSize: 16), diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/select_value_box.dart b/frontend/where_child_bus/lib/components/util/select_value_box.dart similarity index 79% rename from frontend/where_child_bus/lib/pages/student_list_page/components/utils/select_value_box.dart rename to frontend/where_child_bus/lib/components/util/select_value_box.dart index b0b4b5da..13bc2dc7 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/select_value_box.dart +++ b/frontend/where_child_bus/lib/components/util/select_value_box.dart @@ -2,8 +2,9 @@ import 'package:flutter/material.dart'; class SelectValueBox extends StatefulWidget { final List lists; + String? selectedValue; - const SelectValueBox({required this.lists, super.key}); + SelectValueBox({required this.lists, super.key}); @override State createState() => _SelectValueBox(); } @@ -11,19 +12,18 @@ class SelectValueBox extends StatefulWidget { class _SelectValueBox extends State { @override Widget build(BuildContext context) { - String? selectedValue; return SizedBox( width: MediaQuery.of(context).size.width * 0.8, height: 50, child: DropdownButton( - value: selectedValue ?? widget.lists.first, + value: widget.selectedValue ?? widget.lists.first, items: widget.lists .map((String list) => DropdownMenuItem(value: list, child: Text(list))) .toList(), onChanged: (String? value) { setState(() { - selectedValue = value; + widget.selectedValue = value; }); }), ); diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart new file mode 100644 index 00000000..70a0c1c9 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart @@ -0,0 +1,155 @@ +import 'dart:developer' as developer; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/util/input_value_label.dart'; +import 'package:where_child_bus/models/nursery_bus_data.dart'; +import 'package:where_child_bus/models/nursery_data.dart'; +import 'package:where_child_bus/pages/camera_page/camera_page.dart'; +import 'package:where_child_bus/pages/camera_page/components/bus_select_box.dart'; +import 'package:where_child_bus/pages/camera_page/components/time_select_box.dart'; +import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pb.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class BusSelectPage extends StatefulWidget { + const BusSelectPage({super.key}); + + @override + State createState() => _BusSelectPageState(); +} + +class _BusSelectPageState extends State { + Bus? _selectedBus; + BusType _selectedType = BusType.BUS_TYPE_MORNING; + bool _isLoading = false; + bool _isFailLoading = false; + List _buses = []; + + @override + void initState() { + super.initState(); + _loadBuses(); + } + + Future _loadBuses() async { + if (NurseryBusData().getBusList().isNotEmpty) { + if (mounted) { + setState(() { + _buses = NurseryBusData().getBusList(); + }); + } + return; + } else { + try { + GetBusListByNurseryIdResponse busList = + await getBusList(NurseryData().getNursery().id); + NurseryBusData().setBusListResponse(busList); + if (mounted) { + setState(() { + _buses = NurseryBusData().getBusList(); + }); + } + } catch (error) { + if (kDebugMode) { + developer.log("バスのロード中にエラーが発生しました", error: error); + } + if (mounted) { + setState(() { + _isLoading = false; + _isFailLoading = true; + }); + } + } + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: _createPageBody(), + ); + } + + Widget _createPageBody() { + if (_isLoading) { + return const Center( + child: CircularProgressIndicator(), + ); + } else if (_isFailLoading) { + return const Center( + child: Text('データの取得に失敗しました'), + ); + } else { + return Center( + child: Column( + children: [ + _createBusInputLabelAndSelectBox(context, "バスを選択して下さい", + _buses.map((Bus bus) => bus.name).toList()), + const SizedBox(height: 20), + _createTimeInputLabelAndSelectBox(context, "時間を選択して下さい"), + const SizedBox(height: 20), + _proceedButton(), + ], + )); + } + } + + Widget _createBusInputLabelAndSelectBox( + BuildContext context, String label, List lists) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InputValueLabel(label: label), + BusSelectValueBox(busLists: _buses, onChanged: _onChangedBus), + ], + ); + } + + Widget _createTimeInputLabelAndSelectBox( + BuildContext context, + String label, + ) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InputValueLabel(label: label), + TimeSelectValueBox(onChanged: _onChangedTime), + ], + ); + } + + void _onChangedTime(BusType type) { + if (mounted) { + setState(() { + _selectedType = type; + }); + } + } + + void _onChangedBus(Bus? bus) { + if (mounted) { + setState(() { + _selectedBus = bus; + }); + } + } + + Widget _proceedButton() { + return ElevatedButton( + onPressed: () { + if (_selectedBus != null) { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => CameraPage( + bus: _selectedBus!, + busType: _selectedType, + ), + ), + ); + } + }, + child: const Text("カメラ起動"), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 2319df65..4518c5bc 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -7,9 +7,14 @@ import 'package:where_child_bus/config/config.dart'; import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; import "package:where_child_bus/main.dart" as where_child_bus; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class CameraPage extends StatefulWidget { - const CameraPage({Key? key}) : super(key: key); + Bus bus; + BusType busType; + + CameraPage({Key? key, required this.bus, required this.busType}) + : super(key: key); @override _CameraPageState createState() => _CameraPageState(); @@ -75,10 +80,13 @@ class _CameraPageState extends State { videoChunks.add(image.planes[0].bytes.toList()); _streamController.add(StreamBusVideoRequest( nurseryId: NurseryData().getNursery().id, + busId: widget.bus.id, + busType: widget.busType, + //TODO VheicleEventを動的にする + vehicleEvent: VehicleEvent.VEHICLE_EVENT_GET_ON, videoChunk: videoChunks)); - developer.log("Received image frame ${videoChunks}}", - name: "CameraPage"); - developer.log("widge ${image.width}", name: "CameraPage"); + developer.log("Received image frame", name: "CameraPage"); + developer.log("width ${image.width}", name: "CameraPage"); developer.log("height ${image.height}", name: "CameraPage"); videoChunks = []; diff --git a/frontend/where_child_bus/lib/pages/camera_page/components/bus_select_box.dart b/frontend/where_child_bus/lib/pages/camera_page/components/bus_select_box.dart new file mode 100644 index 00000000..50366d55 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/camera_page/components/bus_select_box.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class BusSelectValueBox extends StatefulWidget { + final List busLists; + final Function(Bus?) onChanged; + Bus? selectedBus; + + BusSelectValueBox( + {required this.busLists, required this.onChanged, super.key}); + @override + State createState() => _SelectValueBox(); +} + +class _SelectValueBox extends State { + @override + Widget build(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 50, + child: DropdownButton( + value: widget.selectedBus ?? widget.busLists.first, + items: widget.busLists + .map((Bus list) => + DropdownMenuItem(value: list, child: Text(list.name))) + .toList(), + onChanged: (Bus? value) { + setState(() { + widget.selectedBus = value; + }); + widget.onChanged(value); + }), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/camera_page/components/time_select_box.dart b/frontend/where_child_bus/lib/pages/camera_page/components/time_select_box.dart new file mode 100644 index 00000000..5d62849c --- /dev/null +++ b/frontend/where_child_bus/lib/pages/camera_page/components/time_select_box.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class TimeSelectValueBox extends StatefulWidget { + final Function(BusType) onChanged; + BusType selectedType = BusType.BUS_TYPE_MORNING; + + TimeSelectValueBox({required this.onChanged, super.key}); + @override + State createState() => _TimeSelectValueBox(); +} + +class _TimeSelectValueBox extends State { + @override + Widget build(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 50, + child: DropdownButton( + value: widget.selectedType, + items: const [ + DropdownMenuItem( + value: BusType.BUS_TYPE_MORNING, + child: Text("行き"), + ), + DropdownMenuItem( + value: BusType.BUS_TYPE_EVENING, + child: Text("帰り"), + ), + ], + onChanged: (BusType? value) { + if (value != null && mounted) { + setState(() { + widget.selectedType = value; + }); + widget.onChanged(value); + } + }), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index eec784be..7da889c5 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -7,9 +7,9 @@ import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus/service/get_guardian_list_by_nursery_id.dart'; import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; -import 'input_value_label.dart'; +import '../../../../components/util/input_value_label.dart'; import 'text_input_field.dart'; -import 'select_value_box.dart'; +import '../../../../components/util/select_value_box.dart'; import 'submit_button.dart'; class InputFormBody extends StatefulWidget { From 094c1fa169b5f371a41e31304fe6c04e3ce754a9 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 19 Feb 2024 21:38:37 +0900 Subject: [PATCH 556/771] =?UTF-8?q?chore;=E3=82=B9=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=83=BC=E3=83=A0=E3=81=AE=E3=83=AA=E3=82=AF=E3=82=A8=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=81=AB=E7=B8=A6=E6=A8=AA=E5=B9=85=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/app.dart | 2 -- .../lib/models/nursery_guardian_data.dart | 25 +++++++++++++++++++ .../bus_child_manage_page.dart | 1 - .../bus_edit_page/bus_edit_page.dart | 9 ++++--- .../bus_passenger_page.dart | 1 - .../lib/pages/camera_page/camera_page.dart | 15 ++++++----- .../components/utils/input_form_body.dart | 4 +-- .../lib/service/create_bus.dart | 1 - .../where_child_bus/lib/util/api/bus.dart | 3 --- 9 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 frontend/where_child_bus/lib/models/nursery_guardian_data.dart diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index 7b3f009d..a4e546d4 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -1,10 +1,8 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_list_page.dart'; import 'package:where_child_bus/pages/camera_page/camera_bus_select_page.dart'; -import 'package:where_child_bus/pages/camera_page/camera_page.dart'; import 'package:where_child_bus/pages/notification_page/notification_page.dart'; import 'package:where_child_bus/pages/student_list_page/student_list_page.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class App extends StatefulWidget { App({ diff --git a/frontend/where_child_bus/lib/models/nursery_guardian_data.dart b/frontend/where_child_bus/lib/models/nursery_guardian_data.dart new file mode 100644 index 00000000..218d2ea2 --- /dev/null +++ b/frontend/where_child_bus/lib/models/nursery_guardian_data.dart @@ -0,0 +1,25 @@ +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class NurseryGuardianData { + static final NurseryGuardianData _singleton = NurseryGuardianData._internal(); + GetGuardianListByNurseryIdResponse? _guardianList; + + factory NurseryGuardianData() { + return _singleton; + } + + NurseryGuardianData._internal(); + + void setGuardianListResponse(GetGuardianListByNurseryIdResponse res) { + _guardianList = res; + } + + List getGuardianList() { + return _guardianList?.guardians ?? []; + } + + void clearGuardianList() { + _guardianList = null; + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart index 97a33fb4..a940ee57 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:where_child_bus/components/child_list/child_list_with_button.dart'; class BusChildManagePage extends StatefulWidget { @override diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index a697ea3f..b73cabd9 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -1,4 +1,5 @@ import 'dart:io'; +import "dart:developer" as developer; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; import 'package:where_child_bus/models/bus_edit_page_type.dart'; @@ -14,10 +15,10 @@ class BusEditPage extends StatefulWidget { BusEditPage({super.key, this.bus, required this.busEditPageType}); @override - _BusEditPage createState() => _BusEditPage(); + _BusEditPageState createState() => _BusEditPageState(); } -class _BusEditPage extends State { +class _BusEditPageState extends State { final ImagePicker _picker = ImagePicker(); final TextEditingController _busNameController = TextEditingController(); final TextEditingController _busNumberController = TextEditingController(); @@ -160,10 +161,10 @@ class _BusEditPage extends State { _selectedImagePath = image.path; }); } else { - print('No image selected.'); + developer.log('No image selected.'); } } catch (e) { - print('Error picking image: $e'); + developer.log('Error picking image: $e'); } finally { setState(() { _isPickingImage = false; diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart index 3742f7db..01096ae0 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart @@ -1,5 +1,4 @@ import "package:flutter/material.dart"; -import "package:where_child_bus/components/child_list/child_list_with_mark.dart"; class BusPassengerPage extends StatefulWidget { final List name = [ diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 4518c5bc..8717c29d 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -79,12 +79,15 @@ class _CameraPageState extends State { if (frameCounter % 60 == 0) { videoChunks.add(image.planes[0].bytes.toList()); _streamController.add(StreamBusVideoRequest( - nurseryId: NurseryData().getNursery().id, - busId: widget.bus.id, - busType: widget.busType, - //TODO VheicleEventを動的にする - vehicleEvent: VehicleEvent.VEHICLE_EVENT_GET_ON, - videoChunk: videoChunks)); + nurseryId: NurseryData().getNursery().id, + busId: widget.bus.id, + busType: widget.busType, + //TODO VheicleEventを動的にする + vehicleEvent: VehicleEvent.VEHICLE_EVENT_GET_ON, + videoChunk: videoChunks, + photoHeight: image.height, + photoWidth: image.width, + )); developer.log("Received image frame", name: "CameraPage"); developer.log("width ${image.width}", name: "CameraPage"); developer.log("height ${image.height}", name: "CameraPage"); diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index 7da889c5..bc2be6fb 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -22,8 +22,8 @@ class InputFormBody extends StatefulWidget { } class _InputFormBodyState extends State { - TextEditingController _nameController = TextEditingController(); - TextEditingController _ageController = TextEditingController(); + final TextEditingController _nameController = TextEditingController(); + final TextEditingController _ageController = TextEditingController(); late Future _loadDataFuture; // 非同期処理の結果を保持する変数 List guardians = []; List buses = []; diff --git a/frontend/where_child_bus/lib/service/create_bus.dart b/frontend/where_child_bus/lib/service/create_bus.dart index 135c3dc3..4a941b9b 100644 --- a/frontend/where_child_bus/lib/service/create_bus.dart +++ b/frontend/where_child_bus/lib/service/create_bus.dart @@ -1,5 +1,4 @@ import 'package:where_child_bus/util/api/bus.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; Future createBusService( String nurseryId, diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index be7acd52..8f415bca 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -1,11 +1,8 @@ import "dart:developer" as developer; -import "package:camera/camera.dart"; import "package:flutter/foundation.dart"; import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; -import 'package:where_child_bus/models/nursery_data.dart'; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart"; -import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; Future performGrpcCall( Future Function(BusServiceClient) grpcCall) async { From 8104bba990af351893c307fe9712a37d9ce7fff7 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 19 Feb 2024 21:59:46 +0900 Subject: [PATCH 557/771] =?UTF-8?q?chore:=E3=83=90=E3=82=B9=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=A7futureBuilder?= =?UTF-8?q?=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../camera_page/camera_bus_select_page.dart | 81 ++++++++----------- .../lib/pages/camera_page/camera_page.dart | 10 ++- 2 files changed, 40 insertions(+), 51 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart index 70a0c1c9..4e82156d 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart @@ -21,44 +21,24 @@ class BusSelectPage extends StatefulWidget { class _BusSelectPageState extends State { Bus? _selectedBus; BusType _selectedType = BusType.BUS_TYPE_MORNING; - bool _isLoading = false; - bool _isFailLoading = false; List _buses = []; - @override - void initState() { - super.initState(); - _loadBuses(); - } - - Future _loadBuses() async { + Future> _loadBuses() async { if (NurseryBusData().getBusList().isNotEmpty) { - if (mounted) { - setState(() { - _buses = NurseryBusData().getBusList(); - }); - } - return; + _selectedBus = NurseryBusData().getBusList().first; + return NurseryBusData().getBusList(); } else { try { GetBusListByNurseryIdResponse busList = await getBusList(NurseryData().getNursery().id); NurseryBusData().setBusListResponse(busList); - if (mounted) { - setState(() { - _buses = NurseryBusData().getBusList(); - }); - } + _selectedBus = busList.buses[0]; + return NurseryBusData().getBusList(); } catch (error) { if (kDebugMode) { - developer.log("バスのロード中にエラーが発生しました", error: error); - } - if (mounted) { - setState(() { - _isLoading = false; - _isFailLoading = true; - }); + developer.log("バスのロード中にエラーが発生しました", error: error.toString()); } + throw Exception('バスのロードに失敗しました'); } } } @@ -71,27 +51,32 @@ class _BusSelectPageState extends State { } Widget _createPageBody() { - if (_isLoading) { - return const Center( - child: CircularProgressIndicator(), - ); - } else if (_isFailLoading) { - return const Center( - child: Text('データの取得に失敗しました'), - ); - } else { - return Center( - child: Column( - children: [ - _createBusInputLabelAndSelectBox(context, "バスを選択して下さい", - _buses.map((Bus bus) => bus.name).toList()), - const SizedBox(height: 20), - _createTimeInputLabelAndSelectBox(context, "時間を選択して下さい"), - const SizedBox(height: 20), - _proceedButton(), - ], - )); - } + return FutureBuilder>( + future: _loadBuses(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + return Center(child: Text('データの取得に失敗しました: ${snapshot.error}')); + } else if (snapshot.hasData) { + _buses = snapshot.data!; + return Center( + child: Column( + children: [ + _createBusInputLabelAndSelectBox(context, "バスを選択して下さい", + _buses.map((Bus bus) => bus.name).toList()), + const SizedBox(height: 20), + _createTimeInputLabelAndSelectBox(context, "時間を選択して下さい"), + const SizedBox(height: 20), + _proceedButton(), + ], + ), + ); + } else { + return const Center(child: Text('利用可能なバスがありません')); + } + }, + ); } Widget _createBusInputLabelAndSelectBox( diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 8717c29d..286ebb77 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -85,10 +85,11 @@ class _CameraPageState extends State { //TODO VheicleEventを動的にする vehicleEvent: VehicleEvent.VEHICLE_EVENT_GET_ON, videoChunk: videoChunks, - photoHeight: image.height, - photoWidth: image.width, + photoHeight: image.width, + photoWidth: image.height, )); - developer.log("Received image frame", name: "CameraPage"); + developer.log("Received image frame ${videoChunks}", + name: "CameraPage"); developer.log("width ${image.width}", name: "CameraPage"); developer.log("height ${image.height}", name: "CameraPage"); @@ -111,6 +112,9 @@ class _CameraPageState extends State { return const SizedBox.shrink(); // カメラが初期化されていない場合は何も表示しない } return Scaffold( + appBar: AppBar( + title: const Text("カメラ"), + ), body: CameraPreview(_controller), ); } From 7ba35bfa0118082a7292edc318e90b8b89e55e2f Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 19 Feb 2024 22:43:43 +0900 Subject: [PATCH 558/771] =?UTF-8?q?feat:=E5=AD=90=E4=BE=9B=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E3=81=AB=E3=83=AA=E3=83=95=E3=83=AC=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=A5=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 4 +- .../student_list_page/student_list_page.dart | 62 +++++++++++-------- 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 286ebb77..e4e6051a 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -85,8 +85,8 @@ class _CameraPageState extends State { //TODO VheicleEventを動的にする vehicleEvent: VehicleEvent.VEHICLE_EVENT_GET_ON, videoChunk: videoChunks, - photoHeight: image.width, - photoWidth: image.height, + photoHeight: image.height, + photoWidth: image.width, )); developer.log("Received image frame ${videoChunks}", name: "CameraPage"); diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart index 91bc5753..6d9b9bc8 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart @@ -30,31 +30,23 @@ class _ChildListPageState extends State { _loadChildren(); } - Future _loadChildren() async { - try { - _isLoading = true; + Future _fetchChildren() async { + if (mounted) { + setState(() { + _isLoading = true; + }); + } - // If the child list is already loaded, use it - if (NurseryChildListData().getChildList().isNotEmpty) { - if (mounted) { - setState(() { - children = NurseryChildListData().getChildList(); - photos = NurseryChildListData().getPhotos(); - _isLoading = false; - }); - } - return; - } else { - GetChildListByNurseryIDResponse res = - await getChildListByNurseryIdService(NurseryData().getNursery().id); - NurseryChildListData().setChildListResponse(res); - if (mounted) { - setState(() { - children = res.children; - photos = res.photos; - _isLoading = false; - }); - } + try { + GetChildListByNurseryIDResponse res = + await getChildListByNurseryIdService(NurseryData().getNursery().id); + NurseryChildListData().setChildListResponse(res); + if (mounted) { + setState(() { + children = res.children; + photos = res.photos; + _isLoading = false; + }); } } catch (error) { if (kDebugMode) { @@ -70,6 +62,24 @@ class _ChildListPageState extends State { } } + Future _loadChildren() async { + _isLoading = true; + + // If the child list is already loaded, use it + if (NurseryChildListData().getChildList().isNotEmpty) { + if (mounted) { + setState(() { + children = NurseryChildListData().getChildList(); + photos = NurseryChildListData().getPhotos(); + _isLoading = false; + }); + } + return; + } else { + await _fetchChildren(); + } + } + @override Widget build(BuildContext context) { return Scaffold( @@ -94,7 +104,9 @@ class _ChildListPageState extends State { child: Text('Failed to load children.'), ); } else { - return ChildList(children: children, images: photos); + return RefreshIndicator( + onRefresh: _fetchChildren, + child: ChildList(children: children, images: photos)); } } } From 147424db6cdd77aeec1bd00d5ae1ba6954641c9f Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Mon, 19 Feb 2024 23:19:52 +0900 Subject: [PATCH 559/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E3=81=AB=E3=83=AA=E3=83=95=E3=83=AC=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=A5=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_list_page.dart | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 3f251325..d249f364 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -30,9 +30,28 @@ class _BusListPageState extends State { _loadBusList(); } - Future _loadBusList() async { - String nurseryId = NurseryData().getNursery().id; + Future _fetchBusList() async { + _isLoading = true; + try { + GetBusListByNurseryIdResponse busList = + await getBusList(NurseryData().getNursery().id); + NurseryBusData().setBusListResponse(busList); + if (mounted) { + setState(() { + buses = NurseryBusData().getBusList(); + _isLoading = false; + }); + } + } catch (e) { + if (kDebugMode) { + developer.log("バスリストのロード中にエラーが発生しました: $e"); + } + setState(() => {_isLoading = false, _isFailLoading = true}); + } + } + + Future _loadBusList() async { if (NurseryBusData().getBusList().isNotEmpty) { if (mounted) { setState(() { @@ -42,21 +61,7 @@ class _BusListPageState extends State { } return; } else { - GetBusListByNurseryIdResponse busList = await getBusList(nurseryId); - NurseryBusData().setBusListResponse(busList); - try { - if (mounted) { - setState(() { - buses = NurseryBusData().getBusList(); - _isLoading = false; - }); - } - } catch (e) { - if (kDebugMode) { - developer.log("バスリストのロード中にエラーが発生しました: $e"); - } - setState(() => {_isLoading = false, _isFailLoading = true}); - } + await _fetchBusList(); } } @@ -80,7 +85,8 @@ class _BusListPageState extends State { if (_isFailLoading) loadFailText(), if (buses.isEmpty) busNotRegisteredText(), Expanded( - child: listViewBuilder(), + child: RefreshIndicator( + onRefresh: _fetchBusList, child: listViewBuilder()), ) ], ), From a0f2543a4c90e4680e9729d0742db65923d3c530 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 20 Feb 2024 11:14:37 +0900 Subject: [PATCH 560/771] =?UTF-8?q?feat:=E5=BF=98=E3=82=8C=E7=89=A9?= =?UTF-8?q?=E3=81=AE=E6=9B=B4=E6=96=B0=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/daily_record_body.dart | 72 ++++----- .../daily_page/components/has_item_state.dart | 148 ++++++++++++++++++ .../lib/service/update_child_item_status.dart | 23 +++ .../lib/util/api/child.dart | 25 +++ 4 files changed, 225 insertions(+), 43 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart create mode 100644 frontend/where_child_bus_guardian/lib/service/update_child_item_status.dart diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 9e7ac7dd..dda4837c 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -2,10 +2,11 @@ import "dart:developer" as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pb.dart'; -import 'package:where_child_bus_guardian/service/check_is_child_in_bus.dart'; -import '../styles/styles.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; +import 'package:where_child_bus_guardian/service/check_is_child_in_bus.dart'; import 'package:where_child_bus_guardian/components/utils/image_from_byte.dart'; +import 'package:where_child_bus_guardian/pages/daily_page/components/has_item_state.dart'; +import '../styles/styles.dart'; class DailyRecordBody extends StatefulWidget { final Child child; @@ -23,6 +24,10 @@ class DailyRecordBody extends StatefulWidget { class _DailyRecordBody extends State { bool isBoarding = false; + bool hasBagState = false; + bool hasLunchBoxState = false; + bool hasWaterBottleState = false; + bool hasUmbrellaState = false; @override void initState() { @@ -55,12 +60,13 @@ class _DailyRecordBody extends State { padding: const EdgeInsets.only(top: 20, bottom: 10), child: Text( widget.child.name, - style: TextStyle(fontSize: 24), + style: const TextStyle(fontSize: 24), textAlign: TextAlign.center, )), statusIconAndStatusField( - Icons.directions_bus, isBoardingStatusField(context)), - statusIconAndStatusField(Icons.business_center, childItemList(context)), + context, Icons.directions_bus, isBoardingStatusField(context)), + statusIconAndStatusField( + context, Icons.business_center, childItemList(context)), ], ); } @@ -91,7 +97,8 @@ class _DailyRecordBody extends State { ); } - Widget statusIconAndStatusField(IconData icon, Widget statusField) { + Widget statusIconAndStatusField( + BuildContext context, IconData icon, Widget statusField) { return SizedBox( width: MediaQuery.of(context).size.width * 0.9, child: Row( @@ -130,45 +137,24 @@ class _DailyRecordBody extends State { runAlignment: WrapAlignment.spaceBetween, runSpacing: 4.0, children: [ - itemText("かばん", widget.child.hasBag), - itemText("お弁当", widget.child.hasLunchBox), - itemText("水筒", widget.child.hasWaterBottle), - itemText("傘", widget.child.hasUmbrella), + HasItemState( + child: widget.child, + itemName: "かばん", + hasItem: widget.child.hasBag), + HasItemState( + child: widget.child, + itemName: "お弁当", + hasItem: widget.child.hasLunchBox), + HasItemState( + child: widget.child, + itemName: "水筒", + hasItem: widget.child.hasWaterBottle), + HasItemState( + child: widget.child, + itemName: "傘", + hasItem: widget.child.hasUmbrella), ], ), ); } - - Widget itemText(String itemName, bool hasItem) { - return Material( - color: hasItem ? Colors.green[100] : Colors.red[100], - borderRadius: BorderRadius.circular(5), - elevation: 5, - child: InkWell( - onTap: () { - //TODO: ここにアイテムの所持状況を変更する処理を追加 - }, - child: SizedBox( - width: MediaQuery.of(context).size.width * 0.24, - child: Padding( - padding: const EdgeInsets.only( - top: 10.0, bottom: 10.0, left: 8.0), - child: Row( - children: [ - SizedBox( - width: 20, - child: hasItem - ? const Icon(Icons.check, color: Colors.green) - : const Icon(Icons.error_outline, - color: Colors.red), - ), - const SizedBox(width: 8), - Text( - itemName, - style: statusFieldTextStyle(hasItem), - textAlign: TextAlign.center, - ), - ], - ))))); - } } diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart new file mode 100644 index 00000000..0c49c06c --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart @@ -0,0 +1,148 @@ +import "dart:developer" as developer; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; +import 'package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart'; +import 'package:where_child_bus_guardian/service/update_child_item_status.dart'; +import '../styles/styles.dart'; + +class HasItemState extends StatefulWidget { + final Child child; + final String itemName; + final bool hasItem; + + const HasItemState({ + Key? key, + required this.child, + required this.itemName, + required this.hasItem, + }) : super(key: key); + + @override + State createState() => _HasItemState(); +} + +class _HasItemState extends State { + bool _isLoading = false; + bool _hasItem = false; + + @override + void initState() { + super.initState(); + _updateCheckForMissingItems(); + _hasItem = widget.hasItem; + } + + Future _updateCheckForMissingItems() async { + try { + if (widget.child.hasBag && + widget.child.hasLunchBox && + widget.child.hasWaterBottle && + widget.child.hasUmbrella) { + await updateChildItemStatusService( + childId: widget.child.id, + checkForMissingItems: true, + updateMask: FieldMask(paths: ["check_for_missing_items"])); + } else { + await updateChildItemStatusService( + childId: widget.child.id, + checkForMissingItems: false, + updateMask: FieldMask(paths: ["check_for_missing_items"])); + } + } catch (e) { + if (kDebugMode) { + developer.log("忘れ物の有無の更新に失敗: $e"); + } + } + } + + Future _updateHasItemStatus(String itemName, bool hasItem) async { + try { + setState(() { + _isLoading = true; + }); + List updateMaskName = []; + switch (itemName) { + case "かばん": + updateMaskName = ["has_bag"]; + break; + case "お弁当": + updateMaskName = ["has_lunch_box"]; + break; + case "水筒": + updateMaskName = ["has_water_bottle"]; + break; + case "傘": + updateMaskName = ["has_umbrella"]; + break; + } + + await updateChildItemStatusService( + childId: widget.child.id, + hasBag: itemName == "かばん" ? !hasItem : null, + hasLunchBox: itemName == "お弁当" ? !hasItem : null, + hasWaterBottle: itemName == "水筒" ? !hasItem : null, + hasUmbrella: itemName == "傘" ? !hasItem : null, + updateMask: FieldMask(paths: updateMaskName), + ); + + if (mounted) { + setState(() { + _hasItem = !_hasItem; + _isLoading = false; + }); + } + } catch (e) { + if (kDebugMode) { + developer.log("持ち物の状態の更新に失敗: $e"); + } + } + } + + @override + Widget build(BuildContext context) { + return Material( + color: _hasItem ? Colors.green[100] : Colors.red[100], + borderRadius: BorderRadius.circular(5), + elevation: 5, + child: InkWell( + onTap: () async { + if (!_isLoading) { + await _updateHasItemStatus(widget.itemName, _hasItem); + } + }, + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.24, + child: Padding( + padding: const EdgeInsets.only( + top: 10.0, bottom: 10.0, left: 8.0), + child: Row( + children: [ + statusFieldIcon(_hasItem), + const SizedBox(width: 8), + Text( + widget.itemName, + style: statusFieldTextStyle(_hasItem), + textAlign: TextAlign.center, + ), + ], + ))))); + } + + Widget statusFieldIcon(bool hasItem) { + return SizedBox( + width: 20, + child: _isLoading + ? const SizedBox( + width: 5, + height: 20, + child: CircularProgressIndicator( + strokeWidth: 2, + color: Colors.grey, + )) + : _hasItem + ? const Icon(Icons.check, color: Colors.green) + : const Icon(Icons.error_outline, color: Colors.red), + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/service/update_child_item_status.dart b/frontend/where_child_bus_guardian/lib/service/update_child_item_status.dart new file mode 100644 index 00000000..eaf538b3 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/service/update_child_item_status.dart @@ -0,0 +1,23 @@ +import "dart:developer" as developer; +import 'package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart'; +import 'package:where_child_bus_guardian/util/api/child.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart'; + +Future updateChildItemStatusService( + {String? childId, + bool? checkForMissingItems = false, + bool? hasBag = false, + bool? hasLunchBox = false, + bool? hasWaterBottle = false, + bool? hasUmbrella = false, + bool? hasOther = false, + FieldMask? updateMask}) async { + try { + var res = await updateChildItemStatus(childId, checkForMissingItems, hasBag, + hasLunchBox, hasWaterBottle, hasUmbrella, hasOther, updateMask); + return res; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } +} diff --git a/frontend/where_child_bus_guardian/lib/util/api/child.dart b/frontend/where_child_bus_guardian/lib/util/api/child.dart index c44670e4..9547e70f 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/child.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/child.dart @@ -1,6 +1,7 @@ import 'dart:developer' as developer; import 'package:flutter/foundation.dart'; import 'package:grpc/grpc.dart'; +import 'package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart'; import 'package:where_child_bus_guardian/config/config.dart'; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart"; @@ -38,3 +39,27 @@ Future checkIsChildInBus(String childId) async { return client.checkIsChildInBus(req); }); } + +Future updateChildItemStatus( + String? childId, + bool? checkForMissingItems, + bool? hasBag, + bool? hasLunchBox, + bool? hasWaterBottle, + bool? hasUmbrella, + bool? hasOther, + FieldMask? updateMask) async { + return performGrpcCall((client) async { + var req = UpdateChildRequest( + childId: childId, + checkForMissingItems: checkForMissingItems, + hasBag: hasBag, + hasLunchBox: hasLunchBox, + hasWaterBottle: hasWaterBottle, + hasUmbrella: hasUmbrella, + hasOther: hasOther, + updateMask: updateMask, + ); + return client.updateChild(req); + }); +} From e9e22fb0b9375464fcb099a9c34862fea7d79393 Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 20 Feb 2024 11:15:25 +0900 Subject: [PATCH 561/771] =?UTF-8?q?update:.gitignore=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/android/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/where_child_bus_guardian/android/.gitignore b/frontend/where_child_bus_guardian/android/.gitignore index 6f568019..2d6a2de9 100644 --- a/frontend/where_child_bus_guardian/android/.gitignore +++ b/frontend/where_child_bus_guardian/android/.gitignore @@ -4,6 +4,7 @@ gradle-wrapper.jar /gradlew /gradlew.bat /local.properties +/secret.properties GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. From 347b58ceca4a1c8f98547e7eea9b8cb0ecc56ab5 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 20 Feb 2024 13:35:45 +0900 Subject: [PATCH 562/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E3=80=81?= =?UTF-8?q?=E4=BF=9D=E8=AD=B7=E8=80=85=E3=80=81=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E3=80=81=E9=A7=85=E3=81=AE=E6=9B=B4=E6=96=B0=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 17 +++++++++++------ backend/usecases/guardian/guardian.go | 5 ++++- backend/usecases/nursery/nursery.go | 1 - backend/usecases/station/station.go | 2 +- backend/usecases/utils/utils.go | 2 +- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 1351e45f..75218e89 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -261,7 +261,6 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu } func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (*pb.UpdateBusResponse, error) { - // TODO: 実装 // bus_idのパース busID, err := uuid.Parse(req.BusId) if err != nil { @@ -272,7 +271,7 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* // トランザクションの開始 tx, err := i.entClient.Tx(ctx) if err != nil { - i.logger.Error("failed to start transction", "error", "err") + i.logger.Error("failed to start transaction", "error", err) return nil, err } defer utils.RollbackTx(tx, i.logger) @@ -286,8 +285,12 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* case "plate_number": update.SetPlateNumber(req.PlateNumber) case "bus_status": - status := bus.Status(req.BusStatus) - update.SetStatus(status) + status, err := utils.ConvertPbStatusToEntStatus(req.BusStatus) + if err != nil { + i.logger.Error("failed to convert status", "error", err) + return nil, err + } + update.SetStatus(*status) case "latitude": update.SetLatitude(req.Latitude) case "longitude": @@ -305,14 +308,16 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* } // 更新されたバスを取得 - updatedBus, err := tx.Bus.Query().Where(bus.IDEQ(busID)).Only(ctx) + updatedBus, err := tx.Bus.Query().Where(bus.IDEQ(busID)). + WithNursery(). + Only(ctx) if err != nil { i.logger.Error("failed to retrieve updated bus", "error", err) } // トランザクションのコミット if err := tx.Commit(); err != nil { - i.logger.Error("failed to commit transction", "error", err) + i.logger.Error("failed to commit transaction", "error", err) return nil, err } diff --git a/backend/usecases/guardian/guardian.go b/backend/usecases/guardian/guardian.go index 6da63183..6db57747 100644 --- a/backend/usecases/guardian/guardian.go +++ b/backend/usecases/guardian/guardian.go @@ -291,7 +291,10 @@ func (i *Interactor) UpdateGuardian(ctx context.Context, req *pb.UpdateGuardianR } // 更新されたエンティティの取得 - guardian, err := tx.Guardian.Query().Where(guardian.IDEQ(guardianID)).WithNursery().Only(ctx) + guardian, err := tx.Guardian.Query(). + Where(guardian.IDEQ(guardianID)). + WithNursery(). + Only(ctx) if err != nil { i.logger.Error("failed to get guardian", "error", err) return nil, err diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index eea00189..57d3ce17 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -116,7 +116,6 @@ func (i *Interactor) NurseryLogin(ctx context.Context, req *pb.NurseryLoginReque } func (i *Interactor) UpdateNursery(ctx context.Context, req *pb.UpdateNurseryRequest) (*pb.UpdateNurseryResponse, error) { - // TODO: 実装 // requestからnurseryIDを取得 nurseryID, err := uuid.Parse(req.Id) if err != nil { diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index d935dec1..cc406b77 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -91,7 +91,6 @@ func (i *Interactor) UpdateStationLocationByGuardianID(ctx context.Context, req } func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { - // TODO: 実装 // station_idのパース stationID, err := uuid.Parse(req.Id) if err != nil { @@ -128,6 +127,7 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq // 更新されたエンティティの取得 updateStation, err := tx.Station.Query(). Where(station.IDEQ(stationID)). + WithGuardian(). Only(ctx) if err != nil { i.logger.Error("failed to get updated station", "error", err) diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 7f8edb0a..ad82c1f2 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -83,7 +83,7 @@ func ConvertPbSexToEntSex(pbSex pb.Sex) (*child.Sex, error) { case pb.Sex_SEX_MAN: sex := child.SexMan return &sex, nil - case pb.Sex_SEX_WOMAN: // 修正: WOMEN -> WOMAN + case pb.Sex_SEX_WOMAN: sex := child.SexWoman return &sex, nil case pb.Sex_SEX_OTHER: From 53244b39e822a36caa680c4d9aad341d4b2eeffd Mon Sep 17 00:00:00 2001 From: koto623 Date: Tue, 20 Feb 2024 13:54:03 +0900 Subject: [PATCH 563/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E4=B9=97?= =?UTF-8?q?=E8=BB=8A=E4=BA=88=E5=AE=9A=E3=81=AE=E6=9B=B4=E6=96=B0=E6=A9=9F?= =?UTF-8?q?=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/lib/app.dart | 10 +- .../lib/pages/auth_page/auth_page.dart | 40 +++++--- .../lib/pages/check_page/check_page.dart | 75 ++++++--------- .../components/bus_toggle_button.dart | 93 +++++++++++++++++++ .../lib/service/update_guardian_status.dart | 21 +++++ .../lib/util/api/guardian.dart | 34 +++++++ .../lib/util/api/health_check.dart | 2 +- .../lib/util/guardian_data.dart | 20 ++++ 8 files changed, 223 insertions(+), 72 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/pages/check_page/components/bus_toggle_button.dart create mode 100644 frontend/where_child_bus_guardian/lib/service/update_guardian_status.dart create mode 100644 frontend/where_child_bus_guardian/lib/util/guardian_data.dart diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index a3cc11e5..b32a3d1c 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -5,9 +5,7 @@ import 'package:where_child_bus_guardian/pages/daily_page/daily_page.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; class App extends StatefulWidget { - GuardianResponse guardian; - - App({super.key, required this.guardian}); + App({super.key}); @override State createState() => _AppState(); @@ -22,11 +20,7 @@ class _AppState extends State { appBar: AppBar( title: Text(['日々の記録', '地図', '乗車確認'][_selectedIndex]), ), - body: [ - const DailyPage(), - const MapPage(), - const CheckPage() - ][_selectedIndex], + body: [const DailyPage(), const MapPage(), CheckPage()][_selectedIndex], bottomNavigationBar: BottomNavigationBar( currentIndex: _selectedIndex, onTap: (int index) => setState(() => _selectedIndex = index), diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index 89a5031e..0d3d2416 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -1,8 +1,11 @@ import 'dart:developer' as developer; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus_guardian/app.dart'; import 'package:where_child_bus_guardian/models/guardian_login_error.dart'; import 'package:where_child_bus_guardian/util/api/guardian.dart'; +import 'package:where_child_bus_guardian/util/guardian_data.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pb.dart'; class AuthPage extends StatefulWidget { const AuthPage({super.key}); @@ -27,22 +30,31 @@ class _AuthPageState extends State { ); } - void login(String email, String password) async { - if (email.isEmpty || password.isEmpty) { - setState(() => _loginError = GuardianLoginError.fieldsDoNotFilled); - return; - } + login() async { + BuildContext currentContext = context; + GuardianLoginResponse res; try { - final res = await guardianLogin(email, password); + if (kDebugMode) { + res = await guardianLogin("guardian1@example.com", "password"); + } else { + res = await guardianLogin( + _emailController.text, _passwordController.text); + if (_emailController.text.isEmpty || _passwordController.text.isEmpty) { + setState(() => _loginError = GuardianLoginError.fieldsDoNotFilled); + return; + } + } + if (res.success) { - developer.log("$res"); + print(res.success); + print(res.guardian.name); + GuardianData().setGuardian(res.guardian); Navigator.pushReplacement( - context, + currentContext, MaterialPageRoute( - builder: (context) => App( - guardian: res.guardian, - ))); + builder: (BuildContext context) => App(), + )); } else { setState(() => _loginError = GuardianLoginError.invalidCredentials); } @@ -124,9 +136,7 @@ class _AuthPageState extends State { Widget loginButton() => SizedBox( width: MediaQuery.of(context).size.width * 0.6, - child: ElevatedButton( - onPressed: () => - login(_emailController.text, _passwordController.text), - child: const Text('ログイン')), + child: + ElevatedButton(onPressed: () => login(), child: const Text('ログイン')), ); } diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index 66618b33..5383fdb6 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -1,6 +1,12 @@ +import 'dart:developer' as developer; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_toggle_tab/flutter_toggle_tab.dart'; -import '../../components/utils/current_time_body.dart'; +import 'package:where_child_bus_guardian/components/utils/current_time_body.dart'; +import 'package:where_child_bus_guardian/pages/check_page/components/bus_toggle_button.dart'; +import 'package:where_child_bus_guardian/service/update_guardian_status.dart'; +import 'package:where_child_bus_guardian/util/guardian_data.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pb.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class CheckPage extends StatefulWidget { const CheckPage({super.key}); @@ -10,8 +16,7 @@ class CheckPage extends StatefulWidget { } class _CheckPageState extends State { - var isRideMorningBus = true; - var isRideEveningBus = true; + final GuardianResponse guardian = GuardianData().getGuardian(); @override Widget build(BuildContext context) { @@ -44,9 +49,9 @@ class _CheckPageState extends State { child: Column( children: [ busTitleAndToggleButton( - context, "朝のバス", isRideMorningBus, true), + "朝のバス", guardian.isUseMorningBus, true), busTitleAndToggleButton( - context, "夕方のバス", isRideEveningBus, false), + "夕方のバス", guardian.isUseEveningBus, false), ], ), ), @@ -55,48 +60,22 @@ class _CheckPageState extends State { } Widget busTitleAndToggleButton( - BuildContext context, String title, bool isRide, bool isMorning) { - return Column(children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: Text(title, style: const TextStyle(fontSize: 16)), - ), - toggleSwitch(context, isRide, isMorning), - ]); - } - - Widget toggleSwitch(BuildContext context, bool isRide, bool isMorning) { - int selectedIndex = isRide ? 0 : 1; - return FlutterToggleTab( - width: 70, - height: 50, - borderRadius: 15, - selectedBackgroundColors: const [Colors.blue], - selectedTextStyle: const TextStyle( - color: Colors.white, - fontSize: 16, - ), - unSelectedTextStyle: const TextStyle( - color: Colors.black, - fontSize: 14, - ), - labels: const ["乗る", "乗らない"], - selectedIndex: selectedIndex, - selectedLabelIndex: (index) { - setState(() { - setRideState(isMorning, index); - }); - }, - marginSelected: const EdgeInsets.symmetric(horizontal: 3, vertical: 4), + String title, bool isRideBus, bool isMorningBus) { + return Column( + children: [ + Text( + title, + style: const TextStyle(fontSize: 18), + ), + const SizedBox( + height: 10, + ), + BusToggleButton( + guardian: guardian, + isMorningBus: isMorningBus, + isUseBus: isRideBus, + ), + ], ); } - - //TODO: 将来的にバックエンドとの通信を行う - void setRideState(bool isMorning, int index) { - if (isMorning) { - isRideMorningBus = index == 0; - } else { - isRideEveningBus = index == 0; - } - } } diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/components/bus_toggle_button.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/components/bus_toggle_button.dart new file mode 100644 index 00000000..7aa40f81 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/components/bus_toggle_button.dart @@ -0,0 +1,93 @@ +import "dart:developer" as developer; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_toggle_tab/flutter_toggle_tab.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; +import 'package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart'; +import 'package:where_child_bus_guardian/service/update_guardian_status.dart'; + +class BusToggleButton extends StatefulWidget { + final GuardianResponse guardian; + final bool isMorningBus; + final bool isUseBus; + + const BusToggleButton({ + Key? key, + required this.guardian, + required this.isMorningBus, + required this.isUseBus, + }) : super(key: key); + + @override + State createState() => _BusToggleButton(); +} + +class _BusToggleButton extends State { + bool _isLoading = false; + bool _isUse = false; + + @override + void initState() { + super.initState(); + _isUse = widget.isUseBus; + } + + Future _updateHasItemStatus(bool isMorningBus, bool isUseBus) async { + try { + setState(() { + _isLoading = true; + }); + + List updateMaskName = []; + isMorningBus + ? updateMaskName = ["is_use_morning_bus"] + : updateMaskName = ["is_use_evening_bus"]; + await updateGuardianStatusService( + guardianId: widget.guardian.id, + isUseMorningBus: isMorningBus ? !isUseBus : null, + isUseEveningBus: isMorningBus ? null : !isUseBus, + updateMask: FieldMask(paths: updateMaskName), + ); + + if (mounted) { + setState(() { + _isUse = !_isUse; + _isLoading = false; + }); + } + } catch (e) { + if (kDebugMode) { + developer.log("バス乗車予定の更新に失敗: $e"); + } + } + } + + @override + Widget build(BuildContext context) { + int selectedIndex = _isUse ? 0 : 1; + return FlutterToggleTab( + width: 70, + height: 50, + borderRadius: 15, + selectedBackgroundColors: const [Colors.blue], + selectedTextStyle: const TextStyle( + color: Colors.white, + fontSize: 16, + ), + unSelectedTextStyle: const TextStyle( + color: Colors.black, + fontSize: 14, + ), + labels: const ["乗る", "乗らない"], + selectedIndex: selectedIndex, + selectedLabelIndex: (index) { + setState(() async { + if (!_isLoading) { + await _updateHasItemStatus(widget.isMorningBus, _isUse); + } + }); + }, + marginSelected: const EdgeInsets.symmetric(horizontal: 3, vertical: 4), + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/service/update_guardian_status.dart b/frontend/where_child_bus_guardian/lib/service/update_guardian_status.dart new file mode 100644 index 00000000..fbfbb158 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/service/update_guardian_status.dart @@ -0,0 +1,21 @@ +import "dart:developer" as developer; +import 'package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart'; +import 'package:where_child_bus_guardian/util/api/guardian.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart'; + +Future updateGuardianStatusService( + {String? guardianId, + bool? hasUmbrella = false, + bool? hasOther = false, + bool? isUseMorningBus = false, + bool? isUseEveningBus = false, + FieldMask? updateMask}) async { + try { + var res = await updateGuardianStatus( + guardianId, isUseMorningBus, isUseEveningBus, updateMask); + return res; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } +} diff --git a/frontend/where_child_bus_guardian/lib/util/api/guardian.dart b/frontend/where_child_bus_guardian/lib/util/api/guardian.dart index 922ee2cd..b31af115 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/guardian.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/guardian.dart @@ -1,6 +1,7 @@ import "dart:developer" as developer; import "package:flutter/foundation.dart"; import 'package:grpc/grpc.dart'; +import 'package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart'; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart"; import "package:where_child_bus_guardian/config/config.dart"; @@ -31,3 +32,36 @@ Future guardianLogin( return Future.error(error); } } + +Future performGrpcCall( + Future Function(GuardianServiceClient) grpcCall) async { + final channel = + ClientChannel(appConfig.grpcEndpoint, port: appConfig.grpcPort); + final grpcClient = GuardianServiceClient(channel); + + try { + final result = await grpcCall(grpcClient); + if (kDebugMode) { + developer.log("レスポンス: $result"); + } + return result; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } finally { + await channel.shutdown(); + } +} + +Future updateGuardianStatus(String? guardianId, + bool? isUseMorningBus, bool? isUseEveningBus, FieldMask? updateMask) async { + return performGrpcCall((client) async { + var req = UpdateGuardianRequest( + guardianId: guardianId, + isUseMorningBus: isUseMorningBus, + isUseEveningBus: isUseEveningBus, + updateMask: updateMask, + ); + return client.updateGuardian(req); + }); +} diff --git a/frontend/where_child_bus_guardian/lib/util/api/health_check.dart b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart index 8e1f14d0..ba495f49 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/health_check.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart @@ -10,7 +10,7 @@ Future serviceHealthCheck() async { port: appConfig.grpcPort, ); - final grpcClient = HealthCheckServiceClient(channel, + final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 60))); try { diff --git a/frontend/where_child_bus_guardian/lib/util/guardian_data.dart b/frontend/where_child_bus_guardian/lib/util/guardian_data.dart new file mode 100644 index 00000000..6c624df0 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/util/guardian_data.dart @@ -0,0 +1,20 @@ +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class GuardianData { + static final GuardianData _singleton = GuardianData._internal(); + late GuardianResponse _guardian; + + factory GuardianData() { + return _singleton; + } + + GuardianData._internal(); + + void setGuardian(GuardianResponse guardian) { + _guardian = guardian; + } + + GuardianResponse getGuardian() { + return _guardian; + } +} From 44f985a38dcd106b527c99b801400d45ef9d2461 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 20 Feb 2024 15:10:35 +0900 Subject: [PATCH 564/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9API=E3=82=92?= =?UTF-8?q?=E6=A9=9F=E6=A2=B0=E5=AD=A6=E7=BF=92=E3=81=A8=E3=81=AE=E3=82=B5?= =?UTF-8?q?=E3=83=BC=E3=83=93=E3=82=B9=E3=81=A8=E9=80=A3=E6=90=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 66 +++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 75218e89..9a06a4f7 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -134,7 +134,7 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* Save(ctx) if err != nil { i.logger.Error("failed to update bus with stations", err) - return nil, fmt.Errorf("failed to update bus with stations: %w", err) + return nil, err } } @@ -143,33 +143,32 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* morningChildIds[i] = child.ID.String() } - //TODO: MLgRPCにバスの作成を通知 - // _, err = i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ - // BusId: bus.ID.String(), - // BusType: mlv1.BusType_BUS_TYPE_MORNING, - // ChildIds: morningChildIds, - // }) + resp, err := i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ + BusId: bus.ID.String(), + BusType: pb.BusType_BUS_TYPE_MORNING, + ChildIds: morningChildIds, + }) - // if err != nil { - // i.logger.Error("failed to train ML model", err) - // return nil, err - // } + if err != nil || !resp.IsStarted { + i.logger.Error("failed to train ML model", err) + return nil, err + } - // eveningChildIds := make([]string, len(eveningChildren)) - // for i, child := range eveningChildren { - // eveningChildIds[i] = child.ID.String() - // } + eveningChildIds := make([]string, len(eveningChildren)) + for i, child := range eveningChildren { + eveningChildIds[i] = child.ID.String() + } - // _, err = i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ - // BusId: bus.ID.String(), - // BusType: mlv1.BusType_BUS_TYPE_EVENING, - // ChildIds: eveningChildIds, - // }) + resp, err = i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ + BusId: bus.ID.String(), + BusType: pb.BusType_BUS_TYPE_EVENING, + ChildIds: eveningChildIds, + }) - // if err != nil { - // i.logger.Error("failed to train ML model", err) - // return nil, err - // } + if err != nil || !resp.IsStarted { + i.logger.Error("failed to train ML model", err) + return nil, err + } if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) @@ -476,8 +475,22 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e // レコード作成成功 } + boardingrecord, err := i.entClient.BoardingRecord.Query(). + Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). + Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(busUUID))). + Only(context.Background()) + + if err != nil { + i.logger.Error("Failed to get boarding record: %v", err) + return err + } + switch vehicleEvent { case pb.VehicleEvent_VEHICLE_EVENT_GET_ON: + if boardingrecord.Unwrap().IsBoarding { + // 乗車済みの場合は次のループに進む + continue + } // 乗車時の検出の場合 _, err = i.entClient.BoardingRecord.Update(). Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). // 乗車レコードを更新 @@ -486,6 +499,10 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e SetTimestamp(time.Now()). // 乗車時刻を記録 Save(context.Background()) case pb.VehicleEvent_VEHICLE_EVENT_GET_OFF: + if !boardingrecord.Unwrap().IsBoarding { + // 未乗車の場合は次のループに進む + continue + } // 降車時の検出の場合 _, err = i.entClient.BoardingRecord.Update(). Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). // 降車レコードを更新 @@ -504,6 +521,7 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e } // レコード更新成功 + // 更新された子供を取得 child, err := i.entClient.Child.Query(). Where(childRepo.IDEQ(childUUID)). WithGuardian(). From 43e70de1b2e9c8369acadb16ee7db431add3adb1 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 15:29:36 +0900 Subject: [PATCH 565/771] =?UTF-8?q?chore(ml):=20util=E7=B3=BB=E3=81=AE?= =?UTF-8?q?=E9=96=A2=E6=95=B0=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectFaceAndClip/detectFaceAndClip.py | 18 ------------- .../src/face_detect_model/gcp_util.py | 25 ++++++++++++++++++- .../src/face_detect_model/util.py | 22 +++++++++++++--- 3 files changed, 43 insertions(+), 22 deletions(-) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index 3a1cdc76..22e251cf 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -86,24 +86,6 @@ def save_face_image_to_local(face: np.ndarray, save_dir: str, save_file_name: st cv2.imwrite(save_path, face) -def decode_face_image_from_ndaarray(face_image: np.ndarray): - _, encoded_image = cv2.imencode(".png", face_image) - png_cliped_face_data = encoded_image.tobytes() - return png_cliped_face_data - - -def save_face_image_to_remote( - face_image: np.ndarray, - save_blob_name: str, - bucket: Bucket, -): - """クリップされた顔画像をGCSに保存する""" - png_cliped_face_data = decode_face_image_from_ndaarray(face_image) - - save_blob = Blob(save_blob_name, bucket) - save_blob.upload_from_string(data=png_cliped_face_data, content_type="image/png") - - def detect_face_and_clip(args: argparse.Namespace, config: dict): face_cascade_path = config["face_detect"]["cascade_path"] image_size = ( diff --git a/machine_learning/src/face_detect_model/gcp_util.py b/machine_learning/src/face_detect_model/gcp_util.py index 2b2457cd..64a31c0c 100644 --- a/machine_learning/src/face_detect_model/gcp_util.py +++ b/machine_learning/src/face_detect_model/gcp_util.py @@ -1,7 +1,11 @@ import google.cloud.storage as gcs -from google.cloud.storage import Bucket +from google.cloud.storage import Bucket, Blob import os +from face_detect_model.util import logger +import numpy as np +import cv2 + def init_client(): # NOTE: gcloud auth application-default loginにて事前に認証 @@ -33,3 +37,22 @@ def get_blobs(bucket: Bucket, blob_name: str): return blobs except Exception as e: raise ValueError(f"Failed to get blobs from '{blob_name}' due to an error: {e}") + + +def decode_face_image_from_ndaarray(face_image: np.ndarray): + _, encoded_image = cv2.imencode(".png", face_image) + png_clipped_face_data = encoded_image.tobytes() + return png_clipped_face_data + + +def save_face_image_to_remote( + face_image: np.ndarray, + save_blob_name: str, + bucket: Bucket, +): + """クリップされた顔画像をGCSに保存する""" + png_cliped_face_data = decode_face_image_from_ndaarray(face_image) + + save_blob = Blob(save_blob_name, bucket) + save_blob.upload_from_string(data=png_cliped_face_data, content_type="image/png") + logger.info(f"Saved face image to {save_blob_name} in GCS.") diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index 9de0fca5..a936c93f 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -8,6 +8,10 @@ import os import numpy as np +from generated.machine_learning.v1.func_args import ( + FaceDetectAndClip_Args, +) + import cv2 logging.basicConfig( @@ -73,10 +77,13 @@ def load_image_from_remote(blobs: list): return images -def load_image_from_binary(binary: bytes): +def load_image_from_binary(args: FaceDetectAndClip_Args, binary: bytes): image_array = np.frombuffer(binary, dtype=np.uint8) - # TODO: 画像サイズをgRPCのリクエストから受け取る - image = image_array.reshape((240, 320)) + image = image_array.reshape((args.photo_height, args.photo_width)) + # 画像を回転 + image = np.rot90(image, k=3) + + # TODO: GSCへの画像保存 if image is None: raise ValueError("Can not load image from binary.") return image @@ -91,6 +98,15 @@ def get_default_transforms(): ) +def get_default_transforms_for_gray(): + return transforms.Compose( + [ + transforms.ToTensor(), + transforms.Normalize(mean=[0.5], std=[0.5]), + ] + ) + + def get_augment_transform(): return transforms.Compose( [ From 5b1ac4492f3d9e1e8379df0c2666371cd44ede90 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 20 Feb 2024 15:35:04 +0900 Subject: [PATCH 566/771] =?UTF-8?q?feat:=20GuardianID=E3=81=8B=E3=82=89?= =?UTF-8?q?=E7=8F=BE=E5=9C=A8=E8=B5=B0=E8=A1=8C=E4=B8=AD=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=82=B9=E3=82=92=E5=8F=96=E5=BE=97=E3=81=99=E3=82=8BAPI?= =?UTF-8?q?=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/bus.go | 5 + .../proto-gen/go/where_child_bus/v1/bus.pb.go | 489 +++++++++++------- .../go/where_child_bus/v1/bus_grpc.pb.go | 49 +- backend/usecases/bus/bus.go | 27 +- .../proto-gen/where_child_bus/v1/bus.pb.dart | 102 ++++ .../where_child_bus/v1/bus.pbgrpc.dart | 20 + .../where_child_bus/v1/bus.pbjson.dart | 26 + .../generated/where_child_bus/v1/bus_pb2.py | 50 +- .../generated/where_child_bus/v1/bus_pb2.pyi | 12 + .../where_child_bus/v1/bus_pb2_grpc.py | 33 ++ proto/where_child_bus/v1/bus.proto | 9 + 11 files changed, 612 insertions(+), 210 deletions(-) diff --git a/backend/interfaces/bus.go b/backend/interfaces/bus.go index 2cdf2561..844a4b0b 100644 --- a/backend/interfaces/bus.go +++ b/backend/interfaces/bus.go @@ -15,6 +15,11 @@ func NewBusServiceServer(interactor *bus.Interactor) pb.BusServiceServer { return &busServiceServer{interactor} } +// GetRunningBusByGuardianId implements where_child_busv1.BusServiceServer. +func (s *busServiceServer) GetRunningBusByGuardianId(ctx context.Context, req *pb.GetRunningBusByGuardianIdRequest) (*pb.GetRunningBusByGuardianIdResponse, error) { + return s.interactor.GetRunningBusByGuardianID(ctx, req) +} + // UpdateBus implements where_child_busv1.BusServiceServer. func (s *busServiceServer) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (*pb.UpdateBusResponse, error) { return s.interactor.UpdateBus(ctx, req) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 38ae8989..f03f5906 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -241,6 +241,100 @@ func (x *GetBusListByNurseryIdResponse) GetBuses() []*Bus { return nil } +type GetRunningBusByGuardianIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GuardianId string `protobuf:"bytes,1,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` +} + +func (x *GetRunningBusByGuardianIdRequest) Reset() { + *x = GetRunningBusByGuardianIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRunningBusByGuardianIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRunningBusByGuardianIdRequest) ProtoMessage() {} + +func (x *GetRunningBusByGuardianIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRunningBusByGuardianIdRequest.ProtoReflect.Descriptor instead. +func (*GetRunningBusByGuardianIdRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{4} +} + +func (x *GetRunningBusByGuardianIdRequest) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +type GetRunningBusByGuardianIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bus *Bus `protobuf:"bytes,1,opt,name=bus,proto3" json:"bus,omitempty"` +} + +func (x *GetRunningBusByGuardianIdResponse) Reset() { + *x = GetRunningBusByGuardianIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRunningBusByGuardianIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRunningBusByGuardianIdResponse) ProtoMessage() {} + +func (x *GetRunningBusByGuardianIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRunningBusByGuardianIdResponse.ProtoReflect.Descriptor instead. +func (*GetRunningBusByGuardianIdResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{5} +} + +func (x *GetRunningBusByGuardianIdResponse) GetBus() *Bus { + if x != nil { + return x.Bus + } + return nil +} + type ChangeBusStatusRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -253,7 +347,7 @@ type ChangeBusStatusRequest struct { func (x *ChangeBusStatusRequest) Reset() { *x = ChangeBusStatusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[4] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -266,7 +360,7 @@ func (x *ChangeBusStatusRequest) String() string { func (*ChangeBusStatusRequest) ProtoMessage() {} func (x *ChangeBusStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[4] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -279,7 +373,7 @@ func (x *ChangeBusStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeBusStatusRequest.ProtoReflect.Descriptor instead. func (*ChangeBusStatusRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{4} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{6} } func (x *ChangeBusStatusRequest) GetBusId() string { @@ -307,7 +401,7 @@ type ChangeBusStatusResponse struct { func (x *ChangeBusStatusResponse) Reset() { *x = ChangeBusStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[5] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -320,7 +414,7 @@ func (x *ChangeBusStatusResponse) String() string { func (*ChangeBusStatusResponse) ProtoMessage() {} func (x *ChangeBusStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[5] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -333,7 +427,7 @@ func (x *ChangeBusStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeBusStatusResponse.ProtoReflect.Descriptor instead. func (*ChangeBusStatusResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{5} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{7} } func (x *ChangeBusStatusResponse) GetBus() *Bus { @@ -357,7 +451,7 @@ type SendLocationContinuousRequest struct { func (x *SendLocationContinuousRequest) Reset() { *x = SendLocationContinuousRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[6] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -370,7 +464,7 @@ func (x *SendLocationContinuousRequest) String() string { func (*SendLocationContinuousRequest) ProtoMessage() {} func (x *SendLocationContinuousRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[6] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -383,7 +477,7 @@ func (x *SendLocationContinuousRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SendLocationContinuousRequest.ProtoReflect.Descriptor instead. func (*SendLocationContinuousRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{6} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{8} } func (x *SendLocationContinuousRequest) GetBusId() string { @@ -416,7 +510,7 @@ type SendLocationContinuousResponse struct { func (x *SendLocationContinuousResponse) Reset() { *x = SendLocationContinuousResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[7] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -429,7 +523,7 @@ func (x *SendLocationContinuousResponse) String() string { func (*SendLocationContinuousResponse) ProtoMessage() {} func (x *SendLocationContinuousResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[7] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -442,7 +536,7 @@ func (x *SendLocationContinuousResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SendLocationContinuousResponse.ProtoReflect.Descriptor instead. func (*SendLocationContinuousResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{7} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{9} } type TrackBusContinuousRequest struct { @@ -456,7 +550,7 @@ type TrackBusContinuousRequest struct { func (x *TrackBusContinuousRequest) Reset() { *x = TrackBusContinuousRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[8] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -469,7 +563,7 @@ func (x *TrackBusContinuousRequest) String() string { func (*TrackBusContinuousRequest) ProtoMessage() {} func (x *TrackBusContinuousRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[8] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -482,7 +576,7 @@ func (x *TrackBusContinuousRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TrackBusContinuousRequest.ProtoReflect.Descriptor instead. func (*TrackBusContinuousRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{8} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{10} } func (x *TrackBusContinuousRequest) GetBusId() string { @@ -505,7 +599,7 @@ type TrackBusContinuousResponse struct { func (x *TrackBusContinuousResponse) Reset() { *x = TrackBusContinuousResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[9] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -518,7 +612,7 @@ func (x *TrackBusContinuousResponse) String() string { func (*TrackBusContinuousResponse) ProtoMessage() {} func (x *TrackBusContinuousResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[9] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -531,7 +625,7 @@ func (x *TrackBusContinuousResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TrackBusContinuousResponse.ProtoReflect.Descriptor instead. func (*TrackBusContinuousResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{9} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{11} } func (x *TrackBusContinuousResponse) GetBusId() string { @@ -570,7 +664,7 @@ type StreamBusVideoRequest struct { func (x *StreamBusVideoRequest) Reset() { *x = StreamBusVideoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[10] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -583,7 +677,7 @@ func (x *StreamBusVideoRequest) String() string { func (*StreamBusVideoRequest) ProtoMessage() {} func (x *StreamBusVideoRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[10] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -596,7 +690,7 @@ func (x *StreamBusVideoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamBusVideoRequest.ProtoReflect.Descriptor instead. func (*StreamBusVideoRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{10} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{12} } func (x *StreamBusVideoRequest) GetBusId() string { @@ -646,7 +740,7 @@ type StreamBusVideoResponse struct { func (x *StreamBusVideoResponse) Reset() { *x = StreamBusVideoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[11] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -659,7 +753,7 @@ func (x *StreamBusVideoResponse) String() string { func (*StreamBusVideoResponse) ProtoMessage() {} func (x *StreamBusVideoResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[11] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -672,7 +766,7 @@ func (x *StreamBusVideoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamBusVideoResponse.ProtoReflect.Descriptor instead. func (*StreamBusVideoResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{11} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{13} } func (x *StreamBusVideoResponse) GetIsDetected() bool { @@ -707,7 +801,7 @@ type UpdateBusRequest struct { func (x *UpdateBusRequest) Reset() { *x = UpdateBusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[12] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -720,7 +814,7 @@ func (x *UpdateBusRequest) String() string { func (*UpdateBusRequest) ProtoMessage() {} func (x *UpdateBusRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[12] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -733,7 +827,7 @@ func (x *UpdateBusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateBusRequest.ProtoReflect.Descriptor instead. func (*UpdateBusRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{12} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{14} } func (x *UpdateBusRequest) GetBusId() string { @@ -803,7 +897,7 @@ type UpdateBusResponse struct { func (x *UpdateBusResponse) Reset() { *x = UpdateBusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[13] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -816,7 +910,7 @@ func (x *UpdateBusResponse) String() string { func (*UpdateBusResponse) ProtoMessage() {} func (x *UpdateBusResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_bus_proto_msgTypes[13] + mi := &file_where_child_bus_v1_bus_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -829,7 +923,7 @@ func (x *UpdateBusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateBusResponse.ProtoReflect.Descriptor instead. func (*UpdateBusResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{13} + return file_where_child_bus_v1_bus_proto_rawDescGZIP(), []int{15} } func (x *UpdateBusResponse) GetBus() *Bus { @@ -875,99 +969,117 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, - 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x22, 0x6d, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, - 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x21, 0x47, + 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x70, 0x0a, 0x1d, 0x53, - 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, - 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, - 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, - 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x20, 0x0a, - 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, - 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, - 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, - 0x73, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x6d, 0x0a, 0x16, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0a, + 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, + 0x22, 0x70, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x22, 0xed, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, - 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, - 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, - 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x76, 0x65, - 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, - 0x6e, 0x6b, 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, - 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcd, 0x02, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, + 0x64, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, + 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, + 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0xed, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x45, 0x0a, 0x0d, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x68, 0x69, + 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, + 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, + 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcd, 0x02, 0x0a, 0x10, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0a, + 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, + 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, + 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, + 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, - 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, - 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, - 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, - 0x03, 0x62, 0x75, 0x73, 0x32, 0xa4, 0x05, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, - 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x55, + 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0xaf, 0x06, 0x0a, 0x0a, 0x42, 0x75, + 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x88, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, + 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x34, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, + 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, @@ -1026,57 +1138,62 @@ func file_where_child_bus_v1_bus_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_bus_proto_rawDescData } -var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_where_child_bus_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_where_child_bus_v1_bus_proto_goTypes = []interface{}{ - (*CreateBusRequest)(nil), // 0: where_child_bus.v1.CreateBusRequest - (*CreateBusResponse)(nil), // 1: where_child_bus.v1.CreateBusResponse - (*GetBusListByNurseryIdRequest)(nil), // 2: where_child_bus.v1.GetBusListByNurseryIdRequest - (*GetBusListByNurseryIdResponse)(nil), // 3: where_child_bus.v1.GetBusListByNurseryIdResponse - (*ChangeBusStatusRequest)(nil), // 4: where_child_bus.v1.ChangeBusStatusRequest - (*ChangeBusStatusResponse)(nil), // 5: where_child_bus.v1.ChangeBusStatusResponse - (*SendLocationContinuousRequest)(nil), // 6: where_child_bus.v1.SendLocationContinuousRequest - (*SendLocationContinuousResponse)(nil), // 7: where_child_bus.v1.SendLocationContinuousResponse - (*TrackBusContinuousRequest)(nil), // 8: where_child_bus.v1.TrackBusContinuousRequest - (*TrackBusContinuousResponse)(nil), // 9: where_child_bus.v1.TrackBusContinuousResponse - (*StreamBusVideoRequest)(nil), // 10: where_child_bus.v1.StreamBusVideoRequest - (*StreamBusVideoResponse)(nil), // 11: where_child_bus.v1.StreamBusVideoResponse - (*UpdateBusRequest)(nil), // 12: where_child_bus.v1.UpdateBusRequest - (*UpdateBusResponse)(nil), // 13: where_child_bus.v1.UpdateBusResponse - (*Bus)(nil), // 14: where_child_bus.v1.Bus - (BusStatus)(0), // 15: where_child_bus.v1.BusStatus - (BusType)(0), // 16: where_child_bus.v1.BusType - (VehicleEvent)(0), // 17: where_child_bus.v1.VehicleEvent - (*Child)(nil), // 18: where_child_bus.v1.Child - (*fieldmaskpb.FieldMask)(nil), // 19: google.protobuf.FieldMask + (*CreateBusRequest)(nil), // 0: where_child_bus.v1.CreateBusRequest + (*CreateBusResponse)(nil), // 1: where_child_bus.v1.CreateBusResponse + (*GetBusListByNurseryIdRequest)(nil), // 2: where_child_bus.v1.GetBusListByNurseryIdRequest + (*GetBusListByNurseryIdResponse)(nil), // 3: where_child_bus.v1.GetBusListByNurseryIdResponse + (*GetRunningBusByGuardianIdRequest)(nil), // 4: where_child_bus.v1.GetRunningBusByGuardianIdRequest + (*GetRunningBusByGuardianIdResponse)(nil), // 5: where_child_bus.v1.GetRunningBusByGuardianIdResponse + (*ChangeBusStatusRequest)(nil), // 6: where_child_bus.v1.ChangeBusStatusRequest + (*ChangeBusStatusResponse)(nil), // 7: where_child_bus.v1.ChangeBusStatusResponse + (*SendLocationContinuousRequest)(nil), // 8: where_child_bus.v1.SendLocationContinuousRequest + (*SendLocationContinuousResponse)(nil), // 9: where_child_bus.v1.SendLocationContinuousResponse + (*TrackBusContinuousRequest)(nil), // 10: where_child_bus.v1.TrackBusContinuousRequest + (*TrackBusContinuousResponse)(nil), // 11: where_child_bus.v1.TrackBusContinuousResponse + (*StreamBusVideoRequest)(nil), // 12: where_child_bus.v1.StreamBusVideoRequest + (*StreamBusVideoResponse)(nil), // 13: where_child_bus.v1.StreamBusVideoResponse + (*UpdateBusRequest)(nil), // 14: where_child_bus.v1.UpdateBusRequest + (*UpdateBusResponse)(nil), // 15: where_child_bus.v1.UpdateBusResponse + (*Bus)(nil), // 16: where_child_bus.v1.Bus + (BusStatus)(0), // 17: where_child_bus.v1.BusStatus + (BusType)(0), // 18: where_child_bus.v1.BusType + (VehicleEvent)(0), // 19: where_child_bus.v1.VehicleEvent + (*Child)(nil), // 20: where_child_bus.v1.Child + (*fieldmaskpb.FieldMask)(nil), // 21: google.protobuf.FieldMask } var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ - 14, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus - 14, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus - 15, // 2: where_child_bus.v1.ChangeBusStatusRequest.bus_status:type_name -> where_child_bus.v1.BusStatus - 14, // 3: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus - 16, // 4: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType - 17, // 5: where_child_bus.v1.StreamBusVideoRequest.vehicle_event:type_name -> where_child_bus.v1.VehicleEvent - 18, // 6: where_child_bus.v1.StreamBusVideoResponse.children:type_name -> where_child_bus.v1.Child - 15, // 7: where_child_bus.v1.UpdateBusRequest.bus_status:type_name -> where_child_bus.v1.BusStatus - 19, // 8: where_child_bus.v1.UpdateBusRequest.update_mask:type_name -> google.protobuf.FieldMask - 14, // 9: where_child_bus.v1.UpdateBusResponse.bus:type_name -> where_child_bus.v1.Bus - 0, // 10: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest - 2, // 11: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest - 12, // 12: where_child_bus.v1.BusService.UpdateBus:input_type -> where_child_bus.v1.UpdateBusRequest - 6, // 13: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest - 8, // 14: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest - 10, // 15: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest - 1, // 16: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 17: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 13, // 18: where_child_bus.v1.BusService.UpdateBus:output_type -> where_child_bus.v1.UpdateBusResponse - 7, // 19: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse - 9, // 20: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse - 11, // 21: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse - 16, // [16:22] is the sub-list for method output_type - 10, // [10:16] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 16, // 0: where_child_bus.v1.CreateBusResponse.bus:type_name -> where_child_bus.v1.Bus + 16, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus + 16, // 2: where_child_bus.v1.GetRunningBusByGuardianIdResponse.bus:type_name -> where_child_bus.v1.Bus + 17, // 3: where_child_bus.v1.ChangeBusStatusRequest.bus_status:type_name -> where_child_bus.v1.BusStatus + 16, // 4: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus + 18, // 5: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType + 19, // 6: where_child_bus.v1.StreamBusVideoRequest.vehicle_event:type_name -> where_child_bus.v1.VehicleEvent + 20, // 7: where_child_bus.v1.StreamBusVideoResponse.children:type_name -> where_child_bus.v1.Child + 17, // 8: where_child_bus.v1.UpdateBusRequest.bus_status:type_name -> where_child_bus.v1.BusStatus + 21, // 9: where_child_bus.v1.UpdateBusRequest.update_mask:type_name -> google.protobuf.FieldMask + 16, // 10: where_child_bus.v1.UpdateBusResponse.bus:type_name -> where_child_bus.v1.Bus + 0, // 11: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest + 2, // 12: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest + 4, // 13: where_child_bus.v1.BusService.GetRunningBusByGuardianId:input_type -> where_child_bus.v1.GetRunningBusByGuardianIdRequest + 14, // 14: where_child_bus.v1.BusService.UpdateBus:input_type -> where_child_bus.v1.UpdateBusRequest + 8, // 15: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest + 10, // 16: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest + 12, // 17: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest + 1, // 18: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 19: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 5, // 20: where_child_bus.v1.BusService.GetRunningBusByGuardianId:output_type -> where_child_bus.v1.GetRunningBusByGuardianIdResponse + 15, // 21: where_child_bus.v1.BusService.UpdateBus:output_type -> where_child_bus.v1.UpdateBusResponse + 9, // 22: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse + 11, // 23: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse + 13, // 24: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse + 18, // [18:25] is the sub-list for method output_type + 11, // [11:18] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_where_child_bus_v1_bus_proto_init() } @@ -1135,7 +1252,7 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeBusStatusRequest); i { + switch v := v.(*GetRunningBusByGuardianIdRequest); i { case 0: return &v.state case 1: @@ -1147,7 +1264,7 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeBusStatusResponse); i { + switch v := v.(*GetRunningBusByGuardianIdResponse); i { case 0: return &v.state case 1: @@ -1159,7 +1276,7 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendLocationContinuousRequest); i { + switch v := v.(*ChangeBusStatusRequest); i { case 0: return &v.state case 1: @@ -1171,7 +1288,7 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendLocationContinuousResponse); i { + switch v := v.(*ChangeBusStatusResponse); i { case 0: return &v.state case 1: @@ -1183,7 +1300,7 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TrackBusContinuousRequest); i { + switch v := v.(*SendLocationContinuousRequest); i { case 0: return &v.state case 1: @@ -1195,7 +1312,7 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TrackBusContinuousResponse); i { + switch v := v.(*SendLocationContinuousResponse); i { case 0: return &v.state case 1: @@ -1207,7 +1324,7 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamBusVideoRequest); i { + switch v := v.(*TrackBusContinuousRequest); i { case 0: return &v.state case 1: @@ -1219,7 +1336,7 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamBusVideoResponse); i { + switch v := v.(*TrackBusContinuousResponse); i { case 0: return &v.state case 1: @@ -1231,7 +1348,7 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateBusRequest); i { + switch v := v.(*StreamBusVideoRequest); i { case 0: return &v.state case 1: @@ -1243,6 +1360,30 @@ func file_where_child_bus_v1_bus_proto_init() { } } file_where_child_bus_v1_bus_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamBusVideoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateBusResponse); i { case 0: return &v.state @@ -1261,7 +1402,7 @@ func file_where_child_bus_v1_bus_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_bus_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go index 322e7bff..e3a71c9e 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go @@ -19,12 +19,13 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - BusService_CreateBus_FullMethodName = "/where_child_bus.v1.BusService/CreateBus" - BusService_GetBusListByNurseryId_FullMethodName = "/where_child_bus.v1.BusService/GetBusListByNurseryId" - BusService_UpdateBus_FullMethodName = "/where_child_bus.v1.BusService/UpdateBus" - BusService_SendLocationContinuous_FullMethodName = "/where_child_bus.v1.BusService/SendLocationContinuous" - BusService_TrackBusContinuous_FullMethodName = "/where_child_bus.v1.BusService/TrackBusContinuous" - BusService_StreamBusVideo_FullMethodName = "/where_child_bus.v1.BusService/StreamBusVideo" + BusService_CreateBus_FullMethodName = "/where_child_bus.v1.BusService/CreateBus" + BusService_GetBusListByNurseryId_FullMethodName = "/where_child_bus.v1.BusService/GetBusListByNurseryId" + BusService_GetRunningBusByGuardianId_FullMethodName = "/where_child_bus.v1.BusService/GetRunningBusByGuardianId" + BusService_UpdateBus_FullMethodName = "/where_child_bus.v1.BusService/UpdateBus" + BusService_SendLocationContinuous_FullMethodName = "/where_child_bus.v1.BusService/SendLocationContinuous" + BusService_TrackBusContinuous_FullMethodName = "/where_child_bus.v1.BusService/TrackBusContinuous" + BusService_StreamBusVideo_FullMethodName = "/where_child_bus.v1.BusService/StreamBusVideo" ) // BusServiceClient is the client API for BusService service. @@ -33,6 +34,7 @@ const ( type BusServiceClient interface { CreateBus(ctx context.Context, in *CreateBusRequest, opts ...grpc.CallOption) (*CreateBusResponse, error) GetBusListByNurseryId(ctx context.Context, in *GetBusListByNurseryIdRequest, opts ...grpc.CallOption) (*GetBusListByNurseryIdResponse, error) + GetRunningBusByGuardianId(ctx context.Context, in *GetRunningBusByGuardianIdRequest, opts ...grpc.CallOption) (*GetRunningBusByGuardianIdResponse, error) UpdateBus(ctx context.Context, in *UpdateBusRequest, opts ...grpc.CallOption) (*UpdateBusResponse, error) SendLocationContinuous(ctx context.Context, opts ...grpc.CallOption) (BusService_SendLocationContinuousClient, error) TrackBusContinuous(ctx context.Context, in *TrackBusContinuousRequest, opts ...grpc.CallOption) (BusService_TrackBusContinuousClient, error) @@ -65,6 +67,15 @@ func (c *busServiceClient) GetBusListByNurseryId(ctx context.Context, in *GetBus return out, nil } +func (c *busServiceClient) GetRunningBusByGuardianId(ctx context.Context, in *GetRunningBusByGuardianIdRequest, opts ...grpc.CallOption) (*GetRunningBusByGuardianIdResponse, error) { + out := new(GetRunningBusByGuardianIdResponse) + err := c.cc.Invoke(ctx, BusService_GetRunningBusByGuardianId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *busServiceClient) UpdateBus(ctx context.Context, in *UpdateBusRequest, opts ...grpc.CallOption) (*UpdateBusResponse, error) { out := new(UpdateBusResponse) err := c.cc.Invoke(ctx, BusService_UpdateBus_FullMethodName, in, out, opts...) @@ -180,6 +191,7 @@ func (x *busServiceStreamBusVideoClient) CloseAndRecv() (*StreamBusVideoResponse type BusServiceServer interface { CreateBus(context.Context, *CreateBusRequest) (*CreateBusResponse, error) GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) + GetRunningBusByGuardianId(context.Context, *GetRunningBusByGuardianIdRequest) (*GetRunningBusByGuardianIdResponse, error) UpdateBus(context.Context, *UpdateBusRequest) (*UpdateBusResponse, error) SendLocationContinuous(BusService_SendLocationContinuousServer) error TrackBusContinuous(*TrackBusContinuousRequest, BusService_TrackBusContinuousServer) error @@ -196,6 +208,9 @@ func (UnimplementedBusServiceServer) CreateBus(context.Context, *CreateBusReques func (UnimplementedBusServiceServer) GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBusListByNurseryId not implemented") } +func (UnimplementedBusServiceServer) GetRunningBusByGuardianId(context.Context, *GetRunningBusByGuardianIdRequest) (*GetRunningBusByGuardianIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRunningBusByGuardianId not implemented") +} func (UnimplementedBusServiceServer) UpdateBus(context.Context, *UpdateBusRequest) (*UpdateBusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateBus not implemented") } @@ -256,6 +271,24 @@ func _BusService_GetBusListByNurseryId_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _BusService_GetRunningBusByGuardianId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRunningBusByGuardianIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BusServiceServer).GetRunningBusByGuardianId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BusService_GetRunningBusByGuardianId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BusServiceServer).GetRunningBusByGuardianId(ctx, req.(*GetRunningBusByGuardianIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _BusService_UpdateBus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateBusRequest) if err := dec(in); err != nil { @@ -362,6 +395,10 @@ var BusService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetBusListByNurseryId", Handler: _BusService_GetBusListByNurseryId_Handler, }, + { + MethodName: "GetRunningBusByGuardianId", + Handler: _BusService_GetRunningBusByGuardianId_Handler, + }, { MethodName: "UpdateBus", Handler: _BusService_UpdateBus_Handler, diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 9a06a4f7..79e41f71 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -201,6 +201,26 @@ func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusLi return &pb.GetBusListByNurseryIdResponse{Buses: buses}, nil } +func (i *Interactor) GetRunningBusByGuardianID(ctx context.Context, req *pb.GetRunningBusByGuardianIdRequest) (*pb.GetRunningBusByGuardianIdResponse, error) { + guardianID, err := uuid.Parse(req.GuardianId) + if err != nil { + i.logger.Error("failed to parse guardian ID", "error", err) + return nil, err + } + + bus, err := i.entClient.Bus.Query(). + Where(busRepo.HasNurseryWith(nurseryRepo.HasGuardiansWith(guardianRepo.ID(guardianID)))). + Where(busRepo.StatusEQ(bus.StatusRunning)). + Only(ctx) + + if err != nil { + i.logger.Error("failed to get bus list", "error", err) + return nil, err + } + + return &pb.GetRunningBusByGuardianIdResponse{Bus: utils.ToPbBus(bus)}, nil +} + func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatusRequest) (*pb.ChangeBusStatusResponse, error) { busID, err := uuid.Parse(req.BusId) if err != nil { @@ -399,8 +419,6 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e go func() { for { in, err := stream.Recv() - i.logger.Info("received from client") - i.logger.Info("img", in.VideoChunk[0]) if err == io.EOF { // ストリームの終了 @@ -410,11 +428,6 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e return } - // ! 治す - in.BusId = "83bd2da8-8d15-4c05-bb26-ed992334d9c6" - in.VehicleEvent = pb.VehicleEvent_VEHICLE_EVENT_GET_ON - in.BusType = pb.BusType_BUS_TYPE_MORNING - // バスID、バスタイプ、ビデオタイプを保持 busID = in.BusId vehicleEvent = in.VehicleEvent diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index ac8590b4..972d050d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -257,6 +257,108 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { $core.List<$8.Bus> get buses => $_getList(0); } +class GetRunningBusByGuardianIdRequest extends $pb.GeneratedMessage { + factory GetRunningBusByGuardianIdRequest({ + $core.String? guardianId, + }) { + final $result = create(); + if (guardianId != null) { + $result.guardianId = guardianId; + } + return $result; + } + GetRunningBusByGuardianIdRequest._() : super(); + factory GetRunningBusByGuardianIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRunningBusByGuardianIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetRunningBusByGuardianIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'guardianId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRunningBusByGuardianIdRequest clone() => GetRunningBusByGuardianIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRunningBusByGuardianIdRequest copyWith(void Function(GetRunningBusByGuardianIdRequest) updates) => super.copyWith((message) => updates(message as GetRunningBusByGuardianIdRequest)) as GetRunningBusByGuardianIdRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetRunningBusByGuardianIdRequest create() => GetRunningBusByGuardianIdRequest._(); + GetRunningBusByGuardianIdRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRunningBusByGuardianIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRunningBusByGuardianIdRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get guardianId => $_getSZ(0); + @$pb.TagNumber(1) + set guardianId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasGuardianId() => $_has(0); + @$pb.TagNumber(1) + void clearGuardianId() => clearField(1); +} + +class GetRunningBusByGuardianIdResponse extends $pb.GeneratedMessage { + factory GetRunningBusByGuardianIdResponse({ + $8.Bus? bus, + }) { + final $result = create(); + if (bus != null) { + $result.bus = bus; + } + return $result; + } + GetRunningBusByGuardianIdResponse._() : super(); + factory GetRunningBusByGuardianIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRunningBusByGuardianIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetRunningBusByGuardianIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $8.Bus.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRunningBusByGuardianIdResponse clone() => GetRunningBusByGuardianIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRunningBusByGuardianIdResponse copyWith(void Function(GetRunningBusByGuardianIdResponse) updates) => super.copyWith((message) => updates(message as GetRunningBusByGuardianIdResponse)) as GetRunningBusByGuardianIdResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetRunningBusByGuardianIdResponse create() => GetRunningBusByGuardianIdResponse._(); + GetRunningBusByGuardianIdResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRunningBusByGuardianIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRunningBusByGuardianIdResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.Bus get bus => $_getN(0); + @$pb.TagNumber(1) + set bus($8.Bus v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasBus() => $_has(0); + @$pb.TagNumber(1) + void clearBus() => clearField(1); + @$pb.TagNumber(1) + $8.Bus ensureBus() => $_ensure(0); +} + class ChangeBusStatusRequest extends $pb.GeneratedMessage { factory ChangeBusStatusRequest({ $core.String? busId, diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart index 12aa9a92..e8e6dd1c 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart @@ -29,6 +29,10 @@ class BusServiceClient extends $grpc.Client { '/where_child_bus.v1.BusService/GetBusListByNurseryId', ($0.GetBusListByNurseryIdRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.GetBusListByNurseryIdResponse.fromBuffer(value)); + static final _$getRunningBusByGuardianId = $grpc.ClientMethod<$0.GetRunningBusByGuardianIdRequest, $0.GetRunningBusByGuardianIdResponse>( + '/where_child_bus.v1.BusService/GetRunningBusByGuardianId', + ($0.GetRunningBusByGuardianIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.GetRunningBusByGuardianIdResponse.fromBuffer(value)); static final _$updateBus = $grpc.ClientMethod<$0.UpdateBusRequest, $0.UpdateBusResponse>( '/where_child_bus.v1.BusService/UpdateBus', ($0.UpdateBusRequest value) => value.writeToBuffer(), @@ -60,6 +64,10 @@ class BusServiceClient extends $grpc.Client { return $createUnaryCall(_$getBusListByNurseryId, request, options: options); } + $grpc.ResponseFuture<$0.GetRunningBusByGuardianIdResponse> getRunningBusByGuardianId($0.GetRunningBusByGuardianIdRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getRunningBusByGuardianId, request, options: options); + } + $grpc.ResponseFuture<$0.UpdateBusResponse> updateBus($0.UpdateBusRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$updateBus, request, options: options); } @@ -96,6 +104,13 @@ abstract class BusServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $0.GetBusListByNurseryIdRequest.fromBuffer(value), ($0.GetBusListByNurseryIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.GetRunningBusByGuardianIdRequest, $0.GetRunningBusByGuardianIdResponse>( + 'GetRunningBusByGuardianId', + getRunningBusByGuardianId_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetRunningBusByGuardianIdRequest.fromBuffer(value), + ($0.GetRunningBusByGuardianIdResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.UpdateBusRequest, $0.UpdateBusResponse>( 'UpdateBus', updateBus_Pre, @@ -134,6 +149,10 @@ abstract class BusServiceBase extends $grpc.Service { return getBusListByNurseryId(call, await request); } + $async.Future<$0.GetRunningBusByGuardianIdResponse> getRunningBusByGuardianId_Pre($grpc.ServiceCall call, $async.Future<$0.GetRunningBusByGuardianIdRequest> request) async { + return getRunningBusByGuardianId(call, await request); + } + $async.Future<$0.UpdateBusResponse> updateBus_Pre($grpc.ServiceCall call, $async.Future<$0.UpdateBusRequest> request) async { return updateBus(call, await request); } @@ -144,6 +163,7 @@ abstract class BusServiceBase extends $grpc.Service { $async.Future<$0.CreateBusResponse> createBus($grpc.ServiceCall call, $0.CreateBusRequest request); $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($grpc.ServiceCall call, $0.GetBusListByNurseryIdRequest request); + $async.Future<$0.GetRunningBusByGuardianIdResponse> getRunningBusByGuardianId($grpc.ServiceCall call, $0.GetRunningBusByGuardianIdRequest request); $async.Future<$0.UpdateBusResponse> updateBus($grpc.ServiceCall call, $0.UpdateBusRequest request); $async.Future<$0.SendLocationContinuousResponse> sendLocationContinuous($grpc.ServiceCall call, $async.Stream<$0.SendLocationContinuousRequest> request); $async.Stream<$0.TrackBusContinuousResponse> trackBusContinuous($grpc.ServiceCall call, $0.TrackBusContinuousRequest request); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 18749ce0..2232c8be 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -71,6 +71,32 @@ final $typed_data.Uint8List getBusListByNurseryIdResponseDescriptor = $convert.b 'Ch1HZXRCdXNMaXN0QnlOdXJzZXJ5SWRSZXNwb25zZRItCgVidXNlcxgBIAMoCzIXLndoZXJlX2' 'NoaWxkX2J1cy52MS5CdXNSBWJ1c2Vz'); +@$core.Deprecated('Use getRunningBusByGuardianIdRequestDescriptor instead') +const GetRunningBusByGuardianIdRequest$json = { + '1': 'GetRunningBusByGuardianIdRequest', + '2': [ + {'1': 'guardian_id', '3': 1, '4': 1, '5': 9, '10': 'guardianId'}, + ], +}; + +/// Descriptor for `GetRunningBusByGuardianIdRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRunningBusByGuardianIdRequestDescriptor = $convert.base64Decode( + 'CiBHZXRSdW5uaW5nQnVzQnlHdWFyZGlhbklkUmVxdWVzdBIfCgtndWFyZGlhbl9pZBgBIAEoCV' + 'IKZ3VhcmRpYW5JZA=='); + +@$core.Deprecated('Use getRunningBusByGuardianIdResponseDescriptor instead') +const GetRunningBusByGuardianIdResponse$json = { + '1': 'GetRunningBusByGuardianIdResponse', + '2': [ + {'1': 'bus', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.Bus', '10': 'bus'}, + ], +}; + +/// Descriptor for `GetRunningBusByGuardianIdResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRunningBusByGuardianIdResponseDescriptor = $convert.base64Decode( + 'CiFHZXRSdW5uaW5nQnVzQnlHdWFyZGlhbklkUmVzcG9uc2USKQoDYnVzGAEgASgLMhcud2hlcm' + 'VfY2hpbGRfYnVzLnYxLkJ1c1IDYnVz'); + @$core.Deprecated('Use changeBusStatusRequestDescriptor instead') const ChangeBusStatusRequest$json = { '1': 'ChangeBusStatusRequest', diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index 2be8f5c3..65721188 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xa4\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xaf\x06\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -32,26 +32,30 @@ _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=454 _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=456 _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=534 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=536 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=645 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=647 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=715 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=717 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=829 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=831 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=863 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=865 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=915 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=917 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1026 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1029 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1266 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1268 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1380 - _globals['_UPDATEBUSREQUEST']._serialized_start=1383 - _globals['_UPDATEBUSREQUEST']._serialized_end=1716 - _globals['_UPDATEBUSRESPONSE']._serialized_start=1718 - _globals['_UPDATEBUSRESPONSE']._serialized_end=1780 - _globals['_BUSSERVICE']._serialized_start=1783 - _globals['_BUSSERVICE']._serialized_end=2459 + _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_start=536 + _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_end=603 + _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_start=605 + _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_end=683 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=685 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=794 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=796 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=864 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=866 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=978 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=980 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=1012 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=1014 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=1064 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=1066 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1175 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1178 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1415 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1417 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1529 + _globals['_UPDATEBUSREQUEST']._serialized_start=1532 + _globals['_UPDATEBUSREQUEST']._serialized_end=1865 + _globals['_UPDATEBUSRESPONSE']._serialized_start=1867 + _globals['_UPDATEBUSRESPONSE']._serialized_end=1929 + _globals['_BUSSERVICE']._serialized_start=1932 + _globals['_BUSSERVICE']._serialized_end=2747 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index ce23fb39..5fb8d29f 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -39,6 +39,18 @@ class GetBusListByNurseryIdResponse(_message.Message): buses: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Bus] def __init__(self, buses: _Optional[_Iterable[_Union[_resources_pb2.Bus, _Mapping]]] = ...) -> None: ... +class GetRunningBusByGuardianIdRequest(_message.Message): + __slots__ = ("guardian_id",) + GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] + guardian_id: str + def __init__(self, guardian_id: _Optional[str] = ...) -> None: ... + +class GetRunningBusByGuardianIdResponse(_message.Message): + __slots__ = ("bus",) + BUS_FIELD_NUMBER: _ClassVar[int] + bus: _resources_pb2.Bus + def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... + class ChangeBusStatusRequest(_message.Message): __slots__ = ("bus_id", "bus_status") BUS_ID_FIELD_NUMBER: _ClassVar[int] diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py index 05c27480..292301cf 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py @@ -24,6 +24,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, ) + self.GetRunningBusByGuardianId = channel.unary_unary( + '/where_child_bus.v1.BusService/GetRunningBusByGuardianId', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.FromString, + ) self.UpdateBus = channel.unary_unary( '/where_child_bus.v1.BusService/UpdateBus', request_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.SerializeToString, @@ -61,6 +66,12 @@ def GetBusListByNurseryId(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetRunningBusByGuardianId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def UpdateBus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -98,6 +109,11 @@ def add_BusServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.SerializeToString, ), + 'GetRunningBusByGuardianId': grpc.unary_unary_rpc_method_handler( + servicer.GetRunningBusByGuardianId, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.SerializeToString, + ), 'UpdateBus': grpc.unary_unary_rpc_method_handler( servicer.UpdateBus, request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.FromString, @@ -162,6 +178,23 @@ def GetBusListByNurseryId(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def GetRunningBusByGuardianId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/GetRunningBusByGuardianId', + where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def UpdateBus(request, target, diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 78de2f68..0e7ac574 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -8,6 +8,7 @@ import "google/protobuf/field_mask.proto"; service BusService { rpc CreateBus(CreateBusRequest) returns (CreateBusResponse); rpc GetBusListByNurseryId(GetBusListByNurseryIdRequest) returns (GetBusListByNurseryIdResponse); + rpc GetRunningBusByGuardianId(GetRunningBusByGuardianIdRequest) returns (GetRunningBusByGuardianIdResponse); rpc UpdateBus(UpdateBusRequest) returns (UpdateBusResponse); rpc SendLocationContinuous(stream SendLocationContinuousRequest) returns (SendLocationContinuousResponse); @@ -35,6 +36,14 @@ message GetBusListByNurseryIdResponse { repeated Bus buses = 1; } +message GetRunningBusByGuardianIdRequest { + string guardian_id = 1; +} + +message GetRunningBusByGuardianIdResponse { + Bus bus = 1; +} + message ChangeBusStatusRequest { string bus_id = 1; BusStatus bus_status = 2; From 8ba4f33ba024d94fc408d721875b2bd7de412c89 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 15:41:08 +0900 Subject: [PATCH 567/771] =?UTF-8?q?fix(ml):=20=E6=AD=A3=E3=81=97=E3=81=84i?= =?UTF-8?q?mport=20path=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../generated/where_child_bus/v1/bus_pb2.py | 79 +++++++++++-------- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index 48d74e72..9d3eca8e 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -7,51 +7,60 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from generated.where_child_bus.v1 import ( + resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, +) from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xa4\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude" \n\x1eSendLocationContinuousResponse"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xa4\x05\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.bus_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.bus_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATEBUSREQUEST']._serialized_start=123 - _globals['_CREATEBUSREQUEST']._serialized_end=327 - _globals['_CREATEBUSRESPONSE']._serialized_start=329 - _globals['_CREATEBUSRESPONSE']._serialized_end=391 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=393 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=454 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=456 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=534 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=536 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=645 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=647 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=715 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=717 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=829 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=831 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=863 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=865 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=915 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=917 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1026 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1029 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1334 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1336 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1448 - _globals['_UPDATEBUSREQUEST']._serialized_start=1451 - _globals['_UPDATEBUSREQUEST']._serialized_end=1784 - _globals['_UPDATEBUSRESPONSE']._serialized_start=1786 - _globals['_UPDATEBUSRESPONSE']._serialized_end=1848 - _globals['_BUSSERVICE']._serialized_start=1851 - _globals['_BUSSERVICE']._serialized_end=2527 + _globals["DESCRIPTOR"]._options = None + _globals["DESCRIPTOR"]._serialized_options = ( + b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + ) + _globals["_CREATEBUSREQUEST"]._serialized_start = 123 + _globals["_CREATEBUSREQUEST"]._serialized_end = 327 + _globals["_CREATEBUSRESPONSE"]._serialized_start = 329 + _globals["_CREATEBUSRESPONSE"]._serialized_end = 391 + _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_start = 393 + _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_end = 454 + _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_start = 456 + _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_end = 534 + _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_start = 536 + _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_end = 645 + _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_start = 647 + _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_end = 715 + _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_start = 717 + _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_end = 829 + _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_start = 831 + _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_end = 863 + _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_start = 865 + _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_end = 915 + _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_start = 917 + _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_end = 1026 + _globals["_STREAMBUSVIDEOREQUEST"]._serialized_start = 1029 + _globals["_STREAMBUSVIDEOREQUEST"]._serialized_end = 1334 + _globals["_STREAMBUSVIDEORESPONSE"]._serialized_start = 1336 + _globals["_STREAMBUSVIDEORESPONSE"]._serialized_end = 1448 + _globals["_UPDATEBUSREQUEST"]._serialized_start = 1451 + _globals["_UPDATEBUSREQUEST"]._serialized_end = 1784 + _globals["_UPDATEBUSRESPONSE"]._serialized_start = 1786 + _globals["_UPDATEBUSRESPONSE"]._serialized_end = 1848 + _globals["_BUSSERVICE"]._serialized_start = 1851 + _globals["_BUSSERVICE"]._serialized_end = 2527 # @@protoc_insertion_point(module_scope) From 01be54d42884553e1d27b444954154283f07a54d Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 15:45:08 +0900 Subject: [PATCH 568/771] =?UTF-8?q?fix(ml):=20frontend=E3=81=8B=E3=82=89?= =?UTF-8?q?=E9=80=81=E3=82=89=E3=82=8C=E3=81=A6=E3=81=8D=E3=81=9F=E7=94=BB?= =?UTF-8?q?=E5=83=8F=E3=82=92GCS=E3=81=AB=E4=BF=9D=E5=AD=98=E3=81=99?= =?UTF-8?q?=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/pred.py | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index 292c72d2..a47f75cc 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -10,10 +10,14 @@ load_image_from_binary, switch_to_bus_type, load_pickle_to_gcs, - get_default_transforms, + get_default_transforms_for_gray, logger, ) -from face_detect_model.gcp_util import init_client, get_bucket +from face_detect_model.gcp_util import ( + init_client, + get_bucket, + save_face_image_to_remote, +) from face_detect_model.model.faceDetectModel import FaceDetectModel from face_detect_model.DetectFaceAndClip.detectFaceUtil import ( detect_face, @@ -64,20 +68,29 @@ def detect_face_and_clip_from_image(image, config): return clipped_faces -def convert_to_tensor_from_images(cliped_face_images): - transforms = get_default_transforms() +def convert_to_tensor_from_images(clipped_face_images): + transforms = get_default_transforms_for_gray() image_tensors = [] - for cliped_face_image in cliped_face_images: - image_tensor = transforms(cliped_face_image) + for clipped_face_image in clipped_face_images: + image_tensor = transforms(clipped_face_image) image_tensors.append(image_tensor) return image_tensors -def get_cliped_faces_from_images(video_chunk_list, config): +def get_clipped_faces_from_images(args, config, save_bucket): all_faces = [] - for video_chunk in video_chunk_list: - image = load_image_from_binary(video_chunk) + save_blob_name = f"{args.bus_id}.png" + for video in args.video_chunk: + image = load_image_from_binary(args, video) + save_face_image_to_remote(image, save_blob_name, save_bucket) + + # TODO: 保存処理を推論後にして保存先をchild_id/timestampにする clipped_faces = detect_face_and_clip_from_image(image, config) + if len(clipped_faces) != 0: + for i in range(len(clipped_faces)): + save_face_image_to_remote( + clipped_faces[i], f"{args.bus_id}_clipped{i}.png", save_bucket + ) all_faces.extend(clipped_faces) return all_faces @@ -109,13 +122,15 @@ def get_pred_child(model, input_image_tensors, idx_to_label_dict): def pred_child_from_images(args, config): client = init_client() bucket_name = os.environ.get("BUCKET_NAME_FOR_MODEL") + bucket_name_for_image = os.environ.get("BUCKET_NAME_FOR_FACE") bucket = get_bucket(client, bucket_name) + bucket_for_face = get_bucket(client, bucket_name_for_image) idx_to_label_dict_bucket_path = f"{args.nursery_id}/{args.bus_id}/idx_to_label_{switch_to_bus_type(args.bus_type)}.pth" idx_to_label_dict = load_pickle_to_gcs(bucket, idx_to_label_dict_bucket_path) model_class_num = len(idx_to_label_dict) - clipped_faces = get_cliped_faces_from_images(args.video_chunk, config) + clipped_faces = get_clipped_faces_from_images(args, config, bucket_for_face) if len(clipped_faces) == 0: logger.info("No face detected.") @@ -127,6 +142,7 @@ def pred_child_from_images(args, config): f"{args.nursery_id}/{args.bus_id}/model_{switch_to_bus_type(args.bus_type)}.pth" ) input_shape = get_model_input_shape(input_image_tensors[0]) + logger.info(f"Input shape: {input_shape}") model_pickle = load_pickle_to_gcs(bucket, model_bucket_path) model = load_model( model_pickle=model_pickle, @@ -158,6 +174,8 @@ def main(args): parser.add_argument("--bus_type", type=int, required=True) args = parser.parse_args() - args.video_chunk = [] + args.video_chunk = [[]] + args.photo_height = 240 + args.photo_width = 320 main(args) From 5a929767ee37b1d1561dc4b60d06fcadea2b6d31 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 15:46:24 +0900 Subject: [PATCH 569/771] =?UTF-8?q?feat(ml):=20backend=E3=81=8B=E3=82=89?= =?UTF-8?q?=E9=80=81=E4=BF=A1=E3=81=95=E3=82=8C=E3=82=8B=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=81=AE=E7=B8=A6=E6=A8=AA=E5=B9=85=E3=82=92=E5=8F=97=E3=81=91?= =?UTF-8?q?=E5=8F=96=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/generated/machine_learning/v1/func_args.py | 4 +++- machine_learning/src/proto-gen/machine_learning/v1/server.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/machine_learning/src/generated/machine_learning/v1/func_args.py b/machine_learning/src/generated/machine_learning/v1/func_args.py index 282263cf..e59ffed2 100644 --- a/machine_learning/src/generated/machine_learning/v1/func_args.py +++ b/machine_learning/src/generated/machine_learning/v1/func_args.py @@ -6,8 +6,10 @@ class Pred_Args: nursery_id: str bus_id: str bus_type: int - video_chunk: str + video_chunk: list[str] vehicle_event: str + photo_height: int + photo_width: int @dataclass diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index e68a3292..1d54cdea 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -58,6 +58,8 @@ def Pred(self, request_iterator: Iterable[bus_pb2.StreamBusVideoRequest], contex bus_id=request.bus_id, bus_type=request.bus_type, video_chunk=request.video_chunk, + photo_height=request.photo_height, + photo_width=request.photo_width, vehicle_event=request.vehicle_event, ) try: From 80f4cb1c51787d4d28fa402504bbdffee6b5712b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 20 Feb 2024 15:52:40 +0900 Subject: [PATCH 570/771] =?UTF-8?q?feat:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=81=AE=E5=8F=96=E5=BE=97=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guardian_list/guardian_list.dart | 145 ++++++------ .../bus_child_manage_page.dart | 63 ------ .../bus_guardian_manage_page.dart | 213 ++++++++++++++---- .../components/utils/input_form_body.dart | 33 ++- .../get_guardian_list_by_nursery_id.dart | 5 +- 5 files changed, 260 insertions(+), 199 deletions(-) delete mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart diff --git a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart index df964c8b..e6fd9f6e 100644 --- a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart +++ b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart @@ -1,18 +1,18 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/components/guardian_list/guardian_list_element/guardian_list_element.dart'; import 'package:where_child_bus/components/guardian_list/guardian_list_element/selected_guardian_list_element.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class GuardianList extends StatefulWidget { - final List guardianNames; - final List groupNames; - final List addedGuardians; final VoidCallback? callback; + final List guardians; + final List selectedGuardians; + const GuardianList({ Key? key, - required this.guardianNames, - required this.groupNames, - required this.addedGuardians, + required this.guardians, + required this.selectedGuardians, this.callback, }) : super(key: key); @@ -21,7 +21,6 @@ class GuardianList extends StatefulWidget { } class _GuardiansListState extends State { - @override Widget build(BuildContext context) { return body(); @@ -34,14 +33,15 @@ class _GuardiansListState extends State { Container( height: calculateAddedGuardiansHeight(), child: ReorderableListView( - onReorder: (int oldIndex, int newIndex) => onReorder(oldIndex, newIndex), + onReorder: (int oldIndex, int newIndex) => + onReorder(oldIndex, newIndex), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), - children: widget.addedGuardians.map((item) { - int index = widget.addedGuardians.indexOf(item); + children: widget.selectedGuardians.map((item) { + int index = widget.selectedGuardians.indexOf(item); return SelectedGuardianListElement( key: ValueKey(item), - title: item, + title: item.name, subtitle: "サブタイトル ${index + 1}", order: index + 1, onButtonPressed: () => removeGuardians(index), @@ -50,7 +50,7 @@ class _GuardiansListState extends State { ), ), const SizedBox(height: 15), - for (int index = 0; index < widget.guardianNames.length; index++) + for (int index = 0; index < widget.guardians.length; index++) guardianListElement(context, index), ], ), @@ -62,24 +62,23 @@ class _GuardiansListState extends State { if (newIndex > oldIndex) { newIndex -= 1; } - final item = widget.addedGuardians.removeAt(oldIndex); - widget.addedGuardians.insert(newIndex, item); + final item = widget.selectedGuardians.removeAt(oldIndex); + widget.selectedGuardians.insert(newIndex, item); }); } - double calculateAddedGuardiansHeight() { // 項目の高さ、項目間のスペース、その他のマージンなどを考慮して高さを計算 - double itemHeight = 110.0; - int itemCount = widget.addedGuardians.length; - return itemHeight * itemCount; + double itemHeight = 110.0; + int itemCount = widget.selectedGuardians.length; + return itemHeight * itemCount; } Widget addedGuardiansListViewContent() { return ListView.builder( - itemCount: widget.addedGuardians.length, + itemCount: widget.selectedGuardians.length, itemBuilder: (context, index) { - String item = widget.addedGuardians[index]; + String item = widget.selectedGuardians[index].name; // 追加された保護者リストの項目を構築 return SelectedGuardianListElement( title: item, @@ -94,8 +93,9 @@ class _GuardiansListState extends State { Widget unSelectedGuardiansListView() { return Expanded( child: ListView.separated( - itemCount: widget.guardianNames.length, - separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), + itemCount: widget.guardians.length, + separatorBuilder: (BuildContext context, int index) => + const Divider(height: 20, color: Colors.transparent), itemBuilder: (BuildContext context, int index) { // orderIndexesに基づいて項目を表示 return guardianListElement(context, index); @@ -104,70 +104,65 @@ class _GuardiansListState extends State { ); } -Widget addedGuardiansListView() { - double screenHeight = MediaQuery.of(context).size.height; - double maxHeight = screenHeight * 0.5; - - double itemHeight = 110.0; - double actualHeight = widget.addedGuardians.length * itemHeight; - - double listViewHeight = actualHeight > maxHeight ? maxHeight : actualHeight; - - return SizedBox( - height: listViewHeight, // ReorderableListViewの高さを100に設定 - child: ReorderableListView( - onReorder: (int oldIndex, int newIndex) { - setState(() { - if (newIndex > oldIndex) { - newIndex -= 1; - } - final item = widget.addedGuardians.removeAt(oldIndex); - widget.addedGuardians.insert(newIndex, item); - }); - }, - children: widget.addedGuardians.asMap().entries.map((entry) { - int index = entry.key; - String item = entry.value; - return SelectedGuardianListElement( - key: ValueKey(item), // 一意のキーを指定 - title: item, // 保護者の名前 - subtitle: "サブタイトル", - order: index + 1, // 順序番号(1から始まるように+1をしている) - onButtonPressed: () => removeGuardians(index), - ); - }).toList(), - ), - ); -} - + Widget addedGuardiansListView() { + double screenHeight = MediaQuery.of(context).size.height; + double maxHeight = screenHeight * 0.5; + + double itemHeight = 110.0; + double actualHeight = widget.selectedGuardians.length * itemHeight; + + double listViewHeight = actualHeight > maxHeight ? maxHeight : actualHeight; + + return SizedBox( + height: listViewHeight, // ReorderableListViewの高さを100に設定 + child: ReorderableListView( + onReorder: (int oldIndex, int newIndex) { + setState(() { + if (newIndex > oldIndex) { + newIndex -= 1; + } + final item = widget.selectedGuardians.removeAt(oldIndex); + widget.selectedGuardians.insert(newIndex, item); + }); + }, + children: widget.selectedGuardians.asMap().entries.map((entry) { + int index = entry.key; + String item = entry.value.name; + return SelectedGuardianListElement( + key: ValueKey(item), // 一意のキーを指定 + title: item, // 保護者の名前 + subtitle: "サブタイトル", + order: index + 1, // 順序番号(1から始まるように+1をしている) + onButtonPressed: () => removeGuardians(index), + ); + }).toList(), + ), + ); + } Widget guardianListElement(BuildContext context, int index) { return GuardianListElement( - title: widget.guardianNames[index], - subtitle: widget.groupNames[index], + title: widget.guardians[index].name, + subtitle: widget.guardians[index].phoneNumber, onButtonPressed: () => addGuardians(index), ); } - + void addGuardians(int index) { setState(() { - widget.addedGuardians.add(widget.guardianNames[index]); - widget.groupNames.removeAt(index); - widget.guardianNames.removeAt(index); + var selected = widget.guardians.removeAt(index); + widget.selectedGuardians.add(selected); }); } void removeGuardians(int index) { - setState(() { - // 追加された保護者リストから保護者を取得し削除 - String removedGuardian = widget.addedGuardians.removeAt(index); - - //戻すときは、先頭に配置 - widget.guardianNames.insert(0, removedGuardian); - - // groupNamesへの追加も必要ですが、どのグループに所属していたかの情報が必要 - widget.groupNames.add("ダミーグループ"); - }); -} + setState(() { + // 追加された保護者リストから保護者を取得し削除 + GuardianResponse removedGuardian = + widget.selectedGuardians.removeAt(index); + //戻すときは、先頭に配置 + widget.guardians.insert(0, removedGuardian); + }); + } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart deleted file mode 100644 index a940ee57..00000000 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_child_manage_page.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/material.dart'; - -class BusChildManagePage extends StatefulWidget { - @override - _BusChildManagePageState createState() => _BusChildManagePageState(); -} - -class _BusChildManagePageState extends State { - final List name = [ - "園児1", - "園児2", - "園児3", - "園児4", - "園児5", - ]; - - final List group = [ - "1組", - "2組", - "3組", - "4組", - "5組", - ]; - - final List image = [ - "1", - "2", - "1", - "1", - "2", - ]; - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text("子供の管理"), - backgroundColor: Colors.white, - ), - body: pageBody(), - ); - } - - Widget pageBody() { - // ChildListWithButton ウィジェットを使用してリストを表示 - // return ChildListWithButton( - // childNames: name, - // groupNames: group, - // images: image, - // callback: () { - // // ここでリストアイテムがタップされたときの動作を定義 - // print("リストアイテムがタップされました"); - // }, - // buttonIconTypes: List.generate(name.length, (index) { - // // ここで条件に基づいてアイコンタイプを決定するロジックを追加できる - // // 例として、すべてのアイテムに対して 'add' アイコンを設定 - // return ButtonIconType.add; - // }), - // ); - - return Container(); - } -} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart index ad1445ef..11f674d8 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -1,45 +1,156 @@ +import "dart:developer" as developer; +import "package:flutter/foundation.dart"; import "package:flutter/material.dart"; import "package:where_child_bus/components/guardian_list/guardian_list.dart"; +import "package:where_child_bus/models/nursery_data.dart"; +import "package:where_child_bus/models/nursery_guardian_data.dart"; import "package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart"; +import "package:where_child_bus/service/get_guardian_list_by_nursery_id.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; class BusGuardianManagePage extends StatefulWidget { + final Bus? bus; + + const BusGuardianManagePage({Key? key, this.bus}) : super(key: key); + @override - _BusGuardianManagePageState createState() => _BusGuardianManagePageState(); + _BusGuardianManagePageState createState() => _BusGuardianManagePageState(); } class _BusGuardianManagePageState extends State { // サンプルデータのリスト final List morningGuardianNames = [ - '保護者1', '保護者2', '保護者3', '保護者4', '保護者5', - '保護者6', '保護者7', '保護者8', '保護者9', '保護者10', - '保護者11', '保護者12', '保護者13', '保護者14', '保護者15', - '保護者16', '保護者17', '保護者18', '保護者19', '保護者20', + '保護者1', + '保護者2', + '保護者3', + '保護者4', + '保護者5', + '保護者6', + '保護者7', + '保護者8', + '保護者9', + '保護者10', + '保護者11', + '保護者12', + '保護者13', + '保護者14', + '保護者15', + '保護者16', + '保護者17', + '保護者18', + '保護者19', + '保護者20', ]; final List eveningGuardianNames = [ - '保護者1', '保護者2', '保護者3', '保護者4', '保護者5', - '保護者6', '保護者7', '保護者8', '保護者9', '保護者10', - '保護者11', '保護者12', '保護者13', '保護者14', '保護者15', - '保護者16', '保護者17', '保護者18', '保護者19', '保護者20', + '保護者1', + '保護者2', + '保護者3', + '保護者4', + '保護者5', + '保護者6', + '保護者7', + '保護者8', + '保護者9', + '保護者10', + '保護者11', + '保護者12', + '保護者13', + '保護者14', + '保護者15', + '保護者16', + '保護者17', + '保護者18', + '保護者19', + '保護者20', ]; final List morningGroupNames = [ - 'グループA', 'グループB', 'グループC', 'グループD', 'グループE', - 'グループF', 'グループG', 'グループH', 'グループI', 'グループJ', - 'グループK', 'グループL', 'グループM', 'グループN', 'グループO', - 'グループP', 'グループQ', 'グループR', 'グループS', 'グループT', + 'グループA', + 'グループB', + 'グループC', + 'グループD', + 'グループE', + 'グループF', + 'グループG', + 'グループH', + 'グループI', + 'グループJ', + 'グループK', + 'グループL', + 'グループM', + 'グループN', + 'グループO', + 'グループP', + 'グループQ', + 'グループR', + 'グループS', + 'グループT', ]; final List eveningGroupNames = [ - 'グループA', 'グループB', 'グループC', 'グループD', 'グループE', - 'グループF', 'グループG', 'グループH', 'グループI', 'グループJ', - 'グループK', 'グループL', 'グループM', 'グループN', 'グループO', - 'グループP', 'グループQ', 'グループR', 'グループS', 'グループT', + 'グループA', + 'グループB', + 'グループC', + 'グループD', + 'グループE', + 'グループF', + 'グループG', + 'グループH', + 'グループI', + 'グループJ', + 'グループK', + 'グループL', + 'グループM', + 'グループN', + 'グループO', + 'グループP', + 'グループQ', + 'グループR', + 'グループS', + 'グループT', ]; + bool _isLoading = false; + bool _isFailLoading = false; + List morningGuardians = []; + List eveningGuardians = []; + List morningSelectedGuardians = []; + List eveningSelectedGuardians = []; List morningAddedGuardians = []; List eveningAddedGuardians = []; + @override + void initState() { + super.initState(); + _loadGuardians(); + } + + Future _loadGuardians() async { + _isLoading = true; + + if (NurseryGuardianData().getGuardianList().isNotEmpty) { + if (mounted) { + setState(() { + morningGuardians = NurseryGuardianData().getGuardianList(); + eveningGuardians = NurseryGuardianData().getGuardianList(); + _isLoading = false; + }); + } + return; + } else { + try { + var res = await getGuardianListByNurseryIdService( + NurseryData().getNursery().id); + NurseryGuardianData().setGuardianListResponse(res); + } catch (e) { + if (kDebugMode) { + developer.log("保護者リストのロード中にエラーが発生しました: $e"); + } + setState(() => {_isLoading = false, _isFailLoading = true}); + } + } + } @override Widget build(BuildContext context) { @@ -54,47 +165,53 @@ class _BusGuardianManagePageState extends State { AppBar pageAppBar() { return AppBar( - bottom : const TabBar( - tabs: [ - Tab(text: "昼",), - Tab(text: "夜",), - ], - ) - ); + bottom: const TabBar( + tabs: [ + Tab( + text: "昼", + ), + Tab( + text: "夜", + ), + ], + )); } Widget pageBody() { - return Column( - children: [ - Expanded( - child: TabBarView( - children: [ - morningGuardianList(), - eveningGuardianList(), - ], + if (_isLoading) { + return const Center( + child: CircularProgressIndicator(), + ); + } else if (_isFailLoading) { + return const Center( + child: Text("データの取得に失敗しました"), + ); + } else { + return Column( + children: [ + Expanded( + child: TabBarView( + children: [ + morningGuardianList(), + eveningGuardianList(), + ], + ), ), - ), - SizedBox( - height: 100, - child: ConfirmButton(buttonText: "保存") - ), - ], - ); + SizedBox(height: 100, child: ConfirmButton(buttonText: "保存")), + ], + ); + } } Widget morningGuardianList() { return GuardianList( - guardianNames: morningGuardianNames, - groupNames: morningGroupNames, - addedGuardians: morningAddedGuardians - ); + guardians: morningGuardians, + selectedGuardians: morningSelectedGuardians); } Widget eveningGuardianList() { return GuardianList( - guardianNames: eveningGuardianNames, - groupNames: eveningGroupNames, - addedGuardians: eveningAddedGuardians - ); + guardians: eveningGuardians, + selectedGuardians: eveningSelectedGuardians); } -} \ No newline at end of file +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index bc2be6fb..ad20a659 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; import 'package:where_child_bus/models/nursery_bus_data.dart'; +import 'package:where_child_bus/models/nursery_guardian_data.dart'; import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus/service/get_guardian_list_by_nursery_id.dart'; import 'package:where_child_bus/models/nursery_data.dart'; @@ -50,17 +51,27 @@ class _InputFormBodyState extends State { } Future _loadGuardians() async { - try { - var res = await getGuardianListByNurseryIdService( - NurseryData().getNursery().id); - setState(() { - guardians = res; - }); - } catch (error) { - developer.log("Caught Error", error: error.toString()); - setState(() { - guardians = []; - }); + if (NurseryGuardianData().getGuardianList().isNotEmpty) { + if (mounted) { + setState(() { + guardians = NurseryGuardianData().getGuardianList(); + }); + } + return; + } else { + try { + var res = await getGuardianListByNurseryIdService( + NurseryData().getNursery().id); + NurseryGuardianData().setGuardianListResponse(res); + setState(() { + guardians = NurseryGuardianData().getGuardianList(); + }); + } catch (error) { + developer.log("Caught Error", error: error.toString()); + setState(() { + guardians = []; + }); + } } } diff --git a/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart b/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart index 2521624b..bb64540a 100644 --- a/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart +++ b/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart @@ -1,8 +1,9 @@ import 'package:where_child_bus/util/api/guardians.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; -Future> getGuardianListByNurseryIdService( +Future getGuardianListByNurseryIdService( String nurseryId) async { var res = await getGuardiansListByNurseryId(nurseryId); - return res.guardians; + return res; } From 93e730dc03cc0985371851794bdaaa4a456aa257 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 20 Feb 2024 16:45:59 +0900 Subject: [PATCH 571/771] =?UTF-8?q?chore:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=82=92deepCopy=E3=81=A7=E8=BF=94?= =?UTF-8?q?=E3=81=99=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/models/nursery_guardian_data.dart | 11 ++++++++++- .../bus_guardian_manage_page.dart | 5 +++++ .../lib/util/api/health_check.dart | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/lib/models/nursery_guardian_data.dart b/frontend/where_child_bus/lib/models/nursery_guardian_data.dart index 218d2ea2..65990bc8 100644 --- a/frontend/where_child_bus/lib/models/nursery_guardian_data.dart +++ b/frontend/where_child_bus/lib/models/nursery_guardian_data.dart @@ -1,3 +1,4 @@ +import 'package:protobuf/protobuf.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -15,8 +16,16 @@ class NurseryGuardianData { _guardianList = res; } + // List getGuardianList() { + // return _guardianList?.guardians ?? []; + // } + List getGuardianList() { - return _guardianList?.guardians ?? []; + // _guardianListのguardiansリストの各要素をクローンして新しいリストを作成 + return _guardianList?.guardians + .map((guardian) => guardian.deepCopy()) + .toList() ?? + []; } void clearGuardianList() { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart index 11f674d8..9c980755 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -143,6 +143,11 @@ class _BusGuardianManagePageState extends State { var res = await getGuardianListByNurseryIdService( NurseryData().getNursery().id); NurseryGuardianData().setGuardianListResponse(res); + setState(() { + morningGuardians = NurseryGuardianData().getGuardianList(); + eveningGuardians = NurseryGuardianData().getGuardianList(); + _isLoading = false; + }); } catch (e) { if (kDebugMode) { developer.log("保護者リストのロード中にエラーが発生しました: $e"); diff --git a/frontend/where_child_bus_guardian/lib/util/api/health_check.dart b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart index 8e1f14d0..ba495f49 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/health_check.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart @@ -10,7 +10,7 @@ Future serviceHealthCheck() async { port: appConfig.grpcPort, ); - final grpcClient = HealthCheckServiceClient(channel, + final grpcClient = HealthcheckServiceClient(channel, options: CallOptions(timeout: const Duration(seconds: 60))); try { From 162a11e1b8837d913c21476b7255b4d1805c7183 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 20 Feb 2024 17:09:30 +0900 Subject: [PATCH 572/771] =?UTF-8?q?feat:=E9=81=8B=E8=A1=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_list_page.dart | 47 +++++++++++++++++++ .../lib/service/update_bus_status.dart | 16 +++++++ .../where_child_bus/lib/util/api/bus.dart | 14 ++++++ 3 files changed, 77 insertions(+) create mode 100644 frontend/where_child_bus/lib/service/update_bus_status.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index d249f364..695b68e9 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -151,6 +151,8 @@ class _BusListPageState extends State { children: [ busPhoto(bus.busStatus), busNameAndDescription(bus.name, bus.busStatus), + const Spacer(), + _createOperationButton(bus.busStatus), ], ), ), @@ -190,6 +192,51 @@ class _BusListPageState extends State { ); } + Widget _createOperationButton( + BusStatus busStatus, + ) { + Color buttonColor; + String buttonText; + + switch (busStatus) { + case BusStatus.BUS_STATUS_STOPPED: + buttonColor = Colors.green; + buttonText = "運航開始"; + break; + case BusStatus.BUS_STATUS_MAINTENANCE: + buttonColor = Colors.red; + buttonText = "設定"; + break; + default: + buttonColor = Colors.red; + buttonText = "運航停止"; + } + + return _buildButton(buttonColor, buttonText, () {}); + } + + Widget _buildButton(Color color, String text, VoidCallback onPressed) { + return Padding( + padding: const EdgeInsets.all(10), + child: ElevatedButton( + onPressed: onPressed, + style: ElevatedButton.styleFrom( + primary: color, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + ), + child: Text( + text, + style: const TextStyle( + color: Colors.white, + fontSize: 16, + ), + ), + ), + ); + } + Widget busDescription(BusStatus busStatus) { late String description; if (busStatus == BusStatus.BUS_STATUS_RUNNING) { diff --git a/frontend/where_child_bus/lib/service/update_bus_status.dart b/frontend/where_child_bus/lib/service/update_bus_status.dart new file mode 100644 index 00000000..df131578 --- /dev/null +++ b/frontend/where_child_bus/lib/service/update_bus_status.dart @@ -0,0 +1,16 @@ +import 'dart:async'; +import 'dart:developer' as developer; +import 'package:where_child_bus/util/api/bus.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +Future updateBusStatusService( + String busId, BusStatus busStatus) async { + try { + var res = updateBusStatus(busId, busStatus); + return res; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } +} diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index 8f415bca..9bace640 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -2,7 +2,9 @@ import "dart:developer" as developer; import "package:flutter/foundation.dart"; import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; Future performGrpcCall( Future Function(BusServiceClient) grpcCall) async { @@ -52,6 +54,18 @@ Future createBus( }); } +Future updateBusStatus( + String busId, BusStatus busStatus) async { + return performGrpcCall((client) async { + var req = UpdateBusRequest( + busId: busId, + busStatus: busStatus, + updateMask: FieldMask(paths: ["busStatus"]), + ); + return client.updateBus(req); + }); +} + Future streamBusVideo(Stream requestStream) async { final channel = ClientChannel( appConfig.grpcEndpoint, From 7a547addde5f51115944aac0bfd2759edbfeb728 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 17:30:36 +0900 Subject: [PATCH 573/771] =?UTF-8?q?chore(ml):=20buf=20generate=E3=81=AE?= =?UTF-8?q?=E5=86=8D=E5=AE=9F=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 133 +++++++++--------- .../generated/where_child_bus/v1/bus_pb2.py | 78 +++++----- 2 files changed, 111 insertions(+), 100 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index db298b0a..5f239b23 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -1025,7 +1025,7 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, - 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0xed, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, + 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, @@ -1040,68 +1040,75 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, - 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcd, 0x02, 0x0a, 0x10, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, - 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0a, - 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, - 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, - 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0xaf, 0x06, 0x0a, 0x0a, 0x42, 0x75, - 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x88, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, - 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x34, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, - 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, + 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x74, 0x6f, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, + 0x68, 0x6f, 0x74, 0x6f, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x68, + 0x6f, 0x74, 0x6f, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x57, 0x69, 0x64, 0x74, 0x68, 0x22, 0x70, 0x0a, 0x16, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcd, 0x02, + 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, + 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, + 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, + 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0xaf, 0x06, + 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, + 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x49, 0x64, 0x12, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x58, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, + 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index e108b22f..7c2bc71f 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -18,8 +18,10 @@ ) from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xed\x01\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xaf\x06\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude" \n\x1eSendLocationContinuousResponse"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xaf\x06\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -27,40 +29,42 @@ DESCRIPTOR, "where_child_bus.v1.bus_pb2", _globals ) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATEBUSREQUEST']._serialized_start=123 - _globals['_CREATEBUSREQUEST']._serialized_end=327 - _globals['_CREATEBUSRESPONSE']._serialized_start=329 - _globals['_CREATEBUSRESPONSE']._serialized_end=391 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=393 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=454 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=456 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=534 - _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_start=536 - _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_end=603 - _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_start=605 - _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_end=683 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=685 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=794 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=796 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=864 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=866 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=978 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=980 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=1012 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=1014 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=1064 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=1066 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1175 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1178 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1415 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1417 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1529 - _globals['_UPDATEBUSREQUEST']._serialized_start=1532 - _globals['_UPDATEBUSREQUEST']._serialized_end=1865 - _globals['_UPDATEBUSRESPONSE']._serialized_start=1867 - _globals['_UPDATEBUSRESPONSE']._serialized_end=1929 - _globals['_BUSSERVICE']._serialized_start=1932 - _globals['_BUSSERVICE']._serialized_end=2747 + _globals["DESCRIPTOR"]._options = None + _globals["DESCRIPTOR"]._serialized_options = ( + b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + ) + _globals["_CREATEBUSREQUEST"]._serialized_start = 123 + _globals["_CREATEBUSREQUEST"]._serialized_end = 327 + _globals["_CREATEBUSRESPONSE"]._serialized_start = 329 + _globals["_CREATEBUSRESPONSE"]._serialized_end = 391 + _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_start = 393 + _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_end = 454 + _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_start = 456 + _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_end = 534 + _globals["_GETRUNNINGBUSBYGUARDIANIDREQUEST"]._serialized_start = 536 + _globals["_GETRUNNINGBUSBYGUARDIANIDREQUEST"]._serialized_end = 603 + _globals["_GETRUNNINGBUSBYGUARDIANIDRESPONSE"]._serialized_start = 605 + _globals["_GETRUNNINGBUSBYGUARDIANIDRESPONSE"]._serialized_end = 683 + _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_start = 685 + _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_end = 794 + _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_start = 796 + _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_end = 864 + _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_start = 866 + _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_end = 978 + _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_start = 980 + _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_end = 1012 + _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_start = 1014 + _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_end = 1064 + _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_start = 1066 + _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_end = 1175 + _globals["_STREAMBUSVIDEOREQUEST"]._serialized_start = 1178 + _globals["_STREAMBUSVIDEOREQUEST"]._serialized_end = 1483 + _globals["_STREAMBUSVIDEORESPONSE"]._serialized_start = 1485 + _globals["_STREAMBUSVIDEORESPONSE"]._serialized_end = 1597 + _globals["_UPDATEBUSREQUEST"]._serialized_start = 1600 + _globals["_UPDATEBUSREQUEST"]._serialized_end = 1933 + _globals["_UPDATEBUSRESPONSE"]._serialized_start = 1935 + _globals["_UPDATEBUSRESPONSE"]._serialized_end = 1997 + _globals["_BUSSERVICE"]._serialized_start = 2000 + _globals["_BUSSERVICE"]._serialized_end = 2815 # @@protoc_insertion_point(module_scope) From b34b5a1e63404c38d4b09739761c24994777f27c Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 17:31:28 +0900 Subject: [PATCH 574/771] =?UTF-8?q?feat(ml):=20=E3=82=B0=E3=83=AC=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=82=B1=E3=83=BC=E3=83=AB=E3=81=AE=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/config.yaml | 2 +- .../data/faceDetectDataset.py | 26 +++++++++++---- .../src/face_detect_model/util.py | 32 +++++++++++++++++-- 3 files changed, 51 insertions(+), 9 deletions(-) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index 655dab0e..e7b23fb5 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -1,6 +1,6 @@ model: hidden_size: 120 - in_channels: 3 + in_channels: 1 Conv2d: kernel_size: 3 out_channels_1: 16 diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index d65a27f3..37fa24ad 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -8,7 +8,12 @@ ) from face_detect_model.gcp_util import get_bucket, get_blobs -from face_detect_model.util import get_augment_transform, get_default_transforms +from face_detect_model.util import ( + get_augment_transform, + get_default_transforms, + get_augment_transform_for_gray, + get_default_transforms_for_gray, +) # (child_id, image)のタプルを返す @@ -18,7 +23,12 @@ def __init__(self, args, config, client): self.args = args self.config = config - default_transform = get_default_transforms() + if config["model"]["in_channels"] == 1: + default_transform = get_default_transforms_for_gray() + argument_transform = get_augment_transform_for_gray() + elif config["model"]["in_channels"] == 3: + default_transform = get_default_transforms() + argument_transform = get_augment_transform() bucket_name = os.environ.get("BUCKET_NAME") bucket = get_bucket(client, bucket_name) @@ -33,7 +43,11 @@ def __init__(self, args, config, client): SOURCE_BLOB_NAME = f"{args.nursery_id}/{child_id}/clipped/" blobs = get_blobs(bucket, SOURCE_BLOB_NAME) - label_image_list.extend(load_image_from_remote(blobs)) + label_image_list.extend( + load_image_from_remote( + blobs=blobs, color_channel=config["model"]["in_channels"] + ) + ) for label, image in label_image_list: if label not in self.name_label_dict: @@ -46,6 +60,7 @@ def __init__(self, args, config, client): augmented_images = self.augment_image( image_pil, + transforms=argument_transform, num_variations=self.config["dataset"]["augmentation"]["num_variations"], ) for aug_img in augmented_images: @@ -62,12 +77,11 @@ def _add_label(self, label: str): self.name_label_dict[label] = self.label_num self.label_num += 1 - def augment_image(self, image, num_variations=100): + def augment_image(self, image, transforms, num_variations=100): # ランダムな変換を適用するための拡張設定を強化 - transformations = get_augment_transform() augmented_images = [] for _ in range(num_variations): - augmented_image = transformations(image) + augmented_image = transforms(image) augmented_images.append(augmented_image) return augmented_images diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index a936c93f..89bdd638 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -54,7 +54,7 @@ def switch_to_bus_type(bus_type_num: int): raise ValueError(f"Invalid bus_type: {bus_type_num}") -def load_image_from_remote(blobs: list): +def load_image_from_remote(blobs: list, color_channel: int): images = [] for blob in blobs: logger.info(f"loading: {blob.name}") @@ -68,7 +68,14 @@ def load_image_from_remote(blobs: list): # cv2.imdecode でバイト配列を画像に変換 image = cv2.imdecode(image_array, cv2.IMREAD_COLOR) - image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # BGRからRGBに変換 + + if color_channel == 3: + image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # BGRからRGBに変換 + elif color_channel == 1: + image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) + else: + raise ValueError(f"Invalid color_channel: {color_channel}") + if image is None: logger.error(f"Can not load: {blob.name}") continue @@ -128,6 +135,27 @@ def get_augment_transform(): ) +def get_augment_transform_for_gray(): + return transforms.Compose( + [ + transforms.RandomCrop((100, 100)), + transforms.RandomHorizontalFlip(p=0.5), + transforms.RandomVerticalFlip(p=0.5), + transforms.RandomApply([transforms.RandomRotation(degrees=180)], p=0.5), + transforms.RandomApply( + [ + transforms.RandomAffine( + degrees=0, translate=(0.1, 0.1), scale=(0.8, 1.2) + ) + ], + p=0.5, + ), + transforms.ToTensor(), + transforms.Normalize(mean=[0.5], std=[0.5]), + ] + ) + + def _is_valid_file(file_name): VALID_EXTENSIONS = {".png"} return os.path.splitext(file_name)[1].lower() in VALID_EXTENSIONS From 6019588772f2184665315463f56d619f24c87ac4 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 17:32:32 +0900 Subject: [PATCH 575/771] =?UTF-8?q?chore(ml):=20=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E7=A7=BB=E8=A1=8C=E3=81=AB=E3=82=88=E3=82=8Bimport=20?= =?UTF-8?q?path=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectFaceAndClip/detectFaceAndClip.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index 22e251cf..a66cb716 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -15,7 +15,12 @@ load_cascade, ) -from face_detect_model.gcp_util import get_bucket, get_blobs, init_client +from face_detect_model.gcp_util import ( + get_bucket, + get_blobs, + init_client, + save_face_image_to_remote, +) load_dotenv("secrets/.env") From 0d0a2d2a4c32ce89df8a835b2f6a28091ace9666 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 17:32:46 +0900 Subject: [PATCH 576/771] =?UTF-8?q?chore(ml):=20TODO=E3=81=AE=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index 16ebd897..b6134734 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -85,6 +85,7 @@ def TrainAndTest(args: argparse.Namespace, config: dict): def main(args: argparse.Namespace): + # TODO: configに関するsanity_checkを実装する with open("src/face_detect_model/config.yaml", "r") as f: config = yaml.safe_load(f) TrainAndTest(args, config) From 31cb6dfcdb28f77692d6813c1bacae907ce8fcb0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 20 Feb 2024 17:35:36 +0900 Subject: [PATCH 577/771] =?UTF-8?q?feat:updateBusStatus=E3=82=92=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/util/operation_button.dart | 111 ++++++++++++++++++ .../pages/bus_list_page/bus_list_page.dart | 53 +-------- 2 files changed, 117 insertions(+), 47 deletions(-) create mode 100644 frontend/where_child_bus/lib/components/util/operation_button.dart diff --git a/frontend/where_child_bus/lib/components/util/operation_button.dart b/frontend/where_child_bus/lib/components/util/operation_button.dart new file mode 100644 index 00000000..be1ed787 --- /dev/null +++ b/frontend/where_child_bus/lib/components/util/operation_button.dart @@ -0,0 +1,111 @@ +import 'dart:developer' as developer; +import 'dart:ffi'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:where_child_bus/util/api/bus.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class OperationButton extends StatefulWidget { + final Bus bus; + + const OperationButton({ + super.key, + required this.bus, + }); + + @override + State createState() => _OperationButtonState(); +} + +class _OperationButtonState extends State { + bool _isLoading = false; + + @override + Widget build(BuildContext context) { + return _createOperationButton(); + } + + Future _updateBusStatus() async { + BusStatus busStatus; + + if (mounted) { + setState(() { + _isLoading = true; + }); + } + + if (widget.bus.busStatus == BusStatus.BUS_STATUS_STOPPED) { + busStatus = BusStatus.BUS_STATUS_RUNNING; + } else { + busStatus = BusStatus.BUS_STATUS_STOPPED; + } + + try { + var res = await updateBusStatus(widget.bus.id, busStatus); + if (mounted) { + setState(() {}); + } + } catch (e) { + if (kDebugMode) { + developer.log("バスの運行状態の更新中にエラーが発生しました: $e"); + } + } finally { + if (mounted) { + setState(() { + _isLoading = false; + }); + } + } + } + + Widget _createOperationButton() { + Color buttonColor; + String buttonText; + VoidCallback onPressed; + + switch (widget.bus.busStatus) { + case BusStatus.BUS_STATUS_STOPPED: + buttonColor = Colors.green; + buttonText = "運航開始"; + onPressed = _updateBusStatus; + break; + case BusStatus.BUS_STATUS_MAINTENANCE: + buttonColor = Colors.lime; + buttonText = "設定"; + onPressed = () {}; + break; + default: + buttonColor = Colors.red; + buttonText = "運航停止"; + onPressed = _updateBusStatus; + } + + return _buildButton(buttonColor, buttonText, onPressed); + } + + Widget _buildButton(Color color, String text, VoidCallback onPressed) { + return Padding( + padding: const EdgeInsets.all(10), + child: ElevatedButton( + onPressed: onPressed, + style: ElevatedButton.styleFrom( + backgroundColor: color, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + ), + child: _isLoading + ? const CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation(Colors.white), + ) + : Text( + text, + style: const TextStyle( + color: Colors.white, + fontSize: 16, + ), + ), + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 695b68e9..f10f85e7 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -1,12 +1,14 @@ import "dart:developer" as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:where_child_bus/components/util/operation_button.dart'; import 'package:where_child_bus/models/bus_edit_page_type.dart'; import 'package:where_child_bus/models/nursery_bus_data.dart'; import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus/models/nursery_data.dart'; +import 'package:where_child_bus/service/update_bus_status.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pb.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -152,7 +154,9 @@ class _BusListPageState extends State { busPhoto(bus.busStatus), busNameAndDescription(bus.name, bus.busStatus), const Spacer(), - _createOperationButton(bus.busStatus), + OperationButton( + bus: bus, + ), ], ), ), @@ -192,57 +196,12 @@ class _BusListPageState extends State { ); } - Widget _createOperationButton( - BusStatus busStatus, - ) { - Color buttonColor; - String buttonText; - - switch (busStatus) { - case BusStatus.BUS_STATUS_STOPPED: - buttonColor = Colors.green; - buttonText = "運航開始"; - break; - case BusStatus.BUS_STATUS_MAINTENANCE: - buttonColor = Colors.red; - buttonText = "設定"; - break; - default: - buttonColor = Colors.red; - buttonText = "運航停止"; - } - - return _buildButton(buttonColor, buttonText, () {}); - } - - Widget _buildButton(Color color, String text, VoidCallback onPressed) { - return Padding( - padding: const EdgeInsets.all(10), - child: ElevatedButton( - onPressed: onPressed, - style: ElevatedButton.styleFrom( - primary: color, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - ), - ), - child: Text( - text, - style: const TextStyle( - color: Colors.white, - fontSize: 16, - ), - ), - ), - ); - } - Widget busDescription(BusStatus busStatus) { late String description; if (busStatus == BusStatus.BUS_STATUS_RUNNING) { description = "運行中"; } else if (busStatus == BusStatus.BUS_STATUS_MAINTENANCE) { - description = "メンテナンス中"; + description = "未設定"; } else { description = "停止中"; } From d954c492472677b6431d001828d71b4b29cb4ab0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 20 Feb 2024 17:39:10 +0900 Subject: [PATCH 578/771] =?UTF-8?q?feat:=E3=83=A1=E3=83=B3=E3=83=86?= =?UTF-8?q?=E3=83=8A=E3=83=B3=E3=82=B9=E7=94=A8=E3=81=AE=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/images/bus_maintenance.png | Bin 0 -> 6188 bytes .../lib/pages/bus_list_page/bus_list_page.dart | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 frontend/where_child_bus/assets/images/bus_maintenance.png diff --git a/frontend/where_child_bus/assets/images/bus_maintenance.png b/frontend/where_child_bus/assets/images/bus_maintenance.png new file mode 100644 index 0000000000000000000000000000000000000000..47a89f5c16c6b849d7b8696007269d5de145f385 GIT binary patch literal 6188 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 LBdsz`=Li1+*;Uan literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index f10f85e7..7d188a4f 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -169,8 +169,10 @@ class _BusListPageState extends State { late String imagePath; if (busStatus == BusStatus.BUS_STATUS_RUNNING) { imagePath = "assets/images/bus_operating.png"; - } else { + } else if (busStatus == BusStatus.BUS_STATUS_STOPPED) { imagePath = "assets/images/bus_not_operating.png"; + } else { + imagePath = "assets/images/bus_maintenance.png"; } return SizedBox( @@ -201,7 +203,7 @@ class _BusListPageState extends State { if (busStatus == BusStatus.BUS_STATUS_RUNNING) { description = "運行中"; } else if (busStatus == BusStatus.BUS_STATUS_MAINTENANCE) { - description = "未設定"; + description = "経路未設定"; } else { description = "停止中"; } From 97474dc7148d7dfc729f1b8824ee52064993ac81 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 18:55:57 +0900 Subject: [PATCH 579/771] =?UTF-8?q?fix(ml):=20gcloud=20run=20deploy?= =?UTF-8?q?=E3=81=AB=E5=AF=BE=E3=81=99=E3=82=8B=E5=BC=95=E6=95=B0=E3=81=AE?= =?UTF-8?q?=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9=E5=90=8D=E3=82=92=E6=AD=A3?= =?UTF-8?q?=E3=81=97=E3=81=8F=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_cloudrun_machine_learning.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 69143f1c..f05e3fb6 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -4,6 +4,7 @@ on: push: branches: - develop + - feature/machine-learning/cicd paths: - "machine_learning/**" @@ -52,7 +53,7 @@ jobs: - name: Deploy to Cloud Run run: | - gcloud run deploy ${{ secrets.GCP_IMAGE_NAME_FOR_ML }} \ + gcloud run deploy ${{ secrets.GCP_SERVICE_NAME_FOR_ML }} \ --image gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest \ --region ${{ secrets.REGION }} \ --platform managed From c3f857394a5dff033ad86baec466355c50335285 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 18:57:38 +0900 Subject: [PATCH 580/771] refactor(ml) --- .github/workflows/deploy_cloudrun_machine_learning.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index f05e3fb6..c87ad4dd 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -6,6 +6,7 @@ on: - develop - feature/machine-learning/cicd paths: + - "github/workflows/deploy_cloudrun_machine_learning.yml" - "machine_learning/**" permissions: From 1c0a298341eaccb8034f9f54ebcc41daa1271e00 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 18:58:56 +0900 Subject: [PATCH 581/771] refactor --- .github/workflows/deploy_cloudrun_machine_learning.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index c87ad4dd..a46e381c 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -1,4 +1,4 @@ -name: Deployment of machine learning system to CloudRun +name: Deployment of machine learning gRPC server to CloudRun on: push: @@ -29,7 +29,7 @@ jobs: version: latest # gcloud CLIを認証するステップを追加 - - name: Auth + - name: Google Cloud Platform Service Account Authentication uses: google-github-actions/auth@v0.4.0 with: workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} From 55722c745f73a30503e2a31119098dcea3ee528e Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 19:00:47 +0900 Subject: [PATCH 582/771] =?UTF-8?q?fix(ml):=20path=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_cloudrun_machine_learning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index a46e381c..ac05ecd5 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -6,7 +6,7 @@ on: - develop - feature/machine-learning/cicd paths: - - "github/workflows/deploy_cloudrun_machine_learning.yml" + - ".github/workflows/deploy_cloudrun_machine_learning.yml" - "machine_learning/**" permissions: From b10db3228ebd8d1cb1717a209f119a2d8a35b0d0 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Tue, 20 Feb 2024 19:08:12 +0900 Subject: [PATCH 583/771] refactor --- .github/workflows/deploy_cloudrun_machine_learning.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index ac05ecd5..e68596f9 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -4,9 +4,7 @@ on: push: branches: - develop - - feature/machine-learning/cicd paths: - - ".github/workflows/deploy_cloudrun_machine_learning.yml" - "machine_learning/**" permissions: From aaa3865983ff5b9baf311d9cf9b69200871b02c9 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 20 Feb 2024 19:23:15 +0900 Subject: [PATCH 584/771] =?UTF-8?q?feat:=E7=8A=B6=E6=85=8B=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/util/operation_button.dart | 10 +- .../bus_guardian_manage_page.dart | 107 ++---------------- .../bus_edit_page/bus_edit_page.dart | 11 +- .../components/confirm_button.dart | 8 +- .../pages/bus_list_page/bus_list_page.dart | 9 +- .../where_child_bus/lib/util/api/bus.dart | 3 +- 6 files changed, 41 insertions(+), 107 deletions(-) diff --git a/frontend/where_child_bus/lib/components/util/operation_button.dart b/frontend/where_child_bus/lib/components/util/operation_button.dart index be1ed787..e5f6e8a7 100644 --- a/frontend/where_child_bus/lib/components/util/operation_button.dart +++ b/frontend/where_child_bus/lib/components/util/operation_button.dart @@ -6,11 +6,13 @@ import 'package:where_child_bus/util/api/bus.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class OperationButton extends StatefulWidget { - final Bus bus; + Bus bus; + Function(Bus) onBusUpdated; - const OperationButton({ + OperationButton({ super.key, required this.bus, + required this.onBusUpdated, }); @override @@ -43,7 +45,9 @@ class _OperationButtonState extends State { try { var res = await updateBusStatus(widget.bus.id, busStatus); if (mounted) { - setState(() {}); + setState(() { + widget.onBusUpdated(res.bus); + }); } } catch (e) { if (kDebugMode) { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart index 9c980755..6ba1f6b4 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -18,107 +18,12 @@ class BusGuardianManagePage extends StatefulWidget { } class _BusGuardianManagePageState extends State { - // サンプルデータのリスト - final List morningGuardianNames = [ - '保護者1', - '保護者2', - '保護者3', - '保護者4', - '保護者5', - '保護者6', - '保護者7', - '保護者8', - '保護者9', - '保護者10', - '保護者11', - '保護者12', - '保護者13', - '保護者14', - '保護者15', - '保護者16', - '保護者17', - '保護者18', - '保護者19', - '保護者20', - ]; - - final List eveningGuardianNames = [ - '保護者1', - '保護者2', - '保護者3', - '保護者4', - '保護者5', - '保護者6', - '保護者7', - '保護者8', - '保護者9', - '保護者10', - '保護者11', - '保護者12', - '保護者13', - '保護者14', - '保護者15', - '保護者16', - '保護者17', - '保護者18', - '保護者19', - '保護者20', - ]; - - final List morningGroupNames = [ - 'グループA', - 'グループB', - 'グループC', - 'グループD', - 'グループE', - 'グループF', - 'グループG', - 'グループH', - 'グループI', - 'グループJ', - 'グループK', - 'グループL', - 'グループM', - 'グループN', - 'グループO', - 'グループP', - 'グループQ', - 'グループR', - 'グループS', - 'グループT', - ]; - - final List eveningGroupNames = [ - 'グループA', - 'グループB', - 'グループC', - 'グループD', - 'グループE', - 'グループF', - 'グループG', - 'グループH', - 'グループI', - 'グループJ', - 'グループK', - 'グループL', - 'グループM', - 'グループN', - 'グループO', - 'グループP', - 'グループQ', - 'グループR', - 'グループS', - 'グループT', - ]; - bool _isLoading = false; bool _isFailLoading = false; List morningGuardians = []; List eveningGuardians = []; List morningSelectedGuardians = []; List eveningSelectedGuardians = []; - List morningAddedGuardians = []; - List eveningAddedGuardians = []; @override void initState() { @@ -202,7 +107,17 @@ class _BusGuardianManagePageState extends State { ], ), ), - SizedBox(height: 100, child: ConfirmButton(buttonText: "保存")), + SizedBox( + height: 100, + child: ConfirmButton( + buttonText: "保存", + onTap: () => { + Navigator.pop(context, { + "morning": morningSelectedGuardians, + "evening": eveningSelectedGuardians + }), + }, + )), ], ); } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index b73cabd9..3bf1bdba 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -22,6 +22,8 @@ class _BusEditPageState extends State { final ImagePicker _picker = ImagePicker(); final TextEditingController _busNameController = TextEditingController(); final TextEditingController _busNumberController = TextEditingController(); + List morningSelectedGuardians = []; + List eveningSelectedGuardians = []; String? _selectedImagePath; bool _isPickingImage = false; @@ -131,11 +133,16 @@ class _BusEditPageState extends State { child: Padding( padding: const EdgeInsets.all(10), child: ElevatedButton( - onPressed: () { - Navigator.push( + onPressed: () async { + var res = await Navigator.push( context, MaterialPageRoute( builder: (context) => BusGuardianManagePage())); + if (res != null && res is Map) { + developer.log("${res["morning"]}"); + morningSelectedGuardians = res["morning"]; + eveningSelectedGuardians = res["evening"]; + } }, child: const Text("バスを利用する保護者を変更"), ), diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart index b08c8620..1dc89016 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart @@ -3,7 +3,7 @@ import "package:flutter/material.dart"; class ConfirmButton extends StatelessWidget { final String buttonText; final VoidCallback? onTap; - final double fontSize = 20; + final double fontSize = 20; ConfirmButton({required this.buttonText, this.onTap}); @@ -19,8 +19,8 @@ class ConfirmButton extends StatelessWidget { child: Padding( padding: const EdgeInsets.symmetric(vertical: 10), child: SizedBox( - width: MediaQuery.of(context).size.width * 0.6, - height: fontSize * 2, + width: MediaQuery.of(context).size.width * 0.6, + height: fontSize * 2, child: ElevatedButton( onPressed: onTap ?? () {}, style: ElevatedButton.styleFrom( @@ -40,7 +40,7 @@ class ConfirmButton extends StatelessWidget { TextStyle buttonTextStyle() { return TextStyle( color: Colors.white, - fontSize: fontSize, + fontSize: fontSize, ); } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 7d188a4f..9481567c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -8,7 +8,6 @@ import 'package:where_child_bus/pages/bus_list_page/bottom_sheet.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_edit_page.dart'; import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus/models/nursery_data.dart'; -import 'package:where_child_bus/service/update_bus_status.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pb.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -156,6 +155,14 @@ class _BusListPageState extends State { const Spacer(), OperationButton( bus: bus, + onBusUpdated: (Bus updatedBus) { + int index = buses.indexOf(bus); + if (index != -1) { + setState(() { + buses[index] = updatedBus; + }); + } + }, ), ], ), diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index 9bace640..d2e0df12 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -60,8 +60,9 @@ Future updateBusStatus( var req = UpdateBusRequest( busId: busId, busStatus: busStatus, - updateMask: FieldMask(paths: ["busStatus"]), + updateMask: FieldMask(paths: ["bus_status"]), ); + developer.log("Request: $req"); return client.updateBus(req); }); } From cdb2fe47137502c17b7d32cddea6bef3e5f84c6c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 20 Feb 2024 20:02:27 +0900 Subject: [PATCH 585/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E4=BD=9C=E6=88=90=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/models/create_bus_error.dart | 6 ++ .../bus_edit_page/bus_edit_page.dart | 96 ++++++++++++++++++- .../validation/create_bus_validation.dart | 16 ++++ 3 files changed, 113 insertions(+), 5 deletions(-) create mode 100644 frontend/where_child_bus/lib/models/create_bus_error.dart create mode 100644 frontend/where_child_bus/lib/util/validation/create_bus_validation.dart diff --git a/frontend/where_child_bus/lib/models/create_bus_error.dart b/frontend/where_child_bus/lib/models/create_bus_error.dart new file mode 100644 index 00000000..c50e9143 --- /dev/null +++ b/frontend/where_child_bus/lib/models/create_bus_error.dart @@ -0,0 +1,6 @@ +enum CreateBusError { + fieldsNotFilled, + noGuardiansSelected, + networkError, + nameTooLong, +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 3bf1bdba..cfe08bdc 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -1,11 +1,16 @@ import 'dart:io'; import "dart:developer" as developer; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; import 'package:where_child_bus/models/bus_edit_page_type.dart'; +import 'package:where_child_bus/models/create_bus_error.dart'; +import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; +import 'package:where_child_bus/util/api/bus.dart'; +import 'package:where_child_bus/util/validation/create_bus_validation.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BusEditPage extends StatefulWidget { @@ -22,11 +27,12 @@ class _BusEditPageState extends State { final ImagePicker _picker = ImagePicker(); final TextEditingController _busNameController = TextEditingController(); final TextEditingController _busNumberController = TextEditingController(); - List morningSelectedGuardians = []; - List eveningSelectedGuardians = []; + List morningSelectedGuardiansId = []; + List eveningSelectedGuardiansId = []; String? _selectedImagePath; bool _isPickingImage = false; + CreateBusError? _createBusError; @override void initState() { @@ -47,6 +53,55 @@ class _BusEditPageState extends State { ); } + bool validation() { + if (CreateBusValidator.validateFields( + _busNameController.text, _busNumberController.text)) { + developer.log("バス名とナンバーを入力してください"); + setState(() { + _createBusError = CreateBusError.fieldsNotFilled; + }); + return true; + } else if (CreateBusValidator.validateGuardians( + morningSelectedGuardiansId, eveningSelectedGuardiansId)) { + setState(() { + _createBusError = CreateBusError.noGuardiansSelected; + }); + return true; + } else if (CreateBusValidator.validateNameLength(_busNameController.text)) { + setState(() { + _createBusError = CreateBusError.nameTooLong; + }); + return true; + } + + return false; + } + + Future _updateBus() async { + throw UnimplementedError(); + } + + Future _createBus() async { + if (validation()) { + return; + } + + try { + var res = await createBus( + NurseryData().getNursery().id, + _busNameController.text, + _busNumberController.text, + morningSelectedGuardiansId, + eveningSelectedGuardiansId, + ); + Navigator.pop(context); + } catch (e) { + if (kDebugMode) { + developer.log("バスの作成中にエラーが発生しました: $e"); + } + } + } + Widget pageBody(BuildContext context) { return Center( child: Column( @@ -55,14 +110,43 @@ class _BusEditPageState extends State { // inputFieldsAndThumbnail(context), inputFields(), manageChildrenButton(), + _createErrorMessage(), ConfirmButton( buttonText: "保存", + onTap: widget.busEditPageType == BusEditPageType.update + ? _updateBus + : _createBus, ), ], ), ); } + Widget _createErrorMessage() { + String errorMessage; + if (_createBusError == CreateBusError.fieldsNotFilled) { + errorMessage = "バス名とナンバーを入力してください"; + } else if (_createBusError == CreateBusError.noGuardiansSelected) { + errorMessage = "保護者を選択してください"; + } else if (_createBusError == CreateBusError.nameTooLong) { + errorMessage = "バス名は20文字以内で入力してください"; + } else { + errorMessage = ""; + } + + if (_createBusError == null) { + return const SizedBox(); + } + + return Padding( + padding: const EdgeInsets.all(8), + child: Text( + errorMessage, + style: const TextStyle(color: Colors.red), + ), + ); + } + Widget inputFieldsAndThumbnail(BuildContext context) { return Padding( padding: EdgeInsets.symmetric( @@ -138,10 +222,12 @@ class _BusEditPageState extends State { context, MaterialPageRoute( builder: (context) => BusGuardianManagePage())); - if (res != null && res is Map) { + if (res != null && res is Map>) { developer.log("${res["morning"]}"); - morningSelectedGuardians = res["morning"]; - eveningSelectedGuardians = res["evening"]; + morningSelectedGuardiansId = + res["morning"]?.map((e) => e.id).toList() ?? []; + eveningSelectedGuardiansId = + res["evening"]?.map((e) => e.id).toList() ?? []; } }, child: const Text("バスを利用する保護者を変更"), diff --git a/frontend/where_child_bus/lib/util/validation/create_bus_validation.dart b/frontend/where_child_bus/lib/util/validation/create_bus_validation.dart new file mode 100644 index 00000000..b62a4270 --- /dev/null +++ b/frontend/where_child_bus/lib/util/validation/create_bus_validation.dart @@ -0,0 +1,16 @@ +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class CreateBusValidator { + static bool validateFields(String name, String plateNumber) { + return name.isEmpty && plateNumber.isEmpty; + } + + static bool validateGuardians( + List morningGuardians, List eveningGuardians) { + return morningGuardians.isEmpty && eveningGuardians.isEmpty; + } + + static bool validateNameLength(String name) { + return name.length <= 20; + } +} From 064cb600af59b2fb88b69da3cbaaae60577cd85b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 20 Feb 2024 20:26:29 +0900 Subject: [PATCH 586/771] =?UTF-8?q?feat:=E9=81=B8=E6=8A=9E=E3=81=97?= =?UTF-8?q?=E3=81=9F=E4=BF=9D=E8=AD=B7=E8=80=85=E3=81=AE=E4=BF=9D=E6=8C=81?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_guardian_manage_page.dart | 42 ++++++++++++++++++- .../bus_edit_page/bus_edit_page.dart | 7 +++- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart index 6ba1f6b4..1e64cf04 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -10,8 +10,15 @@ import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.da class BusGuardianManagePage extends StatefulWidget { final Bus? bus; + final List? morningSelectedGuardiansId; + final List? eveningSelectedGuardiansId; - const BusGuardianManagePage({Key? key, this.bus}) : super(key: key); + const BusGuardianManagePage( + {Key? key, + this.bus, + this.morningSelectedGuardiansId, + this.eveningSelectedGuardiansId}) + : super(key: key); @override _BusGuardianManagePageState createState() => _BusGuardianManagePageState(); @@ -31,6 +38,32 @@ class _BusGuardianManagePageState extends State { _loadGuardians(); } + void _setSelectedGuardians() { + if (widget.morningSelectedGuardiansId != null) { + developer.log( + "morningSelectedGuardiansId: ${widget.morningSelectedGuardiansId}"); + //mornignGuardiansの中からmorningSelectedGuardiansIdに一致するguardianをmorningSelectedGuardiansに追加 + morningSelectedGuardians = morningGuardians + .where((guardian) => + widget.morningSelectedGuardiansId!.contains(guardian.id)) + .toList(); + //morningGuardiansからmorningSelectedGuardiansに追加したguardianを削除 + morningGuardians.removeWhere((guardian) => + widget.morningSelectedGuardiansId!.contains(guardian.id)); + } + + if (widget.eveningSelectedGuardiansId != null) { + //eveningGuardiansの中からeveningSelectedGuardiansIdに一致するguardianをeveningSelectedGuardiansに追加 + eveningSelectedGuardians = eveningGuardians + .where((guardian) => + widget.eveningSelectedGuardiansId!.contains(guardian.id)) + .toList(); + //eveningGuardiansからeveningSelectedGuardiansに追加したguardianを削除 + eveningGuardians.removeWhere((guardian) => + widget.eveningSelectedGuardiansId!.contains(guardian.id)); + } + } + Future _loadGuardians() async { _isLoading = true; @@ -39,6 +72,7 @@ class _BusGuardianManagePageState extends State { setState(() { morningGuardians = NurseryGuardianData().getGuardianList(); eveningGuardians = NurseryGuardianData().getGuardianList(); + _setSelectedGuardians(); _isLoading = false; }); } @@ -57,7 +91,11 @@ class _BusGuardianManagePageState extends State { if (kDebugMode) { developer.log("保護者リストのロード中にエラーが発生しました: $e"); } - setState(() => {_isLoading = false, _isFailLoading = true}); + setState(() => { + _setSelectedGuardians(), + _isLoading = false, + _isFailLoading = true + }); } } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index cfe08bdc..cbf6f765 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -221,7 +221,12 @@ class _BusEditPageState extends State { var res = await Navigator.push( context, MaterialPageRoute( - builder: (context) => BusGuardianManagePage())); + builder: (context) => BusGuardianManagePage( + morningSelectedGuardiansId: + morningSelectedGuardiansId, + eveningSelectedGuardiansId: + eveningSelectedGuardiansId, + ))); if (res != null && res is Map>) { developer.log("${res["morning"]}"); morningSelectedGuardiansId = From 81655768104c958e2a4f61377a238c856fce028c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 20 Feb 2024 20:29:47 +0900 Subject: [PATCH 587/771] =?UTF-8?q?refactor:=E9=96=A2=E6=95=B0=E3=82=92?= =?UTF-8?q?=E3=83=97=E3=83=A9=E3=82=A4=E3=83=99=E3=83=BC=E3=83=88=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_guardian_manage_page.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart index 1e64cf04..7b94084e 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -105,13 +105,13 @@ class _BusGuardianManagePageState extends State { return DefaultTabController( length: 2, child: Scaffold( - appBar: pageAppBar(), - body: pageBody(), + appBar: _createPageAppBar(), + body: _createPageBody(), ), ); } - AppBar pageAppBar() { + AppBar _createPageAppBar() { return AppBar( bottom: const TabBar( tabs: [ @@ -125,7 +125,7 @@ class _BusGuardianManagePageState extends State { )); } - Widget pageBody() { + Widget _createPageBody() { if (_isLoading) { return const Center( child: CircularProgressIndicator(), @@ -140,8 +140,8 @@ class _BusGuardianManagePageState extends State { Expanded( child: TabBarView( children: [ - morningGuardianList(), - eveningGuardianList(), + _createMorningGuardianList(), + _createEveningGuardianList(), ], ), ), @@ -161,13 +161,13 @@ class _BusGuardianManagePageState extends State { } } - Widget morningGuardianList() { + Widget _createMorningGuardianList() { return GuardianList( guardians: morningGuardians, selectedGuardians: morningSelectedGuardians); } - Widget eveningGuardianList() { + Widget _createEveningGuardianList() { return GuardianList( guardians: eveningGuardians, selectedGuardians: eveningSelectedGuardians); From 6bbe91e8a8226726bf3877834f538f66360fef41 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Tue, 20 Feb 2024 21:00:40 +0900 Subject: [PATCH 588/771] =?UTF-8?q?fix:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=81=AE=E9=A0=86=E7=95=AA=E3=82=82=E4=BF=9D=E6=8C=81=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_guardian_manage_page.dart | 25 ++++++++++--------- frontend/where_child_bus/pubspec.lock | 2 +- frontend/where_child_bus/pubspec.yaml | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart index 7b94084e..01251c93 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -1,5 +1,6 @@ import "dart:developer" as developer; import "package:flutter/foundation.dart"; +import 'package:collection/collection.dart'; import "package:flutter/material.dart"; import "package:where_child_bus/components/guardian_list/guardian_list.dart"; import "package:where_child_bus/models/nursery_data.dart"; @@ -40,25 +41,25 @@ class _BusGuardianManagePageState extends State { void _setSelectedGuardians() { if (widget.morningSelectedGuardiansId != null) { - developer.log( - "morningSelectedGuardiansId: ${widget.morningSelectedGuardiansId}"); - //mornignGuardiansの中からmorningSelectedGuardiansIdに一致するguardianをmorningSelectedGuardiansに追加 - morningSelectedGuardians = morningGuardians - .where((guardian) => - widget.morningSelectedGuardiansId!.contains(guardian.id)) + morningSelectedGuardians = widget.morningSelectedGuardiansId! + .map((id) => morningGuardians + .firstWhereOrNull((guardian) => guardian.id == id)) + .where((element) => element != null) + .cast() .toList(); - //morningGuardiansからmorningSelectedGuardiansに追加したguardianを削除 + morningGuardians.removeWhere((guardian) => widget.morningSelectedGuardiansId!.contains(guardian.id)); } if (widget.eveningSelectedGuardiansId != null) { - //eveningGuardiansの中からeveningSelectedGuardiansIdに一致するguardianをeveningSelectedGuardiansに追加 - eveningSelectedGuardians = eveningGuardians - .where((guardian) => - widget.eveningSelectedGuardiansId!.contains(guardian.id)) + eveningSelectedGuardians = widget.eveningSelectedGuardiansId! + .map((id) => eveningGuardians + .firstWhereOrNull((guardian) => guardian.id == id)) + .where((element) => element != null) + .cast() .toList(); - //eveningGuardiansからeveningSelectedGuardiansに追加したguardianを削除 + eveningGuardians.removeWhere((guardian) => widget.eveningSelectedGuardiansId!.contains(guardian.id)); } diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index 0fc28f97..c5a9510a 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -90,7 +90,7 @@ packages: source: hosted version: "1.1.1" collection: - dependency: transitive + dependency: "direct main" description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 6fe2d681..78b43207 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -17,6 +17,7 @@ dependencies: flutter_cache_manager: ^3.3.1 camera: ^0.10.5+9 image: ^4.1.7 + collection: ^1.18.0 where_child_bus_api: path: ../where_child_bus_api From 94d22738b967c08ee4c8a96d071a7f3cce5b98bc Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 20 Feb 2024 22:40:10 +0900 Subject: [PATCH 589/771] =?UTF-8?q?ci:=20=E3=82=AF=E3=83=AC=E3=83=87?= =?UTF-8?q?=E3=83=B3=E3=82=B7=E3=83=A3=E3=83=AB=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=82=92=E6=9A=97=E5=8F=B7=E5=8C=96=E3=81=97=E3=81=A6?= =?UTF-8?q?push?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-to-gcloud.yml | 15 +++++++++++---- backend/Dockerfile | 5 ----- backend/secrets/gcp-credentials.json.enc | Bin 0 -> 2384 bytes 3 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 backend/secrets/gcp-credentials.json.enc diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index dd4c7c7d..d2db4a41 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -7,8 +7,7 @@ on: push: branches: - develop - paths: - - "backend/**" + - ci/backend jobs: setup-build-deploy: @@ -16,6 +15,15 @@ jobs: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 + + - name: Decrypt secrets + run: openssl aes-256-cbc -d -in backend/secrets/gcp-credentials.json.enc -out backend/secrets/gcp-credentials.json -k ${{ secrets.DECRYPTION_KEY }} + + - name: Use decrypted secrets + run: | + echo "Secrets are decrypted and ready to use" + - uses: actions/checkout@v4 - name: Setup gcloud CLI @@ -47,8 +55,7 @@ jobs: --build-arg GOOGLE_APPLICATION_CREDENTIALS="${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}" \ --build-arg STORAGE_BUCKET_NAME="${{ secrets.STORAGE_BUCKET_NAME }}" \ --build-arg PASSWORD_PEPPER="${{ secrets.PASSWORD_PEPPER }}" \ - --build-arg ML_ADDR="${{ secrets.ML_ADDR }}" \ - --build-arg INSIDE_OF_CREDENTIALS="${{ secrets.INSIDE_OF_CREDENTIALS }}" + --build-arg ML_ADDR="${{ secrets.ML_ADDR }}" - name: Configure Docker to use the gcloud command-line tool as a credential helper for the us region run: gcloud auth configure-docker --quiet diff --git a/backend/Dockerfile b/backend/Dockerfile index b7dc00f7..bdaa0bcc 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -32,11 +32,6 @@ RUN echo "DSN=$DSN" > .env \ && echo "PASSWORD_PEPPER=$PASSWORD_PEPPER" >> .env \ && echo "ML_ADDR=$ML_ADDR" >> .env -# secretsディレクトリのgcp-credentials.jsonを作成 -RUN mkdir secrets -RUN touch secrets/gcp-credentials.json -RUN echo "$INSIDE_OF_CREDENTIALS" >> secrets/gcp-credentials.json - RUN go mod download ARG VERS="3.11.4" diff --git a/backend/secrets/gcp-credentials.json.enc b/backend/secrets/gcp-credentials.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..8afbbafc5542a364c84f0ee193f612be5a28f16c GIT binary patch literal 2384 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 Date: Tue, 20 Feb 2024 22:49:11 +0900 Subject: [PATCH 590/771] =?UTF-8?q?ci:=20.github/workflows/deploy-to-gclou?= =?UTF-8?q?d.yml=E3=81=AE=E5=A4=89=E6=9B=B4:=20actions/checkout=E3=81=AE?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-to-gcloud.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index d2db4a41..17ed55c7 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -24,8 +24,6 @@ jobs: run: | echo "Secrets are decrypted and ready to use" - - uses: actions/checkout@v4 - - name: Setup gcloud CLI uses: google-github-actions/setup-gcloud@v2 with: From 161f39d86f5ed6f4ed31fbb2e6644a4e3dd74f8e Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 20 Feb 2024 22:52:42 +0900 Subject: [PATCH 591/771] =?UTF-8?q?ci:=20=E6=9C=80=E7=B5=82=E8=AA=BF?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-to-gcloud.yml | 5 +++-- backend/.gitignore | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 17ed55c7..84894ed1 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -7,7 +7,8 @@ on: push: branches: - develop - - ci/backend + paths: + - "backend/**" jobs: setup-build-deploy: @@ -15,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Decrypt secrets run: openssl aes-256-cbc -d -in backend/secrets/gcp-credentials.json.enc -out backend/secrets/gcp-credentials.json -k ${{ secrets.DECRYPTION_KEY }} diff --git a/backend/.gitignore b/backend/.gitignore index 432dd73d..b7d859d4 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -30,4 +30,4 @@ go.work .env # secrets -secrets/* \ No newline at end of file +secrets-raw/* \ No newline at end of file From 118b5a4ff781ee8a23ae08a43f7e88406d177467 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 20 Feb 2024 23:06:57 +0900 Subject: [PATCH 592/771] =?UTF-8?q?feat:=20=E4=BF=9D=E8=AD=B7=E8=80=85ID?= =?UTF-8?q?=E3=81=8B=E3=82=89=E4=BF=9D=E8=82=B2=E5=9C=92=E3=82=92=E5=8F=96?= =?UTF-8?q?=E5=BE=97=E3=81=99=E3=82=8BAPI=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/nursery.go | 5 + .../go/where_child_bus/v1/nursery.pb.go | 403 ++++++++++++------ .../go/where_child_bus/v1/nursery_grpc.pb.go | 43 +- backend/usecases/nursery/nursery.go | 23 + .../where_child_bus/v1/nursery.pb.dart | 102 +++++ .../where_child_bus/v1/nursery.pbgrpc.dart | 20 + .../where_child_bus/v1/nursery.pbjson.dart | 26 ++ .../where_child_bus/v1/nursery_pb2.py | 34 +- .../where_child_bus/v1/nursery_pb2.pyi | 12 + .../where_child_bus/v1/nursery_pb2_grpc.py | 33 ++ proto/where_child_bus/v1/nursery.proto | 9 + 11 files changed, 561 insertions(+), 149 deletions(-) diff --git a/backend/interfaces/nursery.go b/backend/interfaces/nursery.go index 16a72a32..60cf2069 100644 --- a/backend/interfaces/nursery.go +++ b/backend/interfaces/nursery.go @@ -15,6 +15,11 @@ func NewNurseryServiceServer(interactor *nursery.Interactor) pb.NurseryServiceSe return &nurseryServiceServer{interactor} } +// GetNurseryByGuardianId implements where_child_busv1.NurseryServiceServer. +func (s *nurseryServiceServer) GetNurseryByGuardianId(ctx context.Context, req *pb.GetNurseryByGuardianIdRequest) (*pb.GetNurseryByGuardianIdResponse, error) { + return s.interactor.GetNurseryByGuardianID(ctx, req) +} + // CreateNursery implements where_child_busv1.NurseryServiceServer. func (s *nurseryServiceServer) CreateNursery(ctx context.Context, req *pb.CreateNurseryRequest) (*pb.CreateNurseryResponse, error) { return s.interactor.CreateNursery(ctx, req) diff --git a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go index 6c9fe5c2..fd1e1f64 100644 --- a/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/nursery.pb.go @@ -21,6 +21,100 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type GetNurseryByGuardianIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GuardianId string `protobuf:"bytes,1,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` +} + +func (x *GetNurseryByGuardianIdRequest) Reset() { + *x = GetNurseryByGuardianIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNurseryByGuardianIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNurseryByGuardianIdRequest) ProtoMessage() {} + +func (x *GetNurseryByGuardianIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNurseryByGuardianIdRequest.ProtoReflect.Descriptor instead. +func (*GetNurseryByGuardianIdRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{0} +} + +func (x *GetNurseryByGuardianIdRequest) GetGuardianId() string { + if x != nil { + return x.GuardianId + } + return "" +} + +type GetNurseryByGuardianIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nurseries *NurseryResponse `protobuf:"bytes,1,opt,name=nurseries,proto3" json:"nurseries,omitempty"` +} + +func (x *GetNurseryByGuardianIdResponse) Reset() { + *x = GetNurseryByGuardianIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNurseryByGuardianIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNurseryByGuardianIdResponse) ProtoMessage() {} + +func (x *GetNurseryByGuardianIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNurseryByGuardianIdResponse.ProtoReflect.Descriptor instead. +func (*GetNurseryByGuardianIdResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{1} +} + +func (x *GetNurseryByGuardianIdResponse) GetNurseries() *NurseryResponse { + if x != nil { + return x.Nurseries + } + return nil +} + type CreateNurseryRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -36,7 +130,7 @@ type CreateNurseryRequest struct { func (x *CreateNurseryRequest) Reset() { *x = CreateNurseryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[0] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -49,7 +143,7 @@ func (x *CreateNurseryRequest) String() string { func (*CreateNurseryRequest) ProtoMessage() {} func (x *CreateNurseryRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[0] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62,7 +156,7 @@ func (x *CreateNurseryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateNurseryRequest.ProtoReflect.Descriptor instead. func (*CreateNurseryRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{0} + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{2} } func (x *CreateNurseryRequest) GetEmail() string { @@ -111,7 +205,7 @@ type CreateNurseryResponse struct { func (x *CreateNurseryResponse) Reset() { *x = CreateNurseryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[1] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -124,7 +218,7 @@ func (x *CreateNurseryResponse) String() string { func (*CreateNurseryResponse) ProtoMessage() {} func (x *CreateNurseryResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[1] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -137,7 +231,7 @@ func (x *CreateNurseryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateNurseryResponse.ProtoReflect.Descriptor instead. func (*CreateNurseryResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{1} + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{3} } func (x *CreateNurseryResponse) GetNursery() *NurseryResponse { @@ -159,7 +253,7 @@ type NurseryLoginRequest struct { func (x *NurseryLoginRequest) Reset() { *x = NurseryLoginRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[2] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -172,7 +266,7 @@ func (x *NurseryLoginRequest) String() string { func (*NurseryLoginRequest) ProtoMessage() {} func (x *NurseryLoginRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[2] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -185,7 +279,7 @@ func (x *NurseryLoginRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use NurseryLoginRequest.ProtoReflect.Descriptor instead. func (*NurseryLoginRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{2} + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{4} } func (x *NurseryLoginRequest) GetEmail() string { @@ -214,7 +308,7 @@ type NurseryLoginResponse struct { func (x *NurseryLoginResponse) Reset() { *x = NurseryLoginResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[3] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -227,7 +321,7 @@ func (x *NurseryLoginResponse) String() string { func (*NurseryLoginResponse) ProtoMessage() {} func (x *NurseryLoginResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[3] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -240,7 +334,7 @@ func (x *NurseryLoginResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use NurseryLoginResponse.ProtoReflect.Descriptor instead. func (*NurseryLoginResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{3} + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{5} } func (x *NurseryLoginResponse) GetSuccess() bool { @@ -274,7 +368,7 @@ type UpdateNurseryRequest struct { func (x *UpdateNurseryRequest) Reset() { *x = UpdateNurseryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[4] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -287,7 +381,7 @@ func (x *UpdateNurseryRequest) String() string { func (*UpdateNurseryRequest) ProtoMessage() {} func (x *UpdateNurseryRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[4] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -300,7 +394,7 @@ func (x *UpdateNurseryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateNurseryRequest.ProtoReflect.Descriptor instead. func (*UpdateNurseryRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{4} + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{6} } func (x *UpdateNurseryRequest) GetId() string { @@ -363,7 +457,7 @@ type UpdateNurseryResponse struct { func (x *UpdateNurseryResponse) Reset() { *x = UpdateNurseryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[5] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -376,7 +470,7 @@ func (x *UpdateNurseryResponse) String() string { func (*UpdateNurseryResponse) ProtoMessage() {} func (x *UpdateNurseryResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_nursery_proto_msgTypes[5] + mi := &file_where_child_bus_v1_nursery_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -389,7 +483,7 @@ func (x *UpdateNurseryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateNurseryResponse.ProtoReflect.Descriptor instead. func (*UpdateNurseryResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{5} + return file_where_child_bus_v1_nursery_proto_rawDescGZIP(), []int{7} } func (x *UpdateNurseryResponse) GetNursery() *NurseryResponse { @@ -409,90 +503,108 @@ var file_where_child_bus_v1_nursery_proto_rawDesc = []byte{ 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, - 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, - 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x56, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x22, 0x47, 0x0a, 0x13, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, - 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x6f, 0x0a, 0x14, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x22, 0xe6, 0x01, 0x0a, 0x14, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, - 0x61, 0x73, 0x6b, 0x22, 0x56, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, - 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x32, 0xbf, 0x02, 0x0a, 0x0e, - 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, - 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, - 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x1d, + 0x47, 0x65, 0x74, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x63, + 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x42, 0x79, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x41, 0x0a, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, + 0x56, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, + 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x22, 0x47, 0x0a, 0x13, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x22, 0x6f, 0x0a, 0x14, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x22, 0xe6, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3b, 0x0a, + 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x56, 0x0a, 0x15, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, - 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, - 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x32, 0xc0, 0x03, 0x0a, 0x0e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, + 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x42, + 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0c, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x27, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x42, 0x0c, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, + 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, + 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, + 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -507,33 +619,38 @@ func file_where_child_bus_v1_nursery_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_nursery_proto_rawDescData } -var file_where_child_bus_v1_nursery_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_where_child_bus_v1_nursery_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_where_child_bus_v1_nursery_proto_goTypes = []interface{}{ - (*CreateNurseryRequest)(nil), // 0: where_child_bus.v1.CreateNurseryRequest - (*CreateNurseryResponse)(nil), // 1: where_child_bus.v1.CreateNurseryResponse - (*NurseryLoginRequest)(nil), // 2: where_child_bus.v1.NurseryLoginRequest - (*NurseryLoginResponse)(nil), // 3: where_child_bus.v1.NurseryLoginResponse - (*UpdateNurseryRequest)(nil), // 4: where_child_bus.v1.UpdateNurseryRequest - (*UpdateNurseryResponse)(nil), // 5: where_child_bus.v1.UpdateNurseryResponse - (*NurseryResponse)(nil), // 6: where_child_bus.v1.NurseryResponse - (*fieldmaskpb.FieldMask)(nil), // 7: google.protobuf.FieldMask + (*GetNurseryByGuardianIdRequest)(nil), // 0: where_child_bus.v1.GetNurseryByGuardianIdRequest + (*GetNurseryByGuardianIdResponse)(nil), // 1: where_child_bus.v1.GetNurseryByGuardianIdResponse + (*CreateNurseryRequest)(nil), // 2: where_child_bus.v1.CreateNurseryRequest + (*CreateNurseryResponse)(nil), // 3: where_child_bus.v1.CreateNurseryResponse + (*NurseryLoginRequest)(nil), // 4: where_child_bus.v1.NurseryLoginRequest + (*NurseryLoginResponse)(nil), // 5: where_child_bus.v1.NurseryLoginResponse + (*UpdateNurseryRequest)(nil), // 6: where_child_bus.v1.UpdateNurseryRequest + (*UpdateNurseryResponse)(nil), // 7: where_child_bus.v1.UpdateNurseryResponse + (*NurseryResponse)(nil), // 8: where_child_bus.v1.NurseryResponse + (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask } var file_where_child_bus_v1_nursery_proto_depIdxs = []int32{ - 6, // 0: where_child_bus.v1.CreateNurseryResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 6, // 1: where_child_bus.v1.NurseryLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 7, // 2: where_child_bus.v1.UpdateNurseryRequest.update_mask:type_name -> google.protobuf.FieldMask - 6, // 3: where_child_bus.v1.UpdateNurseryResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse - 0, // 4: where_child_bus.v1.NurseryService.CreateNursery:input_type -> where_child_bus.v1.CreateNurseryRequest - 2, // 5: where_child_bus.v1.NurseryService.NurseryLogin:input_type -> where_child_bus.v1.NurseryLoginRequest - 4, // 6: where_child_bus.v1.NurseryService.UpdateNursery:input_type -> where_child_bus.v1.UpdateNurseryRequest - 1, // 7: where_child_bus.v1.NurseryService.CreateNursery:output_type -> where_child_bus.v1.CreateNurseryResponse - 3, // 8: where_child_bus.v1.NurseryService.NurseryLogin:output_type -> where_child_bus.v1.NurseryLoginResponse - 5, // 9: where_child_bus.v1.NurseryService.UpdateNursery:output_type -> where_child_bus.v1.UpdateNurseryResponse - 7, // [7:10] is the sub-list for method output_type - 4, // [4:7] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 8, // 0: where_child_bus.v1.GetNurseryByGuardianIdResponse.nurseries:type_name -> where_child_bus.v1.NurseryResponse + 8, // 1: where_child_bus.v1.CreateNurseryResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 8, // 2: where_child_bus.v1.NurseryLoginResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 9, // 3: where_child_bus.v1.UpdateNurseryRequest.update_mask:type_name -> google.protobuf.FieldMask + 8, // 4: where_child_bus.v1.UpdateNurseryResponse.nursery:type_name -> where_child_bus.v1.NurseryResponse + 0, // 5: where_child_bus.v1.NurseryService.GetNurseryByGuardianId:input_type -> where_child_bus.v1.GetNurseryByGuardianIdRequest + 2, // 6: where_child_bus.v1.NurseryService.CreateNursery:input_type -> where_child_bus.v1.CreateNurseryRequest + 4, // 7: where_child_bus.v1.NurseryService.NurseryLogin:input_type -> where_child_bus.v1.NurseryLoginRequest + 6, // 8: where_child_bus.v1.NurseryService.UpdateNursery:input_type -> where_child_bus.v1.UpdateNurseryRequest + 1, // 9: where_child_bus.v1.NurseryService.GetNurseryByGuardianId:output_type -> where_child_bus.v1.GetNurseryByGuardianIdResponse + 3, // 10: where_child_bus.v1.NurseryService.CreateNursery:output_type -> where_child_bus.v1.CreateNurseryResponse + 5, // 11: where_child_bus.v1.NurseryService.NurseryLogin:output_type -> where_child_bus.v1.NurseryLoginResponse + 7, // 12: where_child_bus.v1.NurseryService.UpdateNursery:output_type -> where_child_bus.v1.UpdateNurseryResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_where_child_bus_v1_nursery_proto_init() } @@ -544,7 +661,7 @@ func file_where_child_bus_v1_nursery_proto_init() { file_where_child_bus_v1_resources_proto_init() if !protoimpl.UnsafeEnabled { file_where_child_bus_v1_nursery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateNurseryRequest); i { + switch v := v.(*GetNurseryByGuardianIdRequest); i { case 0: return &v.state case 1: @@ -556,7 +673,7 @@ func file_where_child_bus_v1_nursery_proto_init() { } } file_where_child_bus_v1_nursery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateNurseryResponse); i { + switch v := v.(*GetNurseryByGuardianIdResponse); i { case 0: return &v.state case 1: @@ -568,7 +685,7 @@ func file_where_child_bus_v1_nursery_proto_init() { } } file_where_child_bus_v1_nursery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NurseryLoginRequest); i { + switch v := v.(*CreateNurseryRequest); i { case 0: return &v.state case 1: @@ -580,7 +697,7 @@ func file_where_child_bus_v1_nursery_proto_init() { } } file_where_child_bus_v1_nursery_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NurseryLoginResponse); i { + switch v := v.(*CreateNurseryResponse); i { case 0: return &v.state case 1: @@ -592,7 +709,7 @@ func file_where_child_bus_v1_nursery_proto_init() { } } file_where_child_bus_v1_nursery_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateNurseryRequest); i { + switch v := v.(*NurseryLoginRequest); i { case 0: return &v.state case 1: @@ -604,6 +721,30 @@ func file_where_child_bus_v1_nursery_proto_init() { } } file_where_child_bus_v1_nursery_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NurseryLoginResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_nursery_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNurseryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_nursery_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateNurseryResponse); i { case 0: return &v.state @@ -622,7 +763,7 @@ func file_where_child_bus_v1_nursery_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_nursery_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go index bbc27cdd..7a45b357 100644 --- a/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/nursery_grpc.pb.go @@ -19,15 +19,17 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - NurseryService_CreateNursery_FullMethodName = "/where_child_bus.v1.NurseryService/CreateNursery" - NurseryService_NurseryLogin_FullMethodName = "/where_child_bus.v1.NurseryService/NurseryLogin" - NurseryService_UpdateNursery_FullMethodName = "/where_child_bus.v1.NurseryService/UpdateNursery" + NurseryService_GetNurseryByGuardianId_FullMethodName = "/where_child_bus.v1.NurseryService/GetNurseryByGuardianId" + NurseryService_CreateNursery_FullMethodName = "/where_child_bus.v1.NurseryService/CreateNursery" + NurseryService_NurseryLogin_FullMethodName = "/where_child_bus.v1.NurseryService/NurseryLogin" + NurseryService_UpdateNursery_FullMethodName = "/where_child_bus.v1.NurseryService/UpdateNursery" ) // NurseryServiceClient is the client API for NurseryService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type NurseryServiceClient interface { + GetNurseryByGuardianId(ctx context.Context, in *GetNurseryByGuardianIdRequest, opts ...grpc.CallOption) (*GetNurseryByGuardianIdResponse, error) CreateNursery(ctx context.Context, in *CreateNurseryRequest, opts ...grpc.CallOption) (*CreateNurseryResponse, error) NurseryLogin(ctx context.Context, in *NurseryLoginRequest, opts ...grpc.CallOption) (*NurseryLoginResponse, error) UpdateNursery(ctx context.Context, in *UpdateNurseryRequest, opts ...grpc.CallOption) (*UpdateNurseryResponse, error) @@ -41,6 +43,15 @@ func NewNurseryServiceClient(cc grpc.ClientConnInterface) NurseryServiceClient { return &nurseryServiceClient{cc} } +func (c *nurseryServiceClient) GetNurseryByGuardianId(ctx context.Context, in *GetNurseryByGuardianIdRequest, opts ...grpc.CallOption) (*GetNurseryByGuardianIdResponse, error) { + out := new(GetNurseryByGuardianIdResponse) + err := c.cc.Invoke(ctx, NurseryService_GetNurseryByGuardianId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *nurseryServiceClient) CreateNursery(ctx context.Context, in *CreateNurseryRequest, opts ...grpc.CallOption) (*CreateNurseryResponse, error) { out := new(CreateNurseryResponse) err := c.cc.Invoke(ctx, NurseryService_CreateNursery_FullMethodName, in, out, opts...) @@ -72,6 +83,7 @@ func (c *nurseryServiceClient) UpdateNursery(ctx context.Context, in *UpdateNurs // All implementations should embed UnimplementedNurseryServiceServer // for forward compatibility type NurseryServiceServer interface { + GetNurseryByGuardianId(context.Context, *GetNurseryByGuardianIdRequest) (*GetNurseryByGuardianIdResponse, error) CreateNursery(context.Context, *CreateNurseryRequest) (*CreateNurseryResponse, error) NurseryLogin(context.Context, *NurseryLoginRequest) (*NurseryLoginResponse, error) UpdateNursery(context.Context, *UpdateNurseryRequest) (*UpdateNurseryResponse, error) @@ -81,6 +93,9 @@ type NurseryServiceServer interface { type UnimplementedNurseryServiceServer struct { } +func (UnimplementedNurseryServiceServer) GetNurseryByGuardianId(context.Context, *GetNurseryByGuardianIdRequest) (*GetNurseryByGuardianIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNurseryByGuardianId not implemented") +} func (UnimplementedNurseryServiceServer) CreateNursery(context.Context, *CreateNurseryRequest) (*CreateNurseryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateNursery not implemented") } @@ -102,6 +117,24 @@ func RegisterNurseryServiceServer(s grpc.ServiceRegistrar, srv NurseryServiceSer s.RegisterService(&NurseryService_ServiceDesc, srv) } +func _NurseryService_GetNurseryByGuardianId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNurseryByGuardianIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NurseryServiceServer).GetNurseryByGuardianId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NurseryService_GetNurseryByGuardianId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NurseryServiceServer).GetNurseryByGuardianId(ctx, req.(*GetNurseryByGuardianIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _NurseryService_CreateNursery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateNurseryRequest) if err := dec(in); err != nil { @@ -163,6 +196,10 @@ var NurseryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "where_child_bus.v1.NurseryService", HandlerType: (*NurseryServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "GetNurseryByGuardianId", + Handler: _NurseryService_GetNurseryByGuardianId_Handler, + }, { MethodName: "CreateNursery", Handler: _NurseryService_CreateNursery_Handler, diff --git a/backend/usecases/nursery/nursery.go b/backend/usecases/nursery/nursery.go index 57d3ce17..5de7c1dd 100644 --- a/backend/usecases/nursery/nursery.go +++ b/backend/usecases/nursery/nursery.go @@ -11,6 +11,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" @@ -26,6 +27,28 @@ func NewInteractor(entClient *ent.Client, logger *slog.Logger) *Interactor { return &Interactor{entClient, logger} } +func (i *Interactor) GetNurseryByGuardianID(ctx context.Context, req *pb.GetNurseryByGuardianIdRequest) (*pb.GetNurseryByGuardianIdResponse, error) { + // guardianIDをuuidに変換 + guardianID, err := uuid.Parse(req.GuardianId) + if err != nil { + i.logger.Error("failed to parse uuid", "error", err) + return nil, err + } + + // guardianIDに紐づくnurseryを取得 + nurseries, err := i.entClient.Nursery.Query(). + Where(nursery.HasGuardiansWith(guardianRepo.IDEQ(guardianID))). + Only(ctx) + if err != nil { + i.logger.Error("failed to get nurseries", "error", err) + return nil, err + } + + return &pb.GetNurseryByGuardianIdResponse{ + Nurseries: utils.ToPbNurseryResponse(nurseries), + }, nil +} + func (i *Interactor) CreateNursery(ctx context.Context, req *pb.CreateNurseryRequest) (*pb.CreateNurseryResponse, error) { //パスワードをハッシュ化 hashedPassword, err := utils.HashPassword(req.Password) diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart index 4ecbe14c..4636f8ad 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -16,6 +16,108 @@ import 'package:protobuf/protobuf.dart' as $pb; import '../../google/protobuf/field_mask.pb.dart' as $9; import 'resources.pb.dart' as $8; +class GetNurseryByGuardianIdRequest extends $pb.GeneratedMessage { + factory GetNurseryByGuardianIdRequest({ + $core.String? guardianId, + }) { + final $result = create(); + if (guardianId != null) { + $result.guardianId = guardianId; + } + return $result; + } + GetNurseryByGuardianIdRequest._() : super(); + factory GetNurseryByGuardianIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetNurseryByGuardianIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetNurseryByGuardianIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'guardianId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetNurseryByGuardianIdRequest clone() => GetNurseryByGuardianIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetNurseryByGuardianIdRequest copyWith(void Function(GetNurseryByGuardianIdRequest) updates) => super.copyWith((message) => updates(message as GetNurseryByGuardianIdRequest)) as GetNurseryByGuardianIdRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetNurseryByGuardianIdRequest create() => GetNurseryByGuardianIdRequest._(); + GetNurseryByGuardianIdRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetNurseryByGuardianIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetNurseryByGuardianIdRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get guardianId => $_getSZ(0); + @$pb.TagNumber(1) + set guardianId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasGuardianId() => $_has(0); + @$pb.TagNumber(1) + void clearGuardianId() => clearField(1); +} + +class GetNurseryByGuardianIdResponse extends $pb.GeneratedMessage { + factory GetNurseryByGuardianIdResponse({ + $8.NurseryResponse? nurseries, + }) { + final $result = create(); + if (nurseries != null) { + $result.nurseries = nurseries; + } + return $result; + } + GetNurseryByGuardianIdResponse._() : super(); + factory GetNurseryByGuardianIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetNurseryByGuardianIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetNurseryByGuardianIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.NurseryResponse>(1, _omitFieldNames ? '' : 'nurseries', subBuilder: $8.NurseryResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetNurseryByGuardianIdResponse clone() => GetNurseryByGuardianIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetNurseryByGuardianIdResponse copyWith(void Function(GetNurseryByGuardianIdResponse) updates) => super.copyWith((message) => updates(message as GetNurseryByGuardianIdResponse)) as GetNurseryByGuardianIdResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetNurseryByGuardianIdResponse create() => GetNurseryByGuardianIdResponse._(); + GetNurseryByGuardianIdResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetNurseryByGuardianIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetNurseryByGuardianIdResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.NurseryResponse get nurseries => $_getN(0); + @$pb.TagNumber(1) + set nurseries($8.NurseryResponse v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasNurseries() => $_has(0); + @$pb.TagNumber(1) + void clearNurseries() => clearField(1); + @$pb.TagNumber(1) + $8.NurseryResponse ensureNurseries() => $_ensure(0); +} + class CreateNurseryRequest extends $pb.GeneratedMessage { factory CreateNurseryRequest({ $core.String? email, diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart index e15cb6e1..ee095431 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart @@ -21,6 +21,10 @@ export 'nursery.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.NurseryService') class NurseryServiceClient extends $grpc.Client { + static final _$getNurseryByGuardianId = $grpc.ClientMethod<$5.GetNurseryByGuardianIdRequest, $5.GetNurseryByGuardianIdResponse>( + '/where_child_bus.v1.NurseryService/GetNurseryByGuardianId', + ($5.GetNurseryByGuardianIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $5.GetNurseryByGuardianIdResponse.fromBuffer(value)); static final _$createNursery = $grpc.ClientMethod<$5.CreateNurseryRequest, $5.CreateNurseryResponse>( '/where_child_bus.v1.NurseryService/CreateNursery', ($5.CreateNurseryRequest value) => value.writeToBuffer(), @@ -40,6 +44,10 @@ class NurseryServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); + $grpc.ResponseFuture<$5.GetNurseryByGuardianIdResponse> getNurseryByGuardianId($5.GetNurseryByGuardianIdRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getNurseryByGuardianId, request, options: options); + } + $grpc.ResponseFuture<$5.CreateNurseryResponse> createNursery($5.CreateNurseryRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$createNursery, request, options: options); } @@ -58,6 +66,13 @@ abstract class NurseryServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.NurseryService'; NurseryServiceBase() { + $addMethod($grpc.ServiceMethod<$5.GetNurseryByGuardianIdRequest, $5.GetNurseryByGuardianIdResponse>( + 'GetNurseryByGuardianId', + getNurseryByGuardianId_Pre, + false, + false, + ($core.List<$core.int> value) => $5.GetNurseryByGuardianIdRequest.fromBuffer(value), + ($5.GetNurseryByGuardianIdResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$5.CreateNurseryRequest, $5.CreateNurseryResponse>( 'CreateNursery', createNursery_Pre, @@ -81,6 +96,10 @@ abstract class NurseryServiceBase extends $grpc.Service { ($5.UpdateNurseryResponse value) => value.writeToBuffer())); } + $async.Future<$5.GetNurseryByGuardianIdResponse> getNurseryByGuardianId_Pre($grpc.ServiceCall call, $async.Future<$5.GetNurseryByGuardianIdRequest> request) async { + return getNurseryByGuardianId(call, await request); + } + $async.Future<$5.CreateNurseryResponse> createNursery_Pre($grpc.ServiceCall call, $async.Future<$5.CreateNurseryRequest> request) async { return createNursery(call, await request); } @@ -93,6 +112,7 @@ abstract class NurseryServiceBase extends $grpc.Service { return updateNursery(call, await request); } + $async.Future<$5.GetNurseryByGuardianIdResponse> getNurseryByGuardianId($grpc.ServiceCall call, $5.GetNurseryByGuardianIdRequest request); $async.Future<$5.CreateNurseryResponse> createNursery($grpc.ServiceCall call, $5.CreateNurseryRequest request); $async.Future<$5.NurseryLoginResponse> nurseryLogin($grpc.ServiceCall call, $5.NurseryLoginRequest request); $async.Future<$5.UpdateNurseryResponse> updateNursery($grpc.ServiceCall call, $5.UpdateNurseryRequest request); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart index c8e70a9e..1480c20c 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbjson.dart @@ -13,6 +13,32 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use getNurseryByGuardianIdRequestDescriptor instead') +const GetNurseryByGuardianIdRequest$json = { + '1': 'GetNurseryByGuardianIdRequest', + '2': [ + {'1': 'guardian_id', '3': 1, '4': 1, '5': 9, '10': 'guardianId'}, + ], +}; + +/// Descriptor for `GetNurseryByGuardianIdRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getNurseryByGuardianIdRequestDescriptor = $convert.base64Decode( + 'Ch1HZXROdXJzZXJ5QnlHdWFyZGlhbklkUmVxdWVzdBIfCgtndWFyZGlhbl9pZBgBIAEoCVIKZ3' + 'VhcmRpYW5JZA=='); + +@$core.Deprecated('Use getNurseryByGuardianIdResponseDescriptor instead') +const GetNurseryByGuardianIdResponse$json = { + '1': 'GetNurseryByGuardianIdResponse', + '2': [ + {'1': 'nurseries', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.NurseryResponse', '10': 'nurseries'}, + ], +}; + +/// Descriptor for `GetNurseryByGuardianIdResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getNurseryByGuardianIdResponseDescriptor = $convert.base64Decode( + 'Ch5HZXROdXJzZXJ5QnlHdWFyZGlhbklkUmVzcG9uc2USQQoJbnVyc2VyaWVzGAEgASgLMiMud2' + 'hlcmVfY2hpbGRfYnVzLnYxLk51cnNlcnlSZXNwb25zZVIJbnVyc2VyaWVz'); + @$core.Deprecated('Use createNurseryRequestDescriptor instead') const CreateNurseryRequest$json = { '1': 'CreateNurseryRequest', diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py index d0d2e74b..144b73b5 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"\xe6\x01\n\x14UpdateNurseryRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x05 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x06 \x01(\tR\x08password\x12;\n\x0bupdate_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"V\n\x15UpdateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xbf\x02\n\x0eNurseryService\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponse\x12\x64\n\rUpdateNursery\x12(.where_child_bus.v1.UpdateNurseryRequest\x1a).where_child_bus.v1.UpdateNurseryResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"@\n\x1dGetNurseryByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"c\n\x1eGetNurseryByGuardianIdResponse\x12\x41\n\tnurseries\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\tnurseries\"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"\xe6\x01\n\x14UpdateNurseryRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x05 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x06 \x01(\tR\x08password\x12;\n\x0bupdate_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"V\n\x15UpdateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xc0\x03\n\x0eNurseryService\x12\x7f\n\x16GetNurseryByGuardianId\x12\x31.where_child_bus.v1.GetNurseryByGuardianIdRequest\x1a\x32.where_child_bus.v1.GetNurseryByGuardianIdResponse\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponse\x12\x64\n\rUpdateNursery\x12(.where_child_bus.v1.UpdateNurseryRequest\x1a).where_child_bus.v1.UpdateNurseryResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,18 +24,22 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014NurseryProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATENURSERYREQUEST']._serialized_start=127 - _globals['_CREATENURSERYREQUEST']._serialized_end=280 - _globals['_CREATENURSERYRESPONSE']._serialized_start=282 - _globals['_CREATENURSERYRESPONSE']._serialized_end=368 - _globals['_NURSERYLOGINREQUEST']._serialized_start=370 - _globals['_NURSERYLOGINREQUEST']._serialized_end=441 - _globals['_NURSERYLOGINRESPONSE']._serialized_start=443 - _globals['_NURSERYLOGINRESPONSE']._serialized_end=554 - _globals['_UPDATENURSERYREQUEST']._serialized_start=557 - _globals['_UPDATENURSERYREQUEST']._serialized_end=787 - _globals['_UPDATENURSERYRESPONSE']._serialized_start=789 - _globals['_UPDATENURSERYRESPONSE']._serialized_end=875 - _globals['_NURSERYSERVICE']._serialized_start=878 - _globals['_NURSERYSERVICE']._serialized_end=1197 + _globals['_GETNURSERYBYGUARDIANIDREQUEST']._serialized_start=126 + _globals['_GETNURSERYBYGUARDIANIDREQUEST']._serialized_end=190 + _globals['_GETNURSERYBYGUARDIANIDRESPONSE']._serialized_start=192 + _globals['_GETNURSERYBYGUARDIANIDRESPONSE']._serialized_end=291 + _globals['_CREATENURSERYREQUEST']._serialized_start=294 + _globals['_CREATENURSERYREQUEST']._serialized_end=447 + _globals['_CREATENURSERYRESPONSE']._serialized_start=449 + _globals['_CREATENURSERYRESPONSE']._serialized_end=535 + _globals['_NURSERYLOGINREQUEST']._serialized_start=537 + _globals['_NURSERYLOGINREQUEST']._serialized_end=608 + _globals['_NURSERYLOGINRESPONSE']._serialized_start=610 + _globals['_NURSERYLOGINRESPONSE']._serialized_end=721 + _globals['_UPDATENURSERYREQUEST']._serialized_start=724 + _globals['_UPDATENURSERYREQUEST']._serialized_end=954 + _globals['_UPDATENURSERYRESPONSE']._serialized_start=956 + _globals['_UPDATENURSERYRESPONSE']._serialized_end=1042 + _globals['_NURSERYSERVICE']._serialized_start=1045 + _globals['_NURSERYSERVICE']._serialized_end=1493 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi index 8cff8e93..808c9f67 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi @@ -6,6 +6,18 @@ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Opti DESCRIPTOR: _descriptor.FileDescriptor +class GetNurseryByGuardianIdRequest(_message.Message): + __slots__ = ("guardian_id",) + GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] + guardian_id: str + def __init__(self, guardian_id: _Optional[str] = ...) -> None: ... + +class GetNurseryByGuardianIdResponse(_message.Message): + __slots__ = ("nurseries",) + NURSERIES_FIELD_NUMBER: _ClassVar[int] + nurseries: _resources_pb2.NurseryResponse + def __init__(self, nurseries: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... + class CreateNurseryRequest(_message.Message): __slots__ = ("email", "password", "name", "phone_number", "address") EMAIL_FIELD_NUMBER: _ClassVar[int] diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py index df523dce..642aff51 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py @@ -14,6 +14,11 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.GetNurseryByGuardianId = channel.unary_unary( + '/where_child_bus.v1.NurseryService/GetNurseryByGuardianId', + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.FromString, + ) self.CreateNursery = channel.unary_unary( '/where_child_bus.v1.NurseryService/CreateNursery', request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.SerializeToString, @@ -34,6 +39,12 @@ def __init__(self, channel): class NurseryServiceServicer(object): """Missing associated documentation comment in .proto file.""" + def GetNurseryByGuardianId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def CreateNursery(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -55,6 +66,11 @@ def UpdateNursery(self, request, context): def add_NurseryServiceServicer_to_server(servicer, server): rpc_method_handlers = { + 'GetNurseryByGuardianId': grpc.unary_unary_rpc_method_handler( + servicer.GetNurseryByGuardianId, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.SerializeToString, + ), 'CreateNursery': grpc.unary_unary_rpc_method_handler( servicer.CreateNursery, request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.FromString, @@ -80,6 +96,23 @@ def add_NurseryServiceServicer_to_server(servicer, server): class NurseryService(object): """Missing associated documentation comment in .proto file.""" + @staticmethod + def GetNurseryByGuardianId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/GetNurseryByGuardianId', + where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.SerializeToString, + where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def CreateNursery(request, target, diff --git a/proto/where_child_bus/v1/nursery.proto b/proto/where_child_bus/v1/nursery.proto index ad364ca3..0f8b3250 100644 --- a/proto/where_child_bus/v1/nursery.proto +++ b/proto/where_child_bus/v1/nursery.proto @@ -6,11 +6,20 @@ import "where_child_bus/v1/resources.proto"; import "google/protobuf/field_mask.proto"; service NurseryService { + rpc GetNurseryByGuardianId(GetNurseryByGuardianIdRequest) returns (GetNurseryByGuardianIdResponse); rpc CreateNursery(CreateNurseryRequest) returns (CreateNurseryResponse); rpc NurseryLogin(NurseryLoginRequest) returns (NurseryLoginResponse); rpc UpdateNursery(UpdateNurseryRequest) returns (UpdateNurseryResponse); } +message GetNurseryByGuardianIdRequest { + string guardian_id = 1; +} + +message GetNurseryByGuardianIdResponse { + NurseryResponse nurseries = 1; +} + message CreateNurseryRequest { string email = 1; string password = 2; From 2cb1fb03c8e9bd3a065d8f7f759c362611a7820a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 20 Feb 2024 23:07:25 +0900 Subject: [PATCH 593/771] =?UTF-8?q?feat:=20=E5=8B=95=E7=94=BB=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=83=AA=E3=83=BC=E3=83=A0API=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 192 ++++++++++++++++++++---------------- 1 file changed, 107 insertions(+), 85 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 79e41f71..d8fca71c 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -4,7 +4,6 @@ import ( "errors" "fmt" "io" - "log" "time" "github.com/google/uuid" @@ -16,9 +15,10 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" - boardingrecordRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childbusassociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" @@ -321,13 +321,30 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* // 更新の実行 _, err = update.Save(ctx) + if err != nil { i.logger.Error("failed to update bus", "error", err) return nil, err } + updatedBus, err := tx.Bus.Query().Where(busRepo.IDEQ(busID)). + WithNursery(). + Only(ctx) + + if err != nil { + i.logger.Error("failed to update bus", "error", err) + return nil, err + } + + // TODO: もう少し簡潔に + _, err = checkAndFixBusStationCoordinates(*i.logger, ctx, updatedBus) + if err != nil { + i.logger.Error("failed to check and fix bus station coordinates", "error", err) + return nil, err + } + // 更新されたバスを取得 - updatedBus, err := tx.Bus.Query().Where(bus.IDEQ(busID)). + updatedBus, err = tx.Bus.Query().Where(busRepo.ID(busID)). WithNursery(). Only(ctx) if err != nil { @@ -419,7 +436,6 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e go func() { for { in, err := stream.Recv() - if err == io.EOF { // ストリームの終了 break @@ -457,103 +473,109 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e continue } - var pbChildren []*pb.Child - busUUID := uuid.MustParse(busID) - for _, childId := range resp.ChildIds { - childUUID := uuid.MustParse(childId) - // まず既存のレコードを検索 - exists, err := i.entClient.BoardingRecord.Query(). - Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(uuid.MustParse(childId)))). - Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(uuid.MustParse(busID)))). - Exist(context.Background()) + // トランザクションの開始 + tx, err := i.entClient.Tx(context.Background()) + if err != nil { + return err + } - if err != nil { - // エラーハンドリング - log.Printf("Failed to query existing boarding record: %v", err) - return err - } + // トランザクション内での操作 + err = i.processDetectedChildren(tx, stream, resp, busID, vehicleEvent) // stream 引数を追加 + if err != nil { + tx.Rollback() + return err + } - // 既存のレコードがない場合にのみ新しいレコードを作成 - if !exists { - _, err = i.entClient.BoardingRecord.Create(). - SetChildID(childUUID). - SetBusID(busUUID). - SetTimestamp(time.Now()). - Save(context.Background()) - if err != nil { - // レコード作成時のエラーハンドリング - i.logger.Error("Failed to create new boarding record: %v", err) - return err - } - // レコード作成成功 - } + // トランザクションのコミット + if err := tx.Commit(); err != nil { + return err + } + } - boardingrecord, err := i.entClient.BoardingRecord.Query(). - Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). - Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(busUUID))). - Only(context.Background()) + return nil +} +// processDetectedChildren は検出された子供たちを処理するためのヘルパー関数です。 +func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_StreamBusVideoServer, resp *mlv1.PredResponse, busID string, vehicleEvent pb.VehicleEvent) error { + var pbChildren []*pb.Child + busUUID := uuid.MustParse(busID) + for _, childId := range resp.ChildIds { + childUUID := uuid.MustParse(childId) + + // 既存のレコードを検索 + exists, err := tx.BoardingRecord.Query(). + Where(boardingrecord.HasChildWith(child.IDEQ(childUUID))). + Where(boardingrecord.HasBusWith(bus.IDEQ(busUUID))). + Exist(context.Background()) + if err != nil { + return err + } + + if !exists { + _, err = tx.BoardingRecord.Create(). + SetChildID(childUUID). + SetBusID(busUUID). + SetIsBoarding(false). + SetTimestamp(time.Now()). + Save(context.Background()) if err != nil { - i.logger.Error("Failed to get boarding record: %v", err) return err } + } - switch vehicleEvent { - case pb.VehicleEvent_VEHICLE_EVENT_GET_ON: - if boardingrecord.Unwrap().IsBoarding { - // 乗車済みの場合は次のループに進む - continue - } - // 乗車時の検出の場合 - _, err = i.entClient.BoardingRecord.Update(). - Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). // 乗車レコードを更新 - Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(busUUID))). // 乗車レコードを更新 - SetIsBoarding(true). // 乗車フラグを立てる - SetTimestamp(time.Now()). // 乗車時刻を記録 - Save(context.Background()) - case pb.VehicleEvent_VEHICLE_EVENT_GET_OFF: - if !boardingrecord.Unwrap().IsBoarding { - // 未乗車の場合は次のループに進む - continue - } - // 降車時の検出の場合 - _, err = i.entClient.BoardingRecord.Update(). - Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). // 降車レコードを更新 - Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(busUUID))). // 降車レコードを更新 - SetIsBoarding(false). // 降車フラグを立てる - SetTimestamp(time.Now()). // 降車時刻を記録 - Save(context.Background()) - default: - return fmt.Errorf("invalid video type: %v", vehicleEvent) - } + boardingrecord, err := tx.BoardingRecord.Query(). + Where(boardingrecord.HasChildWith(child.IDEQ(childUUID))). + Where(boardingrecord.HasBusWith(bus.IDEQ(busUUID))). + Only(context.Background()) + if err != nil { + return err + } - if err != nil { - // レコード更新時のエラーハンドリング - i.logger.Error("Failed to update boarding record: %v", err) - return err + // 乗車または降車の処理 + switch vehicleEvent { + case pb.VehicleEvent_VEHICLE_EVENT_GET_ON: + if boardingrecord.IsBoarding { + continue } - // レコード更新成功 - - // 更新された子供を取得 - child, err := i.entClient.Child.Query(). - Where(childRepo.IDEQ(childUUID)). - WithGuardian(). - All(context.Background()) - if err != nil { - i.logger.Error("Failed to get child: %v", err) - return err + _, err = tx.BoardingRecord.UpdateOneID(boardingrecord.ID). + SetIsBoarding(true). + SetTimestamp(time.Now()). + Save(context.Background()) + case pb.VehicleEvent_VEHICLE_EVENT_GET_OFF: + if !boardingrecord.IsBoarding { + continue } - pbChildren = append(pbChildren, utils.ToPbChild(child[0])) + _, err = tx.BoardingRecord.UpdateOneID(boardingrecord.ID). + SetIsBoarding(false). + SetTimestamp(time.Now()). + Save(context.Background()) + default: + return fmt.Errorf("invalid vehicle event: %v", vehicleEvent) } - // 元のクライアントにレスポンスを返す - err = stream.SendMsg(&pb.StreamBusVideoResponse{ - IsDetected: resp.IsDetected, - Children: pbChildren, // ChildIDsをChildrenオブジェクトに変換する必要がある - }) if err != nil { return err } + + // 子供の情報を取得してレスポンスに追加 + child, err := tx.Child.Query(). + Where(child.IDEQ(childUUID)). + WithGuardian(). + Only(context.Background()) + if err != nil { + return err + } + pbChildren = append(pbChildren, utils.ToPbChild(child)) } + + // 元のクライアントにレスポンスを返す + err := stream.SendMsg(&pb.StreamBusVideoResponse{ + IsDetected: resp.IsDetected, + Children: pbChildren, + }) + if err != nil { + return err + } + return nil } From c5adcc2cba8fcbb85ee6b3dda51e8f988b57f5a3 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 20 Feb 2024 23:07:39 +0900 Subject: [PATCH 594/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E7=8A=B6=E6=85=8B=E5=A4=89=E6=8F=9Butil=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/utils/utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index ad82c1f2..ccb93885 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -101,8 +101,10 @@ func convertStatusToPbStatus(status bus.Status) pb.BusStatus { return pb.BusStatus_BUS_STATUS_STOPPED case bus.StatusStopped: return pb.BusStatus_BUS_STATUS_STOPPED + case bus.StatusMaintenance: + return pb.BusStatus_BUS_STATUS_MAINTENANCE default: - return pb.BusStatus_BUS_STATUS_STOPPED + return pb.BusStatus_BUS_STATUS_UNSPECIFIED } } From 3a8a83c5c430105942885f79963512eeeecb7a9a Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Tue, 20 Feb 2024 23:11:06 +0900 Subject: [PATCH 595/771] =?UTF-8?q?fix:=20Rollback=E3=81=AE=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index d8fca71c..64b95307 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -482,7 +482,7 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e // トランザクション内での操作 err = i.processDetectedChildren(tx, stream, resp, busID, vehicleEvent) // stream 引数を追加 if err != nil { - tx.Rollback() + utils.RollbackTx(tx, i.logger) return err } From 7cd3d19ec6e5d53928b4e26f3d5e8a940ec91aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=82=8F=E3=81=8D=E3=82=93?= <93261102+KinjiKawaguchi@users.noreply.github.com> Date: Wed, 21 Feb 2024 01:02:15 +0900 Subject: [PATCH 596/771] =?UTF-8?q?feat:=20=E7=B7=AF=E5=BA=A6=E7=B5=8C?= =?UTF-8?q?=E5=BA=A6=E3=81=8C=E6=9C=AA=E7=99=BB=E9=8C=B2=E3=81=AE=E5=81=9C?= =?UTF-8?q?=E7=95=99=E6=89=80=E3=81=A8=E3=81=9D=E3=81=AE=E4=BF=9D=E8=AD=B7?= =?UTF-8?q?=E8=80=85=E3=82=92=E5=8F=96=E5=BE=97=E3=81=99=E3=82=8BAPI?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85=20(#142)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/interfaces/station.go | 5 + .../go/where_child_bus/v1/station.pb.go | 272 ++++++++++++++---- .../go/where_child_bus/v1/station_grpc.pb.go | 37 +++ backend/usecases/station/station.go | 43 ++- .../where_child_bus/v1/station.pb.dart | 102 +++++++ .../where_child_bus/v1/station.pbgrpc.dart | 20 ++ .../where_child_bus/v1/station.pbjson.dart | 28 ++ .../where_child_bus/v1/station_pb2.py | 18 +- .../where_child_bus/v1/station_pb2.pyi | 14 + .../where_child_bus/v1/station_pb2_grpc.py | 33 +++ proto/where_child_bus/v1/station.proto | 12 +- 11 files changed, 514 insertions(+), 70 deletions(-) diff --git a/backend/interfaces/station.go b/backend/interfaces/station.go index 01cfc740..2428300d 100644 --- a/backend/interfaces/station.go +++ b/backend/interfaces/station.go @@ -15,6 +15,11 @@ func NewStationServiceServer(interactor *station.Interactor) pb.StationServiceSe return &stationServiceServer{interactor} } +// GetUnregisteredStationList implements where_child_busv1.StationServiceServer. +func (s *stationServiceServer) GetUnregisteredStationList(ctx context.Context, req *pb.GetUnregisteredStationListRequest) (*pb.GetUnregisteredStationListResponse, error) { + return s.interactor.GetUnregisteredStationList(ctx, req) +} + // UpdateStation implements where_child_busv1.StationServiceServer. func (s *stationServiceServer) UpdateStation(ctx context.Context, req *pb.UpdateStationRequest) (*pb.UpdateStationResponse, error) { return s.interactor.UpdateStation(ctx, req) diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index e787950b..4928cb73 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -249,6 +249,108 @@ func (x *GetStationListByBusIdResponse) GetPhotos() []*ChildPhoto { return nil } +type GetUnregisteredStationListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` +} + +func (x *GetUnregisteredStationListRequest) Reset() { + *x = GetUnregisteredStationListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_station_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUnregisteredStationListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUnregisteredStationListRequest) ProtoMessage() {} + +func (x *GetUnregisteredStationListRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_station_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUnregisteredStationListRequest.ProtoReflect.Descriptor instead. +func (*GetUnregisteredStationListRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{4} +} + +func (x *GetUnregisteredStationListRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +type GetUnregisteredStationListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stations []*Station `protobuf:"bytes,1,rep,name=stations,proto3" json:"stations,omitempty"` + Guardians []*GuardianResponse `protobuf:"bytes,2,rep,name=guardians,proto3" json:"guardians,omitempty"` +} + +func (x *GetUnregisteredStationListResponse) Reset() { + *x = GetUnregisteredStationListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_station_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUnregisteredStationListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUnregisteredStationListResponse) ProtoMessage() {} + +func (x *GetUnregisteredStationListResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_station_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUnregisteredStationListResponse.ProtoReflect.Descriptor instead. +func (*GetUnregisteredStationListResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{5} +} + +func (x *GetUnregisteredStationListResponse) GetStations() []*Station { + if x != nil { + return x.Stations + } + return nil +} + +func (x *GetUnregisteredStationListResponse) GetGuardians() []*GuardianResponse { + if x != nil { + return x.Guardians + } + return nil +} + type UpdateStationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -263,7 +365,7 @@ type UpdateStationRequest struct { func (x *UpdateStationRequest) Reset() { *x = UpdateStationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_station_proto_msgTypes[4] + mi := &file_where_child_bus_v1_station_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -276,7 +378,7 @@ func (x *UpdateStationRequest) String() string { func (*UpdateStationRequest) ProtoMessage() {} func (x *UpdateStationRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_station_proto_msgTypes[4] + mi := &file_where_child_bus_v1_station_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -289,7 +391,7 @@ func (x *UpdateStationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateStationRequest.ProtoReflect.Descriptor instead. func (*UpdateStationRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{4} + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{6} } func (x *UpdateStationRequest) GetId() string { @@ -331,7 +433,7 @@ type UpdateStationResponse struct { func (x *UpdateStationResponse) Reset() { *x = UpdateStationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_station_proto_msgTypes[5] + mi := &file_where_child_bus_v1_station_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -344,7 +446,7 @@ func (x *UpdateStationResponse) String() string { func (*UpdateStationResponse) ProtoMessage() {} func (x *UpdateStationResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_station_proto_msgTypes[5] + mi := &file_where_child_bus_v1_station_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -357,7 +459,7 @@ func (x *UpdateStationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateStationResponse.ProtoReflect.Descriptor instead. func (*UpdateStationResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{5} + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{7} } func (x *UpdateStationResponse) GetStation() *Station { @@ -412,7 +514,21 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x9d, 0x01, + 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x3a, 0x0a, + 0x21, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x22, 0x47, 0x65, + 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x37, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, @@ -427,7 +543,7 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x97, 0x03, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xa5, 0x04, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, @@ -447,29 +563,37 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, - 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, - 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, - 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, - 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, + 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, + 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, + 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -484,39 +608,45 @@ func file_where_child_bus_v1_station_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_station_proto_rawDescData } -var file_where_child_bus_v1_station_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_where_child_bus_v1_station_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_where_child_bus_v1_station_proto_goTypes = []interface{}{ (*UpdateStationLocationByGuardianIdRequest)(nil), // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdRequest (*UpdateStationLocationByGuardianIdResponse)(nil), // 1: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse (*GetStationListByBusIdRequest)(nil), // 2: where_child_bus.v1.GetStationListByBusIdRequest (*GetStationListByBusIdResponse)(nil), // 3: where_child_bus.v1.GetStationListByBusIdResponse - (*UpdateStationRequest)(nil), // 4: where_child_bus.v1.UpdateStationRequest - (*UpdateStationResponse)(nil), // 5: where_child_bus.v1.UpdateStationResponse - (*Station)(nil), // 6: where_child_bus.v1.Station - (*GuardianResponse)(nil), // 7: where_child_bus.v1.GuardianResponse - (*Child)(nil), // 8: where_child_bus.v1.Child - (*ChildPhoto)(nil), // 9: where_child_bus.v1.ChildPhoto - (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask + (*GetUnregisteredStationListRequest)(nil), // 4: where_child_bus.v1.GetUnregisteredStationListRequest + (*GetUnregisteredStationListResponse)(nil), // 5: where_child_bus.v1.GetUnregisteredStationListResponse + (*UpdateStationRequest)(nil), // 6: where_child_bus.v1.UpdateStationRequest + (*UpdateStationResponse)(nil), // 7: where_child_bus.v1.UpdateStationResponse + (*Station)(nil), // 8: where_child_bus.v1.Station + (*GuardianResponse)(nil), // 9: where_child_bus.v1.GuardianResponse + (*Child)(nil), // 10: where_child_bus.v1.Child + (*ChildPhoto)(nil), // 11: where_child_bus.v1.ChildPhoto + (*fieldmaskpb.FieldMask)(nil), // 12: google.protobuf.FieldMask } var file_where_child_bus_v1_station_proto_depIdxs = []int32{ - 6, // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse.station:type_name -> where_child_bus.v1.Station - 6, // 1: where_child_bus.v1.GetStationListByBusIdResponse.stations:type_name -> where_child_bus.v1.Station - 7, // 2: where_child_bus.v1.GetStationListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse - 8, // 3: where_child_bus.v1.GetStationListByBusIdResponse.children:type_name -> where_child_bus.v1.Child - 9, // 4: where_child_bus.v1.GetStationListByBusIdResponse.photos:type_name -> where_child_bus.v1.ChildPhoto - 10, // 5: where_child_bus.v1.UpdateStationRequest.update_mask:type_name -> google.protobuf.FieldMask - 6, // 6: where_child_bus.v1.UpdateStationResponse.station:type_name -> where_child_bus.v1.Station - 0, // 7: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:input_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdRequest - 2, // 8: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest - 4, // 9: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest - 1, // 10: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:output_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdResponse - 3, // 11: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse - 5, // 12: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse - 10, // [10:13] is the sub-list for method output_type - 7, // [7:10] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 8, // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse.station:type_name -> where_child_bus.v1.Station + 8, // 1: where_child_bus.v1.GetStationListByBusIdResponse.stations:type_name -> where_child_bus.v1.Station + 9, // 2: where_child_bus.v1.GetStationListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 10, // 3: where_child_bus.v1.GetStationListByBusIdResponse.children:type_name -> where_child_bus.v1.Child + 11, // 4: where_child_bus.v1.GetStationListByBusIdResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 8, // 5: where_child_bus.v1.GetUnregisteredStationListResponse.stations:type_name -> where_child_bus.v1.Station + 9, // 6: where_child_bus.v1.GetUnregisteredStationListResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 12, // 7: where_child_bus.v1.UpdateStationRequest.update_mask:type_name -> google.protobuf.FieldMask + 8, // 8: where_child_bus.v1.UpdateStationResponse.station:type_name -> where_child_bus.v1.Station + 0, // 9: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:input_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdRequest + 2, // 10: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest + 4, // 11: where_child_bus.v1.StationService.GetUnregisteredStationList:input_type -> where_child_bus.v1.GetUnregisteredStationListRequest + 6, // 12: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest + 1, // 13: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:output_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdResponse + 3, // 14: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse + 5, // 15: where_child_bus.v1.StationService.GetUnregisteredStationList:output_type -> where_child_bus.v1.GetUnregisteredStationListResponse + 7, // 16: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse + 13, // [13:17] is the sub-list for method output_type + 9, // [9:13] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_where_child_bus_v1_station_proto_init() } @@ -575,7 +705,7 @@ func file_where_child_bus_v1_station_proto_init() { } } file_where_child_bus_v1_station_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateStationRequest); i { + switch v := v.(*GetUnregisteredStationListRequest); i { case 0: return &v.state case 1: @@ -587,6 +717,30 @@ func file_where_child_bus_v1_station_proto_init() { } } file_where_child_bus_v1_station_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUnregisteredStationListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_station_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateStationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_station_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateStationResponse); i { case 0: return &v.state @@ -605,7 +759,7 @@ func file_where_child_bus_v1_station_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_station_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go index 4898f99b..7ac2fac7 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( StationService_UpdateStationLocationByGuardianId_FullMethodName = "/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId" StationService_GetStationListByBusId_FullMethodName = "/where_child_bus.v1.StationService/GetStationListByBusId" + StationService_GetUnregisteredStationList_FullMethodName = "/where_child_bus.v1.StationService/GetUnregisteredStationList" StationService_UpdateStation_FullMethodName = "/where_child_bus.v1.StationService/UpdateStation" ) @@ -30,6 +31,7 @@ const ( type StationServiceClient interface { UpdateStationLocationByGuardianId(ctx context.Context, in *UpdateStationLocationByGuardianIdRequest, opts ...grpc.CallOption) (*UpdateStationLocationByGuardianIdResponse, error) GetStationListByBusId(ctx context.Context, in *GetStationListByBusIdRequest, opts ...grpc.CallOption) (*GetStationListByBusIdResponse, error) + GetUnregisteredStationList(ctx context.Context, in *GetUnregisteredStationListRequest, opts ...grpc.CallOption) (*GetUnregisteredStationListResponse, error) UpdateStation(ctx context.Context, in *UpdateStationRequest, opts ...grpc.CallOption) (*UpdateStationResponse, error) } @@ -59,6 +61,15 @@ func (c *stationServiceClient) GetStationListByBusId(ctx context.Context, in *Ge return out, nil } +func (c *stationServiceClient) GetUnregisteredStationList(ctx context.Context, in *GetUnregisteredStationListRequest, opts ...grpc.CallOption) (*GetUnregisteredStationListResponse, error) { + out := new(GetUnregisteredStationListResponse) + err := c.cc.Invoke(ctx, StationService_GetUnregisteredStationList_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *stationServiceClient) UpdateStation(ctx context.Context, in *UpdateStationRequest, opts ...grpc.CallOption) (*UpdateStationResponse, error) { out := new(UpdateStationResponse) err := c.cc.Invoke(ctx, StationService_UpdateStation_FullMethodName, in, out, opts...) @@ -74,6 +85,7 @@ func (c *stationServiceClient) UpdateStation(ctx context.Context, in *UpdateStat type StationServiceServer interface { UpdateStationLocationByGuardianId(context.Context, *UpdateStationLocationByGuardianIdRequest) (*UpdateStationLocationByGuardianIdResponse, error) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) + GetUnregisteredStationList(context.Context, *GetUnregisteredStationListRequest) (*GetUnregisteredStationListResponse, error) UpdateStation(context.Context, *UpdateStationRequest) (*UpdateStationResponse, error) } @@ -87,6 +99,9 @@ func (UnimplementedStationServiceServer) UpdateStationLocationByGuardianId(conte func (UnimplementedStationServiceServer) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStationListByBusId not implemented") } +func (UnimplementedStationServiceServer) GetUnregisteredStationList(context.Context, *GetUnregisteredStationListRequest) (*GetUnregisteredStationListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUnregisteredStationList not implemented") +} func (UnimplementedStationServiceServer) UpdateStation(context.Context, *UpdateStationRequest) (*UpdateStationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateStation not implemented") } @@ -138,6 +153,24 @@ func _StationService_GetStationListByBusId_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } +func _StationService_GetUnregisteredStationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUnregisteredStationListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StationServiceServer).GetUnregisteredStationList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StationService_GetUnregisteredStationList_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StationServiceServer).GetUnregisteredStationList(ctx, req.(*GetUnregisteredStationListRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _StationService_UpdateStation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateStationRequest) if err := dec(in); err != nil { @@ -171,6 +204,10 @@ var StationService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetStationListByBusId", Handler: _StationService_GetStationListByBusId_Handler, }, + { + MethodName: "GetUnregisteredStationList", + Handler: _StationService_GetUnregisteredStationList_Handler, + }, { MethodName: "UpdateStation", Handler: _StationService_UpdateStation_Handler, diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index cc406b77..fd7ac791 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -8,7 +8,6 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" stationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" @@ -107,7 +106,7 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq defer utils.RollbackTx(tx, i.logger) // 更新処理のビルダー - update := tx.Station.Update().Where(station.IDEQ(stationID)) + update := tx.Station.Update().Where(stationRepo.IDEQ(stationID)) for _, path := range req.UpdateMask.Paths { switch path { case "latitude": @@ -126,7 +125,7 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq // 更新されたエンティティの取得 updateStation, err := tx.Station.Query(). - Where(station.IDEQ(stationID)). + Where(stationRepo.IDEQ(stationID)). WithGuardian(). Only(ctx) if err != nil { @@ -225,6 +224,44 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati }, nil } +func (i Interactor) GetUnregisteredStationList(ctx context.Context, req *pb.GetUnregisteredStationListRequest) (*pb.GetUnregisteredStationListResponse, error) { + busID, err := uuid.Parse(req.BusId) + if err != nil { + i.logger.Error("failed to parse bus ID", "error", err) + return nil, err + } + + stations, err := i.entClient.Station.Query(). + Where(stationRepo.HasBusWith(busRepo.IDEQ(busID))). + Where(stationRepo.Latitude(0)). + Where(stationRepo.Longitude(0)). + WithGuardian(). + All(ctx) + + if err != nil { + i.logger.Error("failed to get unregistered stations", "error", err) + return nil, err + } + + var pbStations []*pb.Station + var pbGuardians []*pb.GuardianResponse + for _, station := range stations { + morningNextStationID, eveningNextStationID, err := getNextStationIDs(*i.logger, ctx, station) + if err != nil { + i.logger.Error("failed to get next station IDs", "error", err) + return nil, err + } + + pbStations = append(pbStations, utils.ToPbStation(station, morningNextStationID, eveningNextStationID)) + pbGuardians = append(pbGuardians, utils.ToPbGuardianResponse(station.Edges.Guardian)) + } + + return &pb.GetUnregisteredStationListResponse{ + Stations: pbStations, + Guardians: pbGuardians, + }, nil +} + func getNextStationIDs(logger slog.Logger, ctx context.Context, station *ent.Station) (morningNextStationID, eveningNextStationID string, err error) { morningNextStation, err := station.QueryMorningNextStation().Only(ctx) if err != nil && !ent.IsNotFound(err) { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart index ca5b25ef..86f7ae91 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -264,6 +264,108 @@ class GetStationListByBusIdResponse extends $pb.GeneratedMessage { $core.List<$8.ChildPhoto> get photos => $_getList(3); } +class GetUnregisteredStationListRequest extends $pb.GeneratedMessage { + factory GetUnregisteredStationListRequest({ + $core.String? busId, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + return $result; + } + GetUnregisteredStationListRequest._() : super(); + factory GetUnregisteredStationListRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetUnregisteredStationListRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetUnregisteredStationListRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetUnregisteredStationListRequest clone() => GetUnregisteredStationListRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetUnregisteredStationListRequest copyWith(void Function(GetUnregisteredStationListRequest) updates) => super.copyWith((message) => updates(message as GetUnregisteredStationListRequest)) as GetUnregisteredStationListRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetUnregisteredStationListRequest create() => GetUnregisteredStationListRequest._(); + GetUnregisteredStationListRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetUnregisteredStationListRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetUnregisteredStationListRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); +} + +class GetUnregisteredStationListResponse extends $pb.GeneratedMessage { + factory GetUnregisteredStationListResponse({ + $core.Iterable<$8.Station>? stations, + $core.Iterable<$8.GuardianResponse>? guardians, + }) { + final $result = create(); + if (stations != null) { + $result.stations.addAll(stations); + } + if (guardians != null) { + $result.guardians.addAll(guardians); + } + return $result; + } + GetUnregisteredStationListResponse._() : super(); + factory GetUnregisteredStationListResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetUnregisteredStationListResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetUnregisteredStationListResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc<$8.Station>(1, _omitFieldNames ? '' : 'stations', $pb.PbFieldType.PM, subBuilder: $8.Station.create) + ..pc<$8.GuardianResponse>(2, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetUnregisteredStationListResponse clone() => GetUnregisteredStationListResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetUnregisteredStationListResponse copyWith(void Function(GetUnregisteredStationListResponse) updates) => super.copyWith((message) => updates(message as GetUnregisteredStationListResponse)) as GetUnregisteredStationListResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetUnregisteredStationListResponse create() => GetUnregisteredStationListResponse._(); + GetUnregisteredStationListResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetUnregisteredStationListResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetUnregisteredStationListResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$8.Station> get stations => $_getList(0); + + @$pb.TagNumber(2) + $core.List<$8.GuardianResponse> get guardians => $_getList(1); +} + class UpdateStationRequest extends $pb.GeneratedMessage { factory UpdateStationRequest({ $core.String? id, diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart index cdbbe30e..3c1624b9 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart @@ -29,6 +29,10 @@ class StationServiceClient extends $grpc.Client { '/where_child_bus.v1.StationService/GetStationListByBusId', ($6.GetStationListByBusIdRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $6.GetStationListByBusIdResponse.fromBuffer(value)); + static final _$getUnregisteredStationList = $grpc.ClientMethod<$6.GetUnregisteredStationListRequest, $6.GetUnregisteredStationListResponse>( + '/where_child_bus.v1.StationService/GetUnregisteredStationList', + ($6.GetUnregisteredStationListRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.GetUnregisteredStationListResponse.fromBuffer(value)); static final _$updateStation = $grpc.ClientMethod<$6.UpdateStationRequest, $6.UpdateStationResponse>( '/where_child_bus.v1.StationService/UpdateStation', ($6.UpdateStationRequest value) => value.writeToBuffer(), @@ -48,6 +52,10 @@ class StationServiceClient extends $grpc.Client { return $createUnaryCall(_$getStationListByBusId, request, options: options); } + $grpc.ResponseFuture<$6.GetUnregisteredStationListResponse> getUnregisteredStationList($6.GetUnregisteredStationListRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getUnregisteredStationList, request, options: options); + } + $grpc.ResponseFuture<$6.UpdateStationResponse> updateStation($6.UpdateStationRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$updateStation, request, options: options); } @@ -72,6 +80,13 @@ abstract class StationServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $6.GetStationListByBusIdRequest.fromBuffer(value), ($6.GetStationListByBusIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$6.GetUnregisteredStationListRequest, $6.GetUnregisteredStationListResponse>( + 'GetUnregisteredStationList', + getUnregisteredStationList_Pre, + false, + false, + ($core.List<$core.int> value) => $6.GetUnregisteredStationListRequest.fromBuffer(value), + ($6.GetUnregisteredStationListResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$6.UpdateStationRequest, $6.UpdateStationResponse>( 'UpdateStation', updateStation_Pre, @@ -89,11 +104,16 @@ abstract class StationServiceBase extends $grpc.Service { return getStationListByBusId(call, await request); } + $async.Future<$6.GetUnregisteredStationListResponse> getUnregisteredStationList_Pre($grpc.ServiceCall call, $async.Future<$6.GetUnregisteredStationListRequest> request) async { + return getUnregisteredStationList(call, await request); + } + $async.Future<$6.UpdateStationResponse> updateStation_Pre($grpc.ServiceCall call, $async.Future<$6.UpdateStationRequest> request) async { return updateStation(call, await request); } $async.Future<$6.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId($grpc.ServiceCall call, $6.UpdateStationLocationByGuardianIdRequest request); $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId($grpc.ServiceCall call, $6.GetStationListByBusIdRequest request); + $async.Future<$6.GetUnregisteredStationListResponse> getUnregisteredStationList($grpc.ServiceCall call, $6.GetUnregisteredStationListRequest request); $async.Future<$6.UpdateStationResponse> updateStation($grpc.ServiceCall call, $6.UpdateStationRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart index b27c096b..e3e4c200 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -73,6 +73,34 @@ final $typed_data.Uint8List getStationListByBusIdResponseDescriptor = $convert.b 'VuGAMgAygLMhkud2hlcmVfY2hpbGRfYnVzLnYxLkNoaWxkUghjaGlsZHJlbhI2CgZwaG90b3MY' 'BCADKAsyHi53aGVyZV9jaGlsZF9idXMudjEuQ2hpbGRQaG90b1IGcGhvdG9z'); +@$core.Deprecated('Use getUnregisteredStationListRequestDescriptor instead') +const GetUnregisteredStationListRequest$json = { + '1': 'GetUnregisteredStationListRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + ], +}; + +/// Descriptor for `GetUnregisteredStationListRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getUnregisteredStationListRequestDescriptor = $convert.base64Decode( + 'CiFHZXRVbnJlZ2lzdGVyZWRTdGF0aW9uTGlzdFJlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidX' + 'NJZA=='); + +@$core.Deprecated('Use getUnregisteredStationListResponseDescriptor instead') +const GetUnregisteredStationListResponse$json = { + '1': 'GetUnregisteredStationListResponse', + '2': [ + {'1': 'stations', '3': 1, '4': 3, '5': 11, '6': '.where_child_bus.v1.Station', '10': 'stations'}, + {'1': 'guardians', '3': 2, '4': 3, '5': 11, '6': '.where_child_bus.v1.GuardianResponse', '10': 'guardians'}, + ], +}; + +/// Descriptor for `GetUnregisteredStationListResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getUnregisteredStationListResponseDescriptor = $convert.base64Decode( + 'CiJHZXRVbnJlZ2lzdGVyZWRTdGF0aW9uTGlzdFJlc3BvbnNlEjcKCHN0YXRpb25zGAEgAygLMh' + 'sud2hlcmVfY2hpbGRfYnVzLnYxLlN0YXRpb25SCHN0YXRpb25zEkIKCWd1YXJkaWFucxgCIAMo' + 'CzIkLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhblJlc3BvbnNlUglndWFyZGlhbnM='); + @$core.Deprecated('Use updateStationRequestDescriptor instead') const UpdateStationRequest$json = { '1': 'UpdateStationRequest', diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py index 2ab39e73..938ecf02 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"\x9d\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\x97\x03\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\":\n!GetUnregisteredStationListRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa1\x01\n\"GetUnregisteredStationListResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"\x9d\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\xa5\x04\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x8b\x01\n\x1aGetUnregisteredStationList\x12\x35.where_child_bus.v1.GetUnregisteredStationListRequest\x1a\x36.where_child_bus.v1.GetUnregisteredStationListResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -32,10 +32,14 @@ _globals['_GETSTATIONLISTBYBUSIDREQUEST']._serialized_end=415 _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_start=418 _globals['_GETSTATIONLISTBYBUSIDRESPONSE']._serialized_end=685 - _globals['_UPDATESTATIONREQUEST']._serialized_start=688 - _globals['_UPDATESTATIONREQUEST']._serialized_end=845 - _globals['_UPDATESTATIONRESPONSE']._serialized_start=847 - _globals['_UPDATESTATIONRESPONSE']._serialized_end=925 - _globals['_STATIONSERVICE']._serialized_start=928 - _globals['_STATIONSERVICE']._serialized_end=1335 + _globals['_GETUNREGISTEREDSTATIONLISTREQUEST']._serialized_start=687 + _globals['_GETUNREGISTEREDSTATIONLISTREQUEST']._serialized_end=745 + _globals['_GETUNREGISTEREDSTATIONLISTRESPONSE']._serialized_start=748 + _globals['_GETUNREGISTEREDSTATIONLISTRESPONSE']._serialized_end=909 + _globals['_UPDATESTATIONREQUEST']._serialized_start=912 + _globals['_UPDATESTATIONREQUEST']._serialized_end=1069 + _globals['_UPDATESTATIONRESPONSE']._serialized_start=1071 + _globals['_UPDATESTATIONRESPONSE']._serialized_end=1149 + _globals['_STATIONSERVICE']._serialized_start=1152 + _globals['_STATIONSERVICE']._serialized_end=1701 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi index e1e321c3..4a147d38 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi @@ -41,6 +41,20 @@ class GetStationListByBusIdResponse(_message.Message): photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... +class GetUnregisteredStationListRequest(_message.Message): + __slots__ = ("bus_id",) + BUS_ID_FIELD_NUMBER: _ClassVar[int] + bus_id: str + def __init__(self, bus_id: _Optional[str] = ...) -> None: ... + +class GetUnregisteredStationListResponse(_message.Message): + __slots__ = ("stations", "guardians") + STATIONS_FIELD_NUMBER: _ClassVar[int] + GUARDIANS_FIELD_NUMBER: _ClassVar[int] + stations: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Station] + guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] + def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... + class UpdateStationRequest(_message.Message): __slots__ = ("id", "latitude", "longitude", "update_mask") ID_FIELD_NUMBER: _ClassVar[int] diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py index dceeb8e4..236c8e8d 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py @@ -24,6 +24,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.FromString, ) + self.GetUnregisteredStationList = channel.unary_unary( + '/where_child_bus.v1.StationService/GetUnregisteredStationList', + request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListResponse.FromString, + ) self.UpdateStation = channel.unary_unary( '/where_child_bus.v1.StationService/UpdateStation', request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, @@ -46,6 +51,12 @@ def GetStationListByBusId(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetUnregisteredStationList(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def UpdateStation(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -65,6 +76,11 @@ def add_StationServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.SerializeToString, ), + 'GetUnregisteredStationList': grpc.unary_unary_rpc_method_handler( + servicer.GetUnregisteredStationList, + request_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListResponse.SerializeToString, + ), 'UpdateStation': grpc.unary_unary_rpc_method_handler( servicer.UpdateStation, request_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.FromString, @@ -114,6 +130,23 @@ def GetStationListByBusId(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def GetUnregisteredStationList(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/GetUnregisteredStationList', + where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.SerializeToString, + where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def UpdateStation(request, target, diff --git a/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto index ff84d388..64c6dd4b 100644 --- a/proto/where_child_bus/v1/station.proto +++ b/proto/where_child_bus/v1/station.proto @@ -8,6 +8,7 @@ import "google/protobuf/field_mask.proto"; service StationService { rpc UpdateStationLocationByGuardianId(UpdateStationLocationByGuardianIdRequest) returns (UpdateStationLocationByGuardianIdResponse); rpc GetStationListByBusId(GetStationListByBusIdRequest) returns (GetStationListByBusIdResponse); + rpc GetUnregisteredStationList(GetUnregisteredStationListRequest) returns (GetUnregisteredStationListResponse); rpc UpdateStation(UpdateStationRequest) returns (UpdateStationResponse); } @@ -32,6 +33,15 @@ message GetStationListByBusIdResponse { repeated ChildPhoto photos = 4; } +message GetUnregisteredStationListRequest { + string bus_id = 1; +} + +message GetUnregisteredStationListResponse { + repeated Station stations = 1; + repeated GuardianResponse guardians = 2; +} + message UpdateStationRequest { string id = 1; double latitude = 2; @@ -41,4 +51,4 @@ message UpdateStationRequest { message UpdateStationResponse { Station station = 1; -} \ No newline at end of file +} From 0d42685550df4f8ec3e03f2b0a4e118c69914ffa Mon Sep 17 00:00:00 2001 From: Mizuki Baba <76275131+lovelovetrb@users.noreply.github.com> Date: Wed, 21 Feb 2024 01:19:20 +0900 Subject: [PATCH 597/771] =?UTF-8?q?feat(ml):=20=E9=A1=94=E3=81=8C=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E3=81=95=E3=82=8C=E3=81=9F=E5=A0=B4=E5=90=88GCS?= =?UTF-8?q?=E3=81=AB=E4=BF=9D=E5=AD=98=20(#143)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/pred.py | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index a47f75cc..36ce39ab 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -1,28 +1,31 @@ -import os + import argparse -from dotenv import load_dotenv -import yaml +import os +import time + import torch +import yaml +from dotenv import load_dotenv load_dotenv("secrets/.env") -from face_detect_model.util import ( - load_image_from_binary, - switch_to_bus_type, - load_pickle_to_gcs, - get_default_transforms_for_gray, - logger, +from face_detect_model.DetectFaceAndClip.detectFaceUtil import ( + clip_and_resize_face, + detect_face, + load_cascade, ) from face_detect_model.gcp_util import ( - init_client, get_bucket, + init_client, save_face_image_to_remote, ) from face_detect_model.model.faceDetectModel import FaceDetectModel -from face_detect_model.DetectFaceAndClip.detectFaceUtil import ( - detect_face, - load_cascade, - clip_and_resize_face, +from face_detect_model.util import ( + get_default_transforms_for_gray, + load_image_from_binary, + load_pickle_to_gcs, + logger, + switch_to_bus_type, ) @@ -79,18 +82,17 @@ def convert_to_tensor_from_images(clipped_face_images): def get_clipped_faces_from_images(args, config, save_bucket): all_faces = [] - save_blob_name = f"{args.bus_id}.png" for video in args.video_chunk: image = load_image_from_binary(args, video) - save_face_image_to_remote(image, save_blob_name, save_bucket) - - # TODO: 保存処理を推論後にして保存先をchild_id/timestampにする clipped_faces = detect_face_and_clip_from_image(image, config) - if len(clipped_faces) != 0: - for i in range(len(clipped_faces)): - save_face_image_to_remote( - clipped_faces[i], f"{args.bus_id}_clipped{i}.png", save_bucket - ) + if len(clipped_faces) > 0: + # timestampをファイル名に含めて保存 + now = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + save_face_image_to_remote( + image, + f"{args.nursery_id}/{args.bus_id}/{now}_{switch_to_bus_type(args.bus_type)}.png", + save_bucket, + ) all_faces.extend(clipped_faces) return all_faces From 55d24554dbafd657537353f5189f30dd230c75b7 Mon Sep 17 00:00:00 2001 From: Mizuki Baba <76275131+lovelovetrb@users.noreply.github.com> Date: Wed, 21 Feb 2024 01:20:12 +0900 Subject: [PATCH 598/771] =?UTF-8?q?chore(ml):=20error=20handling=E3=81=AB?= =?UTF-8?q?=E9=96=A2=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=20(#138)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/pyproject.toml | 6 +++- machine_learning/requirements-dev.lock | 2 ++ machine_learning/requirements.lock | 1 + .../machine_learning/v1/error_util.py | 23 ++++++++++++++ .../proto-gen/machine_learning/v1/server.py | 30 ++++++++++++++----- 5 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 machine_learning/src/proto-gen/machine_learning/v1/error_util.py diff --git a/machine_learning/pyproject.toml b/machine_learning/pyproject.toml index 566e52f8..4a09a5c4 100644 --- a/machine_learning/pyproject.toml +++ b/machine_learning/pyproject.toml @@ -14,6 +14,8 @@ dependencies = [ "python-dotenv>=1.0.1", "grpcio>=1.60.1", "grpcio_reflection>=1.60.1", + "grpcio-status>=1.60.1", + "googleapis-common-protos>=1.62.0", ] readme = "README.md" requires-python = ">= 3.8" @@ -27,7 +29,9 @@ build-backend = "hatchling.build" [tool.rye] managed = true -dev-dependencies = [] +dev-dependencies = [ + "watchdog>=4.0.0", +] [tool.hatch.metadata] allow-direct-references = true diff --git a/machine_learning/requirements-dev.lock b/machine_learning/requirements-dev.lock index 7d273106..9b211b21 100644 --- a/machine_learning/requirements-dev.lock +++ b/machine_learning/requirements-dev.lock @@ -21,6 +21,7 @@ google-resumable-media==2.7.0 googleapis-common-protos==1.62.0 grpcio==1.60.1 grpcio-reflection==1.60.1 +grpcio-status==1.60.1 idna==3.6 jinja2==3.1.3 markupsafe==2.1.5 @@ -42,3 +43,4 @@ torchvision==0.17.0 tqdm==4.66.2 typing-extensions==4.9.0 urllib3==2.2.0 +watchdog==4.0.0 diff --git a/machine_learning/requirements.lock b/machine_learning/requirements.lock index 7d273106..63848425 100644 --- a/machine_learning/requirements.lock +++ b/machine_learning/requirements.lock @@ -21,6 +21,7 @@ google-resumable-media==2.7.0 googleapis-common-protos==1.62.0 grpcio==1.60.1 grpcio-reflection==1.60.1 +grpcio-status==1.60.1 idna==3.6 jinja2==3.1.3 markupsafe==2.1.5 diff --git a/machine_learning/src/proto-gen/machine_learning/v1/error_util.py b/machine_learning/src/proto-gen/machine_learning/v1/error_util.py new file mode 100644 index 00000000..5bec4097 --- /dev/null +++ b/machine_learning/src/proto-gen/machine_learning/v1/error_util.py @@ -0,0 +1,23 @@ +from google.protobuf import any_pb2 +from google.rpc import code_pb2 +from google.rpc import error_details_pb2 +from google.rpc import status_pb2 + + +def create_service_error_status(error_message): + detail = any_pb2.Any() + detail.Pack( + error_details_pb2.QuotaFailure( + violations=[ + error_details_pb2.QuotaFailure.Violation( + subject=f"error {error_message}", + description="some error occured. Please check the error message.", + ) + ], + ) + ) + return status_pb2.Status( + code=code_pb2.RESOURCE_EXHAUSTED, + message="some error occured. Please check the error message.", + details=[detail], + ) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 1d54cdea..dd96448a 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -1,10 +1,14 @@ import logging from concurrent import futures from typing import Iterable +import traceback + import grpc +from grpc_status import rpc_status from grpc_reflection.v1alpha import reflection + from generated.machine_learning.v1 import health_check_pb2 from generated.machine_learning.v1 import health_check_pb2_grpc from generated.machine_learning.v1 import machine_learning_pb2 @@ -16,8 +20,7 @@ Train_Args, ) -import logging -from concurrent import futures +from error_util import create_service_error_status from face_detect_model.DetectFaceAndClip.detectFaceAndClip import ( @@ -53,6 +56,7 @@ def __init__(self): def Pred(self, request_iterator: Iterable[bus_pb2.StreamBusVideoRequest], context): for request in request_iterator: + logging.info("Pred Service Start") params = Pred_Args( nursery_id=request.nursery_id, bus_id=request.bus_id, @@ -64,15 +68,20 @@ def Pred(self, request_iterator: Iterable[bus_pb2.StreamBusVideoRequest], contex ) try: child_ids = self.pred_fn(params) - except Exception as e: + except Exception: + e = traceback.format_exc() logging.error(e) + rich_status = create_service_error_status(e) + context.abort_with_status(rpc_status.to_status(rich_status)) child_ids = [] + is_detected = len(child_ids) > 0 yield machine_learning_pb2.PredResponse( is_detected=is_detected, child_ids=child_ids ) def Train(self, request: machine_learning_pb2.TrainRequest, context): + logging.info("Train Service Start") params = Train_Args( nursery_id=request.nursery_id, child_ids=request.child_ids, @@ -84,9 +93,12 @@ def Train(self, request: machine_learning_pb2.TrainRequest, context): try: self.train_fn(params) is_started = True - except Exception as e: - logging.error(e) + except Exception: is_started = False + e = traceback.format_exc() + logging.error(e) + rich_status = create_service_error_status(e) + context.abort_with_status(rpc_status.to_status(rich_status)) return machine_learning_pb2.TrainResponse(is_started=is_started) @@ -95,6 +107,7 @@ def FaceDetectAndClip( request: machine_learning_pb2.FaceDetectAndClipRequest, context, ): + logging.info("FaceDetectAndClip Service Start") params = FaceDetectAndClip_Args( nursery_id=request.nursery_id, child_id=request.child_id, @@ -103,9 +116,12 @@ def FaceDetectAndClip( try: self.detect_face_and_clip_fn(params) is_started = True - except Exception as e: - logging.error(e) + except Exception: is_started = False + e = traceback.format_exc() + logging.error(e) + rich_status = create_service_error_status(e) + context.abort_with_status(rpc_status.to_status(rich_status)) return machine_learning_pb2.FaceDetectAndClipResponse(is_started=is_started) From b1286319fca9a006e2eaa88e61f5789017c1ed81 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 21 Feb 2024 01:20:22 +0900 Subject: [PATCH 599/771] =?UTF-8?q?feat:=E3=83=9E=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=83=93=E3=83=A5=E3=83=BC=E3=81=AEAPI=E9=80=9A=E4=BF=A1?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/v1/guardian.pb.dart | 758 ++++++++++++------ .../where_child_bus_guardian/lib/app.dart | 32 +- .../daily_page/components/has_item_state.dart | 2 +- .../map_page/components/arrival_time.dart | 4 +- .../components/bus_to_bus_stop_time.dart | 4 +- .../map_page/components/map_page_bottom.dart | 132 +++ .../lib/pages/map_page/map_page.dart | 199 +++-- .../pages/stop_bus_page/stop_bus_page.dart | 25 + .../service/get_nursery_by_guardian_id.dart | 12 + .../get_running_bus_by_guardian_id.dart | 12 + .../service/get_station_list_by_bus_id.dart | 12 + .../lib/util/api/bus.dart | 58 ++ .../lib/util/api/nursery.dart | 33 + .../lib/util/api/station.dart | 33 + 14 files changed, 937 insertions(+), 379 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart create mode 100644 frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart create mode 100644 frontend/where_child_bus_guardian/lib/service/get_nursery_by_guardian_id.dart create mode 100644 frontend/where_child_bus_guardian/lib/service/get_running_bus_by_guardian_id.dart create mode 100644 frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart create mode 100644 frontend/where_child_bus_guardian/lib/util/api/bus.dart create mode 100644 frontend/where_child_bus_guardian/lib/util/api/nursery.dart create mode 100644 frontend/where_child_bus_guardian/lib/util/api/station.dart diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 8e2d960d..09c8cc83 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -43,43 +43,57 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { return $result; } CreateGuardianRequest._() : super(); - factory CreateGuardianRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CreateGuardianRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateGuardianRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + factory CreateGuardianRequest.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory CreateGuardianRequest.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'CreateGuardianRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'nurseryCode') ..aOS(2, _omitFieldNames ? '' : 'email') ..aOS(3, _omitFieldNames ? '' : 'password') ..aOS(4, _omitFieldNames ? '' : 'name') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CreateGuardianRequest clone() => CreateGuardianRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CreateGuardianRequest copyWith(void Function(CreateGuardianRequest) updates) => super.copyWith((message) => updates(message as CreateGuardianRequest)) as CreateGuardianRequest; + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateGuardianRequest clone() => + CreateGuardianRequest()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateGuardianRequest copyWith( + void Function(CreateGuardianRequest) updates) => + super.copyWith((message) => updates(message as CreateGuardianRequest)) + as CreateGuardianRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CreateGuardianRequest create() => CreateGuardianRequest._(); CreateGuardianRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static CreateGuardianRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateGuardianRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static CreateGuardianRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get nurseryCode => $_getSZ(0); @$pb.TagNumber(1) - set nurseryCode($core.String v) { $_setString(0, v); } + set nurseryCode($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasNurseryCode() => $_has(0); @$pb.TagNumber(1) @@ -88,7 +102,10 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get email => $_getSZ(1); @$pb.TagNumber(2) - set email($core.String v) { $_setString(1, v); } + set email($core.String v) { + $_setString(1, v); + } + @$pb.TagNumber(2) $core.bool hasEmail() => $_has(1); @$pb.TagNumber(2) @@ -97,7 +114,10 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get password => $_getSZ(2); @$pb.TagNumber(3) - set password($core.String v) { $_setString(2, v); } + set password($core.String v) { + $_setString(2, v); + } + @$pb.TagNumber(3) $core.bool hasPassword() => $_has(2); @$pb.TagNumber(3) @@ -106,7 +126,10 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.String get name => $_getSZ(3); @$pb.TagNumber(4) - set name($core.String v) { $_setString(3, v); } + set name($core.String v) { + $_setString(3, v); + } + @$pb.TagNumber(4) $core.bool hasName() => $_has(3); @$pb.TagNumber(4) @@ -115,7 +138,10 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.String get phoneNumber => $_getSZ(4); @$pb.TagNumber(5) - set phoneNumber($core.String v) { $_setString(4, v); } + set phoneNumber($core.String v) { + $_setString(4, v); + } + @$pb.TagNumber(5) $core.bool hasPhoneNumber() => $_has(4); @$pb.TagNumber(5) @@ -133,39 +159,54 @@ class CreateGuardianResponse extends $pb.GeneratedMessage { return $result; } CreateGuardianResponse._() : super(); - factory CreateGuardianResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CreateGuardianResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateGuardianResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CreateGuardianResponse clone() => CreateGuardianResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CreateGuardianResponse copyWith(void Function(CreateGuardianResponse) updates) => super.copyWith((message) => updates(message as CreateGuardianResponse)) as CreateGuardianResponse; + factory CreateGuardianResponse.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory CreateGuardianResponse.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'CreateGuardianResponse', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) + ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', + subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateGuardianResponse clone() => + CreateGuardianResponse()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateGuardianResponse copyWith( + void Function(CreateGuardianResponse) updates) => + super.copyWith((message) => updates(message as CreateGuardianResponse)) + as CreateGuardianResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CreateGuardianResponse create() => CreateGuardianResponse._(); CreateGuardianResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static CreateGuardianResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateGuardianResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static CreateGuardianResponse? _defaultInstance; @$pb.TagNumber(1) $8.GuardianResponse get guardian => $_getN(0); @$pb.TagNumber(1) - set guardian($8.GuardianResponse v) { setField(1, v); } + set guardian($8.GuardianResponse v) { + setField(1, v); + } + @$pb.TagNumber(1) $core.bool hasGuardian() => $_has(0); @$pb.TagNumber(1) @@ -189,40 +230,53 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { return $result; } GuardianLoginRequest._() : super(); - factory GuardianLoginRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GuardianLoginRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + factory GuardianLoginRequest.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory GuardianLoginRequest.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GuardianLoginRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'email') ..aOS(2, _omitFieldNames ? '' : 'password') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GuardianLoginRequest clone() => GuardianLoginRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GuardianLoginRequest copyWith(void Function(GuardianLoginRequest) updates) => super.copyWith((message) => updates(message as GuardianLoginRequest)) as GuardianLoginRequest; + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GuardianLoginRequest clone() => + GuardianLoginRequest()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GuardianLoginRequest copyWith(void Function(GuardianLoginRequest) updates) => + super.copyWith((message) => updates(message as GuardianLoginRequest)) + as GuardianLoginRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static GuardianLoginRequest create() => GuardianLoginRequest._(); GuardianLoginRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static GuardianLoginRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GuardianLoginRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static GuardianLoginRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get email => $_getSZ(0); @$pb.TagNumber(1) - set email($core.String v) { $_setString(0, v); } + set email($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasEmail() => $_has(0); @$pb.TagNumber(1) @@ -231,7 +285,10 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get password => $_getSZ(1); @$pb.TagNumber(2) - set password($core.String v) { $_setString(1, v); } + set password($core.String v) { + $_setString(1, v); + } + @$pb.TagNumber(2) $core.bool hasPassword() => $_has(1); @$pb.TagNumber(2) @@ -257,41 +314,57 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { return $result; } GuardianLoginResponse._() : super(); - factory GuardianLoginResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GuardianLoginResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + factory GuardianLoginResponse.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory GuardianLoginResponse.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GuardianLoginResponse', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$8.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) - ..aOM<$8.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $8.NurseryResponse.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GuardianLoginResponse clone() => GuardianLoginResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GuardianLoginResponse copyWith(void Function(GuardianLoginResponse) updates) => super.copyWith((message) => updates(message as GuardianLoginResponse)) as GuardianLoginResponse; + ..aOM<$8.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', + subBuilder: $8.GuardianResponse.create) + ..aOM<$8.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', + subBuilder: $8.NurseryResponse.create) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GuardianLoginResponse clone() => + GuardianLoginResponse()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GuardianLoginResponse copyWith( + void Function(GuardianLoginResponse) updates) => + super.copyWith((message) => updates(message as GuardianLoginResponse)) + as GuardianLoginResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static GuardianLoginResponse create() => GuardianLoginResponse._(); GuardianLoginResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static GuardianLoginResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GuardianLoginResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static GuardianLoginResponse? _defaultInstance; @$pb.TagNumber(1) $core.bool get success => $_getBF(0); @$pb.TagNumber(1) - set success($core.bool v) { $_setBool(0, v); } + set success($core.bool v) { + $_setBool(0, v); + } + @$pb.TagNumber(1) $core.bool hasSuccess() => $_has(0); @$pb.TagNumber(1) @@ -300,7 +373,10 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { @$pb.TagNumber(2) $8.GuardianResponse get guardian => $_getN(1); @$pb.TagNumber(2) - set guardian($8.GuardianResponse v) { setField(2, v); } + set guardian($8.GuardianResponse v) { + setField(2, v); + } + @$pb.TagNumber(2) $core.bool hasGuardian() => $_has(1); @$pb.TagNumber(2) @@ -311,7 +387,10 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { @$pb.TagNumber(3) $8.NurseryResponse get nursery => $_getN(2); @$pb.TagNumber(3) - set nursery($8.NurseryResponse v) { setField(3, v); } + set nursery($8.NurseryResponse v) { + setField(3, v); + } + @$pb.TagNumber(3) $core.bool hasNursery() => $_has(2); @$pb.TagNumber(3) @@ -331,39 +410,55 @@ class GetGuardianListByBusIdRequest extends $pb.GeneratedMessage { return $result; } GetGuardianListByBusIdRequest._() : super(); - factory GetGuardianListByBusIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetGuardianListByBusIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByBusIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + factory GetGuardianListByBusIdRequest.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory GetGuardianListByBusIdRequest.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetGuardianListByBusIdRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianListByBusIdRequest clone() => GetGuardianListByBusIdRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianListByBusIdRequest copyWith(void Function(GetGuardianListByBusIdRequest) updates) => super.copyWith((message) => updates(message as GetGuardianListByBusIdRequest)) as GetGuardianListByBusIdRequest; + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdRequest clone() => + GetGuardianListByBusIdRequest()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdRequest copyWith( + void Function(GetGuardianListByBusIdRequest) updates) => + super.copyWith( + (message) => updates(message as GetGuardianListByBusIdRequest)) + as GetGuardianListByBusIdRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianListByBusIdRequest create() => GetGuardianListByBusIdRequest._(); + static GetGuardianListByBusIdRequest create() => + GetGuardianListByBusIdRequest._(); GetGuardianListByBusIdRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianListByBusIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianListByBusIdRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static GetGuardianListByBusIdRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get busId => $_getSZ(0); @$pb.TagNumber(1) - set busId($core.String v) { $_setString(0, v); } + set busId($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasBusId() => $_has(0); @$pb.TagNumber(1) @@ -381,33 +476,48 @@ class GetGuardianListByBusIdResponse extends $pb.GeneratedMessage { return $result; } GetGuardianListByBusIdResponse._() : super(); - factory GetGuardianListByBusIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetGuardianListByBusIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByBusIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianListByBusIdResponse clone() => GetGuardianListByBusIdResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianListByBusIdResponse copyWith(void Function(GetGuardianListByBusIdResponse) updates) => super.copyWith((message) => updates(message as GetGuardianListByBusIdResponse)) as GetGuardianListByBusIdResponse; + factory GetGuardianListByBusIdResponse.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory GetGuardianListByBusIdResponse.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetGuardianListByBusIdResponse', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) + ..pc<$8.GuardianResponse>( + 1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, + subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdResponse clone() => + GetGuardianListByBusIdResponse()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdResponse copyWith( + void Function(GetGuardianListByBusIdResponse) updates) => + super.copyWith( + (message) => updates(message as GetGuardianListByBusIdResponse)) + as GetGuardianListByBusIdResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianListByBusIdResponse create() => GetGuardianListByBusIdResponse._(); + static GetGuardianListByBusIdResponse create() => + GetGuardianListByBusIdResponse._(); GetGuardianListByBusIdResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianListByBusIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianListByBusIdResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static GetGuardianListByBusIdResponse? _defaultInstance; @$pb.TagNumber(1) @@ -425,39 +535,55 @@ class GetGuardianByChildIdRequest extends $pb.GeneratedMessage { return $result; } GetGuardianByChildIdRequest._() : super(); - factory GetGuardianByChildIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetGuardianByChildIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianByChildIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + factory GetGuardianByChildIdRequest.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory GetGuardianByChildIdRequest.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetGuardianByChildIdRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'childId') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianByChildIdRequest clone() => GetGuardianByChildIdRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianByChildIdRequest copyWith(void Function(GetGuardianByChildIdRequest) updates) => super.copyWith((message) => updates(message as GetGuardianByChildIdRequest)) as GetGuardianByChildIdRequest; + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdRequest clone() => + GetGuardianByChildIdRequest()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdRequest copyWith( + void Function(GetGuardianByChildIdRequest) updates) => + super.copyWith( + (message) => updates(message as GetGuardianByChildIdRequest)) + as GetGuardianByChildIdRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianByChildIdRequest create() => GetGuardianByChildIdRequest._(); + static GetGuardianByChildIdRequest create() => + GetGuardianByChildIdRequest._(); GetGuardianByChildIdRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianByChildIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianByChildIdRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static GetGuardianByChildIdRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get childId => $_getSZ(0); @$pb.TagNumber(1) - set childId($core.String v) { $_setString(0, v); } + set childId($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasChildId() => $_has(0); @$pb.TagNumber(1) @@ -475,39 +601,56 @@ class GetGuardianByChildIdResponse extends $pb.GeneratedMessage { return $result; } GetGuardianByChildIdResponse._() : super(); - factory GetGuardianByChildIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetGuardianByChildIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianByChildIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianByChildIdResponse clone() => GetGuardianByChildIdResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianByChildIdResponse copyWith(void Function(GetGuardianByChildIdResponse) updates) => super.copyWith((message) => updates(message as GetGuardianByChildIdResponse)) as GetGuardianByChildIdResponse; + factory GetGuardianByChildIdResponse.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory GetGuardianByChildIdResponse.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetGuardianByChildIdResponse', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) + ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', + subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdResponse clone() => + GetGuardianByChildIdResponse()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdResponse copyWith( + void Function(GetGuardianByChildIdResponse) updates) => + super.copyWith( + (message) => updates(message as GetGuardianByChildIdResponse)) + as GetGuardianByChildIdResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianByChildIdResponse create() => GetGuardianByChildIdResponse._(); + static GetGuardianByChildIdResponse create() => + GetGuardianByChildIdResponse._(); GetGuardianByChildIdResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianByChildIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianByChildIdResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static GetGuardianByChildIdResponse? _defaultInstance; @$pb.TagNumber(1) $8.GuardianResponse get guardian => $_getN(0); @$pb.TagNumber(1) - set guardian($8.GuardianResponse v) { setField(1, v); } + set guardian($8.GuardianResponse v) { + setField(1, v); + } + @$pb.TagNumber(1) $core.bool hasGuardian() => $_has(0); @$pb.TagNumber(1) @@ -527,39 +670,56 @@ class GetGuardianListByNurseryIdRequest extends $pb.GeneratedMessage { return $result; } GetGuardianListByNurseryIdRequest._() : super(); - factory GetGuardianListByNurseryIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetGuardianListByNurseryIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByNurseryIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + factory GetGuardianListByNurseryIdRequest.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory GetGuardianListByNurseryIdRequest.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetGuardianListByNurseryIdRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'nurseryId') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianListByNurseryIdRequest clone() => GetGuardianListByNurseryIdRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianListByNurseryIdRequest copyWith(void Function(GetGuardianListByNurseryIdRequest) updates) => super.copyWith((message) => updates(message as GetGuardianListByNurseryIdRequest)) as GetGuardianListByNurseryIdRequest; + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdRequest clone() => + GetGuardianListByNurseryIdRequest()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdRequest copyWith( + void Function(GetGuardianListByNurseryIdRequest) updates) => + super.copyWith((message) => + updates(message as GetGuardianListByNurseryIdRequest)) + as GetGuardianListByNurseryIdRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianListByNurseryIdRequest create() => GetGuardianListByNurseryIdRequest._(); + static GetGuardianListByNurseryIdRequest create() => + GetGuardianListByNurseryIdRequest._(); GetGuardianListByNurseryIdRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianListByNurseryIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianListByNurseryIdRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor( + create); static GetGuardianListByNurseryIdRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get nurseryId => $_getSZ(0); @$pb.TagNumber(1) - set nurseryId($core.String v) { $_setString(0, v); } + set nurseryId($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasNurseryId() => $_has(0); @$pb.TagNumber(1) @@ -577,33 +737,49 @@ class GetGuardianListByNurseryIdResponse extends $pb.GeneratedMessage { return $result; } GetGuardianListByNurseryIdResponse._() : super(); - factory GetGuardianListByNurseryIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetGuardianListByNurseryIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByNurseryIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianListByNurseryIdResponse clone() => GetGuardianListByNurseryIdResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianListByNurseryIdResponse copyWith(void Function(GetGuardianListByNurseryIdResponse) updates) => super.copyWith((message) => updates(message as GetGuardianListByNurseryIdResponse)) as GetGuardianListByNurseryIdResponse; + factory GetGuardianListByNurseryIdResponse.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory GetGuardianListByNurseryIdResponse.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'GetGuardianListByNurseryIdResponse', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) + ..pc<$8.GuardianResponse>( + 1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, + subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdResponse clone() => + GetGuardianListByNurseryIdResponse()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdResponse copyWith( + void Function(GetGuardianListByNurseryIdResponse) updates) => + super.copyWith((message) => + updates(message as GetGuardianListByNurseryIdResponse)) + as GetGuardianListByNurseryIdResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianListByNurseryIdResponse create() => GetGuardianListByNurseryIdResponse._(); + static GetGuardianListByNurseryIdResponse create() => + GetGuardianListByNurseryIdResponse._(); GetGuardianListByNurseryIdResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianListByNurseryIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianListByNurseryIdResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor( + create); static GetGuardianListByNurseryIdResponse? _defaultInstance; @$pb.TagNumber(1) @@ -645,45 +821,60 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { return $result; } UpdateGuardianRequest._() : super(); - factory UpdateGuardianRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UpdateGuardianRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateGuardianRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + factory UpdateGuardianRequest.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory UpdateGuardianRequest.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'UpdateGuardianRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'guardianId') ..aOS(2, _omitFieldNames ? '' : 'name') ..aOS(3, _omitFieldNames ? '' : 'email') ..aOS(4, _omitFieldNames ? '' : 'phoneNumber') ..aOB(5, _omitFieldNames ? '' : 'isUseMorningBus') ..aOB(6, _omitFieldNames ? '' : 'isUseEveningBus') - ..aOM<$9.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - UpdateGuardianRequest clone() => UpdateGuardianRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UpdateGuardianRequest copyWith(void Function(UpdateGuardianRequest) updates) => super.copyWith((message) => updates(message as UpdateGuardianRequest)) as UpdateGuardianRequest; + ..aOM<$9.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', + subBuilder: $9.FieldMask.create) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateGuardianRequest clone() => + UpdateGuardianRequest()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateGuardianRequest copyWith( + void Function(UpdateGuardianRequest) updates) => + super.copyWith((message) => updates(message as UpdateGuardianRequest)) + as UpdateGuardianRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static UpdateGuardianRequest create() => UpdateGuardianRequest._(); UpdateGuardianRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static UpdateGuardianRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateGuardianRequest getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static UpdateGuardianRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get guardianId => $_getSZ(0); @$pb.TagNumber(1) - set guardianId($core.String v) { $_setString(0, v); } + set guardianId($core.String v) { + $_setString(0, v); + } + @$pb.TagNumber(1) $core.bool hasGuardianId() => $_has(0); @$pb.TagNumber(1) @@ -692,7 +883,10 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get name => $_getSZ(1); @$pb.TagNumber(2) - set name($core.String v) { $_setString(1, v); } + set name($core.String v) { + $_setString(1, v); + } + @$pb.TagNumber(2) $core.bool hasName() => $_has(1); @$pb.TagNumber(2) @@ -701,7 +895,10 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get email => $_getSZ(2); @$pb.TagNumber(3) - set email($core.String v) { $_setString(2, v); } + set email($core.String v) { + $_setString(2, v); + } + @$pb.TagNumber(3) $core.bool hasEmail() => $_has(2); @$pb.TagNumber(3) @@ -710,7 +907,10 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.String get phoneNumber => $_getSZ(3); @$pb.TagNumber(4) - set phoneNumber($core.String v) { $_setString(3, v); } + set phoneNumber($core.String v) { + $_setString(3, v); + } + @$pb.TagNumber(4) $core.bool hasPhoneNumber() => $_has(3); @$pb.TagNumber(4) @@ -719,7 +919,10 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.bool get isUseMorningBus => $_getBF(4); @$pb.TagNumber(5) - set isUseMorningBus($core.bool v) { $_setBool(4, v); } + set isUseMorningBus($core.bool v) { + $_setBool(4, v); + } + @$pb.TagNumber(5) $core.bool hasIsUseMorningBus() => $_has(4); @$pb.TagNumber(5) @@ -728,7 +931,10 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(6) $core.bool get isUseEveningBus => $_getBF(5); @$pb.TagNumber(6) - set isUseEveningBus($core.bool v) { $_setBool(5, v); } + set isUseEveningBus($core.bool v) { + $_setBool(5, v); + } + @$pb.TagNumber(6) $core.bool hasIsUseEveningBus() => $_has(5); @$pb.TagNumber(6) @@ -737,7 +943,10 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(11) $9.FieldMask get updateMask => $_getN(6); @$pb.TagNumber(11) - set updateMask($9.FieldMask v) { setField(11, v); } + set updateMask($9.FieldMask v) { + setField(11, v); + } + @$pb.TagNumber(11) $core.bool hasUpdateMask() => $_has(6); @$pb.TagNumber(11) @@ -757,39 +966,54 @@ class UpdateGuardianResponse extends $pb.GeneratedMessage { return $result; } UpdateGuardianResponse._() : super(); - factory UpdateGuardianResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UpdateGuardianResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateGuardianResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - UpdateGuardianResponse clone() => UpdateGuardianResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UpdateGuardianResponse copyWith(void Function(UpdateGuardianResponse) updates) => super.copyWith((message) => updates(message as UpdateGuardianResponse)) as UpdateGuardianResponse; + factory UpdateGuardianResponse.fromBuffer($core.List<$core.int> i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(i, r); + factory UpdateGuardianResponse.fromJson($core.String i, + [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'UpdateGuardianResponse', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), + createEmptyInstance: create) + ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', + subBuilder: $8.GuardianResponse.create) + ..hasRequiredFields = false; + + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateGuardianResponse clone() => + UpdateGuardianResponse()..mergeFromMessage(this); + @$core.Deprecated('Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateGuardianResponse copyWith( + void Function(UpdateGuardianResponse) updates) => + super.copyWith((message) => updates(message as UpdateGuardianResponse)) + as UpdateGuardianResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static UpdateGuardianResponse create() => UpdateGuardianResponse._(); UpdateGuardianResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static $pb.PbList createRepeated() => + $pb.PbList(); @$core.pragma('dart2js:noInline') - static UpdateGuardianResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateGuardianResponse getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); static UpdateGuardianResponse? _defaultInstance; @$pb.TagNumber(1) $8.GuardianResponse get guardian => $_getN(0); @$pb.TagNumber(1) - set guardian($8.GuardianResponse v) { setField(1, v); } + set guardian($8.GuardianResponse v) { + setField(1, v); + } + @$pb.TagNumber(1) $core.bool hasGuardian() => $_has(0); @$pb.TagNumber(1) @@ -798,6 +1022,6 @@ class UpdateGuardianResponse extends $pb.GeneratedMessage { $8.GuardianResponse ensureGuardian() => $_ensure(0); } - const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index 94345bb1..d44c323a 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -1,8 +1,13 @@ +import 'dart:developer' as developer; import 'package:flutter/material.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'package:where_child_bus_guardian/pages/check_page/check_page.dart'; import 'package:where_child_bus_guardian/pages/daily_page/daily_page.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; +import 'package:where_child_bus_guardian/pages/stop_bus_page/stop_bus_page.dart'; +import 'package:where_child_bus_guardian/service/get_running_bus_by_guardian_id.dart'; +import 'package:where_child_bus_guardian/util/guardian_data.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class App extends StatefulWidget { App({super.key}); @@ -13,6 +18,25 @@ class App extends StatefulWidget { class _AppState extends State { int _selectedIndex = 0; + late GuardianResponse guardian; + late bool _hasRunningBus; + + @override + void initState() { + super.initState(); + _hasRunningBus = false; + guardian = GuardianData().getGuardian(); + _loadRunningBus(); + } + + Future _loadRunningBus() async { + try { + var busRes = await getRunningBusByGuardianIdService(guardian.id); + _hasRunningBus = true; + } catch (e) { + _hasRunningBus = false; + } + } @override Widget build(BuildContext context) { @@ -20,9 +44,11 @@ class _AppState extends State { appBar: AppBar( title: Text(['日々の記録', '地図', '乗車確認'][_selectedIndex]), ), - body: IndexedStack( - index: _selectedIndex, - children: [DailyPage(), const MapPage(), CheckPage()]), + body: IndexedStack(index: _selectedIndex, children: [ + DailyPage(), + _hasRunningBus ? MapPage() : StopBusPage(), + CheckPage() + ]), bottomNavigationBar: BottomNavigationBar( currentIndex: _selectedIndex, onTap: (int index) => setState(() => _selectedIndex = index), diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart index 0c49c06c..1f697536 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart'; import 'package:where_child_bus_guardian/service/update_child_item_status.dart'; -import '../styles/styles.dart'; +import '../../styles/styles.dart'; class HasItemState extends StatefulWidget { final Child child; diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index be9f2a71..1568b468 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -71,8 +71,8 @@ class _ArrivalTime extends State { '?destination=$endLat,$endLng&origin=$startLat,$startLng&key=$apiKey'; } else { int guardianIndex = waypoints.indexWhere((point) => - point.latitude == guardianLatitude && - point.longitude == guardianLongitude); + point.latitude == widget.guardianLatitude && + point.longitude == widget.guardianLongitude); if (guardianIndex != -1) { waypoints = waypoints.sublist(0, guardianIndex + 1); } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart index 7e10ffd2..866cb183 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart @@ -86,8 +86,8 @@ class _BusToBusStopTime extends State { '?destination=$endLat,$endLng&origin=$startLat,$startLng&key=$apiKey'; } else { int guardianIndex = waypoints.indexWhere((point) => - point.latitude == guardianLatitude && - point.longitude == guardianLongitude); + point.latitude == widget.guardianLatitude && + point.longitude == widget.guardianLongitude); if (guardianIndex != -1) { waypoints = waypoints.sublist(nearestWaypointIndex, guardianIndex + 1); } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart new file mode 100644 index 00000000..c055ea9b --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart @@ -0,0 +1,132 @@ +import 'dart:developer' as developer; +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; +import 'package:where_child_bus_guardian/pages/map_page/components/bus_to_bus_stop_time.dart'; +import 'package:where_child_bus_guardian/pages/map_page/components/arrival_time.dart'; +import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; +import '../../styles/styles.dart'; + +class MapPageBottom extends StatefulWidget { + final GuardianResponse guardian; + final List stations; + final List waypoints; + final double busLatitude; + final double busLongitude; + final double nurseryLatitude; + final double nurseryLongitude; + + const MapPageBottom( + {Key? key, + required this.guardian, + required this.stations, + required this.waypoints, + required this.busLatitude, + required this.busLongitude, + required this.nurseryLatitude, + required this.nurseryLongitude}) + : super(key: key); + + @override + State createState() => _MapPageBottomState(); +} + +class _MapPageBottomState extends State { + late Station guardianStation; + + @override + void initState() { + super.initState(); + _loadGuardianStationData(); + } + + Future _loadGuardianStationData() async { + try { + widget.stations.forEach((station) { + if (station.guardianId == widget.guardian.id) { + setState(() { + guardianStation = station; + }); + } + }); + } catch (error) { + developer.log('停留所の読み込みに失敗しました: $error'); + } + } + + @override + Widget build(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.3, + child: Padding( + padding: EdgeInsets.all(MediaQuery.of(context).size.width * 0.1), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + arrivalTimeBody(), + isRideScheduled("朝のバス", widget.guardian.isUseMorningBus), + isRideScheduled("夕方のバス", widget.guardian.isUseEveningBus), + ], + ), + ), + ); + } + + Widget arrivalTimeBody() { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + fieldTitleAndTime( + "到着まで", + BusToBusStopTime( + waypoints: widget.waypoints, + busLatitude: widget.busLatitude, + busLongitude: widget.busLongitude, + guardianLatitude: guardianStation.latitude, + guardianLongitude: guardianStation.longitude, + )), + fieldTitleAndTime( + "到着予定時刻", + ArrivalTime( + waypoints: widget.waypoints, + nurseryLatitude: widget.nurseryLatitude, + nurseryLongitude: widget.nurseryLongitude, + guardianLatitude: guardianStation.latitude, + guardianLongitude: guardianStation.longitude, + departureTime: departureTime)), + ]); + } + + Widget fieldTitleAndTime(String title, Widget time) { + return Column( + children: [ + Text(title), + time, + ], + ); + } + + Widget isRideScheduled(String busName, bool isRide) { + return Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text("${busName}の乗車予定: "), + SizedBox(width: MediaQuery.of(context).size.width * 0.05), + Container( + width: MediaQuery.of(context).size.width * 0.3, + decoration: statusFieldDecoration(isRide), + child: Padding( + padding: const EdgeInsets.all(5.0), + child: Text( + isRide ? "あり" : "なし", + style: statusFieldTextStyle(isRide), + textAlign: TextAlign.center, + )), + ) + ], + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index b8e81765..f7900a01 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -1,8 +1,17 @@ +import 'dart:async'; +import 'dart:developer' as developer; import 'package:flutter/material.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:http/http.dart' as http; +import 'dart:convert'; import 'package:where_child_bus_guardian/components/utils/google_map_view.dart'; -import 'package:where_child_bus_guardian/pages/map_page/components/bus_to_bus_stop_time.dart'; -import 'package:where_child_bus_guardian/pages/map_page/components/arrival_time.dart'; -import '../styles/styles.dart'; +import 'package:where_child_bus_guardian/pages/map_page/components/map_page_bottom.dart'; +import 'package:where_child_bus_guardian/service/get_running_bus_by_guardian_id.dart'; +import 'package:where_child_bus_guardian/service/get_station_list_by_bus_id.dart'; +import 'package:where_child_bus_guardian/service/get_nursery_by_guardian_id.dart'; +import 'package:where_child_bus_guardian/util/guardian_data.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; class Waypoint { final double latitude; @@ -13,22 +22,6 @@ class Waypoint { {required this.latitude, required this.longitude, required this.name}); } -//TODO: 将来的に停留所のデータを受け取る -final List waypoints = [ - Waypoint(latitude: 34.7108, longitude: 137.7261, name: "停留所1"), - Waypoint(latitude: 34.7169, longitude: 137.7285, name: "停留所2"), - Waypoint(latitude: 34.7159, longitude: 137.7368, name: "停留所3"), -]; - -//TODO: 将来的に保育園の緯度経度を受け取る -double nurseryLatitude = 34.7056, nurseryLongitude = 137.7343; - -//TODO: 将来的にバスの現在位置を受け取る -double busLatitude = 34.7057, busLongitude = 137.7317; - -//TODO: 将来的には保護者に結び付く停留所の緯度経度を受け取る -double guardianLatitude = 34.7108, guardianLongitude = 137.7261; - //TODO: 将来的には出発時刻を受け取る DateTime departureTime = DateTime.now(); @@ -40,99 +33,97 @@ class MapPage extends StatefulWidget { } class _MapPageState extends State { - var isRide = true; + final _controller = StreamController(); + + String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); + List stations = []; + List waypoints = []; + + late GuardianResponse guardian; + late Bus bus; + late NurseryResponse nursery; + late String nurseryAddress; + late double busLatitude; + late double busLongitude; + late double nurseryLatitude; + late double nurseryLongitude; + + bool _isLoading = false; @override - Widget build(BuildContext context) { - return Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GoogleMapView( - waypoints: waypoints, - nurseryLatitude: nurseryLatitude, - nurseryLongitude: nurseryLongitude, - busLatitude: busLatitude, - busLongitude: busLongitude, - ), - pageBottomBody() - ], - ), - ); + void initState() { + _isLoading = true; + super.initState(); + guardian = GuardianData().getGuardian(); + _loadData(); + _isLoading = false; } - Widget pageBottomBody() { - return SizedBox( - width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height * 0.3, - child: Padding( - padding: EdgeInsets.all(MediaQuery.of(context).size.width * 0.1), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - arrivalTimeBody(), - isRideScheduled(), - ], - ), - ), - ); + void _loadBusLocation() { + _controller.stream.listen((val) { + setState(() { + busLatitude = val.latitude; + busLongitude = val.longitude; + }); + }); } - Widget arrivalTimeBody() { - return Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - fieldTitleAndTime( - "到着まで", - BusToBusStopTime( - waypoints: waypoints, - busLatitude: busLatitude, - busLongitude: busLongitude, - guardianLatitude: guardianLatitude, - guardianLongitude: guardianLongitude, - )), - fieldTitleAndTime( - "到着予定時刻", - ArrivalTime( - waypoints: waypoints, - nurseryLatitude: nurseryLatitude, - nurseryLongitude: nurseryLongitude, - guardianLatitude: guardianLatitude, - guardianLongitude: guardianLongitude, - departureTime: departureTime)), - ]); - } + Future _loadData() async { + try { + var busRes = await getRunningBusByGuardianIdService(guardian.id); + var stationsRes = await getStationListByBusIdService(bus.id); + var nurseryRes = await getNurseryByGuardianIdService(guardian.id); + stations.forEach((station) { + waypoints.add(Waypoint( + latitude: station.latitude, + longitude: station.longitude, + name: station.id.toString())); + }); + final response = await http.get(Uri.parse( + 'https://maps.googleapis.com/maps/api/geocode/json?address=$nurseryAddress&key=$googleApiKey')); + final data = json.decode(response.body); + final location = data['results'][0]['geometry']['location']; - Widget fieldTitleAndTime(String title, Widget time) { - return Column( - children: [ - Text(title), - time, - ], - ); + setState(() { + bus = busRes.bus; + stations = stationsRes.stations; + nursery = nurseryRes.nurseries; + nurseryAddress = nursery.address; + nurseryLatitude = location['lat']; + nurseryLongitude = location['lng']; + }); + } catch (error) { + developer.log('データの読み込みに失敗しました: $error'); + } } - Widget isRideScheduled() { - return Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text("乗車予定: "), - SizedBox(width: MediaQuery.of(context).size.width * 0.05), - Container( - width: MediaQuery.of(context).size.width * 0.3, - decoration: statusFieldDecoration(isRide), - child: Padding( - padding: const EdgeInsets.all(5.0), - child: Text( - isRide ? "あり" : "なし", - style: statusFieldTextStyle(isRide), - textAlign: TextAlign.center, - )), - ) - ], - ); + @override + Widget build(BuildContext context) { + return _isLoading + ? const Center( + child: CircularProgressIndicator(), + ) + : Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + GoogleMapView( + waypoints: waypoints, + nurseryLatitude: nurseryLatitude, + nurseryLongitude: nurseryLongitude, + busLatitude: busLatitude, + busLongitude: busLongitude, + ), + MapPageBottom( + guardian: guardian, + stations: stations, + waypoints: waypoints, + busLatitude: busLatitude, + busLongitude: busLongitude, + nurseryLatitude: nurseryLatitude, + nurseryLongitude: nurseryLongitude), + ], + ), + ); } } diff --git a/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart b/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart new file mode 100644 index 00000000..1d52afa4 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; + +class StopBusPage extends StatefulWidget { + const StopBusPage({super.key}); + + @override + State createState() => _StopBusPageState(); +} + +class _StopBusPageState extends State { + @override + Widget build(BuildContext context) { + return const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '現在走行中のバスはありません', + style: TextStyle(fontSize: 20, color: Colors.red), + ), + ], + ), + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/service/get_nursery_by_guardian_id.dart b/frontend/where_child_bus_guardian/lib/service/get_nursery_by_guardian_id.dart new file mode 100644 index 00000000..69ad126c --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/service/get_nursery_by_guardian_id.dart @@ -0,0 +1,12 @@ +import 'package:where_child_bus_guardian/util/api/nursery.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; + +Future getNurseryByGuardianIdService( + String guardianId) async { + try { + var res = await getNurseryByGuardianId(guardianId); + return res; + } catch (error) { + return Future.error(error); + } +} diff --git a/frontend/where_child_bus_guardian/lib/service/get_running_bus_by_guardian_id.dart b/frontend/where_child_bus_guardian/lib/service/get_running_bus_by_guardian_id.dart new file mode 100644 index 00000000..7a13f9f4 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/service/get_running_bus_by_guardian_id.dart @@ -0,0 +1,12 @@ +import 'package:where_child_bus_guardian/util/api/bus.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pb.dart'; + +Future getRunningBusByGuardianIdService( + String guardianId) async { + try { + var res = await getRunningBusByGuardianId(guardianId); + return res; + } catch (error) { + return Future.error(error); + } +} diff --git a/frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart b/frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart new file mode 100644 index 00000000..1457f273 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart @@ -0,0 +1,12 @@ +import 'package:where_child_bus_guardian/util/api/station.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/station.pb.dart'; + +Future getStationListByBusIdService( + String busId) async { + try { + var res = await getStationListByBusId(busId); + return res; + } catch (error) { + return Future.error(error); + } +} diff --git a/frontend/where_child_bus_guardian/lib/util/api/bus.dart b/frontend/where_child_bus_guardian/lib/util/api/bus.dart new file mode 100644 index 00000000..e46b6ca5 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/util/api/bus.dart @@ -0,0 +1,58 @@ +import 'dart:async'; +import 'dart:developer' as developer; +import 'package:flutter/foundation.dart'; +import 'package:grpc/grpc.dart'; +import 'package:where_child_bus_guardian/config/config.dart'; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart"; + +Future performGrpcCall( + Future Function(BusServiceClient) grpcCall) async { + final channel = + ClientChannel(appConfig.grpcEndpoint, port: appConfig.grpcPort); + final grpcClient = BusServiceClient(channel); + + try { + final result = await grpcCall(grpcClient); + if (kDebugMode) { + developer.log("レスポンス: $result"); + } + return result; + } catch (error) { + developer.log("Caught Error:", error: error); + return T as Future; + } finally { + await channel.shutdown(); + } +} + +Future getRunningBusByGuardianId( + String guardianId) async { + return performGrpcCall((client) async { + var req = GetRunningBusByGuardianIdRequest(guardianId: guardianId); + return client.getRunningBusByGuardianId(req); + }); +} + +Stream trackBusContinuous( + TrackBusContinuousRequest request) async* { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + options: const ChannelOptions(), + ); + + final grpcClient = BusServiceClient(channel); + developer.log("ServiceClient created"); + final res = grpcClient.trackBusContinuous(request); + + try { + await for (var response in res) { + developer.log("Received response: $response"); + yield response; + } + } catch (error) { + developer.log("Caught Error:", error: error); + } finally { + await channel.shutdown(); + } +} diff --git a/frontend/where_child_bus_guardian/lib/util/api/nursery.dart b/frontend/where_child_bus_guardian/lib/util/api/nursery.dart new file mode 100644 index 00000000..b6093c03 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/util/api/nursery.dart @@ -0,0 +1,33 @@ +import 'dart:developer' as developer; +import 'package:flutter/foundation.dart'; +import 'package:grpc/grpc.dart'; +import 'package:where_child_bus_guardian/config/config.dart'; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart"; + +Future performGrpcCall( + Future Function(NurseryServiceClient) grpcCall) async { + final channel = + ClientChannel(appConfig.grpcEndpoint, port: appConfig.grpcPort); + final grpcClient = NurseryServiceClient(channel); + + try { + final result = await grpcCall(grpcClient); + if (kDebugMode) { + developer.log("レスポンス: $result"); + } + return result; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } finally { + await channel.shutdown(); + } +} + +Future getNurseryByGuardianId( + String guardianId) async { + return performGrpcCall((client) async { + var req = GetNurseryByGuardianIdRequest(guardianId: guardianId); + return client.getNurseryByGuardianId(req); + }); +} diff --git a/frontend/where_child_bus_guardian/lib/util/api/station.dart b/frontend/where_child_bus_guardian/lib/util/api/station.dart new file mode 100644 index 00000000..d3bf525a --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/util/api/station.dart @@ -0,0 +1,33 @@ +import 'dart:developer' as developer; +import 'package:flutter/foundation.dart'; +import 'package:grpc/grpc.dart'; +import 'package:where_child_bus_guardian/config/config.dart'; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/station.pbgrpc.dart"; + +Future performGrpcCall( + Future Function(StationServiceClient) grpcCall) async { + final channel = + ClientChannel(appConfig.grpcEndpoint, port: appConfig.grpcPort); + final grpcClient = StationServiceClient(channel); + + try { + final result = await grpcCall(grpcClient); + if (kDebugMode) { + developer.log("レスポンス: $result"); + } + return result; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } finally { + await channel.shutdown(); + } +} + +Future getStationListByBusId( + String busId) async { + return performGrpcCall((client) async { + var req = GetStationListByBusIdRequest(busId: busId); + return client.getStationListByBusId(req); + }); +} From 05908fc01b54fade08ff287bd98ad570b4c10ce2 Mon Sep 17 00:00:00 2001 From: Mizuki Baba <76275131+lovelovetrb@users.noreply.github.com> Date: Wed, 21 Feb 2024 01:21:41 +0900 Subject: [PATCH 600/771] =?UTF-8?q?refactor(ml):=20black=E3=81=A8isort?= =?UTF-8?q?=E3=82=92=E4=B8=80=E6=8B=AC=E9=81=A9=E7=94=A8=20(#144)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectFaceAndClip/detectFaceAndClip.py | 6 +- .../data/faceDetectDataset.py | 13 +- .../src/face_detect_model/gcp_util.py | 8 +- .../src/face_detect_model/main.py | 8 +- .../src/face_detect_model/pred.py | 1 - .../src/face_detect_model/trainer.py | 8 +- .../src/face_detect_model/util.py | 14 +- .../machine_learning/v1/health_check_pb2.py | 29 +- .../machine_learning/v1/health_check_pb2.pyi | 4 +- .../v1/health_check_pb2_grpc.py | 1 - .../v1/machine_learning_pb2.py | 7 +- .../v1/machine_learning_pb2.pyi | 28 +- .../v1/machine_learning_pb2_grpc.py | 1 - .../generated/where_child_bus/v1/bus_pb2.py | 7 +- .../generated/where_child_bus/v1/bus_pb2.pyi | 120 ++++- .../where_child_bus/v1/bus_pb2_grpc.py | 412 +++++++++++------- .../generated/where_child_bus/v1/child_pb2.py | 72 +-- .../where_child_bus/v1/child_pb2.pyi | 78 +++- .../where_child_bus/v1/child_pb2_grpc.py | 354 +++++++++------ .../where_child_bus/v1/child_photo_pb2.py | 49 ++- .../where_child_bus/v1/child_photo_pb2.pyi | 31 +- .../v1/child_photo_pb2_grpc.py | 184 ++++---- .../where_child_bus/v1/guardian_pb2.py | 72 +-- .../where_child_bus/v1/guardian_pb2.pyi | 91 +++- .../where_child_bus/v1/guardian_pb2_grpc.py | 358 +++++++++------ .../where_child_bus/v1/health_check_pb2.py | 29 +- .../where_child_bus/v1/health_check_pb2.pyi | 4 +- .../v1/health_check_pb2_grpc.py | 68 +-- .../where_child_bus/v1/nursery_pb2.py | 56 ++- .../where_child_bus/v1/nursery_pb2.pyi | 63 ++- .../where_child_bus/v1/nursery_pb2_grpc.py | 238 ++++++---- .../where_child_bus/v1/resources_pb2.py | 76 ++-- .../where_child_bus/v1/resources_pb2.pyi | 230 +++++++++- .../where_child_bus/v1/resources_pb2_grpc.py | 1 - .../where_child_bus/v1/station_pb2.py | 12 +- .../where_child_bus/v1/station_pb2.pyi | 50 ++- .../where_child_bus/v1/station_pb2_grpc.py | 130 +++--- .../proto-gen/machine_learning/v1/server.py | 18 +- .../proto-gen/where_child_bus/v1/client.py | 7 +- .../where_child_bus/v1/healthcheck.py | 10 +- 40 files changed, 1919 insertions(+), 1029 deletions(-) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index a66cb716..657eb224 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -7,20 +7,18 @@ import numpy as np import yaml from dotenv import load_dotenv -from google.cloud.storage import Blob, Bucket - from face_detect_model.DetectFaceAndClip.detectFaceUtil import ( clip_and_resize_face, detect_face, load_cascade, ) - from face_detect_model.gcp_util import ( - get_bucket, get_blobs, + get_bucket, init_client, save_face_image_to_remote, ) +from google.cloud.storage import Blob, Bucket load_dotenv("secrets/.env") diff --git a/machine_learning/src/face_detect_model/data/faceDetectDataset.py b/machine_learning/src/face_detect_model/data/faceDetectDataset.py index 37fa24ad..dd49dde1 100644 --- a/machine_learning/src/face_detect_model/data/faceDetectDataset.py +++ b/machine_learning/src/face_detect_model/data/faceDetectDataset.py @@ -1,24 +1,19 @@ import os import torch -from PIL import Image - -from face_detect_model.util import ( - load_image_from_remote, -) - -from face_detect_model.gcp_util import get_bucket, get_blobs +from face_detect_model.gcp_util import get_blobs, get_bucket from face_detect_model.util import ( get_augment_transform, - get_default_transforms, get_augment_transform_for_gray, + get_default_transforms, get_default_transforms_for_gray, + load_image_from_remote, ) +from PIL import Image # (child_id, image)のタプルを返す class FaceDetectDataset(torch.utils.data.Dataset): - def __init__(self, args, config, client): self.args = args self.config = config diff --git a/machine_learning/src/face_detect_model/gcp_util.py b/machine_learning/src/face_detect_model/gcp_util.py index 64a31c0c..78b1c21c 100644 --- a/machine_learning/src/face_detect_model/gcp_util.py +++ b/machine_learning/src/face_detect_model/gcp_util.py @@ -1,10 +1,10 @@ -import google.cloud.storage as gcs -from google.cloud.storage import Bucket, Blob import os -from face_detect_model.util import logger -import numpy as np import cv2 +import google.cloud.storage as gcs +import numpy as np +from face_detect_model.util import logger +from google.cloud.storage import Blob, Bucket def init_client(): diff --git a/machine_learning/src/face_detect_model/main.py b/machine_learning/src/face_detect_model/main.py index b6134734..7c3f9023 100644 --- a/machine_learning/src/face_detect_model/main.py +++ b/machine_learning/src/face_detect_model/main.py @@ -1,14 +1,14 @@ -import yaml import argparse -import torch import os +import torch +import yaml +from dotenv import load_dotenv from face_detect_model.data.faceDetectDataset import FaceDetectDataset +from face_detect_model.gcp_util import get_bucket, init_client from face_detect_model.model.faceDetectModel import FaceDetectModel from face_detect_model.trainer import Trainer from face_detect_model.util import logger, save_pickle_to_gcs, switch_to_bus_type -from face_detect_model.gcp_util import init_client, get_bucket -from dotenv import load_dotenv load_dotenv("secrets/.env") diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index 36ce39ab..031e0fa9 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -1,4 +1,3 @@ - import argparse import os import time diff --git a/machine_learning/src/face_detect_model/trainer.py b/machine_learning/src/face_detect_model/trainer.py index 14a6fca7..a3e50137 100644 --- a/machine_learning/src/face_detect_model/trainer.py +++ b/machine_learning/src/face_detect_model/trainer.py @@ -1,13 +1,13 @@ +import argparse import os + +import google.cloud.storage as gcs import torch import torch.nn as nn -import argparse -import google.cloud.storage as gcs - from face_detect_model.data.faceDetectDataset import FaceDetectDataset +from face_detect_model.gcp_util import get_bucket from face_detect_model.model.faceDetectModel import FaceDetectModel from face_detect_model.util import logger, save_pickle_to_gcs, switch_to_bus_type -from face_detect_model.gcp_util import get_bucket class Trainer: diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index 89bdd638..3d750507 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -1,18 +1,14 @@ import logging +import os +import random import re -import random +import cv2 +import numpy as np import torch +from generated.machine_learning.v1.func_args import FaceDetectAndClip_Args from google.cloud.storage import Bucket from torchvision import transforms -import os -import numpy as np - -from generated.machine_learning.v1.func_args import ( - FaceDetectAndClip_Args, -) - -import cv2 logging.basicConfig( format="%(asctime)s - %(levelname)s - %(name)s - PID: %(process)d - %(message)s", diff --git a/machine_learning/src/generated/machine_learning/v1/health_check_pb2.py b/machine_learning/src/generated/machine_learning/v1/health_check_pb2.py index a6997700..7551ecae 100644 --- a/machine_learning/src/generated/machine_learning/v1/health_check_pb2.py +++ b/machine_learning/src/generated/machine_learning/v1/health_check_pb2.py @@ -7,25 +7,30 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&machine_learning/v1/health_check.proto\x12\x13machine_learning.v1\"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2a\n\x12HealthcheckService\x12K\n\x04Ping\x12 .machine_learning.v1.PingRequest\x1a!.machine_learning.v1.PingResponseB\xfe\x01\n\x17\x63om.machine_learning.v1B\x10HealthCheckProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n&machine_learning/v1/health_check.proto\x12\x13machine_learning.v1"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2a\n\x12HealthcheckService\x12K\n\x04Ping\x12 .machine_learning.v1.PingRequest\x1a!.machine_learning.v1.PingResponseB\xfe\x01\n\x17\x63om.machine_learning.v1B\x10HealthCheckProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'machine_learning.v1.health_check_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "machine_learning.v1.health_check_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\020HealthCheckProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' - _globals['_PINGREQUEST']._serialized_start=63 - _globals['_PINGREQUEST']._serialized_end=96 - _globals['_PINGRESPONSE']._serialized_start=98 - _globals['_PINGRESPONSE']._serialized_end=138 - _globals['_HEALTHCHECKSERVICE']._serialized_start=140 - _globals['_HEALTHCHECKSERVICE']._serialized_end=237 + _globals["DESCRIPTOR"]._options = None + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"\n\027com.machine_learning.v1B\020HealthCheckProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" + _globals["_PINGREQUEST"]._serialized_start = 63 + _globals["_PINGREQUEST"]._serialized_end = 96 + _globals["_PINGRESPONSE"]._serialized_start = 98 + _globals["_PINGRESPONSE"]._serialized_end = 138 + _globals["_HEALTHCHECKSERVICE"]._serialized_start = 140 + _globals["_HEALTHCHECKSERVICE"]._serialized_end = 237 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/machine_learning/v1/health_check_pb2.pyi b/machine_learning/src/generated/machine_learning/v1/health_check_pb2.pyi index fb2e805c..49aebc89 100644 --- a/machine_learning/src/generated/machine_learning/v1/health_check_pb2.pyi +++ b/machine_learning/src/generated/machine_learning/v1/health_check_pb2.pyi @@ -1,6 +1,8 @@ +from typing import ClassVar as _ClassVar +from typing import Optional as _Optional + from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Optional as _Optional DESCRIPTOR: _descriptor.FileDescriptor diff --git a/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py index b4c7ae61..f06d8e66 100644 --- a/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py +++ b/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - from generated.machine_learning.v1 import ( health_check_pb2 as machine__learning_dot_v1_dot_health__check__pb2, ) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py index 608bdfa6..711c7cce 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py @@ -20,7 +20,6 @@ resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, ) - DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xb6\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' ) @@ -32,9 +31,9 @@ ) if _descriptor._USE_C_DESCRIPTORS == False: _globals["DESCRIPTOR"]._options = None - _globals["DESCRIPTOR"]._serialized_options = ( - b"\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" - ) + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" _globals["_TRAINREQUEST"]._serialized_start = 134 _globals["_TRAINREQUEST"]._serialized_end = 287 _globals["_TRAINRESPONSE"]._serialized_start = 289 diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi index c5d42e2f..d4f598fa 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi @@ -1,9 +1,13 @@ -from where_child_bus.v1 import bus_pb2 as _bus_pb2 -from where_child_bus.v1 import resources_pb2 as _resources_pb2 -from google.protobuf.internal import containers as _containers +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Optional as _Optional +from typing import Union as _Union + from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional, Union as _Union +from google.protobuf.internal import containers as _containers +from where_child_bus.v1 import bus_pb2 as _bus_pb2 +from where_child_bus.v1 import resources_pb2 as _resources_pb2 DESCRIPTOR: _descriptor.FileDescriptor @@ -17,7 +21,13 @@ class TrainRequest(_message.Message): bus_id: str child_ids: _containers.RepeatedScalarFieldContainer[str] bus_type: _resources_pb2.BusType - def __init__(self, nursery_id: _Optional[str] = ..., bus_id: _Optional[str] = ..., child_ids: _Optional[_Iterable[str]] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ...) -> None: ... + def __init__( + self, + nursery_id: _Optional[str] = ..., + bus_id: _Optional[str] = ..., + child_ids: _Optional[_Iterable[str]] = ..., + bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., + ) -> None: ... class TrainResponse(_message.Message): __slots__ = ("is_started",) @@ -31,7 +41,9 @@ class PredResponse(_message.Message): CHILD_IDS_FIELD_NUMBER: _ClassVar[int] is_detected: bool child_ids: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, is_detected: bool = ..., child_ids: _Optional[_Iterable[str]] = ...) -> None: ... + def __init__( + self, is_detected: bool = ..., child_ids: _Optional[_Iterable[str]] = ... + ) -> None: ... class FaceDetectAndClipRequest(_message.Message): __slots__ = ("nursery_id", "child_id") @@ -39,7 +51,9 @@ class FaceDetectAndClipRequest(_message.Message): CHILD_ID_FIELD_NUMBER: _ClassVar[int] nursery_id: str child_id: str - def __init__(self, nursery_id: _Optional[str] = ..., child_id: _Optional[str] = ...) -> None: ... + def __init__( + self, nursery_id: _Optional[str] = ..., child_id: _Optional[str] = ... + ) -> None: ... class FaceDetectAndClipResponse(_message.Message): __slots__ = ("is_started",) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py index 699c2f1a..10981054 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - from generated.machine_learning.v1 import ( machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2, ) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index 7c2bc71f..aae903bf 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -18,7 +18,6 @@ ) from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 - DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude" \n\x1eSendLocationContinuousResponse"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xaf\x06\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' ) @@ -30,9 +29,9 @@ ) if _descriptor._USE_C_DESCRIPTORS == False: _globals["DESCRIPTOR"]._options = None - _globals["DESCRIPTOR"]._serialized_options = ( - b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - ) + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" _globals["_CREATEBUSREQUEST"]._serialized_start = 123 _globals["_CREATEBUSREQUEST"]._serialized_end = 327 _globals["_CREATEBUSRESPONSE"]._serialized_start = 329 diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index 8d5652f5..9e7c9730 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -1,14 +1,25 @@ -from where_child_bus.v1 import resources_pb2 as _resources_pb2 -from google.protobuf import field_mask_pb2 as _field_mask_pb2 -from google.protobuf.internal import containers as _containers +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + from google.protobuf import descriptor as _descriptor +from google.protobuf import field_mask_pb2 as _field_mask_pb2 from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union +from google.protobuf.internal import containers as _containers +from where_child_bus.v1 import resources_pb2 as _resources_pb2 DESCRIPTOR: _descriptor.FileDescriptor class CreateBusRequest(_message.Message): - __slots__ = ("nursery_id", "name", "plate_number", "morning_guardian_ids", "evening_guardian_ids") + __slots__ = ( + "nursery_id", + "name", + "plate_number", + "morning_guardian_ids", + "evening_guardian_ids", + ) NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] @@ -19,13 +30,22 @@ class CreateBusRequest(_message.Message): plate_number: str morning_guardian_ids: _containers.RepeatedScalarFieldContainer[str] evening_guardian_ids: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., morning_guardian_ids: _Optional[_Iterable[str]] = ..., evening_guardian_ids: _Optional[_Iterable[str]] = ...) -> None: ... + def __init__( + self, + nursery_id: _Optional[str] = ..., + name: _Optional[str] = ..., + plate_number: _Optional[str] = ..., + morning_guardian_ids: _Optional[_Iterable[str]] = ..., + evening_guardian_ids: _Optional[_Iterable[str]] = ..., + ) -> None: ... class CreateBusResponse(_message.Message): __slots__ = ("bus",) BUS_FIELD_NUMBER: _ClassVar[int] bus: _resources_pb2.Bus - def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... + def __init__( + self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ... + ) -> None: ... class GetBusListByNurseryIdRequest(_message.Message): __slots__ = ("nursery_id",) @@ -37,7 +57,9 @@ class GetBusListByNurseryIdResponse(_message.Message): __slots__ = ("buses",) BUSES_FIELD_NUMBER: _ClassVar[int] buses: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Bus] - def __init__(self, buses: _Optional[_Iterable[_Union[_resources_pb2.Bus, _Mapping]]] = ...) -> None: ... + def __init__( + self, buses: _Optional[_Iterable[_Union[_resources_pb2.Bus, _Mapping]]] = ... + ) -> None: ... class GetRunningBusByGuardianIdRequest(_message.Message): __slots__ = ("guardian_id",) @@ -49,7 +71,9 @@ class GetRunningBusByGuardianIdResponse(_message.Message): __slots__ = ("bus",) BUS_FIELD_NUMBER: _ClassVar[int] bus: _resources_pb2.Bus - def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... + def __init__( + self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ... + ) -> None: ... class ChangeBusStatusRequest(_message.Message): __slots__ = ("bus_id", "bus_status") @@ -57,13 +81,19 @@ class ChangeBusStatusRequest(_message.Message): BUS_STATUS_FIELD_NUMBER: _ClassVar[int] bus_id: str bus_status: _resources_pb2.BusStatus - def __init__(self, bus_id: _Optional[str] = ..., bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ...) -> None: ... + def __init__( + self, + bus_id: _Optional[str] = ..., + bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ..., + ) -> None: ... class ChangeBusStatusResponse(_message.Message): __slots__ = ("bus",) BUS_FIELD_NUMBER: _ClassVar[int] bus: _resources_pb2.Bus - def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... + def __init__( + self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ... + ) -> None: ... class SendLocationContinuousRequest(_message.Message): __slots__ = ("bus_id", "latitude", "longitude") @@ -73,7 +103,12 @@ class SendLocationContinuousRequest(_message.Message): bus_id: str latitude: float longitude: float - def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ...) -> None: ... + def __init__( + self, + bus_id: _Optional[str] = ..., + latitude: _Optional[float] = ..., + longitude: _Optional[float] = ..., + ) -> None: ... class SendLocationContinuousResponse(_message.Message): __slots__ = () @@ -93,10 +128,23 @@ class TrackBusContinuousResponse(_message.Message): bus_id: str latitude: float longitude: float - def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ...) -> None: ... + def __init__( + self, + bus_id: _Optional[str] = ..., + latitude: _Optional[float] = ..., + longitude: _Optional[float] = ..., + ) -> None: ... class StreamBusVideoRequest(_message.Message): - __slots__ = ("bus_id", "nursery_id", "bus_type", "vehicle_event", "video_chunk", "photo_height", "photo_width") + __slots__ = ( + "bus_id", + "nursery_id", + "bus_type", + "vehicle_event", + "video_chunk", + "photo_height", + "photo_width", + ) BUS_ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] BUS_TYPE_FIELD_NUMBER: _ClassVar[int] @@ -111,7 +159,16 @@ class StreamBusVideoRequest(_message.Message): video_chunk: _containers.RepeatedScalarFieldContainer[bytes] photo_height: int photo_width: int - def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[_Iterable[bytes]] = ..., photo_height: _Optional[int] = ..., photo_width: _Optional[int] = ...) -> None: ... + def __init__( + self, + bus_id: _Optional[str] = ..., + nursery_id: _Optional[str] = ..., + bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., + vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., + video_chunk: _Optional[_Iterable[bytes]] = ..., + photo_height: _Optional[int] = ..., + photo_width: _Optional[int] = ..., + ) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = ("is_detected", "children") @@ -119,10 +176,23 @@ class StreamBusVideoResponse(_message.Message): CHILDREN_FIELD_NUMBER: _ClassVar[int] is_detected: bool children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] - def __init__(self, is_detected: bool = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... + def __init__( + self, + is_detected: bool = ..., + children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., + ) -> None: ... class UpdateBusRequest(_message.Message): - __slots__ = ("bus_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "update_mask") + __slots__ = ( + "bus_id", + "name", + "plate_number", + "bus_status", + "latitude", + "longitude", + "enable_face_recognition", + "update_mask", + ) BUS_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] @@ -139,10 +209,22 @@ class UpdateBusRequest(_message.Message): longitude: float enable_face_recognition: bool update_mask: _field_mask_pb2.FieldMask - def __init__(self, bus_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__( + self, + bus_id: _Optional[str] = ..., + name: _Optional[str] = ..., + plate_number: _Optional[str] = ..., + bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ..., + latitude: _Optional[float] = ..., + longitude: _Optional[float] = ..., + enable_face_recognition: bool = ..., + update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ..., + ) -> None: ... class UpdateBusResponse(_message.Message): __slots__ = ("bus",) BUS_FIELD_NUMBER: _ClassVar[int] bus: _resources_pb2.Bus - def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... + def __init__( + self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ... + ) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py index 292301cf..1a12f91a 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 @@ -15,40 +14,40 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.CreateBus = channel.unary_unary( - '/where_child_bus.v1.BusService/CreateBus', - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.FromString, - ) + "/where_child_bus.v1.BusService/CreateBus", + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.FromString, + ) self.GetBusListByNurseryId = channel.unary_unary( - '/where_child_bus.v1.BusService/GetBusListByNurseryId', - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, - ) + "/where_child_bus.v1.BusService/GetBusListByNurseryId", + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, + ) self.GetRunningBusByGuardianId = channel.unary_unary( - '/where_child_bus.v1.BusService/GetRunningBusByGuardianId', - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.FromString, - ) + "/where_child_bus.v1.BusService/GetRunningBusByGuardianId", + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.FromString, + ) self.UpdateBus = channel.unary_unary( - '/where_child_bus.v1.BusService/UpdateBus', - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.FromString, - ) + "/where_child_bus.v1.BusService/UpdateBus", + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.FromString, + ) self.SendLocationContinuous = channel.stream_unary( - '/where_child_bus.v1.BusService/SendLocationContinuous', - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.FromString, - ) + "/where_child_bus.v1.BusService/SendLocationContinuous", + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.FromString, + ) self.TrackBusContinuous = channel.unary_stream( - '/where_child_bus.v1.BusService/TrackBusContinuous', - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.FromString, - ) + "/where_child_bus.v1.BusService/TrackBusContinuous", + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.FromString, + ) self.StreamBusVideo = channel.stream_unary( - '/where_child_bus.v1.BusService/StreamBusVideo', - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.FromString, - ) + "/where_child_bus.v1.BusService/StreamBusVideo", + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.FromString, + ) class BusServiceServicer(object): @@ -57,208 +56,293 @@ class BusServiceServicer(object): def CreateBus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetBusListByNurseryId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetRunningBusByGuardianId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def UpdateBus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def SendLocationContinuous(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def TrackBusContinuous(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def StreamBusVideo(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_BusServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'CreateBus': grpc.unary_unary_rpc_method_handler( - servicer.CreateBus, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.SerializeToString, - ), - 'GetBusListByNurseryId': grpc.unary_unary_rpc_method_handler( - servicer.GetBusListByNurseryId, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.SerializeToString, - ), - 'GetRunningBusByGuardianId': grpc.unary_unary_rpc_method_handler( - servicer.GetRunningBusByGuardianId, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.SerializeToString, - ), - 'UpdateBus': grpc.unary_unary_rpc_method_handler( - servicer.UpdateBus, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.SerializeToString, - ), - 'SendLocationContinuous': grpc.stream_unary_rpc_method_handler( - servicer.SendLocationContinuous, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.SerializeToString, - ), - 'TrackBusContinuous': grpc.unary_stream_rpc_method_handler( - servicer.TrackBusContinuous, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.SerializeToString, - ), - 'StreamBusVideo': grpc.stream_unary_rpc_method_handler( - servicer.StreamBusVideo, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.SerializeToString, - ), + "CreateBus": grpc.unary_unary_rpc_method_handler( + servicer.CreateBus, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.SerializeToString, + ), + "GetBusListByNurseryId": grpc.unary_unary_rpc_method_handler( + servicer.GetBusListByNurseryId, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.SerializeToString, + ), + "GetRunningBusByGuardianId": grpc.unary_unary_rpc_method_handler( + servicer.GetRunningBusByGuardianId, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.SerializeToString, + ), + "UpdateBus": grpc.unary_unary_rpc_method_handler( + servicer.UpdateBus, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.SerializeToString, + ), + "SendLocationContinuous": grpc.stream_unary_rpc_method_handler( + servicer.SendLocationContinuous, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.SerializeToString, + ), + "TrackBusContinuous": grpc.unary_stream_rpc_method_handler( + servicer.TrackBusContinuous, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.SerializeToString, + ), + "StreamBusVideo": grpc.stream_unary_rpc_method_handler( + servicer.StreamBusVideo, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'where_child_bus.v1.BusService', rpc_method_handlers) + "where_child_bus.v1.BusService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class BusService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def CreateBus(request, + def CreateBus( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/CreateBus', + "/where_child_bus.v1.BusService/CreateBus", where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetBusListByNurseryId(request, + def GetBusListByNurseryId( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/GetBusListByNurseryId', + "/where_child_bus.v1.BusService/GetBusListByNurseryId", where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetRunningBusByGuardianId(request, + def GetRunningBusByGuardianId( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/GetRunningBusByGuardianId', + "/where_child_bus.v1.BusService/GetRunningBusByGuardianId", where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def UpdateBus(request, + def UpdateBus( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/UpdateBus', + "/where_child_bus.v1.BusService/UpdateBus", where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def SendLocationContinuous(request_iterator, + def SendLocationContinuous( + request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.stream_unary( + request_iterator, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.stream_unary(request_iterator, target, '/where_child_bus.v1.BusService/SendLocationContinuous', + "/where_child_bus.v1.BusService/SendLocationContinuous", where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def TrackBusContinuous(request, + def TrackBusContinuous( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_stream( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_stream(request, target, '/where_child_bus.v1.BusService/TrackBusContinuous', + "/where_child_bus.v1.BusService/TrackBusContinuous", where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def StreamBusVideo(request_iterator, + def StreamBusVideo( + request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.stream_unary( + request_iterator, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.stream_unary(request_iterator, target, '/where_child_bus.v1.BusService/StreamBusVideo', + "/where_child_bus.v1.BusService/StreamBusVideo", where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2.py b/machine_learning/src/generated/where_child_bus/v1/child_pb2.py index febe4511..a5cb9fb7 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2.py @@ -7,47 +7,55 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 +from where_child_bus.v1 import ( + resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, +) - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"5\n\x18\x43heckIsChildInBusRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"7\n\x19\x43heckIsChildInBusResponse\x12\x1a\n\tis_in_bus\x18\x01 \x01(\x08R\x07isInBus\"\x9b\x03\n\x12UpdateChildRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x03 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x04 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x05 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x06 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x07 \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x08 \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\t \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\n \x01(\x08R\x08hasOther\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"F\n\x13UpdateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild2\xc5\x05\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponse\x12p\n\x11\x43heckIsChildInBus\x12,.where_child_bus.v1.CheckIsChildInBusRequest\x1a-.where_child_bus.v1.CheckIsChildInBusResponse\x12^\n\x0bUpdateChild\x12&.where_child_bus.v1.UpdateChildRequest\x1a\'.where_child_bus.v1.UpdateChildResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos"5\n\x18\x43heckIsChildInBusRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId"7\n\x19\x43heckIsChildInBusResponse\x12\x1a\n\tis_in_bus\x18\x01 \x01(\x08R\x07isInBus"\x9b\x03\n\x12UpdateChildRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x03 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x04 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x05 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x06 \x01(\x08R\x06hasBag\x12"\n\rhas_lunch_box\x18\x07 \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x08 \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\t \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\n \x01(\x08R\x08hasOther\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask"F\n\x13UpdateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild2\xc5\x05\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponse\x12p\n\x11\x43heckIsChildInBus\x12,.where_child_bus.v1.CheckIsChildInBusRequest\x1a-.where_child_bus.v1.CheckIsChildInBusResponse\x12^\n\x0bUpdateChild\x12&.where_child_bus.v1.UpdateChildRequest\x1a\'.where_child_bus.v1.UpdateChildResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.child_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.child_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\nChildProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATECHILDREQUEST']._serialized_start=125 - _globals['_CREATECHILDREQUEST']._serialized_end=314 - _globals['_CREATECHILDRESPONSE']._serialized_start=316 - _globals['_CREATECHILDRESPONSE']._serialized_end=386 - _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=388 - _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=451 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=454 - _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=598 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=600 - _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=666 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=669 - _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=814 - _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=816 - _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=867 - _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=870 - _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=1010 - _globals['_CHECKISCHILDINBUSREQUEST']._serialized_start=1012 - _globals['_CHECKISCHILDINBUSREQUEST']._serialized_end=1065 - _globals['_CHECKISCHILDINBUSRESPONSE']._serialized_start=1067 - _globals['_CHECKISCHILDINBUSRESPONSE']._serialized_end=1122 - _globals['_UPDATECHILDREQUEST']._serialized_start=1125 - _globals['_UPDATECHILDREQUEST']._serialized_end=1536 - _globals['_UPDATECHILDRESPONSE']._serialized_start=1538 - _globals['_UPDATECHILDRESPONSE']._serialized_end=1608 - _globals['_CHILDSERVICE']._serialized_start=1611 - _globals['_CHILDSERVICE']._serialized_end=2320 + _globals["DESCRIPTOR"]._options = None + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"\n\026com.where_child_bus.v1B\nChildProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + _globals["_CREATECHILDREQUEST"]._serialized_start = 125 + _globals["_CREATECHILDREQUEST"]._serialized_end = 314 + _globals["_CREATECHILDRESPONSE"]._serialized_start = 316 + _globals["_CREATECHILDRESPONSE"]._serialized_end = 386 + _globals["_GETCHILDLISTBYNURSERYIDREQUEST"]._serialized_start = 388 + _globals["_GETCHILDLISTBYNURSERYIDREQUEST"]._serialized_end = 451 + _globals["_GETCHILDLISTBYNURSERYIDRESPONSE"]._serialized_start = 454 + _globals["_GETCHILDLISTBYNURSERYIDRESPONSE"]._serialized_end = 598 + _globals["_GETCHILDLISTBYGUARDIANIDREQUEST"]._serialized_start = 600 + _globals["_GETCHILDLISTBYGUARDIANIDREQUEST"]._serialized_end = 666 + _globals["_GETCHILDLISTBYGUARDIANIDRESPONSE"]._serialized_start = 669 + _globals["_GETCHILDLISTBYGUARDIANIDRESPONSE"]._serialized_end = 814 + _globals["_GETCHILDLISTBYBUSIDREQUEST"]._serialized_start = 816 + _globals["_GETCHILDLISTBYBUSIDREQUEST"]._serialized_end = 867 + _globals["_GETCHILDLISTBYBUSIDRESPONSE"]._serialized_start = 870 + _globals["_GETCHILDLISTBYBUSIDRESPONSE"]._serialized_end = 1010 + _globals["_CHECKISCHILDINBUSREQUEST"]._serialized_start = 1012 + _globals["_CHECKISCHILDINBUSREQUEST"]._serialized_end = 1065 + _globals["_CHECKISCHILDINBUSRESPONSE"]._serialized_start = 1067 + _globals["_CHECKISCHILDINBUSRESPONSE"]._serialized_end = 1122 + _globals["_UPDATECHILDREQUEST"]._serialized_start = 1125 + _globals["_UPDATECHILDREQUEST"]._serialized_end = 1536 + _globals["_UPDATECHILDRESPONSE"]._serialized_start = 1538 + _globals["_UPDATECHILDRESPONSE"]._serialized_end = 1608 + _globals["_CHILDSERVICE"]._serialized_start = 1611 + _globals["_CHILDSERVICE"]._serialized_end = 2320 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi index affd722c..df9075e1 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi @@ -1,9 +1,14 @@ -from where_child_bus.v1 import resources_pb2 as _resources_pb2 -from google.protobuf import field_mask_pb2 as _field_mask_pb2 -from google.protobuf.internal import containers as _containers +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + from google.protobuf import descriptor as _descriptor +from google.protobuf import field_mask_pb2 as _field_mask_pb2 from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union +from google.protobuf.internal import containers as _containers +from where_child_bus.v1 import resources_pb2 as _resources_pb2 DESCRIPTOR: _descriptor.FileDescriptor @@ -21,13 +26,23 @@ class CreateChildRequest(_message.Message): age: int sex: _resources_pb2.Sex photos: _containers.RepeatedScalarFieldContainer[bytes] - def __init__(self, nursery_id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[_resources_pb2.Sex, str]] = ..., photos: _Optional[_Iterable[bytes]] = ...) -> None: ... + def __init__( + self, + nursery_id: _Optional[str] = ..., + guardian_id: _Optional[str] = ..., + name: _Optional[str] = ..., + age: _Optional[int] = ..., + sex: _Optional[_Union[_resources_pb2.Sex, str]] = ..., + photos: _Optional[_Iterable[bytes]] = ..., + ) -> None: ... class CreateChildResponse(_message.Message): __slots__ = ("child",) CHILD_FIELD_NUMBER: _ClassVar[int] child: _resources_pb2.Child - def __init__(self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ...) -> None: ... + def __init__( + self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ... + ) -> None: ... class GetChildListByNurseryIDRequest(_message.Message): __slots__ = ("nursery_id",) @@ -41,7 +56,11 @@ class GetChildListByNurseryIDResponse(_message.Message): PHOTOS_FIELD_NUMBER: _ClassVar[int] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] - def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... + def __init__( + self, + children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., + photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ..., + ) -> None: ... class GetChildListByGuardianIDRequest(_message.Message): __slots__ = ("guardian_id",) @@ -55,7 +74,11 @@ class GetChildListByGuardianIDResponse(_message.Message): PHOTOS_FIELD_NUMBER: _ClassVar[int] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] - def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... + def __init__( + self, + children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., + photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ..., + ) -> None: ... class GetChildListByBusIDRequest(_message.Message): __slots__ = ("bus_id",) @@ -69,7 +92,11 @@ class GetChildListByBusIDResponse(_message.Message): PHOTOS_FIELD_NUMBER: _ClassVar[int] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] - def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... + def __init__( + self, + children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., + photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ..., + ) -> None: ... class CheckIsChildInBusRequest(_message.Message): __slots__ = ("child_id",) @@ -84,7 +111,19 @@ class CheckIsChildInBusResponse(_message.Message): def __init__(self, is_in_bus: bool = ...) -> None: ... class UpdateChildRequest(_message.Message): - __slots__ = ("child_id", "name", "age", "sex", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "update_mask") + __slots__ = ( + "child_id", + "name", + "age", + "sex", + "check_for_missing_items", + "has_bag", + "has_lunch_box", + "has_water_bottle", + "has_umbrella", + "has_other", + "update_mask", + ) CHILD_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] AGE_FIELD_NUMBER: _ClassVar[int] @@ -107,10 +146,25 @@ class UpdateChildRequest(_message.Message): has_umbrella: bool has_other: bool update_mask: _field_mask_pb2.FieldMask - def __init__(self, child_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[_resources_pb2.Sex, str]] = ..., check_for_missing_items: bool = ..., has_bag: bool = ..., has_lunch_box: bool = ..., has_water_bottle: bool = ..., has_umbrella: bool = ..., has_other: bool = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__( + self, + child_id: _Optional[str] = ..., + name: _Optional[str] = ..., + age: _Optional[int] = ..., + sex: _Optional[_Union[_resources_pb2.Sex, str]] = ..., + check_for_missing_items: bool = ..., + has_bag: bool = ..., + has_lunch_box: bool = ..., + has_water_bottle: bool = ..., + has_umbrella: bool = ..., + has_other: bool = ..., + update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ..., + ) -> None: ... class UpdateChildResponse(_message.Message): __slots__ = ("child",) CHILD_FIELD_NUMBER: _ClassVar[int] child: _resources_pb2.Child - def __init__(self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ...) -> None: ... + def __init__( + self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ... + ) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py index d46ec0d9..1fe37acb 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - from where_child_bus.v1 import child_pb2 as where__child__bus_dot_v1_dot_child__pb2 @@ -15,35 +14,35 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.CreateChild = channel.unary_unary( - '/where_child_bus.v1.ChildService/CreateChild', - request_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.FromString, - ) + "/where_child_bus.v1.ChildService/CreateChild", + request_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.FromString, + ) self.GetChildListByNurseryID = channel.unary_unary( - '/where_child_bus.v1.ChildService/GetChildListByNurseryID', - request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, - ) + "/where_child_bus.v1.ChildService/GetChildListByNurseryID", + request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, + ) self.GetChildListByGuardianID = channel.unary_unary( - '/where_child_bus.v1.ChildService/GetChildListByGuardianID', - request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.FromString, - ) + "/where_child_bus.v1.ChildService/GetChildListByGuardianID", + request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.FromString, + ) self.GetChildListByBusID = channel.unary_unary( - '/where_child_bus.v1.ChildService/GetChildListByBusID', - request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.FromString, - ) + "/where_child_bus.v1.ChildService/GetChildListByBusID", + request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.FromString, + ) self.CheckIsChildInBus = channel.unary_unary( - '/where_child_bus.v1.ChildService/CheckIsChildInBus', - request_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.FromString, - ) + "/where_child_bus.v1.ChildService/CheckIsChildInBus", + request_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.FromString, + ) self.UpdateChild = channel.unary_unary( - '/where_child_bus.v1.ChildService/UpdateChild', - request_serializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.FromString, - ) + "/where_child_bus.v1.ChildService/UpdateChild", + request_serializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.FromString, + ) class ChildServiceServicer(object): @@ -52,180 +51,253 @@ class ChildServiceServicer(object): def CreateChild(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetChildListByNurseryID(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetChildListByGuardianID(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetChildListByBusID(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def CheckIsChildInBus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def UpdateChild(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_ChildServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'CreateChild': grpc.unary_unary_rpc_method_handler( - servicer.CreateChild, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.SerializeToString, - ), - 'GetChildListByNurseryID': grpc.unary_unary_rpc_method_handler( - servicer.GetChildListByNurseryID, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.SerializeToString, - ), - 'GetChildListByGuardianID': grpc.unary_unary_rpc_method_handler( - servicer.GetChildListByGuardianID, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.SerializeToString, - ), - 'GetChildListByBusID': grpc.unary_unary_rpc_method_handler( - servicer.GetChildListByBusID, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.SerializeToString, - ), - 'CheckIsChildInBus': grpc.unary_unary_rpc_method_handler( - servicer.CheckIsChildInBus, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.SerializeToString, - ), - 'UpdateChild': grpc.unary_unary_rpc_method_handler( - servicer.UpdateChild, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.SerializeToString, - ), + "CreateChild": grpc.unary_unary_rpc_method_handler( + servicer.CreateChild, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.SerializeToString, + ), + "GetChildListByNurseryID": grpc.unary_unary_rpc_method_handler( + servicer.GetChildListByNurseryID, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.SerializeToString, + ), + "GetChildListByGuardianID": grpc.unary_unary_rpc_method_handler( + servicer.GetChildListByGuardianID, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.SerializeToString, + ), + "GetChildListByBusID": grpc.unary_unary_rpc_method_handler( + servicer.GetChildListByBusID, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.SerializeToString, + ), + "CheckIsChildInBus": grpc.unary_unary_rpc_method_handler( + servicer.CheckIsChildInBus, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.SerializeToString, + ), + "UpdateChild": grpc.unary_unary_rpc_method_handler( + servicer.UpdateChild, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'where_child_bus.v1.ChildService', rpc_method_handlers) + "where_child_bus.v1.ChildService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class ChildService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def CreateChild(request, + def CreateChild( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/CreateChild', + "/where_child_bus.v1.ChildService/CreateChild", where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetChildListByNurseryID(request, + def GetChildListByNurseryID( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByNurseryID', + "/where_child_bus.v1.ChildService/GetChildListByNurseryID", where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetChildListByGuardianID(request, + def GetChildListByGuardianID( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByGuardianID', + "/where_child_bus.v1.ChildService/GetChildListByGuardianID", where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetChildListByBusID(request, + def GetChildListByBusID( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByBusID', + "/where_child_bus.v1.ChildService/GetChildListByBusID", where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def CheckIsChildInBus(request, + def CheckIsChildInBus( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/CheckIsChildInBus', + "/where_child_bus.v1.ChildService/CheckIsChildInBus", where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def UpdateChild(request, + def UpdateChild( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/UpdateChild', + "/where_child_bus.v1.ChildService/UpdateChild", where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.py b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.py index b1182eaa..5fdb5451 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.py @@ -7,35 +7,40 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$where_child_bus/v1/child_photo.proto\x12\x12where_child_bus.v1\"6\n\x17\x44uplicationCheckRequest\x12\x1b\n\tchild_ids\x18\x01 \x03(\tR\x08\x63hildIds\"\x89\x01\n\x18\x44uplicationCheckResponse\x12#\n\ris_duplicated\x18\x01 \x01(\x08R\x0cisDuplicated\x12\x1b\n\tphoto_ids\x18\x02 \x03(\tR\x08photoIds\x12+\n\x11\x64uplicated_photos\x18\x03 \x03(\x0cR\x10\x64uplicatedPhotos\"+\n\x17\x44\x65leteChildPhotoRequest\x12\x10\n\x03ids\x18\x01 \x03(\tR\x03ids\"T\n\x18\x44\x65leteChildPhotoResponse\x12&\n\x0fis_success_list\x18\x01 \x03(\x08R\risSuccessList\x12\x10\n\x03ids\x18\x02 \x03(\tR\x03ids\"1\n\x14GetChildPhotoRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"P\n\x12\x43hildPhotoResponse\x12$\n\x0e\x63hild_photo_id\x18\x01 \x01(\tR\x0c\x63hildPhotoId\x12\x14\n\x05photo\x18\x02 \x01(\x0cR\x05photo\"b\n\x15GetChildPhotoResponse\x12I\n\x0c\x63hild_photos\x18\x01 \x03(\x0b\x32&.where_child_bus.v1.ChildPhotoResponseR\x0b\x63hildPhotos2\xd7\x02\n\x11\x43hildPhotoService\x12m\n\x10\x44uplicationCheck\x12+.where_child_bus.v1.DuplicationCheckRequest\x1a,.where_child_bus.v1.DuplicationCheckResponse\x12m\n\x10\x44\x65leteChildPhoto\x12+.where_child_bus.v1.DeleteChildPhotoRequest\x1a,.where_child_bus.v1.DeleteChildPhotoResponse\x12\x64\n\rGetChildPhoto\x12(.where_child_bus.v1.GetChildPhotoRequest\x1a).where_child_bus.v1.GetChildPhotoResponseB\xf2\x01\n\x16\x63om.where_child_bus.v1B\x0f\x43hildPhotoProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n$where_child_bus/v1/child_photo.proto\x12\x12where_child_bus.v1"6\n\x17\x44uplicationCheckRequest\x12\x1b\n\tchild_ids\x18\x01 \x03(\tR\x08\x63hildIds"\x89\x01\n\x18\x44uplicationCheckResponse\x12#\n\ris_duplicated\x18\x01 \x01(\x08R\x0cisDuplicated\x12\x1b\n\tphoto_ids\x18\x02 \x03(\tR\x08photoIds\x12+\n\x11\x64uplicated_photos\x18\x03 \x03(\x0cR\x10\x64uplicatedPhotos"+\n\x17\x44\x65leteChildPhotoRequest\x12\x10\n\x03ids\x18\x01 \x03(\tR\x03ids"T\n\x18\x44\x65leteChildPhotoResponse\x12&\n\x0fis_success_list\x18\x01 \x03(\x08R\risSuccessList\x12\x10\n\x03ids\x18\x02 \x03(\tR\x03ids"1\n\x14GetChildPhotoRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId"P\n\x12\x43hildPhotoResponse\x12$\n\x0e\x63hild_photo_id\x18\x01 \x01(\tR\x0c\x63hildPhotoId\x12\x14\n\x05photo\x18\x02 \x01(\x0cR\x05photo"b\n\x15GetChildPhotoResponse\x12I\n\x0c\x63hild_photos\x18\x01 \x03(\x0b\x32&.where_child_bus.v1.ChildPhotoResponseR\x0b\x63hildPhotos2\xd7\x02\n\x11\x43hildPhotoService\x12m\n\x10\x44uplicationCheck\x12+.where_child_bus.v1.DuplicationCheckRequest\x1a,.where_child_bus.v1.DuplicationCheckResponse\x12m\n\x10\x44\x65leteChildPhoto\x12+.where_child_bus.v1.DeleteChildPhotoRequest\x1a,.where_child_bus.v1.DeleteChildPhotoResponse\x12\x64\n\rGetChildPhoto\x12(.where_child_bus.v1.GetChildPhotoRequest\x1a).where_child_bus.v1.GetChildPhotoResponseB\xf2\x01\n\x16\x63om.where_child_bus.v1B\x0f\x43hildPhotoProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.child_photo_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.child_photo_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\017ChildPhotoProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_DUPLICATIONCHECKREQUEST']._serialized_start=60 - _globals['_DUPLICATIONCHECKREQUEST']._serialized_end=114 - _globals['_DUPLICATIONCHECKRESPONSE']._serialized_start=117 - _globals['_DUPLICATIONCHECKRESPONSE']._serialized_end=254 - _globals['_DELETECHILDPHOTOREQUEST']._serialized_start=256 - _globals['_DELETECHILDPHOTOREQUEST']._serialized_end=299 - _globals['_DELETECHILDPHOTORESPONSE']._serialized_start=301 - _globals['_DELETECHILDPHOTORESPONSE']._serialized_end=385 - _globals['_GETCHILDPHOTOREQUEST']._serialized_start=387 - _globals['_GETCHILDPHOTOREQUEST']._serialized_end=436 - _globals['_CHILDPHOTORESPONSE']._serialized_start=438 - _globals['_CHILDPHOTORESPONSE']._serialized_end=518 - _globals['_GETCHILDPHOTORESPONSE']._serialized_start=520 - _globals['_GETCHILDPHOTORESPONSE']._serialized_end=618 - _globals['_CHILDPHOTOSERVICE']._serialized_start=621 - _globals['_CHILDPHOTOSERVICE']._serialized_end=964 + _globals["DESCRIPTOR"]._options = None + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"\n\026com.where_child_bus.v1B\017ChildPhotoProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + _globals["_DUPLICATIONCHECKREQUEST"]._serialized_start = 60 + _globals["_DUPLICATIONCHECKREQUEST"]._serialized_end = 114 + _globals["_DUPLICATIONCHECKRESPONSE"]._serialized_start = 117 + _globals["_DUPLICATIONCHECKRESPONSE"]._serialized_end = 254 + _globals["_DELETECHILDPHOTOREQUEST"]._serialized_start = 256 + _globals["_DELETECHILDPHOTOREQUEST"]._serialized_end = 299 + _globals["_DELETECHILDPHOTORESPONSE"]._serialized_start = 301 + _globals["_DELETECHILDPHOTORESPONSE"]._serialized_end = 385 + _globals["_GETCHILDPHOTOREQUEST"]._serialized_start = 387 + _globals["_GETCHILDPHOTOREQUEST"]._serialized_end = 436 + _globals["_CHILDPHOTORESPONSE"]._serialized_start = 438 + _globals["_CHILDPHOTORESPONSE"]._serialized_end = 518 + _globals["_GETCHILDPHOTORESPONSE"]._serialized_start = 520 + _globals["_GETCHILDPHOTORESPONSE"]._serialized_end = 618 + _globals["_CHILDPHOTOSERVICE"]._serialized_start = 621 + _globals["_CHILDPHOTOSERVICE"]._serialized_end = 964 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.pyi index 231461af..65a8d964 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.pyi @@ -1,7 +1,12 @@ -from google.protobuf.internal import containers as _containers +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union +from google.protobuf.internal import containers as _containers DESCRIPTOR: _descriptor.FileDescriptor @@ -19,7 +24,12 @@ class DuplicationCheckResponse(_message.Message): is_duplicated: bool photo_ids: _containers.RepeatedScalarFieldContainer[str] duplicated_photos: _containers.RepeatedScalarFieldContainer[bytes] - def __init__(self, is_duplicated: bool = ..., photo_ids: _Optional[_Iterable[str]] = ..., duplicated_photos: _Optional[_Iterable[bytes]] = ...) -> None: ... + def __init__( + self, + is_duplicated: bool = ..., + photo_ids: _Optional[_Iterable[str]] = ..., + duplicated_photos: _Optional[_Iterable[bytes]] = ..., + ) -> None: ... class DeleteChildPhotoRequest(_message.Message): __slots__ = ("ids",) @@ -33,7 +43,11 @@ class DeleteChildPhotoResponse(_message.Message): IDS_FIELD_NUMBER: _ClassVar[int] is_success_list: _containers.RepeatedScalarFieldContainer[bool] ids: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, is_success_list: _Optional[_Iterable[bool]] = ..., ids: _Optional[_Iterable[str]] = ...) -> None: ... + def __init__( + self, + is_success_list: _Optional[_Iterable[bool]] = ..., + ids: _Optional[_Iterable[str]] = ..., + ) -> None: ... class GetChildPhotoRequest(_message.Message): __slots__ = ("child_id",) @@ -47,10 +61,15 @@ class ChildPhotoResponse(_message.Message): PHOTO_FIELD_NUMBER: _ClassVar[int] child_photo_id: str photo: bytes - def __init__(self, child_photo_id: _Optional[str] = ..., photo: _Optional[bytes] = ...) -> None: ... + def __init__( + self, child_photo_id: _Optional[str] = ..., photo: _Optional[bytes] = ... + ) -> None: ... class GetChildPhotoResponse(_message.Message): __slots__ = ("child_photos",) CHILD_PHOTOS_FIELD_NUMBER: _ClassVar[int] child_photos: _containers.RepeatedCompositeFieldContainer[ChildPhotoResponse] - def __init__(self, child_photos: _Optional[_Iterable[_Union[ChildPhotoResponse, _Mapping]]] = ...) -> None: ... + def __init__( + self, + child_photos: _Optional[_Iterable[_Union[ChildPhotoResponse, _Mapping]]] = ..., + ) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py index af91ae42..1b67a22d 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py @@ -1,8 +1,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - -from where_child_bus.v1 import child_photo_pb2 as where__child__bus_dot_v1_dot_child__photo__pb2 +from where_child_bus.v1 import ( + child_photo_pb2 as where__child__bus_dot_v1_dot_child__photo__pb2, +) class ChildPhotoServiceStub(object): @@ -15,20 +16,20 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.DuplicationCheck = channel.unary_unary( - '/where_child_bus.v1.ChildPhotoService/DuplicationCheck', - request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.FromString, - ) + "/where_child_bus.v1.ChildPhotoService/DuplicationCheck", + request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.FromString, + ) self.DeleteChildPhoto = channel.unary_unary( - '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', - request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.FromString, - ) + "/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto", + request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.FromString, + ) self.GetChildPhoto = channel.unary_unary( - '/where_child_bus.v1.ChildPhotoService/GetChildPhoto', - request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.FromString, - ) + "/where_child_bus.v1.ChildPhotoService/GetChildPhoto", + request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.FromString, + ) class ChildPhotoServiceServicer(object): @@ -37,96 +38,133 @@ class ChildPhotoServiceServicer(object): def DuplicationCheck(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def DeleteChildPhoto(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetChildPhoto(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_ChildPhotoServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'DuplicationCheck': grpc.unary_unary_rpc_method_handler( - servicer.DuplicationCheck, - request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.SerializeToString, - ), - 'DeleteChildPhoto': grpc.unary_unary_rpc_method_handler( - servicer.DeleteChildPhoto, - request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.SerializeToString, - ), - 'GetChildPhoto': grpc.unary_unary_rpc_method_handler( - servicer.GetChildPhoto, - request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.SerializeToString, - ), + "DuplicationCheck": grpc.unary_unary_rpc_method_handler( + servicer.DuplicationCheck, + request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.SerializeToString, + ), + "DeleteChildPhoto": grpc.unary_unary_rpc_method_handler( + servicer.DeleteChildPhoto, + request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.SerializeToString, + ), + "GetChildPhoto": grpc.unary_unary_rpc_method_handler( + servicer.GetChildPhoto, + request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'where_child_bus.v1.ChildPhotoService', rpc_method_handlers) + "where_child_bus.v1.ChildPhotoService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class ChildPhotoService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def DuplicationCheck(request, + def DuplicationCheck( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildPhotoService/DuplicationCheck', + "/where_child_bus.v1.ChildPhotoService/DuplicationCheck", where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.SerializeToString, where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def DeleteChildPhoto(request, + def DeleteChildPhoto( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', + "/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto", where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.SerializeToString, where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetChildPhoto(request, + def GetChildPhoto( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildPhotoService/GetChildPhoto', + "/where_child_bus.v1.ChildPhotoService/GetChildPhoto", where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.SerializeToString, where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py index ac939a62..80ae2207 100644 --- a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py @@ -7,47 +7,55 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 +from where_child_bus.v1 import ( + resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, +) - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"B\n!GetGuardianListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"h\n\"GetGuardianListByNurseryIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"\x9c\x02\n\x15UpdateGuardianRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x03 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x05 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x06 \x01(\x08R\x0fisUseEveningBus\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"Z\n\x16UpdateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian2\xd3\x05\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponse\x12y\n\x14GetGuardianByChildId\x12/.where_child_bus.v1.GetGuardianByChildIdRequest\x1a\x30.where_child_bus.v1.GetGuardianByChildIdResponse\x12\x8b\x01\n\x1aGetGuardianListByNurseryId\x12\x35.where_child_bus.v1.GetGuardianListByNurseryIdRequest\x1a\x36.where_child_bus.v1.GetGuardianListByNurseryIdResponse\x12g\n\x0eUpdateGuardian\x12).where_child_bus.v1.UpdateGuardianRequest\x1a*.where_child_bus.v1.UpdateGuardianResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian"B\n!GetGuardianListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"h\n"GetGuardianListByNurseryIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians"\x9c\x02\n\x15UpdateGuardianRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x03 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x05 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x06 \x01(\x08R\x0fisUseEveningBus\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask"Z\n\x16UpdateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian2\xd3\x05\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponse\x12y\n\x14GetGuardianByChildId\x12/.where_child_bus.v1.GetGuardianByChildIdRequest\x1a\x30.where_child_bus.v1.GetGuardianByChildIdResponse\x12\x8b\x01\n\x1aGetGuardianListByNurseryId\x12\x35.where_child_bus.v1.GetGuardianListByNurseryIdRequest\x1a\x36.where_child_bus.v1.GetGuardianListByNurseryIdResponse\x12g\n\x0eUpdateGuardian\x12).where_child_bus.v1.UpdateGuardianRequest\x1a*.where_child_bus.v1.UpdateGuardianResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.guardian_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.guardian_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\rGuardianProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATEGUARDIANREQUEST']._serialized_start=128 - _globals['_CREATEGUARDIANREQUEST']._serialized_end=291 - _globals['_CREATEGUARDIANRESPONSE']._serialized_start=293 - _globals['_CREATEGUARDIANRESPONSE']._serialized_end=383 - _globals['_GUARDIANLOGINREQUEST']._serialized_start=385 - _globals['_GUARDIANLOGINREQUEST']._serialized_end=457 - _globals['_GUARDIANLOGINRESPONSE']._serialized_start=460 - _globals['_GUARDIANLOGINRESPONSE']._serialized_end=638 - _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_start=640 - _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_end=694 - _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_start=696 - _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_end=796 - _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_start=798 - _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_end=854 - _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_start=856 - _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_end=952 - _globals['_GETGUARDIANLISTBYNURSERYIDREQUEST']._serialized_start=954 - _globals['_GETGUARDIANLISTBYNURSERYIDREQUEST']._serialized_end=1020 - _globals['_GETGUARDIANLISTBYNURSERYIDRESPONSE']._serialized_start=1022 - _globals['_GETGUARDIANLISTBYNURSERYIDRESPONSE']._serialized_end=1126 - _globals['_UPDATEGUARDIANREQUEST']._serialized_start=1129 - _globals['_UPDATEGUARDIANREQUEST']._serialized_end=1413 - _globals['_UPDATEGUARDIANRESPONSE']._serialized_start=1415 - _globals['_UPDATEGUARDIANRESPONSE']._serialized_end=1505 - _globals['_GUARDIANSERVICE']._serialized_start=1508 - _globals['_GUARDIANSERVICE']._serialized_end=2231 + _globals["DESCRIPTOR"]._options = None + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"\n\026com.where_child_bus.v1B\rGuardianProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + _globals["_CREATEGUARDIANREQUEST"]._serialized_start = 128 + _globals["_CREATEGUARDIANREQUEST"]._serialized_end = 291 + _globals["_CREATEGUARDIANRESPONSE"]._serialized_start = 293 + _globals["_CREATEGUARDIANRESPONSE"]._serialized_end = 383 + _globals["_GUARDIANLOGINREQUEST"]._serialized_start = 385 + _globals["_GUARDIANLOGINREQUEST"]._serialized_end = 457 + _globals["_GUARDIANLOGINRESPONSE"]._serialized_start = 460 + _globals["_GUARDIANLOGINRESPONSE"]._serialized_end = 638 + _globals["_GETGUARDIANLISTBYBUSIDREQUEST"]._serialized_start = 640 + _globals["_GETGUARDIANLISTBYBUSIDREQUEST"]._serialized_end = 694 + _globals["_GETGUARDIANLISTBYBUSIDRESPONSE"]._serialized_start = 696 + _globals["_GETGUARDIANLISTBYBUSIDRESPONSE"]._serialized_end = 796 + _globals["_GETGUARDIANBYCHILDIDREQUEST"]._serialized_start = 798 + _globals["_GETGUARDIANBYCHILDIDREQUEST"]._serialized_end = 854 + _globals["_GETGUARDIANBYCHILDIDRESPONSE"]._serialized_start = 856 + _globals["_GETGUARDIANBYCHILDIDRESPONSE"]._serialized_end = 952 + _globals["_GETGUARDIANLISTBYNURSERYIDREQUEST"]._serialized_start = 954 + _globals["_GETGUARDIANLISTBYNURSERYIDREQUEST"]._serialized_end = 1020 + _globals["_GETGUARDIANLISTBYNURSERYIDRESPONSE"]._serialized_start = 1022 + _globals["_GETGUARDIANLISTBYNURSERYIDRESPONSE"]._serialized_end = 1126 + _globals["_UPDATEGUARDIANREQUEST"]._serialized_start = 1129 + _globals["_UPDATEGUARDIANREQUEST"]._serialized_end = 1413 + _globals["_UPDATEGUARDIANRESPONSE"]._serialized_start = 1415 + _globals["_UPDATEGUARDIANRESPONSE"]._serialized_end = 1505 + _globals["_GUARDIANSERVICE"]._serialized_start = 1508 + _globals["_GUARDIANSERVICE"]._serialized_end = 2231 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi index 5d451be4..00b098b8 100644 --- a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi @@ -1,9 +1,14 @@ -from where_child_bus.v1 import resources_pb2 as _resources_pb2 -from google.protobuf import field_mask_pb2 as _field_mask_pb2 -from google.protobuf.internal import containers as _containers +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + from google.protobuf import descriptor as _descriptor +from google.protobuf import field_mask_pb2 as _field_mask_pb2 from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union +from google.protobuf.internal import containers as _containers +from where_child_bus.v1 import resources_pb2 as _resources_pb2 DESCRIPTOR: _descriptor.FileDescriptor @@ -19,13 +24,23 @@ class CreateGuardianRequest(_message.Message): password: str name: str phone_number: str - def __init__(self, nursery_code: _Optional[str] = ..., email: _Optional[str] = ..., password: _Optional[str] = ..., name: _Optional[str] = ..., phone_number: _Optional[str] = ...) -> None: ... + def __init__( + self, + nursery_code: _Optional[str] = ..., + email: _Optional[str] = ..., + password: _Optional[str] = ..., + name: _Optional[str] = ..., + phone_number: _Optional[str] = ..., + ) -> None: ... class CreateGuardianResponse(_message.Message): __slots__ = ("guardian",) GUARDIAN_FIELD_NUMBER: _ClassVar[int] guardian: _resources_pb2.GuardianResponse - def __init__(self, guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ...) -> None: ... + def __init__( + self, + guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., + ) -> None: ... class GuardianLoginRequest(_message.Message): __slots__ = ("email", "password") @@ -33,7 +48,9 @@ class GuardianLoginRequest(_message.Message): PASSWORD_FIELD_NUMBER: _ClassVar[int] email: str password: str - def __init__(self, email: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... + def __init__( + self, email: _Optional[str] = ..., password: _Optional[str] = ... + ) -> None: ... class GuardianLoginResponse(_message.Message): __slots__ = ("success", "guardian", "nursery") @@ -43,7 +60,12 @@ class GuardianLoginResponse(_message.Message): success: bool guardian: _resources_pb2.GuardianResponse nursery: _resources_pb2.NurseryResponse - def __init__(self, success: bool = ..., guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... + def __init__( + self, + success: bool = ..., + guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., + nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ..., + ) -> None: ... class GetGuardianListByBusIdRequest(_message.Message): __slots__ = ("bus_id",) @@ -54,8 +76,15 @@ class GetGuardianListByBusIdRequest(_message.Message): class GetGuardianListByBusIdResponse(_message.Message): __slots__ = ("guardians",) GUARDIANS_FIELD_NUMBER: _ClassVar[int] - guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] - def __init__(self, guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... + guardians: _containers.RepeatedCompositeFieldContainer[ + _resources_pb2.GuardianResponse + ] + def __init__( + self, + guardians: _Optional[ + _Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]] + ] = ..., + ) -> None: ... class GetGuardianByChildIdRequest(_message.Message): __slots__ = ("child_id",) @@ -67,7 +96,10 @@ class GetGuardianByChildIdResponse(_message.Message): __slots__ = ("guardian",) GUARDIAN_FIELD_NUMBER: _ClassVar[int] guardian: _resources_pb2.GuardianResponse - def __init__(self, guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ...) -> None: ... + def __init__( + self, + guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., + ) -> None: ... class GetGuardianListByNurseryIdRequest(_message.Message): __slots__ = ("nursery_id",) @@ -78,11 +110,26 @@ class GetGuardianListByNurseryIdRequest(_message.Message): class GetGuardianListByNurseryIdResponse(_message.Message): __slots__ = ("guardians",) GUARDIANS_FIELD_NUMBER: _ClassVar[int] - guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] - def __init__(self, guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... + guardians: _containers.RepeatedCompositeFieldContainer[ + _resources_pb2.GuardianResponse + ] + def __init__( + self, + guardians: _Optional[ + _Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]] + ] = ..., + ) -> None: ... class UpdateGuardianRequest(_message.Message): - __slots__ = ("guardian_id", "name", "email", "phone_number", "is_use_morning_bus", "is_use_evening_bus", "update_mask") + __slots__ = ( + "guardian_id", + "name", + "email", + "phone_number", + "is_use_morning_bus", + "is_use_evening_bus", + "update_mask", + ) GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] EMAIL_FIELD_NUMBER: _ClassVar[int] @@ -97,10 +144,22 @@ class UpdateGuardianRequest(_message.Message): is_use_morning_bus: bool is_use_evening_bus: bool update_mask: _field_mask_pb2.FieldMask - def __init__(self, guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__( + self, + guardian_id: _Optional[str] = ..., + name: _Optional[str] = ..., + email: _Optional[str] = ..., + phone_number: _Optional[str] = ..., + is_use_morning_bus: bool = ..., + is_use_evening_bus: bool = ..., + update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ..., + ) -> None: ... class UpdateGuardianResponse(_message.Message): __slots__ = ("guardian",) GUARDIAN_FIELD_NUMBER: _ClassVar[int] guardian: _resources_pb2.GuardianResponse - def __init__(self, guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ...) -> None: ... + def __init__( + self, + guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., + ) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py index 0de6966e..c2b5722a 100644 --- a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py @@ -1,8 +1,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - -from where_child_bus.v1 import guardian_pb2 as where__child__bus_dot_v1_dot_guardian__pb2 +from where_child_bus.v1 import ( + guardian_pb2 as where__child__bus_dot_v1_dot_guardian__pb2, +) class GuardianServiceStub(object): @@ -15,35 +16,35 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.CreateGuardian = channel.unary_unary( - '/where_child_bus.v1.GuardianService/CreateGuardian', - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.FromString, - ) + "/where_child_bus.v1.GuardianService/CreateGuardian", + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.FromString, + ) self.GuardianLogin = channel.unary_unary( - '/where_child_bus.v1.GuardianService/GuardianLogin', - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.FromString, - ) + "/where_child_bus.v1.GuardianService/GuardianLogin", + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.FromString, + ) self.GetGuardianListByBusId = channel.unary_unary( - '/where_child_bus.v1.GuardianService/GetGuardianListByBusId', - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.FromString, - ) + "/where_child_bus.v1.GuardianService/GetGuardianListByBusId", + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.FromString, + ) self.GetGuardianByChildId = channel.unary_unary( - '/where_child_bus.v1.GuardianService/GetGuardianByChildId', - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.FromString, - ) + "/where_child_bus.v1.GuardianService/GetGuardianByChildId", + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.FromString, + ) self.GetGuardianListByNurseryId = channel.unary_unary( - '/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId', - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.FromString, - ) + "/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId", + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.FromString, + ) self.UpdateGuardian = channel.unary_unary( - '/where_child_bus.v1.GuardianService/UpdateGuardian', - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.FromString, - ) + "/where_child_bus.v1.GuardianService/UpdateGuardian", + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.FromString, + ) class GuardianServiceServicer(object): @@ -52,180 +53,253 @@ class GuardianServiceServicer(object): def CreateGuardian(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GuardianLogin(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetGuardianListByBusId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetGuardianByChildId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetGuardianListByNurseryId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def UpdateGuardian(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_GuardianServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'CreateGuardian': grpc.unary_unary_rpc_method_handler( - servicer.CreateGuardian, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.SerializeToString, - ), - 'GuardianLogin': grpc.unary_unary_rpc_method_handler( - servicer.GuardianLogin, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.SerializeToString, - ), - 'GetGuardianListByBusId': grpc.unary_unary_rpc_method_handler( - servicer.GetGuardianListByBusId, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.SerializeToString, - ), - 'GetGuardianByChildId': grpc.unary_unary_rpc_method_handler( - servicer.GetGuardianByChildId, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.SerializeToString, - ), - 'GetGuardianListByNurseryId': grpc.unary_unary_rpc_method_handler( - servicer.GetGuardianListByNurseryId, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.SerializeToString, - ), - 'UpdateGuardian': grpc.unary_unary_rpc_method_handler( - servicer.UpdateGuardian, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.SerializeToString, - ), + "CreateGuardian": grpc.unary_unary_rpc_method_handler( + servicer.CreateGuardian, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.SerializeToString, + ), + "GuardianLogin": grpc.unary_unary_rpc_method_handler( + servicer.GuardianLogin, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.SerializeToString, + ), + "GetGuardianListByBusId": grpc.unary_unary_rpc_method_handler( + servicer.GetGuardianListByBusId, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.SerializeToString, + ), + "GetGuardianByChildId": grpc.unary_unary_rpc_method_handler( + servicer.GetGuardianByChildId, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.SerializeToString, + ), + "GetGuardianListByNurseryId": grpc.unary_unary_rpc_method_handler( + servicer.GetGuardianListByNurseryId, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.SerializeToString, + ), + "UpdateGuardian": grpc.unary_unary_rpc_method_handler( + servicer.UpdateGuardian, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'where_child_bus.v1.GuardianService', rpc_method_handlers) + "where_child_bus.v1.GuardianService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class GuardianService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def CreateGuardian(request, + def CreateGuardian( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/CreateGuardian', + "/where_child_bus.v1.GuardianService/CreateGuardian", where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GuardianLogin(request, + def GuardianLogin( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GuardianLogin', + "/where_child_bus.v1.GuardianService/GuardianLogin", where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetGuardianListByBusId(request, + def GetGuardianListByBusId( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GetGuardianListByBusId', + "/where_child_bus.v1.GuardianService/GetGuardianListByBusId", where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetGuardianByChildId(request, + def GetGuardianByChildId( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GetGuardianByChildId', + "/where_child_bus.v1.GuardianService/GetGuardianByChildId", where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetGuardianListByNurseryId(request, + def GetGuardianListByNurseryId( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId', + "/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId", where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def UpdateGuardian(request, + def UpdateGuardian( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/UpdateGuardian', + "/where_child_bus.v1.GuardianService/UpdateGuardian", where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.py b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.py index 81c56abf..73842cef 100644 --- a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.py @@ -7,25 +7,30 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%where_child_bus/v1/health_check.proto\x12\x12where_child_bus.v1\"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2_\n\x12HealthcheckService\x12I\n\x04Ping\x12\x1f.where_child_bus.v1.PingRequest\x1a .where_child_bus.v1.PingResponseB\xf3\x01\n\x16\x63om.where_child_bus.v1B\x10HealthCheckProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n%where_child_bus/v1/health_check.proto\x12\x12where_child_bus.v1"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2_\n\x12HealthcheckService\x12I\n\x04Ping\x12\x1f.where_child_bus.v1.PingRequest\x1a .where_child_bus.v1.PingResponseB\xf3\x01\n\x16\x63om.where_child_bus.v1B\x10HealthCheckProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.health_check_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.health_check_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\020HealthCheckProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_PINGREQUEST']._serialized_start=61 - _globals['_PINGREQUEST']._serialized_end=94 - _globals['_PINGRESPONSE']._serialized_start=96 - _globals['_PINGRESPONSE']._serialized_end=136 - _globals['_HEALTHCHECKSERVICE']._serialized_start=138 - _globals['_HEALTHCHECKSERVICE']._serialized_end=233 + _globals["DESCRIPTOR"]._options = None + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"\n\026com.where_child_bus.v1B\020HealthCheckProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + _globals["_PINGREQUEST"]._serialized_start = 61 + _globals["_PINGREQUEST"]._serialized_end = 94 + _globals["_PINGRESPONSE"]._serialized_start = 96 + _globals["_PINGRESPONSE"]._serialized_end = 136 + _globals["_HEALTHCHECKSERVICE"]._serialized_start = 138 + _globals["_HEALTHCHECKSERVICE"]._serialized_end = 233 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.pyi index fb2e805c..49aebc89 100644 --- a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.pyi @@ -1,6 +1,8 @@ +from typing import ClassVar as _ClassVar +from typing import Optional as _Optional + from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Optional as _Optional DESCRIPTOR: _descriptor.FileDescriptor diff --git a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py index f0f6381c..165b520d 100644 --- a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py @@ -1,8 +1,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - -from where_child_bus.v1 import health_check_pb2 as where__child__bus_dot_v1_dot_health__check__pb2 +from where_child_bus.v1 import ( + health_check_pb2 as where__child__bus_dot_v1_dot_health__check__pb2, +) class HealthcheckServiceStub(object): @@ -15,10 +16,10 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Ping = channel.unary_unary( - '/where_child_bus.v1.HealthcheckService/Ping', - request_serializer=where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.FromString, - ) + "/where_child_bus.v1.HealthcheckService/Ping", + request_serializer=where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.FromString, + ) class HealthcheckServiceServicer(object): @@ -27,40 +28,53 @@ class HealthcheckServiceServicer(object): def Ping(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_HealthcheckServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'Ping': grpc.unary_unary_rpc_method_handler( - servicer.Ping, - request_deserializer=where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.SerializeToString, - ), + "Ping": grpc.unary_unary_rpc_method_handler( + servicer.Ping, + request_deserializer=where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'where_child_bus.v1.HealthcheckService', rpc_method_handlers) + "where_child_bus.v1.HealthcheckService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class HealthcheckService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Ping(request, + def Ping( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.HealthcheckService/Ping', + "/where_child_bus.v1.HealthcheckService/Ping", where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py index 144b73b5..d02bd4b3 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py @@ -7,39 +7,47 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 +from where_child_bus.v1 import ( + resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, +) - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"@\n\x1dGetNurseryByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"c\n\x1eGetNurseryByGuardianIdResponse\x12\x41\n\tnurseries\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\tnurseries\"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"\xe6\x01\n\x14UpdateNurseryRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x05 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x06 \x01(\tR\x08password\x12;\n\x0bupdate_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"V\n\x15UpdateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xc0\x03\n\x0eNurseryService\x12\x7f\n\x16GetNurseryByGuardianId\x12\x31.where_child_bus.v1.GetNurseryByGuardianIdRequest\x1a\x32.where_child_bus.v1.GetNurseryByGuardianIdResponse\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponse\x12\x64\n\rUpdateNursery\x12(.where_child_bus.v1.UpdateNurseryRequest\x1a).where_child_bus.v1.UpdateNurseryResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"@\n\x1dGetNurseryByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId"c\n\x1eGetNurseryByGuardianIdResponse\x12\x41\n\tnurseries\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\tnurseries"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery"\xe6\x01\n\x14UpdateNurseryRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x05 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x06 \x01(\tR\x08password\x12;\n\x0bupdate_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask"V\n\x15UpdateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xc0\x03\n\x0eNurseryService\x12\x7f\n\x16GetNurseryByGuardianId\x12\x31.where_child_bus.v1.GetNurseryByGuardianIdRequest\x1a\x32.where_child_bus.v1.GetNurseryByGuardianIdResponse\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponse\x12\x64\n\rUpdateNursery\x12(.where_child_bus.v1.UpdateNurseryRequest\x1a).where_child_bus.v1.UpdateNurseryResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.nursery_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.nursery_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014NurseryProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_GETNURSERYBYGUARDIANIDREQUEST']._serialized_start=126 - _globals['_GETNURSERYBYGUARDIANIDREQUEST']._serialized_end=190 - _globals['_GETNURSERYBYGUARDIANIDRESPONSE']._serialized_start=192 - _globals['_GETNURSERYBYGUARDIANIDRESPONSE']._serialized_end=291 - _globals['_CREATENURSERYREQUEST']._serialized_start=294 - _globals['_CREATENURSERYREQUEST']._serialized_end=447 - _globals['_CREATENURSERYRESPONSE']._serialized_start=449 - _globals['_CREATENURSERYRESPONSE']._serialized_end=535 - _globals['_NURSERYLOGINREQUEST']._serialized_start=537 - _globals['_NURSERYLOGINREQUEST']._serialized_end=608 - _globals['_NURSERYLOGINRESPONSE']._serialized_start=610 - _globals['_NURSERYLOGINRESPONSE']._serialized_end=721 - _globals['_UPDATENURSERYREQUEST']._serialized_start=724 - _globals['_UPDATENURSERYREQUEST']._serialized_end=954 - _globals['_UPDATENURSERYRESPONSE']._serialized_start=956 - _globals['_UPDATENURSERYRESPONSE']._serialized_end=1042 - _globals['_NURSERYSERVICE']._serialized_start=1045 - _globals['_NURSERYSERVICE']._serialized_end=1493 + _globals["DESCRIPTOR"]._options = None + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"\n\026com.where_child_bus.v1B\014NurseryProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + _globals["_GETNURSERYBYGUARDIANIDREQUEST"]._serialized_start = 126 + _globals["_GETNURSERYBYGUARDIANIDREQUEST"]._serialized_end = 190 + _globals["_GETNURSERYBYGUARDIANIDRESPONSE"]._serialized_start = 192 + _globals["_GETNURSERYBYGUARDIANIDRESPONSE"]._serialized_end = 291 + _globals["_CREATENURSERYREQUEST"]._serialized_start = 294 + _globals["_CREATENURSERYREQUEST"]._serialized_end = 447 + _globals["_CREATENURSERYRESPONSE"]._serialized_start = 449 + _globals["_CREATENURSERYRESPONSE"]._serialized_end = 535 + _globals["_NURSERYLOGINREQUEST"]._serialized_start = 537 + _globals["_NURSERYLOGINREQUEST"]._serialized_end = 608 + _globals["_NURSERYLOGINRESPONSE"]._serialized_start = 610 + _globals["_NURSERYLOGINRESPONSE"]._serialized_end = 721 + _globals["_UPDATENURSERYREQUEST"]._serialized_start = 724 + _globals["_UPDATENURSERYREQUEST"]._serialized_end = 954 + _globals["_UPDATENURSERYRESPONSE"]._serialized_start = 956 + _globals["_UPDATENURSERYRESPONSE"]._serialized_end = 1042 + _globals["_NURSERYSERVICE"]._serialized_start = 1045 + _globals["_NURSERYSERVICE"]._serialized_end = 1493 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi index 808c9f67..4a955823 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi @@ -1,8 +1,12 @@ -from where_child_bus.v1 import resources_pb2 as _resources_pb2 -from google.protobuf import field_mask_pb2 as _field_mask_pb2 +from typing import ClassVar as _ClassVar +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + from google.protobuf import descriptor as _descriptor +from google.protobuf import field_mask_pb2 as _field_mask_pb2 from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union +from where_child_bus.v1 import resources_pb2 as _resources_pb2 DESCRIPTOR: _descriptor.FileDescriptor @@ -16,7 +20,10 @@ class GetNurseryByGuardianIdResponse(_message.Message): __slots__ = ("nurseries",) NURSERIES_FIELD_NUMBER: _ClassVar[int] nurseries: _resources_pb2.NurseryResponse - def __init__(self, nurseries: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... + def __init__( + self, + nurseries: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ..., + ) -> None: ... class CreateNurseryRequest(_message.Message): __slots__ = ("email", "password", "name", "phone_number", "address") @@ -30,13 +37,22 @@ class CreateNurseryRequest(_message.Message): name: str phone_number: str address: str - def __init__(self, email: _Optional[str] = ..., password: _Optional[str] = ..., name: _Optional[str] = ..., phone_number: _Optional[str] = ..., address: _Optional[str] = ...) -> None: ... + def __init__( + self, + email: _Optional[str] = ..., + password: _Optional[str] = ..., + name: _Optional[str] = ..., + phone_number: _Optional[str] = ..., + address: _Optional[str] = ..., + ) -> None: ... class CreateNurseryResponse(_message.Message): __slots__ = ("nursery",) NURSERY_FIELD_NUMBER: _ClassVar[int] nursery: _resources_pb2.NurseryResponse - def __init__(self, nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... + def __init__( + self, nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ... + ) -> None: ... class NurseryLoginRequest(_message.Message): __slots__ = ("email", "password") @@ -44,7 +60,9 @@ class NurseryLoginRequest(_message.Message): PASSWORD_FIELD_NUMBER: _ClassVar[int] email: str password: str - def __init__(self, email: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... + def __init__( + self, email: _Optional[str] = ..., password: _Optional[str] = ... + ) -> None: ... class NurseryLoginResponse(_message.Message): __slots__ = ("success", "nursery") @@ -52,10 +70,22 @@ class NurseryLoginResponse(_message.Message): NURSERY_FIELD_NUMBER: _ClassVar[int] success: bool nursery: _resources_pb2.NurseryResponse - def __init__(self, success: bool = ..., nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... + def __init__( + self, + success: bool = ..., + nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ..., + ) -> None: ... class UpdateNurseryRequest(_message.Message): - __slots__ = ("id", "name", "address", "phone_number", "email", "password", "update_mask") + __slots__ = ( + "id", + "name", + "address", + "phone_number", + "email", + "password", + "update_mask", + ) ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] ADDRESS_FIELD_NUMBER: _ClassVar[int] @@ -70,10 +100,21 @@ class UpdateNurseryRequest(_message.Message): email: str password: str update_mask: _field_mask_pb2.FieldMask - def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., password: _Optional[str] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + name: _Optional[str] = ..., + address: _Optional[str] = ..., + phone_number: _Optional[str] = ..., + email: _Optional[str] = ..., + password: _Optional[str] = ..., + update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ..., + ) -> None: ... class UpdateNurseryResponse(_message.Message): __slots__ = ("nursery",) NURSERY_FIELD_NUMBER: _ClassVar[int] nursery: _resources_pb2.NurseryResponse - def __init__(self, nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... + def __init__( + self, nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ... + ) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py index 642aff51..0b9ce945 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - from where_child_bus.v1 import nursery_pb2 as where__child__bus_dot_v1_dot_nursery__pb2 @@ -15,25 +14,25 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.GetNurseryByGuardianId = channel.unary_unary( - '/where_child_bus.v1.NurseryService/GetNurseryByGuardianId', - request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.FromString, - ) + "/where_child_bus.v1.NurseryService/GetNurseryByGuardianId", + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.FromString, + ) self.CreateNursery = channel.unary_unary( - '/where_child_bus.v1.NurseryService/CreateNursery', - request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.FromString, - ) + "/where_child_bus.v1.NurseryService/CreateNursery", + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.FromString, + ) self.NurseryLogin = channel.unary_unary( - '/where_child_bus.v1.NurseryService/NurseryLogin', - request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.FromString, - ) + "/where_child_bus.v1.NurseryService/NurseryLogin", + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.FromString, + ) self.UpdateNursery = channel.unary_unary( - '/where_child_bus.v1.NurseryService/UpdateNursery', - request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.FromString, - ) + "/where_child_bus.v1.NurseryService/UpdateNursery", + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.FromString, + ) class NurseryServiceServicer(object): @@ -42,124 +41,173 @@ class NurseryServiceServicer(object): def GetNurseryByGuardianId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def CreateNursery(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def NurseryLogin(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def UpdateNursery(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_NurseryServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'GetNurseryByGuardianId': grpc.unary_unary_rpc_method_handler( - servicer.GetNurseryByGuardianId, - request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.SerializeToString, - ), - 'CreateNursery': grpc.unary_unary_rpc_method_handler( - servicer.CreateNursery, - request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.SerializeToString, - ), - 'NurseryLogin': grpc.unary_unary_rpc_method_handler( - servicer.NurseryLogin, - request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.SerializeToString, - ), - 'UpdateNursery': grpc.unary_unary_rpc_method_handler( - servicer.UpdateNursery, - request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.SerializeToString, - ), + "GetNurseryByGuardianId": grpc.unary_unary_rpc_method_handler( + servicer.GetNurseryByGuardianId, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.SerializeToString, + ), + "CreateNursery": grpc.unary_unary_rpc_method_handler( + servicer.CreateNursery, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.SerializeToString, + ), + "NurseryLogin": grpc.unary_unary_rpc_method_handler( + servicer.NurseryLogin, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.SerializeToString, + ), + "UpdateNursery": grpc.unary_unary_rpc_method_handler( + servicer.UpdateNursery, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'where_child_bus.v1.NurseryService', rpc_method_handlers) + "where_child_bus.v1.NurseryService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class NurseryService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def GetNurseryByGuardianId(request, + def GetNurseryByGuardianId( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/GetNurseryByGuardianId', + "/where_child_bus.v1.NurseryService/GetNurseryByGuardianId", where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.SerializeToString, where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def CreateNursery(request, + def CreateNursery( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/CreateNursery', + "/where_child_bus.v1.NurseryService/CreateNursery", where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.SerializeToString, where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def NurseryLogin(request, + def NurseryLogin( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/NurseryLogin', + "/where_child_bus.v1.NurseryService/NurseryLogin", where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.SerializeToString, where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def UpdateNursery(request, + def UpdateNursery( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/UpdateNursery', + "/where_child_bus.v1.NurseryService/UpdateNursery", where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.SerializeToString, where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py index 834b49b2..6f971791 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py @@ -7,6 +7,7 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -14,43 +15,48 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x91\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\x91\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.resources_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.resources_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_BUSSTATUS']._serialized_start=3391 - _globals['_BUSSTATUS']._serialized_end=3506 - _globals['_VEHICLEEVENT']._serialized_start=3508 - _globals['_VEHICLEEVENT']._serialized_end=3606 - _globals['_SEX']._serialized_start=3608 - _globals['_SEX']._serialized_end=3677 - _globals['_BUSTYPE']._serialized_start=3679 - _globals['_BUSTYPE']._serialized_end=3758 - _globals['_NURSERY']._serialized_start=92 - _globals['_NURSERY']._serialized_end=414 - _globals['_NURSERYRESPONSE']._serialized_start=417 - _globals['_NURSERYRESPONSE']._serialized_end=706 - _globals['_GUARDIAN']._serialized_start=709 - _globals['_GUARDIAN']._serialized_end=1092 - _globals['_GUARDIANRESPONSE']._serialized_start=1095 - _globals['_GUARDIANRESPONSE']._serialized_end=1445 - _globals['_BUS']._serialized_start=1448 - _globals['_BUS']._serialized_end=1849 - _globals['_CHILD']._serialized_start=1852 - _globals['_CHILD']._serialized_end=2360 - _globals['_STATION']._serialized_start=2363 - _globals['_STATION']._serialized_end=2781 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2784 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2927 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=2929 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=3006 - _globals['_CHILDPHOTO']._serialized_start=3009 - _globals['_CHILDPHOTO']._serialized_end=3213 - _globals['_BOARDINGRECORD']._serialized_start=3216 - _globals['_BOARDINGRECORD']._serialized_end=3389 + _globals["DESCRIPTOR"]._options = None + _globals[ + "DESCRIPTOR" + ]._serialized_options = b"\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + _globals["_BUSSTATUS"]._serialized_start = 3391 + _globals["_BUSSTATUS"]._serialized_end = 3506 + _globals["_VEHICLEEVENT"]._serialized_start = 3508 + _globals["_VEHICLEEVENT"]._serialized_end = 3606 + _globals["_SEX"]._serialized_start = 3608 + _globals["_SEX"]._serialized_end = 3677 + _globals["_BUSTYPE"]._serialized_start = 3679 + _globals["_BUSTYPE"]._serialized_end = 3758 + _globals["_NURSERY"]._serialized_start = 92 + _globals["_NURSERY"]._serialized_end = 414 + _globals["_NURSERYRESPONSE"]._serialized_start = 417 + _globals["_NURSERYRESPONSE"]._serialized_end = 706 + _globals["_GUARDIAN"]._serialized_start = 709 + _globals["_GUARDIAN"]._serialized_end = 1092 + _globals["_GUARDIANRESPONSE"]._serialized_start = 1095 + _globals["_GUARDIANRESPONSE"]._serialized_end = 1445 + _globals["_BUS"]._serialized_start = 1448 + _globals["_BUS"]._serialized_end = 1849 + _globals["_CHILD"]._serialized_start = 1852 + _globals["_CHILD"]._serialized_end = 2360 + _globals["_STATION"]._serialized_start = 2363 + _globals["_STATION"]._serialized_end = 2781 + _globals["_CHILDBUSASSOCIATION"]._serialized_start = 2784 + _globals["_CHILDBUSASSOCIATION"]._serialized_end = 2927 + _globals["_BUSSTATIONASSOCIATION"]._serialized_start = 2929 + _globals["_BUSSTATIONASSOCIATION"]._serialized_end = 3006 + _globals["_CHILDPHOTO"]._serialized_start = 3009 + _globals["_CHILDPHOTO"]._serialized_end = 3213 + _globals["_BOARDINGRECORD"]._serialized_start = 3216 + _globals["_BOARDINGRECORD"]._serialized_end = 3389 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi index b5056a46..a5ce8b11 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi @@ -1,8 +1,12 @@ -from google.protobuf import timestamp_pb2 as _timestamp_pb2 -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from typing import ClassVar as _ClassVar +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper DESCRIPTOR: _descriptor.FileDescriptor @@ -31,6 +35,7 @@ class BusType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): BUS_TYPE_UNSPECIFIED: _ClassVar[BusType] BUS_TYPE_MORNING: _ClassVar[BusType] BUS_TYPE_EVENING: _ClassVar[BusType] + BUS_STATUS_UNSPECIFIED: BusStatus BUS_STATUS_STOPPED: BusStatus BUS_STATUS_RUNNING: BusStatus @@ -47,7 +52,17 @@ BUS_TYPE_MORNING: BusType BUS_TYPE_EVENING: BusType class Nursery(_message.Message): - __slots__ = ("id", "nursery_code", "name", "address", "phone_number", "email", "hashed_password", "created_at", "updated_at") + __slots__ = ( + "id", + "nursery_code", + "name", + "address", + "phone_number", + "email", + "hashed_password", + "created_at", + "updated_at", + ) ID_FIELD_NUMBER: _ClassVar[int] NURSERY_CODE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -66,10 +81,30 @@ class Nursery(_message.Message): hashed_password: str created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_code: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., hashed_password: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + nursery_code: _Optional[str] = ..., + name: _Optional[str] = ..., + address: _Optional[str] = ..., + phone_number: _Optional[str] = ..., + email: _Optional[str] = ..., + hashed_password: _Optional[str] = ..., + created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + ) -> None: ... class NurseryResponse(_message.Message): - __slots__ = ("id", "nursery_code", "name", "address", "phone_number", "email", "created_at", "updated_at") + __slots__ = ( + "id", + "nursery_code", + "name", + "address", + "phone_number", + "email", + "created_at", + "updated_at", + ) ID_FIELD_NUMBER: _ClassVar[int] NURSERY_CODE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -86,10 +121,31 @@ class NurseryResponse(_message.Message): email: str created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_code: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + nursery_code: _Optional[str] = ..., + name: _Optional[str] = ..., + address: _Optional[str] = ..., + phone_number: _Optional[str] = ..., + email: _Optional[str] = ..., + created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + ) -> None: ... class Guardian(_message.Message): - __slots__ = ("id", "nursery_id", "name", "email", "phone_number", "hashed_password", "is_use_morning_bus", "is_use_evening_bus", "created_at", "updated_at") + __slots__ = ( + "id", + "nursery_id", + "name", + "email", + "phone_number", + "hashed_password", + "is_use_morning_bus", + "is_use_evening_bus", + "created_at", + "updated_at", + ) ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -110,10 +166,32 @@ class Guardian(_message.Message): is_use_evening_bus: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., hashed_password: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + nursery_id: _Optional[str] = ..., + name: _Optional[str] = ..., + email: _Optional[str] = ..., + phone_number: _Optional[str] = ..., + hashed_password: _Optional[str] = ..., + is_use_morning_bus: bool = ..., + is_use_evening_bus: bool = ..., + created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + ) -> None: ... class GuardianResponse(_message.Message): - __slots__ = ("id", "nursery_id", "name", "email", "phone_number", "is_use_morning_bus", "is_use_evening_bus", "created_at", "updated_at") + __slots__ = ( + "id", + "nursery_id", + "name", + "email", + "phone_number", + "is_use_morning_bus", + "is_use_evening_bus", + "created_at", + "updated_at", + ) ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -132,10 +210,32 @@ class GuardianResponse(_message.Message): is_use_evening_bus: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + nursery_id: _Optional[str] = ..., + name: _Optional[str] = ..., + email: _Optional[str] = ..., + phone_number: _Optional[str] = ..., + is_use_morning_bus: bool = ..., + is_use_evening_bus: bool = ..., + created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + ) -> None: ... class Bus(_message.Message): - __slots__ = ("id", "nursery_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "created_at", "updated_at") + __slots__ = ( + "id", + "nursery_id", + "name", + "plate_number", + "bus_status", + "latitude", + "longitude", + "enable_face_recognition", + "created_at", + "updated_at", + ) ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -156,10 +256,37 @@ class Bus(_message.Message): enable_face_recognition: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + nursery_id: _Optional[str] = ..., + name: _Optional[str] = ..., + plate_number: _Optional[str] = ..., + bus_status: _Optional[_Union[BusStatus, str]] = ..., + latitude: _Optional[float] = ..., + longitude: _Optional[float] = ..., + enable_face_recognition: bool = ..., + created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + ) -> None: ... class Child(_message.Message): - __slots__ = ("id", "nursery_id", "guardian_id", "name", "age", "sex", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "created_at", "updated_at") + __slots__ = ( + "id", + "nursery_id", + "guardian_id", + "name", + "age", + "sex", + "check_for_missing_items", + "has_bag", + "has_lunch_box", + "has_water_bottle", + "has_umbrella", + "has_other", + "created_at", + "updated_at", + ) ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] @@ -188,10 +315,37 @@ class Child(_message.Message): has_other: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[Sex, str]] = ..., check_for_missing_items: bool = ..., has_bag: bool = ..., has_lunch_box: bool = ..., has_water_bottle: bool = ..., has_umbrella: bool = ..., has_other: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + nursery_id: _Optional[str] = ..., + guardian_id: _Optional[str] = ..., + name: _Optional[str] = ..., + age: _Optional[int] = ..., + sex: _Optional[_Union[Sex, str]] = ..., + check_for_missing_items: bool = ..., + has_bag: bool = ..., + has_lunch_box: bool = ..., + has_water_bottle: bool = ..., + has_umbrella: bool = ..., + has_other: bool = ..., + created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + ) -> None: ... class Station(_message.Message): - __slots__ = ("id", "guardian_id", "morning_next_station_id", "evening_next_station_id", "latitude", "longitude", "morning_order", "evening_order", "created_at", "updated_at") + __slots__ = ( + "id", + "guardian_id", + "morning_next_station_id", + "evening_next_station_id", + "latitude", + "longitude", + "morning_order", + "evening_order", + "created_at", + "updated_at", + ) ID_FIELD_NUMBER: _ClassVar[int] GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] MORNING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] @@ -212,7 +366,19 @@ class Station(_message.Message): evening_order: int created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., morning_next_station_id: _Optional[str] = ..., evening_next_station_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., morning_order: _Optional[int] = ..., evening_order: _Optional[int] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + guardian_id: _Optional[str] = ..., + morning_next_station_id: _Optional[str] = ..., + evening_next_station_id: _Optional[str] = ..., + latitude: _Optional[float] = ..., + longitude: _Optional[float] = ..., + morning_order: _Optional[int] = ..., + evening_order: _Optional[int] = ..., + created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + ) -> None: ... class ChildBusAssociation(_message.Message): __slots__ = ("id", "bus_id", "child_id", "bus_type") @@ -224,7 +390,13 @@ class ChildBusAssociation(_message.Message): bus_id: str child_id: str bus_type: BusType - def __init__(self, id: _Optional[str] = ..., bus_id: _Optional[str] = ..., child_id: _Optional[str] = ..., bus_type: _Optional[_Union[BusType, str]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + bus_id: _Optional[str] = ..., + child_id: _Optional[str] = ..., + bus_type: _Optional[_Union[BusType, str]] = ..., + ) -> None: ... class BusStationAssociation(_message.Message): __slots__ = ("bus_id", "station_id") @@ -232,7 +404,9 @@ class BusStationAssociation(_message.Message): STATION_ID_FIELD_NUMBER: _ClassVar[int] bus_id: str station_id: str - def __init__(self, bus_id: _Optional[str] = ..., station_id: _Optional[str] = ...) -> None: ... + def __init__( + self, bus_id: _Optional[str] = ..., station_id: _Optional[str] = ... + ) -> None: ... class ChildPhoto(_message.Message): __slots__ = ("id", "child_id", "photo_data", "created_at", "updated_at") @@ -246,7 +420,14 @@ class ChildPhoto(_message.Message): photo_data: bytes created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., photo_data: _Optional[bytes] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + child_id: _Optional[str] = ..., + photo_data: _Optional[bytes] = ..., + created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + ) -> None: ... class BoardingRecord(_message.Message): __slots__ = ("id", "child_id", "bus_id", "is_boarding", "timestamp") @@ -260,4 +441,11 @@ class BoardingRecord(_message.Message): bus_id: str is_boarding: bool timestamp: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., bus_id: _Optional[str] = ..., is_boarding: bool = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + child_id: _Optional[str] = ..., + bus_id: _Optional[str] = ..., + is_boarding: bool = ..., + timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., + ) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/resources_pb2_grpc.py index 2daafffe..8a939394 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2_grpc.py @@ -1,4 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py index 938ecf02..04d2f224 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py @@ -7,20 +7,27 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 +from where_child_bus.v1 import ( + resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, +) + DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\":\n!GetUnregisteredStationListRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa1\x01\n\"GetUnregisteredStationListResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"\x9d\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\xa5\x04\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x8b\x01\n\x1aGetUnregisteredStationList\x12\x35.where_child_bus.v1.GetUnregisteredStationListRequest\x1a\x36.where_child_bus.v1.GetUnregisteredStationListResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') + _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.station_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.station_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014StationProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' @@ -42,4 +49,5 @@ _globals['_UPDATESTATIONRESPONSE']._serialized_end=1149 _globals['_STATIONSERVICE']._serialized_start=1152 _globals['_STATIONSERVICE']._serialized_end=1701 + # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi index 4a147d38..a9e75a9e 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi @@ -1,9 +1,14 @@ -from where_child_bus.v1 import resources_pb2 as _resources_pb2 -from google.protobuf import field_mask_pb2 as _field_mask_pb2 -from google.protobuf.internal import containers as _containers +from typing import ClassVar as _ClassVar +from typing import Iterable as _Iterable +from typing import Mapping as _Mapping +from typing import Optional as _Optional +from typing import Union as _Union + from google.protobuf import descriptor as _descriptor +from google.protobuf import field_mask_pb2 as _field_mask_pb2 from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union +from google.protobuf.internal import containers as _containers +from where_child_bus.v1 import resources_pb2 as _resources_pb2 DESCRIPTOR: _descriptor.FileDescriptor @@ -15,13 +20,20 @@ class UpdateStationLocationByGuardianIdRequest(_message.Message): guardian_id: str longitude: float latitude: float - def __init__(self, guardian_id: _Optional[str] = ..., longitude: _Optional[float] = ..., latitude: _Optional[float] = ...) -> None: ... + def __init__( + self, + guardian_id: _Optional[str] = ..., + longitude: _Optional[float] = ..., + latitude: _Optional[float] = ..., + ) -> None: ... class UpdateStationLocationByGuardianIdResponse(_message.Message): __slots__ = ("station",) STATION_FIELD_NUMBER: _ClassVar[int] station: _resources_pb2.Station - def __init__(self, station: _Optional[_Union[_resources_pb2.Station, _Mapping]] = ...) -> None: ... + def __init__( + self, station: _Optional[_Union[_resources_pb2.Station, _Mapping]] = ... + ) -> None: ... class GetStationListByBusIdRequest(_message.Message): __slots__ = ("bus_id",) @@ -36,10 +48,20 @@ class GetStationListByBusIdResponse(_message.Message): CHILDREN_FIELD_NUMBER: _ClassVar[int] PHOTOS_FIELD_NUMBER: _ClassVar[int] stations: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Station] - guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] + guardians: _containers.RepeatedCompositeFieldContainer[ + _resources_pb2.GuardianResponse + ] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] - def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... + def __init__( + self, + stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., + guardians: _Optional[ + _Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]] + ] = ..., + children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., + photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ..., + ) -> None: ... class GetUnregisteredStationListRequest(_message.Message): __slots__ = ("bus_id",) @@ -65,10 +87,18 @@ class UpdateStationRequest(_message.Message): latitude: float longitude: float update_mask: _field_mask_pb2.FieldMask - def __init__(self, id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__( + self, + id: _Optional[str] = ..., + latitude: _Optional[float] = ..., + longitude: _Optional[float] = ..., + update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ..., + ) -> None: ... class UpdateStationResponse(_message.Message): __slots__ = ("station",) STATION_FIELD_NUMBER: _ClassVar[int] station: _resources_pb2.Station - def __init__(self, station: _Optional[_Union[_resources_pb2.Station, _Mapping]] = ...) -> None: ... + def __init__( + self, station: _Optional[_Union[_resources_pb2.Station, _Mapping]] = ... + ) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py index 236c8e8d..6ce9bc91 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py @@ -1,7 +1,6 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - from where_child_bus.v1 import station_pb2 as where__child__bus_dot_v1_dot_station__pb2 @@ -15,10 +14,10 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.UpdateStationLocationByGuardianId = channel.unary_unary( - '/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId', - request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdResponse.FromString, - ) + "/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId", + request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdResponse.FromString, + ) self.GetStationListByBusId = channel.unary_unary( '/where_child_bus.v1.StationService/GetStationListByBusId', request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.SerializeToString, @@ -29,11 +28,12 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListResponse.FromString, ) + self.UpdateStation = channel.unary_unary( - '/where_child_bus.v1.StationService/UpdateStation', - request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, - ) + "/where_child_bus.v1.StationService/UpdateStation", + request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, + ) class StationServiceServicer(object): @@ -42,14 +42,14 @@ class StationServiceServicer(object): def UpdateStationLocationByGuardianId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetStationListByBusId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetUnregisteredStationList(self, request, context): """Missing associated documentation comment in .proto file.""" @@ -60,12 +60,13 @@ def GetUnregisteredStationList(self, request, context): def UpdateStation(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_StationServiceServicer_to_server(servicer, server): rpc_method_handlers = { + 'UpdateStationLocationByGuardianId': grpc.unary_unary_rpc_method_handler( servicer.UpdateStationLocationByGuardianId, request_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.FromString, @@ -88,49 +89,75 @@ def add_StationServiceServicer_to_server(servicer, server): ), } generic_handler = grpc.method_handlers_generic_handler( - 'where_child_bus.v1.StationService', rpc_method_handlers) + "where_child_bus.v1.StationService", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class StationService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def UpdateStationLocationByGuardianId(request, + def UpdateStationLocationByGuardianId( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId', + "/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId", where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.SerializeToString, where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetStationListByBusId(request, + def GetStationListByBusId( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/GetStationListByBusId', + "/where_child_bus.v1.StationService/GetStationListByBusId", where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.SerializeToString, where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod + def GetUnregisteredStationList(request, target, options=(), @@ -150,16 +177,15 @@ def GetUnregisteredStationList(request, @staticmethod def UpdateStation(request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/UpdateStation', + "/where_child_bus.v1.StationService/UpdateStation", where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index dd96448a..1b232156 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -5,6 +5,7 @@ import grpc + from grpc_status import rpc_status from grpc_reflection.v1alpha import reflection @@ -26,12 +27,21 @@ from face_detect_model.DetectFaceAndClip.detectFaceAndClip import ( main as detect_face_and_clip_fn, ) -from face_detect_model.main import ( - main as train_fn, +from face_detect_model.main import main as train_fn +from face_detect_model.pred import main as pred_fn +from generated.machine_learning.v1 import ( + health_check_pb2, + health_check_pb2_grpc, + machine_learning_pb2, + machine_learning_pb2_grpc, ) -from face_detect_model.pred import ( - main as pred_fn, +from generated.machine_learning.v1.func_args import ( + FaceDetectAndClip_Args, + Pred_Args, + Train_Args, ) +from generated.where_child_bus.v1 import bus_pb2 +from grpc_reflection.v1alpha import reflection class HealthCheckServiceServer( diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/client.py b/machine_learning/src/proto-gen/where_child_bus/v1/client.py index 0a311882..861770d3 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/client.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/client.py @@ -2,13 +2,12 @@ import health_check_pb2 import health_check_pb2_grpc - -ENDPOINT = 'where-child-bus-grpc-k3dkun2lpq-uw.a.run.app:443' +ENDPOINT = "where-child-bus-grpc-k3dkun2lpq-uw.a.run.app:443" with grpc.secure_channel(ENDPOINT, grpc.ssl_channel_credentials()) as channel: stub = health_check_pb2_grpc.HealthcheckServiceStub(channel) request = health_check_pb2.PingRequest() stub.Ping(request) - request.name = 'ping' + request.name = "ping" response = stub.Ping(request) print(response.message) - channel.close() \ No newline at end of file + channel.close() diff --git a/machine_learning/src/proto-gen/where_child_bus/v1/healthcheck.py b/machine_learning/src/proto-gen/where_child_bus/v1/healthcheck.py index a7c47408..94ffd38c 100644 --- a/machine_learning/src/proto-gen/where_child_bus/v1/healthcheck.py +++ b/machine_learning/src/proto-gen/where_child_bus/v1/healthcheck.py @@ -1,16 +1,15 @@ -import sys import os +import sys # このスクリプトが存在するディレクトリの親ディレクトリを検索パスに追加 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -import health_check_pb2_grpc -import health_check_pb2 - import grpc +import health_check_pb2 +import health_check_pb2_grpc # gRPCクライアントの設定 -client = grpc.insecure_channel('where-child-bus-grpc-k3dkun2lpq-uw.a.run.app:443') +client = grpc.insecure_channel("where-child-bus-grpc-k3dkun2lpq-uw.a.run.app:443") stub = health_check_pb2_grpc.HealthcheckServiceStub(client) reqst = health_check_pb2.PingRequest() @@ -19,4 +18,3 @@ res = health_check_pb2.PingResponse(stub.Ping(reqst)) print(res.message) - From 3b6718c0fd8341af0e9ea8eae2c6ef4b41c94971 Mon Sep 17 00:00:00 2001 From: Mizuki Baba <76275131+lovelovetrb@users.noreply.github.com> Date: Wed, 21 Feb 2024 01:34:54 +0900 Subject: [PATCH 601/771] =?UTF-8?q?fix(ml):=20github=20actions=E3=81=A7?= =?UTF-8?q?=E3=83=87=E3=83=97=E3=83=AD=E3=82=A4=E3=81=95=E3=82=8C=E3=81=9F?= =?UTF-8?q?=E9=9A=9B=E3=81=AB=E7=99=BA=E7=94=9F=E3=81=99=E3=82=8B=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=81=B8=E3=81=AE=E5=AF=BE=E5=BF=9C=20(#145)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/machine_learning/Dockerfile b/machine_learning/Dockerfile index c4565789..3030bf61 100644 --- a/machine_learning/Dockerfile +++ b/machine_learning/Dockerfile @@ -28,7 +28,8 @@ COPY ./src /machine-learning/src # .envファイルを作成し、ビルド引数の値を書き込む RUN mkdir -p /machine-learning/secrets && \ echo "PROJECT_ID=$GCP_PROJECT_ID" > /machine-learning/secrets/.env && \ - echo "BUCKET_NAME=$BUCKET_NAME_FOR_ML" >> /machine-learning/secrets/.env + echo "BUCKET_NAME=$BUCKET_NAME_FOR_ML" >> /machine-learning/secrets/.env && \ + echo "BUCKET_NAME=$BUCKET_NAME_FOR_FACE" >> /machine-learning/secrets/.env # 環境変数PATHの設定 ENV PYTHONPATH "${PYTHONPATH}:/machine-learning/src/" From 9735b821bc800574e99ea49e9c63f33a9e304ef9 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 21 Feb 2024 01:47:31 +0900 Subject: [PATCH 602/771] =?UTF-8?q?fix(ml):=20=E6=AD=A3=E3=81=97=E3=81=84?= =?UTF-8?q?=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0=E3=82=92=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_cloudrun_machine_learning.yml | 1 + machine_learning/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index e68596f9..a5d279d9 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -4,6 +4,7 @@ on: push: branches: - develop + - feature/machine_learning/cicd paths: - "machine_learning/**" diff --git a/machine_learning/Dockerfile b/machine_learning/Dockerfile index 3030bf61..af01ace8 100644 --- a/machine_learning/Dockerfile +++ b/machine_learning/Dockerfile @@ -29,7 +29,7 @@ COPY ./src /machine-learning/src RUN mkdir -p /machine-learning/secrets && \ echo "PROJECT_ID=$GCP_PROJECT_ID" > /machine-learning/secrets/.env && \ echo "BUCKET_NAME=$BUCKET_NAME_FOR_ML" >> /machine-learning/secrets/.env && \ - echo "BUCKET_NAME=$BUCKET_NAME_FOR_FACE" >> /machine-learning/secrets/.env + echo "BUCKET_NAME_FOR_FACE=$BUCKET_NAME_FOR_FACE" >> /machine-learning/secrets/.env # 環境変数PATHの設定 ENV PYTHONPATH "${PYTHONPATH}:/machine-learning/src/" From 0db9e6251a03d4e0f1eddaa3b3ad5018053867aa Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 21 Feb 2024 01:49:40 +0900 Subject: [PATCH 603/771] =?UTF-8?q?fix(ml):=20=E8=AA=A4=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=83=96=E3=83=A9=E3=83=B3=E3=83=81=E5=90=8D=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_cloudrun_machine_learning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index a5d279d9..282becd6 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -4,7 +4,7 @@ on: push: branches: - develop - - feature/machine_learning/cicd + - feature/machine-learning/cicd paths: - "machine_learning/**" From 0972f838f389d583fade3e293a6f6d12f3c0ff17 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 21 Feb 2024 01:51:06 +0900 Subject: [PATCH 604/771] refactor --- .github/workflows/deploy_cloudrun_machine_learning.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index 282becd6..ac05ecd5 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -6,6 +6,7 @@ on: - develop - feature/machine-learning/cicd paths: + - ".github/workflows/deploy_cloudrun_machine_learning.yml" - "machine_learning/**" permissions: From fe08942712be753289b49fff57bcdef7822badbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=82=8F=E3=81=8D=E3=82=93?= <93261102+KinjiKawaguchi@users.noreply.github.com> Date: Wed, 21 Feb 2024 01:55:14 +0900 Subject: [PATCH 605/771] Feature/backend/api (#146) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 緯度経度が未登録の停留所とその保護者を取得するAPIを実装 * station.goの変更: WithGuardianにNurseryを追加 * fix: Add default value for "is_boarding" field in boardingrecord.go and schema.go, and for "latitude" and "longitude" fields in station.go and schema.go --- .../ent/boardingrecord/boardingrecord.go | 2 ++ .../repository/ent/boardingrecord_create.go | 12 ++++++++ .../domain/repository/ent/migrate/schema.go | 6 ++-- backend/domain/repository/ent/runtime.go | 12 ++++++++ .../repository/ent/schema/boarding_record.go | 2 +- .../domain/repository/ent/schema/station.go | 4 +-- .../domain/repository/ent/station/station.go | 4 +++ .../domain/repository/ent/station_create.go | 8 ++++++ backend/usecases/station/station.go | 4 ++- .../where_child_bus/v1/station_pb2.py | 2 -- .../where_child_bus/v1/station_pb2.pyi | 14 ++++++++++ .../where_child_bus/v1/station_pb2_grpc.py | 28 +++++++++++++++++++ 12 files changed, 89 insertions(+), 9 deletions(-) diff --git a/backend/domain/repository/ent/boardingrecord/boardingrecord.go b/backend/domain/repository/ent/boardingrecord/boardingrecord.go index ee148d23..aa0d623b 100644 --- a/backend/domain/repository/ent/boardingrecord/boardingrecord.go +++ b/backend/domain/repository/ent/boardingrecord/boardingrecord.go @@ -73,6 +73,8 @@ func ValidColumn(column string) bool { var ( // DefaultTimestamp holds the default value on creation for the "timestamp" field. DefaultTimestamp func() time.Time + // DefaultIsBoarding holds the default value on creation for the "is_boarding" field. + DefaultIsBoarding bool // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID ) diff --git a/backend/domain/repository/ent/boardingrecord_create.go b/backend/domain/repository/ent/boardingrecord_create.go index 54a52c82..bbb67110 100644 --- a/backend/domain/repository/ent/boardingrecord_create.go +++ b/backend/domain/repository/ent/boardingrecord_create.go @@ -43,6 +43,14 @@ func (brc *BoardingRecordCreate) SetIsBoarding(b bool) *BoardingRecordCreate { return brc } +// SetNillableIsBoarding sets the "is_boarding" field if the given value is not nil. +func (brc *BoardingRecordCreate) SetNillableIsBoarding(b *bool) *BoardingRecordCreate { + if b != nil { + brc.SetIsBoarding(*b) + } + return brc +} + // SetID sets the "id" field. func (brc *BoardingRecordCreate) SetID(u uuid.UUID) *BoardingRecordCreate { brc.mutation.SetID(u) @@ -134,6 +142,10 @@ func (brc *BoardingRecordCreate) defaults() { v := boardingrecord.DefaultTimestamp() brc.mutation.SetTimestamp(v) } + if _, ok := brc.mutation.IsBoarding(); !ok { + v := boardingrecord.DefaultIsBoarding + brc.mutation.SetIsBoarding(v) + } if _, ok := brc.mutation.ID(); !ok { v := boardingrecord.DefaultID() brc.mutation.SetID(v) diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 9bfc4f3b..908df176 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -12,7 +12,7 @@ var ( BoardingRecordsColumns = []*schema.Column{ {Name: "id", Type: field.TypeUUID, Unique: true}, {Name: "timestamp", Type: field.TypeTime}, - {Name: "is_boarding", Type: field.TypeBool}, + {Name: "is_boarding", Type: field.TypeBool, Default: false}, {Name: "bus_boarding_records", Type: field.TypeUUID, Nullable: true}, {Name: "child_boarding_record", Type: field.TypeUUID, Nullable: true}, } @@ -189,8 +189,8 @@ var ( // StationsColumns holds the columns for the "stations" table. StationsColumns = []*schema.Column{ {Name: "id", Type: field.TypeUUID, Unique: true}, - {Name: "latitude", Type: field.TypeFloat64, Nullable: true}, - {Name: "longitude", Type: field.TypeFloat64, Nullable: true}, + {Name: "latitude", Type: field.TypeFloat64, Nullable: true, Default: 0}, + {Name: "longitude", Type: field.TypeFloat64, Nullable: true, Default: 0}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "guardian_station", Type: field.TypeUUID, Unique: true, Nullable: true}, diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index 697a9155..41fe4754 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -26,6 +26,10 @@ func init() { boardingrecordDescTimestamp := boardingrecordFields[1].Descriptor() // boardingrecord.DefaultTimestamp holds the default value on creation for the timestamp field. boardingrecord.DefaultTimestamp = boardingrecordDescTimestamp.Default.(func() time.Time) + // boardingrecordDescIsBoarding is the schema descriptor for is_boarding field. + boardingrecordDescIsBoarding := boardingrecordFields[2].Descriptor() + // boardingrecord.DefaultIsBoarding holds the default value on creation for the is_boarding field. + boardingrecord.DefaultIsBoarding = boardingrecordDescIsBoarding.Default.(bool) // boardingrecordDescID is the schema descriptor for id field. boardingrecordDescID := boardingrecordFields[0].Descriptor() // boardingrecord.DefaultID holds the default value on creation for the id field. @@ -148,6 +152,14 @@ func init() { nursery.DefaultID = nurseryDescID.Default.(func() uuid.UUID) stationFields := schema.Station{}.Fields() _ = stationFields + // stationDescLatitude is the schema descriptor for latitude field. + stationDescLatitude := stationFields[1].Descriptor() + // station.DefaultLatitude holds the default value on creation for the latitude field. + station.DefaultLatitude = stationDescLatitude.Default.(float64) + // stationDescLongitude is the schema descriptor for longitude field. + stationDescLongitude := stationFields[2].Descriptor() + // station.DefaultLongitude holds the default value on creation for the longitude field. + station.DefaultLongitude = stationDescLongitude.Default.(float64) // stationDescCreatedAt is the schema descriptor for created_at field. stationDescCreatedAt := stationFields[3].Descriptor() // station.DefaultCreatedAt holds the default value on creation for the created_at field. diff --git a/backend/domain/repository/ent/schema/boarding_record.go b/backend/domain/repository/ent/schema/boarding_record.go index 00528792..531c4798 100644 --- a/backend/domain/repository/ent/schema/boarding_record.go +++ b/backend/domain/repository/ent/schema/boarding_record.go @@ -19,7 +19,7 @@ func (BoardingRecord) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), field.Time("timestamp").Default(time.Now).Comment("乗降時刻"), - field.Bool("is_boarding").Comment("乗車時はtrue、降車時はfalse")} + field.Bool("is_boarding").Default(false).Comment("乗車時はtrue、降車時はfalse")} } // Edges of the BoardingRecord. diff --git a/backend/domain/repository/ent/schema/station.go b/backend/domain/repository/ent/schema/station.go index f3ad75e8..47d1180e 100644 --- a/backend/domain/repository/ent/schema/station.go +++ b/backend/domain/repository/ent/schema/station.go @@ -18,8 +18,8 @@ type Station struct { func (Station) Fields() []ent.Field { return []ent.Field{ field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), - field.Float("latitude").Optional(), - field.Float("longitude").Optional(), + field.Float("latitude").Optional().Default(0), + field.Float("longitude").Optional().Default(0), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } diff --git a/backend/domain/repository/ent/station/station.go b/backend/domain/repository/ent/station/station.go index c1ccf5f8..d2a5b904 100644 --- a/backend/domain/repository/ent/station/station.go +++ b/backend/domain/repository/ent/station/station.go @@ -106,6 +106,10 @@ func ValidColumn(column string) bool { } var ( + // DefaultLatitude holds the default value on creation for the "latitude" field. + DefaultLatitude float64 + // DefaultLongitude holds the default value on creation for the "longitude" field. + DefaultLongitude float64 // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. diff --git a/backend/domain/repository/ent/station_create.go b/backend/domain/repository/ent/station_create.go index 039d2fd0..ff91b38c 100644 --- a/backend/domain/repository/ent/station_create.go +++ b/backend/domain/repository/ent/station_create.go @@ -230,6 +230,14 @@ func (sc *StationCreate) ExecX(ctx context.Context) { // defaults sets the default values of the builder before save. func (sc *StationCreate) defaults() { + if _, ok := sc.mutation.Latitude(); !ok { + v := station.DefaultLatitude + sc.mutation.SetLatitude(v) + } + if _, ok := sc.mutation.Longitude(); !ok { + v := station.DefaultLongitude + sc.mutation.SetLongitude(v) + } if _, ok := sc.mutation.CreatedAt(); !ok { v := station.DefaultCreatedAt() sc.mutation.SetCreatedAt(v) diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index fd7ac791..9d637994 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -235,7 +235,9 @@ func (i Interactor) GetUnregisteredStationList(ctx context.Context, req *pb.GetU Where(stationRepo.HasBusWith(busRepo.IDEQ(busID))). Where(stationRepo.Latitude(0)). Where(stationRepo.Longitude(0)). - WithGuardian(). + WithGuardian(func(q *ent.GuardianQuery) { + q.WithNursery() + }). All(ctx) if err != nil { diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py index 04d2f224..419e97cd 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py @@ -22,7 +22,6 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\":\n!GetUnregisteredStationListRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa1\x01\n\"GetUnregisteredStationListResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"\x9d\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\xa5\x04\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x8b\x01\n\x1aGetUnregisteredStationList\x12\x35.where_child_bus.v1.GetUnregisteredStationListRequest\x1a\x36.where_child_bus.v1.GetUnregisteredStationListResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') - _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages( @@ -49,5 +48,4 @@ _globals['_UPDATESTATIONRESPONSE']._serialized_end=1149 _globals['_STATIONSERVICE']._serialized_start=1152 _globals['_STATIONSERVICE']._serialized_end=1701 - # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi index a9e75a9e..d265c8af 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi @@ -77,6 +77,20 @@ class GetUnregisteredStationListResponse(_message.Message): guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... +class GetUnregisteredStationListRequest(_message.Message): + __slots__ = ("bus_id",) + BUS_ID_FIELD_NUMBER: _ClassVar[int] + bus_id: str + def __init__(self, bus_id: _Optional[str] = ...) -> None: ... + +class GetUnregisteredStationListResponse(_message.Message): + __slots__ = ("stations", "guardians") + STATIONS_FIELD_NUMBER: _ClassVar[int] + GUARDIANS_FIELD_NUMBER: _ClassVar[int] + stations: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Station] + guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] + def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... + class UpdateStationRequest(_message.Message): __slots__ = ("id", "latitude", "longitude", "update_mask") ID_FIELD_NUMBER: _ClassVar[int] diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py index 6ce9bc91..c7701cd8 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py @@ -28,6 +28,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListResponse.FromString, ) + self.UpdateStation = channel.unary_unary( + '/where_child_bus.v1.StationService/UpdateStation', + request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, + ) self.UpdateStation = channel.unary_unary( "/where_child_bus.v1.StationService/UpdateStation", @@ -57,6 +62,12 @@ def GetUnregisteredStationList(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetUnregisteredStationList(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def UpdateStation(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -158,6 +169,23 @@ def GetStationListByBusId( @staticmethod + def GetUnregisteredStationList(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/GetUnregisteredStationList', + where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.SerializeToString, + where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod def GetUnregisteredStationList(request, target, options=(), From abd5bdb9f8de54d6b768ef8fcf9e2d158e5dd0ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=82=8F=E3=81=8D=E3=82=93?= <93261102+KinjiKawaguchi@users.noreply.github.com> Date: Wed, 21 Feb 2024 03:19:46 +0900 Subject: [PATCH 606/771] Feature/backend/api (#147) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 緯度経度が未登録の停留所とその保護者を取得するAPIを実装 * station.goの変更: WithGuardianにNurseryを追加 * fix: Add default value for "is_boarding" field in boardingrecord.go and schema.go, and for "latitude" and "longitude" fields in station.go and schema.go * feat: 停留所更新時にバスの運行可能状態も更新するように変更 --- .../go/where_child_bus/v1/station.pb.go | 138 ++++++++++-------- backend/usecases/bus/bus.go | 41 +----- backend/usecases/station/station.go | 17 +++ backend/usecases/utils/utils.go | 51 ++++++- .../where_child_bus/v1/station.pb.dart | 48 +++--- .../where_child_bus/v1/station.pbjson.dart | 14 +- .../where_child_bus/v1/station_pb2.py | 21 +-- .../where_child_bus/v1/station_pb2.pyi | 54 ++----- .../where_child_bus/v1/station_pb2_grpc.py | 127 ++++++---------- proto/where_child_bus/v1/station.proto | 7 +- 10 files changed, 250 insertions(+), 268 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index 4928cb73..da339174 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -357,9 +357,10 @@ type UpdateStationRequest struct { unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,4,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + Latitude float64 `protobuf:"fixed64,3,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,4,opt,name=longitude,proto3" json:"longitude,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } func (x *UpdateStationRequest) Reset() { @@ -401,6 +402,13 @@ func (x *UpdateStationRequest) GetId() string { return "" } +func (x *UpdateStationRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + func (x *UpdateStationRequest) GetLatitude() float64 { if x != nil { return x.Latitude @@ -528,72 +536,74 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x22, 0x9d, 0x01, + 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, - 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xa5, 0x04, - 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, + 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, + 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xa5, 0x04, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, + 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, + 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, - 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, - 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, - 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, - 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, + 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 64b95307..b3badc86 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -62,7 +62,7 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* } // TODO: もう少し簡潔に - _, err = checkAndFixBusStationCoordinates(*i.logger, ctx, bus) + _, err = utils.CheckAndFixBusStationCoordinates(*i.logger, ctx, bus) if err != nil { i.logger.Error("failed to check and fix bus station coordinates", "error", err) return nil, err @@ -250,7 +250,7 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu } // TODO: もう少し簡潔に - is_ready, err := checkAndFixBusStationCoordinates(*i.logger, ctx, bus) + is_ready, err := utils.CheckAndFixBusStationCoordinates(*i.logger, ctx, bus) if err != nil { i.logger.Error("failed to check and fix bus station coordinates", "error", err) return nil, err @@ -337,7 +337,7 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* } // TODO: もう少し簡潔に - _, err = checkAndFixBusStationCoordinates(*i.logger, ctx, updatedBus) + _, err = utils.CheckAndFixBusStationCoordinates(*i.logger, ctx, updatedBus) if err != nil { i.logger.Error("failed to check and fix bus station coordinates", "error", err) return nil, err @@ -601,7 +601,7 @@ func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*e // TODO: もう少し簡潔に書ける for _, bus := range entBuses { - _, err = checkAndFixBusStationCoordinates(*i.logger, ctx, bus) + _, err = utils.CheckAndFixBusStationCoordinates(*i.logger, ctx, bus) if err != nil { i.logger.Error("failed to check and fix bus station coordinates", "error", err) return nil, err @@ -699,36 +699,3 @@ func setNextStation(logger slog.Logger, ctx context.Context, tx *ent.Tx, guardia return nil } -func checkAndFixBusStationCoordinates(logger slog.Logger, ctx context.Context, bus *ent.Bus) (is_ready bool, err error) { - // バスのステーションを取得 - stations, err := bus.QueryStations().All(ctx) - if err != nil { - logger.Error("failed to get stations", "error", err) - return false, err - } - - // ステーションの座標を修正 - for _, station := range stations { - // ステーションの座標が登録されていない場合は、バスのステータスをメンテナンスに設定 - if station.Latitude == 0 || station.Longitude == 0 { - _, err := bus.Update(). - SetStatus(busRepo.StatusMaintenance). - Save(ctx) - if err != nil { - logger.Error("failed to update bus status to maintenance due to missing station coordinates", "error", err) - return false, err - } - return false, nil - } - - } - // Stationは正しく設定されているので、バスのステータスを訂正 - if bus.Status == busRepo.StatusMaintenance { - _, err := bus.Update().SetStatus(busRepo.StatusStopped).Save(ctx) - if err != nil { - logger.Error("failed to update bus", "error", err) - return false, err - } - } - return true, nil -} diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 9d637994..13a0e34c 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -133,6 +133,23 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq return nil, err } + if req.BusId != "" { + bus, err := tx.Bus.Query(). + Where(busRepo.IDEQ(uuid.MustParse(req.BusId))). + Only(ctx) + + if err != nil { + i.logger.Error("failed to get bus", "error", err) + return nil, err + } + + _, err = utils.CheckAndFixBusStationCoordinates(*i.logger, ctx, bus) + if err != nil { + i.logger.Error("failed to check and fix bus station coordinates", "error", err) + return nil, err + } + } + // トランザクションのコミット if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index ccb93885..5e775de8 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -1,6 +1,7 @@ package utils import ( + "context" "database/sql" "fmt" @@ -12,7 +13,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" ) @@ -48,13 +49,13 @@ func convertSexToPbSex(sex child.Sex) pb.Sex { } } -func ConvertPbStatusToEntStatus(pbStatus pb.BusStatus) (*bus.Status, error) { +func ConvertPbStatusToEntStatus(pbStatus pb.BusStatus) (*busRepo.Status, error) { switch pbStatus { case pb.BusStatus_BUS_STATUS_RUNNING: - status := bus.StatusRunning + status := busRepo.StatusRunning return &status, nil case pb.BusStatus_BUS_STATUS_STOPPED: - status := bus.StatusStopped + status := busRepo.StatusStopped return &status, nil default: // 不正な値の場合はエラーを返す @@ -95,13 +96,13 @@ func ConvertPbSexToEntSex(pbSex pb.Sex) (*child.Sex, error) { } } -func convertStatusToPbStatus(status bus.Status) pb.BusStatus { +func convertStatusToPbStatus(status busRepo.Status) pb.BusStatus { switch status { - case bus.StatusRunning: + case busRepo.StatusRunning: return pb.BusStatus_BUS_STATUS_STOPPED - case bus.StatusStopped: + case busRepo.StatusStopped: return pb.BusStatus_BUS_STATUS_STOPPED - case bus.StatusMaintenance: + case busRepo.StatusMaintenance: return pb.BusStatus_BUS_STATUS_MAINTENANCE default: return pb.BusStatus_BUS_STATUS_UNSPECIFIED @@ -195,3 +196,37 @@ func RollbackTx(tx *ent.Tx, logger *slog.Logger) { } } } + +func CheckAndFixBusStationCoordinates(logger slog.Logger, ctx context.Context, bus *ent.Bus) (is_ready bool, err error) { + // バスのステーションを取得 + stations, err := bus.QueryStations().All(ctx) + if err != nil { + logger.Error("failed to get stations", "error", err) + return false, err + } + + // ステーションの座標を修正 + for _, station := range stations { + // ステーションの座標が登録されていない場合は、バスのステータスをメンテナンスに設定 + if station.Latitude == 0 || station.Longitude == 0 { + _, err := bus.Update(). + SetStatus(busRepo.StatusMaintenance). + Save(ctx) + if err != nil { + logger.Error("failed to update bus status to maintenance due to missing station coordinates", "error", err) + return false, err + } + return false, nil + } + + } + // Stationは正しく設定されているので、バスのステータスを訂正 + if bus.Status == busRepo.StatusMaintenance { + _, err := bus.Update().SetStatus(busRepo.StatusStopped).Save(ctx) + if err != nil { + logger.Error("failed to update bus", "error", err) + return false, err + } + } + return true, nil +} diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart index 86f7ae91..fc5c2425 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -369,6 +369,7 @@ class GetUnregisteredStationListResponse extends $pb.GeneratedMessage { class UpdateStationRequest extends $pb.GeneratedMessage { factory UpdateStationRequest({ $core.String? id, + $core.String? busId, $core.double? latitude, $core.double? longitude, $9.FieldMask? updateMask, @@ -377,6 +378,9 @@ class UpdateStationRequest extends $pb.GeneratedMessage { if (id != null) { $result.id = id; } + if (busId != null) { + $result.busId = busId; + } if (latitude != null) { $result.latitude = latitude; } @@ -394,9 +398,10 @@ class UpdateStationRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') - ..a<$core.double>(2, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) - ..a<$core.double>(3, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$9.FieldMask>(4, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..aOS(2, _omitFieldNames ? '' : 'busId') + ..a<$core.double>(3, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..aOM<$9.FieldMask>(5, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) ..hasRequiredFields = false ; @@ -431,33 +436,42 @@ class UpdateStationRequest extends $pb.GeneratedMessage { void clearId() => clearField(1); @$pb.TagNumber(2) - $core.double get latitude => $_getN(1); + $core.String get busId => $_getSZ(1); @$pb.TagNumber(2) - set latitude($core.double v) { $_setDouble(1, v); } + set busId($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) - $core.bool hasLatitude() => $_has(1); + $core.bool hasBusId() => $_has(1); @$pb.TagNumber(2) - void clearLatitude() => clearField(2); + void clearBusId() => clearField(2); @$pb.TagNumber(3) - $core.double get longitude => $_getN(2); + $core.double get latitude => $_getN(2); @$pb.TagNumber(3) - set longitude($core.double v) { $_setDouble(2, v); } + set latitude($core.double v) { $_setDouble(2, v); } @$pb.TagNumber(3) - $core.bool hasLongitude() => $_has(2); + $core.bool hasLatitude() => $_has(2); @$pb.TagNumber(3) - void clearLongitude() => clearField(3); + void clearLatitude() => clearField(3); @$pb.TagNumber(4) - $9.FieldMask get updateMask => $_getN(3); - @$pb.TagNumber(4) - set updateMask($9.FieldMask v) { setField(4, v); } + $core.double get longitude => $_getN(3); @$pb.TagNumber(4) - $core.bool hasUpdateMask() => $_has(3); + set longitude($core.double v) { $_setDouble(3, v); } @$pb.TagNumber(4) - void clearUpdateMask() => clearField(4); + $core.bool hasLongitude() => $_has(3); @$pb.TagNumber(4) - $9.FieldMask ensureUpdateMask() => $_ensure(3); + void clearLongitude() => clearField(4); + + @$pb.TagNumber(5) + $9.FieldMask get updateMask => $_getN(4); + @$pb.TagNumber(5) + set updateMask($9.FieldMask v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasUpdateMask() => $_has(4); + @$pb.TagNumber(5) + void clearUpdateMask() => clearField(5); + @$pb.TagNumber(5) + $9.FieldMask ensureUpdateMask() => $_ensure(4); } class UpdateStationResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart index e3e4c200..01ba95ba 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -106,17 +106,19 @@ const UpdateStationRequest$json = { '1': 'UpdateStationRequest', '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'latitude', '3': 2, '4': 1, '5': 1, '10': 'latitude'}, - {'1': 'longitude', '3': 3, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'update_mask', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, + {'1': 'bus_id', '3': 2, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'latitude', '3': 3, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 4, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'update_mask', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, ], }; /// Descriptor for `UpdateStationRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List updateStationRequestDescriptor = $convert.base64Decode( - 'ChRVcGRhdGVTdGF0aW9uUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSGgoIbGF0aXR1ZGUYAiABKA' - 'FSCGxhdGl0dWRlEhwKCWxvbmdpdHVkZRgDIAEoAVIJbG9uZ2l0dWRlEjsKC3VwZGF0ZV9tYXNr' - 'GAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFza1IKdXBkYXRlTWFzaw=='); + 'ChRVcGRhdGVTdGF0aW9uUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSFQoGYnVzX2lkGAIgASgJUg' + 'VidXNJZBIaCghsYXRpdHVkZRgDIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAQgASgBUgls' + 'b25naXR1ZGUSOwoLdXBkYXRlX21hc2sYBSABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYX' + 'NrUgp1cGRhdGVNYXNr'); @$core.Deprecated('Use updateStationResponseDescriptor instead') const UpdateStationResponse$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py index 419e97cd..d858f1a2 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py @@ -7,26 +7,21 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from where_child_bus.v1 import ( - resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, -) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\":\n!GetUnregisteredStationListRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa1\x01\n\"GetUnregisteredStationListResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"\xb4\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\xa5\x04\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x8b\x01\n\x1aGetUnregisteredStationList\x12\x35.where_child_bus.v1.GetUnregisteredStationListRequest\x1a\x36.where_child_bus.v1.GetUnregisteredStationListResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\":\n!GetUnregisteredStationListRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa1\x01\n\"GetUnregisteredStationListResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"\x9d\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\xa5\x04\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x8b\x01\n\x1aGetUnregisteredStationList\x12\x35.where_child_bus.v1.GetUnregisteredStationListRequest\x1a\x36.where_child_bus.v1.GetUnregisteredStationListResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.station_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.station_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014StationProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' @@ -43,9 +38,9 @@ _globals['_GETUNREGISTEREDSTATIONLISTRESPONSE']._serialized_start=748 _globals['_GETUNREGISTEREDSTATIONLISTRESPONSE']._serialized_end=909 _globals['_UPDATESTATIONREQUEST']._serialized_start=912 - _globals['_UPDATESTATIONREQUEST']._serialized_end=1069 - _globals['_UPDATESTATIONRESPONSE']._serialized_start=1071 - _globals['_UPDATESTATIONRESPONSE']._serialized_end=1149 - _globals['_STATIONSERVICE']._serialized_start=1152 - _globals['_STATIONSERVICE']._serialized_end=1701 + _globals['_UPDATESTATIONREQUEST']._serialized_end=1092 + _globals['_UPDATESTATIONRESPONSE']._serialized_start=1094 + _globals['_UPDATESTATIONRESPONSE']._serialized_end=1172 + _globals['_STATIONSERVICE']._serialized_start=1175 + _globals['_STATIONSERVICE']._serialized_end=1724 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi index d265c8af..a534b6cb 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi @@ -1,14 +1,9 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor +from where_child_bus.v1 import resources_pb2 as _resources_pb2 from google.protobuf import field_mask_pb2 as _field_mask_pb2 -from google.protobuf import message as _message from google.protobuf.internal import containers as _containers -from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -20,20 +15,13 @@ class UpdateStationLocationByGuardianIdRequest(_message.Message): guardian_id: str longitude: float latitude: float - def __init__( - self, - guardian_id: _Optional[str] = ..., - longitude: _Optional[float] = ..., - latitude: _Optional[float] = ..., - ) -> None: ... + def __init__(self, guardian_id: _Optional[str] = ..., longitude: _Optional[float] = ..., latitude: _Optional[float] = ...) -> None: ... class UpdateStationLocationByGuardianIdResponse(_message.Message): __slots__ = ("station",) STATION_FIELD_NUMBER: _ClassVar[int] station: _resources_pb2.Station - def __init__( - self, station: _Optional[_Union[_resources_pb2.Station, _Mapping]] = ... - ) -> None: ... + def __init__(self, station: _Optional[_Union[_resources_pb2.Station, _Mapping]] = ...) -> None: ... class GetStationListByBusIdRequest(_message.Message): __slots__ = ("bus_id",) @@ -48,20 +36,10 @@ class GetStationListByBusIdResponse(_message.Message): CHILDREN_FIELD_NUMBER: _ClassVar[int] PHOTOS_FIELD_NUMBER: _ClassVar[int] stations: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Station] - guardians: _containers.RepeatedCompositeFieldContainer[ - _resources_pb2.GuardianResponse - ] + guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] - def __init__( - self, - stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., - guardians: _Optional[ - _Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]] - ] = ..., - children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., - photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ..., - ) -> None: ... + def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... class GetUnregisteredStationListRequest(_message.Message): __slots__ = ("bus_id",) @@ -92,27 +70,21 @@ class GetUnregisteredStationListResponse(_message.Message): def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... class UpdateStationRequest(_message.Message): - __slots__ = ("id", "latitude", "longitude", "update_mask") + __slots__ = ("id", "bus_id", "latitude", "longitude", "update_mask") ID_FIELD_NUMBER: _ClassVar[int] + BUS_ID_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] id: str + bus_id: str latitude: float longitude: float update_mask: _field_mask_pb2.FieldMask - def __init__( - self, - id: _Optional[str] = ..., - latitude: _Optional[float] = ..., - longitude: _Optional[float] = ..., - update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateStationResponse(_message.Message): __slots__ = ("station",) STATION_FIELD_NUMBER: _ClassVar[int] station: _resources_pb2.Station - def __init__( - self, station: _Optional[_Union[_resources_pb2.Station, _Mapping]] = ... - ) -> None: ... + def __init__(self, station: _Optional[_Union[_resources_pb2.Station, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py index c7701cd8..e695245c 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py @@ -1,6 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc + from where_child_bus.v1 import station_pb2 as where__child__bus_dot_v1_dot_station__pb2 @@ -14,10 +15,10 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.UpdateStationLocationByGuardianId = channel.unary_unary( - "/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId", - request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdResponse.FromString, - ) + '/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId', + request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdResponse.FromString, + ) self.GetStationListByBusId = channel.unary_unary( '/where_child_bus.v1.StationService/GetStationListByBusId', request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.SerializeToString, @@ -34,12 +35,6 @@ def __init__(self, channel): response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, ) - self.UpdateStation = channel.unary_unary( - "/where_child_bus.v1.StationService/UpdateStation", - request_serializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, - ) - class StationServiceServicer(object): """Missing associated documentation comment in .proto file.""" @@ -47,14 +42,14 @@ class StationServiceServicer(object): def UpdateStationLocationByGuardianId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetStationListByBusId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetUnregisteredStationList(self, request, context): """Missing associated documentation comment in .proto file.""" @@ -71,13 +66,12 @@ def GetUnregisteredStationList(self, request, context): def UpdateStation(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_StationServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'UpdateStationLocationByGuardianId': grpc.unary_unary_rpc_method_handler( servicer.UpdateStationLocationByGuardianId, request_deserializer=where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.FromString, @@ -100,75 +94,49 @@ def add_StationServiceServicer_to_server(servicer, server): ), } generic_handler = grpc.method_handlers_generic_handler( - "where_child_bus.v1.StationService", rpc_method_handlers - ) + 'where_child_bus.v1.StationService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class StationService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def UpdateStationLocationByGuardianId( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def UpdateStationLocationByGuardianId(request, target, - "/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId', where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdRequest.SerializeToString, where__child__bus_dot_v1_dot_station__pb2.UpdateStationLocationByGuardianIdResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetStationListByBusId( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetStationListByBusId(request, target, - "/where_child_bus.v1.StationService/GetStationListByBusId", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/GetStationListByBusId', where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.SerializeToString, where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetUnregisteredStationList(request, target, options=(), @@ -205,15 +173,16 @@ def GetUnregisteredStationList(request, @staticmethod def UpdateStation(request, target, - "/where_child_bus.v1.StationService/UpdateStation", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/UpdateStation', where__child__bus_dot_v1_dot_station__pb2.UpdateStationRequest.SerializeToString, where__child__bus_dot_v1_dot_station__pb2.UpdateStationResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto index 64c6dd4b..6f664187 100644 --- a/proto/where_child_bus/v1/station.proto +++ b/proto/where_child_bus/v1/station.proto @@ -44,9 +44,10 @@ message GetUnregisteredStationListResponse { message UpdateStationRequest { string id = 1; - double latitude = 2; - double longitude = 3; - google.protobuf.FieldMask update_mask = 4; + string bus_id = 2; + double latitude = 3; + double longitude = 4; + google.protobuf.FieldMask update_mask = 5; } message UpdateStationResponse { From 0b591045a1fc487ff4b8f79b4784b6b5d12bd279 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 21 Feb 2024 03:29:57 +0900 Subject: [PATCH 607/771] =?UTF-8?q?feat:requestManager=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/google_map_view.dart | 24 ++++--- .../map_page/components/arrival_time.dart | 8 ++- .../components/bus_to_bus_stop_time.dart | 6 +- .../map_page/google_map_api_manager.dart | 13 ++++ .../lib/pages/map_page/map_page.dart | 66 +++++++++++++++---- 5 files changed, 91 insertions(+), 26 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/pages/map_page/google_map_api_manager.dart diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index 897fa96d..a7463608 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -3,6 +3,7 @@ import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart'; import '../../pages/map_page/map_page.dart'; +import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; class GoogleMapView extends StatefulWidget { final List waypoints; @@ -93,16 +94,19 @@ class _GoogleMapView extends State { location: "${waypoint.latitude},${waypoint.longitude}")) .toList(); try { - PolylineResult result = await polylinePoints.getRouteBetweenCoordinates( - googleApiKey, - PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), - PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), - travelMode: TravelMode.driving, - avoidTolls: true, - avoidHighways: false, - avoidFerries: false, - wayPoints: polylineWayPoints, - ); + late PolylineResult result; + if (GoogleMapApiManager.canSendRequest()) { + result = await polylinePoints.getRouteBetweenCoordinates( + googleApiKey, + PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), + PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), + travelMode: TravelMode.driving, + avoidTolls: true, + avoidHighways: false, + avoidFerries: false, + wayPoints: polylineWayPoints, + ); + } if (result.points.isNotEmpty) { result.points.forEach((PointLatLng point) { diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index 1568b468..d80c8082 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:http/http.dart' as http; +import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; import 'dart:convert'; import '../map_page.dart'; @@ -65,6 +67,7 @@ class _ArrivalTime extends State { List waypoints) async { String apiKey = dotenv.get("GOOGLE_MAP_API_KEY"); String url = ''; + dynamic response; if (waypoints[0].latitude == endLat && waypoints[0].longitude == endLng) { url = 'https://maps.googleapis.com/maps/api/directions/json' @@ -84,8 +87,9 @@ class _ArrivalTime extends State { url = 'https://maps.googleapis.com/maps/api/directions/json' '?destination=$endLat,$endLng&origin=$startLat,$startLng&waypoints=$waypointsString&key=$apiKey'; } - - final response = await http.get(Uri.parse(url)); + if (GoogleMapApiManager.canSendRequest()) { + response = await http.get(Uri.parse(url)); + } if (response.statusCode == 200) { final data = json.decode(response.body); diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart index 866cb183..3d658db5 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart @@ -4,6 +4,7 @@ import 'package:http/http.dart' as http; import 'dart:convert'; import 'dart:math' as math; import '../map_page.dart'; +import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; class BusToBusStopTime extends StatefulWidget { final List waypoints; @@ -61,6 +62,7 @@ class _BusToBusStopTime extends State { List waypoints) async { String apiKey = dotenv.get("GOOGLE_MAP_API_KEY"); String url = ''; + dynamic response; int nearestWaypointIndex = findNearestWaypointIndex(startLat, startLng, waypoints); @@ -100,7 +102,9 @@ class _BusToBusStopTime extends State { '?destination=$endLat,$endLng&origin=$startLat,$startLng&waypoints=$waypointsString&key=$apiKey'; } - final response = await http.get(Uri.parse(url)); + if (GoogleMapApiManager.canSendRequest()) { + response = await http.get(Uri.parse(url)); + } if (response.statusCode == 200) { final data = json.decode(response.body); diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/google_map_api_manager.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/google_map_api_manager.dart new file mode 100644 index 00000000..c9ed08d3 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/google_map_api_manager.dart @@ -0,0 +1,13 @@ +class GoogleMapApiManager { + static DateTime _lastRequestTime = + DateTime.now().subtract(Duration(seconds: 50)); + + static bool canSendRequest() { + final currentTime = DateTime.now(); + if (currentTime.difference(_lastRequestTime).inSeconds >= 50) { + _lastRequestTime = currentTime; + return true; + } + return false; + } +} diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index f7900a01..86f24ea6 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -6,12 +6,14 @@ import 'package:http/http.dart' as http; import 'dart:convert'; import 'package:where_child_bus_guardian/components/utils/google_map_view.dart'; import 'package:where_child_bus_guardian/pages/map_page/components/map_page_bottom.dart'; +import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; import 'package:where_child_bus_guardian/service/get_running_bus_by_guardian_id.dart'; import 'package:where_child_bus_guardian/service/get_station_list_by_bus_id.dart'; import 'package:where_child_bus_guardian/service/get_nursery_by_guardian_id.dart'; import 'package:where_child_bus_guardian/util/guardian_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; +import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; class Waypoint { final double latitude; @@ -55,7 +57,12 @@ class _MapPageState extends State { _isLoading = true; super.initState(); guardian = GuardianData().getGuardian(); - _loadData(); + _loadBusLocation(); + _loadBusData(); + _loadStationsData(); + _loadWaypointData(); + _loadNurseryData(); + _getCoordinates(); _isLoading = false; } @@ -68,33 +75,66 @@ class _MapPageState extends State { }); } - Future _loadData() async { + Future _loadBusData() async { try { var busRes = await getRunningBusByGuardianIdService(guardian.id); + setState(() { + bus = busRes.bus; + }); + } catch (error) { + developer.log('バスの読み込みに失敗しました: $error'); + } + } + + Future _loadStationsData() async { + try { var stationsRes = await getStationListByBusIdService(bus.id); - var nurseryRes = await getNurseryByGuardianIdService(guardian.id); + setState(() { + stations = stationsRes.stations; + }); + } catch (error) { + developer.log('停留所リストの読み込みに失敗しました: $error'); + } + } + + Future _loadWaypointData() async { + try { stations.forEach((station) { waypoints.add(Waypoint( latitude: station.latitude, longitude: station.longitude, name: station.id.toString())); }); - final response = await http.get(Uri.parse( - 'https://maps.googleapis.com/maps/api/geocode/json?address=$nurseryAddress&key=$googleApiKey')); - final data = json.decode(response.body); - final location = data['results'][0]['geometry']['location']; + } catch (error) { + developer.log('通過点の読み込みに失敗しました: $error'); + } + } + Future _loadNurseryData() async { + try { + var nurseryRes = await getNurseryByGuardianIdService(guardian.id); setState(() { - bus = busRes.bus; - stations = stationsRes.stations; nursery = nurseryRes.nurseries; - nurseryAddress = nursery.address; - nurseryLatitude = location['lat']; - nurseryLongitude = location['lng']; + developer.log(nursery.address); + if (nursery != null) { + nurseryAddress = nursery.address; + } }); } catch (error) { - developer.log('データの読み込みに失敗しました: $error'); + developer.log('保育園の読み込みに失敗しました: $error'); + } + } + + Future _getCoordinates() async { + dynamic response; + if (GoogleMapApiManager.canSendRequest()) { + response = await http.get(Uri.parse( + 'https://maps.googleapis.com/maps/api/geocode/json?address=$nurseryAddress&key=$googleApiKey')); } + final data = json.decode(response.body); + final location = data['results'][0]['geometry']['location']; + nurseryLatitude = location['lat']; + nurseryLongitude = location['lng']; } @override From d9d0a02c4e7a0eaa699f2a88e1e20e705d95a0ba Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 03:36:12 +0900 Subject: [PATCH 608/771] =?UTF-8?q?fix:=20Transaction=E5=87=A6=E7=90=86?= =?UTF-8?q?=E7=B5=82=E4=BA=86=E5=BE=8C=E3=81=AEDB=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/station/station.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 13a0e34c..1423625c 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -150,12 +150,6 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq } } - // トランザクションのコミット - if err := tx.Commit(); err != nil { - i.logger.Error("failed to commit transaction", "error", err) - return nil, err - } - // 次のバス停を取得 morningNextStationID, eveningNextStationID, err := getNextStationIDs(*i.logger, ctx, updateStation) if err != nil { @@ -163,6 +157,12 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq return nil, err } + // トランザクションのコミット + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + // レスポンスの作成と返却 return &pb.UpdateStationResponse{ Station: utils.ToPbStation(updateStation, morningNextStationID, eveningNextStationID), From 12c70f2aa6c8a2a8d2698534ec676e2c0fd92ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=82=8F=E3=81=8D=E3=82=93?= <93261102+KinjiKawaguchi@users.noreply.github.com> Date: Wed, 21 Feb 2024 03:37:22 +0900 Subject: [PATCH 609/771] =?UTF-8?q?fix:=20Transaction=E5=87=A6=E7=90=86?= =?UTF-8?q?=E7=B5=82=E4=BA=86=E5=BE=8C=E3=81=AEDB=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=20(#148)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/station/station.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 13a0e34c..1423625c 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -150,12 +150,6 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq } } - // トランザクションのコミット - if err := tx.Commit(); err != nil { - i.logger.Error("failed to commit transaction", "error", err) - return nil, err - } - // 次のバス停を取得 morningNextStationID, eveningNextStationID, err := getNextStationIDs(*i.logger, ctx, updateStation) if err != nil { @@ -163,6 +157,12 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq return nil, err } + // トランザクションのコミット + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + // レスポンスの作成と返却 return &pb.UpdateStationResponse{ Station: utils.ToPbStation(updateStation, morningNextStationID, eveningNextStationID), From b23af2dbc936d83e5d3006474e9dac7554ad240b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 04:10:50 +0900 Subject: [PATCH 610/771] =?UTF-8?q?fix:=20updatebus=E3=81=AE=E3=83=AC?= =?UTF-8?q?=E3=82=B9=E3=83=9D=E3=83=B3=E3=82=B9=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 19 ++++++++----------- backend/usecases/utils/utils.go | 6 +++++- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index b3badc86..a49cfbfa 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -15,10 +15,8 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + boardingrecordRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childbusassociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" @@ -210,7 +208,7 @@ func (i *Interactor) GetRunningBusByGuardianID(ctx context.Context, req *pb.GetR bus, err := i.entClient.Bus.Query(). Where(busRepo.HasNurseryWith(nurseryRepo.HasGuardiansWith(guardianRepo.ID(guardianID)))). - Where(busRepo.StatusEQ(bus.StatusRunning)). + Where(busRepo.StatusEQ(busRepo.StatusRunning)). Only(ctx) if err != nil { @@ -296,7 +294,7 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* defer utils.RollbackTx(tx, i.logger) // 更新処理のビルダー - update := tx.Bus.Update().Where(bus.IDEQ(busID)) + update := tx.Bus.Update().Where(busRepo.IDEQ(busID)) for _, path := range req.UpdateMask.Paths { switch path { case "name": @@ -504,8 +502,8 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_St // 既存のレコードを検索 exists, err := tx.BoardingRecord.Query(). - Where(boardingrecord.HasChildWith(child.IDEQ(childUUID))). - Where(boardingrecord.HasBusWith(bus.IDEQ(busUUID))). + Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). + Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(busUUID))). Exist(context.Background()) if err != nil { return err @@ -524,8 +522,8 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_St } boardingrecord, err := tx.BoardingRecord.Query(). - Where(boardingrecord.HasChildWith(child.IDEQ(childUUID))). - Where(boardingrecord.HasBusWith(bus.IDEQ(busUUID))). + Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). + Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(busUUID))). Only(context.Background()) if err != nil { return err @@ -558,7 +556,7 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_St // 子供の情報を取得してレスポンスに追加 child, err := tx.Child.Query(). - Where(child.IDEQ(childUUID)). + Where(childRepo.IDEQ(childUUID)). WithGuardian(). Only(context.Background()) if err != nil { @@ -698,4 +696,3 @@ func setNextStation(logger slog.Logger, ctx context.Context, tx *ent.Tx, guardia } return nil } - diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 5e775de8..17ccd825 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -57,6 +57,9 @@ func ConvertPbStatusToEntStatus(pbStatus pb.BusStatus) (*busRepo.Status, error) case pb.BusStatus_BUS_STATUS_STOPPED: status := busRepo.StatusStopped return &status, nil + case pb.BusStatus_BUS_STATUS_MAINTENANCE: + status := busRepo.StatusMaintenance + return &status, nil default: // 不正な値の場合はエラーを返す return nil, fmt.Errorf("invalid Status value: %v", pbStatus) @@ -99,7 +102,7 @@ func ConvertPbSexToEntSex(pbSex pb.Sex) (*child.Sex, error) { func convertStatusToPbStatus(status busRepo.Status) pb.BusStatus { switch status { case busRepo.StatusRunning: - return pb.BusStatus_BUS_STATUS_STOPPED + return pb.BusStatus_BUS_STATUS_RUNNING case busRepo.StatusStopped: return pb.BusStatus_BUS_STATUS_STOPPED case busRepo.StatusMaintenance: @@ -222,6 +225,7 @@ func CheckAndFixBusStationCoordinates(logger slog.Logger, ctx context.Context, b } // Stationは正しく設定されているので、バスのステータスを訂正 if bus.Status == busRepo.StatusMaintenance { + print("バスのステータスを訂正します") _, err := bus.Update().SetStatus(busRepo.StatusStopped).Save(ctx) if err != nil { logger.Error("failed to update bus", "error", err) From 6c509d354dd2c4bb6c4fdf967927ab0b4d159f2b Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 21 Feb 2024 04:14:32 +0900 Subject: [PATCH 611/771] =?UTF-8?q?feat(ml):=20=E7=AC=91=E9=A1=94=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E3=81=AE=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/pred.py | 28 ++++--- .../src/face_detect_model/util.py | 77 +++++++++++++++++++ 2 files changed, 95 insertions(+), 10 deletions(-) diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index 031e0fa9..05aa2da6 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -25,6 +25,7 @@ load_pickle_to_gcs, logger, switch_to_bus_type, + smile_detecter, ) @@ -79,19 +80,23 @@ def convert_to_tensor_from_images(clipped_face_images): return image_tensors -def get_clipped_faces_from_images(args, config, save_bucket): +def get_clipped_faces_from_images(args, config, detecter, save_bucket): all_faces = [] - for video in args.video_chunk: - image = load_image_from_binary(args, video) + for video_clip in args.video_chunk: + image = load_image_from_binary(args, video_clip) clipped_faces = detect_face_and_clip_from_image(image, config) if len(clipped_faces) > 0: # timestampをファイル名に含めて保存 - now = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) - save_face_image_to_remote( - image, - f"{args.nursery_id}/{args.bus_id}/{now}_{switch_to_bus_type(args.bus_type)}.png", - save_bucket, - ) + for clipped_face in clipped_faces: + smile_degree = detecter.detect_smile_degree(clipped_face) + logger.info(f"Smile degree: {smile_degree}") + smile_image = detecter.add_smile_degree_to_image(image, smile_degree) + now = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + save_face_image_to_remote( + smile_image, + f"{args.nursery_id}/{args.bus_id}/{now}_{switch_to_bus_type(args.bus_type)}.png", + save_bucket, + ) all_faces.extend(clipped_faces) return all_faces @@ -131,7 +136,10 @@ def pred_child_from_images(args, config): idx_to_label_dict = load_pickle_to_gcs(bucket, idx_to_label_dict_bucket_path) model_class_num = len(idx_to_label_dict) - clipped_faces = get_clipped_faces_from_images(args, config, bucket_for_face) + detecter = smile_detecter() + clipped_faces = get_clipped_faces_from_images( + args, config, detecter, bucket_for_face + ) if len(clipped_faces) == 0: logger.info("No face detected.") diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index 3d750507..49eb0124 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -172,3 +172,80 @@ def load_pickle_to_gcs(bucket: Bucket, obj_path: str) -> object: model = torch.load(f) logger.info(f"pickle loaded from {obj_path}") return model + + +class smile_detecter: + def __init__( + self, scaleFactor=1.1, minNeighbors=10, cascade_path="haarcascade_smile.xml" + ): + self.scaleFactor = scaleFactor + self.minNeighbors = minNeighbors + self.smile_cascade = self.get_casecade(cascade_path) + + def get_casecade(self, cascade_path): + cascade = cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) + if cascade is None: + raise ValueError(f"Can not load cascade: {cascade_path}") + return cascade + + def detect_smile_degree(self, gray_image): + smile = self.smile_cascade.detectMultiScale( + gray_image, scaleFactor=self.scaleFactor, minNeighbors=self.minNeighbors + ) + if len(smile) > 0: + (_, _, sw, sh) = smile[0] + smile_area = sw * sh + smile_degree = ( + smile_area / (gray_image.shape[0] * gray_image.shape[1]) * 100 + ) + return smile_degree + + return 0 + + def add_smile_degree_to_image( + self, image, smile_degree, font_scale=0.7, thickness=2 + ): + # 画像の高さと幅を取得 + height, width = image.shape[:2] + + # テキストを追加する位置(画像の下部中央付近) + position = (10, height - 10) # 下部に少し余白を残す + + # テキストのフォント + font = cv2.FONT_HERSHEY_SIMPLEX + + # テキストの色(BGR形式) + color = (255, 255, 255) # 白色 + + # テキストの背景色 + background_color = (0, 0, 0) # 黒色 + + # 小数点以下1桁まで表示 + smile_degree = round(smile_degree, 1) + + # テキストの背景を描画(背景に少し余白を持たせるためにテキストサイズを計算) + (text_width, text_height), _ = cv2.getTextSize( + f"Smile degree: {smile_degree}", font, font_scale, thickness + ) + image_copy = image.copy() + cv2.rectangle( + image_copy, + position, + (position[0] + text_width, position[1] + text_height + 10), + background_color, + -1, + ) + + # テキストを画像に追加 + cv2.putText( + image_copy, + f"Smile degree: {smile_degree}", + position, + font, + font_scale, + color, + thickness, + cv2.LINE_AA, + ) + + return image_copy From a3a22c0b618964f6c209faa152f54c54f1f39c71 Mon Sep 17 00:00:00 2001 From: Mizuki Baba <76275131+lovelovetrb@users.noreply.github.com> Date: Wed, 21 Feb 2024 04:20:22 +0900 Subject: [PATCH 612/771] =?UTF-8?q?feat(ml):=20=E7=AC=91=E9=A1=94=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E3=81=AE=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=20(#150)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/pred.py | 28 ++++--- .../src/face_detect_model/util.py | 77 +++++++++++++++++++ 2 files changed, 95 insertions(+), 10 deletions(-) diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index 031e0fa9..05aa2da6 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -25,6 +25,7 @@ load_pickle_to_gcs, logger, switch_to_bus_type, + smile_detecter, ) @@ -79,19 +80,23 @@ def convert_to_tensor_from_images(clipped_face_images): return image_tensors -def get_clipped_faces_from_images(args, config, save_bucket): +def get_clipped_faces_from_images(args, config, detecter, save_bucket): all_faces = [] - for video in args.video_chunk: - image = load_image_from_binary(args, video) + for video_clip in args.video_chunk: + image = load_image_from_binary(args, video_clip) clipped_faces = detect_face_and_clip_from_image(image, config) if len(clipped_faces) > 0: # timestampをファイル名に含めて保存 - now = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) - save_face_image_to_remote( - image, - f"{args.nursery_id}/{args.bus_id}/{now}_{switch_to_bus_type(args.bus_type)}.png", - save_bucket, - ) + for clipped_face in clipped_faces: + smile_degree = detecter.detect_smile_degree(clipped_face) + logger.info(f"Smile degree: {smile_degree}") + smile_image = detecter.add_smile_degree_to_image(image, smile_degree) + now = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + save_face_image_to_remote( + smile_image, + f"{args.nursery_id}/{args.bus_id}/{now}_{switch_to_bus_type(args.bus_type)}.png", + save_bucket, + ) all_faces.extend(clipped_faces) return all_faces @@ -131,7 +136,10 @@ def pred_child_from_images(args, config): idx_to_label_dict = load_pickle_to_gcs(bucket, idx_to_label_dict_bucket_path) model_class_num = len(idx_to_label_dict) - clipped_faces = get_clipped_faces_from_images(args, config, bucket_for_face) + detecter = smile_detecter() + clipped_faces = get_clipped_faces_from_images( + args, config, detecter, bucket_for_face + ) if len(clipped_faces) == 0: logger.info("No face detected.") diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index 3d750507..49eb0124 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -172,3 +172,80 @@ def load_pickle_to_gcs(bucket: Bucket, obj_path: str) -> object: model = torch.load(f) logger.info(f"pickle loaded from {obj_path}") return model + + +class smile_detecter: + def __init__( + self, scaleFactor=1.1, minNeighbors=10, cascade_path="haarcascade_smile.xml" + ): + self.scaleFactor = scaleFactor + self.minNeighbors = minNeighbors + self.smile_cascade = self.get_casecade(cascade_path) + + def get_casecade(self, cascade_path): + cascade = cv2.CascadeClassifier(cv2.data.haarcascades + cascade_path) + if cascade is None: + raise ValueError(f"Can not load cascade: {cascade_path}") + return cascade + + def detect_smile_degree(self, gray_image): + smile = self.smile_cascade.detectMultiScale( + gray_image, scaleFactor=self.scaleFactor, minNeighbors=self.minNeighbors + ) + if len(smile) > 0: + (_, _, sw, sh) = smile[0] + smile_area = sw * sh + smile_degree = ( + smile_area / (gray_image.shape[0] * gray_image.shape[1]) * 100 + ) + return smile_degree + + return 0 + + def add_smile_degree_to_image( + self, image, smile_degree, font_scale=0.7, thickness=2 + ): + # 画像の高さと幅を取得 + height, width = image.shape[:2] + + # テキストを追加する位置(画像の下部中央付近) + position = (10, height - 10) # 下部に少し余白を残す + + # テキストのフォント + font = cv2.FONT_HERSHEY_SIMPLEX + + # テキストの色(BGR形式) + color = (255, 255, 255) # 白色 + + # テキストの背景色 + background_color = (0, 0, 0) # 黒色 + + # 小数点以下1桁まで表示 + smile_degree = round(smile_degree, 1) + + # テキストの背景を描画(背景に少し余白を持たせるためにテキストサイズを計算) + (text_width, text_height), _ = cv2.getTextSize( + f"Smile degree: {smile_degree}", font, font_scale, thickness + ) + image_copy = image.copy() + cv2.rectangle( + image_copy, + position, + (position[0] + text_width, position[1] + text_height + 10), + background_color, + -1, + ) + + # テキストを画像に追加 + cv2.putText( + image_copy, + f"Smile degree: {smile_degree}", + position, + font, + font_scale, + color, + thickness, + cv2.LINE_AA, + ) + + return image_copy From bb8b5adf435e6637cb5b677cf32b16491efd3504 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 04:21:36 +0900 Subject: [PATCH 613/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E5=AE=9F=E8=A1=8C=E4=B8=AD=E3=81=AE=E5=8F=96=E5=BE=97=E3=81=AB?= =?UTF-8?q?WithNursery=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index a49cfbfa..63080e60 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -209,6 +209,7 @@ func (i *Interactor) GetRunningBusByGuardianID(ctx context.Context, req *pb.GetR bus, err := i.entClient.Bus.Query(). Where(busRepo.HasNurseryWith(nurseryRepo.HasGuardiansWith(guardianRepo.ID(guardianID)))). Where(busRepo.StatusEQ(busRepo.StatusRunning)). + WithNursery(). Only(ctx) if err != nil { From 2d3f6e3cc6dbc72ee8b0fb8dbb28721c3b2ef854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=82=8F=E3=81=8D=E3=82=93?= <93261102+KinjiKawaguchi@users.noreply.github.com> Date: Wed, 21 Feb 2024 04:22:25 +0900 Subject: [PATCH 614/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E5=AE=9F=E8=A1=8C=E4=B8=AD=E3=81=AE=E5=8F=96=E5=BE=97=E3=81=AB?= =?UTF-8?q?WithNursery=E3=82=92=E8=BF=BD=E5=8A=A0=20(#151)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index a49cfbfa..63080e60 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -209,6 +209,7 @@ func (i *Interactor) GetRunningBusByGuardianID(ctx context.Context, req *pb.GetR bus, err := i.entClient.Bus.Query(). Where(busRepo.HasNurseryWith(nurseryRepo.HasGuardiansWith(guardianRepo.ID(guardianID)))). Where(busRepo.StatusEQ(busRepo.StatusRunning)). + WithNursery(). Only(ctx) if err != nil { From 174616b85dc7bd3fda69514f30a4c4647feaab63 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 21 Feb 2024 04:31:18 +0900 Subject: [PATCH 615/771] =?UTF-8?q?fix(ml):=20=E6=AD=A3=E3=81=97=E3=81=84.?= =?UTF-8?q?env=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=82=89=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E8=A7=A3?= =?UTF-8?q?=E6=B1=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_learning/Dockerfile b/machine_learning/Dockerfile index af01ace8..5e89caea 100644 --- a/machine_learning/Dockerfile +++ b/machine_learning/Dockerfile @@ -28,7 +28,7 @@ COPY ./src /machine-learning/src # .envファイルを作成し、ビルド引数の値を書き込む RUN mkdir -p /machine-learning/secrets && \ echo "PROJECT_ID=$GCP_PROJECT_ID" > /machine-learning/secrets/.env && \ - echo "BUCKET_NAME=$BUCKET_NAME_FOR_ML" >> /machine-learning/secrets/.env && \ + echo "BUCKET_NAME_FOR_MODEL=$BUCKET_NAME_FOR_ML" >> /machine-learning/secrets/.env && \ echo "BUCKET_NAME_FOR_FACE=$BUCKET_NAME_FOR_FACE" >> /machine-learning/secrets/.env # 環境変数PATHの設定 From 98f26cd23be363b540438dc26d56879425023bf5 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Wed, 21 Feb 2024 04:48:06 +0900 Subject: [PATCH 616/771] fix(ml) --- machine_learning/Dockerfile | 3 ++- machine_learning/src/face_detect_model/gcp_util.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/machine_learning/Dockerfile b/machine_learning/Dockerfile index 5e89caea..ca489aee 100644 --- a/machine_learning/Dockerfile +++ b/machine_learning/Dockerfile @@ -28,7 +28,8 @@ COPY ./src /machine-learning/src # .envファイルを作成し、ビルド引数の値を書き込む RUN mkdir -p /machine-learning/secrets && \ echo "PROJECT_ID=$GCP_PROJECT_ID" > /machine-learning/secrets/.env && \ - echo "BUCKET_NAME_FOR_MODEL=$BUCKET_NAME_FOR_ML" >> /machine-learning/secrets/.env && \ + echo "BUCKET_NAME=$BUCKET_NAME_FOR_PHOTO" >> /machine-learning/secrets/.env && \ + echo "BUCKET_NAME_FOR_MODEL=$BUCKET_NAME_FOR_MODEL" >> /machine-learning/secrets/.env && \ echo "BUCKET_NAME_FOR_FACE=$BUCKET_NAME_FOR_FACE" >> /machine-learning/secrets/.env # 環境変数PATHの設定 diff --git a/machine_learning/src/face_detect_model/gcp_util.py b/machine_learning/src/face_detect_model/gcp_util.py index 78b1c21c..e3a64d2e 100644 --- a/machine_learning/src/face_detect_model/gcp_util.py +++ b/machine_learning/src/face_detect_model/gcp_util.py @@ -19,6 +19,7 @@ def init_client(): def get_bucket(client: gcs.Client, bucket_name: str): + logger.info(f"Getting bucket '{bucket_name}'...") bucket = client.bucket(bucket_name) if bucket.exists(): @@ -28,6 +29,7 @@ def get_bucket(client: gcs.Client, bucket_name: str): def get_blobs(bucket: Bucket, blob_name: str): + logger.info(f"Getting blobs with prefix '{blob_name}'...") # blobsの中身に対するエラーハンドリング try: blobs = list(bucket.list_blobs(prefix=blob_name)) From 49647c32a1ca5742ea8e7476633fe8a5e94f2f65 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 06:04:49 +0900 Subject: [PATCH 617/771] =?UTF-8?q?fix:=20=E3=83=8C=E3=83=AB=E3=83=9D?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/station/station.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 1423625c..4702c308 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -180,7 +180,11 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati Where(stationRepo.HasBusWith(busRepo.ID(busID))). WithGuardian(func(q *ent.GuardianQuery) { q.WithNursery() - q.WithChildren() + q.WithChildren( + func(q *ent.ChildQuery) { + q.WithGuardian() + }, + ) }). All(ctx) From fa877436a191a3e2d54ac2bbb43854d2b061991f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 06:09:28 +0900 Subject: [PATCH 618/771] Fix Station message field indices --- .../go/where_child_bus/v1/resources.pb.go | 197 +++++++-------- .../where_child_bus/v1/resources.pb.dart | 56 ++--- .../where_child_bus/v1/resources.pbjson.dart | 13 +- .../where_child_bus/v1/resources_pb2.py | 76 +++--- .../where_child_bus/v1/resources_pb2.pyi | 234 ++---------------- .../where_child_bus/v1/resources_pb2_grpc.py | 1 + proto/where_child_bus/v1/resources.proto | 6 +- 7 files changed, 166 insertions(+), 417 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 4c3afbf7..98e77278 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -951,10 +951,8 @@ type Station struct { EveningNextStationId string `protobuf:"bytes,4,opt,name=evening_next_station_id,json=eveningNextStationId,proto3" json:"evening_next_station_id,omitempty"` Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` - MorningOrder int32 `protobuf:"varint,7,opt,name=morning_order,json=morningOrder,proto3" json:"morning_order,omitempty"` - EveningOrder int32 `protobuf:"varint,8,opt,name=evening_order,json=eveningOrder,proto3" json:"evening_order,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *Station) Reset() { @@ -1031,20 +1029,6 @@ func (x *Station) GetLongitude() float64 { return 0 } -func (x *Station) GetMorningOrder() int32 { - if x != nil { - return x.MorningOrder - } - return 0 -} - -func (x *Station) GetEveningOrder() int32 { - if x != nil { - return x.EveningOrder - } - return 0 -} - func (x *Station) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -1493,7 +1477,7 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xa2, 0x03, 0x0a, 0x07, 0x53, 0x74, 0x61, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xd8, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, @@ -1507,96 +1491,91 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x69, - 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x8f, 0x01, - 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, - 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xcc, - 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x68, 0x6f, 0x74, - 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x68, - 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, - 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, - 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, - 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x73, 0x0a, - 0x09, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, - 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, - 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, - 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, - 0x10, 0x03, 0x2a, 0x62, 0x0a, 0x0c, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x56, - 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, - 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, - 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, - 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, - 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, - 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, - 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, - 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, + 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, + 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, + 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, + 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2a, 0x73, 0x0a, 0x09, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, + 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, + 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, + 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, + 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x62, 0x0a, 0x0c, 0x56, 0x65, 0x68, 0x69, + 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x45, 0x48, 0x49, + 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x45, 0x48, 0x49, 0x43, + 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, + 0x01, 0x12, 0x19, 0x0a, 0x15, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, + 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, + 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, + 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, + 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, + 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, + 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, + 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, + 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, + 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, + 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, + 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 57257984..a6fa8226 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -1109,8 +1109,6 @@ class Station extends $pb.GeneratedMessage { $core.String? eveningNextStationId, $core.double? latitude, $core.double? longitude, - $core.int? morningOrder, - $core.int? eveningOrder, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, }) { @@ -1133,12 +1131,6 @@ class Station extends $pb.GeneratedMessage { if (longitude != null) { $result.longitude = longitude; } - if (morningOrder != null) { - $result.morningOrder = morningOrder; - } - if (eveningOrder != null) { - $result.eveningOrder = eveningOrder; - } if (createdAt != null) { $result.createdAt = createdAt; } @@ -1158,10 +1150,8 @@ class Station extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'eveningNextStationId') ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..a<$core.int>(7, _omitFieldNames ? '' : 'morningOrder', $pb.PbFieldType.O3) - ..a<$core.int>(8, _omitFieldNames ? '' : 'eveningOrder', $pb.PbFieldType.O3) - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -1241,44 +1231,26 @@ class Station extends $pb.GeneratedMessage { void clearLongitude() => clearField(6); @$pb.TagNumber(7) - $core.int get morningOrder => $_getIZ(6); + $7.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set morningOrder($core.int v) { $_setSignedInt32(6, v); } + set createdAt($7.Timestamp v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) - $core.bool hasMorningOrder() => $_has(6); + void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - void clearMorningOrder() => clearField(7); + $7.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $core.int get eveningOrder => $_getIZ(7); + $7.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set eveningOrder($core.int v) { $_setSignedInt32(7, v); } + set updatedAt($7.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) - $core.bool hasEveningOrder() => $_has(7); + $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) - void clearEveningOrder() => clearField(8); - - @$pb.TagNumber(9) - $7.Timestamp get createdAt => $_getN(8); - @$pb.TagNumber(9) - set createdAt($7.Timestamp v) { setField(9, v); } - @$pb.TagNumber(9) - $core.bool hasCreatedAt() => $_has(8); - @$pb.TagNumber(9) - void clearCreatedAt() => clearField(9); - @$pb.TagNumber(9) - $7.Timestamp ensureCreatedAt() => $_ensure(8); - - @$pb.TagNumber(10) - $7.Timestamp get updatedAt => $_getN(9); - @$pb.TagNumber(10) - set updatedAt($7.Timestamp v) { setField(10, v); } - @$pb.TagNumber(10) - $core.bool hasUpdatedAt() => $_has(9); - @$pb.TagNumber(10) - void clearUpdatedAt() => clearField(10); - @$pb.TagNumber(10) - $7.Timestamp ensureUpdatedAt() => $_ensure(9); + void clearUpdatedAt() => clearField(8); + @$pb.TagNumber(8) + $7.Timestamp ensureUpdatedAt() => $_ensure(7); } class ChildBusAssociation extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 95dcc217..15b05264 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -250,10 +250,8 @@ const Station$json = { {'1': 'evening_next_station_id', '3': 4, '4': 1, '5': 9, '10': 'eveningNextStationId'}, {'1': 'latitude', '3': 5, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 6, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'morning_order', '3': 7, '4': 1, '5': 5, '10': 'morningOrder'}, - {'1': 'evening_order', '3': 8, '4': 1, '5': 5, '10': 'eveningOrder'}, - {'1': 'created_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 10, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; @@ -263,10 +261,9 @@ final $typed_data.Uint8List stationDescriptor = $convert.base64Decode( '5JZBI1Chdtb3JuaW5nX25leHRfc3RhdGlvbl9pZBgDIAEoCVIUbW9ybmluZ05leHRTdGF0aW9u' 'SWQSNQoXZXZlbmluZ19uZXh0X3N0YXRpb25faWQYBCABKAlSFGV2ZW5pbmdOZXh0U3RhdGlvbk' 'lkEhoKCGxhdGl0dWRlGAUgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYBiABKAFSCWxvbmdp' - 'dHVkZRIjCg1tb3JuaW5nX29yZGVyGAcgASgFUgxtb3JuaW5nT3JkZXISIwoNZXZlbmluZ19vcm' - 'RlchgIIAEoBVIMZXZlbmluZ09yZGVyEjkKCmNyZWF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJv' - 'dG9idWYuVGltZXN0YW1wUgljcmVhdGVkQXQSOQoKdXBkYXRlZF9hdBgKIAEoCzIaLmdvb2dsZS' - '5wcm90b2J1Zi5UaW1lc3RhbXBSCXVwZGF0ZWRBdA=='); + 'dHVkZRI5CgpjcmVhdGVkX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3' + 'JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1w' + 'Ugl1cGRhdGVkQXQ='); @$core.Deprecated('Use childBusAssociationDescriptor instead') const ChildBusAssociation$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py index 6f971791..d66a7c06 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py @@ -7,7 +7,6 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,48 +14,43 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\x91\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xa2\x03\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12#\n\rmorning_order\x18\x07 \x01(\x05R\x0cmorningOrder\x12#\n\revening_order\x18\x08 \x01(\x05R\x0c\x65veningOrder\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' -) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x91\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xd8\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.resources_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.resources_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals[ - "DESCRIPTOR" - ]._serialized_options = b"\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - _globals["_BUSSTATUS"]._serialized_start = 3391 - _globals["_BUSSTATUS"]._serialized_end = 3506 - _globals["_VEHICLEEVENT"]._serialized_start = 3508 - _globals["_VEHICLEEVENT"]._serialized_end = 3606 - _globals["_SEX"]._serialized_start = 3608 - _globals["_SEX"]._serialized_end = 3677 - _globals["_BUSTYPE"]._serialized_start = 3679 - _globals["_BUSTYPE"]._serialized_end = 3758 - _globals["_NURSERY"]._serialized_start = 92 - _globals["_NURSERY"]._serialized_end = 414 - _globals["_NURSERYRESPONSE"]._serialized_start = 417 - _globals["_NURSERYRESPONSE"]._serialized_end = 706 - _globals["_GUARDIAN"]._serialized_start = 709 - _globals["_GUARDIAN"]._serialized_end = 1092 - _globals["_GUARDIANRESPONSE"]._serialized_start = 1095 - _globals["_GUARDIANRESPONSE"]._serialized_end = 1445 - _globals["_BUS"]._serialized_start = 1448 - _globals["_BUS"]._serialized_end = 1849 - _globals["_CHILD"]._serialized_start = 1852 - _globals["_CHILD"]._serialized_end = 2360 - _globals["_STATION"]._serialized_start = 2363 - _globals["_STATION"]._serialized_end = 2781 - _globals["_CHILDBUSASSOCIATION"]._serialized_start = 2784 - _globals["_CHILDBUSASSOCIATION"]._serialized_end = 2927 - _globals["_BUSSTATIONASSOCIATION"]._serialized_start = 2929 - _globals["_BUSSTATIONASSOCIATION"]._serialized_end = 3006 - _globals["_CHILDPHOTO"]._serialized_start = 3009 - _globals["_CHILDPHOTO"]._serialized_end = 3213 - _globals["_BOARDINGRECORD"]._serialized_start = 3216 - _globals["_BOARDINGRECORD"]._serialized_end = 3389 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_BUSSTATUS']._serialized_start=3317 + _globals['_BUSSTATUS']._serialized_end=3432 + _globals['_VEHICLEEVENT']._serialized_start=3434 + _globals['_VEHICLEEVENT']._serialized_end=3532 + _globals['_SEX']._serialized_start=3534 + _globals['_SEX']._serialized_end=3603 + _globals['_BUSTYPE']._serialized_start=3605 + _globals['_BUSTYPE']._serialized_end=3684 + _globals['_NURSERY']._serialized_start=92 + _globals['_NURSERY']._serialized_end=414 + _globals['_NURSERYRESPONSE']._serialized_start=417 + _globals['_NURSERYRESPONSE']._serialized_end=706 + _globals['_GUARDIAN']._serialized_start=709 + _globals['_GUARDIAN']._serialized_end=1092 + _globals['_GUARDIANRESPONSE']._serialized_start=1095 + _globals['_GUARDIANRESPONSE']._serialized_end=1445 + _globals['_BUS']._serialized_start=1448 + _globals['_BUS']._serialized_end=1849 + _globals['_CHILD']._serialized_start=1852 + _globals['_CHILD']._serialized_end=2360 + _globals['_STATION']._serialized_start=2363 + _globals['_STATION']._serialized_end=2707 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2710 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2853 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=2855 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=2932 + _globals['_CHILDPHOTO']._serialized_start=2935 + _globals['_CHILDPHOTO']._serialized_end=3139 + _globals['_BOARDINGRECORD']._serialized_start=3142 + _globals['_BOARDINGRECORD']._serialized_end=3315 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi index a5ce8b11..8e1725d1 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi @@ -1,12 +1,8 @@ -from typing import ClassVar as _ClassVar -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message from google.protobuf import timestamp_pb2 as _timestamp_pb2 from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -35,7 +31,6 @@ class BusType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): BUS_TYPE_UNSPECIFIED: _ClassVar[BusType] BUS_TYPE_MORNING: _ClassVar[BusType] BUS_TYPE_EVENING: _ClassVar[BusType] - BUS_STATUS_UNSPECIFIED: BusStatus BUS_STATUS_STOPPED: BusStatus BUS_STATUS_RUNNING: BusStatus @@ -52,17 +47,7 @@ BUS_TYPE_MORNING: BusType BUS_TYPE_EVENING: BusType class Nursery(_message.Message): - __slots__ = ( - "id", - "nursery_code", - "name", - "address", - "phone_number", - "email", - "hashed_password", - "created_at", - "updated_at", - ) + __slots__ = ("id", "nursery_code", "name", "address", "phone_number", "email", "hashed_password", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_CODE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -81,30 +66,10 @@ class Nursery(_message.Message): hashed_password: str created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__( - self, - id: _Optional[str] = ..., - nursery_code: _Optional[str] = ..., - name: _Optional[str] = ..., - address: _Optional[str] = ..., - phone_number: _Optional[str] = ..., - email: _Optional[str] = ..., - hashed_password: _Optional[str] = ..., - created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_code: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., hashed_password: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class NurseryResponse(_message.Message): - __slots__ = ( - "id", - "nursery_code", - "name", - "address", - "phone_number", - "email", - "created_at", - "updated_at", - ) + __slots__ = ("id", "nursery_code", "name", "address", "phone_number", "email", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_CODE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -121,31 +86,10 @@ class NurseryResponse(_message.Message): email: str created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__( - self, - id: _Optional[str] = ..., - nursery_code: _Optional[str] = ..., - name: _Optional[str] = ..., - address: _Optional[str] = ..., - phone_number: _Optional[str] = ..., - email: _Optional[str] = ..., - created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_code: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Guardian(_message.Message): - __slots__ = ( - "id", - "nursery_id", - "name", - "email", - "phone_number", - "hashed_password", - "is_use_morning_bus", - "is_use_evening_bus", - "created_at", - "updated_at", - ) + __slots__ = ("id", "nursery_id", "name", "email", "phone_number", "hashed_password", "is_use_morning_bus", "is_use_evening_bus", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -166,32 +110,10 @@ class Guardian(_message.Message): is_use_evening_bus: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__( - self, - id: _Optional[str] = ..., - nursery_id: _Optional[str] = ..., - name: _Optional[str] = ..., - email: _Optional[str] = ..., - phone_number: _Optional[str] = ..., - hashed_password: _Optional[str] = ..., - is_use_morning_bus: bool = ..., - is_use_evening_bus: bool = ..., - created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., hashed_password: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class GuardianResponse(_message.Message): - __slots__ = ( - "id", - "nursery_id", - "name", - "email", - "phone_number", - "is_use_morning_bus", - "is_use_evening_bus", - "created_at", - "updated_at", - ) + __slots__ = ("id", "nursery_id", "name", "email", "phone_number", "is_use_morning_bus", "is_use_evening_bus", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -210,32 +132,10 @@ class GuardianResponse(_message.Message): is_use_evening_bus: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__( - self, - id: _Optional[str] = ..., - nursery_id: _Optional[str] = ..., - name: _Optional[str] = ..., - email: _Optional[str] = ..., - phone_number: _Optional[str] = ..., - is_use_morning_bus: bool = ..., - is_use_evening_bus: bool = ..., - created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Bus(_message.Message): - __slots__ = ( - "id", - "nursery_id", - "name", - "plate_number", - "bus_status", - "latitude", - "longitude", - "enable_face_recognition", - "created_at", - "updated_at", - ) + __slots__ = ("id", "nursery_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -256,37 +156,10 @@ class Bus(_message.Message): enable_face_recognition: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__( - self, - id: _Optional[str] = ..., - nursery_id: _Optional[str] = ..., - name: _Optional[str] = ..., - plate_number: _Optional[str] = ..., - bus_status: _Optional[_Union[BusStatus, str]] = ..., - latitude: _Optional[float] = ..., - longitude: _Optional[float] = ..., - enable_face_recognition: bool = ..., - created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Child(_message.Message): - __slots__ = ( - "id", - "nursery_id", - "guardian_id", - "name", - "age", - "sex", - "check_for_missing_items", - "has_bag", - "has_lunch_box", - "has_water_bottle", - "has_umbrella", - "has_other", - "created_at", - "updated_at", - ) + __slots__ = ("id", "nursery_id", "guardian_id", "name", "age", "sex", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] @@ -315,45 +188,16 @@ class Child(_message.Message): has_other: bool created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__( - self, - id: _Optional[str] = ..., - nursery_id: _Optional[str] = ..., - guardian_id: _Optional[str] = ..., - name: _Optional[str] = ..., - age: _Optional[int] = ..., - sex: _Optional[_Union[Sex, str]] = ..., - check_for_missing_items: bool = ..., - has_bag: bool = ..., - has_lunch_box: bool = ..., - has_water_bottle: bool = ..., - has_umbrella: bool = ..., - has_other: bool = ..., - created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[Sex, str]] = ..., check_for_missing_items: bool = ..., has_bag: bool = ..., has_lunch_box: bool = ..., has_water_bottle: bool = ..., has_umbrella: bool = ..., has_other: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Station(_message.Message): - __slots__ = ( - "id", - "guardian_id", - "morning_next_station_id", - "evening_next_station_id", - "latitude", - "longitude", - "morning_order", - "evening_order", - "created_at", - "updated_at", - ) + __slots__ = ("id", "guardian_id", "morning_next_station_id", "evening_next_station_id", "latitude", "longitude", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] MORNING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] EVENING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] - MORNING_ORDER_FIELD_NUMBER: _ClassVar[int] - EVENING_ORDER_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str @@ -362,23 +206,9 @@ class Station(_message.Message): evening_next_station_id: str latitude: float longitude: float - morning_order: int - evening_order: int created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__( - self, - id: _Optional[str] = ..., - guardian_id: _Optional[str] = ..., - morning_next_station_id: _Optional[str] = ..., - evening_next_station_id: _Optional[str] = ..., - latitude: _Optional[float] = ..., - longitude: _Optional[float] = ..., - morning_order: _Optional[int] = ..., - evening_order: _Optional[int] = ..., - created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., morning_next_station_id: _Optional[str] = ..., evening_next_station_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class ChildBusAssociation(_message.Message): __slots__ = ("id", "bus_id", "child_id", "bus_type") @@ -390,13 +220,7 @@ class ChildBusAssociation(_message.Message): bus_id: str child_id: str bus_type: BusType - def __init__( - self, - id: _Optional[str] = ..., - bus_id: _Optional[str] = ..., - child_id: _Optional[str] = ..., - bus_type: _Optional[_Union[BusType, str]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., bus_id: _Optional[str] = ..., child_id: _Optional[str] = ..., bus_type: _Optional[_Union[BusType, str]] = ...) -> None: ... class BusStationAssociation(_message.Message): __slots__ = ("bus_id", "station_id") @@ -404,9 +228,7 @@ class BusStationAssociation(_message.Message): STATION_ID_FIELD_NUMBER: _ClassVar[int] bus_id: str station_id: str - def __init__( - self, bus_id: _Optional[str] = ..., station_id: _Optional[str] = ... - ) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., station_id: _Optional[str] = ...) -> None: ... class ChildPhoto(_message.Message): __slots__ = ("id", "child_id", "photo_data", "created_at", "updated_at") @@ -420,14 +242,7 @@ class ChildPhoto(_message.Message): photo_data: bytes created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__( - self, - id: _Optional[str] = ..., - child_id: _Optional[str] = ..., - photo_data: _Optional[bytes] = ..., - created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., photo_data: _Optional[bytes] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class BoardingRecord(_message.Message): __slots__ = ("id", "child_id", "bus_id", "is_boarding", "timestamp") @@ -441,11 +256,4 @@ class BoardingRecord(_message.Message): bus_id: str is_boarding: bool timestamp: _timestamp_pb2.Timestamp - def __init__( - self, - id: _Optional[str] = ..., - child_id: _Optional[str] = ..., - bus_id: _Optional[str] = ..., - is_boarding: bool = ..., - timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., bus_id: _Optional[str] = ..., is_boarding: bool = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/resources_pb2_grpc.py index 8a939394..2daafffe 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2_grpc.py @@ -1,3 +1,4 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc + diff --git a/proto/where_child_bus/v1/resources.proto b/proto/where_child_bus/v1/resources.proto index e1fe78ef..fdd7500e 100644 --- a/proto/where_child_bus/v1/resources.proto +++ b/proto/where_child_bus/v1/resources.proto @@ -112,10 +112,8 @@ message Station { string evening_next_station_id = 4; double latitude = 5; double longitude = 6; - int32 morning_order = 7; - int32 evening_order = 8; - google.protobuf.Timestamp created_at = 9; - google.protobuf.Timestamp updated_at = 10; + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at = 8; } enum BusType { From ffa804b31c2c9e912051616b6e2a6e0b4921d2a8 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 07:17:47 +0900 Subject: [PATCH 619/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E5=87=BA=E7=99=BA=E7=82=B9=E3=81=A8=E3=80=81=E4=BB=8A=E5=90=91?= =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B=E5=81=9C=E7=95=99?= =?UTF-8?q?=E6=89=80=E3=81=B8=E3=81=AE=E3=82=AB=E3=83=A9=E3=83=A0=E3=82=92?= =?UTF-8?q?=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/bus.go | 37 +++- backend/domain/repository/ent/bus/bus.go | 24 +++ backend/domain/repository/ent/bus/where.go | 195 ++++++++++++++++++ backend/domain/repository/ent/bus_create.go | 44 ++++ backend/domain/repository/ent/bus_update.go | 120 +++++++++++ .../domain/repository/ent/migrate/schema.go | 5 +- backend/domain/repository/ent/mutation.go | 183 +++++++++++++++- backend/domain/repository/ent/runtime.go | 6 +- backend/domain/repository/ent/schema/bus.go | 3 + 9 files changed, 610 insertions(+), 7 deletions(-) diff --git a/backend/domain/repository/ent/bus.go b/backend/domain/repository/ent/bus.go index d29981b7..2606adde 100644 --- a/backend/domain/repository/ent/bus.go +++ b/backend/domain/repository/ent/bus.go @@ -29,8 +29,14 @@ type Bus struct { Longitude float64 `json:"longitude,omitempty"` // バスのステータス(運行中、停止中など) Status bus.Status `json:"status,omitempty"` + // MorningFirstStationID holds the value of the "morning_first_station_id" field. + MorningFirstStationID string `json:"morning_first_station_id,omitempty"` + // EveningFirstStationID holds the value of the "evening_first_station_id" field. + EveningFirstStationID string `json:"evening_first_station_id,omitempty"` // 顔識別が有効かどうか EnableFaceRecognition bool `json:"enable_face_recognition,omitempty"` + // 次のステーションのID + NextStationID uuid.UUID `json:"next_station_id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. @@ -106,11 +112,11 @@ func (*Bus) scanValues(columns []string) ([]any, error) { values[i] = new(sql.NullBool) case bus.FieldLatitude, bus.FieldLongitude: values[i] = new(sql.NullFloat64) - case bus.FieldName, bus.FieldPlateNumber, bus.FieldStatus: + case bus.FieldName, bus.FieldPlateNumber, bus.FieldStatus, bus.FieldMorningFirstStationID, bus.FieldEveningFirstStationID: values[i] = new(sql.NullString) case bus.FieldCreatedAt, bus.FieldUpdatedAt: values[i] = new(sql.NullTime) - case bus.FieldID: + case bus.FieldID, bus.FieldNextStationID: values[i] = new(uuid.UUID) case bus.ForeignKeys[0]: // bus_nursery values[i] = &sql.NullScanner{S: new(uuid.UUID)} @@ -165,12 +171,30 @@ func (b *Bus) assignValues(columns []string, values []any) error { } else if value.Valid { b.Status = bus.Status(value.String) } + case bus.FieldMorningFirstStationID: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field morning_first_station_id", values[i]) + } else if value.Valid { + b.MorningFirstStationID = value.String + } + case bus.FieldEveningFirstStationID: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field evening_first_station_id", values[i]) + } else if value.Valid { + b.EveningFirstStationID = value.String + } case bus.FieldEnableFaceRecognition: if value, ok := values[i].(*sql.NullBool); !ok { return fmt.Errorf("unexpected type %T for field enable_face_recognition", values[i]) } else if value.Valid { b.EnableFaceRecognition = value.Bool } + case bus.FieldNextStationID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field next_station_id", values[i]) + } else if value != nil { + b.NextStationID = *value + } case bus.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { return fmt.Errorf("unexpected type %T for field created_at", values[i]) @@ -261,9 +285,18 @@ func (b *Bus) String() string { builder.WriteString("status=") builder.WriteString(fmt.Sprintf("%v", b.Status)) builder.WriteString(", ") + builder.WriteString("morning_first_station_id=") + builder.WriteString(b.MorningFirstStationID) + builder.WriteString(", ") + builder.WriteString("evening_first_station_id=") + builder.WriteString(b.EveningFirstStationID) + builder.WriteString(", ") builder.WriteString("enable_face_recognition=") builder.WriteString(fmt.Sprintf("%v", b.EnableFaceRecognition)) builder.WriteString(", ") + builder.WriteString("next_station_id=") + builder.WriteString(fmt.Sprintf("%v", b.NextStationID)) + builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(b.CreatedAt.Format(time.ANSIC)) builder.WriteString(", ") diff --git a/backend/domain/repository/ent/bus/bus.go b/backend/domain/repository/ent/bus/bus.go index 9cd69982..a45f4422 100644 --- a/backend/domain/repository/ent/bus/bus.go +++ b/backend/domain/repository/ent/bus/bus.go @@ -26,8 +26,14 @@ const ( FieldLongitude = "longitude" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" + // FieldMorningFirstStationID holds the string denoting the morning_first_station_id field in the database. + FieldMorningFirstStationID = "morning_first_station_id" + // FieldEveningFirstStationID holds the string denoting the evening_first_station_id field in the database. + FieldEveningFirstStationID = "evening_first_station_id" // FieldEnableFaceRecognition holds the string denoting the enable_face_recognition field in the database. FieldEnableFaceRecognition = "enable_face_recognition" + // FieldNextStationID holds the string denoting the next_station_id field in the database. + FieldNextStationID = "next_station_id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -78,7 +84,10 @@ var Columns = []string{ FieldLatitude, FieldLongitude, FieldStatus, + FieldMorningFirstStationID, + FieldEveningFirstStationID, FieldEnableFaceRecognition, + FieldNextStationID, FieldCreatedAt, FieldUpdatedAt, } @@ -183,11 +192,26 @@ func ByStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStatus, opts...).ToFunc() } +// ByMorningFirstStationID orders the results by the morning_first_station_id field. +func ByMorningFirstStationID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldMorningFirstStationID, opts...).ToFunc() +} + +// ByEveningFirstStationID orders the results by the evening_first_station_id field. +func ByEveningFirstStationID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEveningFirstStationID, opts...).ToFunc() +} + // ByEnableFaceRecognition orders the results by the enable_face_recognition field. func ByEnableFaceRecognition(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldEnableFaceRecognition, opts...).ToFunc() } +// ByNextStationID orders the results by the next_station_id field. +func ByNextStationID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldNextStationID, opts...).ToFunc() +} + // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() diff --git a/backend/domain/repository/ent/bus/where.go b/backend/domain/repository/ent/bus/where.go index 74da26b0..f0ac3b0e 100644 --- a/backend/domain/repository/ent/bus/where.go +++ b/backend/domain/repository/ent/bus/where.go @@ -76,11 +76,26 @@ func Longitude(v float64) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldLongitude, v)) } +// MorningFirstStationID applies equality check predicate on the "morning_first_station_id" field. It's identical to MorningFirstStationIDEQ. +func MorningFirstStationID(v string) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldMorningFirstStationID, v)) +} + +// EveningFirstStationID applies equality check predicate on the "evening_first_station_id" field. It's identical to EveningFirstStationIDEQ. +func EveningFirstStationID(v string) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldEveningFirstStationID, v)) +} + // EnableFaceRecognition applies equality check predicate on the "enable_face_recognition" field. It's identical to EnableFaceRecognitionEQ. func EnableFaceRecognition(v bool) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldEnableFaceRecognition, v)) } +// NextStationID applies equality check predicate on the "next_station_id" field. It's identical to NextStationIDEQ. +func NextStationID(v uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldNextStationID, v)) +} + // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. func CreatedAt(v time.Time) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldCreatedAt, v)) @@ -351,6 +366,136 @@ func StatusNotIn(vs ...Status) predicate.Bus { return predicate.Bus(sql.FieldNotIn(FieldStatus, vs...)) } +// MorningFirstStationIDEQ applies the EQ predicate on the "morning_first_station_id" field. +func MorningFirstStationIDEQ(v string) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldMorningFirstStationID, v)) +} + +// MorningFirstStationIDNEQ applies the NEQ predicate on the "morning_first_station_id" field. +func MorningFirstStationIDNEQ(v string) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldMorningFirstStationID, v)) +} + +// MorningFirstStationIDIn applies the In predicate on the "morning_first_station_id" field. +func MorningFirstStationIDIn(vs ...string) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldMorningFirstStationID, vs...)) +} + +// MorningFirstStationIDNotIn applies the NotIn predicate on the "morning_first_station_id" field. +func MorningFirstStationIDNotIn(vs ...string) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldMorningFirstStationID, vs...)) +} + +// MorningFirstStationIDGT applies the GT predicate on the "morning_first_station_id" field. +func MorningFirstStationIDGT(v string) predicate.Bus { + return predicate.Bus(sql.FieldGT(FieldMorningFirstStationID, v)) +} + +// MorningFirstStationIDGTE applies the GTE predicate on the "morning_first_station_id" field. +func MorningFirstStationIDGTE(v string) predicate.Bus { + return predicate.Bus(sql.FieldGTE(FieldMorningFirstStationID, v)) +} + +// MorningFirstStationIDLT applies the LT predicate on the "morning_first_station_id" field. +func MorningFirstStationIDLT(v string) predicate.Bus { + return predicate.Bus(sql.FieldLT(FieldMorningFirstStationID, v)) +} + +// MorningFirstStationIDLTE applies the LTE predicate on the "morning_first_station_id" field. +func MorningFirstStationIDLTE(v string) predicate.Bus { + return predicate.Bus(sql.FieldLTE(FieldMorningFirstStationID, v)) +} + +// MorningFirstStationIDContains applies the Contains predicate on the "morning_first_station_id" field. +func MorningFirstStationIDContains(v string) predicate.Bus { + return predicate.Bus(sql.FieldContains(FieldMorningFirstStationID, v)) +} + +// MorningFirstStationIDHasPrefix applies the HasPrefix predicate on the "morning_first_station_id" field. +func MorningFirstStationIDHasPrefix(v string) predicate.Bus { + return predicate.Bus(sql.FieldHasPrefix(FieldMorningFirstStationID, v)) +} + +// MorningFirstStationIDHasSuffix applies the HasSuffix predicate on the "morning_first_station_id" field. +func MorningFirstStationIDHasSuffix(v string) predicate.Bus { + return predicate.Bus(sql.FieldHasSuffix(FieldMorningFirstStationID, v)) +} + +// MorningFirstStationIDEqualFold applies the EqualFold predicate on the "morning_first_station_id" field. +func MorningFirstStationIDEqualFold(v string) predicate.Bus { + return predicate.Bus(sql.FieldEqualFold(FieldMorningFirstStationID, v)) +} + +// MorningFirstStationIDContainsFold applies the ContainsFold predicate on the "morning_first_station_id" field. +func MorningFirstStationIDContainsFold(v string) predicate.Bus { + return predicate.Bus(sql.FieldContainsFold(FieldMorningFirstStationID, v)) +} + +// EveningFirstStationIDEQ applies the EQ predicate on the "evening_first_station_id" field. +func EveningFirstStationIDEQ(v string) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldEveningFirstStationID, v)) +} + +// EveningFirstStationIDNEQ applies the NEQ predicate on the "evening_first_station_id" field. +func EveningFirstStationIDNEQ(v string) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldEveningFirstStationID, v)) +} + +// EveningFirstStationIDIn applies the In predicate on the "evening_first_station_id" field. +func EveningFirstStationIDIn(vs ...string) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldEveningFirstStationID, vs...)) +} + +// EveningFirstStationIDNotIn applies the NotIn predicate on the "evening_first_station_id" field. +func EveningFirstStationIDNotIn(vs ...string) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldEveningFirstStationID, vs...)) +} + +// EveningFirstStationIDGT applies the GT predicate on the "evening_first_station_id" field. +func EveningFirstStationIDGT(v string) predicate.Bus { + return predicate.Bus(sql.FieldGT(FieldEveningFirstStationID, v)) +} + +// EveningFirstStationIDGTE applies the GTE predicate on the "evening_first_station_id" field. +func EveningFirstStationIDGTE(v string) predicate.Bus { + return predicate.Bus(sql.FieldGTE(FieldEveningFirstStationID, v)) +} + +// EveningFirstStationIDLT applies the LT predicate on the "evening_first_station_id" field. +func EveningFirstStationIDLT(v string) predicate.Bus { + return predicate.Bus(sql.FieldLT(FieldEveningFirstStationID, v)) +} + +// EveningFirstStationIDLTE applies the LTE predicate on the "evening_first_station_id" field. +func EveningFirstStationIDLTE(v string) predicate.Bus { + return predicate.Bus(sql.FieldLTE(FieldEveningFirstStationID, v)) +} + +// EveningFirstStationIDContains applies the Contains predicate on the "evening_first_station_id" field. +func EveningFirstStationIDContains(v string) predicate.Bus { + return predicate.Bus(sql.FieldContains(FieldEveningFirstStationID, v)) +} + +// EveningFirstStationIDHasPrefix applies the HasPrefix predicate on the "evening_first_station_id" field. +func EveningFirstStationIDHasPrefix(v string) predicate.Bus { + return predicate.Bus(sql.FieldHasPrefix(FieldEveningFirstStationID, v)) +} + +// EveningFirstStationIDHasSuffix applies the HasSuffix predicate on the "evening_first_station_id" field. +func EveningFirstStationIDHasSuffix(v string) predicate.Bus { + return predicate.Bus(sql.FieldHasSuffix(FieldEveningFirstStationID, v)) +} + +// EveningFirstStationIDEqualFold applies the EqualFold predicate on the "evening_first_station_id" field. +func EveningFirstStationIDEqualFold(v string) predicate.Bus { + return predicate.Bus(sql.FieldEqualFold(FieldEveningFirstStationID, v)) +} + +// EveningFirstStationIDContainsFold applies the ContainsFold predicate on the "evening_first_station_id" field. +func EveningFirstStationIDContainsFold(v string) predicate.Bus { + return predicate.Bus(sql.FieldContainsFold(FieldEveningFirstStationID, v)) +} + // EnableFaceRecognitionEQ applies the EQ predicate on the "enable_face_recognition" field. func EnableFaceRecognitionEQ(v bool) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldEnableFaceRecognition, v)) @@ -361,6 +506,56 @@ func EnableFaceRecognitionNEQ(v bool) predicate.Bus { return predicate.Bus(sql.FieldNEQ(FieldEnableFaceRecognition, v)) } +// NextStationIDEQ applies the EQ predicate on the "next_station_id" field. +func NextStationIDEQ(v uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldEQ(FieldNextStationID, v)) +} + +// NextStationIDNEQ applies the NEQ predicate on the "next_station_id" field. +func NextStationIDNEQ(v uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldNEQ(FieldNextStationID, v)) +} + +// NextStationIDIn applies the In predicate on the "next_station_id" field. +func NextStationIDIn(vs ...uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldIn(FieldNextStationID, vs...)) +} + +// NextStationIDNotIn applies the NotIn predicate on the "next_station_id" field. +func NextStationIDNotIn(vs ...uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldNotIn(FieldNextStationID, vs...)) +} + +// NextStationIDGT applies the GT predicate on the "next_station_id" field. +func NextStationIDGT(v uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldGT(FieldNextStationID, v)) +} + +// NextStationIDGTE applies the GTE predicate on the "next_station_id" field. +func NextStationIDGTE(v uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldGTE(FieldNextStationID, v)) +} + +// NextStationIDLT applies the LT predicate on the "next_station_id" field. +func NextStationIDLT(v uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldLT(FieldNextStationID, v)) +} + +// NextStationIDLTE applies the LTE predicate on the "next_station_id" field. +func NextStationIDLTE(v uuid.UUID) predicate.Bus { + return predicate.Bus(sql.FieldLTE(FieldNextStationID, v)) +} + +// NextStationIDIsNil applies the IsNil predicate on the "next_station_id" field. +func NextStationIDIsNil() predicate.Bus { + return predicate.Bus(sql.FieldIsNull(FieldNextStationID)) +} + +// NextStationIDNotNil applies the NotNil predicate on the "next_station_id" field. +func NextStationIDNotNil() predicate.Bus { + return predicate.Bus(sql.FieldNotNull(FieldNextStationID)) +} + // CreatedAtEQ applies the EQ predicate on the "created_at" field. func CreatedAtEQ(v time.Time) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldCreatedAt, v)) diff --git a/backend/domain/repository/ent/bus_create.go b/backend/domain/repository/ent/bus_create.go index c08f438a..869a5da2 100644 --- a/backend/domain/repository/ent/bus_create.go +++ b/backend/domain/repository/ent/bus_create.go @@ -87,6 +87,18 @@ func (bc *BusCreate) SetNillableStatus(b *bus.Status) *BusCreate { return bc } +// SetMorningFirstStationID sets the "morning_first_station_id" field. +func (bc *BusCreate) SetMorningFirstStationID(s string) *BusCreate { + bc.mutation.SetMorningFirstStationID(s) + return bc +} + +// SetEveningFirstStationID sets the "evening_first_station_id" field. +func (bc *BusCreate) SetEveningFirstStationID(s string) *BusCreate { + bc.mutation.SetEveningFirstStationID(s) + return bc +} + // SetEnableFaceRecognition sets the "enable_face_recognition" field. func (bc *BusCreate) SetEnableFaceRecognition(b bool) *BusCreate { bc.mutation.SetEnableFaceRecognition(b) @@ -101,6 +113,20 @@ func (bc *BusCreate) SetNillableEnableFaceRecognition(b *bool) *BusCreate { return bc } +// SetNextStationID sets the "next_station_id" field. +func (bc *BusCreate) SetNextStationID(u uuid.UUID) *BusCreate { + bc.mutation.SetNextStationID(u) + return bc +} + +// SetNillableNextStationID sets the "next_station_id" field if the given value is not nil. +func (bc *BusCreate) SetNillableNextStationID(u *uuid.UUID) *BusCreate { + if u != nil { + bc.SetNextStationID(*u) + } + return bc +} + // SetCreatedAt sets the "created_at" field. func (bc *BusCreate) SetCreatedAt(t time.Time) *BusCreate { bc.mutation.SetCreatedAt(t) @@ -277,6 +303,12 @@ func (bc *BusCreate) check() error { return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Bus.status": %w`, err)} } } + if _, ok := bc.mutation.MorningFirstStationID(); !ok { + return &ValidationError{Name: "morning_first_station_id", err: errors.New(`ent: missing required field "Bus.morning_first_station_id"`)} + } + if _, ok := bc.mutation.EveningFirstStationID(); !ok { + return &ValidationError{Name: "evening_first_station_id", err: errors.New(`ent: missing required field "Bus.evening_first_station_id"`)} + } if _, ok := bc.mutation.EnableFaceRecognition(); !ok { return &ValidationError{Name: "enable_face_recognition", err: errors.New(`ent: missing required field "Bus.enable_face_recognition"`)} } @@ -341,10 +373,22 @@ func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { _spec.SetField(bus.FieldStatus, field.TypeEnum, value) _node.Status = value } + if value, ok := bc.mutation.MorningFirstStationID(); ok { + _spec.SetField(bus.FieldMorningFirstStationID, field.TypeString, value) + _node.MorningFirstStationID = value + } + if value, ok := bc.mutation.EveningFirstStationID(); ok { + _spec.SetField(bus.FieldEveningFirstStationID, field.TypeString, value) + _node.EveningFirstStationID = value + } if value, ok := bc.mutation.EnableFaceRecognition(); ok { _spec.SetField(bus.FieldEnableFaceRecognition, field.TypeBool, value) _node.EnableFaceRecognition = value } + if value, ok := bc.mutation.NextStationID(); ok { + _spec.SetField(bus.FieldNextStationID, field.TypeUUID, value) + _node.NextStationID = value + } if value, ok := bc.mutation.CreatedAt(); ok { _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) _node.CreatedAt = value diff --git a/backend/domain/repository/ent/bus_update.go b/backend/domain/repository/ent/bus_update.go index e414da01..bc17c806 100644 --- a/backend/domain/repository/ent/bus_update.go +++ b/backend/domain/repository/ent/bus_update.go @@ -135,6 +135,34 @@ func (bu *BusUpdate) SetNillableStatus(b *bus.Status) *BusUpdate { return bu } +// SetMorningFirstStationID sets the "morning_first_station_id" field. +func (bu *BusUpdate) SetMorningFirstStationID(s string) *BusUpdate { + bu.mutation.SetMorningFirstStationID(s) + return bu +} + +// SetNillableMorningFirstStationID sets the "morning_first_station_id" field if the given value is not nil. +func (bu *BusUpdate) SetNillableMorningFirstStationID(s *string) *BusUpdate { + if s != nil { + bu.SetMorningFirstStationID(*s) + } + return bu +} + +// SetEveningFirstStationID sets the "evening_first_station_id" field. +func (bu *BusUpdate) SetEveningFirstStationID(s string) *BusUpdate { + bu.mutation.SetEveningFirstStationID(s) + return bu +} + +// SetNillableEveningFirstStationID sets the "evening_first_station_id" field if the given value is not nil. +func (bu *BusUpdate) SetNillableEveningFirstStationID(s *string) *BusUpdate { + if s != nil { + bu.SetEveningFirstStationID(*s) + } + return bu +} + // SetEnableFaceRecognition sets the "enable_face_recognition" field. func (bu *BusUpdate) SetEnableFaceRecognition(b bool) *BusUpdate { bu.mutation.SetEnableFaceRecognition(b) @@ -149,6 +177,26 @@ func (bu *BusUpdate) SetNillableEnableFaceRecognition(b *bool) *BusUpdate { return bu } +// SetNextStationID sets the "next_station_id" field. +func (bu *BusUpdate) SetNextStationID(u uuid.UUID) *BusUpdate { + bu.mutation.SetNextStationID(u) + return bu +} + +// SetNillableNextStationID sets the "next_station_id" field if the given value is not nil. +func (bu *BusUpdate) SetNillableNextStationID(u *uuid.UUID) *BusUpdate { + if u != nil { + bu.SetNextStationID(*u) + } + return bu +} + +// ClearNextStationID clears the value of the "next_station_id" field. +func (bu *BusUpdate) ClearNextStationID() *BusUpdate { + bu.mutation.ClearNextStationID() + return bu +} + // SetCreatedAt sets the "created_at" field. func (bu *BusUpdate) SetCreatedAt(t time.Time) *BusUpdate { bu.mutation.SetCreatedAt(t) @@ -395,9 +443,21 @@ func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := bu.mutation.Status(); ok { _spec.SetField(bus.FieldStatus, field.TypeEnum, value) } + if value, ok := bu.mutation.MorningFirstStationID(); ok { + _spec.SetField(bus.FieldMorningFirstStationID, field.TypeString, value) + } + if value, ok := bu.mutation.EveningFirstStationID(); ok { + _spec.SetField(bus.FieldEveningFirstStationID, field.TypeString, value) + } if value, ok := bu.mutation.EnableFaceRecognition(); ok { _spec.SetField(bus.FieldEnableFaceRecognition, field.TypeBool, value) } + if value, ok := bu.mutation.NextStationID(); ok { + _spec.SetField(bus.FieldNextStationID, field.TypeUUID, value) + } + if bu.mutation.NextStationIDCleared() { + _spec.ClearField(bus.FieldNextStationID, field.TypeUUID) + } if value, ok := bu.mutation.CreatedAt(); ok { _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) } @@ -690,6 +750,34 @@ func (buo *BusUpdateOne) SetNillableStatus(b *bus.Status) *BusUpdateOne { return buo } +// SetMorningFirstStationID sets the "morning_first_station_id" field. +func (buo *BusUpdateOne) SetMorningFirstStationID(s string) *BusUpdateOne { + buo.mutation.SetMorningFirstStationID(s) + return buo +} + +// SetNillableMorningFirstStationID sets the "morning_first_station_id" field if the given value is not nil. +func (buo *BusUpdateOne) SetNillableMorningFirstStationID(s *string) *BusUpdateOne { + if s != nil { + buo.SetMorningFirstStationID(*s) + } + return buo +} + +// SetEveningFirstStationID sets the "evening_first_station_id" field. +func (buo *BusUpdateOne) SetEveningFirstStationID(s string) *BusUpdateOne { + buo.mutation.SetEveningFirstStationID(s) + return buo +} + +// SetNillableEveningFirstStationID sets the "evening_first_station_id" field if the given value is not nil. +func (buo *BusUpdateOne) SetNillableEveningFirstStationID(s *string) *BusUpdateOne { + if s != nil { + buo.SetEveningFirstStationID(*s) + } + return buo +} + // SetEnableFaceRecognition sets the "enable_face_recognition" field. func (buo *BusUpdateOne) SetEnableFaceRecognition(b bool) *BusUpdateOne { buo.mutation.SetEnableFaceRecognition(b) @@ -704,6 +792,26 @@ func (buo *BusUpdateOne) SetNillableEnableFaceRecognition(b *bool) *BusUpdateOne return buo } +// SetNextStationID sets the "next_station_id" field. +func (buo *BusUpdateOne) SetNextStationID(u uuid.UUID) *BusUpdateOne { + buo.mutation.SetNextStationID(u) + return buo +} + +// SetNillableNextStationID sets the "next_station_id" field if the given value is not nil. +func (buo *BusUpdateOne) SetNillableNextStationID(u *uuid.UUID) *BusUpdateOne { + if u != nil { + buo.SetNextStationID(*u) + } + return buo +} + +// ClearNextStationID clears the value of the "next_station_id" field. +func (buo *BusUpdateOne) ClearNextStationID() *BusUpdateOne { + buo.mutation.ClearNextStationID() + return buo +} + // SetCreatedAt sets the "created_at" field. func (buo *BusUpdateOne) SetCreatedAt(t time.Time) *BusUpdateOne { buo.mutation.SetCreatedAt(t) @@ -980,9 +1088,21 @@ func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { if value, ok := buo.mutation.Status(); ok { _spec.SetField(bus.FieldStatus, field.TypeEnum, value) } + if value, ok := buo.mutation.MorningFirstStationID(); ok { + _spec.SetField(bus.FieldMorningFirstStationID, field.TypeString, value) + } + if value, ok := buo.mutation.EveningFirstStationID(); ok { + _spec.SetField(bus.FieldEveningFirstStationID, field.TypeString, value) + } if value, ok := buo.mutation.EnableFaceRecognition(); ok { _spec.SetField(bus.FieldEnableFaceRecognition, field.TypeBool, value) } + if value, ok := buo.mutation.NextStationID(); ok { + _spec.SetField(bus.FieldNextStationID, field.TypeUUID, value) + } + if buo.mutation.NextStationIDCleared() { + _spec.ClearField(bus.FieldNextStationID, field.TypeUUID) + } if value, ok := buo.mutation.CreatedAt(); ok { _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) } diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 908df176..8f4b8c61 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -44,7 +44,10 @@ var ( {Name: "latitude", Type: field.TypeFloat64, Nullable: true}, {Name: "longitude", Type: field.TypeFloat64, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"stopped", "running", "maintenance"}, Default: "stopped"}, + {Name: "morning_first_station_id", Type: field.TypeString}, + {Name: "evening_first_station_id", Type: field.TypeString}, {Name: "enable_face_recognition", Type: field.TypeBool, Default: false}, + {Name: "next_station_id", Type: field.TypeUUID, Nullable: true}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "bus_nursery", Type: field.TypeUUID, Nullable: true}, @@ -57,7 +60,7 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "bus_nurseries_nursery", - Columns: []*schema.Column{BusColumns[9]}, + Columns: []*schema.Column{BusColumns[12]}, RefColumns: []*schema.Column{NurseriesColumns[0]}, OnDelete: schema.SetNull, }, diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index 7c378240..c4f725a3 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -567,7 +567,10 @@ type BusMutation struct { longitude *float64 addlongitude *float64 status *bus.Status + morning_first_station_id *string + evening_first_station_id *string enable_face_recognition *bool + next_station_id *uuid.UUID created_at *time.Time updated_at *time.Time clearedFields map[string]struct{} @@ -952,6 +955,78 @@ func (m *BusMutation) ResetStatus() { m.status = nil } +// SetMorningFirstStationID sets the "morning_first_station_id" field. +func (m *BusMutation) SetMorningFirstStationID(s string) { + m.morning_first_station_id = &s +} + +// MorningFirstStationID returns the value of the "morning_first_station_id" field in the mutation. +func (m *BusMutation) MorningFirstStationID() (r string, exists bool) { + v := m.morning_first_station_id + if v == nil { + return + } + return *v, true +} + +// OldMorningFirstStationID returns the old "morning_first_station_id" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldMorningFirstStationID(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldMorningFirstStationID is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldMorningFirstStationID requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldMorningFirstStationID: %w", err) + } + return oldValue.MorningFirstStationID, nil +} + +// ResetMorningFirstStationID resets all changes to the "morning_first_station_id" field. +func (m *BusMutation) ResetMorningFirstStationID() { + m.morning_first_station_id = nil +} + +// SetEveningFirstStationID sets the "evening_first_station_id" field. +func (m *BusMutation) SetEveningFirstStationID(s string) { + m.evening_first_station_id = &s +} + +// EveningFirstStationID returns the value of the "evening_first_station_id" field in the mutation. +func (m *BusMutation) EveningFirstStationID() (r string, exists bool) { + v := m.evening_first_station_id + if v == nil { + return + } + return *v, true +} + +// OldEveningFirstStationID returns the old "evening_first_station_id" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldEveningFirstStationID(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldEveningFirstStationID is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldEveningFirstStationID requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldEveningFirstStationID: %w", err) + } + return oldValue.EveningFirstStationID, nil +} + +// ResetEveningFirstStationID resets all changes to the "evening_first_station_id" field. +func (m *BusMutation) ResetEveningFirstStationID() { + m.evening_first_station_id = nil +} + // SetEnableFaceRecognition sets the "enable_face_recognition" field. func (m *BusMutation) SetEnableFaceRecognition(b bool) { m.enable_face_recognition = &b @@ -988,6 +1063,55 @@ func (m *BusMutation) ResetEnableFaceRecognition() { m.enable_face_recognition = nil } +// SetNextStationID sets the "next_station_id" field. +func (m *BusMutation) SetNextStationID(u uuid.UUID) { + m.next_station_id = &u +} + +// NextStationID returns the value of the "next_station_id" field in the mutation. +func (m *BusMutation) NextStationID() (r uuid.UUID, exists bool) { + v := m.next_station_id + if v == nil { + return + } + return *v, true +} + +// OldNextStationID returns the old "next_station_id" field's value of the Bus entity. +// If the Bus object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusMutation) OldNextStationID(ctx context.Context) (v uuid.UUID, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldNextStationID is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldNextStationID requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldNextStationID: %w", err) + } + return oldValue.NextStationID, nil +} + +// ClearNextStationID clears the value of the "next_station_id" field. +func (m *BusMutation) ClearNextStationID() { + m.next_station_id = nil + m.clearedFields[bus.FieldNextStationID] = struct{}{} +} + +// NextStationIDCleared returns if the "next_station_id" field was cleared in this mutation. +func (m *BusMutation) NextStationIDCleared() bool { + _, ok := m.clearedFields[bus.FieldNextStationID] + return ok +} + +// ResetNextStationID resets all changes to the "next_station_id" field. +func (m *BusMutation) ResetNextStationID() { + m.next_station_id = nil + delete(m.clearedFields, bus.FieldNextStationID) +} + // SetCreatedAt sets the "created_at" field. func (m *BusMutation) SetCreatedAt(t time.Time) { m.created_at = &t @@ -1295,7 +1419,7 @@ func (m *BusMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *BusMutation) Fields() []string { - fields := make([]string, 0, 8) + fields := make([]string, 0, 11) if m.name != nil { fields = append(fields, bus.FieldName) } @@ -1311,9 +1435,18 @@ func (m *BusMutation) Fields() []string { if m.status != nil { fields = append(fields, bus.FieldStatus) } + if m.morning_first_station_id != nil { + fields = append(fields, bus.FieldMorningFirstStationID) + } + if m.evening_first_station_id != nil { + fields = append(fields, bus.FieldEveningFirstStationID) + } if m.enable_face_recognition != nil { fields = append(fields, bus.FieldEnableFaceRecognition) } + if m.next_station_id != nil { + fields = append(fields, bus.FieldNextStationID) + } if m.created_at != nil { fields = append(fields, bus.FieldCreatedAt) } @@ -1338,8 +1471,14 @@ func (m *BusMutation) Field(name string) (ent.Value, bool) { return m.Longitude() case bus.FieldStatus: return m.Status() + case bus.FieldMorningFirstStationID: + return m.MorningFirstStationID() + case bus.FieldEveningFirstStationID: + return m.EveningFirstStationID() case bus.FieldEnableFaceRecognition: return m.EnableFaceRecognition() + case bus.FieldNextStationID: + return m.NextStationID() case bus.FieldCreatedAt: return m.CreatedAt() case bus.FieldUpdatedAt: @@ -1363,8 +1502,14 @@ func (m *BusMutation) OldField(ctx context.Context, name string) (ent.Value, err return m.OldLongitude(ctx) case bus.FieldStatus: return m.OldStatus(ctx) + case bus.FieldMorningFirstStationID: + return m.OldMorningFirstStationID(ctx) + case bus.FieldEveningFirstStationID: + return m.OldEveningFirstStationID(ctx) case bus.FieldEnableFaceRecognition: return m.OldEnableFaceRecognition(ctx) + case bus.FieldNextStationID: + return m.OldNextStationID(ctx) case bus.FieldCreatedAt: return m.OldCreatedAt(ctx) case bus.FieldUpdatedAt: @@ -1413,6 +1558,20 @@ func (m *BusMutation) SetField(name string, value ent.Value) error { } m.SetStatus(v) return nil + case bus.FieldMorningFirstStationID: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetMorningFirstStationID(v) + return nil + case bus.FieldEveningFirstStationID: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetEveningFirstStationID(v) + return nil case bus.FieldEnableFaceRecognition: v, ok := value.(bool) if !ok { @@ -1420,6 +1579,13 @@ func (m *BusMutation) SetField(name string, value ent.Value) error { } m.SetEnableFaceRecognition(v) return nil + case bus.FieldNextStationID: + v, ok := value.(uuid.UUID) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetNextStationID(v) + return nil case bus.FieldCreatedAt: v, ok := value.(time.Time) if !ok { @@ -1500,6 +1666,9 @@ func (m *BusMutation) ClearedFields() []string { if m.FieldCleared(bus.FieldLongitude) { fields = append(fields, bus.FieldLongitude) } + if m.FieldCleared(bus.FieldNextStationID) { + fields = append(fields, bus.FieldNextStationID) + } return fields } @@ -1523,6 +1692,9 @@ func (m *BusMutation) ClearField(name string) error { case bus.FieldLongitude: m.ClearLongitude() return nil + case bus.FieldNextStationID: + m.ClearNextStationID() + return nil } return fmt.Errorf("unknown Bus nullable field %s", name) } @@ -1546,9 +1718,18 @@ func (m *BusMutation) ResetField(name string) error { case bus.FieldStatus: m.ResetStatus() return nil + case bus.FieldMorningFirstStationID: + m.ResetMorningFirstStationID() + return nil + case bus.FieldEveningFirstStationID: + m.ResetEveningFirstStationID() + return nil case bus.FieldEnableFaceRecognition: m.ResetEnableFaceRecognition() return nil + case bus.FieldNextStationID: + m.ResetNextStationID() + return nil case bus.FieldCreatedAt: m.ResetCreatedAt() return nil diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index 41fe4754..1fa6c41a 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -37,15 +37,15 @@ func init() { busFields := schema.Bus{}.Fields() _ = busFields // busDescEnableFaceRecognition is the schema descriptor for enable_face_recognition field. - busDescEnableFaceRecognition := busFields[6].Descriptor() + busDescEnableFaceRecognition := busFields[8].Descriptor() // bus.DefaultEnableFaceRecognition holds the default value on creation for the enable_face_recognition field. bus.DefaultEnableFaceRecognition = busDescEnableFaceRecognition.Default.(bool) // busDescCreatedAt is the schema descriptor for created_at field. - busDescCreatedAt := busFields[7].Descriptor() + busDescCreatedAt := busFields[10].Descriptor() // bus.DefaultCreatedAt holds the default value on creation for the created_at field. bus.DefaultCreatedAt = busDescCreatedAt.Default.(func() time.Time) // busDescUpdatedAt is the schema descriptor for updated_at field. - busDescUpdatedAt := busFields[8].Descriptor() + busDescUpdatedAt := busFields[11].Descriptor() // bus.DefaultUpdatedAt holds the default value on creation for the updated_at field. bus.DefaultUpdatedAt = busDescUpdatedAt.Default.(func() time.Time) // bus.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. diff --git a/backend/domain/repository/ent/schema/bus.go b/backend/domain/repository/ent/schema/bus.go index 90269e69..e04697dc 100644 --- a/backend/domain/repository/ent/schema/bus.go +++ b/backend/domain/repository/ent/schema/bus.go @@ -24,7 +24,10 @@ func (Bus) Fields() []ent.Field { field.Float("longitude").Optional().Comment("現在の経度"), field.Enum("status").Default("stopped").Comment("バスのステータス(運行中、停止中など)"). Values("stopped", "running", "maintenance"), + field.String("morning_first_station_id"), + field.String("evening_first_station_id"), field.Bool("enable_face_recognition").Default(false).Comment("顔識別が有効かどうか"), + field.UUID("next_station_id", uuid.UUID{}).Optional().Comment("次のステーションのID"), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } From 13ccf63628af55356f78769dd437ef44dfdfaa15 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 07:20:40 +0900 Subject: [PATCH 620/771] =?UTF-8?q?feat:=20proto=E3=82=82=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 179 ++++---- .../go/where_child_bus/v1/resources.pb.go | 306 +++++++------ .../proto-gen/where_child_bus/v1/bus.pb.dart | 56 ++- .../where_child_bus/v1/bus.pbjson.dart | 12 +- .../where_child_bus/v1/resources.pb.dart | 70 ++- .../where_child_bus/v1/resources.pbjson.dart | 15 +- .../generated/where_child_bus/v1/bus_pb2.py | 88 ++-- .../generated/where_child_bus/v1/bus_pb2.pyi | 126 ++---- .../where_child_bus/v1/bus_pb2_grpc.py | 412 +++++++----------- .../where_child_bus/v1/resources_pb2.py | 44 +- .../where_child_bus/v1/resources_pb2.pyi | 10 +- proto/where_child_bus/v1/bus.proto | 7 +- proto/where_child_bus/v1/resources.proto | 7 +- 13 files changed, 669 insertions(+), 663 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 5f239b23..85726bc5 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -811,7 +811,10 @@ type UpdateBusRequest struct { Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` EnableFaceRecognition bool `protobuf:"varint,7,opt,name=enable_face_recognition,json=enableFaceRecognition,proto3" json:"enable_face_recognition,omitempty"` - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,8,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + MorningFirstStationId string `protobuf:"bytes,8,opt,name=morning_first_station_id,json=morningFirstStationId,proto3" json:"morning_first_station_id,omitempty"` + EveningFirstStationId string `protobuf:"bytes,9,opt,name=evening_first_station_id,json=eveningFirstStationId,proto3" json:"evening_first_station_id,omitempty"` + NextStationId string `protobuf:"bytes,10,opt,name=next_station_id,json=nextStationId,proto3" json:"next_station_id,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,11,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } func (x *UpdateBusRequest) Reset() { @@ -895,6 +898,27 @@ func (x *UpdateBusRequest) GetEnableFaceRecognition() bool { return false } +func (x *UpdateBusRequest) GetMorningFirstStationId() string { + if x != nil { + return x.MorningFirstStationId + } + return "" +} + +func (x *UpdateBusRequest) GetEveningFirstStationId() string { + if x != nil { + return x.EveningFirstStationId + } + return "" +} + +func (x *UpdateBusRequest) GetNextStationId() string { + if x != nil { + return x.NextStationId + } + return "" +} + func (x *UpdateBusRequest) GetUpdateMask() *fieldmaskpb.FieldMask { if x != nil { return x.UpdateMask @@ -1051,7 +1075,7 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcd, 0x02, + 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xe7, 0x03, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, @@ -1069,81 +1093,90 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, - 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0xaf, 0x06, - 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x15, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x65, 0x76, 0x65, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x65, 0x76, 0x65, + 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, + 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0xaf, 0x06, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, - 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, - 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x49, 0x64, 0x12, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, + 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x88, + 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, + 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x34, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, + 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x58, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, - 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, - 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, - 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, - 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, - 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, - 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, - 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, - 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, + 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, + 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, + 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, + 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, + 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 98e77278..6c9cd40d 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -683,8 +683,11 @@ type Bus struct { Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` EnableFaceRecognition bool `protobuf:"varint,8,opt,name=enable_face_recognition,json=enableFaceRecognition,proto3" json:"enable_face_recognition,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + MorningFirstStationId string `protobuf:"bytes,9,opt,name=morning_first_station_id,json=morningFirstStationId,proto3" json:"morning_first_station_id,omitempty"` + EveningFirstStationId string `protobuf:"bytes,10,opt,name=evening_first_station_id,json=eveningFirstStationId,proto3" json:"evening_first_station_id,omitempty"` + NextStationId string `protobuf:"bytes,11,opt,name=next_station_id,json=nextStationId,proto3" json:"next_station_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *Bus) Reset() { @@ -775,6 +778,27 @@ func (x *Bus) GetEnableFaceRecognition() bool { return false } +func (x *Bus) GetMorningFirstStationId() string { + if x != nil { + return x.MorningFirstStationId + } + return "" +} + +func (x *Bus) GetEveningFirstStationId() string { + if x != nil { + return x.EveningFirstStationId + } + return "" +} + +func (x *Bus) GetNextStationId() string { + if x != nil { + return x.NextStationId + } + return "" +} + func (x *Bus) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -1420,7 +1444,7 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x91, 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x04, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, @@ -1438,144 +1462,154 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, - 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xfc, 0x03, 0x0a, 0x05, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, - 0x03, 0x73, 0x65, 0x78, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, - 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, - 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, - 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, - 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, - 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, - 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, - 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, - 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, - 0x6c, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, - 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, - 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, - 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xd8, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4e, - 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, - 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x65, - 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, - 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, - 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, - 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, - 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, - 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x09, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x69, + 0x72, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x18, + 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, + 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x39, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, - 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, - 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2a, 0x73, 0x0a, 0x09, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, - 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, - 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, - 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, - 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x62, 0x0a, 0x0c, 0x56, 0x65, 0x68, 0x69, - 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x45, 0x48, 0x49, - 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x45, 0x48, 0x49, 0x43, - 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, - 0x01, 0x12, 0x19, 0x0a, 0x15, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, - 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, - 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, - 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, - 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, - 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, - 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, - 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, - 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, - 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, - 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, - 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, - 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, - 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x41, 0x74, 0x22, 0xfc, 0x03, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x35, + 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, + 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, + 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, + 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, + 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, + 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x22, 0xd8, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, + 0x35, 0x0a, 0x17, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, + 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, + 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x8f, 0x01, + 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xcc, + 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x68, 0x6f, 0x74, + 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x68, + 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, + 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, + 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x73, 0x0a, + 0x09, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, + 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, + 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, + 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, + 0x10, 0x03, 0x2a, 0x62, 0x0a, 0x0c, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x56, + 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, + 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, + 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, + 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, + 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, + 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, + 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, + 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, + 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, + 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index b8d9fa3b..3c85aa71 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -909,6 +909,9 @@ class UpdateBusRequest extends $pb.GeneratedMessage { $core.double? latitude, $core.double? longitude, $core.bool? enableFaceRecognition, + $core.String? morningFirstStationId, + $core.String? eveningFirstStationId, + $core.String? nextStationId, $9.FieldMask? updateMask, }) { final $result = create(); @@ -933,6 +936,15 @@ class UpdateBusRequest extends $pb.GeneratedMessage { if (enableFaceRecognition != null) { $result.enableFaceRecognition = enableFaceRecognition; } + if (morningFirstStationId != null) { + $result.morningFirstStationId = morningFirstStationId; + } + if (eveningFirstStationId != null) { + $result.eveningFirstStationId = eveningFirstStationId; + } + if (nextStationId != null) { + $result.nextStationId = nextStationId; + } if (updateMask != null) { $result.updateMask = updateMask; } @@ -950,7 +962,10 @@ class UpdateBusRequest extends $pb.GeneratedMessage { ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..aOB(7, _omitFieldNames ? '' : 'enableFaceRecognition') - ..aOM<$9.FieldMask>(8, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..aOS(8, _omitFieldNames ? '' : 'morningFirstStationId') + ..aOS(9, _omitFieldNames ? '' : 'eveningFirstStationId') + ..aOS(10, _omitFieldNames ? '' : 'nextStationId') + ..aOM<$9.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) ..hasRequiredFields = false ; @@ -1039,15 +1054,42 @@ class UpdateBusRequest extends $pb.GeneratedMessage { void clearEnableFaceRecognition() => clearField(7); @$pb.TagNumber(8) - $9.FieldMask get updateMask => $_getN(7); - @$pb.TagNumber(8) - set updateMask($9.FieldMask v) { setField(8, v); } + $core.String get morningFirstStationId => $_getSZ(7); @$pb.TagNumber(8) - $core.bool hasUpdateMask() => $_has(7); + set morningFirstStationId($core.String v) { $_setString(7, v); } @$pb.TagNumber(8) - void clearUpdateMask() => clearField(8); + $core.bool hasMorningFirstStationId() => $_has(7); @$pb.TagNumber(8) - $9.FieldMask ensureUpdateMask() => $_ensure(7); + void clearMorningFirstStationId() => clearField(8); + + @$pb.TagNumber(9) + $core.String get eveningFirstStationId => $_getSZ(8); + @$pb.TagNumber(9) + set eveningFirstStationId($core.String v) { $_setString(8, v); } + @$pb.TagNumber(9) + $core.bool hasEveningFirstStationId() => $_has(8); + @$pb.TagNumber(9) + void clearEveningFirstStationId() => clearField(9); + + @$pb.TagNumber(10) + $core.String get nextStationId => $_getSZ(9); + @$pb.TagNumber(10) + set nextStationId($core.String v) { $_setString(9, v); } + @$pb.TagNumber(10) + $core.bool hasNextStationId() => $_has(9); + @$pb.TagNumber(10) + void clearNextStationId() => clearField(10); + + @$pb.TagNumber(11) + $9.FieldMask get updateMask => $_getN(10); + @$pb.TagNumber(11) + set updateMask($9.FieldMask v) { setField(11, v); } + @$pb.TagNumber(11) + $core.bool hasUpdateMask() => $_has(10); + @$pb.TagNumber(11) + void clearUpdateMask() => clearField(11); + @$pb.TagNumber(11) + $9.FieldMask ensureUpdateMask() => $_ensure(10); } class UpdateBusResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 643f4d73..4e7b18f9 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -225,7 +225,10 @@ const UpdateBusRequest$json = { {'1': 'latitude', '3': 5, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 6, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'enable_face_recognition', '3': 7, '4': 1, '5': 8, '10': 'enableFaceRecognition'}, - {'1': 'update_mask', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, + {'1': 'morning_first_station_id', '3': 8, '4': 1, '5': 9, '10': 'morningFirstStationId'}, + {'1': 'evening_first_station_id', '3': 9, '4': 1, '5': 9, '10': 'eveningFirstStationId'}, + {'1': 'next_station_id', '3': 10, '4': 1, '5': 9, '10': 'nextStationId'}, + {'1': 'update_mask', '3': 11, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, ], }; @@ -235,8 +238,11 @@ final $typed_data.Uint8List updateBusRequestDescriptor = $convert.base64Decode( 'IEbmFtZRIhCgxwbGF0ZV9udW1iZXIYAyABKAlSC3BsYXRlTnVtYmVyEjwKCmJ1c19zdGF0dXMY' 'BCABKA4yHS53aGVyZV9jaGlsZF9idXMudjEuQnVzU3RhdHVzUglidXNTdGF0dXMSGgoIbGF0aX' 'R1ZGUYBSABKAFSCGxhdGl0dWRlEhwKCWxvbmdpdHVkZRgGIAEoAVIJbG9uZ2l0dWRlEjYKF2Vu' - 'YWJsZV9mYWNlX3JlY29nbml0aW9uGAcgASgIUhVlbmFibGVGYWNlUmVjb2duaXRpb24SOwoLdX' - 'BkYXRlX21hc2sYCCABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrUgp1cGRhdGVNYXNr'); + 'YWJsZV9mYWNlX3JlY29nbml0aW9uGAcgASgIUhVlbmFibGVGYWNlUmVjb2duaXRpb24SNwoYbW' + '9ybmluZ19maXJzdF9zdGF0aW9uX2lkGAggASgJUhVtb3JuaW5nRmlyc3RTdGF0aW9uSWQSNwoY' + 'ZXZlbmluZ19maXJzdF9zdGF0aW9uX2lkGAkgASgJUhVldmVuaW5nRmlyc3RTdGF0aW9uSWQSJg' + 'oPbmV4dF9zdGF0aW9uX2lkGAogASgJUg1uZXh0U3RhdGlvbklkEjsKC3VwZGF0ZV9tYXNrGAsg' + 'ASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFza1IKdXBkYXRlTWFzaw=='); @$core.Deprecated('Use updateBusResponseDescriptor instead') const UpdateBusResponse$json = { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index a6fa8226..5a8e0135 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -694,6 +694,9 @@ class Bus extends $pb.GeneratedMessage { $core.double? latitude, $core.double? longitude, $core.bool? enableFaceRecognition, + $core.String? morningFirstStationId, + $core.String? eveningFirstStationId, + $core.String? nextStationId, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, }) { @@ -722,6 +725,15 @@ class Bus extends $pb.GeneratedMessage { if (enableFaceRecognition != null) { $result.enableFaceRecognition = enableFaceRecognition; } + if (morningFirstStationId != null) { + $result.morningFirstStationId = morningFirstStationId; + } + if (eveningFirstStationId != null) { + $result.eveningFirstStationId = eveningFirstStationId; + } + if (nextStationId != null) { + $result.nextStationId = nextStationId; + } if (createdAt != null) { $result.createdAt = createdAt; } @@ -743,8 +755,11 @@ class Bus extends $pb.GeneratedMessage { ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..aOB(8, _omitFieldNames ? '' : 'enableFaceRecognition') - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOS(9, _omitFieldNames ? '' : 'morningFirstStationId') + ..aOS(10, _omitFieldNames ? '' : 'eveningFirstStationId') + ..aOS(11, _omitFieldNames ? '' : 'nextStationId') + ..aOM<$7.Timestamp>(12, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) + ..aOM<$7.Timestamp>(13, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) ..hasRequiredFields = false ; @@ -843,26 +858,53 @@ class Bus extends $pb.GeneratedMessage { void clearEnableFaceRecognition() => clearField(8); @$pb.TagNumber(9) - $7.Timestamp get createdAt => $_getN(8); + $core.String get morningFirstStationId => $_getSZ(8); @$pb.TagNumber(9) - set createdAt($7.Timestamp v) { setField(9, v); } + set morningFirstStationId($core.String v) { $_setString(8, v); } @$pb.TagNumber(9) - $core.bool hasCreatedAt() => $_has(8); + $core.bool hasMorningFirstStationId() => $_has(8); @$pb.TagNumber(9) - void clearCreatedAt() => clearField(9); - @$pb.TagNumber(9) - $7.Timestamp ensureCreatedAt() => $_ensure(8); + void clearMorningFirstStationId() => clearField(9); @$pb.TagNumber(10) - $7.Timestamp get updatedAt => $_getN(9); - @$pb.TagNumber(10) - set updatedAt($7.Timestamp v) { setField(10, v); } + $core.String get eveningFirstStationId => $_getSZ(9); @$pb.TagNumber(10) - $core.bool hasUpdatedAt() => $_has(9); + set eveningFirstStationId($core.String v) { $_setString(9, v); } @$pb.TagNumber(10) - void clearUpdatedAt() => clearField(10); + $core.bool hasEveningFirstStationId() => $_has(9); @$pb.TagNumber(10) - $7.Timestamp ensureUpdatedAt() => $_ensure(9); + void clearEveningFirstStationId() => clearField(10); + + @$pb.TagNumber(11) + $core.String get nextStationId => $_getSZ(10); + @$pb.TagNumber(11) + set nextStationId($core.String v) { $_setString(10, v); } + @$pb.TagNumber(11) + $core.bool hasNextStationId() => $_has(10); + @$pb.TagNumber(11) + void clearNextStationId() => clearField(11); + + @$pb.TagNumber(12) + $7.Timestamp get createdAt => $_getN(11); + @$pb.TagNumber(12) + set createdAt($7.Timestamp v) { setField(12, v); } + @$pb.TagNumber(12) + $core.bool hasCreatedAt() => $_has(11); + @$pb.TagNumber(12) + void clearCreatedAt() => clearField(12); + @$pb.TagNumber(12) + $7.Timestamp ensureCreatedAt() => $_ensure(11); + + @$pb.TagNumber(13) + $7.Timestamp get updatedAt => $_getN(12); + @$pb.TagNumber(13) + set updatedAt($7.Timestamp v) { setField(13, v); } + @$pb.TagNumber(13) + $core.bool hasUpdatedAt() => $_has(12); + @$pb.TagNumber(13) + void clearUpdatedAt() => clearField(13); + @$pb.TagNumber(13) + $7.Timestamp ensureUpdatedAt() => $_ensure(12); } class Child extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 15b05264..5e40fb57 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -190,8 +190,11 @@ const Bus$json = { {'1': 'latitude', '3': 6, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 7, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'enable_face_recognition', '3': 8, '4': 1, '5': 8, '10': 'enableFaceRecognition'}, - {'1': 'created_at', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, - {'1': 'updated_at', '3': 10, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, + {'1': 'morning_first_station_id', '3': 9, '4': 1, '5': 9, '10': 'morningFirstStationId'}, + {'1': 'evening_first_station_id', '3': 10, '4': 1, '5': 9, '10': 'eveningFirstStationId'}, + {'1': 'next_station_id', '3': 11, '4': 1, '5': 9, '10': 'nextStationId'}, + {'1': 'created_at', '3': 12, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, + {'1': 'updated_at', '3': 13, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], }; @@ -202,9 +205,11 @@ final $typed_data.Uint8List busDescriptor = $convert.base64Decode( 'YnVzX3N0YXR1cxgFIAEoDjIdLndoZXJlX2NoaWxkX2J1cy52MS5CdXNTdGF0dXNSCWJ1c1N0YX' 'R1cxIaCghsYXRpdHVkZRgGIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAcgASgBUglsb25n' 'aXR1ZGUSNgoXZW5hYmxlX2ZhY2VfcmVjb2duaXRpb24YCCABKAhSFWVuYWJsZUZhY2VSZWNvZ2' - '5pdGlvbhI5CgpjcmVhdGVkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJ' - 'Y3JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW' - '1wUgl1cGRhdGVkQXQ='); + '5pdGlvbhI3Chhtb3JuaW5nX2ZpcnN0X3N0YXRpb25faWQYCSABKAlSFW1vcm5pbmdGaXJzdFN0' + 'YXRpb25JZBI3ChhldmVuaW5nX2ZpcnN0X3N0YXRpb25faWQYCiABKAlSFWV2ZW5pbmdGaXJzdF' + 'N0YXRpb25JZBImCg9uZXh0X3N0YXRpb25faWQYCyABKAlSDW5leHRTdGF0aW9uSWQSOQoKY3Jl' + 'YXRlZF9hdBgMIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cg' + 'p1cGRhdGVkX2F0GA0gASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); @$core.Deprecated('Use childDescriptor instead') const Child$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index aae903bf..23ff1088 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -7,63 +7,55 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from generated.where_child_bus.v1 import ( - resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, -) +from generated.where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude" \n\x1eSendLocationContinuousResponse"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren"\xcd\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12;\n\x0bupdate_mask\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xaf\x06\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' -) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xe7\x03\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12\x37\n\x18morning_first_station_id\x18\x08 \x01(\tR\x15morningFirstStationId\x12\x37\n\x18\x65vening_first_station_id\x18\t \x01(\tR\x15\x65veningFirstStationId\x12&\n\x0fnext_station_id\x18\n \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xaf\x06\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.bus_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.bus_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals[ - "DESCRIPTOR" - ]._serialized_options = b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - _globals["_CREATEBUSREQUEST"]._serialized_start = 123 - _globals["_CREATEBUSREQUEST"]._serialized_end = 327 - _globals["_CREATEBUSRESPONSE"]._serialized_start = 329 - _globals["_CREATEBUSRESPONSE"]._serialized_end = 391 - _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_start = 393 - _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_end = 454 - _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_start = 456 - _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_end = 534 - _globals["_GETRUNNINGBUSBYGUARDIANIDREQUEST"]._serialized_start = 536 - _globals["_GETRUNNINGBUSBYGUARDIANIDREQUEST"]._serialized_end = 603 - _globals["_GETRUNNINGBUSBYGUARDIANIDRESPONSE"]._serialized_start = 605 - _globals["_GETRUNNINGBUSBYGUARDIANIDRESPONSE"]._serialized_end = 683 - _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_start = 685 - _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_end = 794 - _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_start = 796 - _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_end = 864 - _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_start = 866 - _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_end = 978 - _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_start = 980 - _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_end = 1012 - _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_start = 1014 - _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_end = 1064 - _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_start = 1066 - _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_end = 1175 - _globals["_STREAMBUSVIDEOREQUEST"]._serialized_start = 1178 - _globals["_STREAMBUSVIDEOREQUEST"]._serialized_end = 1483 - _globals["_STREAMBUSVIDEORESPONSE"]._serialized_start = 1485 - _globals["_STREAMBUSVIDEORESPONSE"]._serialized_end = 1597 - _globals["_UPDATEBUSREQUEST"]._serialized_start = 1600 - _globals["_UPDATEBUSREQUEST"]._serialized_end = 1933 - _globals["_UPDATEBUSRESPONSE"]._serialized_start = 1935 - _globals["_UPDATEBUSRESPONSE"]._serialized_end = 1997 - _globals["_BUSSERVICE"]._serialized_start = 2000 - _globals["_BUSSERVICE"]._serialized_end = 2815 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_CREATEBUSREQUEST']._serialized_start=123 + _globals['_CREATEBUSREQUEST']._serialized_end=327 + _globals['_CREATEBUSRESPONSE']._serialized_start=329 + _globals['_CREATEBUSRESPONSE']._serialized_end=391 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=393 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=454 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=456 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=534 + _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_start=536 + _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_end=603 + _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_start=605 + _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_end=683 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=685 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=794 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=796 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=864 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=866 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=978 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=980 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=1012 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=1014 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=1064 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=1066 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1175 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1178 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1483 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1485 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1597 + _globals['_UPDATEBUSREQUEST']._serialized_start=1600 + _globals['_UPDATEBUSREQUEST']._serialized_end=2087 + _globals['_UPDATEBUSRESPONSE']._serialized_start=2089 + _globals['_UPDATEBUSRESPONSE']._serialized_end=2151 + _globals['_BUSSERVICE']._serialized_start=2154 + _globals['_BUSSERVICE']._serialized_end=2969 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index 9e7c9730..b534d633 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -1,25 +1,14 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor +from where_child_bus.v1 import resources_pb2 as _resources_pb2 from google.protobuf import field_mask_pb2 as _field_mask_pb2 -from google.protobuf import message as _message from google.protobuf.internal import containers as _containers -from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor class CreateBusRequest(_message.Message): - __slots__ = ( - "nursery_id", - "name", - "plate_number", - "morning_guardian_ids", - "evening_guardian_ids", - ) + __slots__ = ("nursery_id", "name", "plate_number", "morning_guardian_ids", "evening_guardian_ids") NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] @@ -30,22 +19,13 @@ class CreateBusRequest(_message.Message): plate_number: str morning_guardian_ids: _containers.RepeatedScalarFieldContainer[str] evening_guardian_ids: _containers.RepeatedScalarFieldContainer[str] - def __init__( - self, - nursery_id: _Optional[str] = ..., - name: _Optional[str] = ..., - plate_number: _Optional[str] = ..., - morning_guardian_ids: _Optional[_Iterable[str]] = ..., - evening_guardian_ids: _Optional[_Iterable[str]] = ..., - ) -> None: ... + def __init__(self, nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., morning_guardian_ids: _Optional[_Iterable[str]] = ..., evening_guardian_ids: _Optional[_Iterable[str]] = ...) -> None: ... class CreateBusResponse(_message.Message): __slots__ = ("bus",) BUS_FIELD_NUMBER: _ClassVar[int] bus: _resources_pb2.Bus - def __init__( - self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ... - ) -> None: ... + def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... class GetBusListByNurseryIdRequest(_message.Message): __slots__ = ("nursery_id",) @@ -57,9 +37,7 @@ class GetBusListByNurseryIdResponse(_message.Message): __slots__ = ("buses",) BUSES_FIELD_NUMBER: _ClassVar[int] buses: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Bus] - def __init__( - self, buses: _Optional[_Iterable[_Union[_resources_pb2.Bus, _Mapping]]] = ... - ) -> None: ... + def __init__(self, buses: _Optional[_Iterable[_Union[_resources_pb2.Bus, _Mapping]]] = ...) -> None: ... class GetRunningBusByGuardianIdRequest(_message.Message): __slots__ = ("guardian_id",) @@ -71,9 +49,7 @@ class GetRunningBusByGuardianIdResponse(_message.Message): __slots__ = ("bus",) BUS_FIELD_NUMBER: _ClassVar[int] bus: _resources_pb2.Bus - def __init__( - self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ... - ) -> None: ... + def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... class ChangeBusStatusRequest(_message.Message): __slots__ = ("bus_id", "bus_status") @@ -81,19 +57,13 @@ class ChangeBusStatusRequest(_message.Message): BUS_STATUS_FIELD_NUMBER: _ClassVar[int] bus_id: str bus_status: _resources_pb2.BusStatus - def __init__( - self, - bus_id: _Optional[str] = ..., - bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ..., - ) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ...) -> None: ... class ChangeBusStatusResponse(_message.Message): __slots__ = ("bus",) BUS_FIELD_NUMBER: _ClassVar[int] bus: _resources_pb2.Bus - def __init__( - self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ... - ) -> None: ... + def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... class SendLocationContinuousRequest(_message.Message): __slots__ = ("bus_id", "latitude", "longitude") @@ -103,12 +73,7 @@ class SendLocationContinuousRequest(_message.Message): bus_id: str latitude: float longitude: float - def __init__( - self, - bus_id: _Optional[str] = ..., - latitude: _Optional[float] = ..., - longitude: _Optional[float] = ..., - ) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ...) -> None: ... class SendLocationContinuousResponse(_message.Message): __slots__ = () @@ -128,23 +93,10 @@ class TrackBusContinuousResponse(_message.Message): bus_id: str latitude: float longitude: float - def __init__( - self, - bus_id: _Optional[str] = ..., - latitude: _Optional[float] = ..., - longitude: _Optional[float] = ..., - ) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ...) -> None: ... class StreamBusVideoRequest(_message.Message): - __slots__ = ( - "bus_id", - "nursery_id", - "bus_type", - "vehicle_event", - "video_chunk", - "photo_height", - "photo_width", - ) + __slots__ = ("bus_id", "nursery_id", "bus_type", "vehicle_event", "video_chunk", "photo_height", "photo_width") BUS_ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] BUS_TYPE_FIELD_NUMBER: _ClassVar[int] @@ -159,16 +111,7 @@ class StreamBusVideoRequest(_message.Message): video_chunk: _containers.RepeatedScalarFieldContainer[bytes] photo_height: int photo_width: int - def __init__( - self, - bus_id: _Optional[str] = ..., - nursery_id: _Optional[str] = ..., - bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., - vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., - video_chunk: _Optional[_Iterable[bytes]] = ..., - photo_height: _Optional[int] = ..., - photo_width: _Optional[int] = ..., - ) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[_Iterable[bytes]] = ..., photo_height: _Optional[int] = ..., photo_width: _Optional[int] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = ("is_detected", "children") @@ -176,23 +119,10 @@ class StreamBusVideoResponse(_message.Message): CHILDREN_FIELD_NUMBER: _ClassVar[int] is_detected: bool children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] - def __init__( - self, - is_detected: bool = ..., - children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., - ) -> None: ... + def __init__(self, is_detected: bool = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... class UpdateBusRequest(_message.Message): - __slots__ = ( - "bus_id", - "name", - "plate_number", - "bus_status", - "latitude", - "longitude", - "enable_face_recognition", - "update_mask", - ) + __slots__ = ("bus_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "morning_first_station_id", "evening_first_station_id", "next_station_id", "update_mask") BUS_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] @@ -200,6 +130,9 @@ class UpdateBusRequest(_message.Message): LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] ENABLE_FACE_RECOGNITION_FIELD_NUMBER: _ClassVar[int] + MORNING_FIRST_STATION_ID_FIELD_NUMBER: _ClassVar[int] + EVENING_FIRST_STATION_ID_FIELD_NUMBER: _ClassVar[int] + NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] bus_id: str name: str @@ -208,23 +141,14 @@ class UpdateBusRequest(_message.Message): latitude: float longitude: float enable_face_recognition: bool + morning_first_station_id: str + evening_first_station_id: str + next_station_id: str update_mask: _field_mask_pb2.FieldMask - def __init__( - self, - bus_id: _Optional[str] = ..., - name: _Optional[str] = ..., - plate_number: _Optional[str] = ..., - bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ..., - latitude: _Optional[float] = ..., - longitude: _Optional[float] = ..., - enable_face_recognition: bool = ..., - update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ..., - ) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., morning_first_station_id: _Optional[str] = ..., evening_first_station_id: _Optional[str] = ..., next_station_id: _Optional[str] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateBusResponse(_message.Message): __slots__ = ("bus",) BUS_FIELD_NUMBER: _ClassVar[int] bus: _resources_pb2.Bus - def __init__( - self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ... - ) -> None: ... + def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py index 1a12f91a..292301cf 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py @@ -1,6 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc + from where_child_bus.v1 import bus_pb2 as where__child__bus_dot_v1_dot_bus__pb2 @@ -14,40 +15,40 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.CreateBus = channel.unary_unary( - "/where_child_bus.v1.BusService/CreateBus", - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.FromString, - ) + '/where_child_bus.v1.BusService/CreateBus', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.FromString, + ) self.GetBusListByNurseryId = channel.unary_unary( - "/where_child_bus.v1.BusService/GetBusListByNurseryId", - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, - ) + '/where_child_bus.v1.BusService/GetBusListByNurseryId', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, + ) self.GetRunningBusByGuardianId = channel.unary_unary( - "/where_child_bus.v1.BusService/GetRunningBusByGuardianId", - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.FromString, - ) + '/where_child_bus.v1.BusService/GetRunningBusByGuardianId', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.FromString, + ) self.UpdateBus = channel.unary_unary( - "/where_child_bus.v1.BusService/UpdateBus", - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.FromString, - ) + '/where_child_bus.v1.BusService/UpdateBus', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.FromString, + ) self.SendLocationContinuous = channel.stream_unary( - "/where_child_bus.v1.BusService/SendLocationContinuous", - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.FromString, - ) + '/where_child_bus.v1.BusService/SendLocationContinuous', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.FromString, + ) self.TrackBusContinuous = channel.unary_stream( - "/where_child_bus.v1.BusService/TrackBusContinuous", - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.FromString, - ) + '/where_child_bus.v1.BusService/TrackBusContinuous', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.FromString, + ) self.StreamBusVideo = channel.stream_unary( - "/where_child_bus.v1.BusService/StreamBusVideo", - request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.FromString, - ) + '/where_child_bus.v1.BusService/StreamBusVideo', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.FromString, + ) class BusServiceServicer(object): @@ -56,293 +57,208 @@ class BusServiceServicer(object): def CreateBus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetBusListByNurseryId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetRunningBusByGuardianId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def UpdateBus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def SendLocationContinuous(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def TrackBusContinuous(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def StreamBusVideo(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_BusServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "CreateBus": grpc.unary_unary_rpc_method_handler( - servicer.CreateBus, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.SerializeToString, - ), - "GetBusListByNurseryId": grpc.unary_unary_rpc_method_handler( - servicer.GetBusListByNurseryId, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.SerializeToString, - ), - "GetRunningBusByGuardianId": grpc.unary_unary_rpc_method_handler( - servicer.GetRunningBusByGuardianId, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.SerializeToString, - ), - "UpdateBus": grpc.unary_unary_rpc_method_handler( - servicer.UpdateBus, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.SerializeToString, - ), - "SendLocationContinuous": grpc.stream_unary_rpc_method_handler( - servicer.SendLocationContinuous, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.SerializeToString, - ), - "TrackBusContinuous": grpc.unary_stream_rpc_method_handler( - servicer.TrackBusContinuous, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.SerializeToString, - ), - "StreamBusVideo": grpc.stream_unary_rpc_method_handler( - servicer.StreamBusVideo, - request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.SerializeToString, - ), + 'CreateBus': grpc.unary_unary_rpc_method_handler( + servicer.CreateBus, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.SerializeToString, + ), + 'GetBusListByNurseryId': grpc.unary_unary_rpc_method_handler( + servicer.GetBusListByNurseryId, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.SerializeToString, + ), + 'GetRunningBusByGuardianId': grpc.unary_unary_rpc_method_handler( + servicer.GetRunningBusByGuardianId, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.SerializeToString, + ), + 'UpdateBus': grpc.unary_unary_rpc_method_handler( + servicer.UpdateBus, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.SerializeToString, + ), + 'SendLocationContinuous': grpc.stream_unary_rpc_method_handler( + servicer.SendLocationContinuous, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.SerializeToString, + ), + 'TrackBusContinuous': grpc.unary_stream_rpc_method_handler( + servicer.TrackBusContinuous, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.SerializeToString, + ), + 'StreamBusVideo': grpc.stream_unary_rpc_method_handler( + servicer.StreamBusVideo, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "where_child_bus.v1.BusService", rpc_method_handlers - ) + 'where_child_bus.v1.BusService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class BusService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def CreateBus( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def CreateBus(request, target, - "/where_child_bus.v1.BusService/CreateBus", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/CreateBus', where__child__bus_dot_v1_dot_bus__pb2.CreateBusRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.CreateBusResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetBusListByNurseryId( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetBusListByNurseryId(request, target, - "/where_child_bus.v1.BusService/GetBusListByNurseryId", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/GetBusListByNurseryId', where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.GetBusListByNurseryIdResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetRunningBusByGuardianId( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetRunningBusByGuardianId(request, target, - "/where_child_bus.v1.BusService/GetRunningBusByGuardianId", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/GetRunningBusByGuardianId', where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.GetRunningBusByGuardianIdResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def UpdateBus( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def UpdateBus(request, target, - "/where_child_bus.v1.BusService/UpdateBus", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/UpdateBus', where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def SendLocationContinuous( - request_iterator, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.stream_unary( - request_iterator, + def SendLocationContinuous(request_iterator, target, - "/where_child_bus.v1.BusService/SendLocationContinuous", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/where_child_bus.v1.BusService/SendLocationContinuous', where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def TrackBusContinuous( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_stream( - request, + def TrackBusContinuous(request, target, - "/where_child_bus.v1.BusService/TrackBusContinuous", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/where_child_bus.v1.BusService/TrackBusContinuous', where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def StreamBusVideo( - request_iterator, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.stream_unary( - request_iterator, + def StreamBusVideo(request_iterator, target, - "/where_child_bus.v1.BusService/StreamBusVideo", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/where_child_bus.v1.BusService/StreamBusVideo', where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py index d66a7c06..9a0764fb 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x91\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xd8\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x04\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x37\n\x18morning_first_station_id\x18\t \x01(\tR\x15morningFirstStationId\x12\x37\n\x18\x65vening_first_station_id\x18\n \x01(\tR\x15\x65veningFirstStationId\x12&\n\x0fnext_station_id\x18\x0b \x01(\tR\rnextStationId\x12\x39\n\ncreated_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xd8\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_BUSSTATUS']._serialized_start=3317 - _globals['_BUSSTATUS']._serialized_end=3432 - _globals['_VEHICLEEVENT']._serialized_start=3434 - _globals['_VEHICLEEVENT']._serialized_end=3532 - _globals['_SEX']._serialized_start=3534 - _globals['_SEX']._serialized_end=3603 - _globals['_BUSTYPE']._serialized_start=3605 - _globals['_BUSTYPE']._serialized_end=3684 + _globals['_BUSSTATUS']._serialized_start=3471 + _globals['_BUSSTATUS']._serialized_end=3586 + _globals['_VEHICLEEVENT']._serialized_start=3588 + _globals['_VEHICLEEVENT']._serialized_end=3686 + _globals['_SEX']._serialized_start=3688 + _globals['_SEX']._serialized_end=3757 + _globals['_BUSTYPE']._serialized_start=3759 + _globals['_BUSTYPE']._serialized_end=3838 _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=414 _globals['_NURSERYRESPONSE']._serialized_start=417 @@ -40,17 +40,17 @@ _globals['_GUARDIANRESPONSE']._serialized_start=1095 _globals['_GUARDIANRESPONSE']._serialized_end=1445 _globals['_BUS']._serialized_start=1448 - _globals['_BUS']._serialized_end=1849 - _globals['_CHILD']._serialized_start=1852 - _globals['_CHILD']._serialized_end=2360 - _globals['_STATION']._serialized_start=2363 - _globals['_STATION']._serialized_end=2707 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2710 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2853 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=2855 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=2932 - _globals['_CHILDPHOTO']._serialized_start=2935 - _globals['_CHILDPHOTO']._serialized_end=3139 - _globals['_BOARDINGRECORD']._serialized_start=3142 - _globals['_BOARDINGRECORD']._serialized_end=3315 + _globals['_BUS']._serialized_end=2003 + _globals['_CHILD']._serialized_start=2006 + _globals['_CHILD']._serialized_end=2514 + _globals['_STATION']._serialized_start=2517 + _globals['_STATION']._serialized_end=2861 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2864 + _globals['_CHILDBUSASSOCIATION']._serialized_end=3007 + _globals['_BUSSTATIONASSOCIATION']._serialized_start=3009 + _globals['_BUSSTATIONASSOCIATION']._serialized_end=3086 + _globals['_CHILDPHOTO']._serialized_start=3089 + _globals['_CHILDPHOTO']._serialized_end=3293 + _globals['_BOARDINGRECORD']._serialized_start=3296 + _globals['_BOARDINGRECORD']._serialized_end=3469 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi index 8e1725d1..b11b2b10 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi @@ -135,7 +135,7 @@ class GuardianResponse(_message.Message): def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Bus(_message.Message): - __slots__ = ("id", "nursery_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "created_at", "updated_at") + __slots__ = ("id", "nursery_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "morning_first_station_id", "evening_first_station_id", "next_station_id", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -144,6 +144,9 @@ class Bus(_message.Message): LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] ENABLE_FACE_RECOGNITION_FIELD_NUMBER: _ClassVar[int] + MORNING_FIRST_STATION_ID_FIELD_NUMBER: _ClassVar[int] + EVENING_FIRST_STATION_ID_FIELD_NUMBER: _ClassVar[int] + NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str @@ -154,9 +157,12 @@ class Bus(_message.Message): latitude: float longitude: float enable_face_recognition: bool + morning_first_station_id: str + evening_first_station_id: str + next_station_id: str created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., morning_first_station_id: _Optional[str] = ..., evening_first_station_id: _Optional[str] = ..., next_station_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Child(_message.Message): __slots__ = ("id", "nursery_id", "guardian_id", "name", "age", "sex", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "created_at", "updated_at") diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index 4fe96880..ef777bf1 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -97,9 +97,12 @@ message UpdateBusRequest { double latitude = 5; double longitude = 6; bool enable_face_recognition = 7; - google.protobuf.FieldMask update_mask = 8; + string morning_first_station_id = 8; + string evening_first_station_id = 9; + string next_station_id = 10; + google.protobuf.FieldMask update_mask = 11; } message UpdateBusResponse { Bus bus = 1; -} \ No newline at end of file +} diff --git a/proto/where_child_bus/v1/resources.proto b/proto/where_child_bus/v1/resources.proto index fdd7500e..215034f3 100644 --- a/proto/where_child_bus/v1/resources.proto +++ b/proto/where_child_bus/v1/resources.proto @@ -77,8 +77,11 @@ message Bus { double latitude = 6; double longitude = 7; bool enable_face_recognition = 8; - google.protobuf.Timestamp created_at = 9; - google.protobuf.Timestamp updated_at = 10; + string morning_first_station_id = 9; + string evening_first_station_id = 10; + string next_station_id = 11; + google.protobuf.Timestamp created_at = 12; + google.protobuf.Timestamp updated_at = 13; } enum Sex { From a08a4b596d7ef923449798eb765685f7446f1f75 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 21 Feb 2024 07:22:54 +0900 Subject: [PATCH 621/771] =?UTF-8?q?feat:=20APi=E9=80=9A=E4=BF=A1=E3=81=AE?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/auth_page/auth_page.dart | 4 +- .../map_page/components/arrival_time.dart | 124 ++++++++------- .../components/bus_to_bus_stop_time.dart | 144 ++++++++++-------- .../map_page/components/map_page_bottom.dart | 2 +- .../lib/pages/map_page/map_page.dart | 135 ++++++++++------ .../where_child_bus_guardian/pubspec.yaml | 2 +- 6 files changed, 242 insertions(+), 169 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index 0d3d2416..2073bc60 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -60,7 +60,9 @@ class _AuthPageState extends State { } } catch (error) { developer.log("Login Failed for error: ", error: error); - setState(() => _loginError = GuardianLoginError.invalidCredentials); + if (mounted) { + setState(() => _loginError = GuardianLoginError.invalidCredentials); + } } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index d80c8082..900db055 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -1,34 +1,34 @@ import 'package:flutter/material.dart'; +import 'dart:developer' as developer; import 'package:flutter_dotenv/flutter_dotenv.dart'; -import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:http/http.dart' as http; -import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; import 'dart:convert'; -import '../map_page.dart'; +import 'package:intl/intl.dart'; +import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; // 日付フォーマットのために追加 class ArrivalTime extends StatefulWidget { final List waypoints; - double nurseryLatitude, nurseryLongitude; - double guardianLatitude, guardianLongitude; - DateTime departureTime; + final double nurseryLatitude, nurseryLongitude; + final double guardianLatitude, guardianLongitude; + final DateTime departureTime; - ArrivalTime({ - super.key, + const ArrivalTime({ + Key? key, required this.waypoints, required this.nurseryLatitude, required this.nurseryLongitude, required this.guardianLatitude, required this.guardianLongitude, required this.departureTime, - }); + }) : super(key: key); @override - State createState() => _ArrivalTime(); + State createState() => _ArrivalTimeState(); } -class _ArrivalTime extends State { +class _ArrivalTimeState extends State { String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); - String arrivalTime = ''; + String arrivalTime = "Loading..."; @override void initState() { @@ -45,63 +45,69 @@ class _ArrivalTime extends State { } void setArrivalTime() async { - int durationInSeconds = await getArrivalTime( + try { + final durationInSeconds = await getArrivalTime( widget.nurseryLatitude, widget.nurseryLongitude, widget.guardianLatitude, widget.guardianLongitude, - widget.waypoints); + widget.waypoints, + ); - DateTime nurseryToBusStopTime = - widget.departureTime.add(Duration(seconds: durationInSeconds)); + if (durationInSeconds != null) { + DateTime arrivalDateTime = + widget.departureTime.add(Duration(seconds: durationInSeconds)); - String formattedArrivalTime = - '${nurseryToBusStopTime.hour.toString().padLeft(2, '0')}:${nurseryToBusStopTime.minute.toString().padLeft(2, '0')}'; - - setState(() { - arrivalTime = formattedArrivalTime; - }); - } - - getArrivalTime(double startLat, double startLng, double endLat, double endLng, - List waypoints) async { - String apiKey = dotenv.get("GOOGLE_MAP_API_KEY"); - String url = ''; - dynamic response; - - if (waypoints[0].latitude == endLat && waypoints[0].longitude == endLng) { - url = 'https://maps.googleapis.com/maps/api/directions/json' - '?destination=$endLat,$endLng&origin=$startLat,$startLng&key=$apiKey'; - } else { - int guardianIndex = waypoints.indexWhere((point) => - point.latitude == widget.guardianLatitude && - point.longitude == widget.guardianLongitude); - if (guardianIndex != -1) { - waypoints = waypoints.sublist(0, guardianIndex + 1); + setState(() { + arrivalTime = DateFormat('HH:mm').format(arrivalDateTime); + }); + } else { + setState(() => arrivalTime = "N/A"); } - - String waypointsString = waypoints - .map((point) => 'via:${point.latitude},${point.longitude}|') - .join(''); - - url = 'https://maps.googleapis.com/maps/api/directions/json' - '?destination=$endLat,$endLng&origin=$startLat,$startLng&waypoints=$waypointsString&key=$apiKey'; - } - if (GoogleMapApiManager.canSendRequest()) { - response = await http.get(Uri.parse(url)); + } catch (e) { + setState(() => arrivalTime = "Error"); + developer.log('Error setting arrival time: $e'); } + } - if (response.statusCode == 200) { - final data = json.decode(response.body); - if (data['routes'] != null && data['routes'].isNotEmpty) { - final route = data['routes'][0]; - final duration = route['legs'][0]['duration']['value']; - return duration; - } else { - print('No routes found.'); + Future getArrivalTime( + double startLat, + double startLng, + double endLat, + double endLng, + List waypoints, + ) async { + String url = buildDirectionUrl( + startLat, startLng, endLat, endLng, waypoints, googleApiKey); + try { + final response = await http.get(Uri.parse(url)); + if (response.statusCode == 200) { + final data = json.decode(response.body); + if (data['routes'].isNotEmpty) { + final int duration = + data['routes'][0]['legs'][0]['duration']['value']; + return duration; + } } - } else { - print('Failed to fetch directions.'); + developer.log('Failed to fetch directions or no routes found.'); + return null; + } catch (e) { + developer.log('Exception caught fetching directions: $e'); + return null; } } + + String buildDirectionUrl( + double startLat, + double startLng, + double endLat, + double endLng, + List waypoints, + String apiKey, + ) { + String waypointsString = waypoints + .map((point) => 'via:${point.latitude},${point.longitude}') + .join('|'); + return 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&waypoints=$waypointsString&key=$apiKey'; + } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart index 3d658db5..a3a8735d 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import "dart:developer" as developer; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:http/http.dart' as http; import 'dart:convert'; @@ -20,10 +21,10 @@ class BusToBusStopTime extends StatefulWidget { required this.guardianLongitude}); @override - State createState() => _BusToBusStopTime(); + State createState() => _BusToBusStopTimeState(); } -class _BusToBusStopTime extends State { +class _BusToBusStopTimeState extends State { String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); String busToBusStopTime = ''; @@ -42,82 +43,103 @@ class _BusToBusStopTime extends State { } void setArrivalTime() async { - int durationInMinutes = (await getArrivalTime( - widget.busLatitude, - widget.busLongitude, - widget.guardianLatitude, - widget.guardianLongitude, - widget.waypoints) / - 60) - .toInt(); - - String formattedBusToBusStopTime = durationInMinutes.toString(); - - setState(() { - busToBusStopTime = formattedBusToBusStopTime; - }); + try { + final double? durationInSeconds = await getArrivalTime( + widget.busLatitude, + widget.busLongitude, + widget.guardianLatitude, + widget.guardianLongitude, + widget.waypoints, + ); + + // durationInSecondsがnullでないことを確認し、分単位に変換 + if (durationInSeconds != null) { + final int durationInMinutes = (durationInSeconds / 60).toInt(); + final String formattedBusToBusStopTime = durationInMinutes.toString(); + + setState(() { + busToBusStopTime = formattedBusToBusStopTime; + }); + } else { + // getArrivalTimeがnullを返した場合、エラー処理やデフォルト値の設定をここで行う + setState(() { + busToBusStopTime = "N/A"; // 例: 到着時間を計算できない場合のデフォルト値 + }); + } + } catch (e) { + // 例外が発生した場合のエラーハンドリング + developer.log('到着時間の取得中にエラーが発生しました', error: e, name: "BusStopTimeError"); + setState(() { + busToBusStopTime = "Error"; // エラーが発生したことを示す値 + }); + } } - getArrivalTime(double startLat, double startLng, double endLat, double endLng, - List waypoints) async { + Future getArrivalTime(double startLat, double startLng, + double endLat, double endLng, List waypoints) async { String apiKey = dotenv.get("GOOGLE_MAP_API_KEY"); - String url = ''; - dynamic response; + // 最寄りの経由地を見つける int nearestWaypointIndex = findNearestWaypointIndex(startLat, startLng, waypoints); - double busToNextWaypointDistance = calculateDistance( - startLat, - startLng, - waypoints[nearestWaypointIndex + 1].latitude, - waypoints[nearestWaypointIndex + 1].longitude); + // URLの基本部分を設定 + String baseUrl = 'https://maps.googleapis.com/maps/api/directions/json'; - double nearestWaypointToNextWaypointDistance = calculateDistance( - waypoints[nearestWaypointIndex].latitude, - waypoints[nearestWaypointIndex].longitude, - waypoints[nearestWaypointIndex + 1].latitude, - waypoints[nearestWaypointIndex + 1].longitude); + // 経由地をURLパラメータ形式で生成 + String waypointsString = _generateWaypointsString( + nearestWaypointIndex, waypoints, endLat, endLng); - if (busToNextWaypointDistance > nearestWaypointToNextWaypointDistance) { - nearestWaypointIndex++; - } + // リクエストURLを組み立て + String url = + '$baseUrl?destination=$endLat,$endLng&origin=$startLat,$startLng&waypoints=$waypointsString&key=$apiKey'; - if (waypoints[0].latitude == endLat && waypoints[0].longitude == endLng) { - url = 'https://maps.googleapis.com/maps/api/directions/json' - '?destination=$endLat,$endLng&origin=$startLat,$startLng&key=$apiKey'; - } else { - int guardianIndex = waypoints.indexWhere((point) => - point.latitude == widget.guardianLatitude && - point.longitude == widget.guardianLongitude); - if (guardianIndex != -1) { - waypoints = waypoints.sublist(nearestWaypointIndex, guardianIndex + 1); - } + // Google Maps APIからのレスポンスを取得 + http.Response? response = await _fetchDirections(url); - String waypointsString = waypoints - .map((point) => 'via:${point.latitude},${point.longitude}|') - .join(''); + // レスポンスデータから所要時間を抽出 + return _parseDurationFromResponse(response); + } - url = 'https://maps.googleapis.com/maps/api/directions/json' - '?destination=$endLat,$endLng&origin=$startLat,$startLng&waypoints=$waypointsString&key=$apiKey'; + String _generateWaypointsString( + int startIndex, List waypoints, double endLat, double endLng) { + int endIndex = waypoints.indexWhere( + (point) => point.latitude == endLat && point.longitude == endLng); + if (endIndex == -1) { + endIndex = waypoints.length; } + return waypoints + .sublist(startIndex, endIndex) + .map((point) => 'via:${point.latitude},${point.longitude}') + .join('|'); + } - if (GoogleMapApiManager.canSendRequest()) { - response = await http.get(Uri.parse(url)); + Future _fetchDirections(String url) async { + if (!GoogleMapApiManager.canSendRequest()) { + developer.log('Request limit reached.'); + return null; } + final response = await http.get(Uri.parse(url)); + if (response.statusCode != 200) { + developer.log( + 'Failed to fetch directions. Status code: ${response.statusCode}'); + return null; + } + return response; + } - if (response.statusCode == 200) { - final data = json.decode(response.body); - if (data['routes'] != null && data['routes'].isNotEmpty) { - final route = data['routes'][0]; - final duration = route['legs'][0]['duration']['value']; - return duration; - } else { - print('No routes found.'); - } - } else { - print('Failed to fetch directions.'); + double? _parseDurationFromResponse(http.Response? response) { + if (response == null) return null; + + final data = json.decode(response.body); + if (data['routes'] == null || data['routes'].isEmpty) { + developer.log('No routes found.'); + return null; } + + final route = data['routes'][0]; + final duration = route['legs'][0]['duration']['value'] as double?; + return duration; } int findNearestWaypointIndex( diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart index c055ea9b..481c9ed9 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart @@ -31,7 +31,7 @@ class MapPageBottom extends StatefulWidget { } class _MapPageBottomState extends State { - late Station guardianStation; + Station guardianStation = Station(); @override void initState() { diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 86f24ea6..36814196 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -41,46 +41,73 @@ class _MapPageState extends State { List stations = []; List waypoints = []; - late GuardianResponse guardian; - late Bus bus; - late NurseryResponse nursery; - late String nurseryAddress; - late double busLatitude; - late double busLongitude; - late double nurseryLatitude; - late double nurseryLongitude; + final GuardianResponse guardian = GuardianData().getGuardian(); + Bus bus = Bus(); + NurseryResponse nursery = NurseryResponse(); + String? nurseryAddress; + double busLatitude = 0.0; + double busLongitude = 0.0; + double nurseryLatitude = 0.0; + double nurseryLongitude = 0.0; bool _isLoading = false; @override void initState() { - _isLoading = true; super.initState(); - guardian = GuardianData().getGuardian(); - _loadBusLocation(); - _loadBusData(); - _loadStationsData(); - _loadWaypointData(); - _loadNurseryData(); - _getCoordinates(); - _isLoading = false; + _initializePage(); + } + + Future _initializePage() async { + setState(() { + _isLoading = true; + }); + + try { + await _loadBusData(); + developer.log('バスデータの読み込み'); + await _loadStationsData(); + developer.log('停留所リストデータの読み込み'); + await _loadWaypointData(); + developer.log('経由地データの読み込み'); + await _loadNurseryData(); + developer.log('保育園データの読み込み'); + await _getCoordinates(); + developer.log('座標の取得'); + _loadBusLocation(); + developer.log('バスの位置情報の読み込み'); + } catch (e) { + developer.log('初期化中にエラーが発生しました: $e'); + } finally { + if (mounted) { + setState(() { + _isLoading = false; + }); + } + } } void _loadBusLocation() { _controller.stream.listen((val) { - setState(() { - busLatitude = val.latitude; - busLongitude = val.longitude; - }); + if (mounted) { + setState(() { + busLatitude = val.latitude; + busLongitude = val.longitude; + }); + } }); } Future _loadBusData() async { try { var busRes = await getRunningBusByGuardianIdService(guardian.id); - setState(() { - bus = busRes.bus; - }); + developer.log("$mounted"); + if (mounted) { + setState(() { + bus = busRes.bus; + developer.log("bus: $bus"); + }); + } } catch (error) { developer.log('バスの読み込みに失敗しました: $error'); } @@ -88,10 +115,14 @@ class _MapPageState extends State { Future _loadStationsData() async { try { + developer.log('停留所リストの読み込み開始'); + developer.log(bus.id); var stationsRes = await getStationListByBusIdService(bus.id); - setState(() { - stations = stationsRes.stations; - }); + if (mounted) { + setState(() { + stations = stationsRes.stations; + }); + } } catch (error) { developer.log('停留所リストの読み込みに失敗しました: $error'); } @@ -99,42 +130,54 @@ class _MapPageState extends State { Future _loadWaypointData() async { try { - stations.forEach((station) { - waypoints.add(Waypoint( - latitude: station.latitude, - longitude: station.longitude, - name: station.id.toString())); - }); + if (mounted) { + stations.forEach((station) { + waypoints.add(Waypoint( + latitude: station.latitude, + longitude: station.longitude, + name: station.id.toString())); + }); + } } catch (error) { - developer.log('通過点の読み込みに失敗しました: $error'); + developer.log('経由地の読み込みに失敗しました: $error'); } } Future _loadNurseryData() async { try { var nurseryRes = await getNurseryByGuardianIdService(guardian.id); - setState(() { - nursery = nurseryRes.nurseries; - developer.log(nursery.address); - if (nursery != null) { + developer.log(nurseryRes.nurseries.address); + if (mounted) { + setState(() { + nursery = nurseryRes.nurseries; nurseryAddress = nursery.address; - } - }); + developer.log("nurseryAddressを初期化"); + }); + } } catch (error) { developer.log('保育園の読み込みに失敗しました: $error'); } } Future _getCoordinates() async { - dynamic response; - if (GoogleMapApiManager.canSendRequest()) { + try { + dynamic response; + developer.log("住所から緯度経度への変換${nurseryAddress}"); response = await http.get(Uri.parse( 'https://maps.googleapis.com/maps/api/geocode/json?address=$nurseryAddress&key=$googleApiKey')); + if (mounted) { + setState(() { + developer.log("$response"); + final data = json.decode(response.body); + developer.log(response.body); + final location = data['results'][0]['geometry']['location']; + nurseryLatitude = location['lat']; + nurseryLongitude = location['lng']; + }); + } + } catch (e) { + developer.log('座標の取得に失敗しました:', error: e); } - final data = json.decode(response.body); - final location = data['results'][0]['geometry']['location']; - nurseryLatitude = location['lat']; - nurseryLongitude = location['lng']; } @override diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index b864332e..b410c1e8 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -21,6 +21,7 @@ dependencies: google_maps_flutter: ^2.5.3 flutter_polyline_points: ^2.0.0 google_directions_api: ^0.10.0 + intl: ^0.19.0 where_child_bus_api: path: ../where_child_bus_api @@ -33,5 +34,4 @@ dev_dependencies: flutter: uses-material-design: true assets: - - assets/images/ - .env From 3f8dc5567496949dc2a6bd85f0642dd46256fe49 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 07:36:48 +0900 Subject: [PATCH 622/771] =?UTF-8?q?feat:=20=E3=83=95=E3=82=A3=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=83=89=E3=81=8B=E3=82=89=E3=82=A8=E3=83=83=E3=82=B8?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/bus.go | 136 +++- backend/domain/repository/ent/bus/bus.go | 96 ++- backend/domain/repository/ent/bus/where.go | 264 ++----- backend/domain/repository/ent/bus_create.go | 152 ++-- backend/domain/repository/ent/bus_query.go | 226 +++++- backend/domain/repository/ent/bus_update.go | 444 ++++++++---- backend/domain/repository/ent/client.go | 96 +++ .../domain/repository/ent/migrate/schema.go | 29 +- backend/domain/repository/ent/mutation.go | 677 ++++++++++++------ backend/domain/repository/ent/runtime.go | 6 +- backend/domain/repository/ent/schema/bus.go | 9 +- .../domain/repository/ent/schema/station.go | 9 + backend/domain/repository/ent/station.go | 50 +- .../domain/repository/ent/station/station.go | 90 +++ .../domain/repository/ent/station/where.go | 69 ++ .../domain/repository/ent/station_create.go | 93 +++ .../domain/repository/ent/station_query.go | 224 +++++- .../domain/repository/ent/station_update.go | 486 +++++++++++++ 18 files changed, 2504 insertions(+), 652 deletions(-) diff --git a/backend/domain/repository/ent/bus.go b/backend/domain/repository/ent/bus.go index 2606adde..6b2fac07 100644 --- a/backend/domain/repository/ent/bus.go +++ b/backend/domain/repository/ent/bus.go @@ -11,6 +11,7 @@ import ( "entgo.io/ent/dialect/sql" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" "github.com/google/uuid" ) @@ -29,23 +30,20 @@ type Bus struct { Longitude float64 `json:"longitude,omitempty"` // バスのステータス(運行中、停止中など) Status bus.Status `json:"status,omitempty"` - // MorningFirstStationID holds the value of the "morning_first_station_id" field. - MorningFirstStationID string `json:"morning_first_station_id,omitempty"` - // EveningFirstStationID holds the value of the "evening_first_station_id" field. - EveningFirstStationID string `json:"evening_first_station_id,omitempty"` // 顔識別が有効かどうか EnableFaceRecognition bool `json:"enable_face_recognition,omitempty"` - // 次のステーションのID - NextStationID uuid.UUID `json:"next_station_id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BusQuery when eager-loading is set. - Edges BusEdges `json:"edges"` - bus_nursery *uuid.UUID - selectValues sql.SelectValues + Edges BusEdges `json:"edges"` + bus_nursery *uuid.UUID + bus_destination_station *uuid.UUID + bus_morning_first_station *uuid.UUID + bus_evening_first_station *uuid.UUID + selectValues sql.SelectValues } // BusEdges holds the relations/edges for other nodes in the graph. @@ -58,9 +56,15 @@ type BusEdges struct { BoardingRecords []*BoardingRecord `json:"boarding_records,omitempty"` // ChildBusAssociations holds the value of the childBusAssociations edge. ChildBusAssociations []*ChildBusAssociation `json:"childBusAssociations,omitempty"` + // DestinationStation holds the value of the destination_station edge. + DestinationStation *Station `json:"destination_station,omitempty"` + // MorningFirstStation holds the value of the morning_first_station edge. + MorningFirstStation *Station `json:"morning_first_station,omitempty"` + // EveningFirstStation holds the value of the evening_first_station edge. + EveningFirstStation *Station `json:"evening_first_station,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. - loadedTypes [4]bool + loadedTypes [7]bool } // NurseryOrErr returns the Nursery value or an error if the edge @@ -103,6 +107,45 @@ func (e BusEdges) ChildBusAssociationsOrErr() ([]*ChildBusAssociation, error) { return nil, &NotLoadedError{edge: "childBusAssociations"} } +// DestinationStationOrErr returns the DestinationStation value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BusEdges) DestinationStationOrErr() (*Station, error) { + if e.loadedTypes[4] { + if e.DestinationStation == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: station.Label} + } + return e.DestinationStation, nil + } + return nil, &NotLoadedError{edge: "destination_station"} +} + +// MorningFirstStationOrErr returns the MorningFirstStation value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BusEdges) MorningFirstStationOrErr() (*Station, error) { + if e.loadedTypes[5] { + if e.MorningFirstStation == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: station.Label} + } + return e.MorningFirstStation, nil + } + return nil, &NotLoadedError{edge: "morning_first_station"} +} + +// EveningFirstStationOrErr returns the EveningFirstStation value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BusEdges) EveningFirstStationOrErr() (*Station, error) { + if e.loadedTypes[6] { + if e.EveningFirstStation == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: station.Label} + } + return e.EveningFirstStation, nil + } + return nil, &NotLoadedError{edge: "evening_first_station"} +} + // scanValues returns the types for scanning values from sql.Rows. func (*Bus) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) @@ -112,14 +155,20 @@ func (*Bus) scanValues(columns []string) ([]any, error) { values[i] = new(sql.NullBool) case bus.FieldLatitude, bus.FieldLongitude: values[i] = new(sql.NullFloat64) - case bus.FieldName, bus.FieldPlateNumber, bus.FieldStatus, bus.FieldMorningFirstStationID, bus.FieldEveningFirstStationID: + case bus.FieldName, bus.FieldPlateNumber, bus.FieldStatus: values[i] = new(sql.NullString) case bus.FieldCreatedAt, bus.FieldUpdatedAt: values[i] = new(sql.NullTime) - case bus.FieldID, bus.FieldNextStationID: + case bus.FieldID: values[i] = new(uuid.UUID) case bus.ForeignKeys[0]: // bus_nursery values[i] = &sql.NullScanner{S: new(uuid.UUID)} + case bus.ForeignKeys[1]: // bus_destination_station + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + case bus.ForeignKeys[2]: // bus_morning_first_station + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + case bus.ForeignKeys[3]: // bus_evening_first_station + values[i] = &sql.NullScanner{S: new(uuid.UUID)} default: values[i] = new(sql.UnknownType) } @@ -171,30 +220,12 @@ func (b *Bus) assignValues(columns []string, values []any) error { } else if value.Valid { b.Status = bus.Status(value.String) } - case bus.FieldMorningFirstStationID: - if value, ok := values[i].(*sql.NullString); !ok { - return fmt.Errorf("unexpected type %T for field morning_first_station_id", values[i]) - } else if value.Valid { - b.MorningFirstStationID = value.String - } - case bus.FieldEveningFirstStationID: - if value, ok := values[i].(*sql.NullString); !ok { - return fmt.Errorf("unexpected type %T for field evening_first_station_id", values[i]) - } else if value.Valid { - b.EveningFirstStationID = value.String - } case bus.FieldEnableFaceRecognition: if value, ok := values[i].(*sql.NullBool); !ok { return fmt.Errorf("unexpected type %T for field enable_face_recognition", values[i]) } else if value.Valid { b.EnableFaceRecognition = value.Bool } - case bus.FieldNextStationID: - if value, ok := values[i].(*uuid.UUID); !ok { - return fmt.Errorf("unexpected type %T for field next_station_id", values[i]) - } else if value != nil { - b.NextStationID = *value - } case bus.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { return fmt.Errorf("unexpected type %T for field created_at", values[i]) @@ -214,6 +245,27 @@ func (b *Bus) assignValues(columns []string, values []any) error { b.bus_nursery = new(uuid.UUID) *b.bus_nursery = *value.S.(*uuid.UUID) } + case bus.ForeignKeys[1]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field bus_destination_station", values[i]) + } else if value.Valid { + b.bus_destination_station = new(uuid.UUID) + *b.bus_destination_station = *value.S.(*uuid.UUID) + } + case bus.ForeignKeys[2]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field bus_morning_first_station", values[i]) + } else if value.Valid { + b.bus_morning_first_station = new(uuid.UUID) + *b.bus_morning_first_station = *value.S.(*uuid.UUID) + } + case bus.ForeignKeys[3]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field bus_evening_first_station", values[i]) + } else if value.Valid { + b.bus_evening_first_station = new(uuid.UUID) + *b.bus_evening_first_station = *value.S.(*uuid.UUID) + } default: b.selectValues.Set(columns[i], values[i]) } @@ -247,6 +299,21 @@ func (b *Bus) QueryChildBusAssociations() *ChildBusAssociationQuery { return NewBusClient(b.config).QueryChildBusAssociations(b) } +// QueryDestinationStation queries the "destination_station" edge of the Bus entity. +func (b *Bus) QueryDestinationStation() *StationQuery { + return NewBusClient(b.config).QueryDestinationStation(b) +} + +// QueryMorningFirstStation queries the "morning_first_station" edge of the Bus entity. +func (b *Bus) QueryMorningFirstStation() *StationQuery { + return NewBusClient(b.config).QueryMorningFirstStation(b) +} + +// QueryEveningFirstStation queries the "evening_first_station" edge of the Bus entity. +func (b *Bus) QueryEveningFirstStation() *StationQuery { + return NewBusClient(b.config).QueryEveningFirstStation(b) +} + // Update returns a builder for updating this Bus. // Note that you need to call Bus.Unwrap() before calling this method if this Bus // was returned from a transaction, and the transaction was committed or rolled back. @@ -285,18 +352,9 @@ func (b *Bus) String() string { builder.WriteString("status=") builder.WriteString(fmt.Sprintf("%v", b.Status)) builder.WriteString(", ") - builder.WriteString("morning_first_station_id=") - builder.WriteString(b.MorningFirstStationID) - builder.WriteString(", ") - builder.WriteString("evening_first_station_id=") - builder.WriteString(b.EveningFirstStationID) - builder.WriteString(", ") builder.WriteString("enable_face_recognition=") builder.WriteString(fmt.Sprintf("%v", b.EnableFaceRecognition)) builder.WriteString(", ") - builder.WriteString("next_station_id=") - builder.WriteString(fmt.Sprintf("%v", b.NextStationID)) - builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(b.CreatedAt.Format(time.ANSIC)) builder.WriteString(", ") diff --git a/backend/domain/repository/ent/bus/bus.go b/backend/domain/repository/ent/bus/bus.go index a45f4422..258f6b2d 100644 --- a/backend/domain/repository/ent/bus/bus.go +++ b/backend/domain/repository/ent/bus/bus.go @@ -26,14 +26,8 @@ const ( FieldLongitude = "longitude" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" - // FieldMorningFirstStationID holds the string denoting the morning_first_station_id field in the database. - FieldMorningFirstStationID = "morning_first_station_id" - // FieldEveningFirstStationID holds the string denoting the evening_first_station_id field in the database. - FieldEveningFirstStationID = "evening_first_station_id" // FieldEnableFaceRecognition holds the string denoting the enable_face_recognition field in the database. FieldEnableFaceRecognition = "enable_face_recognition" - // FieldNextStationID holds the string denoting the next_station_id field in the database. - FieldNextStationID = "next_station_id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. @@ -46,6 +40,12 @@ const ( EdgeBoardingRecords = "boarding_records" // EdgeChildBusAssociations holds the string denoting the childbusassociations edge name in mutations. EdgeChildBusAssociations = "childBusAssociations" + // EdgeDestinationStation holds the string denoting the destination_station edge name in mutations. + EdgeDestinationStation = "destination_station" + // EdgeMorningFirstStation holds the string denoting the morning_first_station edge name in mutations. + EdgeMorningFirstStation = "morning_first_station" + // EdgeEveningFirstStation holds the string denoting the evening_first_station edge name in mutations. + EdgeEveningFirstStation = "evening_first_station" // Table holds the table name of the bus in the database. Table = "bus" // NurseryTable is the table that holds the nursery relation/edge. @@ -74,6 +74,27 @@ const ( ChildBusAssociationsInverseTable = "child_bus_associations" // ChildBusAssociationsColumn is the table column denoting the childBusAssociations relation/edge. ChildBusAssociationsColumn = "bus_id" + // DestinationStationTable is the table that holds the destination_station relation/edge. + DestinationStationTable = "bus" + // DestinationStationInverseTable is the table name for the Station entity. + // It exists in this package in order to avoid circular dependency with the "station" package. + DestinationStationInverseTable = "stations" + // DestinationStationColumn is the table column denoting the destination_station relation/edge. + DestinationStationColumn = "bus_destination_station" + // MorningFirstStationTable is the table that holds the morning_first_station relation/edge. + MorningFirstStationTable = "bus" + // MorningFirstStationInverseTable is the table name for the Station entity. + // It exists in this package in order to avoid circular dependency with the "station" package. + MorningFirstStationInverseTable = "stations" + // MorningFirstStationColumn is the table column denoting the morning_first_station relation/edge. + MorningFirstStationColumn = "bus_morning_first_station" + // EveningFirstStationTable is the table that holds the evening_first_station relation/edge. + EveningFirstStationTable = "bus" + // EveningFirstStationInverseTable is the table name for the Station entity. + // It exists in this package in order to avoid circular dependency with the "station" package. + EveningFirstStationInverseTable = "stations" + // EveningFirstStationColumn is the table column denoting the evening_first_station relation/edge. + EveningFirstStationColumn = "bus_evening_first_station" ) // Columns holds all SQL columns for bus fields. @@ -84,10 +105,7 @@ var Columns = []string{ FieldLatitude, FieldLongitude, FieldStatus, - FieldMorningFirstStationID, - FieldEveningFirstStationID, FieldEnableFaceRecognition, - FieldNextStationID, FieldCreatedAt, FieldUpdatedAt, } @@ -96,6 +114,9 @@ var Columns = []string{ // table and are not defined as standalone fields in the schema. var ForeignKeys = []string{ "bus_nursery", + "bus_destination_station", + "bus_morning_first_station", + "bus_evening_first_station", } var ( @@ -192,26 +213,11 @@ func ByStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStatus, opts...).ToFunc() } -// ByMorningFirstStationID orders the results by the morning_first_station_id field. -func ByMorningFirstStationID(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldMorningFirstStationID, opts...).ToFunc() -} - -// ByEveningFirstStationID orders the results by the evening_first_station_id field. -func ByEveningFirstStationID(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldEveningFirstStationID, opts...).ToFunc() -} - // ByEnableFaceRecognition orders the results by the enable_face_recognition field. func ByEnableFaceRecognition(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldEnableFaceRecognition, opts...).ToFunc() } -// ByNextStationID orders the results by the next_station_id field. -func ByNextStationID(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldNextStationID, opts...).ToFunc() -} - // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() @@ -270,6 +276,27 @@ func ByChildBusAssociations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOpt sqlgraph.OrderByNeighborTerms(s, newChildBusAssociationsStep(), append([]sql.OrderTerm{term}, terms...)...) } } + +// ByDestinationStationField orders the results by destination_station field. +func ByDestinationStationField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newDestinationStationStep(), sql.OrderByField(field, opts...)) + } +} + +// ByMorningFirstStationField orders the results by morning_first_station field. +func ByMorningFirstStationField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newMorningFirstStationStep(), sql.OrderByField(field, opts...)) + } +} + +// ByEveningFirstStationField orders the results by evening_first_station field. +func ByEveningFirstStationField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newEveningFirstStationStep(), sql.OrderByField(field, opts...)) + } +} func newNurseryStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), @@ -298,3 +325,24 @@ func newChildBusAssociationsStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), ) } +func newDestinationStationStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(DestinationStationInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, DestinationStationTable, DestinationStationColumn), + ) +} +func newMorningFirstStationStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(MorningFirstStationInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, MorningFirstStationTable, MorningFirstStationColumn), + ) +} +func newEveningFirstStationStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(EveningFirstStationInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, EveningFirstStationTable, EveningFirstStationColumn), + ) +} diff --git a/backend/domain/repository/ent/bus/where.go b/backend/domain/repository/ent/bus/where.go index f0ac3b0e..b61a83c4 100644 --- a/backend/domain/repository/ent/bus/where.go +++ b/backend/domain/repository/ent/bus/where.go @@ -76,26 +76,11 @@ func Longitude(v float64) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldLongitude, v)) } -// MorningFirstStationID applies equality check predicate on the "morning_first_station_id" field. It's identical to MorningFirstStationIDEQ. -func MorningFirstStationID(v string) predicate.Bus { - return predicate.Bus(sql.FieldEQ(FieldMorningFirstStationID, v)) -} - -// EveningFirstStationID applies equality check predicate on the "evening_first_station_id" field. It's identical to EveningFirstStationIDEQ. -func EveningFirstStationID(v string) predicate.Bus { - return predicate.Bus(sql.FieldEQ(FieldEveningFirstStationID, v)) -} - // EnableFaceRecognition applies equality check predicate on the "enable_face_recognition" field. It's identical to EnableFaceRecognitionEQ. func EnableFaceRecognition(v bool) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldEnableFaceRecognition, v)) } -// NextStationID applies equality check predicate on the "next_station_id" field. It's identical to NextStationIDEQ. -func NextStationID(v uuid.UUID) predicate.Bus { - return predicate.Bus(sql.FieldEQ(FieldNextStationID, v)) -} - // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. func CreatedAt(v time.Time) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldCreatedAt, v)) @@ -366,136 +351,6 @@ func StatusNotIn(vs ...Status) predicate.Bus { return predicate.Bus(sql.FieldNotIn(FieldStatus, vs...)) } -// MorningFirstStationIDEQ applies the EQ predicate on the "morning_first_station_id" field. -func MorningFirstStationIDEQ(v string) predicate.Bus { - return predicate.Bus(sql.FieldEQ(FieldMorningFirstStationID, v)) -} - -// MorningFirstStationIDNEQ applies the NEQ predicate on the "morning_first_station_id" field. -func MorningFirstStationIDNEQ(v string) predicate.Bus { - return predicate.Bus(sql.FieldNEQ(FieldMorningFirstStationID, v)) -} - -// MorningFirstStationIDIn applies the In predicate on the "morning_first_station_id" field. -func MorningFirstStationIDIn(vs ...string) predicate.Bus { - return predicate.Bus(sql.FieldIn(FieldMorningFirstStationID, vs...)) -} - -// MorningFirstStationIDNotIn applies the NotIn predicate on the "morning_first_station_id" field. -func MorningFirstStationIDNotIn(vs ...string) predicate.Bus { - return predicate.Bus(sql.FieldNotIn(FieldMorningFirstStationID, vs...)) -} - -// MorningFirstStationIDGT applies the GT predicate on the "morning_first_station_id" field. -func MorningFirstStationIDGT(v string) predicate.Bus { - return predicate.Bus(sql.FieldGT(FieldMorningFirstStationID, v)) -} - -// MorningFirstStationIDGTE applies the GTE predicate on the "morning_first_station_id" field. -func MorningFirstStationIDGTE(v string) predicate.Bus { - return predicate.Bus(sql.FieldGTE(FieldMorningFirstStationID, v)) -} - -// MorningFirstStationIDLT applies the LT predicate on the "morning_first_station_id" field. -func MorningFirstStationIDLT(v string) predicate.Bus { - return predicate.Bus(sql.FieldLT(FieldMorningFirstStationID, v)) -} - -// MorningFirstStationIDLTE applies the LTE predicate on the "morning_first_station_id" field. -func MorningFirstStationIDLTE(v string) predicate.Bus { - return predicate.Bus(sql.FieldLTE(FieldMorningFirstStationID, v)) -} - -// MorningFirstStationIDContains applies the Contains predicate on the "morning_first_station_id" field. -func MorningFirstStationIDContains(v string) predicate.Bus { - return predicate.Bus(sql.FieldContains(FieldMorningFirstStationID, v)) -} - -// MorningFirstStationIDHasPrefix applies the HasPrefix predicate on the "morning_first_station_id" field. -func MorningFirstStationIDHasPrefix(v string) predicate.Bus { - return predicate.Bus(sql.FieldHasPrefix(FieldMorningFirstStationID, v)) -} - -// MorningFirstStationIDHasSuffix applies the HasSuffix predicate on the "morning_first_station_id" field. -func MorningFirstStationIDHasSuffix(v string) predicate.Bus { - return predicate.Bus(sql.FieldHasSuffix(FieldMorningFirstStationID, v)) -} - -// MorningFirstStationIDEqualFold applies the EqualFold predicate on the "morning_first_station_id" field. -func MorningFirstStationIDEqualFold(v string) predicate.Bus { - return predicate.Bus(sql.FieldEqualFold(FieldMorningFirstStationID, v)) -} - -// MorningFirstStationIDContainsFold applies the ContainsFold predicate on the "morning_first_station_id" field. -func MorningFirstStationIDContainsFold(v string) predicate.Bus { - return predicate.Bus(sql.FieldContainsFold(FieldMorningFirstStationID, v)) -} - -// EveningFirstStationIDEQ applies the EQ predicate on the "evening_first_station_id" field. -func EveningFirstStationIDEQ(v string) predicate.Bus { - return predicate.Bus(sql.FieldEQ(FieldEveningFirstStationID, v)) -} - -// EveningFirstStationIDNEQ applies the NEQ predicate on the "evening_first_station_id" field. -func EveningFirstStationIDNEQ(v string) predicate.Bus { - return predicate.Bus(sql.FieldNEQ(FieldEveningFirstStationID, v)) -} - -// EveningFirstStationIDIn applies the In predicate on the "evening_first_station_id" field. -func EveningFirstStationIDIn(vs ...string) predicate.Bus { - return predicate.Bus(sql.FieldIn(FieldEveningFirstStationID, vs...)) -} - -// EveningFirstStationIDNotIn applies the NotIn predicate on the "evening_first_station_id" field. -func EveningFirstStationIDNotIn(vs ...string) predicate.Bus { - return predicate.Bus(sql.FieldNotIn(FieldEveningFirstStationID, vs...)) -} - -// EveningFirstStationIDGT applies the GT predicate on the "evening_first_station_id" field. -func EveningFirstStationIDGT(v string) predicate.Bus { - return predicate.Bus(sql.FieldGT(FieldEveningFirstStationID, v)) -} - -// EveningFirstStationIDGTE applies the GTE predicate on the "evening_first_station_id" field. -func EveningFirstStationIDGTE(v string) predicate.Bus { - return predicate.Bus(sql.FieldGTE(FieldEveningFirstStationID, v)) -} - -// EveningFirstStationIDLT applies the LT predicate on the "evening_first_station_id" field. -func EveningFirstStationIDLT(v string) predicate.Bus { - return predicate.Bus(sql.FieldLT(FieldEveningFirstStationID, v)) -} - -// EveningFirstStationIDLTE applies the LTE predicate on the "evening_first_station_id" field. -func EveningFirstStationIDLTE(v string) predicate.Bus { - return predicate.Bus(sql.FieldLTE(FieldEveningFirstStationID, v)) -} - -// EveningFirstStationIDContains applies the Contains predicate on the "evening_first_station_id" field. -func EveningFirstStationIDContains(v string) predicate.Bus { - return predicate.Bus(sql.FieldContains(FieldEveningFirstStationID, v)) -} - -// EveningFirstStationIDHasPrefix applies the HasPrefix predicate on the "evening_first_station_id" field. -func EveningFirstStationIDHasPrefix(v string) predicate.Bus { - return predicate.Bus(sql.FieldHasPrefix(FieldEveningFirstStationID, v)) -} - -// EveningFirstStationIDHasSuffix applies the HasSuffix predicate on the "evening_first_station_id" field. -func EveningFirstStationIDHasSuffix(v string) predicate.Bus { - return predicate.Bus(sql.FieldHasSuffix(FieldEveningFirstStationID, v)) -} - -// EveningFirstStationIDEqualFold applies the EqualFold predicate on the "evening_first_station_id" field. -func EveningFirstStationIDEqualFold(v string) predicate.Bus { - return predicate.Bus(sql.FieldEqualFold(FieldEveningFirstStationID, v)) -} - -// EveningFirstStationIDContainsFold applies the ContainsFold predicate on the "evening_first_station_id" field. -func EveningFirstStationIDContainsFold(v string) predicate.Bus { - return predicate.Bus(sql.FieldContainsFold(FieldEveningFirstStationID, v)) -} - // EnableFaceRecognitionEQ applies the EQ predicate on the "enable_face_recognition" field. func EnableFaceRecognitionEQ(v bool) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldEnableFaceRecognition, v)) @@ -506,56 +361,6 @@ func EnableFaceRecognitionNEQ(v bool) predicate.Bus { return predicate.Bus(sql.FieldNEQ(FieldEnableFaceRecognition, v)) } -// NextStationIDEQ applies the EQ predicate on the "next_station_id" field. -func NextStationIDEQ(v uuid.UUID) predicate.Bus { - return predicate.Bus(sql.FieldEQ(FieldNextStationID, v)) -} - -// NextStationIDNEQ applies the NEQ predicate on the "next_station_id" field. -func NextStationIDNEQ(v uuid.UUID) predicate.Bus { - return predicate.Bus(sql.FieldNEQ(FieldNextStationID, v)) -} - -// NextStationIDIn applies the In predicate on the "next_station_id" field. -func NextStationIDIn(vs ...uuid.UUID) predicate.Bus { - return predicate.Bus(sql.FieldIn(FieldNextStationID, vs...)) -} - -// NextStationIDNotIn applies the NotIn predicate on the "next_station_id" field. -func NextStationIDNotIn(vs ...uuid.UUID) predicate.Bus { - return predicate.Bus(sql.FieldNotIn(FieldNextStationID, vs...)) -} - -// NextStationIDGT applies the GT predicate on the "next_station_id" field. -func NextStationIDGT(v uuid.UUID) predicate.Bus { - return predicate.Bus(sql.FieldGT(FieldNextStationID, v)) -} - -// NextStationIDGTE applies the GTE predicate on the "next_station_id" field. -func NextStationIDGTE(v uuid.UUID) predicate.Bus { - return predicate.Bus(sql.FieldGTE(FieldNextStationID, v)) -} - -// NextStationIDLT applies the LT predicate on the "next_station_id" field. -func NextStationIDLT(v uuid.UUID) predicate.Bus { - return predicate.Bus(sql.FieldLT(FieldNextStationID, v)) -} - -// NextStationIDLTE applies the LTE predicate on the "next_station_id" field. -func NextStationIDLTE(v uuid.UUID) predicate.Bus { - return predicate.Bus(sql.FieldLTE(FieldNextStationID, v)) -} - -// NextStationIDIsNil applies the IsNil predicate on the "next_station_id" field. -func NextStationIDIsNil() predicate.Bus { - return predicate.Bus(sql.FieldIsNull(FieldNextStationID)) -} - -// NextStationIDNotNil applies the NotNil predicate on the "next_station_id" field. -func NextStationIDNotNil() predicate.Bus { - return predicate.Bus(sql.FieldNotNull(FieldNextStationID)) -} - // CreatedAtEQ applies the EQ predicate on the "created_at" field. func CreatedAtEQ(v time.Time) predicate.Bus { return predicate.Bus(sql.FieldEQ(FieldCreatedAt, v)) @@ -728,6 +533,75 @@ func HasChildBusAssociationsWith(preds ...predicate.ChildBusAssociation) predica }) } +// HasDestinationStation applies the HasEdge predicate on the "destination_station" edge. +func HasDestinationStation() predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, DestinationStationTable, DestinationStationColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasDestinationStationWith applies the HasEdge predicate on the "destination_station" edge with a given conditions (other predicates). +func HasDestinationStationWith(preds ...predicate.Station) predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := newDestinationStationStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasMorningFirstStation applies the HasEdge predicate on the "morning_first_station" edge. +func HasMorningFirstStation() predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, MorningFirstStationTable, MorningFirstStationColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasMorningFirstStationWith applies the HasEdge predicate on the "morning_first_station" edge with a given conditions (other predicates). +func HasMorningFirstStationWith(preds ...predicate.Station) predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := newMorningFirstStationStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasEveningFirstStation applies the HasEdge predicate on the "evening_first_station" edge. +func HasEveningFirstStation() predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, EveningFirstStationTable, EveningFirstStationColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasEveningFirstStationWith applies the HasEdge predicate on the "evening_first_station" edge with a given conditions (other predicates). +func HasEveningFirstStationWith(preds ...predicate.Station) predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := newEveningFirstStationStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + // And groups predicates with the AND operator between them. func And(predicates ...predicate.Bus) predicate.Bus { return predicate.Bus(sql.AndPredicates(predicates...)) diff --git a/backend/domain/repository/ent/bus_create.go b/backend/domain/repository/ent/bus_create.go index 869a5da2..9e925306 100644 --- a/backend/domain/repository/ent/bus_create.go +++ b/backend/domain/repository/ent/bus_create.go @@ -87,18 +87,6 @@ func (bc *BusCreate) SetNillableStatus(b *bus.Status) *BusCreate { return bc } -// SetMorningFirstStationID sets the "morning_first_station_id" field. -func (bc *BusCreate) SetMorningFirstStationID(s string) *BusCreate { - bc.mutation.SetMorningFirstStationID(s) - return bc -} - -// SetEveningFirstStationID sets the "evening_first_station_id" field. -func (bc *BusCreate) SetEveningFirstStationID(s string) *BusCreate { - bc.mutation.SetEveningFirstStationID(s) - return bc -} - // SetEnableFaceRecognition sets the "enable_face_recognition" field. func (bc *BusCreate) SetEnableFaceRecognition(b bool) *BusCreate { bc.mutation.SetEnableFaceRecognition(b) @@ -113,20 +101,6 @@ func (bc *BusCreate) SetNillableEnableFaceRecognition(b *bool) *BusCreate { return bc } -// SetNextStationID sets the "next_station_id" field. -func (bc *BusCreate) SetNextStationID(u uuid.UUID) *BusCreate { - bc.mutation.SetNextStationID(u) - return bc -} - -// SetNillableNextStationID sets the "next_station_id" field if the given value is not nil. -func (bc *BusCreate) SetNillableNextStationID(u *uuid.UUID) *BusCreate { - if u != nil { - bc.SetNextStationID(*u) - } - return bc -} - // SetCreatedAt sets the "created_at" field. func (bc *BusCreate) SetCreatedAt(t time.Time) *BusCreate { bc.mutation.SetCreatedAt(t) @@ -233,6 +207,63 @@ func (bc *BusCreate) AddChildBusAssociations(c ...*ChildBusAssociation) *BusCrea return bc.AddChildBusAssociationIDs(ids...) } +// SetDestinationStationID sets the "destination_station" edge to the Station entity by ID. +func (bc *BusCreate) SetDestinationStationID(id uuid.UUID) *BusCreate { + bc.mutation.SetDestinationStationID(id) + return bc +} + +// SetNillableDestinationStationID sets the "destination_station" edge to the Station entity by ID if the given value is not nil. +func (bc *BusCreate) SetNillableDestinationStationID(id *uuid.UUID) *BusCreate { + if id != nil { + bc = bc.SetDestinationStationID(*id) + } + return bc +} + +// SetDestinationStation sets the "destination_station" edge to the Station entity. +func (bc *BusCreate) SetDestinationStation(s *Station) *BusCreate { + return bc.SetDestinationStationID(s.ID) +} + +// SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID. +func (bc *BusCreate) SetMorningFirstStationID(id uuid.UUID) *BusCreate { + bc.mutation.SetMorningFirstStationID(id) + return bc +} + +// SetNillableMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID if the given value is not nil. +func (bc *BusCreate) SetNillableMorningFirstStationID(id *uuid.UUID) *BusCreate { + if id != nil { + bc = bc.SetMorningFirstStationID(*id) + } + return bc +} + +// SetMorningFirstStation sets the "morning_first_station" edge to the Station entity. +func (bc *BusCreate) SetMorningFirstStation(s *Station) *BusCreate { + return bc.SetMorningFirstStationID(s.ID) +} + +// SetEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID. +func (bc *BusCreate) SetEveningFirstStationID(id uuid.UUID) *BusCreate { + bc.mutation.SetEveningFirstStationID(id) + return bc +} + +// SetNillableEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID if the given value is not nil. +func (bc *BusCreate) SetNillableEveningFirstStationID(id *uuid.UUID) *BusCreate { + if id != nil { + bc = bc.SetEveningFirstStationID(*id) + } + return bc +} + +// SetEveningFirstStation sets the "evening_first_station" edge to the Station entity. +func (bc *BusCreate) SetEveningFirstStation(s *Station) *BusCreate { + return bc.SetEveningFirstStationID(s.ID) +} + // Mutation returns the BusMutation object of the builder. func (bc *BusCreate) Mutation() *BusMutation { return bc.mutation @@ -303,12 +334,6 @@ func (bc *BusCreate) check() error { return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Bus.status": %w`, err)} } } - if _, ok := bc.mutation.MorningFirstStationID(); !ok { - return &ValidationError{Name: "morning_first_station_id", err: errors.New(`ent: missing required field "Bus.morning_first_station_id"`)} - } - if _, ok := bc.mutation.EveningFirstStationID(); !ok { - return &ValidationError{Name: "evening_first_station_id", err: errors.New(`ent: missing required field "Bus.evening_first_station_id"`)} - } if _, ok := bc.mutation.EnableFaceRecognition(); !ok { return &ValidationError{Name: "enable_face_recognition", err: errors.New(`ent: missing required field "Bus.enable_face_recognition"`)} } @@ -373,22 +398,10 @@ func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { _spec.SetField(bus.FieldStatus, field.TypeEnum, value) _node.Status = value } - if value, ok := bc.mutation.MorningFirstStationID(); ok { - _spec.SetField(bus.FieldMorningFirstStationID, field.TypeString, value) - _node.MorningFirstStationID = value - } - if value, ok := bc.mutation.EveningFirstStationID(); ok { - _spec.SetField(bus.FieldEveningFirstStationID, field.TypeString, value) - _node.EveningFirstStationID = value - } if value, ok := bc.mutation.EnableFaceRecognition(); ok { _spec.SetField(bus.FieldEnableFaceRecognition, field.TypeBool, value) _node.EnableFaceRecognition = value } - if value, ok := bc.mutation.NextStationID(); ok { - _spec.SetField(bus.FieldNextStationID, field.TypeUUID, value) - _node.NextStationID = value - } if value, ok := bc.mutation.CreatedAt(); ok { _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) _node.CreatedAt = value @@ -462,6 +475,57 @@ func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } + if nodes := bc.mutation.DestinationStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.DestinationStationTable, + Columns: []string{bus.DestinationStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.bus_destination_station = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := bc.mutation.MorningFirstStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.MorningFirstStationTable, + Columns: []string{bus.MorningFirstStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.bus_morning_first_station = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := bc.mutation.EveningFirstStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.EveningFirstStationTable, + Columns: []string{bus.EveningFirstStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.bus_evening_first_station = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } return _node, _spec } diff --git a/backend/domain/repository/ent/bus_query.go b/backend/domain/repository/ent/bus_query.go index a1ef2d42..a532f69f 100644 --- a/backend/domain/repository/ent/bus_query.go +++ b/backend/domain/repository/ent/bus_query.go @@ -31,6 +31,9 @@ type BusQuery struct { withStations *StationQuery withBoardingRecords *BoardingRecordQuery withChildBusAssociations *ChildBusAssociationQuery + withDestinationStation *StationQuery + withMorningFirstStation *StationQuery + withEveningFirstStation *StationQuery withFKs bool // intermediate query (i.e. traversal path). sql *sql.Selector @@ -156,6 +159,72 @@ func (bq *BusQuery) QueryChildBusAssociations() *ChildBusAssociationQuery { return query } +// QueryDestinationStation chains the current query on the "destination_station" edge. +func (bq *BusQuery) QueryDestinationStation() *StationQuery { + query := (&StationClient{config: bq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, selector), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.DestinationStationTable, bus.DestinationStationColumn), + ) + fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryMorningFirstStation chains the current query on the "morning_first_station" edge. +func (bq *BusQuery) QueryMorningFirstStation() *StationQuery { + query := (&StationClient{config: bq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, selector), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.MorningFirstStationTable, bus.MorningFirstStationColumn), + ) + fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryEveningFirstStation chains the current query on the "evening_first_station" edge. +func (bq *BusQuery) QueryEveningFirstStation() *StationQuery { + query := (&StationClient{config: bq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, selector), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.EveningFirstStationTable, bus.EveningFirstStationColumn), + ) + fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) + return fromU, nil + } + return query +} + // First returns the first Bus entity from the query. // Returns a *NotFoundError when no Bus was found. func (bq *BusQuery) First(ctx context.Context) (*Bus, error) { @@ -352,6 +421,9 @@ func (bq *BusQuery) Clone() *BusQuery { withStations: bq.withStations.Clone(), withBoardingRecords: bq.withBoardingRecords.Clone(), withChildBusAssociations: bq.withChildBusAssociations.Clone(), + withDestinationStation: bq.withDestinationStation.Clone(), + withMorningFirstStation: bq.withMorningFirstStation.Clone(), + withEveningFirstStation: bq.withEveningFirstStation.Clone(), // clone intermediate query. sql: bq.sql.Clone(), path: bq.path, @@ -402,6 +474,39 @@ func (bq *BusQuery) WithChildBusAssociations(opts ...func(*ChildBusAssociationQu return bq } +// WithDestinationStation tells the query-builder to eager-load the nodes that are connected to +// the "destination_station" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithDestinationStation(opts ...func(*StationQuery)) *BusQuery { + query := (&StationClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + bq.withDestinationStation = query + return bq +} + +// WithMorningFirstStation tells the query-builder to eager-load the nodes that are connected to +// the "morning_first_station" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithMorningFirstStation(opts ...func(*StationQuery)) *BusQuery { + query := (&StationClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + bq.withMorningFirstStation = query + return bq +} + +// WithEveningFirstStation tells the query-builder to eager-load the nodes that are connected to +// the "evening_first_station" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithEveningFirstStation(opts ...func(*StationQuery)) *BusQuery { + query := (&StationClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + bq.withEveningFirstStation = query + return bq +} + // GroupBy is used to group vertices by one or more fields/columns. // It is often used with aggregate functions, like: count, max, mean, min, sum. // @@ -481,14 +586,17 @@ func (bq *BusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bus, err nodes = []*Bus{} withFKs = bq.withFKs _spec = bq.querySpec() - loadedTypes = [4]bool{ + loadedTypes = [7]bool{ bq.withNursery != nil, bq.withStations != nil, bq.withBoardingRecords != nil, bq.withChildBusAssociations != nil, + bq.withDestinationStation != nil, + bq.withMorningFirstStation != nil, + bq.withEveningFirstStation != nil, } ) - if bq.withNursery != nil { + if bq.withNursery != nil || bq.withDestinationStation != nil || bq.withMorningFirstStation != nil || bq.withEveningFirstStation != nil { withFKs = true } if withFKs { @@ -541,6 +649,24 @@ func (bq *BusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bus, err return nil, err } } + if query := bq.withDestinationStation; query != nil { + if err := bq.loadDestinationStation(ctx, query, nodes, nil, + func(n *Bus, e *Station) { n.Edges.DestinationStation = e }); err != nil { + return nil, err + } + } + if query := bq.withMorningFirstStation; query != nil { + if err := bq.loadMorningFirstStation(ctx, query, nodes, nil, + func(n *Bus, e *Station) { n.Edges.MorningFirstStation = e }); err != nil { + return nil, err + } + } + if query := bq.withEveningFirstStation; query != nil { + if err := bq.loadEveningFirstStation(ctx, query, nodes, nil, + func(n *Bus, e *Station) { n.Edges.EveningFirstStation = e }); err != nil { + return nil, err + } + } return nodes, nil } @@ -698,6 +824,102 @@ func (bq *BusQuery) loadChildBusAssociations(ctx context.Context, query *ChildBu } return nil } +func (bq *BusQuery) loadDestinationStation(ctx context.Context, query *StationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Station)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Bus) + for i := range nodes { + if nodes[i].bus_destination_station == nil { + continue + } + fk := *nodes[i].bus_destination_station + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(station.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "bus_destination_station" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (bq *BusQuery) loadMorningFirstStation(ctx context.Context, query *StationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Station)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Bus) + for i := range nodes { + if nodes[i].bus_morning_first_station == nil { + continue + } + fk := *nodes[i].bus_morning_first_station + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(station.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "bus_morning_first_station" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (bq *BusQuery) loadEveningFirstStation(ctx context.Context, query *StationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Station)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Bus) + for i := range nodes { + if nodes[i].bus_evening_first_station == nil { + continue + } + fk := *nodes[i].bus_evening_first_station + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(station.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "bus_evening_first_station" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} func (bq *BusQuery) sqlCount(ctx context.Context) (int, error) { _spec := bq.querySpec() diff --git a/backend/domain/repository/ent/bus_update.go b/backend/domain/repository/ent/bus_update.go index bc17c806..9a2229db 100644 --- a/backend/domain/repository/ent/bus_update.go +++ b/backend/domain/repository/ent/bus_update.go @@ -135,34 +135,6 @@ func (bu *BusUpdate) SetNillableStatus(b *bus.Status) *BusUpdate { return bu } -// SetMorningFirstStationID sets the "morning_first_station_id" field. -func (bu *BusUpdate) SetMorningFirstStationID(s string) *BusUpdate { - bu.mutation.SetMorningFirstStationID(s) - return bu -} - -// SetNillableMorningFirstStationID sets the "morning_first_station_id" field if the given value is not nil. -func (bu *BusUpdate) SetNillableMorningFirstStationID(s *string) *BusUpdate { - if s != nil { - bu.SetMorningFirstStationID(*s) - } - return bu -} - -// SetEveningFirstStationID sets the "evening_first_station_id" field. -func (bu *BusUpdate) SetEveningFirstStationID(s string) *BusUpdate { - bu.mutation.SetEveningFirstStationID(s) - return bu -} - -// SetNillableEveningFirstStationID sets the "evening_first_station_id" field if the given value is not nil. -func (bu *BusUpdate) SetNillableEveningFirstStationID(s *string) *BusUpdate { - if s != nil { - bu.SetEveningFirstStationID(*s) - } - return bu -} - // SetEnableFaceRecognition sets the "enable_face_recognition" field. func (bu *BusUpdate) SetEnableFaceRecognition(b bool) *BusUpdate { bu.mutation.SetEnableFaceRecognition(b) @@ -177,26 +149,6 @@ func (bu *BusUpdate) SetNillableEnableFaceRecognition(b *bool) *BusUpdate { return bu } -// SetNextStationID sets the "next_station_id" field. -func (bu *BusUpdate) SetNextStationID(u uuid.UUID) *BusUpdate { - bu.mutation.SetNextStationID(u) - return bu -} - -// SetNillableNextStationID sets the "next_station_id" field if the given value is not nil. -func (bu *BusUpdate) SetNillableNextStationID(u *uuid.UUID) *BusUpdate { - if u != nil { - bu.SetNextStationID(*u) - } - return bu -} - -// ClearNextStationID clears the value of the "next_station_id" field. -func (bu *BusUpdate) ClearNextStationID() *BusUpdate { - bu.mutation.ClearNextStationID() - return bu -} - // SetCreatedAt sets the "created_at" field. func (bu *BusUpdate) SetCreatedAt(t time.Time) *BusUpdate { bu.mutation.SetCreatedAt(t) @@ -281,6 +233,63 @@ func (bu *BusUpdate) AddChildBusAssociations(c ...*ChildBusAssociation) *BusUpda return bu.AddChildBusAssociationIDs(ids...) } +// SetDestinationStationID sets the "destination_station" edge to the Station entity by ID. +func (bu *BusUpdate) SetDestinationStationID(id uuid.UUID) *BusUpdate { + bu.mutation.SetDestinationStationID(id) + return bu +} + +// SetNillableDestinationStationID sets the "destination_station" edge to the Station entity by ID if the given value is not nil. +func (bu *BusUpdate) SetNillableDestinationStationID(id *uuid.UUID) *BusUpdate { + if id != nil { + bu = bu.SetDestinationStationID(*id) + } + return bu +} + +// SetDestinationStation sets the "destination_station" edge to the Station entity. +func (bu *BusUpdate) SetDestinationStation(s *Station) *BusUpdate { + return bu.SetDestinationStationID(s.ID) +} + +// SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID. +func (bu *BusUpdate) SetMorningFirstStationID(id uuid.UUID) *BusUpdate { + bu.mutation.SetMorningFirstStationID(id) + return bu +} + +// SetNillableMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID if the given value is not nil. +func (bu *BusUpdate) SetNillableMorningFirstStationID(id *uuid.UUID) *BusUpdate { + if id != nil { + bu = bu.SetMorningFirstStationID(*id) + } + return bu +} + +// SetMorningFirstStation sets the "morning_first_station" edge to the Station entity. +func (bu *BusUpdate) SetMorningFirstStation(s *Station) *BusUpdate { + return bu.SetMorningFirstStationID(s.ID) +} + +// SetEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID. +func (bu *BusUpdate) SetEveningFirstStationID(id uuid.UUID) *BusUpdate { + bu.mutation.SetEveningFirstStationID(id) + return bu +} + +// SetNillableEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID if the given value is not nil. +func (bu *BusUpdate) SetNillableEveningFirstStationID(id *uuid.UUID) *BusUpdate { + if id != nil { + bu = bu.SetEveningFirstStationID(*id) + } + return bu +} + +// SetEveningFirstStation sets the "evening_first_station" edge to the Station entity. +func (bu *BusUpdate) SetEveningFirstStation(s *Station) *BusUpdate { + return bu.SetEveningFirstStationID(s.ID) +} + // Mutation returns the BusMutation object of the builder. func (bu *BusUpdate) Mutation() *BusMutation { return bu.mutation @@ -355,6 +364,24 @@ func (bu *BusUpdate) RemoveChildBusAssociations(c ...*ChildBusAssociation) *BusU return bu.RemoveChildBusAssociationIDs(ids...) } +// ClearDestinationStation clears the "destination_station" edge to the Station entity. +func (bu *BusUpdate) ClearDestinationStation() *BusUpdate { + bu.mutation.ClearDestinationStation() + return bu +} + +// ClearMorningFirstStation clears the "morning_first_station" edge to the Station entity. +func (bu *BusUpdate) ClearMorningFirstStation() *BusUpdate { + bu.mutation.ClearMorningFirstStation() + return bu +} + +// ClearEveningFirstStation clears the "evening_first_station" edge to the Station entity. +func (bu *BusUpdate) ClearEveningFirstStation() *BusUpdate { + bu.mutation.ClearEveningFirstStation() + return bu +} + // Save executes the query and returns the number of nodes affected by the update operation. func (bu *BusUpdate) Save(ctx context.Context) (int, error) { bu.defaults() @@ -443,21 +470,9 @@ func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := bu.mutation.Status(); ok { _spec.SetField(bus.FieldStatus, field.TypeEnum, value) } - if value, ok := bu.mutation.MorningFirstStationID(); ok { - _spec.SetField(bus.FieldMorningFirstStationID, field.TypeString, value) - } - if value, ok := bu.mutation.EveningFirstStationID(); ok { - _spec.SetField(bus.FieldEveningFirstStationID, field.TypeString, value) - } if value, ok := bu.mutation.EnableFaceRecognition(); ok { _spec.SetField(bus.FieldEnableFaceRecognition, field.TypeBool, value) } - if value, ok := bu.mutation.NextStationID(); ok { - _spec.SetField(bus.FieldNextStationID, field.TypeUUID, value) - } - if bu.mutation.NextStationIDCleared() { - _spec.ClearField(bus.FieldNextStationID, field.TypeUUID) - } if value, ok := bu.mutation.CreatedAt(); ok { _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) } @@ -628,6 +643,93 @@ func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if bu.mutation.DestinationStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.DestinationStationTable, + Columns: []string{bus.DestinationStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.DestinationStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.DestinationStationTable, + Columns: []string{bus.DestinationStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bu.mutation.MorningFirstStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.MorningFirstStationTable, + Columns: []string{bus.MorningFirstStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.MorningFirstStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.MorningFirstStationTable, + Columns: []string{bus.MorningFirstStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bu.mutation.EveningFirstStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.EveningFirstStationTable, + Columns: []string{bus.EveningFirstStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.EveningFirstStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.EveningFirstStationTable, + Columns: []string{bus.EveningFirstStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } if n, err = sqlgraph.UpdateNodes(ctx, bu.driver, _spec); err != nil { if _, ok := err.(*sqlgraph.NotFoundError); ok { err = &NotFoundError{bus.Label} @@ -750,34 +852,6 @@ func (buo *BusUpdateOne) SetNillableStatus(b *bus.Status) *BusUpdateOne { return buo } -// SetMorningFirstStationID sets the "morning_first_station_id" field. -func (buo *BusUpdateOne) SetMorningFirstStationID(s string) *BusUpdateOne { - buo.mutation.SetMorningFirstStationID(s) - return buo -} - -// SetNillableMorningFirstStationID sets the "morning_first_station_id" field if the given value is not nil. -func (buo *BusUpdateOne) SetNillableMorningFirstStationID(s *string) *BusUpdateOne { - if s != nil { - buo.SetMorningFirstStationID(*s) - } - return buo -} - -// SetEveningFirstStationID sets the "evening_first_station_id" field. -func (buo *BusUpdateOne) SetEveningFirstStationID(s string) *BusUpdateOne { - buo.mutation.SetEveningFirstStationID(s) - return buo -} - -// SetNillableEveningFirstStationID sets the "evening_first_station_id" field if the given value is not nil. -func (buo *BusUpdateOne) SetNillableEveningFirstStationID(s *string) *BusUpdateOne { - if s != nil { - buo.SetEveningFirstStationID(*s) - } - return buo -} - // SetEnableFaceRecognition sets the "enable_face_recognition" field. func (buo *BusUpdateOne) SetEnableFaceRecognition(b bool) *BusUpdateOne { buo.mutation.SetEnableFaceRecognition(b) @@ -792,26 +866,6 @@ func (buo *BusUpdateOne) SetNillableEnableFaceRecognition(b *bool) *BusUpdateOne return buo } -// SetNextStationID sets the "next_station_id" field. -func (buo *BusUpdateOne) SetNextStationID(u uuid.UUID) *BusUpdateOne { - buo.mutation.SetNextStationID(u) - return buo -} - -// SetNillableNextStationID sets the "next_station_id" field if the given value is not nil. -func (buo *BusUpdateOne) SetNillableNextStationID(u *uuid.UUID) *BusUpdateOne { - if u != nil { - buo.SetNextStationID(*u) - } - return buo -} - -// ClearNextStationID clears the value of the "next_station_id" field. -func (buo *BusUpdateOne) ClearNextStationID() *BusUpdateOne { - buo.mutation.ClearNextStationID() - return buo -} - // SetCreatedAt sets the "created_at" field. func (buo *BusUpdateOne) SetCreatedAt(t time.Time) *BusUpdateOne { buo.mutation.SetCreatedAt(t) @@ -896,6 +950,63 @@ func (buo *BusUpdateOne) AddChildBusAssociations(c ...*ChildBusAssociation) *Bus return buo.AddChildBusAssociationIDs(ids...) } +// SetDestinationStationID sets the "destination_station" edge to the Station entity by ID. +func (buo *BusUpdateOne) SetDestinationStationID(id uuid.UUID) *BusUpdateOne { + buo.mutation.SetDestinationStationID(id) + return buo +} + +// SetNillableDestinationStationID sets the "destination_station" edge to the Station entity by ID if the given value is not nil. +func (buo *BusUpdateOne) SetNillableDestinationStationID(id *uuid.UUID) *BusUpdateOne { + if id != nil { + buo = buo.SetDestinationStationID(*id) + } + return buo +} + +// SetDestinationStation sets the "destination_station" edge to the Station entity. +func (buo *BusUpdateOne) SetDestinationStation(s *Station) *BusUpdateOne { + return buo.SetDestinationStationID(s.ID) +} + +// SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID. +func (buo *BusUpdateOne) SetMorningFirstStationID(id uuid.UUID) *BusUpdateOne { + buo.mutation.SetMorningFirstStationID(id) + return buo +} + +// SetNillableMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID if the given value is not nil. +func (buo *BusUpdateOne) SetNillableMorningFirstStationID(id *uuid.UUID) *BusUpdateOne { + if id != nil { + buo = buo.SetMorningFirstStationID(*id) + } + return buo +} + +// SetMorningFirstStation sets the "morning_first_station" edge to the Station entity. +func (buo *BusUpdateOne) SetMorningFirstStation(s *Station) *BusUpdateOne { + return buo.SetMorningFirstStationID(s.ID) +} + +// SetEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID. +func (buo *BusUpdateOne) SetEveningFirstStationID(id uuid.UUID) *BusUpdateOne { + buo.mutation.SetEveningFirstStationID(id) + return buo +} + +// SetNillableEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID if the given value is not nil. +func (buo *BusUpdateOne) SetNillableEveningFirstStationID(id *uuid.UUID) *BusUpdateOne { + if id != nil { + buo = buo.SetEveningFirstStationID(*id) + } + return buo +} + +// SetEveningFirstStation sets the "evening_first_station" edge to the Station entity. +func (buo *BusUpdateOne) SetEveningFirstStation(s *Station) *BusUpdateOne { + return buo.SetEveningFirstStationID(s.ID) +} + // Mutation returns the BusMutation object of the builder. func (buo *BusUpdateOne) Mutation() *BusMutation { return buo.mutation @@ -970,6 +1081,24 @@ func (buo *BusUpdateOne) RemoveChildBusAssociations(c ...*ChildBusAssociation) * return buo.RemoveChildBusAssociationIDs(ids...) } +// ClearDestinationStation clears the "destination_station" edge to the Station entity. +func (buo *BusUpdateOne) ClearDestinationStation() *BusUpdateOne { + buo.mutation.ClearDestinationStation() + return buo +} + +// ClearMorningFirstStation clears the "morning_first_station" edge to the Station entity. +func (buo *BusUpdateOne) ClearMorningFirstStation() *BusUpdateOne { + buo.mutation.ClearMorningFirstStation() + return buo +} + +// ClearEveningFirstStation clears the "evening_first_station" edge to the Station entity. +func (buo *BusUpdateOne) ClearEveningFirstStation() *BusUpdateOne { + buo.mutation.ClearEveningFirstStation() + return buo +} + // Where appends a list predicates to the BusUpdate builder. func (buo *BusUpdateOne) Where(ps ...predicate.Bus) *BusUpdateOne { buo.mutation.Where(ps...) @@ -1088,21 +1217,9 @@ func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { if value, ok := buo.mutation.Status(); ok { _spec.SetField(bus.FieldStatus, field.TypeEnum, value) } - if value, ok := buo.mutation.MorningFirstStationID(); ok { - _spec.SetField(bus.FieldMorningFirstStationID, field.TypeString, value) - } - if value, ok := buo.mutation.EveningFirstStationID(); ok { - _spec.SetField(bus.FieldEveningFirstStationID, field.TypeString, value) - } if value, ok := buo.mutation.EnableFaceRecognition(); ok { _spec.SetField(bus.FieldEnableFaceRecognition, field.TypeBool, value) } - if value, ok := buo.mutation.NextStationID(); ok { - _spec.SetField(bus.FieldNextStationID, field.TypeUUID, value) - } - if buo.mutation.NextStationIDCleared() { - _spec.ClearField(bus.FieldNextStationID, field.TypeUUID) - } if value, ok := buo.mutation.CreatedAt(); ok { _spec.SetField(bus.FieldCreatedAt, field.TypeTime, value) } @@ -1273,6 +1390,93 @@ func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if buo.mutation.DestinationStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.DestinationStationTable, + Columns: []string{bus.DestinationStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.DestinationStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.DestinationStationTable, + Columns: []string{bus.DestinationStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if buo.mutation.MorningFirstStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.MorningFirstStationTable, + Columns: []string{bus.MorningFirstStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.MorningFirstStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.MorningFirstStationTable, + Columns: []string{bus.MorningFirstStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if buo.mutation.EveningFirstStationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.EveningFirstStationTable, + Columns: []string{bus.EveningFirstStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.EveningFirstStationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.EveningFirstStationTable, + Columns: []string{bus.EveningFirstStationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } _node = &Bus{config: buo.config} _spec.Assign = _node.assignValues _spec.ScanValues = _node.scanValues diff --git a/backend/domain/repository/ent/client.go b/backend/domain/repository/ent/client.go index ce41c94a..d0fdb7db 100644 --- a/backend/domain/repository/ent/client.go +++ b/backend/domain/repository/ent/client.go @@ -601,6 +601,54 @@ func (c *BusClient) QueryChildBusAssociations(b *Bus) *ChildBusAssociationQuery return query } +// QueryDestinationStation queries the destination_station edge of a Bus. +func (c *BusClient) QueryDestinationStation(b *Bus) *StationQuery { + query := (&StationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.DestinationStationTable, bus.DestinationStationColumn), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryMorningFirstStation queries the morning_first_station edge of a Bus. +func (c *BusClient) QueryMorningFirstStation(b *Bus) *StationQuery { + query := (&StationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.MorningFirstStationTable, bus.MorningFirstStationColumn), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryEveningFirstStation queries the evening_first_station edge of a Bus. +func (c *BusClient) QueryEveningFirstStation(b *Bus) *StationQuery { + query := (&StationClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.EveningFirstStationTable, bus.EveningFirstStationColumn), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + // Hooks returns the client hooks. func (c *BusClient) Hooks() []Hook { return c.hooks.Bus @@ -1687,6 +1735,54 @@ func (c *StationClient) QueryEveningNextStation(s *Station) *StationQuery { return query } +// QueryDestinationForBuses queries the destination_for_buses edge of a Station. +func (c *StationClient) QueryDestinationForBuses(s *Station) *BusQuery { + query := (&BusClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := s.ID + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, id), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, station.DestinationForBusesTable, station.DestinationForBusesColumn), + ) + fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryMorningFirstForBuses queries the morning_first_for_buses edge of a Station. +func (c *StationClient) QueryMorningFirstForBuses(s *Station) *BusQuery { + query := (&BusClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := s.ID + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, id), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, station.MorningFirstForBusesTable, station.MorningFirstForBusesColumn), + ) + fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryEveningFirstForBuses queries the evening_first_for_buses edge of a Station. +func (c *StationClient) QueryEveningFirstForBuses(s *Station) *BusQuery { + query := (&BusClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := s.ID + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, id), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, station.EveningFirstForBusesTable, station.EveningFirstForBusesColumn), + ) + fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) + return fromV, nil + } + return query +} + // Hooks returns the client hooks. func (c *StationClient) Hooks() []Hook { return c.hooks.Station diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 8f4b8c61..7e065b33 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -44,13 +44,13 @@ var ( {Name: "latitude", Type: field.TypeFloat64, Nullable: true}, {Name: "longitude", Type: field.TypeFloat64, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"stopped", "running", "maintenance"}, Default: "stopped"}, - {Name: "morning_first_station_id", Type: field.TypeString}, - {Name: "evening_first_station_id", Type: field.TypeString}, {Name: "enable_face_recognition", Type: field.TypeBool, Default: false}, - {Name: "next_station_id", Type: field.TypeUUID, Nullable: true}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "bus_nursery", Type: field.TypeUUID, Nullable: true}, + {Name: "bus_destination_station", Type: field.TypeUUID, Nullable: true}, + {Name: "bus_morning_first_station", Type: field.TypeUUID, Nullable: true}, + {Name: "bus_evening_first_station", Type: field.TypeUUID, Nullable: true}, } // BusTable holds the schema information for the "bus" table. BusTable = &schema.Table{ @@ -60,10 +60,28 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "bus_nurseries_nursery", - Columns: []*schema.Column{BusColumns[12]}, + Columns: []*schema.Column{BusColumns[9]}, RefColumns: []*schema.Column{NurseriesColumns[0]}, OnDelete: schema.SetNull, }, + { + Symbol: "bus_stations_destination_station", + Columns: []*schema.Column{BusColumns[10]}, + RefColumns: []*schema.Column{StationsColumns[0]}, + OnDelete: schema.SetNull, + }, + { + Symbol: "bus_stations_morning_first_station", + Columns: []*schema.Column{BusColumns[11]}, + RefColumns: []*schema.Column{StationsColumns[0]}, + OnDelete: schema.SetNull, + }, + { + Symbol: "bus_stations_evening_first_station", + Columns: []*schema.Column{BusColumns[12]}, + RefColumns: []*schema.Column{StationsColumns[0]}, + OnDelete: schema.SetNull, + }, }, } // ChildsColumns holds the columns for the "childs" table. @@ -269,6 +287,9 @@ func init() { BoardingRecordsTable.ForeignKeys[0].RefTable = BusTable BoardingRecordsTable.ForeignKeys[1].RefTable = ChildsTable BusTable.ForeignKeys[0].RefTable = NurseriesTable + BusTable.ForeignKeys[1].RefTable = StationsTable + BusTable.ForeignKeys[2].RefTable = StationsTable + BusTable.ForeignKeys[3].RefTable = StationsTable ChildsTable.ForeignKeys[0].RefTable = GuardiansTable ChildBusAssociationsTable.ForeignKeys[0].RefTable = BusTable ChildBusAssociationsTable.ForeignKeys[1].RefTable = ChildsTable diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index c4f725a3..d8885fda 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -557,37 +557,40 @@ func (m *BoardingRecordMutation) ResetEdge(name string) error { // BusMutation represents an operation that mutates the Bus nodes in the graph. type BusMutation struct { config - op Op - typ string - id *uuid.UUID - name *string - plate_number *string - latitude *float64 - addlatitude *float64 - longitude *float64 - addlongitude *float64 - status *bus.Status - morning_first_station_id *string - evening_first_station_id *string - enable_face_recognition *bool - next_station_id *uuid.UUID - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - nursery *uuid.UUID - clearednursery bool - stations map[uuid.UUID]struct{} - removedstations map[uuid.UUID]struct{} - clearedstations bool - boarding_records map[uuid.UUID]struct{} - removedboarding_records map[uuid.UUID]struct{} - clearedboarding_records bool - childBusAssociations map[int]struct{} - removedchildBusAssociations map[int]struct{} - clearedchildBusAssociations bool - done bool - oldValue func(context.Context) (*Bus, error) - predicates []predicate.Bus + op Op + typ string + id *uuid.UUID + name *string + plate_number *string + latitude *float64 + addlatitude *float64 + longitude *float64 + addlongitude *float64 + status *bus.Status + enable_face_recognition *bool + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + nursery *uuid.UUID + clearednursery bool + stations map[uuid.UUID]struct{} + removedstations map[uuid.UUID]struct{} + clearedstations bool + boarding_records map[uuid.UUID]struct{} + removedboarding_records map[uuid.UUID]struct{} + clearedboarding_records bool + childBusAssociations map[int]struct{} + removedchildBusAssociations map[int]struct{} + clearedchildBusAssociations bool + destination_station *uuid.UUID + cleareddestination_station bool + morning_first_station *uuid.UUID + clearedmorning_first_station bool + evening_first_station *uuid.UUID + clearedevening_first_station bool + done bool + oldValue func(context.Context) (*Bus, error) + predicates []predicate.Bus } var _ ent.Mutation = (*BusMutation)(nil) @@ -955,78 +958,6 @@ func (m *BusMutation) ResetStatus() { m.status = nil } -// SetMorningFirstStationID sets the "morning_first_station_id" field. -func (m *BusMutation) SetMorningFirstStationID(s string) { - m.morning_first_station_id = &s -} - -// MorningFirstStationID returns the value of the "morning_first_station_id" field in the mutation. -func (m *BusMutation) MorningFirstStationID() (r string, exists bool) { - v := m.morning_first_station_id - if v == nil { - return - } - return *v, true -} - -// OldMorningFirstStationID returns the old "morning_first_station_id" field's value of the Bus entity. -// If the Bus object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *BusMutation) OldMorningFirstStationID(ctx context.Context) (v string, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldMorningFirstStationID is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldMorningFirstStationID requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldMorningFirstStationID: %w", err) - } - return oldValue.MorningFirstStationID, nil -} - -// ResetMorningFirstStationID resets all changes to the "morning_first_station_id" field. -func (m *BusMutation) ResetMorningFirstStationID() { - m.morning_first_station_id = nil -} - -// SetEveningFirstStationID sets the "evening_first_station_id" field. -func (m *BusMutation) SetEveningFirstStationID(s string) { - m.evening_first_station_id = &s -} - -// EveningFirstStationID returns the value of the "evening_first_station_id" field in the mutation. -func (m *BusMutation) EveningFirstStationID() (r string, exists bool) { - v := m.evening_first_station_id - if v == nil { - return - } - return *v, true -} - -// OldEveningFirstStationID returns the old "evening_first_station_id" field's value of the Bus entity. -// If the Bus object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *BusMutation) OldEveningFirstStationID(ctx context.Context) (v string, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldEveningFirstStationID is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldEveningFirstStationID requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldEveningFirstStationID: %w", err) - } - return oldValue.EveningFirstStationID, nil -} - -// ResetEveningFirstStationID resets all changes to the "evening_first_station_id" field. -func (m *BusMutation) ResetEveningFirstStationID() { - m.evening_first_station_id = nil -} - // SetEnableFaceRecognition sets the "enable_face_recognition" field. func (m *BusMutation) SetEnableFaceRecognition(b bool) { m.enable_face_recognition = &b @@ -1063,55 +994,6 @@ func (m *BusMutation) ResetEnableFaceRecognition() { m.enable_face_recognition = nil } -// SetNextStationID sets the "next_station_id" field. -func (m *BusMutation) SetNextStationID(u uuid.UUID) { - m.next_station_id = &u -} - -// NextStationID returns the value of the "next_station_id" field in the mutation. -func (m *BusMutation) NextStationID() (r uuid.UUID, exists bool) { - v := m.next_station_id - if v == nil { - return - } - return *v, true -} - -// OldNextStationID returns the old "next_station_id" field's value of the Bus entity. -// If the Bus object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *BusMutation) OldNextStationID(ctx context.Context) (v uuid.UUID, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldNextStationID is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldNextStationID requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldNextStationID: %w", err) - } - return oldValue.NextStationID, nil -} - -// ClearNextStationID clears the value of the "next_station_id" field. -func (m *BusMutation) ClearNextStationID() { - m.next_station_id = nil - m.clearedFields[bus.FieldNextStationID] = struct{}{} -} - -// NextStationIDCleared returns if the "next_station_id" field was cleared in this mutation. -func (m *BusMutation) NextStationIDCleared() bool { - _, ok := m.clearedFields[bus.FieldNextStationID] - return ok -} - -// ResetNextStationID resets all changes to the "next_station_id" field. -func (m *BusMutation) ResetNextStationID() { - m.next_station_id = nil - delete(m.clearedFields, bus.FieldNextStationID) -} - // SetCreatedAt sets the "created_at" field. func (m *BusMutation) SetCreatedAt(t time.Time) { m.created_at = &t @@ -1385,6 +1267,123 @@ func (m *BusMutation) ResetChildBusAssociations() { m.removedchildBusAssociations = nil } +// SetDestinationStationID sets the "destination_station" edge to the Station entity by id. +func (m *BusMutation) SetDestinationStationID(id uuid.UUID) { + m.destination_station = &id +} + +// ClearDestinationStation clears the "destination_station" edge to the Station entity. +func (m *BusMutation) ClearDestinationStation() { + m.cleareddestination_station = true +} + +// DestinationStationCleared reports if the "destination_station" edge to the Station entity was cleared. +func (m *BusMutation) DestinationStationCleared() bool { + return m.cleareddestination_station +} + +// DestinationStationID returns the "destination_station" edge ID in the mutation. +func (m *BusMutation) DestinationStationID() (id uuid.UUID, exists bool) { + if m.destination_station != nil { + return *m.destination_station, true + } + return +} + +// DestinationStationIDs returns the "destination_station" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// DestinationStationID instead. It exists only for internal usage by the builders. +func (m *BusMutation) DestinationStationIDs() (ids []uuid.UUID) { + if id := m.destination_station; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetDestinationStation resets all changes to the "destination_station" edge. +func (m *BusMutation) ResetDestinationStation() { + m.destination_station = nil + m.cleareddestination_station = false +} + +// SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by id. +func (m *BusMutation) SetMorningFirstStationID(id uuid.UUID) { + m.morning_first_station = &id +} + +// ClearMorningFirstStation clears the "morning_first_station" edge to the Station entity. +func (m *BusMutation) ClearMorningFirstStation() { + m.clearedmorning_first_station = true +} + +// MorningFirstStationCleared reports if the "morning_first_station" edge to the Station entity was cleared. +func (m *BusMutation) MorningFirstStationCleared() bool { + return m.clearedmorning_first_station +} + +// MorningFirstStationID returns the "morning_first_station" edge ID in the mutation. +func (m *BusMutation) MorningFirstStationID() (id uuid.UUID, exists bool) { + if m.morning_first_station != nil { + return *m.morning_first_station, true + } + return +} + +// MorningFirstStationIDs returns the "morning_first_station" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// MorningFirstStationID instead. It exists only for internal usage by the builders. +func (m *BusMutation) MorningFirstStationIDs() (ids []uuid.UUID) { + if id := m.morning_first_station; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetMorningFirstStation resets all changes to the "morning_first_station" edge. +func (m *BusMutation) ResetMorningFirstStation() { + m.morning_first_station = nil + m.clearedmorning_first_station = false +} + +// SetEveningFirstStationID sets the "evening_first_station" edge to the Station entity by id. +func (m *BusMutation) SetEveningFirstStationID(id uuid.UUID) { + m.evening_first_station = &id +} + +// ClearEveningFirstStation clears the "evening_first_station" edge to the Station entity. +func (m *BusMutation) ClearEveningFirstStation() { + m.clearedevening_first_station = true +} + +// EveningFirstStationCleared reports if the "evening_first_station" edge to the Station entity was cleared. +func (m *BusMutation) EveningFirstStationCleared() bool { + return m.clearedevening_first_station +} + +// EveningFirstStationID returns the "evening_first_station" edge ID in the mutation. +func (m *BusMutation) EveningFirstStationID() (id uuid.UUID, exists bool) { + if m.evening_first_station != nil { + return *m.evening_first_station, true + } + return +} + +// EveningFirstStationIDs returns the "evening_first_station" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// EveningFirstStationID instead. It exists only for internal usage by the builders. +func (m *BusMutation) EveningFirstStationIDs() (ids []uuid.UUID) { + if id := m.evening_first_station; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetEveningFirstStation resets all changes to the "evening_first_station" edge. +func (m *BusMutation) ResetEveningFirstStation() { + m.evening_first_station = nil + m.clearedevening_first_station = false +} + // Where appends a list predicates to the BusMutation builder. func (m *BusMutation) Where(ps ...predicate.Bus) { m.predicates = append(m.predicates, ps...) @@ -1419,7 +1418,7 @@ func (m *BusMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *BusMutation) Fields() []string { - fields := make([]string, 0, 11) + fields := make([]string, 0, 8) if m.name != nil { fields = append(fields, bus.FieldName) } @@ -1435,18 +1434,9 @@ func (m *BusMutation) Fields() []string { if m.status != nil { fields = append(fields, bus.FieldStatus) } - if m.morning_first_station_id != nil { - fields = append(fields, bus.FieldMorningFirstStationID) - } - if m.evening_first_station_id != nil { - fields = append(fields, bus.FieldEveningFirstStationID) - } if m.enable_face_recognition != nil { fields = append(fields, bus.FieldEnableFaceRecognition) } - if m.next_station_id != nil { - fields = append(fields, bus.FieldNextStationID) - } if m.created_at != nil { fields = append(fields, bus.FieldCreatedAt) } @@ -1471,14 +1461,8 @@ func (m *BusMutation) Field(name string) (ent.Value, bool) { return m.Longitude() case bus.FieldStatus: return m.Status() - case bus.FieldMorningFirstStationID: - return m.MorningFirstStationID() - case bus.FieldEveningFirstStationID: - return m.EveningFirstStationID() case bus.FieldEnableFaceRecognition: return m.EnableFaceRecognition() - case bus.FieldNextStationID: - return m.NextStationID() case bus.FieldCreatedAt: return m.CreatedAt() case bus.FieldUpdatedAt: @@ -1502,14 +1486,8 @@ func (m *BusMutation) OldField(ctx context.Context, name string) (ent.Value, err return m.OldLongitude(ctx) case bus.FieldStatus: return m.OldStatus(ctx) - case bus.FieldMorningFirstStationID: - return m.OldMorningFirstStationID(ctx) - case bus.FieldEveningFirstStationID: - return m.OldEveningFirstStationID(ctx) case bus.FieldEnableFaceRecognition: return m.OldEnableFaceRecognition(ctx) - case bus.FieldNextStationID: - return m.OldNextStationID(ctx) case bus.FieldCreatedAt: return m.OldCreatedAt(ctx) case bus.FieldUpdatedAt: @@ -1558,20 +1536,6 @@ func (m *BusMutation) SetField(name string, value ent.Value) error { } m.SetStatus(v) return nil - case bus.FieldMorningFirstStationID: - v, ok := value.(string) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetMorningFirstStationID(v) - return nil - case bus.FieldEveningFirstStationID: - v, ok := value.(string) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetEveningFirstStationID(v) - return nil case bus.FieldEnableFaceRecognition: v, ok := value.(bool) if !ok { @@ -1579,13 +1543,6 @@ func (m *BusMutation) SetField(name string, value ent.Value) error { } m.SetEnableFaceRecognition(v) return nil - case bus.FieldNextStationID: - v, ok := value.(uuid.UUID) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetNextStationID(v) - return nil case bus.FieldCreatedAt: v, ok := value.(time.Time) if !ok { @@ -1666,9 +1623,6 @@ func (m *BusMutation) ClearedFields() []string { if m.FieldCleared(bus.FieldLongitude) { fields = append(fields, bus.FieldLongitude) } - if m.FieldCleared(bus.FieldNextStationID) { - fields = append(fields, bus.FieldNextStationID) - } return fields } @@ -1692,9 +1646,6 @@ func (m *BusMutation) ClearField(name string) error { case bus.FieldLongitude: m.ClearLongitude() return nil - case bus.FieldNextStationID: - m.ClearNextStationID() - return nil } return fmt.Errorf("unknown Bus nullable field %s", name) } @@ -1718,18 +1669,9 @@ func (m *BusMutation) ResetField(name string) error { case bus.FieldStatus: m.ResetStatus() return nil - case bus.FieldMorningFirstStationID: - m.ResetMorningFirstStationID() - return nil - case bus.FieldEveningFirstStationID: - m.ResetEveningFirstStationID() - return nil case bus.FieldEnableFaceRecognition: m.ResetEnableFaceRecognition() return nil - case bus.FieldNextStationID: - m.ResetNextStationID() - return nil case bus.FieldCreatedAt: m.ResetCreatedAt() return nil @@ -1742,7 +1684,7 @@ func (m *BusMutation) ResetField(name string) error { // AddedEdges returns all edge names that were set/added in this mutation. func (m *BusMutation) AddedEdges() []string { - edges := make([]string, 0, 4) + edges := make([]string, 0, 7) if m.nursery != nil { edges = append(edges, bus.EdgeNursery) } @@ -1755,6 +1697,15 @@ func (m *BusMutation) AddedEdges() []string { if m.childBusAssociations != nil { edges = append(edges, bus.EdgeChildBusAssociations) } + if m.destination_station != nil { + edges = append(edges, bus.EdgeDestinationStation) + } + if m.morning_first_station != nil { + edges = append(edges, bus.EdgeMorningFirstStation) + } + if m.evening_first_station != nil { + edges = append(edges, bus.EdgeEveningFirstStation) + } return edges } @@ -1784,13 +1735,25 @@ func (m *BusMutation) AddedIDs(name string) []ent.Value { ids = append(ids, id) } return ids + case bus.EdgeDestinationStation: + if id := m.destination_station; id != nil { + return []ent.Value{*id} + } + case bus.EdgeMorningFirstStation: + if id := m.morning_first_station; id != nil { + return []ent.Value{*id} + } + case bus.EdgeEveningFirstStation: + if id := m.evening_first_station; id != nil { + return []ent.Value{*id} + } } return nil } // RemovedEdges returns all edge names that were removed in this mutation. func (m *BusMutation) RemovedEdges() []string { - edges := make([]string, 0, 4) + edges := make([]string, 0, 7) if m.removedstations != nil { edges = append(edges, bus.EdgeStations) } @@ -1831,7 +1794,7 @@ func (m *BusMutation) RemovedIDs(name string) []ent.Value { // ClearedEdges returns all edge names that were cleared in this mutation. func (m *BusMutation) ClearedEdges() []string { - edges := make([]string, 0, 4) + edges := make([]string, 0, 7) if m.clearednursery { edges = append(edges, bus.EdgeNursery) } @@ -1844,6 +1807,15 @@ func (m *BusMutation) ClearedEdges() []string { if m.clearedchildBusAssociations { edges = append(edges, bus.EdgeChildBusAssociations) } + if m.cleareddestination_station { + edges = append(edges, bus.EdgeDestinationStation) + } + if m.clearedmorning_first_station { + edges = append(edges, bus.EdgeMorningFirstStation) + } + if m.clearedevening_first_station { + edges = append(edges, bus.EdgeEveningFirstStation) + } return edges } @@ -1859,6 +1831,12 @@ func (m *BusMutation) EdgeCleared(name string) bool { return m.clearedboarding_records case bus.EdgeChildBusAssociations: return m.clearedchildBusAssociations + case bus.EdgeDestinationStation: + return m.cleareddestination_station + case bus.EdgeMorningFirstStation: + return m.clearedmorning_first_station + case bus.EdgeEveningFirstStation: + return m.clearedevening_first_station } return false } @@ -1870,6 +1848,15 @@ func (m *BusMutation) ClearEdge(name string) error { case bus.EdgeNursery: m.ClearNursery() return nil + case bus.EdgeDestinationStation: + m.ClearDestinationStation() + return nil + case bus.EdgeMorningFirstStation: + m.ClearMorningFirstStation() + return nil + case bus.EdgeEveningFirstStation: + m.ClearEveningFirstStation() + return nil } return fmt.Errorf("unknown Bus unique edge %s", name) } @@ -1890,6 +1877,15 @@ func (m *BusMutation) ResetEdge(name string) error { case bus.EdgeChildBusAssociations: m.ResetChildBusAssociations() return nil + case bus.EdgeDestinationStation: + m.ResetDestinationStation() + return nil + case bus.EdgeMorningFirstStation: + m.ResetMorningFirstStation() + return nil + case bus.EdgeEveningFirstStation: + m.ResetEveningFirstStation() + return nil } return fmt.Errorf("unknown Bus edge %s", name) } @@ -6005,6 +6001,15 @@ type StationMutation struct { evening_next_station map[uuid.UUID]struct{} removedevening_next_station map[uuid.UUID]struct{} clearedevening_next_station bool + destination_for_buses map[uuid.UUID]struct{} + removeddestination_for_buses map[uuid.UUID]struct{} + cleareddestination_for_buses bool + morning_first_for_buses map[uuid.UUID]struct{} + removedmorning_first_for_buses map[uuid.UUID]struct{} + clearedmorning_first_for_buses bool + evening_first_for_buses map[uuid.UUID]struct{} + removedevening_first_for_buses map[uuid.UUID]struct{} + clearedevening_first_for_buses bool done bool oldValue func(context.Context) (*Station, error) predicates []predicate.Station @@ -6605,6 +6610,168 @@ func (m *StationMutation) ResetEveningNextStation() { m.removedevening_next_station = nil } +// AddDestinationForBusIDs adds the "destination_for_buses" edge to the Bus entity by ids. +func (m *StationMutation) AddDestinationForBusIDs(ids ...uuid.UUID) { + if m.destination_for_buses == nil { + m.destination_for_buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.destination_for_buses[ids[i]] = struct{}{} + } +} + +// ClearDestinationForBuses clears the "destination_for_buses" edge to the Bus entity. +func (m *StationMutation) ClearDestinationForBuses() { + m.cleareddestination_for_buses = true +} + +// DestinationForBusesCleared reports if the "destination_for_buses" edge to the Bus entity was cleared. +func (m *StationMutation) DestinationForBusesCleared() bool { + return m.cleareddestination_for_buses +} + +// RemoveDestinationForBusIDs removes the "destination_for_buses" edge to the Bus entity by IDs. +func (m *StationMutation) RemoveDestinationForBusIDs(ids ...uuid.UUID) { + if m.removeddestination_for_buses == nil { + m.removeddestination_for_buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.destination_for_buses, ids[i]) + m.removeddestination_for_buses[ids[i]] = struct{}{} + } +} + +// RemovedDestinationForBuses returns the removed IDs of the "destination_for_buses" edge to the Bus entity. +func (m *StationMutation) RemovedDestinationForBusesIDs() (ids []uuid.UUID) { + for id := range m.removeddestination_for_buses { + ids = append(ids, id) + } + return +} + +// DestinationForBusesIDs returns the "destination_for_buses" edge IDs in the mutation. +func (m *StationMutation) DestinationForBusesIDs() (ids []uuid.UUID) { + for id := range m.destination_for_buses { + ids = append(ids, id) + } + return +} + +// ResetDestinationForBuses resets all changes to the "destination_for_buses" edge. +func (m *StationMutation) ResetDestinationForBuses() { + m.destination_for_buses = nil + m.cleareddestination_for_buses = false + m.removeddestination_for_buses = nil +} + +// AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by ids. +func (m *StationMutation) AddMorningFirstForBusIDs(ids ...uuid.UUID) { + if m.morning_first_for_buses == nil { + m.morning_first_for_buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.morning_first_for_buses[ids[i]] = struct{}{} + } +} + +// ClearMorningFirstForBuses clears the "morning_first_for_buses" edge to the Bus entity. +func (m *StationMutation) ClearMorningFirstForBuses() { + m.clearedmorning_first_for_buses = true +} + +// MorningFirstForBusesCleared reports if the "morning_first_for_buses" edge to the Bus entity was cleared. +func (m *StationMutation) MorningFirstForBusesCleared() bool { + return m.clearedmorning_first_for_buses +} + +// RemoveMorningFirstForBusIDs removes the "morning_first_for_buses" edge to the Bus entity by IDs. +func (m *StationMutation) RemoveMorningFirstForBusIDs(ids ...uuid.UUID) { + if m.removedmorning_first_for_buses == nil { + m.removedmorning_first_for_buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.morning_first_for_buses, ids[i]) + m.removedmorning_first_for_buses[ids[i]] = struct{}{} + } +} + +// RemovedMorningFirstForBuses returns the removed IDs of the "morning_first_for_buses" edge to the Bus entity. +func (m *StationMutation) RemovedMorningFirstForBusesIDs() (ids []uuid.UUID) { + for id := range m.removedmorning_first_for_buses { + ids = append(ids, id) + } + return +} + +// MorningFirstForBusesIDs returns the "morning_first_for_buses" edge IDs in the mutation. +func (m *StationMutation) MorningFirstForBusesIDs() (ids []uuid.UUID) { + for id := range m.morning_first_for_buses { + ids = append(ids, id) + } + return +} + +// ResetMorningFirstForBuses resets all changes to the "morning_first_for_buses" edge. +func (m *StationMutation) ResetMorningFirstForBuses() { + m.morning_first_for_buses = nil + m.clearedmorning_first_for_buses = false + m.removedmorning_first_for_buses = nil +} + +// AddEveningFirstForBusIDs adds the "evening_first_for_buses" edge to the Bus entity by ids. +func (m *StationMutation) AddEveningFirstForBusIDs(ids ...uuid.UUID) { + if m.evening_first_for_buses == nil { + m.evening_first_for_buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.evening_first_for_buses[ids[i]] = struct{}{} + } +} + +// ClearEveningFirstForBuses clears the "evening_first_for_buses" edge to the Bus entity. +func (m *StationMutation) ClearEveningFirstForBuses() { + m.clearedevening_first_for_buses = true +} + +// EveningFirstForBusesCleared reports if the "evening_first_for_buses" edge to the Bus entity was cleared. +func (m *StationMutation) EveningFirstForBusesCleared() bool { + return m.clearedevening_first_for_buses +} + +// RemoveEveningFirstForBusIDs removes the "evening_first_for_buses" edge to the Bus entity by IDs. +func (m *StationMutation) RemoveEveningFirstForBusIDs(ids ...uuid.UUID) { + if m.removedevening_first_for_buses == nil { + m.removedevening_first_for_buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.evening_first_for_buses, ids[i]) + m.removedevening_first_for_buses[ids[i]] = struct{}{} + } +} + +// RemovedEveningFirstForBuses returns the removed IDs of the "evening_first_for_buses" edge to the Bus entity. +func (m *StationMutation) RemovedEveningFirstForBusesIDs() (ids []uuid.UUID) { + for id := range m.removedevening_first_for_buses { + ids = append(ids, id) + } + return +} + +// EveningFirstForBusesIDs returns the "evening_first_for_buses" edge IDs in the mutation. +func (m *StationMutation) EveningFirstForBusesIDs() (ids []uuid.UUID) { + for id := range m.evening_first_for_buses { + ids = append(ids, id) + } + return +} + +// ResetEveningFirstForBuses resets all changes to the "evening_first_for_buses" edge. +func (m *StationMutation) ResetEveningFirstForBuses() { + m.evening_first_for_buses = nil + m.clearedevening_first_for_buses = false + m.removedevening_first_for_buses = nil +} + // Where appends a list predicates to the StationMutation builder. func (m *StationMutation) Where(ps ...predicate.Station) { m.predicates = append(m.predicates, ps...) @@ -6831,7 +6998,7 @@ func (m *StationMutation) ResetField(name string) error { // AddedEdges returns all edge names that were set/added in this mutation. func (m *StationMutation) AddedEdges() []string { - edges := make([]string, 0, 6) + edges := make([]string, 0, 9) if m.guardian != nil { edges = append(edges, station.EdgeGuardian) } @@ -6850,6 +7017,15 @@ func (m *StationMutation) AddedEdges() []string { if m.evening_next_station != nil { edges = append(edges, station.EdgeEveningNextStation) } + if m.destination_for_buses != nil { + edges = append(edges, station.EdgeDestinationForBuses) + } + if m.morning_first_for_buses != nil { + edges = append(edges, station.EdgeMorningFirstForBuses) + } + if m.evening_first_for_buses != nil { + edges = append(edges, station.EdgeEveningFirstForBuses) + } return edges } @@ -6887,13 +7063,31 @@ func (m *StationMutation) AddedIDs(name string) []ent.Value { ids = append(ids, id) } return ids + case station.EdgeDestinationForBuses: + ids := make([]ent.Value, 0, len(m.destination_for_buses)) + for id := range m.destination_for_buses { + ids = append(ids, id) + } + return ids + case station.EdgeMorningFirstForBuses: + ids := make([]ent.Value, 0, len(m.morning_first_for_buses)) + for id := range m.morning_first_for_buses { + ids = append(ids, id) + } + return ids + case station.EdgeEveningFirstForBuses: + ids := make([]ent.Value, 0, len(m.evening_first_for_buses)) + for id := range m.evening_first_for_buses { + ids = append(ids, id) + } + return ids } return nil } // RemovedEdges returns all edge names that were removed in this mutation. func (m *StationMutation) RemovedEdges() []string { - edges := make([]string, 0, 6) + edges := make([]string, 0, 9) if m.removedbus != nil { edges = append(edges, station.EdgeBus) } @@ -6903,6 +7097,15 @@ func (m *StationMutation) RemovedEdges() []string { if m.removedevening_next_station != nil { edges = append(edges, station.EdgeEveningNextStation) } + if m.removeddestination_for_buses != nil { + edges = append(edges, station.EdgeDestinationForBuses) + } + if m.removedmorning_first_for_buses != nil { + edges = append(edges, station.EdgeMorningFirstForBuses) + } + if m.removedevening_first_for_buses != nil { + edges = append(edges, station.EdgeEveningFirstForBuses) + } return edges } @@ -6928,13 +7131,31 @@ func (m *StationMutation) RemovedIDs(name string) []ent.Value { ids = append(ids, id) } return ids + case station.EdgeDestinationForBuses: + ids := make([]ent.Value, 0, len(m.removeddestination_for_buses)) + for id := range m.removeddestination_for_buses { + ids = append(ids, id) + } + return ids + case station.EdgeMorningFirstForBuses: + ids := make([]ent.Value, 0, len(m.removedmorning_first_for_buses)) + for id := range m.removedmorning_first_for_buses { + ids = append(ids, id) + } + return ids + case station.EdgeEveningFirstForBuses: + ids := make([]ent.Value, 0, len(m.removedevening_first_for_buses)) + for id := range m.removedevening_first_for_buses { + ids = append(ids, id) + } + return ids } return nil } // ClearedEdges returns all edge names that were cleared in this mutation. func (m *StationMutation) ClearedEdges() []string { - edges := make([]string, 0, 6) + edges := make([]string, 0, 9) if m.clearedguardian { edges = append(edges, station.EdgeGuardian) } @@ -6953,6 +7174,15 @@ func (m *StationMutation) ClearedEdges() []string { if m.clearedevening_next_station { edges = append(edges, station.EdgeEveningNextStation) } + if m.cleareddestination_for_buses { + edges = append(edges, station.EdgeDestinationForBuses) + } + if m.clearedmorning_first_for_buses { + edges = append(edges, station.EdgeMorningFirstForBuses) + } + if m.clearedevening_first_for_buses { + edges = append(edges, station.EdgeEveningFirstForBuses) + } return edges } @@ -6972,6 +7202,12 @@ func (m *StationMutation) EdgeCleared(name string) bool { return m.clearedevening_previous_station case station.EdgeEveningNextStation: return m.clearedevening_next_station + case station.EdgeDestinationForBuses: + return m.cleareddestination_for_buses + case station.EdgeMorningFirstForBuses: + return m.clearedmorning_first_for_buses + case station.EdgeEveningFirstForBuses: + return m.clearedevening_first_for_buses } return false } @@ -7015,6 +7251,15 @@ func (m *StationMutation) ResetEdge(name string) error { case station.EdgeEveningNextStation: m.ResetEveningNextStation() return nil + case station.EdgeDestinationForBuses: + m.ResetDestinationForBuses() + return nil + case station.EdgeMorningFirstForBuses: + m.ResetMorningFirstForBuses() + return nil + case station.EdgeEveningFirstForBuses: + m.ResetEveningFirstForBuses() + return nil } return fmt.Errorf("unknown Station edge %s", name) } diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index 1fa6c41a..41fe4754 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -37,15 +37,15 @@ func init() { busFields := schema.Bus{}.Fields() _ = busFields // busDescEnableFaceRecognition is the schema descriptor for enable_face_recognition field. - busDescEnableFaceRecognition := busFields[8].Descriptor() + busDescEnableFaceRecognition := busFields[6].Descriptor() // bus.DefaultEnableFaceRecognition holds the default value on creation for the enable_face_recognition field. bus.DefaultEnableFaceRecognition = busDescEnableFaceRecognition.Default.(bool) // busDescCreatedAt is the schema descriptor for created_at field. - busDescCreatedAt := busFields[10].Descriptor() + busDescCreatedAt := busFields[7].Descriptor() // bus.DefaultCreatedAt holds the default value on creation for the created_at field. bus.DefaultCreatedAt = busDescCreatedAt.Default.(func() time.Time) // busDescUpdatedAt is the schema descriptor for updated_at field. - busDescUpdatedAt := busFields[11].Descriptor() + busDescUpdatedAt := busFields[8].Descriptor() // bus.DefaultUpdatedAt holds the default value on creation for the updated_at field. bus.DefaultUpdatedAt = busDescUpdatedAt.Default.(func() time.Time) // bus.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. diff --git a/backend/domain/repository/ent/schema/bus.go b/backend/domain/repository/ent/schema/bus.go index e04697dc..fd6ac983 100644 --- a/backend/domain/repository/ent/schema/bus.go +++ b/backend/domain/repository/ent/schema/bus.go @@ -24,10 +24,7 @@ func (Bus) Fields() []ent.Field { field.Float("longitude").Optional().Comment("現在の経度"), field.Enum("status").Default("stopped").Comment("バスのステータス(運行中、停止中など)"). Values("stopped", "running", "maintenance"), - field.String("morning_first_station_id"), - field.String("evening_first_station_id"), field.Bool("enable_face_recognition").Default(false).Comment("顔識別が有効かどうか"), - field.UUID("next_station_id", uuid.UUID{}).Optional().Comment("次のステーションのID"), field.Time("created_at").Default(time.Now), field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } @@ -40,5 +37,11 @@ func (Bus) Edges() []ent.Edge { edge.To("stations", Station.Type), edge.To("boarding_records", BoardingRecord.Type), edge.To("childBusAssociations", ChildBusAssociation.Type), + // バスが向かっている先のステーション + edge.To("destination_station", Station.Type).Unique(), + // 朝の最初のステーション + edge.To("morning_first_station", Station.Type).Unique(), + // 夕方の最初のステーション + edge.To("evening_first_station", Station.Type).Unique(), } } diff --git a/backend/domain/repository/ent/schema/station.go b/backend/domain/repository/ent/schema/station.go index 47d1180e..df72bbf3 100644 --- a/backend/domain/repository/ent/schema/station.go +++ b/backend/domain/repository/ent/schema/station.go @@ -41,5 +41,14 @@ func (Station) Edges() []ent.Edge { edge.To("evening_next_station", Station.Type). From("evening_previous_station"). Unique(), + // このステーションが「現在」の目的地であるバス + edge.From("destination_for_buses", Bus.Type). + Ref("destination_station"), + // このステーションが朝の最初のステーションであるバス + edge.From("morning_first_for_buses", Bus.Type). + Ref("morning_first_station"), + // このステーションが夕方の最初のステーションであるバス + edge.From("evening_first_for_buses", Bus.Type). + Ref("evening_first_station"), } } diff --git a/backend/domain/repository/ent/station.go b/backend/domain/repository/ent/station.go index 7c16104d..3524a74d 100644 --- a/backend/domain/repository/ent/station.go +++ b/backend/domain/repository/ent/station.go @@ -50,9 +50,15 @@ type StationEdges struct { EveningPreviousStation *Station `json:"evening_previous_station,omitempty"` // EveningNextStation holds the value of the evening_next_station edge. EveningNextStation []*Station `json:"evening_next_station,omitempty"` + // DestinationForBuses holds the value of the destination_for_buses edge. + DestinationForBuses []*Bus `json:"destination_for_buses,omitempty"` + // MorningFirstForBuses holds the value of the morning_first_for_buses edge. + MorningFirstForBuses []*Bus `json:"morning_first_for_buses,omitempty"` + // EveningFirstForBuses holds the value of the evening_first_for_buses edge. + EveningFirstForBuses []*Bus `json:"evening_first_for_buses,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. - loadedTypes [6]bool + loadedTypes [9]bool } // GuardianOrErr returns the Guardian value or an error if the edge @@ -121,6 +127,33 @@ func (e StationEdges) EveningNextStationOrErr() ([]*Station, error) { return nil, &NotLoadedError{edge: "evening_next_station"} } +// DestinationForBusesOrErr returns the DestinationForBuses value or an error if the edge +// was not loaded in eager-loading. +func (e StationEdges) DestinationForBusesOrErr() ([]*Bus, error) { + if e.loadedTypes[6] { + return e.DestinationForBuses, nil + } + return nil, &NotLoadedError{edge: "destination_for_buses"} +} + +// MorningFirstForBusesOrErr returns the MorningFirstForBuses value or an error if the edge +// was not loaded in eager-loading. +func (e StationEdges) MorningFirstForBusesOrErr() ([]*Bus, error) { + if e.loadedTypes[7] { + return e.MorningFirstForBuses, nil + } + return nil, &NotLoadedError{edge: "morning_first_for_buses"} +} + +// EveningFirstForBusesOrErr returns the EveningFirstForBuses value or an error if the edge +// was not loaded in eager-loading. +func (e StationEdges) EveningFirstForBusesOrErr() ([]*Bus, error) { + if e.loadedTypes[8] { + return e.EveningFirstForBuses, nil + } + return nil, &NotLoadedError{edge: "evening_first_for_buses"} +} + // scanValues returns the types for scanning values from sql.Rows. func (*Station) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) @@ -247,6 +280,21 @@ func (s *Station) QueryEveningNextStation() *StationQuery { return NewStationClient(s.config).QueryEveningNextStation(s) } +// QueryDestinationForBuses queries the "destination_for_buses" edge of the Station entity. +func (s *Station) QueryDestinationForBuses() *BusQuery { + return NewStationClient(s.config).QueryDestinationForBuses(s) +} + +// QueryMorningFirstForBuses queries the "morning_first_for_buses" edge of the Station entity. +func (s *Station) QueryMorningFirstForBuses() *BusQuery { + return NewStationClient(s.config).QueryMorningFirstForBuses(s) +} + +// QueryEveningFirstForBuses queries the "evening_first_for_buses" edge of the Station entity. +func (s *Station) QueryEveningFirstForBuses() *BusQuery { + return NewStationClient(s.config).QueryEveningFirstForBuses(s) +} + // Update returns a builder for updating this Station. // Note that you need to call Station.Unwrap() before calling this method if this Station // was returned from a transaction, and the transaction was committed or rolled back. diff --git a/backend/domain/repository/ent/station/station.go b/backend/domain/repository/ent/station/station.go index d2a5b904..9eb27bec 100644 --- a/backend/domain/repository/ent/station/station.go +++ b/backend/domain/repository/ent/station/station.go @@ -35,6 +35,12 @@ const ( EdgeEveningPreviousStation = "evening_previous_station" // EdgeEveningNextStation holds the string denoting the evening_next_station edge name in mutations. EdgeEveningNextStation = "evening_next_station" + // EdgeDestinationForBuses holds the string denoting the destination_for_buses edge name in mutations. + EdgeDestinationForBuses = "destination_for_buses" + // EdgeMorningFirstForBuses holds the string denoting the morning_first_for_buses edge name in mutations. + EdgeMorningFirstForBuses = "morning_first_for_buses" + // EdgeEveningFirstForBuses holds the string denoting the evening_first_for_buses edge name in mutations. + EdgeEveningFirstForBuses = "evening_first_for_buses" // Table holds the table name of the station in the database. Table = "stations" // GuardianTable is the table that holds the guardian relation/edge. @@ -65,6 +71,27 @@ const ( EveningNextStationTable = "stations" // EveningNextStationColumn is the table column denoting the evening_next_station relation/edge. EveningNextStationColumn = "station_evening_next_station" + // DestinationForBusesTable is the table that holds the destination_for_buses relation/edge. + DestinationForBusesTable = "bus" + // DestinationForBusesInverseTable is the table name for the Bus entity. + // It exists in this package in order to avoid circular dependency with the "bus" package. + DestinationForBusesInverseTable = "bus" + // DestinationForBusesColumn is the table column denoting the destination_for_buses relation/edge. + DestinationForBusesColumn = "bus_destination_station" + // MorningFirstForBusesTable is the table that holds the morning_first_for_buses relation/edge. + MorningFirstForBusesTable = "bus" + // MorningFirstForBusesInverseTable is the table name for the Bus entity. + // It exists in this package in order to avoid circular dependency with the "bus" package. + MorningFirstForBusesInverseTable = "bus" + // MorningFirstForBusesColumn is the table column denoting the morning_first_for_buses relation/edge. + MorningFirstForBusesColumn = "bus_morning_first_station" + // EveningFirstForBusesTable is the table that holds the evening_first_for_buses relation/edge. + EveningFirstForBusesTable = "bus" + // EveningFirstForBusesInverseTable is the table name for the Bus entity. + // It exists in this package in order to avoid circular dependency with the "bus" package. + EveningFirstForBusesInverseTable = "bus" + // EveningFirstForBusesColumn is the table column denoting the evening_first_for_buses relation/edge. + EveningFirstForBusesColumn = "bus_evening_first_station" ) // Columns holds all SQL columns for station fields. @@ -210,6 +237,48 @@ func ByEveningNextStation(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOptio sqlgraph.OrderByNeighborTerms(s, newEveningNextStationStep(), append([]sql.OrderTerm{term}, terms...)...) } } + +// ByDestinationForBusesCount orders the results by destination_for_buses count. +func ByDestinationForBusesCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newDestinationForBusesStep(), opts...) + } +} + +// ByDestinationForBuses orders the results by destination_for_buses terms. +func ByDestinationForBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newDestinationForBusesStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByMorningFirstForBusesCount orders the results by morning_first_for_buses count. +func ByMorningFirstForBusesCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newMorningFirstForBusesStep(), opts...) + } +} + +// ByMorningFirstForBuses orders the results by morning_first_for_buses terms. +func ByMorningFirstForBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newMorningFirstForBusesStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByEveningFirstForBusesCount orders the results by evening_first_for_buses count. +func ByEveningFirstForBusesCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newEveningFirstForBusesStep(), opts...) + } +} + +// ByEveningFirstForBuses orders the results by evening_first_for_buses terms. +func ByEveningFirstForBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newEveningFirstForBusesStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} func newGuardianStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), @@ -252,3 +321,24 @@ func newEveningNextStationStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.O2M, false, EveningNextStationTable, EveningNextStationColumn), ) } +func newDestinationForBusesStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(DestinationForBusesInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, DestinationForBusesTable, DestinationForBusesColumn), + ) +} +func newMorningFirstForBusesStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(MorningFirstForBusesInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, MorningFirstForBusesTable, MorningFirstForBusesColumn), + ) +} +func newEveningFirstForBusesStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(EveningFirstForBusesInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, EveningFirstForBusesTable, EveningFirstForBusesColumn), + ) +} diff --git a/backend/domain/repository/ent/station/where.go b/backend/domain/repository/ent/station/where.go index ff4422b0..ff6ea40d 100644 --- a/backend/domain/repository/ent/station/where.go +++ b/backend/domain/repository/ent/station/where.go @@ -394,6 +394,75 @@ func HasEveningNextStationWith(preds ...predicate.Station) predicate.Station { }) } +// HasDestinationForBuses applies the HasEdge predicate on the "destination_for_buses" edge. +func HasDestinationForBuses() predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, DestinationForBusesTable, DestinationForBusesColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasDestinationForBusesWith applies the HasEdge predicate on the "destination_for_buses" edge with a given conditions (other predicates). +func HasDestinationForBusesWith(preds ...predicate.Bus) predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := newDestinationForBusesStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasMorningFirstForBuses applies the HasEdge predicate on the "morning_first_for_buses" edge. +func HasMorningFirstForBuses() predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, MorningFirstForBusesTable, MorningFirstForBusesColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasMorningFirstForBusesWith applies the HasEdge predicate on the "morning_first_for_buses" edge with a given conditions (other predicates). +func HasMorningFirstForBusesWith(preds ...predicate.Bus) predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := newMorningFirstForBusesStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasEveningFirstForBuses applies the HasEdge predicate on the "evening_first_for_buses" edge. +func HasEveningFirstForBuses() predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, EveningFirstForBusesTable, EveningFirstForBusesColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasEveningFirstForBusesWith applies the HasEdge predicate on the "evening_first_for_buses" edge with a given conditions (other predicates). +func HasEveningFirstForBusesWith(preds ...predicate.Bus) predicate.Station { + return predicate.Station(func(s *sql.Selector) { + step := newEveningFirstForBusesStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + // And groups predicates with the AND operator between them. func And(predicates ...predicate.Station) predicate.Station { return predicate.Station(sql.AndPredicates(predicates...)) diff --git a/backend/domain/repository/ent/station_create.go b/backend/domain/repository/ent/station_create.go index ff91b38c..8dbb28af 100644 --- a/backend/domain/repository/ent/station_create.go +++ b/backend/domain/repository/ent/station_create.go @@ -195,6 +195,51 @@ func (sc *StationCreate) AddEveningNextStation(s ...*Station) *StationCreate { return sc.AddEveningNextStationIDs(ids...) } +// AddDestinationForBusIDs adds the "destination_for_buses" edge to the Bus entity by IDs. +func (sc *StationCreate) AddDestinationForBusIDs(ids ...uuid.UUID) *StationCreate { + sc.mutation.AddDestinationForBusIDs(ids...) + return sc +} + +// AddDestinationForBuses adds the "destination_for_buses" edges to the Bus entity. +func (sc *StationCreate) AddDestinationForBuses(b ...*Bus) *StationCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return sc.AddDestinationForBusIDs(ids...) +} + +// AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by IDs. +func (sc *StationCreate) AddMorningFirstForBusIDs(ids ...uuid.UUID) *StationCreate { + sc.mutation.AddMorningFirstForBusIDs(ids...) + return sc +} + +// AddMorningFirstForBuses adds the "morning_first_for_buses" edges to the Bus entity. +func (sc *StationCreate) AddMorningFirstForBuses(b ...*Bus) *StationCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return sc.AddMorningFirstForBusIDs(ids...) +} + +// AddEveningFirstForBusIDs adds the "evening_first_for_buses" edge to the Bus entity by IDs. +func (sc *StationCreate) AddEveningFirstForBusIDs(ids ...uuid.UUID) *StationCreate { + sc.mutation.AddEveningFirstForBusIDs(ids...) + return sc +} + +// AddEveningFirstForBuses adds the "evening_first_for_buses" edges to the Bus entity. +func (sc *StationCreate) AddEveningFirstForBuses(b ...*Bus) *StationCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return sc.AddEveningFirstForBusIDs(ids...) +} + // Mutation returns the StationMutation object of the builder. func (sc *StationCreate) Mutation() *StationMutation { return sc.mutation @@ -410,6 +455,54 @@ func (sc *StationCreate) createSpec() (*Station, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } + if nodes := sc.mutation.DestinationForBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.DestinationForBusesTable, + Columns: []string{station.DestinationForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := sc.mutation.MorningFirstForBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.MorningFirstForBusesTable, + Columns: []string{station.MorningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := sc.mutation.EveningFirstForBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.EveningFirstForBusesTable, + Columns: []string{station.EveningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } return _node, _spec } diff --git a/backend/domain/repository/ent/station_query.go b/backend/domain/repository/ent/station_query.go index c2b5ca0e..4d96fd12 100644 --- a/backend/domain/repository/ent/station_query.go +++ b/backend/domain/repository/ent/station_query.go @@ -31,6 +31,9 @@ type StationQuery struct { withMorningNextStation *StationQuery withEveningPreviousStation *StationQuery withEveningNextStation *StationQuery + withDestinationForBuses *BusQuery + withMorningFirstForBuses *BusQuery + withEveningFirstForBuses *BusQuery withFKs bool // intermediate query (i.e. traversal path). sql *sql.Selector @@ -200,6 +203,72 @@ func (sq *StationQuery) QueryEveningNextStation() *StationQuery { return query } +// QueryDestinationForBuses chains the current query on the "destination_for_buses" edge. +func (sq *StationQuery) QueryDestinationForBuses() *BusQuery { + query := (&BusClient{config: sq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := sq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := sq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, selector), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, station.DestinationForBusesTable, station.DestinationForBusesColumn), + ) + fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryMorningFirstForBuses chains the current query on the "morning_first_for_buses" edge. +func (sq *StationQuery) QueryMorningFirstForBuses() *BusQuery { + query := (&BusClient{config: sq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := sq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := sq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, selector), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, station.MorningFirstForBusesTable, station.MorningFirstForBusesColumn), + ) + fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryEveningFirstForBuses chains the current query on the "evening_first_for_buses" edge. +func (sq *StationQuery) QueryEveningFirstForBuses() *BusQuery { + query := (&BusClient{config: sq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := sq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := sq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(station.Table, station.FieldID, selector), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, station.EveningFirstForBusesTable, station.EveningFirstForBusesColumn), + ) + fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) + return fromU, nil + } + return query +} + // First returns the first Station entity from the query. // Returns a *NotFoundError when no Station was found. func (sq *StationQuery) First(ctx context.Context) (*Station, error) { @@ -398,6 +467,9 @@ func (sq *StationQuery) Clone() *StationQuery { withMorningNextStation: sq.withMorningNextStation.Clone(), withEveningPreviousStation: sq.withEveningPreviousStation.Clone(), withEveningNextStation: sq.withEveningNextStation.Clone(), + withDestinationForBuses: sq.withDestinationForBuses.Clone(), + withMorningFirstForBuses: sq.withMorningFirstForBuses.Clone(), + withEveningFirstForBuses: sq.withEveningFirstForBuses.Clone(), // clone intermediate query. sql: sq.sql.Clone(), path: sq.path, @@ -470,6 +542,39 @@ func (sq *StationQuery) WithEveningNextStation(opts ...func(*StationQuery)) *Sta return sq } +// WithDestinationForBuses tells the query-builder to eager-load the nodes that are connected to +// the "destination_for_buses" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithDestinationForBuses(opts ...func(*BusQuery)) *StationQuery { + query := (&BusClient{config: sq.config}).Query() + for _, opt := range opts { + opt(query) + } + sq.withDestinationForBuses = query + return sq +} + +// WithMorningFirstForBuses tells the query-builder to eager-load the nodes that are connected to +// the "morning_first_for_buses" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithMorningFirstForBuses(opts ...func(*BusQuery)) *StationQuery { + query := (&BusClient{config: sq.config}).Query() + for _, opt := range opts { + opt(query) + } + sq.withMorningFirstForBuses = query + return sq +} + +// WithEveningFirstForBuses tells the query-builder to eager-load the nodes that are connected to +// the "evening_first_for_buses" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithEveningFirstForBuses(opts ...func(*BusQuery)) *StationQuery { + query := (&BusClient{config: sq.config}).Query() + for _, opt := range opts { + opt(query) + } + sq.withEveningFirstForBuses = query + return sq +} + // GroupBy is used to group vertices by one or more fields/columns. // It is often used with aggregate functions, like: count, max, mean, min, sum. // @@ -549,13 +654,16 @@ func (sq *StationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Stat nodes = []*Station{} withFKs = sq.withFKs _spec = sq.querySpec() - loadedTypes = [6]bool{ + loadedTypes = [9]bool{ sq.withGuardian != nil, sq.withBus != nil, sq.withMorningPreviousStation != nil, sq.withMorningNextStation != nil, sq.withEveningPreviousStation != nil, sq.withEveningNextStation != nil, + sq.withDestinationForBuses != nil, + sq.withMorningFirstForBuses != nil, + sq.withEveningFirstForBuses != nil, } ) if sq.withGuardian != nil || sq.withMorningPreviousStation != nil || sq.withEveningPreviousStation != nil { @@ -621,6 +729,27 @@ func (sq *StationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Stat return nil, err } } + if query := sq.withDestinationForBuses; query != nil { + if err := sq.loadDestinationForBuses(ctx, query, nodes, + func(n *Station) { n.Edges.DestinationForBuses = []*Bus{} }, + func(n *Station, e *Bus) { n.Edges.DestinationForBuses = append(n.Edges.DestinationForBuses, e) }); err != nil { + return nil, err + } + } + if query := sq.withMorningFirstForBuses; query != nil { + if err := sq.loadMorningFirstForBuses(ctx, query, nodes, + func(n *Station) { n.Edges.MorningFirstForBuses = []*Bus{} }, + func(n *Station, e *Bus) { n.Edges.MorningFirstForBuses = append(n.Edges.MorningFirstForBuses, e) }); err != nil { + return nil, err + } + } + if query := sq.withEveningFirstForBuses; query != nil { + if err := sq.loadEveningFirstForBuses(ctx, query, nodes, + func(n *Station) { n.Edges.EveningFirstForBuses = []*Bus{} }, + func(n *Station, e *Bus) { n.Edges.EveningFirstForBuses = append(n.Edges.EveningFirstForBuses, e) }); err != nil { + return nil, err + } + } return nodes, nil } @@ -843,6 +972,99 @@ func (sq *StationQuery) loadEveningNextStation(ctx context.Context, query *Stati } return nil } +func (sq *StationQuery) loadDestinationForBuses(ctx context.Context, query *BusQuery, nodes []*Station, init func(*Station), assign func(*Station, *Bus)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Station) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Bus(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(station.DestinationForBusesColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.bus_destination_station + if fk == nil { + return fmt.Errorf(`foreign-key "bus_destination_station" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "bus_destination_station" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} +func (sq *StationQuery) loadMorningFirstForBuses(ctx context.Context, query *BusQuery, nodes []*Station, init func(*Station), assign func(*Station, *Bus)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Station) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Bus(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(station.MorningFirstForBusesColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.bus_morning_first_station + if fk == nil { + return fmt.Errorf(`foreign-key "bus_morning_first_station" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "bus_morning_first_station" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} +func (sq *StationQuery) loadEveningFirstForBuses(ctx context.Context, query *BusQuery, nodes []*Station, init func(*Station), assign func(*Station, *Bus)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*Station) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Bus(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(station.EveningFirstForBusesColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.bus_evening_first_station + if fk == nil { + return fmt.Errorf(`foreign-key "bus_evening_first_station" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "bus_evening_first_station" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} func (sq *StationQuery) sqlCount(ctx context.Context) (int, error) { _spec := sq.querySpec() diff --git a/backend/domain/repository/ent/station_update.go b/backend/domain/repository/ent/station_update.go index 71db6690..61b45ab6 100644 --- a/backend/domain/repository/ent/station_update.go +++ b/backend/domain/repository/ent/station_update.go @@ -207,6 +207,51 @@ func (su *StationUpdate) AddEveningNextStation(s ...*Station) *StationUpdate { return su.AddEveningNextStationIDs(ids...) } +// AddDestinationForBusIDs adds the "destination_for_buses" edge to the Bus entity by IDs. +func (su *StationUpdate) AddDestinationForBusIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.AddDestinationForBusIDs(ids...) + return su +} + +// AddDestinationForBuses adds the "destination_for_buses" edges to the Bus entity. +func (su *StationUpdate) AddDestinationForBuses(b ...*Bus) *StationUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return su.AddDestinationForBusIDs(ids...) +} + +// AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by IDs. +func (su *StationUpdate) AddMorningFirstForBusIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.AddMorningFirstForBusIDs(ids...) + return su +} + +// AddMorningFirstForBuses adds the "morning_first_for_buses" edges to the Bus entity. +func (su *StationUpdate) AddMorningFirstForBuses(b ...*Bus) *StationUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return su.AddMorningFirstForBusIDs(ids...) +} + +// AddEveningFirstForBusIDs adds the "evening_first_for_buses" edge to the Bus entity by IDs. +func (su *StationUpdate) AddEveningFirstForBusIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.AddEveningFirstForBusIDs(ids...) + return su +} + +// AddEveningFirstForBuses adds the "evening_first_for_buses" edges to the Bus entity. +func (su *StationUpdate) AddEveningFirstForBuses(b ...*Bus) *StationUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return su.AddEveningFirstForBusIDs(ids...) +} + // Mutation returns the StationMutation object of the builder. func (su *StationUpdate) Mutation() *StationMutation { return su.mutation @@ -293,6 +338,69 @@ func (su *StationUpdate) RemoveEveningNextStation(s ...*Station) *StationUpdate return su.RemoveEveningNextStationIDs(ids...) } +// ClearDestinationForBuses clears all "destination_for_buses" edges to the Bus entity. +func (su *StationUpdate) ClearDestinationForBuses() *StationUpdate { + su.mutation.ClearDestinationForBuses() + return su +} + +// RemoveDestinationForBusIDs removes the "destination_for_buses" edge to Bus entities by IDs. +func (su *StationUpdate) RemoveDestinationForBusIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.RemoveDestinationForBusIDs(ids...) + return su +} + +// RemoveDestinationForBuses removes "destination_for_buses" edges to Bus entities. +func (su *StationUpdate) RemoveDestinationForBuses(b ...*Bus) *StationUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return su.RemoveDestinationForBusIDs(ids...) +} + +// ClearMorningFirstForBuses clears all "morning_first_for_buses" edges to the Bus entity. +func (su *StationUpdate) ClearMorningFirstForBuses() *StationUpdate { + su.mutation.ClearMorningFirstForBuses() + return su +} + +// RemoveMorningFirstForBusIDs removes the "morning_first_for_buses" edge to Bus entities by IDs. +func (su *StationUpdate) RemoveMorningFirstForBusIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.RemoveMorningFirstForBusIDs(ids...) + return su +} + +// RemoveMorningFirstForBuses removes "morning_first_for_buses" edges to Bus entities. +func (su *StationUpdate) RemoveMorningFirstForBuses(b ...*Bus) *StationUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return su.RemoveMorningFirstForBusIDs(ids...) +} + +// ClearEveningFirstForBuses clears all "evening_first_for_buses" edges to the Bus entity. +func (su *StationUpdate) ClearEveningFirstForBuses() *StationUpdate { + su.mutation.ClearEveningFirstForBuses() + return su +} + +// RemoveEveningFirstForBusIDs removes the "evening_first_for_buses" edge to Bus entities by IDs. +func (su *StationUpdate) RemoveEveningFirstForBusIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.RemoveEveningFirstForBusIDs(ids...) + return su +} + +// RemoveEveningFirstForBuses removes "evening_first_for_buses" edges to Bus entities. +func (su *StationUpdate) RemoveEveningFirstForBuses(b ...*Bus) *StationUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return su.RemoveEveningFirstForBusIDs(ids...) +} + // Save executes the query and returns the number of nodes affected by the update operation. func (su *StationUpdate) Save(ctx context.Context) (int, error) { su.defaults() @@ -584,6 +692,141 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if su.mutation.DestinationForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.DestinationForBusesTable, + Columns: []string{station.DestinationForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.RemovedDestinationForBusesIDs(); len(nodes) > 0 && !su.mutation.DestinationForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.DestinationForBusesTable, + Columns: []string{station.DestinationForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.DestinationForBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.DestinationForBusesTable, + Columns: []string{station.DestinationForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if su.mutation.MorningFirstForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.MorningFirstForBusesTable, + Columns: []string{station.MorningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.RemovedMorningFirstForBusesIDs(); len(nodes) > 0 && !su.mutation.MorningFirstForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.MorningFirstForBusesTable, + Columns: []string{station.MorningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.MorningFirstForBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.MorningFirstForBusesTable, + Columns: []string{station.MorningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if su.mutation.EveningFirstForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.EveningFirstForBusesTable, + Columns: []string{station.EveningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.RemovedEveningFirstForBusesIDs(); len(nodes) > 0 && !su.mutation.EveningFirstForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.EveningFirstForBusesTable, + Columns: []string{station.EveningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := su.mutation.EveningFirstForBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.EveningFirstForBusesTable, + Columns: []string{station.EveningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } if n, err = sqlgraph.UpdateNodes(ctx, su.driver, _spec); err != nil { if _, ok := err.(*sqlgraph.NotFoundError); ok { err = &NotFoundError{station.Label} @@ -780,6 +1023,51 @@ func (suo *StationUpdateOne) AddEveningNextStation(s ...*Station) *StationUpdate return suo.AddEveningNextStationIDs(ids...) } +// AddDestinationForBusIDs adds the "destination_for_buses" edge to the Bus entity by IDs. +func (suo *StationUpdateOne) AddDestinationForBusIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.AddDestinationForBusIDs(ids...) + return suo +} + +// AddDestinationForBuses adds the "destination_for_buses" edges to the Bus entity. +func (suo *StationUpdateOne) AddDestinationForBuses(b ...*Bus) *StationUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return suo.AddDestinationForBusIDs(ids...) +} + +// AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by IDs. +func (suo *StationUpdateOne) AddMorningFirstForBusIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.AddMorningFirstForBusIDs(ids...) + return suo +} + +// AddMorningFirstForBuses adds the "morning_first_for_buses" edges to the Bus entity. +func (suo *StationUpdateOne) AddMorningFirstForBuses(b ...*Bus) *StationUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return suo.AddMorningFirstForBusIDs(ids...) +} + +// AddEveningFirstForBusIDs adds the "evening_first_for_buses" edge to the Bus entity by IDs. +func (suo *StationUpdateOne) AddEveningFirstForBusIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.AddEveningFirstForBusIDs(ids...) + return suo +} + +// AddEveningFirstForBuses adds the "evening_first_for_buses" edges to the Bus entity. +func (suo *StationUpdateOne) AddEveningFirstForBuses(b ...*Bus) *StationUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return suo.AddEveningFirstForBusIDs(ids...) +} + // Mutation returns the StationMutation object of the builder. func (suo *StationUpdateOne) Mutation() *StationMutation { return suo.mutation @@ -866,6 +1154,69 @@ func (suo *StationUpdateOne) RemoveEveningNextStation(s ...*Station) *StationUpd return suo.RemoveEveningNextStationIDs(ids...) } +// ClearDestinationForBuses clears all "destination_for_buses" edges to the Bus entity. +func (suo *StationUpdateOne) ClearDestinationForBuses() *StationUpdateOne { + suo.mutation.ClearDestinationForBuses() + return suo +} + +// RemoveDestinationForBusIDs removes the "destination_for_buses" edge to Bus entities by IDs. +func (suo *StationUpdateOne) RemoveDestinationForBusIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.RemoveDestinationForBusIDs(ids...) + return suo +} + +// RemoveDestinationForBuses removes "destination_for_buses" edges to Bus entities. +func (suo *StationUpdateOne) RemoveDestinationForBuses(b ...*Bus) *StationUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return suo.RemoveDestinationForBusIDs(ids...) +} + +// ClearMorningFirstForBuses clears all "morning_first_for_buses" edges to the Bus entity. +func (suo *StationUpdateOne) ClearMorningFirstForBuses() *StationUpdateOne { + suo.mutation.ClearMorningFirstForBuses() + return suo +} + +// RemoveMorningFirstForBusIDs removes the "morning_first_for_buses" edge to Bus entities by IDs. +func (suo *StationUpdateOne) RemoveMorningFirstForBusIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.RemoveMorningFirstForBusIDs(ids...) + return suo +} + +// RemoveMorningFirstForBuses removes "morning_first_for_buses" edges to Bus entities. +func (suo *StationUpdateOne) RemoveMorningFirstForBuses(b ...*Bus) *StationUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return suo.RemoveMorningFirstForBusIDs(ids...) +} + +// ClearEveningFirstForBuses clears all "evening_first_for_buses" edges to the Bus entity. +func (suo *StationUpdateOne) ClearEveningFirstForBuses() *StationUpdateOne { + suo.mutation.ClearEveningFirstForBuses() + return suo +} + +// RemoveEveningFirstForBusIDs removes the "evening_first_for_buses" edge to Bus entities by IDs. +func (suo *StationUpdateOne) RemoveEveningFirstForBusIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.RemoveEveningFirstForBusIDs(ids...) + return suo +} + +// RemoveEveningFirstForBuses removes "evening_first_for_buses" edges to Bus entities. +func (suo *StationUpdateOne) RemoveEveningFirstForBuses(b ...*Bus) *StationUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return suo.RemoveEveningFirstForBusIDs(ids...) +} + // Where appends a list predicates to the StationUpdate builder. func (suo *StationUpdateOne) Where(ps ...predicate.Station) *StationUpdateOne { suo.mutation.Where(ps...) @@ -1187,6 +1538,141 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if suo.mutation.DestinationForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.DestinationForBusesTable, + Columns: []string{station.DestinationForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.RemovedDestinationForBusesIDs(); len(nodes) > 0 && !suo.mutation.DestinationForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.DestinationForBusesTable, + Columns: []string{station.DestinationForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.DestinationForBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.DestinationForBusesTable, + Columns: []string{station.DestinationForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if suo.mutation.MorningFirstForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.MorningFirstForBusesTable, + Columns: []string{station.MorningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.RemovedMorningFirstForBusesIDs(); len(nodes) > 0 && !suo.mutation.MorningFirstForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.MorningFirstForBusesTable, + Columns: []string{station.MorningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.MorningFirstForBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.MorningFirstForBusesTable, + Columns: []string{station.MorningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if suo.mutation.EveningFirstForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.EveningFirstForBusesTable, + Columns: []string{station.EveningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.RemovedEveningFirstForBusesIDs(); len(nodes) > 0 && !suo.mutation.EveningFirstForBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.EveningFirstForBusesTable, + Columns: []string{station.EveningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := suo.mutation.EveningFirstForBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: station.EveningFirstForBusesTable, + Columns: []string{station.EveningFirstForBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } _node = &Station{config: suo.config} _spec.Assign = _node.assignValues _spec.ScanValues = _node.scanValues From 45753b811e6fd6821591eaa297acbed664352a6c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Wed, 21 Feb 2024 07:38:26 +0900 Subject: [PATCH 623/771] =?UTF-8?q?refactor:=E9=96=A2=E6=95=B0=E5=90=8D?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/map_page/map_page.dart | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 36814196..33bbe3a6 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -6,14 +6,12 @@ import 'package:http/http.dart' as http; import 'dart:convert'; import 'package:where_child_bus_guardian/components/utils/google_map_view.dart'; import 'package:where_child_bus_guardian/pages/map_page/components/map_page_bottom.dart'; -import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; import 'package:where_child_bus_guardian/service/get_running_bus_by_guardian_id.dart'; import 'package:where_child_bus_guardian/service/get_station_list_by_bus_id.dart'; import 'package:where_child_bus_guardian/service/get_nursery_by_guardian_id.dart'; import 'package:where_child_bus_guardian/util/guardian_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; -import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; class Waypoint { final double latitude; @@ -65,17 +63,11 @@ class _MapPageState extends State { try { await _loadBusData(); - developer.log('バスデータの読み込み'); await _loadStationsData(); - developer.log('停留所リストデータの読み込み'); - await _loadWaypointData(); - developer.log('経由地データの読み込み'); + await _createWayPointsFromStations(); await _loadNurseryData(); - developer.log('保育園データの読み込み'); - await _getCoordinates(); - developer.log('座標の取得'); + await _getNurseryCoordinates(); _loadBusLocation(); - developer.log('バスの位置情報の読み込み'); } catch (e) { developer.log('初期化中にエラーが発生しました: $e'); } finally { @@ -101,11 +93,9 @@ class _MapPageState extends State { Future _loadBusData() async { try { var busRes = await getRunningBusByGuardianIdService(guardian.id); - developer.log("$mounted"); if (mounted) { setState(() { bus = busRes.bus; - developer.log("bus: $bus"); }); } } catch (error) { @@ -116,7 +106,6 @@ class _MapPageState extends State { Future _loadStationsData() async { try { developer.log('停留所リストの読み込み開始'); - developer.log(bus.id); var stationsRes = await getStationListByBusIdService(bus.id); if (mounted) { setState(() { @@ -128,15 +117,16 @@ class _MapPageState extends State { } } - Future _loadWaypointData() async { + Future _createWayPointsFromStations() async { try { + developer.log("Waypointsの作成開始", name: "CreateWaypointsFromStations"); if (mounted) { - stations.forEach((station) { + for (var station in stations) { waypoints.add(Waypoint( latitude: station.latitude, longitude: station.longitude, name: station.id.toString())); - }); + } } } catch (error) { developer.log('経由地の読み込みに失敗しました: $error'); @@ -145,13 +135,12 @@ class _MapPageState extends State { Future _loadNurseryData() async { try { + developer.log("保育園の読み込み開始", name: "LoadNurseryData"); var nurseryRes = await getNurseryByGuardianIdService(guardian.id); - developer.log(nurseryRes.nurseries.address); if (mounted) { setState(() { nursery = nurseryRes.nurseries; nurseryAddress = nursery.address; - developer.log("nurseryAddressを初期化"); }); } } catch (error) { @@ -159,7 +148,7 @@ class _MapPageState extends State { } } - Future _getCoordinates() async { + Future _getNurseryCoordinates() async { try { dynamic response; developer.log("住所から緯度経度への変換${nurseryAddress}"); @@ -167,7 +156,6 @@ class _MapPageState extends State { 'https://maps.googleapis.com/maps/api/geocode/json?address=$nurseryAddress&key=$googleApiKey')); if (mounted) { setState(() { - developer.log("$response"); final data = json.decode(response.body); developer.log(response.body); final location = data['results'][0]['geometry']['location']; From 31043a66d767f4493a33d8d5e58b1cb1d0ceed3c Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 08:15:15 +0900 Subject: [PATCH 624/771] =?UTF-8?q?refactor:=20=E3=82=A8=E3=83=83=E3=82=B8?= =?UTF-8?q?=E5=90=8D=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/bus.go | 30 ++-- backend/domain/repository/ent/bus/bus.go | 30 ++-- backend/domain/repository/ent/bus/where.go | 12 +- backend/domain/repository/ent/bus_create.go | 26 +-- backend/domain/repository/ent/bus_query.go | 36 ++-- backend/domain/repository/ent/bus_update.go | 72 ++++---- backend/domain/repository/ent/client.go | 12 +- .../domain/repository/ent/migrate/schema.go | 4 +- backend/domain/repository/ent/mutation.go | 164 +++++++++--------- backend/domain/repository/ent/schema/bus.go | 2 +- .../domain/repository/ent/schema/station.go | 4 +- backend/domain/repository/ent/station.go | 18 +- .../domain/repository/ent/station/station.go | 34 ++-- .../domain/repository/ent/station/where.go | 12 +- .../domain/repository/ent/station_create.go | 18 +- .../domain/repository/ent/station_query.go | 38 ++-- .../domain/repository/ent/station_update.go | 96 +++++----- 17 files changed, 304 insertions(+), 304 deletions(-) diff --git a/backend/domain/repository/ent/bus.go b/backend/domain/repository/ent/bus.go index 6b2fac07..aeb8aef9 100644 --- a/backend/domain/repository/ent/bus.go +++ b/backend/domain/repository/ent/bus.go @@ -40,7 +40,7 @@ type Bus struct { // The values are being populated by the BusQuery when eager-loading is set. Edges BusEdges `json:"edges"` bus_nursery *uuid.UUID - bus_destination_station *uuid.UUID + bus_next_station *uuid.UUID bus_morning_first_station *uuid.UUID bus_evening_first_station *uuid.UUID selectValues sql.SelectValues @@ -56,8 +56,8 @@ type BusEdges struct { BoardingRecords []*BoardingRecord `json:"boarding_records,omitempty"` // ChildBusAssociations holds the value of the childBusAssociations edge. ChildBusAssociations []*ChildBusAssociation `json:"childBusAssociations,omitempty"` - // DestinationStation holds the value of the destination_station edge. - DestinationStation *Station `json:"destination_station,omitempty"` + // NextStation holds the value of the next_station edge. + NextStation *Station `json:"next_station,omitempty"` // MorningFirstStation holds the value of the morning_first_station edge. MorningFirstStation *Station `json:"morning_first_station,omitempty"` // EveningFirstStation holds the value of the evening_first_station edge. @@ -107,17 +107,17 @@ func (e BusEdges) ChildBusAssociationsOrErr() ([]*ChildBusAssociation, error) { return nil, &NotLoadedError{edge: "childBusAssociations"} } -// DestinationStationOrErr returns the DestinationStation value or an error if the edge +// NextStationOrErr returns the NextStation value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e BusEdges) DestinationStationOrErr() (*Station, error) { +func (e BusEdges) NextStationOrErr() (*Station, error) { if e.loadedTypes[4] { - if e.DestinationStation == nil { + if e.NextStation == nil { // Edge was loaded but was not found. return nil, &NotFoundError{label: station.Label} } - return e.DestinationStation, nil + return e.NextStation, nil } - return nil, &NotLoadedError{edge: "destination_station"} + return nil, &NotLoadedError{edge: "next_station"} } // MorningFirstStationOrErr returns the MorningFirstStation value or an error if the edge @@ -163,7 +163,7 @@ func (*Bus) scanValues(columns []string) ([]any, error) { values[i] = new(uuid.UUID) case bus.ForeignKeys[0]: // bus_nursery values[i] = &sql.NullScanner{S: new(uuid.UUID)} - case bus.ForeignKeys[1]: // bus_destination_station + case bus.ForeignKeys[1]: // bus_next_station values[i] = &sql.NullScanner{S: new(uuid.UUID)} case bus.ForeignKeys[2]: // bus_morning_first_station values[i] = &sql.NullScanner{S: new(uuid.UUID)} @@ -247,10 +247,10 @@ func (b *Bus) assignValues(columns []string, values []any) error { } case bus.ForeignKeys[1]: if value, ok := values[i].(*sql.NullScanner); !ok { - return fmt.Errorf("unexpected type %T for field bus_destination_station", values[i]) + return fmt.Errorf("unexpected type %T for field bus_next_station", values[i]) } else if value.Valid { - b.bus_destination_station = new(uuid.UUID) - *b.bus_destination_station = *value.S.(*uuid.UUID) + b.bus_next_station = new(uuid.UUID) + *b.bus_next_station = *value.S.(*uuid.UUID) } case bus.ForeignKeys[2]: if value, ok := values[i].(*sql.NullScanner); !ok { @@ -299,9 +299,9 @@ func (b *Bus) QueryChildBusAssociations() *ChildBusAssociationQuery { return NewBusClient(b.config).QueryChildBusAssociations(b) } -// QueryDestinationStation queries the "destination_station" edge of the Bus entity. -func (b *Bus) QueryDestinationStation() *StationQuery { - return NewBusClient(b.config).QueryDestinationStation(b) +// QueryNextStation queries the "next_station" edge of the Bus entity. +func (b *Bus) QueryNextStation() *StationQuery { + return NewBusClient(b.config).QueryNextStation(b) } // QueryMorningFirstStation queries the "morning_first_station" edge of the Bus entity. diff --git a/backend/domain/repository/ent/bus/bus.go b/backend/domain/repository/ent/bus/bus.go index 258f6b2d..65b3c79e 100644 --- a/backend/domain/repository/ent/bus/bus.go +++ b/backend/domain/repository/ent/bus/bus.go @@ -40,8 +40,8 @@ const ( EdgeBoardingRecords = "boarding_records" // EdgeChildBusAssociations holds the string denoting the childbusassociations edge name in mutations. EdgeChildBusAssociations = "childBusAssociations" - // EdgeDestinationStation holds the string denoting the destination_station edge name in mutations. - EdgeDestinationStation = "destination_station" + // EdgeNextStation holds the string denoting the next_station edge name in mutations. + EdgeNextStation = "next_station" // EdgeMorningFirstStation holds the string denoting the morning_first_station edge name in mutations. EdgeMorningFirstStation = "morning_first_station" // EdgeEveningFirstStation holds the string denoting the evening_first_station edge name in mutations. @@ -74,13 +74,13 @@ const ( ChildBusAssociationsInverseTable = "child_bus_associations" // ChildBusAssociationsColumn is the table column denoting the childBusAssociations relation/edge. ChildBusAssociationsColumn = "bus_id" - // DestinationStationTable is the table that holds the destination_station relation/edge. - DestinationStationTable = "bus" - // DestinationStationInverseTable is the table name for the Station entity. + // NextStationTable is the table that holds the next_station relation/edge. + NextStationTable = "bus" + // NextStationInverseTable is the table name for the Station entity. // It exists in this package in order to avoid circular dependency with the "station" package. - DestinationStationInverseTable = "stations" - // DestinationStationColumn is the table column denoting the destination_station relation/edge. - DestinationStationColumn = "bus_destination_station" + NextStationInverseTable = "stations" + // NextStationColumn is the table column denoting the next_station relation/edge. + NextStationColumn = "bus_next_station" // MorningFirstStationTable is the table that holds the morning_first_station relation/edge. MorningFirstStationTable = "bus" // MorningFirstStationInverseTable is the table name for the Station entity. @@ -114,7 +114,7 @@ var Columns = []string{ // table and are not defined as standalone fields in the schema. var ForeignKeys = []string{ "bus_nursery", - "bus_destination_station", + "bus_next_station", "bus_morning_first_station", "bus_evening_first_station", } @@ -277,10 +277,10 @@ func ByChildBusAssociations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOpt } } -// ByDestinationStationField orders the results by destination_station field. -func ByDestinationStationField(field string, opts ...sql.OrderTermOption) OrderOption { +// ByNextStationField orders the results by next_station field. +func ByNextStationField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newDestinationStationStep(), sql.OrderByField(field, opts...)) + sqlgraph.OrderByNeighborTerms(s, newNextStationStep(), sql.OrderByField(field, opts...)) } } @@ -325,11 +325,11 @@ func newChildBusAssociationsStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), ) } -func newDestinationStationStep() *sqlgraph.Step { +func newNextStationStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(DestinationStationInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, DestinationStationTable, DestinationStationColumn), + sqlgraph.To(NextStationInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, NextStationTable, NextStationColumn), ) } func newMorningFirstStationStep() *sqlgraph.Step { diff --git a/backend/domain/repository/ent/bus/where.go b/backend/domain/repository/ent/bus/where.go index b61a83c4..c9da720e 100644 --- a/backend/domain/repository/ent/bus/where.go +++ b/backend/domain/repository/ent/bus/where.go @@ -533,21 +533,21 @@ func HasChildBusAssociationsWith(preds ...predicate.ChildBusAssociation) predica }) } -// HasDestinationStation applies the HasEdge predicate on the "destination_station" edge. -func HasDestinationStation() predicate.Bus { +// HasNextStation applies the HasEdge predicate on the "next_station" edge. +func HasNextStation() predicate.Bus { return predicate.Bus(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, DestinationStationTable, DestinationStationColumn), + sqlgraph.Edge(sqlgraph.M2O, false, NextStationTable, NextStationColumn), ) sqlgraph.HasNeighbors(s, step) }) } -// HasDestinationStationWith applies the HasEdge predicate on the "destination_station" edge with a given conditions (other predicates). -func HasDestinationStationWith(preds ...predicate.Station) predicate.Bus { +// HasNextStationWith applies the HasEdge predicate on the "next_station" edge with a given conditions (other predicates). +func HasNextStationWith(preds ...predicate.Station) predicate.Bus { return predicate.Bus(func(s *sql.Selector) { - step := newDestinationStationStep() + step := newNextStationStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) diff --git a/backend/domain/repository/ent/bus_create.go b/backend/domain/repository/ent/bus_create.go index 9e925306..04f005bc 100644 --- a/backend/domain/repository/ent/bus_create.go +++ b/backend/domain/repository/ent/bus_create.go @@ -207,23 +207,23 @@ func (bc *BusCreate) AddChildBusAssociations(c ...*ChildBusAssociation) *BusCrea return bc.AddChildBusAssociationIDs(ids...) } -// SetDestinationStationID sets the "destination_station" edge to the Station entity by ID. -func (bc *BusCreate) SetDestinationStationID(id uuid.UUID) *BusCreate { - bc.mutation.SetDestinationStationID(id) +// SetNextStationID sets the "next_station" edge to the Station entity by ID. +func (bc *BusCreate) SetNextStationID(id uuid.UUID) *BusCreate { + bc.mutation.SetNextStationID(id) return bc } -// SetNillableDestinationStationID sets the "destination_station" edge to the Station entity by ID if the given value is not nil. -func (bc *BusCreate) SetNillableDestinationStationID(id *uuid.UUID) *BusCreate { +// SetNillableNextStationID sets the "next_station" edge to the Station entity by ID if the given value is not nil. +func (bc *BusCreate) SetNillableNextStationID(id *uuid.UUID) *BusCreate { if id != nil { - bc = bc.SetDestinationStationID(*id) + bc = bc.SetNextStationID(*id) } return bc } -// SetDestinationStation sets the "destination_station" edge to the Station entity. -func (bc *BusCreate) SetDestinationStation(s *Station) *BusCreate { - return bc.SetDestinationStationID(s.ID) +// SetNextStation sets the "next_station" edge to the Station entity. +func (bc *BusCreate) SetNextStation(s *Station) *BusCreate { + return bc.SetNextStationID(s.ID) } // SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID. @@ -475,12 +475,12 @@ func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } - if nodes := bc.mutation.DestinationStationIDs(); len(nodes) > 0 { + if nodes := bc.mutation.NextStationIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, Inverse: false, - Table: bus.DestinationStationTable, - Columns: []string{bus.DestinationStationColumn}, + Table: bus.NextStationTable, + Columns: []string{bus.NextStationColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), @@ -489,7 +489,7 @@ func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { for _, k := range nodes { edge.Target.Nodes = append(edge.Target.Nodes, k) } - _node.bus_destination_station = &nodes[0] + _node.bus_next_station = &nodes[0] _spec.Edges = append(_spec.Edges, edge) } if nodes := bc.mutation.MorningFirstStationIDs(); len(nodes) > 0 { diff --git a/backend/domain/repository/ent/bus_query.go b/backend/domain/repository/ent/bus_query.go index a532f69f..a4709550 100644 --- a/backend/domain/repository/ent/bus_query.go +++ b/backend/domain/repository/ent/bus_query.go @@ -31,7 +31,7 @@ type BusQuery struct { withStations *StationQuery withBoardingRecords *BoardingRecordQuery withChildBusAssociations *ChildBusAssociationQuery - withDestinationStation *StationQuery + withNextStation *StationQuery withMorningFirstStation *StationQuery withEveningFirstStation *StationQuery withFKs bool @@ -159,8 +159,8 @@ func (bq *BusQuery) QueryChildBusAssociations() *ChildBusAssociationQuery { return query } -// QueryDestinationStation chains the current query on the "destination_station" edge. -func (bq *BusQuery) QueryDestinationStation() *StationQuery { +// QueryNextStation chains the current query on the "next_station" edge. +func (bq *BusQuery) QueryNextStation() *StationQuery { query := (&StationClient{config: bq.config}).Query() query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { if err := bq.prepareQuery(ctx); err != nil { @@ -173,7 +173,7 @@ func (bq *BusQuery) QueryDestinationStation() *StationQuery { step := sqlgraph.NewStep( sqlgraph.From(bus.Table, bus.FieldID, selector), sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, bus.DestinationStationTable, bus.DestinationStationColumn), + sqlgraph.Edge(sqlgraph.M2O, false, bus.NextStationTable, bus.NextStationColumn), ) fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) return fromU, nil @@ -421,7 +421,7 @@ func (bq *BusQuery) Clone() *BusQuery { withStations: bq.withStations.Clone(), withBoardingRecords: bq.withBoardingRecords.Clone(), withChildBusAssociations: bq.withChildBusAssociations.Clone(), - withDestinationStation: bq.withDestinationStation.Clone(), + withNextStation: bq.withNextStation.Clone(), withMorningFirstStation: bq.withMorningFirstStation.Clone(), withEveningFirstStation: bq.withEveningFirstStation.Clone(), // clone intermediate query. @@ -474,14 +474,14 @@ func (bq *BusQuery) WithChildBusAssociations(opts ...func(*ChildBusAssociationQu return bq } -// WithDestinationStation tells the query-builder to eager-load the nodes that are connected to -// the "destination_station" edge. The optional arguments are used to configure the query builder of the edge. -func (bq *BusQuery) WithDestinationStation(opts ...func(*StationQuery)) *BusQuery { +// WithNextStation tells the query-builder to eager-load the nodes that are connected to +// the "next_station" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithNextStation(opts ...func(*StationQuery)) *BusQuery { query := (&StationClient{config: bq.config}).Query() for _, opt := range opts { opt(query) } - bq.withDestinationStation = query + bq.withNextStation = query return bq } @@ -591,12 +591,12 @@ func (bq *BusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bus, err bq.withStations != nil, bq.withBoardingRecords != nil, bq.withChildBusAssociations != nil, - bq.withDestinationStation != nil, + bq.withNextStation != nil, bq.withMorningFirstStation != nil, bq.withEveningFirstStation != nil, } ) - if bq.withNursery != nil || bq.withDestinationStation != nil || bq.withMorningFirstStation != nil || bq.withEveningFirstStation != nil { + if bq.withNursery != nil || bq.withNextStation != nil || bq.withMorningFirstStation != nil || bq.withEveningFirstStation != nil { withFKs = true } if withFKs { @@ -649,9 +649,9 @@ func (bq *BusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bus, err return nil, err } } - if query := bq.withDestinationStation; query != nil { - if err := bq.loadDestinationStation(ctx, query, nodes, nil, - func(n *Bus, e *Station) { n.Edges.DestinationStation = e }); err != nil { + if query := bq.withNextStation; query != nil { + if err := bq.loadNextStation(ctx, query, nodes, nil, + func(n *Bus, e *Station) { n.Edges.NextStation = e }); err != nil { return nil, err } } @@ -824,14 +824,14 @@ func (bq *BusQuery) loadChildBusAssociations(ctx context.Context, query *ChildBu } return nil } -func (bq *BusQuery) loadDestinationStation(ctx context.Context, query *StationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Station)) error { +func (bq *BusQuery) loadNextStation(ctx context.Context, query *StationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Station)) error { ids := make([]uuid.UUID, 0, len(nodes)) nodeids := make(map[uuid.UUID][]*Bus) for i := range nodes { - if nodes[i].bus_destination_station == nil { + if nodes[i].bus_next_station == nil { continue } - fk := *nodes[i].bus_destination_station + fk := *nodes[i].bus_next_station if _, ok := nodeids[fk]; !ok { ids = append(ids, fk) } @@ -848,7 +848,7 @@ func (bq *BusQuery) loadDestinationStation(ctx context.Context, query *StationQu for _, n := range neighbors { nodes, ok := nodeids[n.ID] if !ok { - return fmt.Errorf(`unexpected foreign-key "bus_destination_station" returned %v`, n.ID) + return fmt.Errorf(`unexpected foreign-key "bus_next_station" returned %v`, n.ID) } for i := range nodes { assign(nodes[i], n) diff --git a/backend/domain/repository/ent/bus_update.go b/backend/domain/repository/ent/bus_update.go index 9a2229db..fb7b1ae8 100644 --- a/backend/domain/repository/ent/bus_update.go +++ b/backend/domain/repository/ent/bus_update.go @@ -233,23 +233,23 @@ func (bu *BusUpdate) AddChildBusAssociations(c ...*ChildBusAssociation) *BusUpda return bu.AddChildBusAssociationIDs(ids...) } -// SetDestinationStationID sets the "destination_station" edge to the Station entity by ID. -func (bu *BusUpdate) SetDestinationStationID(id uuid.UUID) *BusUpdate { - bu.mutation.SetDestinationStationID(id) +// SetNextStationID sets the "next_station" edge to the Station entity by ID. +func (bu *BusUpdate) SetNextStationID(id uuid.UUID) *BusUpdate { + bu.mutation.SetNextStationID(id) return bu } -// SetNillableDestinationStationID sets the "destination_station" edge to the Station entity by ID if the given value is not nil. -func (bu *BusUpdate) SetNillableDestinationStationID(id *uuid.UUID) *BusUpdate { +// SetNillableNextStationID sets the "next_station" edge to the Station entity by ID if the given value is not nil. +func (bu *BusUpdate) SetNillableNextStationID(id *uuid.UUID) *BusUpdate { if id != nil { - bu = bu.SetDestinationStationID(*id) + bu = bu.SetNextStationID(*id) } return bu } -// SetDestinationStation sets the "destination_station" edge to the Station entity. -func (bu *BusUpdate) SetDestinationStation(s *Station) *BusUpdate { - return bu.SetDestinationStationID(s.ID) +// SetNextStation sets the "next_station" edge to the Station entity. +func (bu *BusUpdate) SetNextStation(s *Station) *BusUpdate { + return bu.SetNextStationID(s.ID) } // SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID. @@ -364,9 +364,9 @@ func (bu *BusUpdate) RemoveChildBusAssociations(c ...*ChildBusAssociation) *BusU return bu.RemoveChildBusAssociationIDs(ids...) } -// ClearDestinationStation clears the "destination_station" edge to the Station entity. -func (bu *BusUpdate) ClearDestinationStation() *BusUpdate { - bu.mutation.ClearDestinationStation() +// ClearNextStation clears the "next_station" edge to the Station entity. +func (bu *BusUpdate) ClearNextStation() *BusUpdate { + bu.mutation.ClearNextStation() return bu } @@ -643,12 +643,12 @@ func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if bu.mutation.DestinationStationCleared() { + if bu.mutation.NextStationCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, Inverse: false, - Table: bus.DestinationStationTable, - Columns: []string{bus.DestinationStationColumn}, + Table: bus.NextStationTable, + Columns: []string{bus.NextStationColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), @@ -656,12 +656,12 @@ func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := bu.mutation.DestinationStationIDs(); len(nodes) > 0 { + if nodes := bu.mutation.NextStationIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, Inverse: false, - Table: bus.DestinationStationTable, - Columns: []string{bus.DestinationStationColumn}, + Table: bus.NextStationTable, + Columns: []string{bus.NextStationColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), @@ -950,23 +950,23 @@ func (buo *BusUpdateOne) AddChildBusAssociations(c ...*ChildBusAssociation) *Bus return buo.AddChildBusAssociationIDs(ids...) } -// SetDestinationStationID sets the "destination_station" edge to the Station entity by ID. -func (buo *BusUpdateOne) SetDestinationStationID(id uuid.UUID) *BusUpdateOne { - buo.mutation.SetDestinationStationID(id) +// SetNextStationID sets the "next_station" edge to the Station entity by ID. +func (buo *BusUpdateOne) SetNextStationID(id uuid.UUID) *BusUpdateOne { + buo.mutation.SetNextStationID(id) return buo } -// SetNillableDestinationStationID sets the "destination_station" edge to the Station entity by ID if the given value is not nil. -func (buo *BusUpdateOne) SetNillableDestinationStationID(id *uuid.UUID) *BusUpdateOne { +// SetNillableNextStationID sets the "next_station" edge to the Station entity by ID if the given value is not nil. +func (buo *BusUpdateOne) SetNillableNextStationID(id *uuid.UUID) *BusUpdateOne { if id != nil { - buo = buo.SetDestinationStationID(*id) + buo = buo.SetNextStationID(*id) } return buo } -// SetDestinationStation sets the "destination_station" edge to the Station entity. -func (buo *BusUpdateOne) SetDestinationStation(s *Station) *BusUpdateOne { - return buo.SetDestinationStationID(s.ID) +// SetNextStation sets the "next_station" edge to the Station entity. +func (buo *BusUpdateOne) SetNextStation(s *Station) *BusUpdateOne { + return buo.SetNextStationID(s.ID) } // SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID. @@ -1081,9 +1081,9 @@ func (buo *BusUpdateOne) RemoveChildBusAssociations(c ...*ChildBusAssociation) * return buo.RemoveChildBusAssociationIDs(ids...) } -// ClearDestinationStation clears the "destination_station" edge to the Station entity. -func (buo *BusUpdateOne) ClearDestinationStation() *BusUpdateOne { - buo.mutation.ClearDestinationStation() +// ClearNextStation clears the "next_station" edge to the Station entity. +func (buo *BusUpdateOne) ClearNextStation() *BusUpdateOne { + buo.mutation.ClearNextStation() return buo } @@ -1390,12 +1390,12 @@ func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if buo.mutation.DestinationStationCleared() { + if buo.mutation.NextStationCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, Inverse: false, - Table: bus.DestinationStationTable, - Columns: []string{bus.DestinationStationColumn}, + Table: bus.NextStationTable, + Columns: []string{bus.NextStationColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), @@ -1403,12 +1403,12 @@ func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := buo.mutation.DestinationStationIDs(); len(nodes) > 0 { + if nodes := buo.mutation.NextStationIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, Inverse: false, - Table: bus.DestinationStationTable, - Columns: []string{bus.DestinationStationColumn}, + Table: bus.NextStationTable, + Columns: []string{bus.NextStationColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), diff --git a/backend/domain/repository/ent/client.go b/backend/domain/repository/ent/client.go index d0fdb7db..4b44fc08 100644 --- a/backend/domain/repository/ent/client.go +++ b/backend/domain/repository/ent/client.go @@ -601,15 +601,15 @@ func (c *BusClient) QueryChildBusAssociations(b *Bus) *ChildBusAssociationQuery return query } -// QueryDestinationStation queries the destination_station edge of a Bus. -func (c *BusClient) QueryDestinationStation(b *Bus) *StationQuery { +// QueryNextStation queries the next_station edge of a Bus. +func (c *BusClient) QueryNextStation(b *Bus) *StationQuery { query := (&StationClient{config: c.config}).Query() query.path = func(context.Context) (fromV *sql.Selector, _ error) { id := b.ID step := sqlgraph.NewStep( sqlgraph.From(bus.Table, bus.FieldID, id), sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, bus.DestinationStationTable, bus.DestinationStationColumn), + sqlgraph.Edge(sqlgraph.M2O, false, bus.NextStationTable, bus.NextStationColumn), ) fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) return fromV, nil @@ -1735,15 +1735,15 @@ func (c *StationClient) QueryEveningNextStation(s *Station) *StationQuery { return query } -// QueryDestinationForBuses queries the destination_for_buses edge of a Station. -func (c *StationClient) QueryDestinationForBuses(s *Station) *BusQuery { +// QueryNextForBuses queries the next_for_buses edge of a Station. +func (c *StationClient) QueryNextForBuses(s *Station) *BusQuery { query := (&BusClient{config: c.config}).Query() query.path = func(context.Context) (fromV *sql.Selector, _ error) { id := s.ID step := sqlgraph.NewStep( sqlgraph.From(station.Table, station.FieldID, id), sqlgraph.To(bus.Table, bus.FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, station.DestinationForBusesTable, station.DestinationForBusesColumn), + sqlgraph.Edge(sqlgraph.O2M, true, station.NextForBusesTable, station.NextForBusesColumn), ) fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) return fromV, nil diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 7e065b33..7f1a17da 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -48,7 +48,7 @@ var ( {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "bus_nursery", Type: field.TypeUUID, Nullable: true}, - {Name: "bus_destination_station", Type: field.TypeUUID, Nullable: true}, + {Name: "bus_next_station", Type: field.TypeUUID, Nullable: true}, {Name: "bus_morning_first_station", Type: field.TypeUUID, Nullable: true}, {Name: "bus_evening_first_station", Type: field.TypeUUID, Nullable: true}, } @@ -65,7 +65,7 @@ var ( OnDelete: schema.SetNull, }, { - Symbol: "bus_stations_destination_station", + Symbol: "bus_stations_next_station", Columns: []*schema.Column{BusColumns[10]}, RefColumns: []*schema.Column{StationsColumns[0]}, OnDelete: schema.SetNull, diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index d8885fda..84fa0f38 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -582,8 +582,8 @@ type BusMutation struct { childBusAssociations map[int]struct{} removedchildBusAssociations map[int]struct{} clearedchildBusAssociations bool - destination_station *uuid.UUID - cleareddestination_station bool + next_station *uuid.UUID + clearednext_station bool morning_first_station *uuid.UUID clearedmorning_first_station bool evening_first_station *uuid.UUID @@ -1267,43 +1267,43 @@ func (m *BusMutation) ResetChildBusAssociations() { m.removedchildBusAssociations = nil } -// SetDestinationStationID sets the "destination_station" edge to the Station entity by id. -func (m *BusMutation) SetDestinationStationID(id uuid.UUID) { - m.destination_station = &id +// SetNextStationID sets the "next_station" edge to the Station entity by id. +func (m *BusMutation) SetNextStationID(id uuid.UUID) { + m.next_station = &id } -// ClearDestinationStation clears the "destination_station" edge to the Station entity. -func (m *BusMutation) ClearDestinationStation() { - m.cleareddestination_station = true +// ClearNextStation clears the "next_station" edge to the Station entity. +func (m *BusMutation) ClearNextStation() { + m.clearednext_station = true } -// DestinationStationCleared reports if the "destination_station" edge to the Station entity was cleared. -func (m *BusMutation) DestinationStationCleared() bool { - return m.cleareddestination_station +// NextStationCleared reports if the "next_station" edge to the Station entity was cleared. +func (m *BusMutation) NextStationCleared() bool { + return m.clearednext_station } -// DestinationStationID returns the "destination_station" edge ID in the mutation. -func (m *BusMutation) DestinationStationID() (id uuid.UUID, exists bool) { - if m.destination_station != nil { - return *m.destination_station, true +// NextStationID returns the "next_station" edge ID in the mutation. +func (m *BusMutation) NextStationID() (id uuid.UUID, exists bool) { + if m.next_station != nil { + return *m.next_station, true } return } -// DestinationStationIDs returns the "destination_station" edge IDs in the mutation. +// NextStationIDs returns the "next_station" edge IDs in the mutation. // Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use -// DestinationStationID instead. It exists only for internal usage by the builders. -func (m *BusMutation) DestinationStationIDs() (ids []uuid.UUID) { - if id := m.destination_station; id != nil { +// NextStationID instead. It exists only for internal usage by the builders. +func (m *BusMutation) NextStationIDs() (ids []uuid.UUID) { + if id := m.next_station; id != nil { ids = append(ids, *id) } return } -// ResetDestinationStation resets all changes to the "destination_station" edge. -func (m *BusMutation) ResetDestinationStation() { - m.destination_station = nil - m.cleareddestination_station = false +// ResetNextStation resets all changes to the "next_station" edge. +func (m *BusMutation) ResetNextStation() { + m.next_station = nil + m.clearednext_station = false } // SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by id. @@ -1697,8 +1697,8 @@ func (m *BusMutation) AddedEdges() []string { if m.childBusAssociations != nil { edges = append(edges, bus.EdgeChildBusAssociations) } - if m.destination_station != nil { - edges = append(edges, bus.EdgeDestinationStation) + if m.next_station != nil { + edges = append(edges, bus.EdgeNextStation) } if m.morning_first_station != nil { edges = append(edges, bus.EdgeMorningFirstStation) @@ -1735,8 +1735,8 @@ func (m *BusMutation) AddedIDs(name string) []ent.Value { ids = append(ids, id) } return ids - case bus.EdgeDestinationStation: - if id := m.destination_station; id != nil { + case bus.EdgeNextStation: + if id := m.next_station; id != nil { return []ent.Value{*id} } case bus.EdgeMorningFirstStation: @@ -1807,8 +1807,8 @@ func (m *BusMutation) ClearedEdges() []string { if m.clearedchildBusAssociations { edges = append(edges, bus.EdgeChildBusAssociations) } - if m.cleareddestination_station { - edges = append(edges, bus.EdgeDestinationStation) + if m.clearednext_station { + edges = append(edges, bus.EdgeNextStation) } if m.clearedmorning_first_station { edges = append(edges, bus.EdgeMorningFirstStation) @@ -1831,8 +1831,8 @@ func (m *BusMutation) EdgeCleared(name string) bool { return m.clearedboarding_records case bus.EdgeChildBusAssociations: return m.clearedchildBusAssociations - case bus.EdgeDestinationStation: - return m.cleareddestination_station + case bus.EdgeNextStation: + return m.clearednext_station case bus.EdgeMorningFirstStation: return m.clearedmorning_first_station case bus.EdgeEveningFirstStation: @@ -1848,8 +1848,8 @@ func (m *BusMutation) ClearEdge(name string) error { case bus.EdgeNursery: m.ClearNursery() return nil - case bus.EdgeDestinationStation: - m.ClearDestinationStation() + case bus.EdgeNextStation: + m.ClearNextStation() return nil case bus.EdgeMorningFirstStation: m.ClearMorningFirstStation() @@ -1877,8 +1877,8 @@ func (m *BusMutation) ResetEdge(name string) error { case bus.EdgeChildBusAssociations: m.ResetChildBusAssociations() return nil - case bus.EdgeDestinationStation: - m.ResetDestinationStation() + case bus.EdgeNextStation: + m.ResetNextStation() return nil case bus.EdgeMorningFirstStation: m.ResetMorningFirstStation() @@ -6001,9 +6001,9 @@ type StationMutation struct { evening_next_station map[uuid.UUID]struct{} removedevening_next_station map[uuid.UUID]struct{} clearedevening_next_station bool - destination_for_buses map[uuid.UUID]struct{} - removeddestination_for_buses map[uuid.UUID]struct{} - cleareddestination_for_buses bool + next_for_buses map[uuid.UUID]struct{} + removednext_for_buses map[uuid.UUID]struct{} + clearednext_for_buses bool morning_first_for_buses map[uuid.UUID]struct{} removedmorning_first_for_buses map[uuid.UUID]struct{} clearedmorning_first_for_buses bool @@ -6610,58 +6610,58 @@ func (m *StationMutation) ResetEveningNextStation() { m.removedevening_next_station = nil } -// AddDestinationForBusIDs adds the "destination_for_buses" edge to the Bus entity by ids. -func (m *StationMutation) AddDestinationForBusIDs(ids ...uuid.UUID) { - if m.destination_for_buses == nil { - m.destination_for_buses = make(map[uuid.UUID]struct{}) +// AddNextForBusIDs adds the "next_for_buses" edge to the Bus entity by ids. +func (m *StationMutation) AddNextForBusIDs(ids ...uuid.UUID) { + if m.next_for_buses == nil { + m.next_for_buses = make(map[uuid.UUID]struct{}) } for i := range ids { - m.destination_for_buses[ids[i]] = struct{}{} + m.next_for_buses[ids[i]] = struct{}{} } } -// ClearDestinationForBuses clears the "destination_for_buses" edge to the Bus entity. -func (m *StationMutation) ClearDestinationForBuses() { - m.cleareddestination_for_buses = true +// ClearNextForBuses clears the "next_for_buses" edge to the Bus entity. +func (m *StationMutation) ClearNextForBuses() { + m.clearednext_for_buses = true } -// DestinationForBusesCleared reports if the "destination_for_buses" edge to the Bus entity was cleared. -func (m *StationMutation) DestinationForBusesCleared() bool { - return m.cleareddestination_for_buses +// NextForBusesCleared reports if the "next_for_buses" edge to the Bus entity was cleared. +func (m *StationMutation) NextForBusesCleared() bool { + return m.clearednext_for_buses } -// RemoveDestinationForBusIDs removes the "destination_for_buses" edge to the Bus entity by IDs. -func (m *StationMutation) RemoveDestinationForBusIDs(ids ...uuid.UUID) { - if m.removeddestination_for_buses == nil { - m.removeddestination_for_buses = make(map[uuid.UUID]struct{}) +// RemoveNextForBusIDs removes the "next_for_buses" edge to the Bus entity by IDs. +func (m *StationMutation) RemoveNextForBusIDs(ids ...uuid.UUID) { + if m.removednext_for_buses == nil { + m.removednext_for_buses = make(map[uuid.UUID]struct{}) } for i := range ids { - delete(m.destination_for_buses, ids[i]) - m.removeddestination_for_buses[ids[i]] = struct{}{} + delete(m.next_for_buses, ids[i]) + m.removednext_for_buses[ids[i]] = struct{}{} } } -// RemovedDestinationForBuses returns the removed IDs of the "destination_for_buses" edge to the Bus entity. -func (m *StationMutation) RemovedDestinationForBusesIDs() (ids []uuid.UUID) { - for id := range m.removeddestination_for_buses { +// RemovedNextForBuses returns the removed IDs of the "next_for_buses" edge to the Bus entity. +func (m *StationMutation) RemovedNextForBusesIDs() (ids []uuid.UUID) { + for id := range m.removednext_for_buses { ids = append(ids, id) } return } -// DestinationForBusesIDs returns the "destination_for_buses" edge IDs in the mutation. -func (m *StationMutation) DestinationForBusesIDs() (ids []uuid.UUID) { - for id := range m.destination_for_buses { +// NextForBusesIDs returns the "next_for_buses" edge IDs in the mutation. +func (m *StationMutation) NextForBusesIDs() (ids []uuid.UUID) { + for id := range m.next_for_buses { ids = append(ids, id) } return } -// ResetDestinationForBuses resets all changes to the "destination_for_buses" edge. -func (m *StationMutation) ResetDestinationForBuses() { - m.destination_for_buses = nil - m.cleareddestination_for_buses = false - m.removeddestination_for_buses = nil +// ResetNextForBuses resets all changes to the "next_for_buses" edge. +func (m *StationMutation) ResetNextForBuses() { + m.next_for_buses = nil + m.clearednext_for_buses = false + m.removednext_for_buses = nil } // AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by ids. @@ -7017,8 +7017,8 @@ func (m *StationMutation) AddedEdges() []string { if m.evening_next_station != nil { edges = append(edges, station.EdgeEveningNextStation) } - if m.destination_for_buses != nil { - edges = append(edges, station.EdgeDestinationForBuses) + if m.next_for_buses != nil { + edges = append(edges, station.EdgeNextForBuses) } if m.morning_first_for_buses != nil { edges = append(edges, station.EdgeMorningFirstForBuses) @@ -7063,9 +7063,9 @@ func (m *StationMutation) AddedIDs(name string) []ent.Value { ids = append(ids, id) } return ids - case station.EdgeDestinationForBuses: - ids := make([]ent.Value, 0, len(m.destination_for_buses)) - for id := range m.destination_for_buses { + case station.EdgeNextForBuses: + ids := make([]ent.Value, 0, len(m.next_for_buses)) + for id := range m.next_for_buses { ids = append(ids, id) } return ids @@ -7097,8 +7097,8 @@ func (m *StationMutation) RemovedEdges() []string { if m.removedevening_next_station != nil { edges = append(edges, station.EdgeEveningNextStation) } - if m.removeddestination_for_buses != nil { - edges = append(edges, station.EdgeDestinationForBuses) + if m.removednext_for_buses != nil { + edges = append(edges, station.EdgeNextForBuses) } if m.removedmorning_first_for_buses != nil { edges = append(edges, station.EdgeMorningFirstForBuses) @@ -7131,9 +7131,9 @@ func (m *StationMutation) RemovedIDs(name string) []ent.Value { ids = append(ids, id) } return ids - case station.EdgeDestinationForBuses: - ids := make([]ent.Value, 0, len(m.removeddestination_for_buses)) - for id := range m.removeddestination_for_buses { + case station.EdgeNextForBuses: + ids := make([]ent.Value, 0, len(m.removednext_for_buses)) + for id := range m.removednext_for_buses { ids = append(ids, id) } return ids @@ -7174,8 +7174,8 @@ func (m *StationMutation) ClearedEdges() []string { if m.clearedevening_next_station { edges = append(edges, station.EdgeEveningNextStation) } - if m.cleareddestination_for_buses { - edges = append(edges, station.EdgeDestinationForBuses) + if m.clearednext_for_buses { + edges = append(edges, station.EdgeNextForBuses) } if m.clearedmorning_first_for_buses { edges = append(edges, station.EdgeMorningFirstForBuses) @@ -7202,8 +7202,8 @@ func (m *StationMutation) EdgeCleared(name string) bool { return m.clearedevening_previous_station case station.EdgeEveningNextStation: return m.clearedevening_next_station - case station.EdgeDestinationForBuses: - return m.cleareddestination_for_buses + case station.EdgeNextForBuses: + return m.clearednext_for_buses case station.EdgeMorningFirstForBuses: return m.clearedmorning_first_for_buses case station.EdgeEveningFirstForBuses: @@ -7251,8 +7251,8 @@ func (m *StationMutation) ResetEdge(name string) error { case station.EdgeEveningNextStation: m.ResetEveningNextStation() return nil - case station.EdgeDestinationForBuses: - m.ResetDestinationForBuses() + case station.EdgeNextForBuses: + m.ResetNextForBuses() return nil case station.EdgeMorningFirstForBuses: m.ResetMorningFirstForBuses() diff --git a/backend/domain/repository/ent/schema/bus.go b/backend/domain/repository/ent/schema/bus.go index fd6ac983..77d6df20 100644 --- a/backend/domain/repository/ent/schema/bus.go +++ b/backend/domain/repository/ent/schema/bus.go @@ -38,7 +38,7 @@ func (Bus) Edges() []ent.Edge { edge.To("boarding_records", BoardingRecord.Type), edge.To("childBusAssociations", ChildBusAssociation.Type), // バスが向かっている先のステーション - edge.To("destination_station", Station.Type).Unique(), + edge.To("next_station", Station.Type).Unique(), // 朝の最初のステーション edge.To("morning_first_station", Station.Type).Unique(), // 夕方の最初のステーション diff --git a/backend/domain/repository/ent/schema/station.go b/backend/domain/repository/ent/schema/station.go index df72bbf3..176e8b48 100644 --- a/backend/domain/repository/ent/schema/station.go +++ b/backend/domain/repository/ent/schema/station.go @@ -42,8 +42,8 @@ func (Station) Edges() []ent.Edge { From("evening_previous_station"). Unique(), // このステーションが「現在」の目的地であるバス - edge.From("destination_for_buses", Bus.Type). - Ref("destination_station"), + edge.From("next_for_buses", Bus.Type). + Ref("next_station"), // このステーションが朝の最初のステーションであるバス edge.From("morning_first_for_buses", Bus.Type). Ref("morning_first_station"), diff --git a/backend/domain/repository/ent/station.go b/backend/domain/repository/ent/station.go index 3524a74d..cddfe6da 100644 --- a/backend/domain/repository/ent/station.go +++ b/backend/domain/repository/ent/station.go @@ -50,8 +50,8 @@ type StationEdges struct { EveningPreviousStation *Station `json:"evening_previous_station,omitempty"` // EveningNextStation holds the value of the evening_next_station edge. EveningNextStation []*Station `json:"evening_next_station,omitempty"` - // DestinationForBuses holds the value of the destination_for_buses edge. - DestinationForBuses []*Bus `json:"destination_for_buses,omitempty"` + // NextForBuses holds the value of the next_for_buses edge. + NextForBuses []*Bus `json:"next_for_buses,omitempty"` // MorningFirstForBuses holds the value of the morning_first_for_buses edge. MorningFirstForBuses []*Bus `json:"morning_first_for_buses,omitempty"` // EveningFirstForBuses holds the value of the evening_first_for_buses edge. @@ -127,13 +127,13 @@ func (e StationEdges) EveningNextStationOrErr() ([]*Station, error) { return nil, &NotLoadedError{edge: "evening_next_station"} } -// DestinationForBusesOrErr returns the DestinationForBuses value or an error if the edge +// NextForBusesOrErr returns the NextForBuses value or an error if the edge // was not loaded in eager-loading. -func (e StationEdges) DestinationForBusesOrErr() ([]*Bus, error) { +func (e StationEdges) NextForBusesOrErr() ([]*Bus, error) { if e.loadedTypes[6] { - return e.DestinationForBuses, nil + return e.NextForBuses, nil } - return nil, &NotLoadedError{edge: "destination_for_buses"} + return nil, &NotLoadedError{edge: "next_for_buses"} } // MorningFirstForBusesOrErr returns the MorningFirstForBuses value or an error if the edge @@ -280,9 +280,9 @@ func (s *Station) QueryEveningNextStation() *StationQuery { return NewStationClient(s.config).QueryEveningNextStation(s) } -// QueryDestinationForBuses queries the "destination_for_buses" edge of the Station entity. -func (s *Station) QueryDestinationForBuses() *BusQuery { - return NewStationClient(s.config).QueryDestinationForBuses(s) +// QueryNextForBuses queries the "next_for_buses" edge of the Station entity. +func (s *Station) QueryNextForBuses() *BusQuery { + return NewStationClient(s.config).QueryNextForBuses(s) } // QueryMorningFirstForBuses queries the "morning_first_for_buses" edge of the Station entity. diff --git a/backend/domain/repository/ent/station/station.go b/backend/domain/repository/ent/station/station.go index 9eb27bec..5996e29c 100644 --- a/backend/domain/repository/ent/station/station.go +++ b/backend/domain/repository/ent/station/station.go @@ -35,8 +35,8 @@ const ( EdgeEveningPreviousStation = "evening_previous_station" // EdgeEveningNextStation holds the string denoting the evening_next_station edge name in mutations. EdgeEveningNextStation = "evening_next_station" - // EdgeDestinationForBuses holds the string denoting the destination_for_buses edge name in mutations. - EdgeDestinationForBuses = "destination_for_buses" + // EdgeNextForBuses holds the string denoting the next_for_buses edge name in mutations. + EdgeNextForBuses = "next_for_buses" // EdgeMorningFirstForBuses holds the string denoting the morning_first_for_buses edge name in mutations. EdgeMorningFirstForBuses = "morning_first_for_buses" // EdgeEveningFirstForBuses holds the string denoting the evening_first_for_buses edge name in mutations. @@ -71,13 +71,13 @@ const ( EveningNextStationTable = "stations" // EveningNextStationColumn is the table column denoting the evening_next_station relation/edge. EveningNextStationColumn = "station_evening_next_station" - // DestinationForBusesTable is the table that holds the destination_for_buses relation/edge. - DestinationForBusesTable = "bus" - // DestinationForBusesInverseTable is the table name for the Bus entity. + // NextForBusesTable is the table that holds the next_for_buses relation/edge. + NextForBusesTable = "bus" + // NextForBusesInverseTable is the table name for the Bus entity. // It exists in this package in order to avoid circular dependency with the "bus" package. - DestinationForBusesInverseTable = "bus" - // DestinationForBusesColumn is the table column denoting the destination_for_buses relation/edge. - DestinationForBusesColumn = "bus_destination_station" + NextForBusesInverseTable = "bus" + // NextForBusesColumn is the table column denoting the next_for_buses relation/edge. + NextForBusesColumn = "bus_next_station" // MorningFirstForBusesTable is the table that holds the morning_first_for_buses relation/edge. MorningFirstForBusesTable = "bus" // MorningFirstForBusesInverseTable is the table name for the Bus entity. @@ -238,17 +238,17 @@ func ByEveningNextStation(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOptio } } -// ByDestinationForBusesCount orders the results by destination_for_buses count. -func ByDestinationForBusesCount(opts ...sql.OrderTermOption) OrderOption { +// ByNextForBusesCount orders the results by next_for_buses count. +func ByNextForBusesCount(opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { - sqlgraph.OrderByNeighborsCount(s, newDestinationForBusesStep(), opts...) + sqlgraph.OrderByNeighborsCount(s, newNextForBusesStep(), opts...) } } -// ByDestinationForBuses orders the results by destination_for_buses terms. -func ByDestinationForBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { +// ByNextForBuses orders the results by next_for_buses terms. +func ByNextForBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newDestinationForBusesStep(), append([]sql.OrderTerm{term}, terms...)...) + sqlgraph.OrderByNeighborTerms(s, newNextForBusesStep(), append([]sql.OrderTerm{term}, terms...)...) } } @@ -321,11 +321,11 @@ func newEveningNextStationStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.O2M, false, EveningNextStationTable, EveningNextStationColumn), ) } -func newDestinationForBusesStep() *sqlgraph.Step { +func newNextForBusesStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(DestinationForBusesInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, DestinationForBusesTable, DestinationForBusesColumn), + sqlgraph.To(NextForBusesInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, NextForBusesTable, NextForBusesColumn), ) } func newMorningFirstForBusesStep() *sqlgraph.Step { diff --git a/backend/domain/repository/ent/station/where.go b/backend/domain/repository/ent/station/where.go index ff6ea40d..fcdb0e63 100644 --- a/backend/domain/repository/ent/station/where.go +++ b/backend/domain/repository/ent/station/where.go @@ -394,21 +394,21 @@ func HasEveningNextStationWith(preds ...predicate.Station) predicate.Station { }) } -// HasDestinationForBuses applies the HasEdge predicate on the "destination_for_buses" edge. -func HasDestinationForBuses() predicate.Station { +// HasNextForBuses applies the HasEdge predicate on the "next_for_buses" edge. +func HasNextForBuses() predicate.Station { return predicate.Station(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, DestinationForBusesTable, DestinationForBusesColumn), + sqlgraph.Edge(sqlgraph.O2M, true, NextForBusesTable, NextForBusesColumn), ) sqlgraph.HasNeighbors(s, step) }) } -// HasDestinationForBusesWith applies the HasEdge predicate on the "destination_for_buses" edge with a given conditions (other predicates). -func HasDestinationForBusesWith(preds ...predicate.Bus) predicate.Station { +// HasNextForBusesWith applies the HasEdge predicate on the "next_for_buses" edge with a given conditions (other predicates). +func HasNextForBusesWith(preds ...predicate.Bus) predicate.Station { return predicate.Station(func(s *sql.Selector) { - step := newDestinationForBusesStep() + step := newNextForBusesStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) diff --git a/backend/domain/repository/ent/station_create.go b/backend/domain/repository/ent/station_create.go index 8dbb28af..a3011899 100644 --- a/backend/domain/repository/ent/station_create.go +++ b/backend/domain/repository/ent/station_create.go @@ -195,19 +195,19 @@ func (sc *StationCreate) AddEveningNextStation(s ...*Station) *StationCreate { return sc.AddEveningNextStationIDs(ids...) } -// AddDestinationForBusIDs adds the "destination_for_buses" edge to the Bus entity by IDs. -func (sc *StationCreate) AddDestinationForBusIDs(ids ...uuid.UUID) *StationCreate { - sc.mutation.AddDestinationForBusIDs(ids...) +// AddNextForBusIDs adds the "next_for_buses" edge to the Bus entity by IDs. +func (sc *StationCreate) AddNextForBusIDs(ids ...uuid.UUID) *StationCreate { + sc.mutation.AddNextForBusIDs(ids...) return sc } -// AddDestinationForBuses adds the "destination_for_buses" edges to the Bus entity. -func (sc *StationCreate) AddDestinationForBuses(b ...*Bus) *StationCreate { +// AddNextForBuses adds the "next_for_buses" edges to the Bus entity. +func (sc *StationCreate) AddNextForBuses(b ...*Bus) *StationCreate { ids := make([]uuid.UUID, len(b)) for i := range b { ids[i] = b[i].ID } - return sc.AddDestinationForBusIDs(ids...) + return sc.AddNextForBusIDs(ids...) } // AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by IDs. @@ -455,12 +455,12 @@ func (sc *StationCreate) createSpec() (*Station, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } - if nodes := sc.mutation.DestinationForBusesIDs(); len(nodes) > 0 { + if nodes := sc.mutation.NextForBusesIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, Inverse: true, - Table: station.DestinationForBusesTable, - Columns: []string{station.DestinationForBusesColumn}, + Table: station.NextForBusesTable, + Columns: []string{station.NextForBusesColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), diff --git a/backend/domain/repository/ent/station_query.go b/backend/domain/repository/ent/station_query.go index 4d96fd12..e5995c82 100644 --- a/backend/domain/repository/ent/station_query.go +++ b/backend/domain/repository/ent/station_query.go @@ -31,7 +31,7 @@ type StationQuery struct { withMorningNextStation *StationQuery withEveningPreviousStation *StationQuery withEveningNextStation *StationQuery - withDestinationForBuses *BusQuery + withNextForBuses *BusQuery withMorningFirstForBuses *BusQuery withEveningFirstForBuses *BusQuery withFKs bool @@ -203,8 +203,8 @@ func (sq *StationQuery) QueryEveningNextStation() *StationQuery { return query } -// QueryDestinationForBuses chains the current query on the "destination_for_buses" edge. -func (sq *StationQuery) QueryDestinationForBuses() *BusQuery { +// QueryNextForBuses chains the current query on the "next_for_buses" edge. +func (sq *StationQuery) QueryNextForBuses() *BusQuery { query := (&BusClient{config: sq.config}).Query() query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { if err := sq.prepareQuery(ctx); err != nil { @@ -217,7 +217,7 @@ func (sq *StationQuery) QueryDestinationForBuses() *BusQuery { step := sqlgraph.NewStep( sqlgraph.From(station.Table, station.FieldID, selector), sqlgraph.To(bus.Table, bus.FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, station.DestinationForBusesTable, station.DestinationForBusesColumn), + sqlgraph.Edge(sqlgraph.O2M, true, station.NextForBusesTable, station.NextForBusesColumn), ) fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) return fromU, nil @@ -467,7 +467,7 @@ func (sq *StationQuery) Clone() *StationQuery { withMorningNextStation: sq.withMorningNextStation.Clone(), withEveningPreviousStation: sq.withEveningPreviousStation.Clone(), withEveningNextStation: sq.withEveningNextStation.Clone(), - withDestinationForBuses: sq.withDestinationForBuses.Clone(), + withNextForBuses: sq.withNextForBuses.Clone(), withMorningFirstForBuses: sq.withMorningFirstForBuses.Clone(), withEveningFirstForBuses: sq.withEveningFirstForBuses.Clone(), // clone intermediate query. @@ -542,14 +542,14 @@ func (sq *StationQuery) WithEveningNextStation(opts ...func(*StationQuery)) *Sta return sq } -// WithDestinationForBuses tells the query-builder to eager-load the nodes that are connected to -// the "destination_for_buses" edge. The optional arguments are used to configure the query builder of the edge. -func (sq *StationQuery) WithDestinationForBuses(opts ...func(*BusQuery)) *StationQuery { +// WithNextForBuses tells the query-builder to eager-load the nodes that are connected to +// the "next_for_buses" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithNextForBuses(opts ...func(*BusQuery)) *StationQuery { query := (&BusClient{config: sq.config}).Query() for _, opt := range opts { opt(query) } - sq.withDestinationForBuses = query + sq.withNextForBuses = query return sq } @@ -661,7 +661,7 @@ func (sq *StationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Stat sq.withMorningNextStation != nil, sq.withEveningPreviousStation != nil, sq.withEveningNextStation != nil, - sq.withDestinationForBuses != nil, + sq.withNextForBuses != nil, sq.withMorningFirstForBuses != nil, sq.withEveningFirstForBuses != nil, } @@ -729,10 +729,10 @@ func (sq *StationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Stat return nil, err } } - if query := sq.withDestinationForBuses; query != nil { - if err := sq.loadDestinationForBuses(ctx, query, nodes, - func(n *Station) { n.Edges.DestinationForBuses = []*Bus{} }, - func(n *Station, e *Bus) { n.Edges.DestinationForBuses = append(n.Edges.DestinationForBuses, e) }); err != nil { + if query := sq.withNextForBuses; query != nil { + if err := sq.loadNextForBuses(ctx, query, nodes, + func(n *Station) { n.Edges.NextForBuses = []*Bus{} }, + func(n *Station, e *Bus) { n.Edges.NextForBuses = append(n.Edges.NextForBuses, e) }); err != nil { return nil, err } } @@ -972,7 +972,7 @@ func (sq *StationQuery) loadEveningNextStation(ctx context.Context, query *Stati } return nil } -func (sq *StationQuery) loadDestinationForBuses(ctx context.Context, query *BusQuery, nodes []*Station, init func(*Station), assign func(*Station, *Bus)) error { +func (sq *StationQuery) loadNextForBuses(ctx context.Context, query *BusQuery, nodes []*Station, init func(*Station), assign func(*Station, *Bus)) error { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[uuid.UUID]*Station) for i := range nodes { @@ -984,20 +984,20 @@ func (sq *StationQuery) loadDestinationForBuses(ctx context.Context, query *BusQ } query.withFKs = true query.Where(predicate.Bus(func(s *sql.Selector) { - s.Where(sql.InValues(s.C(station.DestinationForBusesColumn), fks...)) + s.Where(sql.InValues(s.C(station.NextForBusesColumn), fks...)) })) neighbors, err := query.All(ctx) if err != nil { return err } for _, n := range neighbors { - fk := n.bus_destination_station + fk := n.bus_next_station if fk == nil { - return fmt.Errorf(`foreign-key "bus_destination_station" is nil for node %v`, n.ID) + return fmt.Errorf(`foreign-key "bus_next_station" is nil for node %v`, n.ID) } node, ok := nodeids[*fk] if !ok { - return fmt.Errorf(`unexpected referenced foreign-key "bus_destination_station" returned %v for node %v`, *fk, n.ID) + return fmt.Errorf(`unexpected referenced foreign-key "bus_next_station" returned %v for node %v`, *fk, n.ID) } assign(node, n) } diff --git a/backend/domain/repository/ent/station_update.go b/backend/domain/repository/ent/station_update.go index 61b45ab6..83587069 100644 --- a/backend/domain/repository/ent/station_update.go +++ b/backend/domain/repository/ent/station_update.go @@ -207,19 +207,19 @@ func (su *StationUpdate) AddEveningNextStation(s ...*Station) *StationUpdate { return su.AddEveningNextStationIDs(ids...) } -// AddDestinationForBusIDs adds the "destination_for_buses" edge to the Bus entity by IDs. -func (su *StationUpdate) AddDestinationForBusIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.AddDestinationForBusIDs(ids...) +// AddNextForBusIDs adds the "next_for_buses" edge to the Bus entity by IDs. +func (su *StationUpdate) AddNextForBusIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.AddNextForBusIDs(ids...) return su } -// AddDestinationForBuses adds the "destination_for_buses" edges to the Bus entity. -func (su *StationUpdate) AddDestinationForBuses(b ...*Bus) *StationUpdate { +// AddNextForBuses adds the "next_for_buses" edges to the Bus entity. +func (su *StationUpdate) AddNextForBuses(b ...*Bus) *StationUpdate { ids := make([]uuid.UUID, len(b)) for i := range b { ids[i] = b[i].ID } - return su.AddDestinationForBusIDs(ids...) + return su.AddNextForBusIDs(ids...) } // AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by IDs. @@ -338,25 +338,25 @@ func (su *StationUpdate) RemoveEveningNextStation(s ...*Station) *StationUpdate return su.RemoveEveningNextStationIDs(ids...) } -// ClearDestinationForBuses clears all "destination_for_buses" edges to the Bus entity. -func (su *StationUpdate) ClearDestinationForBuses() *StationUpdate { - su.mutation.ClearDestinationForBuses() +// ClearNextForBuses clears all "next_for_buses" edges to the Bus entity. +func (su *StationUpdate) ClearNextForBuses() *StationUpdate { + su.mutation.ClearNextForBuses() return su } -// RemoveDestinationForBusIDs removes the "destination_for_buses" edge to Bus entities by IDs. -func (su *StationUpdate) RemoveDestinationForBusIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.RemoveDestinationForBusIDs(ids...) +// RemoveNextForBusIDs removes the "next_for_buses" edge to Bus entities by IDs. +func (su *StationUpdate) RemoveNextForBusIDs(ids ...uuid.UUID) *StationUpdate { + su.mutation.RemoveNextForBusIDs(ids...) return su } -// RemoveDestinationForBuses removes "destination_for_buses" edges to Bus entities. -func (su *StationUpdate) RemoveDestinationForBuses(b ...*Bus) *StationUpdate { +// RemoveNextForBuses removes "next_for_buses" edges to Bus entities. +func (su *StationUpdate) RemoveNextForBuses(b ...*Bus) *StationUpdate { ids := make([]uuid.UUID, len(b)) for i := range b { ids[i] = b[i].ID } - return su.RemoveDestinationForBusIDs(ids...) + return su.RemoveNextForBusIDs(ids...) } // ClearMorningFirstForBuses clears all "morning_first_for_buses" edges to the Bus entity. @@ -692,12 +692,12 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if su.mutation.DestinationForBusesCleared() { + if su.mutation.NextForBusesCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, Inverse: true, - Table: station.DestinationForBusesTable, - Columns: []string{station.DestinationForBusesColumn}, + Table: station.NextForBusesTable, + Columns: []string{station.NextForBusesColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), @@ -705,12 +705,12 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := su.mutation.RemovedDestinationForBusesIDs(); len(nodes) > 0 && !su.mutation.DestinationForBusesCleared() { + if nodes := su.mutation.RemovedNextForBusesIDs(); len(nodes) > 0 && !su.mutation.NextForBusesCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, Inverse: true, - Table: station.DestinationForBusesTable, - Columns: []string{station.DestinationForBusesColumn}, + Table: station.NextForBusesTable, + Columns: []string{station.NextForBusesColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), @@ -721,12 +721,12 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := su.mutation.DestinationForBusesIDs(); len(nodes) > 0 { + if nodes := su.mutation.NextForBusesIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, Inverse: true, - Table: station.DestinationForBusesTable, - Columns: []string{station.DestinationForBusesColumn}, + Table: station.NextForBusesTable, + Columns: []string{station.NextForBusesColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), @@ -1023,19 +1023,19 @@ func (suo *StationUpdateOne) AddEveningNextStation(s ...*Station) *StationUpdate return suo.AddEveningNextStationIDs(ids...) } -// AddDestinationForBusIDs adds the "destination_for_buses" edge to the Bus entity by IDs. -func (suo *StationUpdateOne) AddDestinationForBusIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.AddDestinationForBusIDs(ids...) +// AddNextForBusIDs adds the "next_for_buses" edge to the Bus entity by IDs. +func (suo *StationUpdateOne) AddNextForBusIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.AddNextForBusIDs(ids...) return suo } -// AddDestinationForBuses adds the "destination_for_buses" edges to the Bus entity. -func (suo *StationUpdateOne) AddDestinationForBuses(b ...*Bus) *StationUpdateOne { +// AddNextForBuses adds the "next_for_buses" edges to the Bus entity. +func (suo *StationUpdateOne) AddNextForBuses(b ...*Bus) *StationUpdateOne { ids := make([]uuid.UUID, len(b)) for i := range b { ids[i] = b[i].ID } - return suo.AddDestinationForBusIDs(ids...) + return suo.AddNextForBusIDs(ids...) } // AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by IDs. @@ -1154,25 +1154,25 @@ func (suo *StationUpdateOne) RemoveEveningNextStation(s ...*Station) *StationUpd return suo.RemoveEveningNextStationIDs(ids...) } -// ClearDestinationForBuses clears all "destination_for_buses" edges to the Bus entity. -func (suo *StationUpdateOne) ClearDestinationForBuses() *StationUpdateOne { - suo.mutation.ClearDestinationForBuses() +// ClearNextForBuses clears all "next_for_buses" edges to the Bus entity. +func (suo *StationUpdateOne) ClearNextForBuses() *StationUpdateOne { + suo.mutation.ClearNextForBuses() return suo } -// RemoveDestinationForBusIDs removes the "destination_for_buses" edge to Bus entities by IDs. -func (suo *StationUpdateOne) RemoveDestinationForBusIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.RemoveDestinationForBusIDs(ids...) +// RemoveNextForBusIDs removes the "next_for_buses" edge to Bus entities by IDs. +func (suo *StationUpdateOne) RemoveNextForBusIDs(ids ...uuid.UUID) *StationUpdateOne { + suo.mutation.RemoveNextForBusIDs(ids...) return suo } -// RemoveDestinationForBuses removes "destination_for_buses" edges to Bus entities. -func (suo *StationUpdateOne) RemoveDestinationForBuses(b ...*Bus) *StationUpdateOne { +// RemoveNextForBuses removes "next_for_buses" edges to Bus entities. +func (suo *StationUpdateOne) RemoveNextForBuses(b ...*Bus) *StationUpdateOne { ids := make([]uuid.UUID, len(b)) for i := range b { ids[i] = b[i].ID } - return suo.RemoveDestinationForBusIDs(ids...) + return suo.RemoveNextForBusIDs(ids...) } // ClearMorningFirstForBuses clears all "morning_first_for_buses" edges to the Bus entity. @@ -1538,12 +1538,12 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if suo.mutation.DestinationForBusesCleared() { + if suo.mutation.NextForBusesCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, Inverse: true, - Table: station.DestinationForBusesTable, - Columns: []string{station.DestinationForBusesColumn}, + Table: station.NextForBusesTable, + Columns: []string{station.NextForBusesColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), @@ -1551,12 +1551,12 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := suo.mutation.RemovedDestinationForBusesIDs(); len(nodes) > 0 && !suo.mutation.DestinationForBusesCleared() { + if nodes := suo.mutation.RemovedNextForBusesIDs(); len(nodes) > 0 && !suo.mutation.NextForBusesCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, Inverse: true, - Table: station.DestinationForBusesTable, - Columns: []string{station.DestinationForBusesColumn}, + Table: station.NextForBusesTable, + Columns: []string{station.NextForBusesColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), @@ -1567,12 +1567,12 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := suo.mutation.DestinationForBusesIDs(); len(nodes) > 0 { + if nodes := suo.mutation.NextForBusesIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, Inverse: true, - Table: station.DestinationForBusesTable, - Columns: []string{station.DestinationForBusesColumn}, + Table: station.NextForBusesTable, + Columns: []string{station.NextForBusesColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), From 8f3bae4b8e6ecf33b06f65eaf8c986dcea445e87 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 08:19:18 +0900 Subject: [PATCH 625/771] =?UTF-8?q?feat:=20proto=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=20-=20BusStatus=E3=81=AE=E5=A4=89=E6=9B=B4=E3=81=AFCh?= =?UTF-8?q?angeBusStatus=E3=81=A7=E3=81=AE=E3=81=BF=E8=A1=8C=E3=81=88?= =?UTF-8?q?=E3=82=8B=E7=94=A8=E3=81=AB=E5=A4=89=E6=9B=B4=20-=20=E3=83=90?= =?UTF-8?q?=E3=82=B9=E3=81=AE=E4=BD=8D=E7=BD=AE=E6=83=85=E5=A0=B1=E5=85=B1?= =?UTF-8?q?=E6=9C=89=E3=81=AB=E6=AC=A1=E3=81=AE=E3=83=90=E3=82=B9=E5=81=9C?= =?UTF-8?q?=E3=81=AEID=E3=82=92=E5=90=AB=E3=82=81=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 329 +++++++++--------- .../go/where_child_bus/v1/bus_grpc.pb.go | 37 ++ .../proto-gen/where_child_bus/v1/bus.pb.dart | 116 +++--- .../where_child_bus/v1/bus.pbgrpc.dart | 20 ++ .../where_child_bus/v1/bus.pbjson.dart | 38 +- .../generated/where_child_bus/v1/bus_pb2.py | 46 +-- .../generated/where_child_bus/v1/bus_pb2.pyi | 18 +- .../where_child_bus/v1/bus_pb2_grpc.py | 33 ++ proto/where_child_bus/v1/bus.proto | 18 +- 9 files changed, 392 insertions(+), 263 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index 85726bc5..e44bef4e 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -342,6 +342,7 @@ type ChangeBusStatusRequest struct { BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` BusStatus BusStatus `protobuf:"varint,2,opt,name=bus_status,json=busStatus,proto3,enum=where_child_bus.v1.BusStatus" json:"bus_status,omitempty"` + BusType BusType `protobuf:"varint,3,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` } func (x *ChangeBusStatusRequest) Reset() { @@ -390,6 +391,13 @@ func (x *ChangeBusStatusRequest) GetBusStatus() BusStatus { return BusStatus_BUS_STATUS_UNSPECIFIED } +func (x *ChangeBusStatusRequest) GetBusType() BusType { + if x != nil { + return x.BusType + } + return BusType_BUS_TYPE_UNSPECIFIED +} + type ChangeBusStatusResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -591,9 +599,10 @@ type TrackBusContinuousResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` + NextStationId string `protobuf:"bytes,4,opt,name=next_station_id,json=nextStationId,proto3" json:"next_station_id,omitempty"` } func (x *TrackBusContinuousResponse) Reset() { @@ -649,6 +658,13 @@ func (x *TrackBusContinuousResponse) GetLongitude() float64 { return 0 } +func (x *TrackBusContinuousResponse) GetNextStationId() string { + if x != nil { + return x.NextStationId + } + return "" +} + type StreamBusVideoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -807,14 +823,13 @@ type UpdateBusRequest struct { BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` PlateNumber string `protobuf:"bytes,3,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` - BusStatus BusStatus `protobuf:"varint,4,opt,name=bus_status,json=busStatus,proto3,enum=where_child_bus.v1.BusStatus" json:"bus_status,omitempty"` - Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` - EnableFaceRecognition bool `protobuf:"varint,7,opt,name=enable_face_recognition,json=enableFaceRecognition,proto3" json:"enable_face_recognition,omitempty"` - MorningFirstStationId string `protobuf:"bytes,8,opt,name=morning_first_station_id,json=morningFirstStationId,proto3" json:"morning_first_station_id,omitempty"` - EveningFirstStationId string `protobuf:"bytes,9,opt,name=evening_first_station_id,json=eveningFirstStationId,proto3" json:"evening_first_station_id,omitempty"` - NextStationId string `protobuf:"bytes,10,opt,name=next_station_id,json=nextStationId,proto3" json:"next_station_id,omitempty"` - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,11,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + Latitude float64 `protobuf:"fixed64,4,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,5,opt,name=longitude,proto3" json:"longitude,omitempty"` + EnableFaceRecognition bool `protobuf:"varint,6,opt,name=enable_face_recognition,json=enableFaceRecognition,proto3" json:"enable_face_recognition,omitempty"` + MorningFirstStationId string `protobuf:"bytes,7,opt,name=morning_first_station_id,json=morningFirstStationId,proto3" json:"morning_first_station_id,omitempty"` + EveningFirstStationId string `protobuf:"bytes,8,opt,name=evening_first_station_id,json=eveningFirstStationId,proto3" json:"evening_first_station_id,omitempty"` + NextStationId string `protobuf:"bytes,9,opt,name=next_station_id,json=nextStationId,proto3" json:"next_station_id,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,10,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } func (x *UpdateBusRequest) Reset() { @@ -870,13 +885,6 @@ func (x *UpdateBusRequest) GetPlateNumber() string { return "" } -func (x *UpdateBusRequest) GetBusStatus() BusStatus { - if x != nil { - return x.BusStatus - } - return BusStatus_BUS_STATUS_UNSPECIFIED -} - func (x *UpdateBusRequest) GetLatitude() float64 { if x != nil { return x.Latitude @@ -1018,127 +1026,136 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x6d, 0x0a, 0x16, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0a, - 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, - 0x22, 0x70, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, - 0x64, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, - 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, - 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, - 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x45, 0x0a, 0x0d, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x68, 0x69, - 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, - 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, - 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x74, 0x6f, - 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, - 0x68, 0x6f, 0x74, 0x6f, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x68, - 0x6f, 0x74, 0x6f, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x57, 0x69, 0x64, 0x74, 0x68, 0x22, 0x70, 0x0a, 0x16, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, - 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xe7, 0x03, - 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, - 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, - 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x72, 0x73, - 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x15, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x65, 0x76, 0x65, - 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x65, 0x76, 0x65, - 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, - 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0xaf, 0x06, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, - 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, + 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x16, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, + 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x62, + 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x88, - 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, - 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x34, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, - 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, - 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x70, 0x0a, 0x1d, 0x53, 0x65, 0x6e, + 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, + 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x53, + 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, + 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, + 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, + 0x64, 0x22, 0x95, 0x01, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xb1, 0x02, 0x0a, 0x15, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, + 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, + 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, + 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, + 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, + 0x74, 0x6f, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0b, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x57, 0x69, 0x64, 0x74, 0x68, 0x22, 0x70, 0x0a, + 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, + 0xa9, 0x03, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, + 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, + 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x46, + 0x69, 0x72, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x37, 0x0a, + 0x18, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x15, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0x9b, 0x07, 0x0a, 0x0a, + 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, + 0x12, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, + 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, + 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, @@ -1221,29 +1238,31 @@ var file_where_child_bus_v1_bus_proto_depIdxs = []int32{ 16, // 1: where_child_bus.v1.GetBusListByNurseryIdResponse.buses:type_name -> where_child_bus.v1.Bus 16, // 2: where_child_bus.v1.GetRunningBusByGuardianIdResponse.bus:type_name -> where_child_bus.v1.Bus 17, // 3: where_child_bus.v1.ChangeBusStatusRequest.bus_status:type_name -> where_child_bus.v1.BusStatus - 16, // 4: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus - 18, // 5: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType - 19, // 6: where_child_bus.v1.StreamBusVideoRequest.vehicle_event:type_name -> where_child_bus.v1.VehicleEvent - 20, // 7: where_child_bus.v1.StreamBusVideoResponse.children:type_name -> where_child_bus.v1.Child - 17, // 8: where_child_bus.v1.UpdateBusRequest.bus_status:type_name -> where_child_bus.v1.BusStatus + 18, // 4: where_child_bus.v1.ChangeBusStatusRequest.bus_type:type_name -> where_child_bus.v1.BusType + 16, // 5: where_child_bus.v1.ChangeBusStatusResponse.bus:type_name -> where_child_bus.v1.Bus + 18, // 6: where_child_bus.v1.StreamBusVideoRequest.bus_type:type_name -> where_child_bus.v1.BusType + 19, // 7: where_child_bus.v1.StreamBusVideoRequest.vehicle_event:type_name -> where_child_bus.v1.VehicleEvent + 20, // 8: where_child_bus.v1.StreamBusVideoResponse.children:type_name -> where_child_bus.v1.Child 21, // 9: where_child_bus.v1.UpdateBusRequest.update_mask:type_name -> google.protobuf.FieldMask 16, // 10: where_child_bus.v1.UpdateBusResponse.bus:type_name -> where_child_bus.v1.Bus 0, // 11: where_child_bus.v1.BusService.CreateBus:input_type -> where_child_bus.v1.CreateBusRequest 2, // 12: where_child_bus.v1.BusService.GetBusListByNurseryId:input_type -> where_child_bus.v1.GetBusListByNurseryIdRequest 4, // 13: where_child_bus.v1.BusService.GetRunningBusByGuardianId:input_type -> where_child_bus.v1.GetRunningBusByGuardianIdRequest 14, // 14: where_child_bus.v1.BusService.UpdateBus:input_type -> where_child_bus.v1.UpdateBusRequest - 8, // 15: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest - 10, // 16: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest - 12, // 17: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest - 1, // 18: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse - 3, // 19: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse - 5, // 20: where_child_bus.v1.BusService.GetRunningBusByGuardianId:output_type -> where_child_bus.v1.GetRunningBusByGuardianIdResponse - 15, // 21: where_child_bus.v1.BusService.UpdateBus:output_type -> where_child_bus.v1.UpdateBusResponse - 9, // 22: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse - 11, // 23: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse - 13, // 24: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse - 18, // [18:25] is the sub-list for method output_type - 11, // [11:18] is the sub-list for method input_type + 6, // 15: where_child_bus.v1.BusService.ChangeBusStatus:input_type -> where_child_bus.v1.ChangeBusStatusRequest + 8, // 16: where_child_bus.v1.BusService.SendLocationContinuous:input_type -> where_child_bus.v1.SendLocationContinuousRequest + 10, // 17: where_child_bus.v1.BusService.TrackBusContinuous:input_type -> where_child_bus.v1.TrackBusContinuousRequest + 12, // 18: where_child_bus.v1.BusService.StreamBusVideo:input_type -> where_child_bus.v1.StreamBusVideoRequest + 1, // 19: where_child_bus.v1.BusService.CreateBus:output_type -> where_child_bus.v1.CreateBusResponse + 3, // 20: where_child_bus.v1.BusService.GetBusListByNurseryId:output_type -> where_child_bus.v1.GetBusListByNurseryIdResponse + 5, // 21: where_child_bus.v1.BusService.GetRunningBusByGuardianId:output_type -> where_child_bus.v1.GetRunningBusByGuardianIdResponse + 15, // 22: where_child_bus.v1.BusService.UpdateBus:output_type -> where_child_bus.v1.UpdateBusResponse + 7, // 23: where_child_bus.v1.BusService.ChangeBusStatus:output_type -> where_child_bus.v1.ChangeBusStatusResponse + 9, // 24: where_child_bus.v1.BusService.SendLocationContinuous:output_type -> where_child_bus.v1.SendLocationContinuousResponse + 11, // 25: where_child_bus.v1.BusService.TrackBusContinuous:output_type -> where_child_bus.v1.TrackBusContinuousResponse + 13, // 26: where_child_bus.v1.BusService.StreamBusVideo:output_type -> where_child_bus.v1.StreamBusVideoResponse + 19, // [19:27] is the sub-list for method output_type + 11, // [11:19] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name 11, // [11:11] is the sub-list for extension extendee 0, // [0:11] is the sub-list for field type_name diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go index e3a71c9e..6c5c2589 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go @@ -23,6 +23,7 @@ const ( BusService_GetBusListByNurseryId_FullMethodName = "/where_child_bus.v1.BusService/GetBusListByNurseryId" BusService_GetRunningBusByGuardianId_FullMethodName = "/where_child_bus.v1.BusService/GetRunningBusByGuardianId" BusService_UpdateBus_FullMethodName = "/where_child_bus.v1.BusService/UpdateBus" + BusService_ChangeBusStatus_FullMethodName = "/where_child_bus.v1.BusService/ChangeBusStatus" BusService_SendLocationContinuous_FullMethodName = "/where_child_bus.v1.BusService/SendLocationContinuous" BusService_TrackBusContinuous_FullMethodName = "/where_child_bus.v1.BusService/TrackBusContinuous" BusService_StreamBusVideo_FullMethodName = "/where_child_bus.v1.BusService/StreamBusVideo" @@ -36,6 +37,7 @@ type BusServiceClient interface { GetBusListByNurseryId(ctx context.Context, in *GetBusListByNurseryIdRequest, opts ...grpc.CallOption) (*GetBusListByNurseryIdResponse, error) GetRunningBusByGuardianId(ctx context.Context, in *GetRunningBusByGuardianIdRequest, opts ...grpc.CallOption) (*GetRunningBusByGuardianIdResponse, error) UpdateBus(ctx context.Context, in *UpdateBusRequest, opts ...grpc.CallOption) (*UpdateBusResponse, error) + ChangeBusStatus(ctx context.Context, in *ChangeBusStatusRequest, opts ...grpc.CallOption) (*ChangeBusStatusResponse, error) SendLocationContinuous(ctx context.Context, opts ...grpc.CallOption) (BusService_SendLocationContinuousClient, error) TrackBusContinuous(ctx context.Context, in *TrackBusContinuousRequest, opts ...grpc.CallOption) (BusService_TrackBusContinuousClient, error) StreamBusVideo(ctx context.Context, opts ...grpc.CallOption) (BusService_StreamBusVideoClient, error) @@ -85,6 +87,15 @@ func (c *busServiceClient) UpdateBus(ctx context.Context, in *UpdateBusRequest, return out, nil } +func (c *busServiceClient) ChangeBusStatus(ctx context.Context, in *ChangeBusStatusRequest, opts ...grpc.CallOption) (*ChangeBusStatusResponse, error) { + out := new(ChangeBusStatusResponse) + err := c.cc.Invoke(ctx, BusService_ChangeBusStatus_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *busServiceClient) SendLocationContinuous(ctx context.Context, opts ...grpc.CallOption) (BusService_SendLocationContinuousClient, error) { stream, err := c.cc.NewStream(ctx, &BusService_ServiceDesc.Streams[0], BusService_SendLocationContinuous_FullMethodName, opts...) if err != nil { @@ -193,6 +204,7 @@ type BusServiceServer interface { GetBusListByNurseryId(context.Context, *GetBusListByNurseryIdRequest) (*GetBusListByNurseryIdResponse, error) GetRunningBusByGuardianId(context.Context, *GetRunningBusByGuardianIdRequest) (*GetRunningBusByGuardianIdResponse, error) UpdateBus(context.Context, *UpdateBusRequest) (*UpdateBusResponse, error) + ChangeBusStatus(context.Context, *ChangeBusStatusRequest) (*ChangeBusStatusResponse, error) SendLocationContinuous(BusService_SendLocationContinuousServer) error TrackBusContinuous(*TrackBusContinuousRequest, BusService_TrackBusContinuousServer) error StreamBusVideo(BusService_StreamBusVideoServer) error @@ -214,6 +226,9 @@ func (UnimplementedBusServiceServer) GetRunningBusByGuardianId(context.Context, func (UnimplementedBusServiceServer) UpdateBus(context.Context, *UpdateBusRequest) (*UpdateBusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateBus not implemented") } +func (UnimplementedBusServiceServer) ChangeBusStatus(context.Context, *ChangeBusStatusRequest) (*ChangeBusStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChangeBusStatus not implemented") +} func (UnimplementedBusServiceServer) SendLocationContinuous(BusService_SendLocationContinuousServer) error { return status.Errorf(codes.Unimplemented, "method SendLocationContinuous not implemented") } @@ -307,6 +322,24 @@ func _BusService_UpdateBus_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _BusService_ChangeBusStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangeBusStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BusServiceServer).ChangeBusStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BusService_ChangeBusStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BusServiceServer).ChangeBusStatus(ctx, req.(*ChangeBusStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _BusService_SendLocationContinuous_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(BusServiceServer).SendLocationContinuous(&busServiceSendLocationContinuousServer{stream}) } @@ -403,6 +436,10 @@ var BusService_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateBus", Handler: _BusService_UpdateBus_Handler, }, + { + MethodName: "ChangeBusStatus", + Handler: _BusService_ChangeBusStatus_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index 3c85aa71..9b4f88dc 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -363,6 +363,7 @@ class ChangeBusStatusRequest extends $pb.GeneratedMessage { factory ChangeBusStatusRequest({ $core.String? busId, $8.BusStatus? busStatus, + $8.BusType? busType, }) { final $result = create(); if (busId != null) { @@ -371,6 +372,9 @@ class ChangeBusStatusRequest extends $pb.GeneratedMessage { if (busStatus != null) { $result.busStatus = busStatus; } + if (busType != null) { + $result.busType = busType; + } return $result; } ChangeBusStatusRequest._() : super(); @@ -380,6 +384,7 @@ class ChangeBusStatusRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChangeBusStatusRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') ..e<$8.BusStatus>(2, _omitFieldNames ? '' : 'busStatus', $pb.PbFieldType.OE, defaultOrMaker: $8.BusStatus.BUS_STATUS_UNSPECIFIED, valueOf: $8.BusStatus.valueOf, enumValues: $8.BusStatus.values) + ..e<$8.BusType>(3, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) ..hasRequiredFields = false ; @@ -421,6 +426,15 @@ class ChangeBusStatusRequest extends $pb.GeneratedMessage { $core.bool hasBusStatus() => $_has(1); @$pb.TagNumber(2) void clearBusStatus() => clearField(2); + + @$pb.TagNumber(3) + $8.BusType get busType => $_getN(2); + @$pb.TagNumber(3) + set busType($8.BusType v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasBusType() => $_has(2); + @$pb.TagNumber(3) + void clearBusType() => clearField(3); } class ChangeBusStatusResponse extends $pb.GeneratedMessage { @@ -641,6 +655,7 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { $core.String? busId, $core.double? latitude, $core.double? longitude, + $core.String? nextStationId, }) { final $result = create(); if (busId != null) { @@ -652,6 +667,9 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { if (longitude != null) { $result.longitude = longitude; } + if (nextStationId != null) { + $result.nextStationId = nextStationId; + } return $result; } TrackBusContinuousResponse._() : super(); @@ -662,6 +680,7 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'busId') ..a<$core.double>(2, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(3, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..aOS(4, _omitFieldNames ? '' : 'nextStationId') ..hasRequiredFields = false ; @@ -712,6 +731,15 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { $core.bool hasLongitude() => $_has(2); @$pb.TagNumber(3) void clearLongitude() => clearField(3); + + @$pb.TagNumber(4) + $core.String get nextStationId => $_getSZ(3); + @$pb.TagNumber(4) + set nextStationId($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasNextStationId() => $_has(3); + @$pb.TagNumber(4) + void clearNextStationId() => clearField(4); } class StreamBusVideoRequest extends $pb.GeneratedMessage { @@ -905,7 +933,6 @@ class UpdateBusRequest extends $pb.GeneratedMessage { $core.String? busId, $core.String? name, $core.String? plateNumber, - $8.BusStatus? busStatus, $core.double? latitude, $core.double? longitude, $core.bool? enableFaceRecognition, @@ -924,9 +951,6 @@ class UpdateBusRequest extends $pb.GeneratedMessage { if (plateNumber != null) { $result.plateNumber = plateNumber; } - if (busStatus != null) { - $result.busStatus = busStatus; - } if (latitude != null) { $result.latitude = latitude; } @@ -958,14 +982,13 @@ class UpdateBusRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'busId') ..aOS(2, _omitFieldNames ? '' : 'name') ..aOS(3, _omitFieldNames ? '' : 'plateNumber') - ..e<$8.BusStatus>(4, _omitFieldNames ? '' : 'busStatus', $pb.PbFieldType.OE, defaultOrMaker: $8.BusStatus.BUS_STATUS_UNSPECIFIED, valueOf: $8.BusStatus.valueOf, enumValues: $8.BusStatus.values) - ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) - ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOB(7, _omitFieldNames ? '' : 'enableFaceRecognition') - ..aOS(8, _omitFieldNames ? '' : 'morningFirstStationId') - ..aOS(9, _omitFieldNames ? '' : 'eveningFirstStationId') - ..aOS(10, _omitFieldNames ? '' : 'nextStationId') - ..aOM<$9.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..a<$core.double>(4, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(5, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..aOB(6, _omitFieldNames ? '' : 'enableFaceRecognition') + ..aOS(7, _omitFieldNames ? '' : 'morningFirstStationId') + ..aOS(8, _omitFieldNames ? '' : 'eveningFirstStationId') + ..aOS(9, _omitFieldNames ? '' : 'nextStationId') + ..aOM<$9.FieldMask>(10, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) ..hasRequiredFields = false ; @@ -1018,78 +1041,69 @@ class UpdateBusRequest extends $pb.GeneratedMessage { void clearPlateNumber() => clearField(3); @$pb.TagNumber(4) - $8.BusStatus get busStatus => $_getN(3); + $core.double get latitude => $_getN(3); @$pb.TagNumber(4) - set busStatus($8.BusStatus v) { setField(4, v); } + set latitude($core.double v) { $_setDouble(3, v); } @$pb.TagNumber(4) - $core.bool hasBusStatus() => $_has(3); + $core.bool hasLatitude() => $_has(3); @$pb.TagNumber(4) - void clearBusStatus() => clearField(4); + void clearLatitude() => clearField(4); @$pb.TagNumber(5) - $core.double get latitude => $_getN(4); + $core.double get longitude => $_getN(4); @$pb.TagNumber(5) - set latitude($core.double v) { $_setDouble(4, v); } + set longitude($core.double v) { $_setDouble(4, v); } @$pb.TagNumber(5) - $core.bool hasLatitude() => $_has(4); + $core.bool hasLongitude() => $_has(4); @$pb.TagNumber(5) - void clearLatitude() => clearField(5); + void clearLongitude() => clearField(5); @$pb.TagNumber(6) - $core.double get longitude => $_getN(5); + $core.bool get enableFaceRecognition => $_getBF(5); @$pb.TagNumber(6) - set longitude($core.double v) { $_setDouble(5, v); } + set enableFaceRecognition($core.bool v) { $_setBool(5, v); } @$pb.TagNumber(6) - $core.bool hasLongitude() => $_has(5); + $core.bool hasEnableFaceRecognition() => $_has(5); @$pb.TagNumber(6) - void clearLongitude() => clearField(6); + void clearEnableFaceRecognition() => clearField(6); @$pb.TagNumber(7) - $core.bool get enableFaceRecognition => $_getBF(6); + $core.String get morningFirstStationId => $_getSZ(6); @$pb.TagNumber(7) - set enableFaceRecognition($core.bool v) { $_setBool(6, v); } + set morningFirstStationId($core.String v) { $_setString(6, v); } @$pb.TagNumber(7) - $core.bool hasEnableFaceRecognition() => $_has(6); + $core.bool hasMorningFirstStationId() => $_has(6); @$pb.TagNumber(7) - void clearEnableFaceRecognition() => clearField(7); + void clearMorningFirstStationId() => clearField(7); @$pb.TagNumber(8) - $core.String get morningFirstStationId => $_getSZ(7); + $core.String get eveningFirstStationId => $_getSZ(7); @$pb.TagNumber(8) - set morningFirstStationId($core.String v) { $_setString(7, v); } + set eveningFirstStationId($core.String v) { $_setString(7, v); } @$pb.TagNumber(8) - $core.bool hasMorningFirstStationId() => $_has(7); + $core.bool hasEveningFirstStationId() => $_has(7); @$pb.TagNumber(8) - void clearMorningFirstStationId() => clearField(8); + void clearEveningFirstStationId() => clearField(8); @$pb.TagNumber(9) - $core.String get eveningFirstStationId => $_getSZ(8); + $core.String get nextStationId => $_getSZ(8); @$pb.TagNumber(9) - set eveningFirstStationId($core.String v) { $_setString(8, v); } + set nextStationId($core.String v) { $_setString(8, v); } @$pb.TagNumber(9) - $core.bool hasEveningFirstStationId() => $_has(8); + $core.bool hasNextStationId() => $_has(8); @$pb.TagNumber(9) - void clearEveningFirstStationId() => clearField(9); + void clearNextStationId() => clearField(9); @$pb.TagNumber(10) - $core.String get nextStationId => $_getSZ(9); + $9.FieldMask get updateMask => $_getN(9); + @$pb.TagNumber(10) + set updateMask($9.FieldMask v) { setField(10, v); } @$pb.TagNumber(10) - set nextStationId($core.String v) { $_setString(9, v); } + $core.bool hasUpdateMask() => $_has(9); @$pb.TagNumber(10) - $core.bool hasNextStationId() => $_has(9); + void clearUpdateMask() => clearField(10); @$pb.TagNumber(10) - void clearNextStationId() => clearField(10); - - @$pb.TagNumber(11) - $9.FieldMask get updateMask => $_getN(10); - @$pb.TagNumber(11) - set updateMask($9.FieldMask v) { setField(11, v); } - @$pb.TagNumber(11) - $core.bool hasUpdateMask() => $_has(10); - @$pb.TagNumber(11) - void clearUpdateMask() => clearField(11); - @$pb.TagNumber(11) - $9.FieldMask ensureUpdateMask() => $_ensure(10); + $9.FieldMask ensureUpdateMask() => $_ensure(9); } class UpdateBusResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart index e8e6dd1c..df787b0f 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart @@ -37,6 +37,10 @@ class BusServiceClient extends $grpc.Client { '/where_child_bus.v1.BusService/UpdateBus', ($0.UpdateBusRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $0.UpdateBusResponse.fromBuffer(value)); + static final _$changeBusStatus = $grpc.ClientMethod<$0.ChangeBusStatusRequest, $0.ChangeBusStatusResponse>( + '/where_child_bus.v1.BusService/ChangeBusStatus', + ($0.ChangeBusStatusRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.ChangeBusStatusResponse.fromBuffer(value)); static final _$sendLocationContinuous = $grpc.ClientMethod<$0.SendLocationContinuousRequest, $0.SendLocationContinuousResponse>( '/where_child_bus.v1.BusService/SendLocationContinuous', ($0.SendLocationContinuousRequest value) => value.writeToBuffer(), @@ -72,6 +76,10 @@ class BusServiceClient extends $grpc.Client { return $createUnaryCall(_$updateBus, request, options: options); } + $grpc.ResponseFuture<$0.ChangeBusStatusResponse> changeBusStatus($0.ChangeBusStatusRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$changeBusStatus, request, options: options); + } + $grpc.ResponseFuture<$0.SendLocationContinuousResponse> sendLocationContinuous($async.Stream<$0.SendLocationContinuousRequest> request, {$grpc.CallOptions? options}) { return $createStreamingCall(_$sendLocationContinuous, request, options: options).single; } @@ -118,6 +126,13 @@ abstract class BusServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $0.UpdateBusRequest.fromBuffer(value), ($0.UpdateBusResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.ChangeBusStatusRequest, $0.ChangeBusStatusResponse>( + 'ChangeBusStatus', + changeBusStatus_Pre, + false, + false, + ($core.List<$core.int> value) => $0.ChangeBusStatusRequest.fromBuffer(value), + ($0.ChangeBusStatusResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.SendLocationContinuousRequest, $0.SendLocationContinuousResponse>( 'SendLocationContinuous', sendLocationContinuous, @@ -157,6 +172,10 @@ abstract class BusServiceBase extends $grpc.Service { return updateBus(call, await request); } + $async.Future<$0.ChangeBusStatusResponse> changeBusStatus_Pre($grpc.ServiceCall call, $async.Future<$0.ChangeBusStatusRequest> request) async { + return changeBusStatus(call, await request); + } + $async.Stream<$0.TrackBusContinuousResponse> trackBusContinuous_Pre($grpc.ServiceCall call, $async.Future<$0.TrackBusContinuousRequest> request) async* { yield* trackBusContinuous(call, await request); } @@ -165,6 +184,7 @@ abstract class BusServiceBase extends $grpc.Service { $async.Future<$0.GetBusListByNurseryIdResponse> getBusListByNurseryId($grpc.ServiceCall call, $0.GetBusListByNurseryIdRequest request); $async.Future<$0.GetRunningBusByGuardianIdResponse> getRunningBusByGuardianId($grpc.ServiceCall call, $0.GetRunningBusByGuardianIdRequest request); $async.Future<$0.UpdateBusResponse> updateBus($grpc.ServiceCall call, $0.UpdateBusRequest request); + $async.Future<$0.ChangeBusStatusResponse> changeBusStatus($grpc.ServiceCall call, $0.ChangeBusStatusRequest request); $async.Future<$0.SendLocationContinuousResponse> sendLocationContinuous($grpc.ServiceCall call, $async.Stream<$0.SendLocationContinuousRequest> request); $async.Stream<$0.TrackBusContinuousResponse> trackBusContinuous($grpc.ServiceCall call, $0.TrackBusContinuousRequest request); $async.Future<$0.StreamBusVideoResponse> streamBusVideo($grpc.ServiceCall call, $async.Stream<$0.StreamBusVideoRequest> request); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 4e7b18f9..15930db9 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -103,13 +103,15 @@ const ChangeBusStatusRequest$json = { '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, {'1': 'bus_status', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusStatus', '10': 'busStatus'}, + {'1': 'bus_type', '3': 3, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, ], }; /// Descriptor for `ChangeBusStatusRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List changeBusStatusRequestDescriptor = $convert.base64Decode( 'ChZDaGFuZ2VCdXNTdGF0dXNSZXF1ZXN0EhUKBmJ1c19pZBgBIAEoCVIFYnVzSWQSPAoKYnVzX3' - 'N0YXR1cxgCIAEoDjIdLndoZXJlX2NoaWxkX2J1cy52MS5CdXNTdGF0dXNSCWJ1c1N0YXR1cw=='); + 'N0YXR1cxgCIAEoDjIdLndoZXJlX2NoaWxkX2J1cy52MS5CdXNTdGF0dXNSCWJ1c1N0YXR1cxI2' + 'CghidXNfdHlwZRgDIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBl'); @$core.Deprecated('Use changeBusStatusResponseDescriptor instead') const ChangeBusStatusResponse$json = { @@ -168,13 +170,15 @@ const TrackBusContinuousResponse$json = { {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, {'1': 'latitude', '3': 2, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 3, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'next_station_id', '3': 4, '4': 1, '5': 9, '10': 'nextStationId'}, ], }; /// Descriptor for `TrackBusContinuousResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List trackBusContinuousResponseDescriptor = $convert.base64Decode( 'ChpUcmFja0J1c0NvbnRpbnVvdXNSZXNwb25zZRIVCgZidXNfaWQYASABKAlSBWJ1c0lkEhoKCG' - 'xhdGl0dWRlGAIgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYAyABKAFSCWxvbmdpdHVkZQ=='); + 'xhdGl0dWRlGAIgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYAyABKAFSCWxvbmdpdHVkZRIm' + 'Cg9uZXh0X3N0YXRpb25faWQYBCABKAlSDW5leHRTdGF0aW9uSWQ='); @$core.Deprecated('Use streamBusVideoRequestDescriptor instead') const StreamBusVideoRequest$json = { @@ -221,28 +225,26 @@ const UpdateBusRequest$json = { {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, {'1': 'plate_number', '3': 3, '4': 1, '5': 9, '10': 'plateNumber'}, - {'1': 'bus_status', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusStatus', '10': 'busStatus'}, - {'1': 'latitude', '3': 5, '4': 1, '5': 1, '10': 'latitude'}, - {'1': 'longitude', '3': 6, '4': 1, '5': 1, '10': 'longitude'}, - {'1': 'enable_face_recognition', '3': 7, '4': 1, '5': 8, '10': 'enableFaceRecognition'}, - {'1': 'morning_first_station_id', '3': 8, '4': 1, '5': 9, '10': 'morningFirstStationId'}, - {'1': 'evening_first_station_id', '3': 9, '4': 1, '5': 9, '10': 'eveningFirstStationId'}, - {'1': 'next_station_id', '3': 10, '4': 1, '5': 9, '10': 'nextStationId'}, - {'1': 'update_mask', '3': 11, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, + {'1': 'latitude', '3': 4, '4': 1, '5': 1, '10': 'latitude'}, + {'1': 'longitude', '3': 5, '4': 1, '5': 1, '10': 'longitude'}, + {'1': 'enable_face_recognition', '3': 6, '4': 1, '5': 8, '10': 'enableFaceRecognition'}, + {'1': 'morning_first_station_id', '3': 7, '4': 1, '5': 9, '10': 'morningFirstStationId'}, + {'1': 'evening_first_station_id', '3': 8, '4': 1, '5': 9, '10': 'eveningFirstStationId'}, + {'1': 'next_station_id', '3': 9, '4': 1, '5': 9, '10': 'nextStationId'}, + {'1': 'update_mask', '3': 10, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, ], }; /// Descriptor for `UpdateBusRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List updateBusRequestDescriptor = $convert.base64Decode( 'ChBVcGRhdGVCdXNSZXF1ZXN0EhUKBmJ1c19pZBgBIAEoCVIFYnVzSWQSEgoEbmFtZRgCIAEoCV' - 'IEbmFtZRIhCgxwbGF0ZV9udW1iZXIYAyABKAlSC3BsYXRlTnVtYmVyEjwKCmJ1c19zdGF0dXMY' - 'BCABKA4yHS53aGVyZV9jaGlsZF9idXMudjEuQnVzU3RhdHVzUglidXNTdGF0dXMSGgoIbGF0aX' - 'R1ZGUYBSABKAFSCGxhdGl0dWRlEhwKCWxvbmdpdHVkZRgGIAEoAVIJbG9uZ2l0dWRlEjYKF2Vu' - 'YWJsZV9mYWNlX3JlY29nbml0aW9uGAcgASgIUhVlbmFibGVGYWNlUmVjb2duaXRpb24SNwoYbW' - '9ybmluZ19maXJzdF9zdGF0aW9uX2lkGAggASgJUhVtb3JuaW5nRmlyc3RTdGF0aW9uSWQSNwoY' - 'ZXZlbmluZ19maXJzdF9zdGF0aW9uX2lkGAkgASgJUhVldmVuaW5nRmlyc3RTdGF0aW9uSWQSJg' - 'oPbmV4dF9zdGF0aW9uX2lkGAogASgJUg1uZXh0U3RhdGlvbklkEjsKC3VwZGF0ZV9tYXNrGAsg' - 'ASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFza1IKdXBkYXRlTWFzaw=='); + 'IEbmFtZRIhCgxwbGF0ZV9udW1iZXIYAyABKAlSC3BsYXRlTnVtYmVyEhoKCGxhdGl0dWRlGAQg' + 'ASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYBSABKAFSCWxvbmdpdHVkZRI2ChdlbmFibGVfZm' + 'FjZV9yZWNvZ25pdGlvbhgGIAEoCFIVZW5hYmxlRmFjZVJlY29nbml0aW9uEjcKGG1vcm5pbmdf' + 'Zmlyc3Rfc3RhdGlvbl9pZBgHIAEoCVIVbW9ybmluZ0ZpcnN0U3RhdGlvbklkEjcKGGV2ZW5pbm' + 'dfZmlyc3Rfc3RhdGlvbl9pZBgIIAEoCVIVZXZlbmluZ0ZpcnN0U3RhdGlvbklkEiYKD25leHRf' + 'c3RhdGlvbl9pZBgJIAEoCVINbmV4dFN0YXRpb25JZBI7Cgt1cGRhdGVfbWFzaxgKIAEoCzIaLm' + 'dvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tSCnVwZGF0ZU1hc2s='); @$core.Deprecated('Use updateBusResponseDescriptor instead') const UpdateBusResponse$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index 23ff1088..f310e5fe 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"m\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"m\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xe7\x03\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x04 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x07 \x01(\x08R\x15\x65nableFaceRecognition\x12\x37\n\x18morning_first_station_id\x18\x08 \x01(\tR\x15morningFirstStationId\x12\x37\n\x18\x65vening_first_station_id\x18\t \x01(\tR\x15\x65veningFirstStationId\x12&\n\x0fnext_station_id\x18\n \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\xaf\x06\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xa5\x01\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x95\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12&\n\x0fnext_station_id\x18\x04 \x01(\tR\rnextStationId\"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xa9\x03\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1a\n\x08latitude\x18\x04 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x05 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x06 \x01(\x08R\x15\x65nableFaceRecognition\x12\x37\n\x18morning_first_station_id\x18\x07 \x01(\tR\x15morningFirstStationId\x12\x37\n\x18\x65vening_first_station_id\x18\x08 \x01(\tR\x15\x65veningFirstStationId\x12&\n\x0fnext_station_id\x18\t \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\n \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\x9b\x07\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -36,26 +36,26 @@ _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_end=603 _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_start=605 _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_end=683 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=685 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=794 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=796 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=864 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=866 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=978 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=980 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=1012 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=1014 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=1064 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=1066 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1175 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1178 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1483 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1485 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1597 - _globals['_UPDATEBUSREQUEST']._serialized_start=1600 - _globals['_UPDATEBUSREQUEST']._serialized_end=2087 - _globals['_UPDATEBUSRESPONSE']._serialized_start=2089 - _globals['_UPDATEBUSRESPONSE']._serialized_end=2151 - _globals['_BUSSERVICE']._serialized_start=2154 - _globals['_BUSSERVICE']._serialized_end=2969 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=686 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=851 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=853 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=921 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=923 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=1035 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=1037 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=1069 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=1071 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=1121 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=1124 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1273 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1276 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1581 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1583 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1695 + _globals['_UPDATEBUSREQUEST']._serialized_start=1698 + _globals['_UPDATEBUSREQUEST']._serialized_end=2123 + _globals['_UPDATEBUSRESPONSE']._serialized_start=2125 + _globals['_UPDATEBUSRESPONSE']._serialized_end=2187 + _globals['_BUSSERVICE']._serialized_start=2190 + _globals['_BUSSERVICE']._serialized_end=3113 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index b534d633..76aec3e8 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -52,12 +52,14 @@ class GetRunningBusByGuardianIdResponse(_message.Message): def __init__(self, bus: _Optional[_Union[_resources_pb2.Bus, _Mapping]] = ...) -> None: ... class ChangeBusStatusRequest(_message.Message): - __slots__ = ("bus_id", "bus_status") + __slots__ = ("bus_id", "bus_status", "bus_type") BUS_ID_FIELD_NUMBER: _ClassVar[int] BUS_STATUS_FIELD_NUMBER: _ClassVar[int] + BUS_TYPE_FIELD_NUMBER: _ClassVar[int] bus_id: str bus_status: _resources_pb2.BusStatus - def __init__(self, bus_id: _Optional[str] = ..., bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ...) -> None: ... + bus_type: _resources_pb2.BusType + def __init__(self, bus_id: _Optional[str] = ..., bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ...) -> None: ... class ChangeBusStatusResponse(_message.Message): __slots__ = ("bus",) @@ -86,14 +88,16 @@ class TrackBusContinuousRequest(_message.Message): def __init__(self, bus_id: _Optional[str] = ...) -> None: ... class TrackBusContinuousResponse(_message.Message): - __slots__ = ("bus_id", "latitude", "longitude") + __slots__ = ("bus_id", "latitude", "longitude", "next_station_id") BUS_ID_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] + NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] bus_id: str latitude: float longitude: float - def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ...) -> None: ... + next_station_id: str + def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., next_station_id: _Optional[str] = ...) -> None: ... class StreamBusVideoRequest(_message.Message): __slots__ = ("bus_id", "nursery_id", "bus_type", "vehicle_event", "video_chunk", "photo_height", "photo_width") @@ -122,11 +126,10 @@ class StreamBusVideoResponse(_message.Message): def __init__(self, is_detected: bool = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... class UpdateBusRequest(_message.Message): - __slots__ = ("bus_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "morning_first_station_id", "evening_first_station_id", "next_station_id", "update_mask") + __slots__ = ("bus_id", "name", "plate_number", "latitude", "longitude", "enable_face_recognition", "morning_first_station_id", "evening_first_station_id", "next_station_id", "update_mask") BUS_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] - BUS_STATUS_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] ENABLE_FACE_RECOGNITION_FIELD_NUMBER: _ClassVar[int] @@ -137,7 +140,6 @@ class UpdateBusRequest(_message.Message): bus_id: str name: str plate_number: str - bus_status: _resources_pb2.BusStatus latitude: float longitude: float enable_face_recognition: bool @@ -145,7 +147,7 @@ class UpdateBusRequest(_message.Message): evening_first_station_id: str next_station_id: str update_mask: _field_mask_pb2.FieldMask - def __init__(self, bus_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[_resources_pb2.BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., morning_first_station_id: _Optional[str] = ..., evening_first_station_id: _Optional[str] = ..., next_station_id: _Optional[str] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., morning_first_station_id: _Optional[str] = ..., evening_first_station_id: _Optional[str] = ..., next_station_id: _Optional[str] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateBusResponse(_message.Message): __slots__ = ("bus",) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py index 292301cf..c1430e2f 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py @@ -34,6 +34,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.FromString, ) + self.ChangeBusStatus = channel.unary_unary( + '/where_child_bus.v1.BusService/ChangeBusStatus', + request_serializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.FromString, + ) self.SendLocationContinuous = channel.stream_unary( '/where_child_bus.v1.BusService/SendLocationContinuous', request_serializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.SerializeToString, @@ -78,6 +83,12 @@ def UpdateBus(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def ChangeBusStatus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SendLocationContinuous(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -119,6 +130,11 @@ def add_BusServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_bus__pb2.UpdateBusResponse.SerializeToString, ), + 'ChangeBusStatus': grpc.unary_unary_rpc_method_handler( + servicer.ChangeBusStatus, + request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.SerializeToString, + ), 'SendLocationContinuous': grpc.stream_unary_rpc_method_handler( servicer.SendLocationContinuous, request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.SendLocationContinuousRequest.FromString, @@ -212,6 +228,23 @@ def UpdateBus(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def ChangeBusStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusService/ChangeBusStatus', + where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__pb2.ChangeBusStatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def SendLocationContinuous(request_iterator, target, diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index ef777bf1..ceac322a 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -10,6 +10,7 @@ service BusService { rpc GetBusListByNurseryId(GetBusListByNurseryIdRequest) returns (GetBusListByNurseryIdResponse); rpc GetRunningBusByGuardianId(GetRunningBusByGuardianIdRequest) returns (GetRunningBusByGuardianIdResponse); rpc UpdateBus(UpdateBusRequest) returns (UpdateBusResponse); + rpc ChangeBusStatus(ChangeBusStatusRequest) returns (ChangeBusStatusResponse); rpc SendLocationContinuous(stream SendLocationContinuousRequest) returns (SendLocationContinuousResponse); rpc TrackBusContinuous(TrackBusContinuousRequest) returns (stream TrackBusContinuousResponse); @@ -47,6 +48,7 @@ message GetRunningBusByGuardianIdResponse { message ChangeBusStatusRequest { string bus_id = 1; BusStatus bus_status = 2; + BusType bus_type = 3; } message ChangeBusStatusResponse { @@ -72,6 +74,7 @@ message TrackBusContinuousResponse { string bus_id = 1; double latitude = 2; double longitude = 3; + string next_station_id = 4; } message StreamBusVideoRequest { @@ -93,14 +96,13 @@ message UpdateBusRequest { string bus_id = 1; string name = 2; string plate_number = 3; - BusStatus bus_status = 4; - double latitude = 5; - double longitude = 6; - bool enable_face_recognition = 7; - string morning_first_station_id = 8; - string evening_first_station_id = 9; - string next_station_id = 10; - google.protobuf.FieldMask update_mask = 11; + double latitude = 4; + double longitude = 5; + bool enable_face_recognition = 6; + string morning_first_station_id = 7; + string evening_first_station_id = 8; + string next_station_id = 9; + google.protobuf.FieldMask update_mask = 10; } message UpdateBusResponse { From c880bc72718f81442aad42f22ca3688fa6406fa1 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 08:19:41 +0900 Subject: [PATCH 626/771] =?UTF-8?q?feat:=20=E5=89=8D=EF=BC=92=E3=81=A4?= =?UTF-8?q?=E3=81=AE=E5=A4=89=E6=9B=B4=E3=81=ABusecase=E5=B1=A4=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 97 ++++++++++++++++++++++++++++----- backend/usecases/utils/utils.go | 3 + 2 files changed, 87 insertions(+), 13 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 63080e60..4e5d24b4 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -48,10 +48,30 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* return nil, err } defer utils.RollbackTx(tx, i.logger) + + morningFirstStation, err := tx.Station.Query(). + Where(stationRepo.HasGuardianWith(guardianRepo.ID(uuid.MustParse(req.MorningGuardianIds[0])))). + Only(ctx) + + if err != nil { + i.logger.Error("failed to get morning first station", "error", err) + return nil, err + } + + eveningFirstStation, err := tx.Station.Query(). + Where(stationRepo.HasGuardianWith(guardianRepo.ID(uuid.MustParse(req.EveningGuardianIds[0])))). + Only(ctx) + + if err != nil { + i.logger.Error("failed to get evening first station", "error", err) + return nil, err + } bus, err := tx.Bus.Create(). SetNurseryID(nurseryID). SetName(req.Name). SetPlateNumber(req.PlateNumber). + SetMorningFirstStation(morningFirstStation). + SetEveningFirstStation(eveningFirstStation). Save(ctx) if err != nil { @@ -70,6 +90,9 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* bus, err = tx.Bus.Query(). Where(busRepo.IDEQ(bus.ID)). WithNursery(). + WithNextStation(). + WithMorningFirstStation(). + WithEveningFirstStation(). Only(ctx) if err != nil { @@ -188,6 +211,9 @@ func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusLi buses, err := i.getBusList(ctx, func(tx *ent.Tx) (*ent.BusQuery, error) { return tx.Bus.Query(). Where(busRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID))). + WithNextStation(). + WithMorningFirstStation(). + WithEveningFirstStation(). WithNursery(), nil }) @@ -210,6 +236,9 @@ func (i *Interactor) GetRunningBusByGuardianID(ctx context.Context, req *pb.GetR Where(busRepo.HasNurseryWith(nurseryRepo.HasGuardiansWith(guardianRepo.ID(guardianID)))). Where(busRepo.StatusEQ(busRepo.StatusRunning)). WithNursery(). + WithNextStation(). + WithMorningFirstStation(). + WithEveningFirstStation(). Only(ctx) if err != nil { @@ -239,9 +268,36 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu return nil, err } - bus, err := tx.Bus.UpdateOneID(busID). - SetStatus(*status). - Save(ctx) + bus, err := tx.Bus.Query().Where(busRepo.IDEQ(busID)). + WithNursery(). + WithNextStation(). + WithMorningFirstStation(). + WithEveningFirstStation(). + Only(ctx) + if err != nil { + i.logger.Error("failed to get bus", "error", err) + return nil, err + + } + + update := tx.Bus.UpdateOneID(busID) + // バスを停止に変更する場合、次のステーションをクリア + switch req.BusStatus { + case pb.BusStatus_BUS_STATUS_RUNNING: + update.ClearNextStation() + break + case pb.BusStatus_BUS_STATUS_STOPPED: + switch req.BusType { + case pb.BusType_BUS_TYPE_MORNING: + update.ClearNextStation().SetNextStation(bus.Edges.MorningFirstStation) + break + case pb.BusType_BUS_TYPE_EVENING: + update.ClearNextStation().SetNextStation(bus.Edges.EveningFirstStation) + break + } + } + + bus, err = update.SetStatus(*status).Save(ctx) if err != nil { i.logger.Error("failed to update bus", "error", err) @@ -264,6 +320,9 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu bus, err = tx.Bus.Query(). Where(busRepo.IDEQ(bus.ID)). WithNursery(). + WithNextStation(). + WithMorningFirstStation(). + WithEveningFirstStation(). Only(ctx) if err != nil { @@ -302,19 +361,20 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* update.SetName(req.Name) case "plate_number": update.SetPlateNumber(req.PlateNumber) - case "bus_status": - status, err := utils.ConvertPbStatusToEntStatus(req.BusStatus) - if err != nil { - i.logger.Error("failed to convert status", "error", err) - return nil, err - } - update.SetStatus(*status) case "latitude": update.SetLatitude(req.Latitude) case "longitude": update.SetLongitude(req.Longitude) case "enable_face_recognition": update.SetEnableFaceRecognition(req.EnableFaceRecognition) + case "next_station": + nextStationID, err := uuid.Parse(req.NextStationId) + if err != nil { + i.logger.Error("failed to parse next station ID", "error", err) + return nil, err + } + update.ClearNextStation() + update.SetNextStationID(nextStationID) } } @@ -328,6 +388,9 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* updatedBus, err := tx.Bus.Query().Where(busRepo.IDEQ(busID)). WithNursery(). + WithNextStation(). + WithMorningFirstStation(). + WithEveningFirstStation(). Only(ctx) if err != nil { @@ -345,7 +408,11 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* // 更新されたバスを取得 updatedBus, err = tx.Bus.Query().Where(busRepo.ID(busID)). WithNursery(). + WithNextStation(). + WithMorningFirstStation(). + WithEveningFirstStation(). Only(ctx) + if err != nil { i.logger.Error("failed to retrieve updated bus", "error", err) } @@ -406,6 +473,9 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea bus, err := i.entClient.Bus.Query(). Where(busRepo.IDEQ(busID)). WithNursery(). + WithNextStation(). + WithMorningFirstStation(). + WithEveningFirstStation(). Only(context.Background()) if err != nil { @@ -413,9 +483,10 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea } if err := stream.Send(&pb.TrackBusContinuousResponse{ - BusId: req.BusId, - Latitude: bus.Latitude, - Longitude: bus.Longitude, + BusId: req.BusId, + Latitude: bus.Latitude, + Longitude: bus.Longitude, + NextStationId: bus.Edges.NextStation.ID.String(), }); err != nil { return fmt.Errorf("failed to send bus: %w", err) } diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 17ccd825..55f75afc 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -77,6 +77,9 @@ func ToPbBus(t *ent.Bus) *pb.Bus { Latitude: t.Latitude, Longitude: t.Longitude, EnableFaceRecognition: t.EnableFaceRecognition, + NextStationId: t.Edges.NextStation.ID.String(), + MorningFirstStationId: t.Edges.MorningFirstStation.ID.String(), + EveningFirstStationId: t.Edges.EveningFirstStation.ID.String(), CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, } From 006ec483401ba2e6faa6235b0267febf5ef404bb Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 08:22:08 +0900 Subject: [PATCH 627/771] fix: linter --- backend/usecases/bus/bus.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 4e5d24b4..a44af972 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -285,15 +285,12 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu switch req.BusStatus { case pb.BusStatus_BUS_STATUS_RUNNING: update.ClearNextStation() - break case pb.BusStatus_BUS_STATUS_STOPPED: switch req.BusType { case pb.BusType_BUS_TYPE_MORNING: update.ClearNextStation().SetNextStation(bus.Edges.MorningFirstStation) - break case pb.BusType_BUS_TYPE_EVENING: update.ClearNextStation().SetNextStation(bus.Edges.EveningFirstStation) - break } } From 62335b77262bdbc19cdc60bc6ac25c50b90b859e Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 11:20:24 +0900 Subject: [PATCH 628/771] =?UTF-8?q?fix:=20=E3=83=8C=E3=83=AB=E3=83=9D?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 94 +++++++++++++++++++++++++++------ backend/usecases/utils/utils.go | 8 +-- 2 files changed, 82 insertions(+), 20 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index a44af972..27ec2cb0 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -6,13 +6,12 @@ import ( "io" "time" - "github.com/google/uuid" - "golang.org/x/exp/slog" - "context" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" + "github.com/google/uuid" + "golang.org/x/exp/slog" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" boardingrecordRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" @@ -191,13 +190,19 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* return nil, err } + nextStationID, morningFirstStationID, eveningFirstStaionID, err := getStationIDs(i.logger, ctx, bus) + if err != nil { + i.logger.Error("failed to get station IDs", "error", err) + return nil, err + } + if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) return nil, err } return &pb.CreateBusResponse{ - Bus: utils.ToPbBus(bus), + Bus: utils.ToPbBus(bus, nextStationID, morningFirstStationID, eveningFirstStaionID), }, nil } @@ -246,7 +251,13 @@ func (i *Interactor) GetRunningBusByGuardianID(ctx context.Context, req *pb.GetR return nil, err } - return &pb.GetRunningBusByGuardianIdResponse{Bus: utils.ToPbBus(bus)}, nil + nextStationID, morningFirstStationID, eveningFirstStaionID, err := getStationIDs(i.logger, ctx, bus) + if err != nil { + i.logger.Error("failed to get station IDs", "error", err) + return nil, err + } + + return &pb.GetRunningBusByGuardianIdResponse{Bus: utils.ToPbBus(bus, nextStationID, morningFirstStationID, eveningFirstStaionID)}, nil } func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatusRequest) (*pb.ChangeBusStatusResponse, error) { @@ -269,11 +280,11 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu } bus, err := tx.Bus.Query().Where(busRepo.IDEQ(busID)). - WithNursery(). - WithNextStation(). WithMorningFirstStation(). WithEveningFirstStation(). + WithNursery(). Only(ctx) + if err != nil { i.logger.Error("failed to get bus", "error", err) return nil, err @@ -283,14 +294,14 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu update := tx.Bus.UpdateOneID(busID) // バスを停止に変更する場合、次のステーションをクリア switch req.BusStatus { - case pb.BusStatus_BUS_STATUS_RUNNING: - update.ClearNextStation() case pb.BusStatus_BUS_STATUS_STOPPED: + update.ClearNextStation() + case pb.BusStatus_BUS_STATUS_RUNNING: switch req.BusType { case pb.BusType_BUS_TYPE_MORNING: - update.ClearNextStation().SetNextStation(bus.Edges.MorningFirstStation) + update.SetNextStation(bus.Edges.MorningFirstStation) case pb.BusType_BUS_TYPE_EVENING: - update.ClearNextStation().SetNextStation(bus.Edges.EveningFirstStation) + update.SetNextStation(bus.Edges.EveningFirstStation) } } @@ -314,7 +325,7 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu } // Nurseryエッジを持つBusを取得 - bus, err = tx.Bus.Query(). + bus, err = i.entClient.Bus.Query(). Where(busRepo.IDEQ(bus.ID)). WithNursery(). WithNextStation(). @@ -327,11 +338,17 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu return nil, err } + nextStationID, morningFirstStationID, eveningFirstStaionID, err := getStationIDs(i.logger, ctx, bus) + if err != nil { + i.logger.Error("failed to get station IDs", "error", err) + return nil, err + } + if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) return nil, err } - return &pb.ChangeBusStatusResponse{Bus: utils.ToPbBus(bus)}, nil + return &pb.ChangeBusStatusResponse{Bus: utils.ToPbBus(bus, nextStationID, morningFirstStationID, eveningFirstStaionID)}, nil } func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (*pb.UpdateBusResponse, error) { @@ -414,6 +431,13 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* i.logger.Error("failed to retrieve updated bus", "error", err) } + nextStationID, morningFirstStationID, eveningFirstStaionID, err := getStationIDs(i.logger, ctx, updatedBus) + + if err != nil { + i.logger.Error("failed to get station IDs", "error", err) + return nil, err + } + // トランザクションのコミット if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) @@ -422,7 +446,7 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* // レスポンスの生成と返却 return &pb.UpdateBusResponse{ - Bus: utils.ToPbBus(updatedBus), + Bus: utils.ToPbBus(updatedBus, nextStationID, morningFirstStationID, eveningFirstStaionID), }, nil } @@ -682,8 +706,13 @@ func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*e } pbBuses := make([]*pb.Bus, len(entBuses)) - for i, b := range entBuses { - pbBuses[i] = utils.ToPbBus(b) + for index, b := range entBuses { + nextStationID, morningFirstStationID, eveningFirstStaionID, err := getStationIDs(i.logger, ctx, b) // !なんか違う気がする + if err != nil { + i.logger.Error("failed to get station IDs", "error", err) + return nil, err + } + pbBuses[index] = utils.ToPbBus(b, nextStationID, morningFirstStationID, eveningFirstStaionID) } if err := tx.Commit(); err != nil { @@ -765,3 +794,36 @@ func setNextStation(logger slog.Logger, ctx context.Context, tx *ent.Tx, guardia } return nil } + +func getStationIDs(logger *slog.Logger, ctx context.Context, bus *ent.Bus) (nextStationId, morningFirstStationId, eveningFirstStationId string, err error) { + nextStation, err := bus.QueryNextStation().Only(ctx) + if err != nil && !ent.IsNotFound(err) { + logger.Error("failed to query next station", "error", err) + return "", "", "", err + } + if nextStation != nil { + nextStationId = nextStation.ID.String() + } + + morningFirstStation, err := bus.QueryMorningFirstStation().Only(ctx) + if err != nil && !ent.IsNotFound(err) { + logger.Error("failed to query morning first station", "error", err) + return "", "", "", err + } + + if morningFirstStation != nil { + morningFirstStationId = morningFirstStation.ID.String() + } + + eveningFirstStation, err := bus.QueryEveningFirstStation().Only(ctx) + if err != nil && !ent.IsNotFound(err) { + logger.Error("failed to query evening first station", "error", err) + return "", "", "", err + } + + if eveningFirstStation != nil { + eveningFirstStationId = eveningFirstStation.ID.String() + } + + return nextStationId, morningFirstStationId, eveningFirstStationId, nil +} diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index 55f75afc..f310295b 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -66,7 +66,7 @@ func ConvertPbStatusToEntStatus(pbStatus pb.BusStatus) (*busRepo.Status, error) } } -func ToPbBus(t *ent.Bus) *pb.Bus { +func ToPbBus(t *ent.Bus, nextStationID, morningFirstStationID, eveningFirstStationID string) *pb.Bus { busStatus := convertStatusToPbStatus(t.Status) return &pb.Bus{ Id: t.ID.String(), @@ -77,9 +77,9 @@ func ToPbBus(t *ent.Bus) *pb.Bus { Latitude: t.Latitude, Longitude: t.Longitude, EnableFaceRecognition: t.EnableFaceRecognition, - NextStationId: t.Edges.NextStation.ID.String(), - MorningFirstStationId: t.Edges.MorningFirstStation.ID.String(), - EveningFirstStationId: t.Edges.EveningFirstStation.ID.String(), + NextStationId: nextStationID, + MorningFirstStationId: morningFirstStationID, + EveningFirstStationId: eveningFirstStationID, CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, } From ce2773205c7de667b3de7fc3ecc4c75a20beab0e Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Wed, 21 Feb 2024 11:27:58 +0900 Subject: [PATCH 629/771] =?UTF-8?q?fix:=20=E3=82=B9=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=83=BC=E3=83=A0=E3=83=8C=E3=83=AB=E3=83=9D=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 27ec2cb0..aec5ee09 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -503,11 +503,16 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea return fmt.Errorf("failed to get bus: %w", err) } + nextStation, err := bus.QueryNextStation().Only(context.Background()) + if err != nil { + return err + } + if err := stream.Send(&pb.TrackBusContinuousResponse{ BusId: req.BusId, Latitude: bus.Latitude, Longitude: bus.Longitude, - NextStationId: bus.Edges.NextStation.ID.String(), + NextStationId: nextStation.ID.String(), }); err != nil { return fmt.Errorf("failed to send bus: %w", err) } From b4ea32b0a197a4a498c0e2648a66425aa7619b61 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa <65284574+KikyoNanakusa@users.noreply.github.com> Date: Wed, 21 Feb 2024 18:09:08 +0900 Subject: [PATCH 630/771] =?UTF-8?q?feat:station=E4=BD=9C=E6=88=90=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=82=92=E5=AE=9F=E8=A3=85=20(#154)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat:station作成ページを実装 --- frontend/where_child_bus/.gitignore | 1 + .../where_child_bus/android/app/build.gradle | 10 +- .../android/app/src/main/AndroidManifest.xml | 6 +- frontend/where_child_bus/android/build.gradle | 2 +- .../pages/bus_list_page/bus_list_page.dart | 126 ++++---------- .../create_station_page.dart | 162 ++++++++++++++++++ .../create_station_page/locate_user.dart | 40 +++++ .../widget/decide_button.dart | 28 +++ .../widget/google_map.dart | 83 +++++++++ .../widgets/bus_description_text.dart | 32 ++++ .../bus_list_page/widgets/bus_image.dart | 34 ++++ .../bus_list_page/widgets/bus_name_text.dart | 22 +++ .../bus_list_page/widgets/load_fail_text.dart | 15 ++ .../widgets/no_bus_registered_text.dart | 15 ++ .../widgets}/operation_button.dart | 8 +- .../where_child_bus/lib/util/api/station.dart | 59 +++++++ frontend/where_child_bus/pubspec.lock | 104 +++++++++++ frontend/where_child_bus/pubspec.yaml | 2 + 18 files changed, 656 insertions(+), 93 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/locate_user.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/decide_button.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/google_map.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_description_text.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_image.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_name_text.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/widgets/load_fail_text.dart create mode 100644 frontend/where_child_bus/lib/pages/bus_list_page/widgets/no_bus_registered_text.dart rename frontend/where_child_bus/lib/{components/util => pages/bus_list_page/widgets}/operation_button.dart (89%) diff --git a/frontend/where_child_bus/.gitignore b/frontend/where_child_bus/.gitignore index 8919a098..290a0606 100644 --- a/frontend/where_child_bus/.gitignore +++ b/frontend/where_child_bus/.gitignore @@ -29,6 +29,7 @@ lib/generated_plugin_registrant.dart **/android/key.properties **/android/local.properties **/android/**/GeneratedPluginRegistrant.java +**/android/secret.properties # iOS/XCode related **/ios/**/*.mode1v3 diff --git a/frontend/where_child_bus/android/app/build.gradle b/frontend/where_child_bus/android/app/build.gradle index ba77458a..c9141e90 100644 --- a/frontend/where_child_bus/android/app/build.gradle +++ b/frontend/where_child_bus/android/app/build.gradle @@ -12,6 +12,14 @@ if (localPropertiesFile.exists()) { } } +def secretProperties = new Properties() +def secretPropertiesFile = rootProject.file('secret.properties') +if (secretPropertiesFile.exists()) { + secretPropertiesFile.withReader('UTF-8') { reader -> + secretProperties.load(reader) + } +} + def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -45,11 +53,11 @@ android { applicationId "com.example.where_child_bus" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName minSdkVersion 21 //cameraパッケージの使用に必要 + manifestPlaceholders = [googleMapApiKey: secretProperties.getProperty('googleMapApiKey'),] } buildTypes { diff --git a/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml b/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml index f6a5941f..a43c6cbc 100644 --- a/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml +++ b/frontend/where_child_bus/android/app/src/main/AndroidManifest.xml @@ -1,10 +1,14 @@ + + + + + { } Future _fetchBusList() async { - _isLoading = true; + if (mounted) { + setState(() { + _isLoading = true; + }); + } try { GetBusListByNurseryIdResponse busList = @@ -69,12 +79,12 @@ class _BusListPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - body: pageBody(), - floatingActionButton: addBusButton(), + body: _createPageBody(), + floatingActionButton: _createAddBusButton(), ); } - Widget pageBody() { + Widget _createPageBody() { return _isLoading ? const Center( child: CircularProgressIndicator(), @@ -83,25 +93,18 @@ class _BusListPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - if (_isFailLoading) loadFailText(), - if (buses.isEmpty) busNotRegisteredText(), + if (_isFailLoading) LoadFailText(), + if (buses.isEmpty) const NoBusRegisteredText(), Expanded( child: RefreshIndicator( - onRefresh: _fetchBusList, child: listViewBuilder()), + onRefresh: _fetchBusList, child: _listViewBuilder()), ) ], ), ); } - Widget busNotRegisteredText() { - return const Padding( - padding: EdgeInsets.all(20), - child: Text("バスが登録されていません"), - ); - } - - Widget addBusButton() { + Widget _createAddBusButton() { return FloatingActionButton( onPressed: () { Navigator.push( @@ -115,16 +118,16 @@ class _BusListPageState extends State { ); } - Widget listViewBuilder() { + Widget _listViewBuilder() { return ListView.builder( itemCount: buses.length, itemBuilder: (BuildContext context, int index) { - return busListCard(buses[index]); + return _createBusListCard(buses[index]); }, ); } - Widget busListCard(Bus bus) { + Widget _createBusListCard(Bus bus) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: Card( @@ -150,17 +153,21 @@ class _BusListPageState extends State { }, child: Row( children: [ - busPhoto(bus.busStatus), - busNameAndDescription(bus.name, bus.busStatus), + BusImage(busStatus: bus.busStatus), + _createBusNameAndDescription(bus.name, bus.busStatus), const Spacer(), OperationButton( bus: bus, onBusUpdated: (Bus updatedBus) { - int index = buses.indexOf(bus); - if (index != -1) { - setState(() { - buses[index] = updatedBus; - }); + if (bus.busStatus == BusStatus.BUS_STATUS_MAINTENANCE) { + _fetchBusList(); + } else { + int index = buses.indexOf(bus); + if (index != -1) { + setState(() { + buses[index] = updatedBus; + }); + } } }, ), @@ -172,73 +179,16 @@ class _BusListPageState extends State { ); } - Widget busPhoto(BusStatus busStatus) { - late String imagePath; - if (busStatus == BusStatus.BUS_STATUS_RUNNING) { - imagePath = "assets/images/bus_operating.png"; - } else if (busStatus == BusStatus.BUS_STATUS_STOPPED) { - imagePath = "assets/images/bus_not_operating.png"; - } else { - imagePath = "assets/images/bus_maintenance.png"; - } - - return SizedBox( - width: 100, - height: 100, - child: Padding( - padding: const EdgeInsets.all(12.0), - child: Image.asset( - imagePath, - fit: BoxFit.cover, - ), - )); - } - - Widget busName(name) { - return Text( - name, - textAlign: TextAlign.left, - style: const TextStyle( - fontWeight: FontWeight.w600, - fontSize: 22, - ), - ); - } - - Widget busDescription(BusStatus busStatus) { - late String description; - if (busStatus == BusStatus.BUS_STATUS_RUNNING) { - description = "運行中"; - } else if (busStatus == BusStatus.BUS_STATUS_MAINTENANCE) { - description = "経路未設定"; - } else { - description = "停止中"; - } - return Text( - description, - style: const TextStyle( - color: Colors.grey, - fontSize: 16, - ), - overflow: TextOverflow.ellipsis, - maxLines: 2, - ); - } - - Widget busNameAndDescription(String name, BusStatus busStatus) { + Widget _createBusNameAndDescription(String name, BusStatus busStatus) { return Padding( padding: const EdgeInsets.all(10), child: Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [busName(name), busDescription(busStatus)], + children: [ + BusNameText(name: name), + BusDescriptionText(busStatus: busStatus) + ], ), ); } - - Widget loadFailText() { - return const Text( - "バスのロードに失敗しました", - style: TextStyle(color: Colors.red, fontSize: 16), - ); - } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart new file mode 100644 index 00000000..14a9565f --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart @@ -0,0 +1,162 @@ +import 'dart:developer' as developer; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:where_child_bus/pages/bus_list_page/create_station_page/widget/decide_button.dart'; +import 'package:where_child_bus/pages/bus_list_page/create_station_page/widget/google_map.dart'; +import 'package:where_child_bus/util/api/station.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class CreateStationPage extends StatefulWidget { + final Bus bus; + + const CreateStationPage({super.key, required this.bus}); + + @override + State createState() => _CreateStationPageState(); +} + +class _CreateStationPageState extends State { + bool _isLoading = false; + bool _isFailLoading = false; + bool _isLoadingUpdate = false; + List guardians = []; + List stations = []; + Set _markers = {}; + int _index = 0; + + Future _fetchGuardians() async { + _isLoading = true; + + try { + var res = await getUnregisteredStations(widget.bus.id); + if (mounted) { + setState(() { + guardians = res.guardians; + stations = res.stations; + _isLoading = false; + }); + } + } catch (e) { + if (kDebugMode) { + developer.log("保護者リストのロード中にエラーが発生しました: $e"); + } + setState(() => {_isLoading = false, _isFailLoading = true}); + } + } + + void _onMapTapped(Set markers) { + developer.log("マップがタップされました ${markers.first.position}"); + setState(() { + _markers = markers; + }); + } + + Future _onButtonPressed() async { + setState(() { + _isLoadingUpdate = true; + }); + + if (_markers.isEmpty) { + return; + } + + try { + var res = await updateStation(stations[_index].id, widget.bus.id, + _markers.first.position.latitude, _markers.first.position.longitude); + developer.log("バス停の更新が完了しました"); + setState(() { + _markers.clear(); + if (_index < guardians.length - 1) { + _index++; + developer.log("index: $_index"); + } else { + Navigator.of(context).pop(); + } + _isLoadingUpdate = false; + }); + } catch (e) { + if (kDebugMode) { + developer.log("バス停の更新中にエラーが発生しました: $e"); + } + } + + setState(() { + _isLoadingUpdate = false; + }); + } + + @override + void initState() { + super.initState(); + _fetchGuardians(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('新規バス停作成'), + ), + body: _createPageBody(), + ); + } + + Widget _createPageBody() { + return Column( + // SingleChildScrollViewを削除し、Columnを直接使用 + children: [ + if (_isLoading) + const Expanded( + // CircularProgressIndicatorを中央に表示 + child: Center(child: CircularProgressIndicator()), + ) + else if (_isFailLoading) + const Expanded( + // エラーメッセージを中央に表示 + child: Center(child: Text('保護者リストの取得に失敗しました')), + ) + else + Expanded( + // GoogleMapを表示するためにExpandedを使用 + flex: 7, // 画面の7割をGoogleMapに割り当てる + child: GoogleMapWidget( + onTapped: _onMapTapped, + ), + ), + _isLoading + ? Container() + : SizedBox( + width: MediaQuery.of(context).size.width, + child: Expanded( + flex: 3, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: EdgeInsets.all(10), + child: Text( + '${guardians[_index].name}さん', + style: TextStyle(fontSize: 20), + ), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10.0, vertical: 8.0), + child: PositionDecideButton( + onPressed: + _markers.isNotEmpty ? _onButtonPressed : () {}, + text: _markers.isNotEmpty + ? 'バス停を決定する' + : '地図をタップしてバス停を決定してください', + isLoading: _isLoadingUpdate, + ), + ), + ], + ), + ), + ) + ], + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/locate_user.dart b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/locate_user.dart new file mode 100644 index 00000000..85dfca40 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/locate_user.dart @@ -0,0 +1,40 @@ +import 'package:flutter/foundation.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:location/location.dart'; + +Future locateUser( + GoogleMapController mapController, VoidCallback? onLocate) async { + Location location = new Location(); + + bool _serviceEnabled; + PermissionStatus _permissionGranted; + LocationData _locationData; + + _serviceEnabled = await location.serviceEnabled(); + if (!_serviceEnabled) { + _serviceEnabled = await location.requestService(); + if (!_serviceEnabled) { + return; + } + } + + _permissionGranted = await location.hasPermission(); + if (_permissionGranted == PermissionStatus.denied) { + _permissionGranted = await location.requestPermission(); + if (_permissionGranted != PermissionStatus.granted) { + return; + } + } + + _locationData = await location.getLocation(); + mapController.animateCamera( + CameraUpdate.newCameraPosition( + CameraPosition( + target: LatLng(_locationData.latitude!, _locationData.longitude!), + zoom: 15.0, + ), + ), + ); + + onLocate?.call(); +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/decide_button.dart b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/decide_button.dart new file mode 100644 index 00000000..69f9731b --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/decide_button.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; + +class PositionDecideButton extends StatelessWidget { + final Function() onPressed; + final String text; + final bool isLoading; + + const PositionDecideButton({ + Key? key, + required this.onPressed, + required this.text, + required this.isLoading, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: SizedBox( + height: 50, + child: ElevatedButton( + onPressed: onPressed, + child: isLoading ? const CircularProgressIndicator() : Text(text), + ), + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/google_map.dart b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/google_map.dart new file mode 100644 index 00000000..250ce459 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/google_map.dart @@ -0,0 +1,83 @@ +import "dart:developer" as developer; +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:where_child_bus/pages/bus_list_page/create_station_page/locate_user.dart'; + +class GoogleMapWidget extends StatefulWidget { + Function(Set) onTapped; + + GoogleMapWidget({super.key, required this.onTapped}); + + @override + State createState() => _GoogleMapWidgetState(); +} + +class _GoogleMapWidgetState extends State { + late GoogleMapController mapController; + Set _markers = {}; + + final LatLng _center = const LatLng(35.68145403034362, 139.76707116150914); + + bool _isLoading = false; + + void _onLoad() { + setState(() { + _isLoading = false; + }); + } + + void _onMapCreated(GoogleMapController controller) { + developer.log("GoogleMapControllerが作成されました"); + mapController = controller; + locateUser(mapController, _onLoad); + } + + void _onMapTapped(LatLng position) { + setState(() { + // 既存のマーカーをクリア + _markers.clear(); + + // 新しいマーカーのID + final markerId = MarkerId("unique_id"); + + // 新しいマーカーの作成 + final marker = Marker( + markerId: markerId, + position: position, + ); + + // 新しいマーカーをセットに追加 + _markers.add(marker); + }); + + widget.onTapped?.call(_markers); + } + + @override + void initState() { + super.initState(); + _isLoading = true; + } + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + GoogleMap( + onMapCreated: _onMapCreated, + initialCameraPosition: CameraPosition( + target: _center, + zoom: 11.0, + ), + onTap: _onMapTapped, + markers: _markers, + myLocationEnabled: true, + ), + if (_isLoading) // マップが読み込まれていない間はローディングインジケーターを表示 + const Center( + child: CircularProgressIndicator(), + ), + ], + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_description_text.dart b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_description_text.dart new file mode 100644 index 00000000..e3b73614 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_description_text.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class BusDescriptionText extends StatelessWidget { + const BusDescriptionText({ + super.key, + required this.busStatus, + }); + + final BusStatus busStatus; + + @override + Widget build(BuildContext context) { + late String description; + if (busStatus == BusStatus.BUS_STATUS_RUNNING) { + description = "運行中"; + } else if (busStatus == BusStatus.BUS_STATUS_MAINTENANCE) { + description = "経路未設定"; + } else { + description = "停止中"; + } + return Text( + description, + style: const TextStyle( + color: Colors.grey, + fontSize: 16, + ), + overflow: TextOverflow.ellipsis, + maxLines: 2, + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_image.dart b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_image.dart new file mode 100644 index 00000000..96ad9ef9 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_image.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class BusImage extends StatelessWidget { + const BusImage({ + super.key, + required this.busStatus, + }); + + final BusStatus busStatus; + + @override + Widget build(BuildContext context) { + late String imagePath; + if (busStatus == BusStatus.BUS_STATUS_RUNNING) { + imagePath = "assets/images/bus_operating.png"; + } else if (busStatus == BusStatus.BUS_STATUS_STOPPED) { + imagePath = "assets/images/bus_not_operating.png"; + } else { + imagePath = "assets/images/bus_maintenance.png"; + } + + return SizedBox( + width: 100, + height: 100, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Image.asset( + imagePath, + fit: BoxFit.cover, + ), + )); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_name_text.dart b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_name_text.dart new file mode 100644 index 00000000..f92063fb --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_name_text.dart @@ -0,0 +1,22 @@ +import 'package:flutter/material.dart'; + +class BusNameText extends StatelessWidget { + const BusNameText({ + super.key, + required this.name, + }); + + final String name; + + @override + Widget build(BuildContext context) { + return Text( + name, + textAlign: TextAlign.left, + style: const TextStyle( + fontWeight: FontWeight.w600, + fontSize: 22, + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/widgets/load_fail_text.dart b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/load_fail_text.dart new file mode 100644 index 00000000..55e875b0 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/load_fail_text.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class LoadFailText extends StatelessWidget { + const LoadFailText({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return const Text( + "バスのロードに失敗しました", + style: TextStyle(color: Colors.red, fontSize: 16), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/widgets/no_bus_registered_text.dart b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/no_bus_registered_text.dart new file mode 100644 index 00000000..573109e8 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/no_bus_registered_text.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class NoBusRegisteredText extends StatelessWidget { + const NoBusRegisteredText({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return const Padding( + padding: EdgeInsets.all(20), + child: Text("バスが登録されていません"), + ); + } +} diff --git a/frontend/where_child_bus/lib/components/util/operation_button.dart b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/operation_button.dart similarity index 89% rename from frontend/where_child_bus/lib/components/util/operation_button.dart rename to frontend/where_child_bus/lib/pages/bus_list_page/widgets/operation_button.dart index e5f6e8a7..6750ab5e 100644 --- a/frontend/where_child_bus/lib/components/util/operation_button.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/operation_button.dart @@ -1,7 +1,7 @@ import 'dart:developer' as developer; -import 'dart:ffi'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/bus_list_page/create_station_page/create_station_page.dart'; import 'package:where_child_bus/util/api/bus.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -76,7 +76,11 @@ class _OperationButtonState extends State { case BusStatus.BUS_STATUS_MAINTENANCE: buttonColor = Colors.lime; buttonText = "設定"; - onPressed = () {}; + onPressed = () => { + Navigator.push(context, MaterialPageRoute(builder: (context) { + return CreateStationPage(bus: widget.bus); + })).then((_) => widget.onBusUpdated(widget.bus)) + }; break; default: buttonColor = Colors.red; diff --git a/frontend/where_child_bus/lib/util/api/station.dart b/frontend/where_child_bus/lib/util/api/station.dart index 2f39a668..f97ba8d4 100644 --- a/frontend/where_child_bus/lib/util/api/station.dart +++ b/frontend/where_child_bus/lib/util/api/station.dart @@ -3,6 +3,7 @@ import "dart:developer" as developer; import "package:flutter/foundation.dart"; import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/station.pbgrpc.dart"; Future getStationListByBusId( @@ -34,3 +35,61 @@ Future getStationListByBusId( return Future.error(error); } } + +Future getUnregisteredStations( + String busId) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + + final grpcClient = StationServiceClient(channel); + + try { + var req = GetUnregisteredStationListRequest(busId: busId); + var res = await grpcClient.getUnregisteredStationList(req); + if (kDebugMode) { + developer.log("リクエスト: $req"); + developer.log("レスポンス: ${res.stations}"); + } + return res; + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } finally { + await channel.shutdown(); + } +} + +Future updateStation( + String stationId, + String busId, + double latitude, + double longitude, +) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + + final grpcClient = StationServiceClient(channel); + + try { + var req = UpdateStationRequest( + id: stationId, + busId: busId, + latitude: latitude, + longitude: longitude, + updateMask: FieldMask(paths: ["latitude", "longitude"])); + var res = await grpcClient.updateStation(req); + if (kDebugMode) { + developer.log("リクエスト: $req"); + developer.log("レスポンス: $res"); + } + } catch (error) { + developer.log("Caught Error:", error: error); + return Future.error(error); + } finally { + await channel.shutdown(); + } +} diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index c5a9510a..a183c343 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -121,6 +121,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" cupertino_icons: dependency: "direct main" description: @@ -240,6 +248,54 @@ packages: description: flutter source: sdk version: "0.0.0" + google_maps: + dependency: transitive + description: + name: google_maps + sha256: "555d5d736339b0478e821167ac521c810d7b51c3b2734e6802a9f046b64ea37a" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + google_maps_flutter: + dependency: "direct main" + description: + name: google_maps_flutter + sha256: ae66fef3e71261d7df2eff29b2a119e190b2884325ecaa55321b1e17b5504066 + url: "https://pub.dev" + source: hosted + version: "2.5.3" + google_maps_flutter_android: + dependency: transitive + description: + name: google_maps_flutter_android + sha256: "714530f865f13bb3b9505c58821c3baed5d247a871724acf5d2ea5808fbed02c" + url: "https://pub.dev" + source: hosted + version: "2.6.2" + google_maps_flutter_ios: + dependency: transitive + description: + name: google_maps_flutter_ios + sha256: "29503b5159da2308a66212c3827963998bfb943ba073e2114fb2d486b47fd2c8" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + google_maps_flutter_platform_interface: + dependency: transitive + description: + name: google_maps_flutter_platform_interface + sha256: "6060779f020638a8eedeb0fb14234818e5fa32ec45a4653d6428ab436e2bbc64" + url: "https://pub.dev" + source: hosted + version: "2.4.3" + google_maps_flutter_web: + dependency: transitive + description: + name: google_maps_flutter_web + sha256: "6245721c160d6f531c1ef568cf9bef8d660cd585a982aa75121269030163785a" + url: "https://pub.dev" + source: hosted + version: "0.5.4+3" googleapis_auth: dependency: transitive description: @@ -256,6 +312,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.4" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" http: dependency: transitive description: @@ -360,6 +424,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.7" + js_wrapping: + dependency: transitive + description: + name: js_wrapping + sha256: e385980f7c76a8c1c9a560dfb623b890975841542471eade630b2871d243851c + url: "https://pub.dev" + source: hosted + version: "0.7.4" lints: dependency: transitive description: @@ -368,6 +440,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + location: + dependency: "direct main" + description: + name: location + sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + location_platform_interface: + dependency: transitive + description: + name: location_platform_interface + sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + location_web: + dependency: transitive + description: + name: location_web + sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + url: "https://pub.dev" + source: hosted + version: "4.2.0" matcher: dependency: transitive description: @@ -504,6 +600,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.27.7" + sanitize_html: + dependency: transitive + description: + name: sanitize_html + sha256: "12669c4a913688a26555323fb9cec373d8f9fbe091f2d01c40c723b33caa8989" + url: "https://pub.dev" + source: hosted + version: "2.1.0" sky_engine: dependency: transitive description: flutter diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 78b43207..706d18cd 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -17,7 +17,9 @@ dependencies: flutter_cache_manager: ^3.3.1 camera: ^0.10.5+9 image: ^4.1.7 + google_maps_flutter: ^2.5.3 collection: ^1.18.0 + location: ^5.0.3 where_child_bus_api: path: ../where_child_bus_api From dc21bf5d4062539e4dc8b9f33f0f49662f45f5df Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 21 Feb 2024 18:48:32 +0900 Subject: [PATCH 631/771] =?UTF-8?q?feat:=E5=88=B0=E7=9D=80=E6=99=82?= =?UTF-8?q?=E5=88=BB=E3=80=81=E3=83=90=E3=82=B9=E3=81=AE=E7=8F=BE=E5=9C=A8?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E3=81=AE=E5=8F=96=E5=BE=97=E3=83=BB=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=82=92=E8=BF=BD=E5=8A=A0Co-authored-by:=20=E3=81=8B?= =?UTF-8?q?=E3=82=8F=E3=81=8D=E3=82=93=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/lib/app.dart | 3 +- .../lib/components/utils/google_map_view.dart | 95 +++++----- .../components/bus_to_bus_stop_time.dart | 177 +++++++++++------- .../map_page/components/map_page_bottom.dart | 58 +++--- .../lib/pages/map_page/map_page.dart | 59 ++++-- 5 files changed, 246 insertions(+), 146 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index d44c323a..05b4d21b 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -24,7 +24,7 @@ class _AppState extends State { @override void initState() { super.initState(); - _hasRunningBus = false; + _hasRunningBus = true; guardian = GuardianData().getGuardian(); _loadRunningBus(); } @@ -32,7 +32,6 @@ class _AppState extends State { Future _loadRunningBus() async { try { var busRes = await getRunningBusByGuardianIdService(guardian.id); - _hasRunningBus = true; } catch (e) { _hasRunningBus = false; } diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index a7463608..9a8e3ca1 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -1,4 +1,6 @@ import 'package:flutter/material.dart'; +import 'dart:developer' as developer; +import 'dart:async'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart'; @@ -27,7 +29,7 @@ class _GoogleMapView extends State { const CameraPosition(target: LatLng(0.0, 0.0), zoom: 14); late GoogleMapController mapController; - + Timer? _timer; Map markers = {}; Map polylines = {}; List polylineCoordinates = []; @@ -37,16 +39,27 @@ class _GoogleMapView extends State { @override void initState() { super.initState(); - _addMarker(LatLng(widget.nurseryLatitude, widget.nurseryLongitude), "保育園", - BitmapDescriptor.defaultMarker); - _addMarker(LatLng(widget.busLatitude, widget.busLongitude), "バス", - BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueBlue)); + if (mounted) { + setState(() { + _addMarker(LatLng(widget.nurseryLatitude, widget.nurseryLongitude), + "保育園", BitmapDescriptor.defaultMarker); - widget.waypoints.forEach((Waypoint waypoint) { - _addMarker(LatLng(waypoint.latitude, waypoint.longitude), waypoint.name, - BitmapDescriptor.defaultMarkerWithHue(90)); - }); + _addMarker(LatLng(widget.busLatitude, widget.busLongitude), "バス", + BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueBlue)); + + widget.waypoints.forEach((Waypoint waypoint) { + _addMarker(LatLng(waypoint.latitude, waypoint.longitude), + waypoint.name, BitmapDescriptor.defaultMarkerWithHue(90)); + }); + }); + } + } + + @override + void dispose() { + _timer?.cancel(); + super.dispose(); } @override @@ -56,28 +69,38 @@ class _GoogleMapView extends State { child: ClipRRect( borderRadius: BorderRadius.circular(20.0), child: SizedBox( - width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height * 0.5, - child: GoogleMap( - initialCameraPosition: _initialLocation, - mapType: MapType.normal, - onMapCreated: (GoogleMapController controller) { - mapController = controller; - _getPolyline(widget.waypoints); - }, - markers: Set.of(markers.values), - polylines: Set.of(polylines.values), - )))); + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.5, + child: googleMapBody(), + ))); } - _addMarker(LatLng position, String id, BitmapDescriptor descriptor) { + Widget googleMapBody() { + _addMarker(LatLng(widget.busLatitude, widget.busLongitude), "バス", + BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueBlue)); + + return GoogleMap( + initialCameraPosition: _initialLocation, + mapType: MapType.normal, + onMapCreated: (GoogleMapController controller) { + mapController = controller; + _getPolyline(widget.waypoints); + }, + markers: Set.of(markers.values), + polylines: Set.of(polylines.values), + ); + } + + void _addMarker(LatLng position, String id, BitmapDescriptor descriptor) { MarkerId markerId = MarkerId(id); Marker marker = Marker(markerId: markerId, icon: descriptor, position: position); - markers[markerId] = marker; + setState(() { + markers[markerId] = marker; + }); } - _addPolyline() { + void _addPolyline() { PolylineId id = const PolylineId('poly'); Polyline polyline = Polyline( polylineId: id, @@ -88,7 +111,7 @@ class _GoogleMapView extends State { setState(() {}); } - _getPolyline(List waypoints) async { + void _getPolyline(List waypoints) async { List polylineWayPoints = waypoints .map((waypoint) => PolylineWayPoint( location: "${waypoint.latitude},${waypoint.longitude}")) @@ -118,24 +141,8 @@ class _GoogleMapView extends State { print(e); } - if (polylineCoordinates.isNotEmpty) { - double minLat = polylineCoordinates.first.latitude; - double maxLat = polylineCoordinates.first.latitude; - double minLng = polylineCoordinates.first.longitude; - double maxLng = polylineCoordinates.first.longitude; - - for (LatLng point in polylineCoordinates) { - if (point.latitude < minLat) minLat = point.latitude; - if (point.latitude > maxLat) maxLat = point.latitude; - if (point.longitude < minLng) minLng = point.longitude; - if (point.longitude > maxLng) maxLng = point.longitude; - } - - LatLngBounds bounds = LatLngBounds( - southwest: LatLng(minLat, minLng), - northeast: LatLng(maxLat, maxLng), - ); - mapController.animateCamera(CameraUpdate.newLatLngBounds(bounds, 100)); - } + mapController.animateCamera(CameraUpdate.newCameraPosition(CameraPosition( + target: LatLng(widget.nurseryLatitude, widget.nurseryLongitude), + zoom: 14))); } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart index a3a8735d..3f46f3ac 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart @@ -3,35 +3,99 @@ import "dart:developer" as developer; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:http/http.dart' as http; import 'dart:convert'; -import 'dart:math' as math; +import 'dart:async'; import '../map_page.dart'; import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BusToBusStopTime extends StatefulWidget { + final Bus bus; final List waypoints; + final String nextStationId; double busLatitude, busLongitude; double guardianLatitude, guardianLongitude; BusToBusStopTime( - {super.key, + {Key? key, + required this.bus, required this.waypoints, + required this.nextStationId, required this.busLatitude, required this.busLongitude, required this.guardianLatitude, - required this.guardianLongitude}); + required this.guardianLongitude}) + : super(key: key); @override State createState() => _BusToBusStopTimeState(); } class _BusToBusStopTimeState extends State { - String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); - String busToBusStopTime = ''; + final String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); + String busToBusStopTime = 'Loading...'; + Timer? _timer; + double morningFirstStationLatitude = 0.0, morningFirstStationLongitude = 0.0; + double eveningFirstStationLatitude = 0.0, eveningFirstStationLongitude = 0.0; + double nextStationLatitude = 0.0, nextStationLongitude = 0.0; @override void initState() { super.initState(); - setArrivalTime(); + initArrivalTime(); + _timer = Timer.periodic( + const Duration(minutes: 1), (Timer t) => initArrivalTime()); + } + + @override + void dispose() { + _timer?.cancel(); + super.dispose(); + } + + Future initArrivalTime() async { + _loadEveningFirstStation(); + _loadEveningFirstStation(); + _loadFirstAndNextStation(); + await setArrivalTime(); + } + + Future _loadMorningFirstStation() async { + for (var waypoint in widget.waypoints) { + if (waypoint.name == widget.bus.morningFirstStationId) { + if (mounted) { + setState(() { + morningFirstStationLatitude = waypoint.latitude; + morningFirstStationLongitude = waypoint.longitude; + }); + } + } + } + } + + Future _loadEveningFirstStation() async { + for (var waypoint in widget.waypoints) { + if (waypoint.name == widget.bus.eveningFirstStationId) { + if (mounted) { + setState(() { + eveningFirstStationLatitude = waypoint.latitude; + eveningFirstStationLongitude = waypoint.longitude; + }); + } + } + } + } + + Future _loadFirstAndNextStation() async { + for (var waypoint in widget.waypoints) { + if (waypoint.name == widget.bus.nextStationId) { + if (mounted) { + setState(() { + nextStationLatitude = waypoint.latitude; + nextStationLongitude = waypoint.longitude; + }); + } + } + } } @override @@ -42,72 +106,85 @@ class _BusToBusStopTimeState extends State { ); } - void setArrivalTime() async { + Future setArrivalTime() async { try { - final double? durationInSeconds = await getArrivalTime( + final int? durationInSeconds = await getArrivalTime( widget.busLatitude, widget.busLongitude, widget.guardianLatitude, widget.guardianLongitude, widget.waypoints, + nextStationLatitude, + nextStationLongitude, ); - // durationInSecondsがnullでないことを確認し、分単位に変換 + developer.log('$durationInSeconds'); + if (durationInSeconds != null) { - final int durationInMinutes = (durationInSeconds / 60).toInt(); + final int durationInMinutes = (durationInSeconds ~/ 60); final String formattedBusToBusStopTime = durationInMinutes.toString(); setState(() { busToBusStopTime = formattedBusToBusStopTime; }); } else { - // getArrivalTimeがnullを返した場合、エラー処理やデフォルト値の設定をここで行う setState(() { - busToBusStopTime = "N/A"; // 例: 到着時間を計算できない場合のデフォルト値 + busToBusStopTime = "N/A"; }); } } catch (e) { - // 例外が発生した場合のエラーハンドリング developer.log('到着時間の取得中にエラーが発生しました', error: e, name: "BusStopTimeError"); setState(() { - busToBusStopTime = "Error"; // エラーが発生したことを示す値 + busToBusStopTime = "Error"; }); } } - Future getArrivalTime(double startLat, double startLng, - double endLat, double endLng, List waypoints) async { - String apiKey = dotenv.get("GOOGLE_MAP_API_KEY"); - - // 最寄りの経由地を見つける - int nearestWaypointIndex = - findNearestWaypointIndex(startLat, startLng, waypoints); - - // URLの基本部分を設定 - String baseUrl = 'https://maps.googleapis.com/maps/api/directions/json'; + Future getArrivalTime( + double startLat, + double startLng, + double endLat, + double endLng, + List waypoints, + double nextLat, + double nextLng) async { + developer.log('bus_to_bus_stop_time.dart waypoints: $waypoints'); + String waypointsString = + _generateWaypointsString(waypoints, nextLat, nextLng, endLat, endLng); - // 経由地をURLパラメータ形式で生成 - String waypointsString = _generateWaypointsString( - nearestWaypointIndex, waypoints, endLat, endLng); + developer.log('waypointsString: $waypointsString'); - // リクエストURLを組み立て String url = - '$baseUrl?destination=$endLat,$endLng&origin=$startLat,$startLng&waypoints=$waypointsString&key=$apiKey'; + 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&waypoints=$waypointsString&key=$googleApiKey'; // Google Maps APIからのレスポンスを取得 http.Response? response = await _fetchDirections(url); + developer.log('response: $response'); // レスポンスデータから所要時間を抽出 return _parseDurationFromResponse(response); } - String _generateWaypointsString( - int startIndex, List waypoints, double endLat, double endLng) { + String _generateWaypointsString(List waypoints, double startLat, + double startLng, double endLat, double endLng) { + int startIndex = waypoints.indexWhere( + (point) => point.latitude == startLat && point.longitude == startLng); int endIndex = waypoints.indexWhere( (point) => point.latitude == endLat && point.longitude == endLng); - if (endIndex == -1) { + + // startIndex が -1 の場合は、リストの最初から処理を開始 + if (startIndex == -1) { + startIndex = 0; + } + + // endIndex が -1 の場合、リストの終わりまで処理 + if (endIndex == -1 || endIndex < startIndex) { endIndex = waypoints.length; } + + developer.log("$waypoints"); + + // startIndex から endIndex までのサブリストを作成 return waypoints .sublist(startIndex, endIndex) .map((point) => 'via:${point.latitude},${point.longitude}') @@ -115,10 +192,6 @@ class _BusToBusStopTimeState extends State { } Future _fetchDirections(String url) async { - if (!GoogleMapApiManager.canSendRequest()) { - developer.log('Request limit reached.'); - return null; - } final response = await http.get(Uri.parse(url)); if (response.statusCode != 200) { developer.log( @@ -128,7 +201,7 @@ class _BusToBusStopTimeState extends State { return response; } - double? _parseDurationFromResponse(http.Response? response) { + int? _parseDurationFromResponse(http.Response? response) { if (response == null) return null; final data = json.decode(response.body); @@ -138,35 +211,7 @@ class _BusToBusStopTimeState extends State { } final route = data['routes'][0]; - final duration = route['legs'][0]['duration']['value'] as double?; + final int duration = route['legs'][0]['duration']['value']; return duration; } - - int findNearestWaypointIndex( - double busLat, double busLng, List waypoints) { - int nearestIndex = 0; - double nearestDistance = double.infinity; - - for (int i = 0; i < waypoints.length; i++) { - double distance = calculateDistance( - busLat, busLng, waypoints[i].latitude, waypoints[i].longitude); - if (distance < nearestDistance) { - nearestDistance = distance; - nearestIndex = i; - } - } - - return nearestIndex; - } - - double calculateDistance(double lat1, double lon1, double lat2, double lon2) { - var p = 0.017453292519943295; - var a = 0.5 - - math.cos((lat2 - lat1) * p) / 2 + - math.cos(lat1 * p) * - math.cos(lat2 * p) * - (1 - math.cos((lon2 - lon1) * p)) / - 2; - return 12742 * math.asin(math.sqrt(a)); - } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart index 481c9ed9..f402b6a2 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart @@ -8,8 +8,10 @@ import '../../styles/styles.dart'; class MapPageBottom extends StatefulWidget { final GuardianResponse guardian; + final Bus bus; final List stations; final List waypoints; + final String nextStationId; final double busLatitude; final double busLongitude; final double nurseryLatitude; @@ -18,8 +20,10 @@ class MapPageBottom extends StatefulWidget { const MapPageBottom( {Key? key, required this.guardian, + required this.bus, required this.stations, required this.waypoints, + required this.nextStationId, required this.busLatitude, required this.busLongitude, required this.nurseryLatitude, @@ -37,6 +41,12 @@ class _MapPageBottomState extends State { void initState() { super.initState(); _loadGuardianStationData(); + if (mounted) { + setState(() { + widget.guardian.isUseEveningBus = widget.guardian.isUseEveningBus; + widget.guardian.isUseEveningBus = widget.guardian.isUseEveningBus; + }); + } } Future _loadGuardianStationData() async { @@ -65,8 +75,8 @@ class _MapPageBottomState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ arrivalTimeBody(), - isRideScheduled("朝のバス", widget.guardian.isUseMorningBus), - isRideScheduled("夕方のバス", widget.guardian.isUseEveningBus), + // isRideScheduled("朝のバス", widget.guardian.isUseMorningBus), + // isRideScheduled("夕方のバス", widget.guardian.isUseEveningBus), ], ), ), @@ -81,7 +91,9 @@ class _MapPageBottomState extends State { fieldTitleAndTime( "到着まで", BusToBusStopTime( + bus: widget.bus, waypoints: widget.waypoints, + nextStationId: widget.nextStationId, busLatitude: widget.busLatitude, busLongitude: widget.busLongitude, guardianLatitude: guardianStation.latitude, @@ -108,25 +120,25 @@ class _MapPageBottomState extends State { ); } - Widget isRideScheduled(String busName, bool isRide) { - return Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text("${busName}の乗車予定: "), - SizedBox(width: MediaQuery.of(context).size.width * 0.05), - Container( - width: MediaQuery.of(context).size.width * 0.3, - decoration: statusFieldDecoration(isRide), - child: Padding( - padding: const EdgeInsets.all(5.0), - child: Text( - isRide ? "あり" : "なし", - style: statusFieldTextStyle(isRide), - textAlign: TextAlign.center, - )), - ) - ], - ); - } + // Widget isRideScheduled(String busName, bool isRide) { + // return Row( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // Text("${busName}の乗車予定: "), + // SizedBox(width: MediaQuery.of(context).size.width * 0.05), + // Container( + // width: MediaQuery.of(context).size.width * 0.3, + // decoration: statusFieldDecoration(isRide), + // child: Padding( + // padding: const EdgeInsets.all(5.0), + // child: Text( + // isRide ? "あり" : "なし", + // style: statusFieldTextStyle(isRide), + // textAlign: TextAlign.center, + // )), + // ) + // ], + // ); + // } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 33bbe3a6..5b61d850 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -2,9 +2,11 @@ import 'dart:async'; import 'dart:developer' as developer; import 'package:flutter/material.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:grpc/grpc.dart'; import 'package:http/http.dart' as http; import 'dart:convert'; import 'package:where_child_bus_guardian/components/utils/google_map_view.dart'; +import 'package:where_child_bus_guardian/config/config.dart'; import 'package:where_child_bus_guardian/pages/map_page/components/map_page_bottom.dart'; import 'package:where_child_bus_guardian/service/get_running_bus_by_guardian_id.dart'; import 'package:where_child_bus_guardian/service/get_station_list_by_bus_id.dart'; @@ -33,8 +35,10 @@ class MapPage extends StatefulWidget { } class _MapPageState extends State { - final _controller = StreamController(); + final StreamController _streamController = + StreamController.broadcast(); + Timer? _timer; String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); List stations = []; List waypoints = []; @@ -43,6 +47,7 @@ class _MapPageState extends State { Bus bus = Bus(); NurseryResponse nursery = NurseryResponse(); String? nurseryAddress; + String nextStationId = ""; double busLatitude = 0.0; double busLongitude = 0.0; double nurseryLatitude = 0.0; @@ -53,9 +58,36 @@ class _MapPageState extends State { @override void initState() { super.initState(); + developer.log("初期化開始", name: "Initialize"); _initializePage(); } + Future trackBusContinuous() async { + final channel = ClientChannel(appConfig.grpcEndpoint, + port: appConfig.grpcPort, options: const ChannelOptions()); + final grpcClient = BusServiceClient(channel); + + try { + developer.log("バスの追跡開始", name: "TrackBusContinuous"); + // TrackBusContinuousRequestを生成して、バスの追跡を開始 + var request = TrackBusContinuousRequest(busId: bus.id); + await for (var response in grpcClient.trackBusContinuous(request)) { + // レスポンスを受け取り、緯度と経度を更新 + setState(() { + busLatitude = response.latitude; + busLongitude = response.longitude; + developer.log("$busLatitude, $busLongitude", + name: "TrackBusContinuous"); + }); + await Future.delayed(const Duration(seconds: 1)); + } + } catch (error) { + developer.log("Caught Error", error: error); + } finally { + await channel.shutdown(); + } + } + Future _initializePage() async { setState(() { _isLoading = true; @@ -63,11 +95,14 @@ class _MapPageState extends State { try { await _loadBusData(); + developer.log("バスの読み込み完了", name: "LoadBusData"); + trackBusContinuous(); // ストリームではなく、直接リクエストを送信 await _loadStationsData(); + developer.log("停留所の読み込み完了", name: "LoadStationsData"); await _createWayPointsFromStations(); + developer.log("経由地の読み込み完了", name: "LoadWaypointData"); await _loadNurseryData(); await _getNurseryCoordinates(); - _loadBusLocation(); } catch (e) { developer.log('初期化中にエラーが発生しました: $e'); } finally { @@ -79,15 +114,10 @@ class _MapPageState extends State { } } - void _loadBusLocation() { - _controller.stream.listen((val) { - if (mounted) { - setState(() { - busLatitude = val.latitude; - busLongitude = val.longitude; - }); - } - }); + @override + void dispose() { + _streamController.close(); + super.dispose(); } Future _loadBusData() async { @@ -112,6 +142,7 @@ class _MapPageState extends State { stations = stationsRes.stations; }); } + developer.log('map_page.dart stations: ${stations}'); } catch (error) { developer.log('停留所リストの読み込みに失敗しました: $error'); } @@ -122,12 +153,16 @@ class _MapPageState extends State { developer.log("Waypointsの作成開始", name: "CreateWaypointsFromStations"); if (mounted) { for (var station in stations) { + developer.log("Waypointsの作成中 ${station.id}", + name: "CreateWaypointsFromStations"); waypoints.add(Waypoint( latitude: station.latitude, longitude: station.longitude, name: station.id.toString())); } } + developer.log("Waypointsの作成終了 $waypoints", + name: "CreateWaypointsFromStations"); } catch (error) { developer.log('経由地の読み込みに失敗しました: $error'); } @@ -187,8 +222,10 @@ class _MapPageState extends State { ), MapPageBottom( guardian: guardian, + bus: bus, stations: stations, waypoints: waypoints, + nextStationId: nextStationId, busLatitude: busLatitude, busLongitude: busLongitude, nurseryLatitude: nurseryLatitude, From b2c0ee5506368a9575c030cc5fd84a16911be10b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa <65284574+KikyoNanakusa@users.noreply.github.com> Date: Wed, 21 Feb 2024 19:26:33 +0900 Subject: [PATCH 632/771] Chore/frontend/nursery/bus status api (#158) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore:busStatusの更新を変更 * feat:リクエストにbusTypeを追加 --- .../lib/service/update_bus_status.dart | 2 +- frontend/where_child_bus/lib/util/api/bus.dart | 15 +++++++++++---- frontend/where_child_bus_guardian/pubspec.lock | 8 ++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/frontend/where_child_bus/lib/service/update_bus_status.dart b/frontend/where_child_bus/lib/service/update_bus_status.dart index df131578..02c6e484 100644 --- a/frontend/where_child_bus/lib/service/update_bus_status.dart +++ b/frontend/where_child_bus/lib/service/update_bus_status.dart @@ -4,7 +4,7 @@ import 'package:where_child_bus/util/api/bus.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; -Future updateBusStatusService( +Future updateBusStatusService( String busId, BusStatus busStatus) async { try { var res = updateBusStatus(busId, busStatus); diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index d2e0df12..797702b3 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -54,16 +54,23 @@ Future createBus( }); } -Future updateBusStatus( +Future updateBusStatus( String busId, BusStatus busStatus) async { + DateTime now = DateTime.now(); + BusType busType; + if (now.hour < 12) { + busType = BusType.BUS_TYPE_MORNING; + } else { + busType = BusType.BUS_TYPE_EVENING; + } return performGrpcCall((client) async { - var req = UpdateBusRequest( + var req = ChangeBusStatusRequest( busId: busId, busStatus: busStatus, - updateMask: FieldMask(paths: ["bus_status"]), + busType: busType, ); developer.log("Request: $req"); - return client.updateBus(req); + return client.changeBusStatus(req); }); } diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index 6e422d2a..523f251f 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -296,6 +296,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + intl: + dependency: "direct main" + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" js: dependency: transitive description: From 4bc18586dfcfb7c3d97fa0536b593809bd919169 Mon Sep 17 00:00:00 2001 From: koto623 Date: Wed, 21 Feb 2024 20:30:50 +0900 Subject: [PATCH 633/771] =?UTF-8?q?refact:=20arrival=5Ftime.dart=E3=81=A8b?= =?UTF-8?q?us=5Fto=5Fbus=5Fstop=5Ftime.dart=E3=82=92=E7=B5=90=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map_page/components/arrival_time.dart | 173 ++++++++++---- .../components/bus_to_bus_stop_time.dart | 217 ------------------ .../map_page/components/map_page_bottom.dart | 51 ++-- 3 files changed, 142 insertions(+), 299 deletions(-) delete mode 100644 frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index 900db055..e5870884 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -1,25 +1,33 @@ import 'package:flutter/material.dart'; -import 'dart:developer' as developer; +import "dart:developer" as developer; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:http/http.dart' as http; import 'dart:convert'; +import 'dart:async'; +import '../map_page.dart'; import 'package:intl/intl.dart'; -import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; // 日付フォーマットのために追加 +import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; +import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class ArrivalTime extends StatefulWidget { + final Bus bus; final List waypoints; - final double nurseryLatitude, nurseryLongitude; + final String nextStationId; + final double busLatitude, busLongitude; final double guardianLatitude, guardianLongitude; - final DateTime departureTime; + final bool isMinuteOnly; const ArrivalTime({ Key? key, + required this.bus, required this.waypoints, - required this.nurseryLatitude, - required this.nurseryLongitude, + required this.nextStationId, + required this.busLatitude, + required this.busLongitude, required this.guardianLatitude, required this.guardianLongitude, - required this.departureTime, + required this.isMinuteOnly, }) : super(key: key); @override @@ -29,85 +37,160 @@ class ArrivalTime extends StatefulWidget { class _ArrivalTimeState extends State { String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); String arrivalTime = "Loading..."; + Timer? _timer; + DateTime departureTime = DateTime.now(); + double morningFirstStationLatitude = 0.0, morningFirstStationLongitude = 0.0; + double eveningFirstStationLatitude = 0.0, eveningFirstStationLongitude = 0.0; + double nextStationLatitude = 0.0, nextStationLongitude = 0.0; @override void initState() { super.initState(); - setArrivalTime(); + initArrivalTime(); + _timer = Timer.periodic( + const Duration(minutes: 1), (Timer t) => initArrivalTime()); + } + + @override + void dispose() { + _timer?.cancel(); + super.dispose(); + } + + Future initArrivalTime() async { + loadStationCoordinates(); + await setArrivalTime(); + } + + Future loadStationCoordinates() async { + setState(() { + morningFirstStationLatitude = + getLatitudeForStation(widget.bus.morningFirstStationId); + morningFirstStationLongitude = + getLongitudeForStation(widget.bus.morningFirstStationId); + eveningFirstStationLatitude = + getLatitudeForStation(widget.bus.eveningFirstStationId); + eveningFirstStationLongitude = + getLongitudeForStation(widget.bus.eveningFirstStationId); + nextStationLatitude = getLatitudeForStation(widget.bus.nextStationId); + nextStationLongitude = getLongitudeForStation(widget.bus.nextStationId); + }); + } + + double getLatitudeForStation(String stationId) { + return widget.waypoints + .firstWhere((waypoint) => waypoint.name == stationId, + orElse: () => Waypoint(latitude: 0.0, longitude: 0.0, name: "")) + .latitude; + } + + double getLongitudeForStation(String stationId) { + return widget.waypoints + .firstWhere((waypoint) => waypoint.name == stationId, + orElse: () => Waypoint(latitude: 0.0, longitude: 0.0, name: "")) + .longitude; } @override Widget build(BuildContext context) { return Text( - arrivalTime, + widget.isMinuteOnly ? "${arrivalTime}分" : "${arrivalTime}", style: const TextStyle(fontSize: 30), ); } - void setArrivalTime() async { + Future setArrivalTime() async { try { final durationInSeconds = await getArrivalTime( - widget.nurseryLatitude, - widget.nurseryLongitude, + widget.busLatitude, + widget.busLongitude, + nextStationLatitude, + nextStationLongitude, widget.guardianLatitude, widget.guardianLongitude, widget.waypoints, ); if (durationInSeconds != null) { - DateTime arrivalDateTime = - widget.departureTime.add(Duration(seconds: durationInSeconds)); - setState(() { - arrivalTime = DateFormat('HH:mm').format(arrivalDateTime); + arrivalTime = widget.isMinuteOnly + ? (durationInSeconds ~/ 60).toString() + : DateFormat('HH:mm').format( + departureTime.add(Duration(seconds: durationInSeconds))); }); } else { setState(() => arrivalTime = "N/A"); } } catch (e) { + developer.log('到着時間の取得中にエラーが発生しました', error: e, name: "BusStopTimeError"); setState(() => arrivalTime = "Error"); - developer.log('Error setting arrival time: $e'); } } Future getArrivalTime( double startLat, double startLng, + double nextLat, + double nextLng, double endLat, double endLng, List waypoints, ) async { - String url = buildDirectionUrl( - startLat, startLng, endLat, endLng, waypoints, googleApiKey); - try { - final response = await http.get(Uri.parse(url)); - if (response.statusCode == 200) { - final data = json.decode(response.body); - if (data['routes'].isNotEmpty) { - final int duration = - data['routes'][0]['legs'][0]['duration']['value']; - return duration; - } - } - developer.log('Failed to fetch directions or no routes found.'); - return null; - } catch (e) { - developer.log('Exception caught fetching directions: $e'); - return null; - } + String waypointsString = + _generateWaypointsString(waypoints, nextLat, nextLng, endLat, endLng); + + String url = + 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&waypoints=$waypointsString&key=$googleApiKey'; + + http.Response? response = await _fetchDirections(url); + + return _parseDurationFromResponse(response); } - String buildDirectionUrl( - double startLat, - double startLng, - double endLat, - double endLng, - List waypoints, - String apiKey, - ) { - String waypointsString = waypoints + String _generateWaypointsString(List waypoints, double startLat, + double startLng, double endLat, double endLng) { + int startIndex = waypoints.indexWhere( + (point) => point.latitude == startLat && point.longitude == startLng); + int endIndex = waypoints.indexWhere( + (point) => point.latitude == endLat && point.longitude == endLng); + + if (startIndex == -1) { + startIndex = 0; + } + + if (endIndex == -1 || endIndex < startIndex) { + endIndex = waypoints.length; + } + + developer.log("$waypoints"); + + return waypoints + .sublist(startIndex, endIndex) .map((point) => 'via:${point.latitude},${point.longitude}') .join('|'); - return 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&waypoints=$waypointsString&key=$apiKey'; + } + + Future _fetchDirections(String url) async { + final response = await http.get(Uri.parse(url)); + if (response.statusCode != 200) { + developer.log( + 'Failed to fetch directions. Status code: ${response.statusCode}'); + return null; + } + return response; + } + + int? _parseDurationFromResponse(http.Response? response) { + if (response == null) return null; + + final data = json.decode(response.body); + if (data['routes'] == null || data['routes'].isEmpty) { + developer.log('No routes found.'); + return null; + } + + final route = data['routes'][0]; + final int duration = route['legs'][0]['duration']['value']; + return duration; } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart deleted file mode 100644 index 3f46f3ac..00000000 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/bus_to_bus_stop_time.dart +++ /dev/null @@ -1,217 +0,0 @@ -import 'package:flutter/material.dart'; -import "dart:developer" as developer; -import 'package:flutter_dotenv/flutter_dotenv.dart'; -import 'package:http/http.dart' as http; -import 'dart:convert'; -import 'dart:async'; -import '../map_page.dart'; -import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; - -class BusToBusStopTime extends StatefulWidget { - final Bus bus; - final List waypoints; - final String nextStationId; - double busLatitude, busLongitude; - double guardianLatitude, guardianLongitude; - - BusToBusStopTime( - {Key? key, - required this.bus, - required this.waypoints, - required this.nextStationId, - required this.busLatitude, - required this.busLongitude, - required this.guardianLatitude, - required this.guardianLongitude}) - : super(key: key); - - @override - State createState() => _BusToBusStopTimeState(); -} - -class _BusToBusStopTimeState extends State { - final String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); - String busToBusStopTime = 'Loading...'; - Timer? _timer; - double morningFirstStationLatitude = 0.0, morningFirstStationLongitude = 0.0; - double eveningFirstStationLatitude = 0.0, eveningFirstStationLongitude = 0.0; - double nextStationLatitude = 0.0, nextStationLongitude = 0.0; - - @override - void initState() { - super.initState(); - initArrivalTime(); - _timer = Timer.periodic( - const Duration(minutes: 1), (Timer t) => initArrivalTime()); - } - - @override - void dispose() { - _timer?.cancel(); - super.dispose(); - } - - Future initArrivalTime() async { - _loadEveningFirstStation(); - _loadEveningFirstStation(); - _loadFirstAndNextStation(); - await setArrivalTime(); - } - - Future _loadMorningFirstStation() async { - for (var waypoint in widget.waypoints) { - if (waypoint.name == widget.bus.morningFirstStationId) { - if (mounted) { - setState(() { - morningFirstStationLatitude = waypoint.latitude; - morningFirstStationLongitude = waypoint.longitude; - }); - } - } - } - } - - Future _loadEveningFirstStation() async { - for (var waypoint in widget.waypoints) { - if (waypoint.name == widget.bus.eveningFirstStationId) { - if (mounted) { - setState(() { - eveningFirstStationLatitude = waypoint.latitude; - eveningFirstStationLongitude = waypoint.longitude; - }); - } - } - } - } - - Future _loadFirstAndNextStation() async { - for (var waypoint in widget.waypoints) { - if (waypoint.name == widget.bus.nextStationId) { - if (mounted) { - setState(() { - nextStationLatitude = waypoint.latitude; - nextStationLongitude = waypoint.longitude; - }); - } - } - } - } - - @override - Widget build(BuildContext context) { - return Text( - "${busToBusStopTime}分", - style: const TextStyle(fontSize: 30), - ); - } - - Future setArrivalTime() async { - try { - final int? durationInSeconds = await getArrivalTime( - widget.busLatitude, - widget.busLongitude, - widget.guardianLatitude, - widget.guardianLongitude, - widget.waypoints, - nextStationLatitude, - nextStationLongitude, - ); - - developer.log('$durationInSeconds'); - - if (durationInSeconds != null) { - final int durationInMinutes = (durationInSeconds ~/ 60); - final String formattedBusToBusStopTime = durationInMinutes.toString(); - - setState(() { - busToBusStopTime = formattedBusToBusStopTime; - }); - } else { - setState(() { - busToBusStopTime = "N/A"; - }); - } - } catch (e) { - developer.log('到着時間の取得中にエラーが発生しました', error: e, name: "BusStopTimeError"); - setState(() { - busToBusStopTime = "Error"; - }); - } - } - - Future getArrivalTime( - double startLat, - double startLng, - double endLat, - double endLng, - List waypoints, - double nextLat, - double nextLng) async { - developer.log('bus_to_bus_stop_time.dart waypoints: $waypoints'); - String waypointsString = - _generateWaypointsString(waypoints, nextLat, nextLng, endLat, endLng); - - developer.log('waypointsString: $waypointsString'); - - String url = - 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&waypoints=$waypointsString&key=$googleApiKey'; - - // Google Maps APIからのレスポンスを取得 - http.Response? response = await _fetchDirections(url); - developer.log('response: $response'); - - // レスポンスデータから所要時間を抽出 - return _parseDurationFromResponse(response); - } - - String _generateWaypointsString(List waypoints, double startLat, - double startLng, double endLat, double endLng) { - int startIndex = waypoints.indexWhere( - (point) => point.latitude == startLat && point.longitude == startLng); - int endIndex = waypoints.indexWhere( - (point) => point.latitude == endLat && point.longitude == endLng); - - // startIndex が -1 の場合は、リストの最初から処理を開始 - if (startIndex == -1) { - startIndex = 0; - } - - // endIndex が -1 の場合、リストの終わりまで処理 - if (endIndex == -1 || endIndex < startIndex) { - endIndex = waypoints.length; - } - - developer.log("$waypoints"); - - // startIndex から endIndex までのサブリストを作成 - return waypoints - .sublist(startIndex, endIndex) - .map((point) => 'via:${point.latitude},${point.longitude}') - .join('|'); - } - - Future _fetchDirections(String url) async { - final response = await http.get(Uri.parse(url)); - if (response.statusCode != 200) { - developer.log( - 'Failed to fetch directions. Status code: ${response.statusCode}'); - return null; - } - return response; - } - - int? _parseDurationFromResponse(http.Response? response) { - if (response == null) return null; - - final data = json.decode(response.body); - if (data['routes'] == null || data['routes'].isEmpty) { - developer.log('No routes found.'); - return null; - } - - final route = data['routes'][0]; - final int duration = route['legs'][0]['duration']['value']; - return duration; - } -} diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart index f402b6a2..d09e6fc7 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart @@ -1,7 +1,6 @@ import 'dart:developer' as developer; import 'package:flutter/material.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; -import 'package:where_child_bus_guardian/pages/map_page/components/bus_to_bus_stop_time.dart'; import 'package:where_child_bus_guardian/pages/map_page/components/arrival_time.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; import '../../styles/styles.dart'; @@ -75,8 +74,6 @@ class _MapPageBottomState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ arrivalTimeBody(), - // isRideScheduled("朝のバス", widget.guardian.isUseMorningBus), - // isRideScheduled("夕方のバス", widget.guardian.isUseEveningBus), ], ), ), @@ -90,24 +87,26 @@ class _MapPageBottomState extends State { children: [ fieldTitleAndTime( "到着まで", - BusToBusStopTime( - bus: widget.bus, - waypoints: widget.waypoints, - nextStationId: widget.nextStationId, - busLatitude: widget.busLatitude, - busLongitude: widget.busLongitude, - guardianLatitude: guardianStation.latitude, - guardianLongitude: guardianStation.longitude, - )), + ArrivalTime( + bus: widget.bus, + waypoints: widget.waypoints, + nextStationId: widget.nextStationId, + busLatitude: widget.busLatitude, + busLongitude: widget.busLongitude, + guardianLatitude: guardianStation.latitude, + guardianLongitude: guardianStation.longitude, + isMinuteOnly: true)), fieldTitleAndTime( "到着予定時刻", ArrivalTime( + bus: widget.bus, waypoints: widget.waypoints, - nurseryLatitude: widget.nurseryLatitude, - nurseryLongitude: widget.nurseryLongitude, + nextStationId: widget.nextStationId, + busLatitude: widget.busLatitude, + busLongitude: widget.busLongitude, guardianLatitude: guardianStation.latitude, guardianLongitude: guardianStation.longitude, - departureTime: departureTime)), + isMinuteOnly: false)), ]); } @@ -119,26 +118,4 @@ class _MapPageBottomState extends State { ], ); } - - // Widget isRideScheduled(String busName, bool isRide) { - // return Row( - // mainAxisAlignment: MainAxisAlignment.center, - // crossAxisAlignment: CrossAxisAlignment.center, - // children: [ - // Text("${busName}の乗車予定: "), - // SizedBox(width: MediaQuery.of(context).size.width * 0.05), - // Container( - // width: MediaQuery.of(context).size.width * 0.3, - // decoration: statusFieldDecoration(isRide), - // child: Padding( - // padding: const EdgeInsets.all(5.0), - // child: Text( - // isRide ? "あり" : "なし", - // style: statusFieldTextStyle(isRide), - // textAlign: TextAlign.center, - // )), - // ) - // ], - // ); - // } } From d0f846642f6d39702c1c114fa7575dfbbed76965 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 22 Feb 2024 12:20:07 +0900 Subject: [PATCH 634/771] =?UTF-8?q?!feat:=20=E3=82=B9=E3=82=AD=E3=83=BC?= =?UTF-8?q?=E3=83=9E=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BREAKING CHANGES --- backend/domain/repository/ent/bus.go | 112 +- backend/domain/repository/ent/bus/bus.go | 116 +- backend/domain/repository/ent/bus/where.go | 81 +- backend/domain/repository/ent/bus_create.go | 135 +- backend/domain/repository/ent/bus_query.go | 389 +-- backend/domain/repository/ent/bus_update.go | 548 +--- backend/domain/repository/ent/busroute.go | 162 + .../repository/ent/busroute/busroute.go | 173 ++ .../domain/repository/ent/busroute/where.go | 159 + .../domain/repository/ent/busroute_create.go | 314 ++ .../domain/repository/ent/busroute_delete.go | 88 + .../domain/repository/ent/busroute_query.go | 789 +++++ .../domain/repository/ent/busroute_update.go | 725 +++++ .../repository/ent/busrouteassociation.go | 178 ++ .../busrouteassociation.go | 110 + .../ent/busrouteassociation/where.go | 211 ++ .../ent/busrouteassociation_create.go | 254 ++ .../ent/busrouteassociation_delete.go | 88 + .../ent/busrouteassociation_query.go | 681 +++++ .../ent/busrouteassociation_update.go | 476 +++ .../repository/ent/childbusassociation.go | 53 +- .../childbusassociation.go | 75 +- .../ent/childbusassociation/where.go | 62 +- .../ent/childbusassociation_create.go | 50 +- .../ent/childbusassociation_query.go | 68 +- .../ent/childbusassociation_update.go | 134 +- backend/domain/repository/ent/client.go | 538 +++- backend/domain/repository/ent/ent.go | 4 + backend/domain/repository/ent/hook/hook.go | 24 + .../domain/repository/ent/migrate/schema.go | 111 +- backend/domain/repository/ent/mutation.go | 2602 ++++++++++------- .../repository/ent/predicate/predicate.go | 6 + backend/domain/repository/ent/runtime.go | 7 + backend/domain/repository/ent/schema/bus.go | 8 +- .../domain/repository/ent/schema/bus_route.go | 31 + .../ent/schema/bus_route_association.go | 38 + .../ent/schema/child_bus_association.go | 12 +- .../domain/repository/ent/schema/station.go | 17 +- backend/domain/repository/ent/station.go | 154 +- .../domain/repository/ent/station/station.go | 196 +- .../domain/repository/ent/station/where.go | 150 +- .../domain/repository/ent/station_create.go | 221 +- .../domain/repository/ent/station_query.go | 560 +--- .../domain/repository/ent/station_update.go | 1011 +------ backend/domain/repository/ent/tx.go | 6 + 45 files changed, 7055 insertions(+), 4872 deletions(-) create mode 100644 backend/domain/repository/ent/busroute.go create mode 100644 backend/domain/repository/ent/busroute/busroute.go create mode 100644 backend/domain/repository/ent/busroute/where.go create mode 100644 backend/domain/repository/ent/busroute_create.go create mode 100644 backend/domain/repository/ent/busroute_delete.go create mode 100644 backend/domain/repository/ent/busroute_query.go create mode 100644 backend/domain/repository/ent/busroute_update.go create mode 100644 backend/domain/repository/ent/busrouteassociation.go create mode 100644 backend/domain/repository/ent/busrouteassociation/busrouteassociation.go create mode 100644 backend/domain/repository/ent/busrouteassociation/where.go create mode 100644 backend/domain/repository/ent/busrouteassociation_create.go create mode 100644 backend/domain/repository/ent/busrouteassociation_delete.go create mode 100644 backend/domain/repository/ent/busrouteassociation_query.go create mode 100644 backend/domain/repository/ent/busrouteassociation_update.go create mode 100644 backend/domain/repository/ent/schema/bus_route.go create mode 100644 backend/domain/repository/ent/schema/bus_route_association.go diff --git a/backend/domain/repository/ent/bus.go b/backend/domain/repository/ent/bus.go index aeb8aef9..db3190f4 100644 --- a/backend/domain/repository/ent/bus.go +++ b/backend/domain/repository/ent/bus.go @@ -38,33 +38,25 @@ type Bus struct { UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BusQuery when eager-loading is set. - Edges BusEdges `json:"edges"` - bus_nursery *uuid.UUID - bus_next_station *uuid.UUID - bus_morning_first_station *uuid.UUID - bus_evening_first_station *uuid.UUID - selectValues sql.SelectValues + Edges BusEdges `json:"edges"` + bus_nursery *uuid.UUID + bus_next_station *uuid.UUID + selectValues sql.SelectValues } // BusEdges holds the relations/edges for other nodes in the graph. type BusEdges struct { // Nursery holds the value of the nursery edge. Nursery *Nursery `json:"nursery,omitempty"` - // Stations holds the value of the stations edge. - Stations []*Station `json:"stations,omitempty"` // BoardingRecords holds the value of the boarding_records edge. BoardingRecords []*BoardingRecord `json:"boarding_records,omitempty"` - // ChildBusAssociations holds the value of the childBusAssociations edge. - ChildBusAssociations []*ChildBusAssociation `json:"childBusAssociations,omitempty"` // NextStation holds the value of the next_station edge. NextStation *Station `json:"next_station,omitempty"` - // MorningFirstStation holds the value of the morning_first_station edge. - MorningFirstStation *Station `json:"morning_first_station,omitempty"` - // EveningFirstStation holds the value of the evening_first_station edge. - EveningFirstStation *Station `json:"evening_first_station,omitempty"` + // BusRoute holds the value of the bus_route edge. + BusRoute []*BusRoute `json:"bus_route,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. - loadedTypes [7]bool + loadedTypes [4]bool } // NurseryOrErr returns the Nursery value or an error if the edge @@ -80,37 +72,19 @@ func (e BusEdges) NurseryOrErr() (*Nursery, error) { return nil, &NotLoadedError{edge: "nursery"} } -// StationsOrErr returns the Stations value or an error if the edge -// was not loaded in eager-loading. -func (e BusEdges) StationsOrErr() ([]*Station, error) { - if e.loadedTypes[1] { - return e.Stations, nil - } - return nil, &NotLoadedError{edge: "stations"} -} - // BoardingRecordsOrErr returns the BoardingRecords value or an error if the edge // was not loaded in eager-loading. func (e BusEdges) BoardingRecordsOrErr() ([]*BoardingRecord, error) { - if e.loadedTypes[2] { + if e.loadedTypes[1] { return e.BoardingRecords, nil } return nil, &NotLoadedError{edge: "boarding_records"} } -// ChildBusAssociationsOrErr returns the ChildBusAssociations value or an error if the edge -// was not loaded in eager-loading. -func (e BusEdges) ChildBusAssociationsOrErr() ([]*ChildBusAssociation, error) { - if e.loadedTypes[3] { - return e.ChildBusAssociations, nil - } - return nil, &NotLoadedError{edge: "childBusAssociations"} -} - // NextStationOrErr returns the NextStation value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. func (e BusEdges) NextStationOrErr() (*Station, error) { - if e.loadedTypes[4] { + if e.loadedTypes[2] { if e.NextStation == nil { // Edge was loaded but was not found. return nil, &NotFoundError{label: station.Label} @@ -120,30 +94,13 @@ func (e BusEdges) NextStationOrErr() (*Station, error) { return nil, &NotLoadedError{edge: "next_station"} } -// MorningFirstStationOrErr returns the MorningFirstStation value or an error if the edge -// was not loaded in eager-loading, or loaded but was not found. -func (e BusEdges) MorningFirstStationOrErr() (*Station, error) { - if e.loadedTypes[5] { - if e.MorningFirstStation == nil { - // Edge was loaded but was not found. - return nil, &NotFoundError{label: station.Label} - } - return e.MorningFirstStation, nil - } - return nil, &NotLoadedError{edge: "morning_first_station"} -} - -// EveningFirstStationOrErr returns the EveningFirstStation value or an error if the edge -// was not loaded in eager-loading, or loaded but was not found. -func (e BusEdges) EveningFirstStationOrErr() (*Station, error) { - if e.loadedTypes[6] { - if e.EveningFirstStation == nil { - // Edge was loaded but was not found. - return nil, &NotFoundError{label: station.Label} - } - return e.EveningFirstStation, nil +// BusRouteOrErr returns the BusRoute value or an error if the edge +// was not loaded in eager-loading. +func (e BusEdges) BusRouteOrErr() ([]*BusRoute, error) { + if e.loadedTypes[3] { + return e.BusRoute, nil } - return nil, &NotLoadedError{edge: "evening_first_station"} + return nil, &NotLoadedError{edge: "bus_route"} } // scanValues returns the types for scanning values from sql.Rows. @@ -165,10 +122,6 @@ func (*Bus) scanValues(columns []string) ([]any, error) { values[i] = &sql.NullScanner{S: new(uuid.UUID)} case bus.ForeignKeys[1]: // bus_next_station values[i] = &sql.NullScanner{S: new(uuid.UUID)} - case bus.ForeignKeys[2]: // bus_morning_first_station - values[i] = &sql.NullScanner{S: new(uuid.UUID)} - case bus.ForeignKeys[3]: // bus_evening_first_station - values[i] = &sql.NullScanner{S: new(uuid.UUID)} default: values[i] = new(sql.UnknownType) } @@ -252,20 +205,6 @@ func (b *Bus) assignValues(columns []string, values []any) error { b.bus_next_station = new(uuid.UUID) *b.bus_next_station = *value.S.(*uuid.UUID) } - case bus.ForeignKeys[2]: - if value, ok := values[i].(*sql.NullScanner); !ok { - return fmt.Errorf("unexpected type %T for field bus_morning_first_station", values[i]) - } else if value.Valid { - b.bus_morning_first_station = new(uuid.UUID) - *b.bus_morning_first_station = *value.S.(*uuid.UUID) - } - case bus.ForeignKeys[3]: - if value, ok := values[i].(*sql.NullScanner); !ok { - return fmt.Errorf("unexpected type %T for field bus_evening_first_station", values[i]) - } else if value.Valid { - b.bus_evening_first_station = new(uuid.UUID) - *b.bus_evening_first_station = *value.S.(*uuid.UUID) - } default: b.selectValues.Set(columns[i], values[i]) } @@ -284,34 +223,19 @@ func (b *Bus) QueryNursery() *NurseryQuery { return NewBusClient(b.config).QueryNursery(b) } -// QueryStations queries the "stations" edge of the Bus entity. -func (b *Bus) QueryStations() *StationQuery { - return NewBusClient(b.config).QueryStations(b) -} - // QueryBoardingRecords queries the "boarding_records" edge of the Bus entity. func (b *Bus) QueryBoardingRecords() *BoardingRecordQuery { return NewBusClient(b.config).QueryBoardingRecords(b) } -// QueryChildBusAssociations queries the "childBusAssociations" edge of the Bus entity. -func (b *Bus) QueryChildBusAssociations() *ChildBusAssociationQuery { - return NewBusClient(b.config).QueryChildBusAssociations(b) -} - // QueryNextStation queries the "next_station" edge of the Bus entity. func (b *Bus) QueryNextStation() *StationQuery { return NewBusClient(b.config).QueryNextStation(b) } -// QueryMorningFirstStation queries the "morning_first_station" edge of the Bus entity. -func (b *Bus) QueryMorningFirstStation() *StationQuery { - return NewBusClient(b.config).QueryMorningFirstStation(b) -} - -// QueryEveningFirstStation queries the "evening_first_station" edge of the Bus entity. -func (b *Bus) QueryEveningFirstStation() *StationQuery { - return NewBusClient(b.config).QueryEveningFirstStation(b) +// QueryBusRoute queries the "bus_route" edge of the Bus entity. +func (b *Bus) QueryBusRoute() *BusRouteQuery { + return NewBusClient(b.config).QueryBusRoute(b) } // Update returns a builder for updating this Bus. diff --git a/backend/domain/repository/ent/bus/bus.go b/backend/domain/repository/ent/bus/bus.go index 65b3c79e..359038b2 100644 --- a/backend/domain/repository/ent/bus/bus.go +++ b/backend/domain/repository/ent/bus/bus.go @@ -34,18 +34,12 @@ const ( FieldUpdatedAt = "updated_at" // EdgeNursery holds the string denoting the nursery edge name in mutations. EdgeNursery = "nursery" - // EdgeStations holds the string denoting the stations edge name in mutations. - EdgeStations = "stations" // EdgeBoardingRecords holds the string denoting the boarding_records edge name in mutations. EdgeBoardingRecords = "boarding_records" - // EdgeChildBusAssociations holds the string denoting the childbusassociations edge name in mutations. - EdgeChildBusAssociations = "childBusAssociations" // EdgeNextStation holds the string denoting the next_station edge name in mutations. EdgeNextStation = "next_station" - // EdgeMorningFirstStation holds the string denoting the morning_first_station edge name in mutations. - EdgeMorningFirstStation = "morning_first_station" - // EdgeEveningFirstStation holds the string denoting the evening_first_station edge name in mutations. - EdgeEveningFirstStation = "evening_first_station" + // EdgeBusRoute holds the string denoting the bus_route edge name in mutations. + EdgeBusRoute = "bus_route" // Table holds the table name of the bus in the database. Table = "bus" // NurseryTable is the table that holds the nursery relation/edge. @@ -55,11 +49,6 @@ const ( NurseryInverseTable = "nurseries" // NurseryColumn is the table column denoting the nursery relation/edge. NurseryColumn = "bus_nursery" - // StationsTable is the table that holds the stations relation/edge. The primary key declared below. - StationsTable = "bus_stations" - // StationsInverseTable is the table name for the Station entity. - // It exists in this package in order to avoid circular dependency with the "station" package. - StationsInverseTable = "stations" // BoardingRecordsTable is the table that holds the boarding_records relation/edge. BoardingRecordsTable = "boarding_records" // BoardingRecordsInverseTable is the table name for the BoardingRecord entity. @@ -67,13 +56,6 @@ const ( BoardingRecordsInverseTable = "boarding_records" // BoardingRecordsColumn is the table column denoting the boarding_records relation/edge. BoardingRecordsColumn = "bus_boarding_records" - // ChildBusAssociationsTable is the table that holds the childBusAssociations relation/edge. - ChildBusAssociationsTable = "child_bus_associations" - // ChildBusAssociationsInverseTable is the table name for the ChildBusAssociation entity. - // It exists in this package in order to avoid circular dependency with the "childbusassociation" package. - ChildBusAssociationsInverseTable = "child_bus_associations" - // ChildBusAssociationsColumn is the table column denoting the childBusAssociations relation/edge. - ChildBusAssociationsColumn = "bus_id" // NextStationTable is the table that holds the next_station relation/edge. NextStationTable = "bus" // NextStationInverseTable is the table name for the Station entity. @@ -81,20 +63,11 @@ const ( NextStationInverseTable = "stations" // NextStationColumn is the table column denoting the next_station relation/edge. NextStationColumn = "bus_next_station" - // MorningFirstStationTable is the table that holds the morning_first_station relation/edge. - MorningFirstStationTable = "bus" - // MorningFirstStationInverseTable is the table name for the Station entity. - // It exists in this package in order to avoid circular dependency with the "station" package. - MorningFirstStationInverseTable = "stations" - // MorningFirstStationColumn is the table column denoting the morning_first_station relation/edge. - MorningFirstStationColumn = "bus_morning_first_station" - // EveningFirstStationTable is the table that holds the evening_first_station relation/edge. - EveningFirstStationTable = "bus" - // EveningFirstStationInverseTable is the table name for the Station entity. - // It exists in this package in order to avoid circular dependency with the "station" package. - EveningFirstStationInverseTable = "stations" - // EveningFirstStationColumn is the table column denoting the evening_first_station relation/edge. - EveningFirstStationColumn = "bus_evening_first_station" + // BusRouteTable is the table that holds the bus_route relation/edge. The primary key declared below. + BusRouteTable = "bus_route_bus" + // BusRouteInverseTable is the table name for the BusRoute entity. + // It exists in this package in order to avoid circular dependency with the "busroute" package. + BusRouteInverseTable = "bus_routes" ) // Columns holds all SQL columns for bus fields. @@ -115,14 +88,12 @@ var Columns = []string{ var ForeignKeys = []string{ "bus_nursery", "bus_next_station", - "bus_morning_first_station", - "bus_evening_first_station", } var ( - // StationsPrimaryKey and StationsColumn2 are the table columns denoting the - // primary key for the stations relation (M2M). - StationsPrimaryKey = []string{"bus_id", "station_id"} + // BusRoutePrimaryKey and BusRouteColumn2 are the table columns denoting the + // primary key for the bus_route relation (M2M). + BusRoutePrimaryKey = []string{"bus_route_id", "bus_id"} ) // ValidColumn reports if the column name is valid (part of the table columns). @@ -235,20 +206,6 @@ func ByNurseryField(field string, opts ...sql.OrderTermOption) OrderOption { } } -// ByStationsCount orders the results by stations count. -func ByStationsCount(opts ...sql.OrderTermOption) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborsCount(s, newStationsStep(), opts...) - } -} - -// ByStations orders the results by stations terms. -func ByStations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newStationsStep(), append([]sql.OrderTerm{term}, terms...)...) - } -} - // ByBoardingRecordsCount orders the results by boarding_records count. func ByBoardingRecordsCount(opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { @@ -263,20 +220,6 @@ func ByBoardingRecords(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { } } -// ByChildBusAssociationsCount orders the results by childBusAssociations count. -func ByChildBusAssociationsCount(opts ...sql.OrderTermOption) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborsCount(s, newChildBusAssociationsStep(), opts...) - } -} - -// ByChildBusAssociations orders the results by childBusAssociations terms. -func ByChildBusAssociations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newChildBusAssociationsStep(), append([]sql.OrderTerm{term}, terms...)...) - } -} - // ByNextStationField orders the results by next_station field. func ByNextStationField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { @@ -284,17 +227,17 @@ func ByNextStationField(field string, opts ...sql.OrderTermOption) OrderOption { } } -// ByMorningFirstStationField orders the results by morning_first_station field. -func ByMorningFirstStationField(field string, opts ...sql.OrderTermOption) OrderOption { +// ByBusRouteCount orders the results by bus_route count. +func ByBusRouteCount(opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newMorningFirstStationStep(), sql.OrderByField(field, opts...)) + sqlgraph.OrderByNeighborsCount(s, newBusRouteStep(), opts...) } } -// ByEveningFirstStationField orders the results by evening_first_station field. -func ByEveningFirstStationField(field string, opts ...sql.OrderTermOption) OrderOption { +// ByBusRoute orders the results by bus_route terms. +func ByBusRoute(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newEveningFirstStationStep(), sql.OrderByField(field, opts...)) + sqlgraph.OrderByNeighborTerms(s, newBusRouteStep(), append([]sql.OrderTerm{term}, terms...)...) } } func newNurseryStep() *sqlgraph.Step { @@ -304,13 +247,6 @@ func newNurseryStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.M2O, false, NurseryTable, NurseryColumn), ) } -func newStationsStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(StationsInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.M2M, false, StationsTable, StationsPrimaryKey...), - ) -} func newBoardingRecordsStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), @@ -318,13 +254,6 @@ func newBoardingRecordsStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.O2M, false, BoardingRecordsTable, BoardingRecordsColumn), ) } -func newChildBusAssociationsStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildBusAssociationsInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), - ) -} func newNextStationStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), @@ -332,17 +261,10 @@ func newNextStationStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.M2O, false, NextStationTable, NextStationColumn), ) } -func newMorningFirstStationStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(MorningFirstStationInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, MorningFirstStationTable, MorningFirstStationColumn), - ) -} -func newEveningFirstStationStep() *sqlgraph.Step { +func newBusRouteStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(EveningFirstStationInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, EveningFirstStationTable, EveningFirstStationColumn), + sqlgraph.To(BusRouteInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2M, true, BusRouteTable, BusRoutePrimaryKey...), ) } diff --git a/backend/domain/repository/ent/bus/where.go b/backend/domain/repository/ent/bus/where.go index c9da720e..89892c70 100644 --- a/backend/domain/repository/ent/bus/where.go +++ b/backend/domain/repository/ent/bus/where.go @@ -464,29 +464,6 @@ func HasNurseryWith(preds ...predicate.Nursery) predicate.Bus { }) } -// HasStations applies the HasEdge predicate on the "stations" edge. -func HasStations() predicate.Bus { - return predicate.Bus(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2M, false, StationsTable, StationsPrimaryKey...), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasStationsWith applies the HasEdge predicate on the "stations" edge with a given conditions (other predicates). -func HasStationsWith(preds ...predicate.Station) predicate.Bus { - return predicate.Bus(func(s *sql.Selector) { - step := newStationsStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - // HasBoardingRecords applies the HasEdge predicate on the "boarding_records" edge. func HasBoardingRecords() predicate.Bus { return predicate.Bus(func(s *sql.Selector) { @@ -510,29 +487,6 @@ func HasBoardingRecordsWith(preds ...predicate.BoardingRecord) predicate.Bus { }) } -// HasChildBusAssociations applies the HasEdge predicate on the "childBusAssociations" edge. -func HasChildBusAssociations() predicate.Bus { - return predicate.Bus(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasChildBusAssociationsWith applies the HasEdge predicate on the "childBusAssociations" edge with a given conditions (other predicates). -func HasChildBusAssociationsWith(preds ...predicate.ChildBusAssociation) predicate.Bus { - return predicate.Bus(func(s *sql.Selector) { - step := newChildBusAssociationsStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - // HasNextStation applies the HasEdge predicate on the "next_station" edge. func HasNextStation() predicate.Bus { return predicate.Bus(func(s *sql.Selector) { @@ -556,44 +510,21 @@ func HasNextStationWith(preds ...predicate.Station) predicate.Bus { }) } -// HasMorningFirstStation applies the HasEdge predicate on the "morning_first_station" edge. -func HasMorningFirstStation() predicate.Bus { - return predicate.Bus(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, MorningFirstStationTable, MorningFirstStationColumn), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasMorningFirstStationWith applies the HasEdge predicate on the "morning_first_station" edge with a given conditions (other predicates). -func HasMorningFirstStationWith(preds ...predicate.Station) predicate.Bus { - return predicate.Bus(func(s *sql.Selector) { - step := newMorningFirstStationStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - -// HasEveningFirstStation applies the HasEdge predicate on the "evening_first_station" edge. -func HasEveningFirstStation() predicate.Bus { +// HasBusRoute applies the HasEdge predicate on the "bus_route" edge. +func HasBusRoute() predicate.Bus { return predicate.Bus(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, EveningFirstStationTable, EveningFirstStationColumn), + sqlgraph.Edge(sqlgraph.M2M, true, BusRouteTable, BusRoutePrimaryKey...), ) sqlgraph.HasNeighbors(s, step) }) } -// HasEveningFirstStationWith applies the HasEdge predicate on the "evening_first_station" edge with a given conditions (other predicates). -func HasEveningFirstStationWith(preds ...predicate.Station) predicate.Bus { +// HasBusRouteWith applies the HasEdge predicate on the "bus_route" edge with a given conditions (other predicates). +func HasBusRouteWith(preds ...predicate.BusRoute) predicate.Bus { return predicate.Bus(func(s *sql.Selector) { - step := newEveningFirstStationStep() + step := newBusRouteStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) diff --git a/backend/domain/repository/ent/bus_create.go b/backend/domain/repository/ent/bus_create.go index 04f005bc..a6cacc47 100644 --- a/backend/domain/repository/ent/bus_create.go +++ b/backend/domain/repository/ent/bus_create.go @@ -12,7 +12,7 @@ import ( "entgo.io/ent/schema/field" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" "github.com/google/uuid" @@ -162,21 +162,6 @@ func (bc *BusCreate) SetNursery(n *Nursery) *BusCreate { return bc.SetNurseryID(n.ID) } -// AddStationIDs adds the "stations" edge to the Station entity by IDs. -func (bc *BusCreate) AddStationIDs(ids ...uuid.UUID) *BusCreate { - bc.mutation.AddStationIDs(ids...) - return bc -} - -// AddStations adds the "stations" edges to the Station entity. -func (bc *BusCreate) AddStations(s ...*Station) *BusCreate { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return bc.AddStationIDs(ids...) -} - // AddBoardingRecordIDs adds the "boarding_records" edge to the BoardingRecord entity by IDs. func (bc *BusCreate) AddBoardingRecordIDs(ids ...uuid.UUID) *BusCreate { bc.mutation.AddBoardingRecordIDs(ids...) @@ -192,21 +177,6 @@ func (bc *BusCreate) AddBoardingRecords(b ...*BoardingRecord) *BusCreate { return bc.AddBoardingRecordIDs(ids...) } -// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. -func (bc *BusCreate) AddChildBusAssociationIDs(ids ...int) *BusCreate { - bc.mutation.AddChildBusAssociationIDs(ids...) - return bc -} - -// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. -func (bc *BusCreate) AddChildBusAssociations(c ...*ChildBusAssociation) *BusCreate { - ids := make([]int, len(c)) - for i := range c { - ids[i] = c[i].ID - } - return bc.AddChildBusAssociationIDs(ids...) -} - // SetNextStationID sets the "next_station" edge to the Station entity by ID. func (bc *BusCreate) SetNextStationID(id uuid.UUID) *BusCreate { bc.mutation.SetNextStationID(id) @@ -226,42 +196,19 @@ func (bc *BusCreate) SetNextStation(s *Station) *BusCreate { return bc.SetNextStationID(s.ID) } -// SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID. -func (bc *BusCreate) SetMorningFirstStationID(id uuid.UUID) *BusCreate { - bc.mutation.SetMorningFirstStationID(id) - return bc -} - -// SetNillableMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID if the given value is not nil. -func (bc *BusCreate) SetNillableMorningFirstStationID(id *uuid.UUID) *BusCreate { - if id != nil { - bc = bc.SetMorningFirstStationID(*id) - } - return bc -} - -// SetMorningFirstStation sets the "morning_first_station" edge to the Station entity. -func (bc *BusCreate) SetMorningFirstStation(s *Station) *BusCreate { - return bc.SetMorningFirstStationID(s.ID) -} - -// SetEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID. -func (bc *BusCreate) SetEveningFirstStationID(id uuid.UUID) *BusCreate { - bc.mutation.SetEveningFirstStationID(id) +// AddBusRouteIDs adds the "bus_route" edge to the BusRoute entity by IDs. +func (bc *BusCreate) AddBusRouteIDs(ids ...uuid.UUID) *BusCreate { + bc.mutation.AddBusRouteIDs(ids...) return bc } -// SetNillableEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID if the given value is not nil. -func (bc *BusCreate) SetNillableEveningFirstStationID(id *uuid.UUID) *BusCreate { - if id != nil { - bc = bc.SetEveningFirstStationID(*id) +// AddBusRoute adds the "bus_route" edges to the BusRoute entity. +func (bc *BusCreate) AddBusRoute(b ...*BusRoute) *BusCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID } - return bc -} - -// SetEveningFirstStation sets the "evening_first_station" edge to the Station entity. -func (bc *BusCreate) SetEveningFirstStation(s *Station) *BusCreate { - return bc.SetEveningFirstStationID(s.ID) + return bc.AddBusRouteIDs(ids...) } // Mutation returns the BusMutation object of the builder. @@ -427,22 +374,6 @@ func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { _node.bus_nursery = &nodes[0] _spec.Edges = append(_spec.Edges, edge) } - if nodes := bc.mutation.StationsIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: false, - Table: bus.StationsTable, - Columns: bus.StationsPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges = append(_spec.Edges, edge) - } if nodes := bc.mutation.BoardingRecordsIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, @@ -459,22 +390,6 @@ func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } - if nodes := bc.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: bus.ChildBusAssociationsTable, - Columns: []string{bus.ChildBusAssociationsColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges = append(_spec.Edges, edge) - } if nodes := bc.mutation.NextStationIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, @@ -492,38 +407,20 @@ func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { _node.bus_next_station = &nodes[0] _spec.Edges = append(_spec.Edges, edge) } - if nodes := bc.mutation.MorningFirstStationIDs(); len(nodes) > 0 { + if nodes := bc.mutation.BusRouteIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: bus.MorningFirstStationTable, - Columns: []string{bus.MorningFirstStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _node.bus_morning_first_station = &nodes[0] - _spec.Edges = append(_spec.Edges, edge) - } - if nodes := bc.mutation.EveningFirstStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: bus.EveningFirstStationTable, - Columns: []string{bus.EveningFirstStationColumn}, + Rel: sqlgraph.M2M, + Inverse: true, + Table: bus.BusRouteTable, + Columns: bus.BusRoutePrimaryKey, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } for _, k := range nodes { edge.Target.Nodes = append(edge.Target.Nodes, k) } - _node.bus_evening_first_station = &nodes[0] _spec.Edges = append(_spec.Edges, edge) } return _node, _spec diff --git a/backend/domain/repository/ent/bus_query.go b/backend/domain/repository/ent/bus_query.go index a4709550..a9257db9 100644 --- a/backend/domain/repository/ent/bus_query.go +++ b/backend/domain/repository/ent/bus_query.go @@ -13,7 +13,7 @@ import ( "entgo.io/ent/schema/field" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" @@ -23,18 +23,15 @@ import ( // BusQuery is the builder for querying Bus entities. type BusQuery struct { config - ctx *QueryContext - order []bus.OrderOption - inters []Interceptor - predicates []predicate.Bus - withNursery *NurseryQuery - withStations *StationQuery - withBoardingRecords *BoardingRecordQuery - withChildBusAssociations *ChildBusAssociationQuery - withNextStation *StationQuery - withMorningFirstStation *StationQuery - withEveningFirstStation *StationQuery - withFKs bool + ctx *QueryContext + order []bus.OrderOption + inters []Interceptor + predicates []predicate.Bus + withNursery *NurseryQuery + withBoardingRecords *BoardingRecordQuery + withNextStation *StationQuery + withBusRoute *BusRouteQuery + withFKs bool // intermediate query (i.e. traversal path). sql *sql.Selector path func(context.Context) (*sql.Selector, error) @@ -93,28 +90,6 @@ func (bq *BusQuery) QueryNursery() *NurseryQuery { return query } -// QueryStations chains the current query on the "stations" edge. -func (bq *BusQuery) QueryStations() *StationQuery { - query := (&StationClient{config: bq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := bq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := bq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(bus.Table, bus.FieldID, selector), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2M, false, bus.StationsTable, bus.StationsPrimaryKey...), - ) - fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) - return fromU, nil - } - return query -} - // QueryBoardingRecords chains the current query on the "boarding_records" edge. func (bq *BusQuery) QueryBoardingRecords() *BoardingRecordQuery { query := (&BoardingRecordClient{config: bq.config}).Query() @@ -137,28 +112,6 @@ func (bq *BusQuery) QueryBoardingRecords() *BoardingRecordQuery { return query } -// QueryChildBusAssociations chains the current query on the "childBusAssociations" edge. -func (bq *BusQuery) QueryChildBusAssociations() *ChildBusAssociationQuery { - query := (&ChildBusAssociationClient{config: bq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := bq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := bq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(bus.Table, bus.FieldID, selector), - sqlgraph.To(childbusassociation.Table, childbusassociation.FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, bus.ChildBusAssociationsTable, bus.ChildBusAssociationsColumn), - ) - fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) - return fromU, nil - } - return query -} - // QueryNextStation chains the current query on the "next_station" edge. func (bq *BusQuery) QueryNextStation() *StationQuery { query := (&StationClient{config: bq.config}).Query() @@ -181,9 +134,9 @@ func (bq *BusQuery) QueryNextStation() *StationQuery { return query } -// QueryMorningFirstStation chains the current query on the "morning_first_station" edge. -func (bq *BusQuery) QueryMorningFirstStation() *StationQuery { - query := (&StationClient{config: bq.config}).Query() +// QueryBusRoute chains the current query on the "bus_route" edge. +func (bq *BusQuery) QueryBusRoute() *BusRouteQuery { + query := (&BusRouteClient{config: bq.config}).Query() query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { if err := bq.prepareQuery(ctx); err != nil { return nil, err @@ -194,30 +147,8 @@ func (bq *BusQuery) QueryMorningFirstStation() *StationQuery { } step := sqlgraph.NewStep( sqlgraph.From(bus.Table, bus.FieldID, selector), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, bus.MorningFirstStationTable, bus.MorningFirstStationColumn), - ) - fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) - return fromU, nil - } - return query -} - -// QueryEveningFirstStation chains the current query on the "evening_first_station" edge. -func (bq *BusQuery) QueryEveningFirstStation() *StationQuery { - query := (&StationClient{config: bq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := bq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := bq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(bus.Table, bus.FieldID, selector), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, bus.EveningFirstStationTable, bus.EveningFirstStationColumn), + sqlgraph.To(busroute.Table, busroute.FieldID), + sqlgraph.Edge(sqlgraph.M2M, true, bus.BusRouteTable, bus.BusRoutePrimaryKey...), ) fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) return fromU, nil @@ -412,18 +343,15 @@ func (bq *BusQuery) Clone() *BusQuery { return nil } return &BusQuery{ - config: bq.config, - ctx: bq.ctx.Clone(), - order: append([]bus.OrderOption{}, bq.order...), - inters: append([]Interceptor{}, bq.inters...), - predicates: append([]predicate.Bus{}, bq.predicates...), - withNursery: bq.withNursery.Clone(), - withStations: bq.withStations.Clone(), - withBoardingRecords: bq.withBoardingRecords.Clone(), - withChildBusAssociations: bq.withChildBusAssociations.Clone(), - withNextStation: bq.withNextStation.Clone(), - withMorningFirstStation: bq.withMorningFirstStation.Clone(), - withEveningFirstStation: bq.withEveningFirstStation.Clone(), + config: bq.config, + ctx: bq.ctx.Clone(), + order: append([]bus.OrderOption{}, bq.order...), + inters: append([]Interceptor{}, bq.inters...), + predicates: append([]predicate.Bus{}, bq.predicates...), + withNursery: bq.withNursery.Clone(), + withBoardingRecords: bq.withBoardingRecords.Clone(), + withNextStation: bq.withNextStation.Clone(), + withBusRoute: bq.withBusRoute.Clone(), // clone intermediate query. sql: bq.sql.Clone(), path: bq.path, @@ -441,17 +369,6 @@ func (bq *BusQuery) WithNursery(opts ...func(*NurseryQuery)) *BusQuery { return bq } -// WithStations tells the query-builder to eager-load the nodes that are connected to -// the "stations" edge. The optional arguments are used to configure the query builder of the edge. -func (bq *BusQuery) WithStations(opts ...func(*StationQuery)) *BusQuery { - query := (&StationClient{config: bq.config}).Query() - for _, opt := range opts { - opt(query) - } - bq.withStations = query - return bq -} - // WithBoardingRecords tells the query-builder to eager-load the nodes that are connected to // the "boarding_records" edge. The optional arguments are used to configure the query builder of the edge. func (bq *BusQuery) WithBoardingRecords(opts ...func(*BoardingRecordQuery)) *BusQuery { @@ -463,17 +380,6 @@ func (bq *BusQuery) WithBoardingRecords(opts ...func(*BoardingRecordQuery)) *Bus return bq } -// WithChildBusAssociations tells the query-builder to eager-load the nodes that are connected to -// the "childBusAssociations" edge. The optional arguments are used to configure the query builder of the edge. -func (bq *BusQuery) WithChildBusAssociations(opts ...func(*ChildBusAssociationQuery)) *BusQuery { - query := (&ChildBusAssociationClient{config: bq.config}).Query() - for _, opt := range opts { - opt(query) - } - bq.withChildBusAssociations = query - return bq -} - // WithNextStation tells the query-builder to eager-load the nodes that are connected to // the "next_station" edge. The optional arguments are used to configure the query builder of the edge. func (bq *BusQuery) WithNextStation(opts ...func(*StationQuery)) *BusQuery { @@ -485,25 +391,14 @@ func (bq *BusQuery) WithNextStation(opts ...func(*StationQuery)) *BusQuery { return bq } -// WithMorningFirstStation tells the query-builder to eager-load the nodes that are connected to -// the "morning_first_station" edge. The optional arguments are used to configure the query builder of the edge. -func (bq *BusQuery) WithMorningFirstStation(opts ...func(*StationQuery)) *BusQuery { - query := (&StationClient{config: bq.config}).Query() - for _, opt := range opts { - opt(query) - } - bq.withMorningFirstStation = query - return bq -} - -// WithEveningFirstStation tells the query-builder to eager-load the nodes that are connected to -// the "evening_first_station" edge. The optional arguments are used to configure the query builder of the edge. -func (bq *BusQuery) WithEveningFirstStation(opts ...func(*StationQuery)) *BusQuery { - query := (&StationClient{config: bq.config}).Query() +// WithBusRoute tells the query-builder to eager-load the nodes that are connected to +// the "bus_route" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithBusRoute(opts ...func(*BusRouteQuery)) *BusQuery { + query := (&BusRouteClient{config: bq.config}).Query() for _, opt := range opts { opt(query) } - bq.withEveningFirstStation = query + bq.withBusRoute = query return bq } @@ -586,17 +481,14 @@ func (bq *BusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bus, err nodes = []*Bus{} withFKs = bq.withFKs _spec = bq.querySpec() - loadedTypes = [7]bool{ + loadedTypes = [4]bool{ bq.withNursery != nil, - bq.withStations != nil, bq.withBoardingRecords != nil, - bq.withChildBusAssociations != nil, bq.withNextStation != nil, - bq.withMorningFirstStation != nil, - bq.withEveningFirstStation != nil, + bq.withBusRoute != nil, } ) - if bq.withNursery != nil || bq.withNextStation != nil || bq.withMorningFirstStation != nil || bq.withEveningFirstStation != nil { + if bq.withNursery != nil || bq.withNextStation != nil { withFKs = true } if withFKs { @@ -626,13 +518,6 @@ func (bq *BusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bus, err return nil, err } } - if query := bq.withStations; query != nil { - if err := bq.loadStations(ctx, query, nodes, - func(n *Bus) { n.Edges.Stations = []*Station{} }, - func(n *Bus, e *Station) { n.Edges.Stations = append(n.Edges.Stations, e) }); err != nil { - return nil, err - } - } if query := bq.withBoardingRecords; query != nil { if err := bq.loadBoardingRecords(ctx, query, nodes, func(n *Bus) { n.Edges.BoardingRecords = []*BoardingRecord{} }, @@ -640,30 +525,16 @@ func (bq *BusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bus, err return nil, err } } - if query := bq.withChildBusAssociations; query != nil { - if err := bq.loadChildBusAssociations(ctx, query, nodes, - func(n *Bus) { n.Edges.ChildBusAssociations = []*ChildBusAssociation{} }, - func(n *Bus, e *ChildBusAssociation) { - n.Edges.ChildBusAssociations = append(n.Edges.ChildBusAssociations, e) - }); err != nil { - return nil, err - } - } if query := bq.withNextStation; query != nil { if err := bq.loadNextStation(ctx, query, nodes, nil, func(n *Bus, e *Station) { n.Edges.NextStation = e }); err != nil { return nil, err } } - if query := bq.withMorningFirstStation; query != nil { - if err := bq.loadMorningFirstStation(ctx, query, nodes, nil, - func(n *Bus, e *Station) { n.Edges.MorningFirstStation = e }); err != nil { - return nil, err - } - } - if query := bq.withEveningFirstStation; query != nil { - if err := bq.loadEveningFirstStation(ctx, query, nodes, nil, - func(n *Bus, e *Station) { n.Edges.EveningFirstStation = e }); err != nil { + if query := bq.withBusRoute; query != nil { + if err := bq.loadBusRoute(ctx, query, nodes, + func(n *Bus) { n.Edges.BusRoute = []*BusRoute{} }, + func(n *Bus, e *BusRoute) { n.Edges.BusRoute = append(n.Edges.BusRoute, e) }); err != nil { return nil, err } } @@ -702,67 +573,6 @@ func (bq *BusQuery) loadNursery(ctx context.Context, query *NurseryQuery, nodes } return nil } -func (bq *BusQuery) loadStations(ctx context.Context, query *StationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Station)) error { - edgeIDs := make([]driver.Value, len(nodes)) - byID := make(map[uuid.UUID]*Bus) - nids := make(map[uuid.UUID]map[*Bus]struct{}) - for i, node := range nodes { - edgeIDs[i] = node.ID - byID[node.ID] = node - if init != nil { - init(node) - } - } - query.Where(func(s *sql.Selector) { - joinT := sql.Table(bus.StationsTable) - s.Join(joinT).On(s.C(station.FieldID), joinT.C(bus.StationsPrimaryKey[1])) - s.Where(sql.InValues(joinT.C(bus.StationsPrimaryKey[0]), edgeIDs...)) - columns := s.SelectedColumns() - s.Select(joinT.C(bus.StationsPrimaryKey[0])) - s.AppendSelect(columns...) - s.SetDistinct(false) - }) - if err := query.prepareQuery(ctx); err != nil { - return err - } - qr := QuerierFunc(func(ctx context.Context, q Query) (Value, error) { - return query.sqlAll(ctx, func(_ context.Context, spec *sqlgraph.QuerySpec) { - assign := spec.Assign - values := spec.ScanValues - spec.ScanValues = func(columns []string) ([]any, error) { - values, err := values(columns[1:]) - if err != nil { - return nil, err - } - return append([]any{new(uuid.UUID)}, values...), nil - } - spec.Assign = func(columns []string, values []any) error { - outValue := *values[0].(*uuid.UUID) - inValue := *values[1].(*uuid.UUID) - if nids[inValue] == nil { - nids[inValue] = map[*Bus]struct{}{byID[outValue]: {}} - return assign(columns[1:], values[1:]) - } - nids[inValue][byID[outValue]] = struct{}{} - return nil - } - }) - }) - neighbors, err := withInterceptors[[]*Station](ctx, query, qr, query.inters) - if err != nil { - return err - } - for _, n := range neighbors { - nodes, ok := nids[n.ID] - if !ok { - return fmt.Errorf(`unexpected "stations" node returned %v`, n.ID) - } - for kn := range nodes { - assign(kn, n) - } - } - return nil -} func (bq *BusQuery) loadBoardingRecords(ctx context.Context, query *BoardingRecordQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *BoardingRecord)) error { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[uuid.UUID]*Bus) @@ -794,36 +604,6 @@ func (bq *BusQuery) loadBoardingRecords(ctx context.Context, query *BoardingReco } return nil } -func (bq *BusQuery) loadChildBusAssociations(ctx context.Context, query *ChildBusAssociationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *ChildBusAssociation)) error { - fks := make([]driver.Value, 0, len(nodes)) - nodeids := make(map[uuid.UUID]*Bus) - for i := range nodes { - fks = append(fks, nodes[i].ID) - nodeids[nodes[i].ID] = nodes[i] - if init != nil { - init(nodes[i]) - } - } - if len(query.ctx.Fields) > 0 { - query.ctx.AppendFieldOnce(childbusassociation.FieldBusID) - } - query.Where(predicate.ChildBusAssociation(func(s *sql.Selector) { - s.Where(sql.InValues(s.C(bus.ChildBusAssociationsColumn), fks...)) - })) - neighbors, err := query.All(ctx) - if err != nil { - return err - } - for _, n := range neighbors { - fk := n.BusID - node, ok := nodeids[fk] - if !ok { - return fmt.Errorf(`unexpected referenced foreign-key "bus_id" returned %v for node %v`, fk, n.ID) - } - assign(node, n) - } - return nil -} func (bq *BusQuery) loadNextStation(ctx context.Context, query *StationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Station)) error { ids := make([]uuid.UUID, 0, len(nodes)) nodeids := make(map[uuid.UUID][]*Bus) @@ -856,66 +636,63 @@ func (bq *BusQuery) loadNextStation(ctx context.Context, query *StationQuery, no } return nil } -func (bq *BusQuery) loadMorningFirstStation(ctx context.Context, query *StationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Station)) error { - ids := make([]uuid.UUID, 0, len(nodes)) - nodeids := make(map[uuid.UUID][]*Bus) - for i := range nodes { - if nodes[i].bus_morning_first_station == nil { - continue - } - fk := *nodes[i].bus_morning_first_station - if _, ok := nodeids[fk]; !ok { - ids = append(ids, fk) +func (bq *BusQuery) loadBusRoute(ctx context.Context, query *BusRouteQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *BusRoute)) error { + edgeIDs := make([]driver.Value, len(nodes)) + byID := make(map[uuid.UUID]*Bus) + nids := make(map[uuid.UUID]map[*Bus]struct{}) + for i, node := range nodes { + edgeIDs[i] = node.ID + byID[node.ID] = node + if init != nil { + init(node) } - nodeids[fk] = append(nodeids[fk], nodes[i]) } - if len(ids) == 0 { - return nil - } - query.Where(station.IDIn(ids...)) - neighbors, err := query.All(ctx) - if err != nil { + query.Where(func(s *sql.Selector) { + joinT := sql.Table(bus.BusRouteTable) + s.Join(joinT).On(s.C(busroute.FieldID), joinT.C(bus.BusRoutePrimaryKey[0])) + s.Where(sql.InValues(joinT.C(bus.BusRoutePrimaryKey[1]), edgeIDs...)) + columns := s.SelectedColumns() + s.Select(joinT.C(bus.BusRoutePrimaryKey[1])) + s.AppendSelect(columns...) + s.SetDistinct(false) + }) + if err := query.prepareQuery(ctx); err != nil { return err } - for _, n := range neighbors { - nodes, ok := nodeids[n.ID] - if !ok { - return fmt.Errorf(`unexpected foreign-key "bus_morning_first_station" returned %v`, n.ID) - } - for i := range nodes { - assign(nodes[i], n) - } - } - return nil -} -func (bq *BusQuery) loadEveningFirstStation(ctx context.Context, query *StationQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *Station)) error { - ids := make([]uuid.UUID, 0, len(nodes)) - nodeids := make(map[uuid.UUID][]*Bus) - for i := range nodes { - if nodes[i].bus_evening_first_station == nil { - continue - } - fk := *nodes[i].bus_evening_first_station - if _, ok := nodeids[fk]; !ok { - ids = append(ids, fk) - } - nodeids[fk] = append(nodeids[fk], nodes[i]) - } - if len(ids) == 0 { - return nil - } - query.Where(station.IDIn(ids...)) - neighbors, err := query.All(ctx) + qr := QuerierFunc(func(ctx context.Context, q Query) (Value, error) { + return query.sqlAll(ctx, func(_ context.Context, spec *sqlgraph.QuerySpec) { + assign := spec.Assign + values := spec.ScanValues + spec.ScanValues = func(columns []string) ([]any, error) { + values, err := values(columns[1:]) + if err != nil { + return nil, err + } + return append([]any{new(uuid.UUID)}, values...), nil + } + spec.Assign = func(columns []string, values []any) error { + outValue := *values[0].(*uuid.UUID) + inValue := *values[1].(*uuid.UUID) + if nids[inValue] == nil { + nids[inValue] = map[*Bus]struct{}{byID[outValue]: {}} + return assign(columns[1:], values[1:]) + } + nids[inValue][byID[outValue]] = struct{}{} + return nil + } + }) + }) + neighbors, err := withInterceptors[[]*BusRoute](ctx, query, qr, query.inters) if err != nil { return err } for _, n := range neighbors { - nodes, ok := nodeids[n.ID] + nodes, ok := nids[n.ID] if !ok { - return fmt.Errorf(`unexpected foreign-key "bus_evening_first_station" returned %v`, n.ID) + return fmt.Errorf(`unexpected "bus_route" node returned %v`, n.ID) } - for i := range nodes { - assign(nodes[i], n) + for kn := range nodes { + assign(kn, n) } } return nil diff --git a/backend/domain/repository/ent/bus_update.go b/backend/domain/repository/ent/bus_update.go index fb7b1ae8..3596c4c8 100644 --- a/backend/domain/repository/ent/bus_update.go +++ b/backend/domain/repository/ent/bus_update.go @@ -13,7 +13,7 @@ import ( "entgo.io/ent/schema/field" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" @@ -188,21 +188,6 @@ func (bu *BusUpdate) SetNursery(n *Nursery) *BusUpdate { return bu.SetNurseryID(n.ID) } -// AddStationIDs adds the "stations" edge to the Station entity by IDs. -func (bu *BusUpdate) AddStationIDs(ids ...uuid.UUID) *BusUpdate { - bu.mutation.AddStationIDs(ids...) - return bu -} - -// AddStations adds the "stations" edges to the Station entity. -func (bu *BusUpdate) AddStations(s ...*Station) *BusUpdate { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return bu.AddStationIDs(ids...) -} - // AddBoardingRecordIDs adds the "boarding_records" edge to the BoardingRecord entity by IDs. func (bu *BusUpdate) AddBoardingRecordIDs(ids ...uuid.UUID) *BusUpdate { bu.mutation.AddBoardingRecordIDs(ids...) @@ -218,21 +203,6 @@ func (bu *BusUpdate) AddBoardingRecords(b ...*BoardingRecord) *BusUpdate { return bu.AddBoardingRecordIDs(ids...) } -// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. -func (bu *BusUpdate) AddChildBusAssociationIDs(ids ...int) *BusUpdate { - bu.mutation.AddChildBusAssociationIDs(ids...) - return bu -} - -// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. -func (bu *BusUpdate) AddChildBusAssociations(c ...*ChildBusAssociation) *BusUpdate { - ids := make([]int, len(c)) - for i := range c { - ids[i] = c[i].ID - } - return bu.AddChildBusAssociationIDs(ids...) -} - // SetNextStationID sets the "next_station" edge to the Station entity by ID. func (bu *BusUpdate) SetNextStationID(id uuid.UUID) *BusUpdate { bu.mutation.SetNextStationID(id) @@ -252,42 +222,19 @@ func (bu *BusUpdate) SetNextStation(s *Station) *BusUpdate { return bu.SetNextStationID(s.ID) } -// SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID. -func (bu *BusUpdate) SetMorningFirstStationID(id uuid.UUID) *BusUpdate { - bu.mutation.SetMorningFirstStationID(id) - return bu -} - -// SetNillableMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID if the given value is not nil. -func (bu *BusUpdate) SetNillableMorningFirstStationID(id *uuid.UUID) *BusUpdate { - if id != nil { - bu = bu.SetMorningFirstStationID(*id) - } - return bu -} - -// SetMorningFirstStation sets the "morning_first_station" edge to the Station entity. -func (bu *BusUpdate) SetMorningFirstStation(s *Station) *BusUpdate { - return bu.SetMorningFirstStationID(s.ID) -} - -// SetEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID. -func (bu *BusUpdate) SetEveningFirstStationID(id uuid.UUID) *BusUpdate { - bu.mutation.SetEveningFirstStationID(id) +// AddBusRouteIDs adds the "bus_route" edge to the BusRoute entity by IDs. +func (bu *BusUpdate) AddBusRouteIDs(ids ...uuid.UUID) *BusUpdate { + bu.mutation.AddBusRouteIDs(ids...) return bu } -// SetNillableEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID if the given value is not nil. -func (bu *BusUpdate) SetNillableEveningFirstStationID(id *uuid.UUID) *BusUpdate { - if id != nil { - bu = bu.SetEveningFirstStationID(*id) +// AddBusRoute adds the "bus_route" edges to the BusRoute entity. +func (bu *BusUpdate) AddBusRoute(b ...*BusRoute) *BusUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID } - return bu -} - -// SetEveningFirstStation sets the "evening_first_station" edge to the Station entity. -func (bu *BusUpdate) SetEveningFirstStation(s *Station) *BusUpdate { - return bu.SetEveningFirstStationID(s.ID) + return bu.AddBusRouteIDs(ids...) } // Mutation returns the BusMutation object of the builder. @@ -301,27 +248,6 @@ func (bu *BusUpdate) ClearNursery() *BusUpdate { return bu } -// ClearStations clears all "stations" edges to the Station entity. -func (bu *BusUpdate) ClearStations() *BusUpdate { - bu.mutation.ClearStations() - return bu -} - -// RemoveStationIDs removes the "stations" edge to Station entities by IDs. -func (bu *BusUpdate) RemoveStationIDs(ids ...uuid.UUID) *BusUpdate { - bu.mutation.RemoveStationIDs(ids...) - return bu -} - -// RemoveStations removes "stations" edges to Station entities. -func (bu *BusUpdate) RemoveStations(s ...*Station) *BusUpdate { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return bu.RemoveStationIDs(ids...) -} - // ClearBoardingRecords clears all "boarding_records" edges to the BoardingRecord entity. func (bu *BusUpdate) ClearBoardingRecords() *BusUpdate { bu.mutation.ClearBoardingRecords() @@ -343,45 +269,33 @@ func (bu *BusUpdate) RemoveBoardingRecords(b ...*BoardingRecord) *BusUpdate { return bu.RemoveBoardingRecordIDs(ids...) } -// ClearChildBusAssociations clears all "childBusAssociations" edges to the ChildBusAssociation entity. -func (bu *BusUpdate) ClearChildBusAssociations() *BusUpdate { - bu.mutation.ClearChildBusAssociations() - return bu -} - -// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to ChildBusAssociation entities by IDs. -func (bu *BusUpdate) RemoveChildBusAssociationIDs(ids ...int) *BusUpdate { - bu.mutation.RemoveChildBusAssociationIDs(ids...) - return bu -} - -// RemoveChildBusAssociations removes "childBusAssociations" edges to ChildBusAssociation entities. -func (bu *BusUpdate) RemoveChildBusAssociations(c ...*ChildBusAssociation) *BusUpdate { - ids := make([]int, len(c)) - for i := range c { - ids[i] = c[i].ID - } - return bu.RemoveChildBusAssociationIDs(ids...) -} - // ClearNextStation clears the "next_station" edge to the Station entity. func (bu *BusUpdate) ClearNextStation() *BusUpdate { bu.mutation.ClearNextStation() return bu } -// ClearMorningFirstStation clears the "morning_first_station" edge to the Station entity. -func (bu *BusUpdate) ClearMorningFirstStation() *BusUpdate { - bu.mutation.ClearMorningFirstStation() +// ClearBusRoute clears all "bus_route" edges to the BusRoute entity. +func (bu *BusUpdate) ClearBusRoute() *BusUpdate { + bu.mutation.ClearBusRoute() return bu } -// ClearEveningFirstStation clears the "evening_first_station" edge to the Station entity. -func (bu *BusUpdate) ClearEveningFirstStation() *BusUpdate { - bu.mutation.ClearEveningFirstStation() +// RemoveBusRouteIDs removes the "bus_route" edge to BusRoute entities by IDs. +func (bu *BusUpdate) RemoveBusRouteIDs(ids ...uuid.UUID) *BusUpdate { + bu.mutation.RemoveBusRouteIDs(ids...) return bu } +// RemoveBusRoute removes "bus_route" edges to BusRoute entities. +func (bu *BusUpdate) RemoveBusRoute(b ...*BusRoute) *BusUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bu.RemoveBusRouteIDs(ids...) +} + // Save executes the query and returns the number of nodes affected by the update operation. func (bu *BusUpdate) Save(ctx context.Context) (int, error) { bu.defaults() @@ -508,51 +422,6 @@ func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if bu.mutation.StationsCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: false, - Table: bus.StationsTable, - Columns: bus.StationsPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := bu.mutation.RemovedStationsIDs(); len(nodes) > 0 && !bu.mutation.StationsCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: false, - Table: bus.StationsTable, - Columns: bus.StationsPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := bu.mutation.StationsIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: false, - Table: bus.StationsTable, - Columns: bus.StationsPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } if bu.mutation.BoardingRecordsCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, @@ -598,51 +467,6 @@ func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if bu.mutation.ChildBusAssociationsCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: bus.ChildBusAssociationsTable, - Columns: []string{bus.ChildBusAssociationsColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := bu.mutation.RemovedChildBusAssociationsIDs(); len(nodes) > 0 && !bu.mutation.ChildBusAssociationsCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: bus.ChildBusAssociationsTable, - Columns: []string{bus.ChildBusAssociationsColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := bu.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: bus.ChildBusAssociationsTable, - Columns: []string{bus.ChildBusAssociationsColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } if bu.mutation.NextStationCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, @@ -672,57 +496,44 @@ func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if bu.mutation.MorningFirstStationCleared() { + if bu.mutation.BusRouteCleared() { edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: bus.MorningFirstStationTable, - Columns: []string{bus.MorningFirstStationColumn}, + Rel: sqlgraph.M2M, + Inverse: true, + Table: bus.BusRouteTable, + Columns: bus.BusRoutePrimaryKey, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := bu.mutation.MorningFirstStationIDs(); len(nodes) > 0 { + if nodes := bu.mutation.RemovedBusRouteIDs(); len(nodes) > 0 && !bu.mutation.BusRouteCleared() { edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: bus.MorningFirstStationTable, - Columns: []string{bus.MorningFirstStationColumn}, + Rel: sqlgraph.M2M, + Inverse: true, + Table: bus.BusRouteTable, + Columns: bus.BusRoutePrimaryKey, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } for _, k := range nodes { edge.Target.Nodes = append(edge.Target.Nodes, k) } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if bu.mutation.EveningFirstStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: bus.EveningFirstStationTable, - Columns: []string{bus.EveningFirstStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := bu.mutation.EveningFirstStationIDs(); len(nodes) > 0 { + if nodes := bu.mutation.BusRouteIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: bus.EveningFirstStationTable, - Columns: []string{bus.EveningFirstStationColumn}, + Rel: sqlgraph.M2M, + Inverse: true, + Table: bus.BusRouteTable, + Columns: bus.BusRoutePrimaryKey, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } for _, k := range nodes { @@ -905,21 +716,6 @@ func (buo *BusUpdateOne) SetNursery(n *Nursery) *BusUpdateOne { return buo.SetNurseryID(n.ID) } -// AddStationIDs adds the "stations" edge to the Station entity by IDs. -func (buo *BusUpdateOne) AddStationIDs(ids ...uuid.UUID) *BusUpdateOne { - buo.mutation.AddStationIDs(ids...) - return buo -} - -// AddStations adds the "stations" edges to the Station entity. -func (buo *BusUpdateOne) AddStations(s ...*Station) *BusUpdateOne { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return buo.AddStationIDs(ids...) -} - // AddBoardingRecordIDs adds the "boarding_records" edge to the BoardingRecord entity by IDs. func (buo *BusUpdateOne) AddBoardingRecordIDs(ids ...uuid.UUID) *BusUpdateOne { buo.mutation.AddBoardingRecordIDs(ids...) @@ -935,21 +731,6 @@ func (buo *BusUpdateOne) AddBoardingRecords(b ...*BoardingRecord) *BusUpdateOne return buo.AddBoardingRecordIDs(ids...) } -// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. -func (buo *BusUpdateOne) AddChildBusAssociationIDs(ids ...int) *BusUpdateOne { - buo.mutation.AddChildBusAssociationIDs(ids...) - return buo -} - -// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. -func (buo *BusUpdateOne) AddChildBusAssociations(c ...*ChildBusAssociation) *BusUpdateOne { - ids := make([]int, len(c)) - for i := range c { - ids[i] = c[i].ID - } - return buo.AddChildBusAssociationIDs(ids...) -} - // SetNextStationID sets the "next_station" edge to the Station entity by ID. func (buo *BusUpdateOne) SetNextStationID(id uuid.UUID) *BusUpdateOne { buo.mutation.SetNextStationID(id) @@ -969,42 +750,19 @@ func (buo *BusUpdateOne) SetNextStation(s *Station) *BusUpdateOne { return buo.SetNextStationID(s.ID) } -// SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID. -func (buo *BusUpdateOne) SetMorningFirstStationID(id uuid.UUID) *BusUpdateOne { - buo.mutation.SetMorningFirstStationID(id) - return buo -} - -// SetNillableMorningFirstStationID sets the "morning_first_station" edge to the Station entity by ID if the given value is not nil. -func (buo *BusUpdateOne) SetNillableMorningFirstStationID(id *uuid.UUID) *BusUpdateOne { - if id != nil { - buo = buo.SetMorningFirstStationID(*id) - } - return buo -} - -// SetMorningFirstStation sets the "morning_first_station" edge to the Station entity. -func (buo *BusUpdateOne) SetMorningFirstStation(s *Station) *BusUpdateOne { - return buo.SetMorningFirstStationID(s.ID) -} - -// SetEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID. -func (buo *BusUpdateOne) SetEveningFirstStationID(id uuid.UUID) *BusUpdateOne { - buo.mutation.SetEveningFirstStationID(id) +// AddBusRouteIDs adds the "bus_route" edge to the BusRoute entity by IDs. +func (buo *BusUpdateOne) AddBusRouteIDs(ids ...uuid.UUID) *BusUpdateOne { + buo.mutation.AddBusRouteIDs(ids...) return buo } -// SetNillableEveningFirstStationID sets the "evening_first_station" edge to the Station entity by ID if the given value is not nil. -func (buo *BusUpdateOne) SetNillableEveningFirstStationID(id *uuid.UUID) *BusUpdateOne { - if id != nil { - buo = buo.SetEveningFirstStationID(*id) +// AddBusRoute adds the "bus_route" edges to the BusRoute entity. +func (buo *BusUpdateOne) AddBusRoute(b ...*BusRoute) *BusUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID } - return buo -} - -// SetEveningFirstStation sets the "evening_first_station" edge to the Station entity. -func (buo *BusUpdateOne) SetEveningFirstStation(s *Station) *BusUpdateOne { - return buo.SetEveningFirstStationID(s.ID) + return buo.AddBusRouteIDs(ids...) } // Mutation returns the BusMutation object of the builder. @@ -1018,27 +776,6 @@ func (buo *BusUpdateOne) ClearNursery() *BusUpdateOne { return buo } -// ClearStations clears all "stations" edges to the Station entity. -func (buo *BusUpdateOne) ClearStations() *BusUpdateOne { - buo.mutation.ClearStations() - return buo -} - -// RemoveStationIDs removes the "stations" edge to Station entities by IDs. -func (buo *BusUpdateOne) RemoveStationIDs(ids ...uuid.UUID) *BusUpdateOne { - buo.mutation.RemoveStationIDs(ids...) - return buo -} - -// RemoveStations removes "stations" edges to Station entities. -func (buo *BusUpdateOne) RemoveStations(s ...*Station) *BusUpdateOne { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return buo.RemoveStationIDs(ids...) -} - // ClearBoardingRecords clears all "boarding_records" edges to the BoardingRecord entity. func (buo *BusUpdateOne) ClearBoardingRecords() *BusUpdateOne { buo.mutation.ClearBoardingRecords() @@ -1060,45 +797,33 @@ func (buo *BusUpdateOne) RemoveBoardingRecords(b ...*BoardingRecord) *BusUpdateO return buo.RemoveBoardingRecordIDs(ids...) } -// ClearChildBusAssociations clears all "childBusAssociations" edges to the ChildBusAssociation entity. -func (buo *BusUpdateOne) ClearChildBusAssociations() *BusUpdateOne { - buo.mutation.ClearChildBusAssociations() - return buo -} - -// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to ChildBusAssociation entities by IDs. -func (buo *BusUpdateOne) RemoveChildBusAssociationIDs(ids ...int) *BusUpdateOne { - buo.mutation.RemoveChildBusAssociationIDs(ids...) - return buo -} - -// RemoveChildBusAssociations removes "childBusAssociations" edges to ChildBusAssociation entities. -func (buo *BusUpdateOne) RemoveChildBusAssociations(c ...*ChildBusAssociation) *BusUpdateOne { - ids := make([]int, len(c)) - for i := range c { - ids[i] = c[i].ID - } - return buo.RemoveChildBusAssociationIDs(ids...) -} - // ClearNextStation clears the "next_station" edge to the Station entity. func (buo *BusUpdateOne) ClearNextStation() *BusUpdateOne { buo.mutation.ClearNextStation() return buo } -// ClearMorningFirstStation clears the "morning_first_station" edge to the Station entity. -func (buo *BusUpdateOne) ClearMorningFirstStation() *BusUpdateOne { - buo.mutation.ClearMorningFirstStation() +// ClearBusRoute clears all "bus_route" edges to the BusRoute entity. +func (buo *BusUpdateOne) ClearBusRoute() *BusUpdateOne { + buo.mutation.ClearBusRoute() return buo } -// ClearEveningFirstStation clears the "evening_first_station" edge to the Station entity. -func (buo *BusUpdateOne) ClearEveningFirstStation() *BusUpdateOne { - buo.mutation.ClearEveningFirstStation() +// RemoveBusRouteIDs removes the "bus_route" edge to BusRoute entities by IDs. +func (buo *BusUpdateOne) RemoveBusRouteIDs(ids ...uuid.UUID) *BusUpdateOne { + buo.mutation.RemoveBusRouteIDs(ids...) return buo } +// RemoveBusRoute removes "bus_route" edges to BusRoute entities. +func (buo *BusUpdateOne) RemoveBusRoute(b ...*BusRoute) *BusUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return buo.RemoveBusRouteIDs(ids...) +} + // Where appends a list predicates to the BusUpdate builder. func (buo *BusUpdateOne) Where(ps ...predicate.Bus) *BusUpdateOne { buo.mutation.Where(ps...) @@ -1255,51 +980,6 @@ func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if buo.mutation.StationsCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: false, - Table: bus.StationsTable, - Columns: bus.StationsPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := buo.mutation.RemovedStationsIDs(); len(nodes) > 0 && !buo.mutation.StationsCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: false, - Table: bus.StationsTable, - Columns: bus.StationsPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := buo.mutation.StationsIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: false, - Table: bus.StationsTable, - Columns: bus.StationsPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } if buo.mutation.BoardingRecordsCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, @@ -1345,51 +1025,6 @@ func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if buo.mutation.ChildBusAssociationsCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: bus.ChildBusAssociationsTable, - Columns: []string{bus.ChildBusAssociationsColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := buo.mutation.RemovedChildBusAssociationsIDs(); len(nodes) > 0 && !buo.mutation.ChildBusAssociationsCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: bus.ChildBusAssociationsTable, - Columns: []string{bus.ChildBusAssociationsColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := buo.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: bus.ChildBusAssociationsTable, - Columns: []string{bus.ChildBusAssociationsColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } if buo.mutation.NextStationCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, @@ -1419,57 +1054,44 @@ func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if buo.mutation.MorningFirstStationCleared() { + if buo.mutation.BusRouteCleared() { edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: bus.MorningFirstStationTable, - Columns: []string{bus.MorningFirstStationColumn}, + Rel: sqlgraph.M2M, + Inverse: true, + Table: bus.BusRouteTable, + Columns: bus.BusRoutePrimaryKey, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := buo.mutation.MorningFirstStationIDs(); len(nodes) > 0 { + if nodes := buo.mutation.RemovedBusRouteIDs(); len(nodes) > 0 && !buo.mutation.BusRouteCleared() { edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: bus.MorningFirstStationTable, - Columns: []string{bus.MorningFirstStationColumn}, + Rel: sqlgraph.M2M, + Inverse: true, + Table: bus.BusRouteTable, + Columns: bus.BusRoutePrimaryKey, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } for _, k := range nodes { edge.Target.Nodes = append(edge.Target.Nodes, k) } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if buo.mutation.EveningFirstStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: bus.EveningFirstStationTable, - Columns: []string{bus.EveningFirstStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := buo.mutation.EveningFirstStationIDs(); len(nodes) > 0 { + if nodes := buo.mutation.BusRouteIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: false, - Table: bus.EveningFirstStationTable, - Columns: []string{bus.EveningFirstStationColumn}, + Rel: sqlgraph.M2M, + Inverse: true, + Table: bus.BusRouteTable, + Columns: bus.BusRoutePrimaryKey, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } for _, k := range nodes { diff --git a/backend/domain/repository/ent/busroute.go b/backend/domain/repository/ent/busroute.go new file mode 100644 index 00000000..917e4fc4 --- /dev/null +++ b/backend/domain/repository/ent/busroute.go @@ -0,0 +1,162 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "strings" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/google/uuid" +) + +// BusRoute is the model entity for the BusRoute schema. +type BusRoute struct { + config `json:"-"` + // ID of the ent. + ID uuid.UUID `json:"id,omitempty"` + // 朝のバスか放課後のバスかを示す + BusType busroute.BusType `json:"bus_type,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the BusRouteQuery when eager-loading is set. + Edges BusRouteEdges `json:"edges"` + selectValues sql.SelectValues +} + +// BusRouteEdges holds the relations/edges for other nodes in the graph. +type BusRouteEdges struct { + // Bus holds the value of the bus edge. + Bus []*Bus `json:"bus,omitempty"` + // ChildBusAssociations holds the value of the childBusAssociations edge. + ChildBusAssociations []*ChildBusAssociation `json:"childBusAssociations,omitempty"` + // BusRouteAssociations holds the value of the busRouteAssociations edge. + BusRouteAssociations []*BusRouteAssociation `json:"busRouteAssociations,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [3]bool +} + +// BusOrErr returns the Bus value or an error if the edge +// was not loaded in eager-loading. +func (e BusRouteEdges) BusOrErr() ([]*Bus, error) { + if e.loadedTypes[0] { + return e.Bus, nil + } + return nil, &NotLoadedError{edge: "bus"} +} + +// ChildBusAssociationsOrErr returns the ChildBusAssociations value or an error if the edge +// was not loaded in eager-loading. +func (e BusRouteEdges) ChildBusAssociationsOrErr() ([]*ChildBusAssociation, error) { + if e.loadedTypes[1] { + return e.ChildBusAssociations, nil + } + return nil, &NotLoadedError{edge: "childBusAssociations"} +} + +// BusRouteAssociationsOrErr returns the BusRouteAssociations value or an error if the edge +// was not loaded in eager-loading. +func (e BusRouteEdges) BusRouteAssociationsOrErr() ([]*BusRouteAssociation, error) { + if e.loadedTypes[2] { + return e.BusRouteAssociations, nil + } + return nil, &NotLoadedError{edge: "busRouteAssociations"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*BusRoute) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case busroute.FieldBusType: + values[i] = new(sql.NullString) + case busroute.FieldID: + values[i] = new(uuid.UUID) + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the BusRoute fields. +func (br *BusRoute) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case busroute.FieldID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field id", values[i]) + } else if value != nil { + br.ID = *value + } + case busroute.FieldBusType: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field bus_type", values[i]) + } else if value.Valid { + br.BusType = busroute.BusType(value.String) + } + default: + br.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the BusRoute. +// This includes values selected through modifiers, order, etc. +func (br *BusRoute) Value(name string) (ent.Value, error) { + return br.selectValues.Get(name) +} + +// QueryBus queries the "bus" edge of the BusRoute entity. +func (br *BusRoute) QueryBus() *BusQuery { + return NewBusRouteClient(br.config).QueryBus(br) +} + +// QueryChildBusAssociations queries the "childBusAssociations" edge of the BusRoute entity. +func (br *BusRoute) QueryChildBusAssociations() *ChildBusAssociationQuery { + return NewBusRouteClient(br.config).QueryChildBusAssociations(br) +} + +// QueryBusRouteAssociations queries the "busRouteAssociations" edge of the BusRoute entity. +func (br *BusRoute) QueryBusRouteAssociations() *BusRouteAssociationQuery { + return NewBusRouteClient(br.config).QueryBusRouteAssociations(br) +} + +// Update returns a builder for updating this BusRoute. +// Note that you need to call BusRoute.Unwrap() before calling this method if this BusRoute +// was returned from a transaction, and the transaction was committed or rolled back. +func (br *BusRoute) Update() *BusRouteUpdateOne { + return NewBusRouteClient(br.config).UpdateOne(br) +} + +// Unwrap unwraps the BusRoute entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (br *BusRoute) Unwrap() *BusRoute { + _tx, ok := br.config.driver.(*txDriver) + if !ok { + panic("ent: BusRoute is not a transactional entity") + } + br.config.driver = _tx.drv + return br +} + +// String implements the fmt.Stringer. +func (br *BusRoute) String() string { + var builder strings.Builder + builder.WriteString("BusRoute(") + builder.WriteString(fmt.Sprintf("id=%v, ", br.ID)) + builder.WriteString("bus_type=") + builder.WriteString(fmt.Sprintf("%v", br.BusType)) + builder.WriteByte(')') + return builder.String() +} + +// BusRoutes is a parsable slice of BusRoute. +type BusRoutes []*BusRoute diff --git a/backend/domain/repository/ent/busroute/busroute.go b/backend/domain/repository/ent/busroute/busroute.go new file mode 100644 index 00000000..5562a4f6 --- /dev/null +++ b/backend/domain/repository/ent/busroute/busroute.go @@ -0,0 +1,173 @@ +// Code generated by ent, DO NOT EDIT. + +package busroute + +import ( + "fmt" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/google/uuid" +) + +const ( + // Label holds the string label denoting the busroute type in the database. + Label = "bus_route" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldBusType holds the string denoting the bus_type field in the database. + FieldBusType = "bus_type" + // EdgeBus holds the string denoting the bus edge name in mutations. + EdgeBus = "bus" + // EdgeChildBusAssociations holds the string denoting the childbusassociations edge name in mutations. + EdgeChildBusAssociations = "childBusAssociations" + // EdgeBusRouteAssociations holds the string denoting the busrouteassociations edge name in mutations. + EdgeBusRouteAssociations = "busRouteAssociations" + // Table holds the table name of the busroute in the database. + Table = "bus_routes" + // BusTable is the table that holds the bus relation/edge. The primary key declared below. + BusTable = "bus_route_bus" + // BusInverseTable is the table name for the Bus entity. + // It exists in this package in order to avoid circular dependency with the "bus" package. + BusInverseTable = "bus" + // ChildBusAssociationsTable is the table that holds the childBusAssociations relation/edge. + ChildBusAssociationsTable = "child_bus_associations" + // ChildBusAssociationsInverseTable is the table name for the ChildBusAssociation entity. + // It exists in this package in order to avoid circular dependency with the "childbusassociation" package. + ChildBusAssociationsInverseTable = "child_bus_associations" + // ChildBusAssociationsColumn is the table column denoting the childBusAssociations relation/edge. + ChildBusAssociationsColumn = "bus_route_id" + // BusRouteAssociationsTable is the table that holds the busRouteAssociations relation/edge. + BusRouteAssociationsTable = "bus_route_associations" + // BusRouteAssociationsInverseTable is the table name for the BusRouteAssociation entity. + // It exists in this package in order to avoid circular dependency with the "busrouteassociation" package. + BusRouteAssociationsInverseTable = "bus_route_associations" + // BusRouteAssociationsColumn is the table column denoting the busRouteAssociations relation/edge. + BusRouteAssociationsColumn = "bus_route_id" +) + +// Columns holds all SQL columns for busroute fields. +var Columns = []string{ + FieldID, + FieldBusType, +} + +var ( + // BusPrimaryKey and BusColumn2 are the table columns denoting the + // primary key for the bus relation (M2M). + BusPrimaryKey = []string{"bus_route_id", "bus_id"} +) + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + return false +} + +var ( + // DefaultID holds the default value on creation for the "id" field. + DefaultID func() uuid.UUID +) + +// BusType defines the type for the "bus_type" enum field. +type BusType string + +// BusType values. +const ( + BusTypeMorning BusType = "morning" + BusTypeEvening BusType = "evening" +) + +func (bt BusType) String() string { + return string(bt) +} + +// BusTypeValidator is a validator for the "bus_type" field enum values. It is called by the builders before save. +func BusTypeValidator(bt BusType) error { + switch bt { + case BusTypeMorning, BusTypeEvening: + return nil + default: + return fmt.Errorf("busroute: invalid enum value for bus_type field: %q", bt) + } +} + +// OrderOption defines the ordering options for the BusRoute queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByBusType orders the results by the bus_type field. +func ByBusType(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldBusType, opts...).ToFunc() +} + +// ByBusCount orders the results by bus count. +func ByBusCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newBusStep(), opts...) + } +} + +// ByBus orders the results by bus terms. +func ByBus(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newBusStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByChildBusAssociationsCount orders the results by childBusAssociations count. +func ByChildBusAssociationsCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newChildBusAssociationsStep(), opts...) + } +} + +// ByChildBusAssociations orders the results by childBusAssociations terms. +func ByChildBusAssociations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newChildBusAssociationsStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByBusRouteAssociationsCount orders the results by busRouteAssociations count. +func ByBusRouteAssociationsCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newBusRouteAssociationsStep(), opts...) + } +} + +// ByBusRouteAssociations orders the results by busRouteAssociations terms. +func ByBusRouteAssociations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newBusRouteAssociationsStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} +func newBusStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(BusInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2M, false, BusTable, BusPrimaryKey...), + ) +} +func newChildBusAssociationsStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(ChildBusAssociationsInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), + ) +} +func newBusRouteAssociationsStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(BusRouteAssociationsInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, BusRouteAssociationsTable, BusRouteAssociationsColumn), + ) +} diff --git a/backend/domain/repository/ent/busroute/where.go b/backend/domain/repository/ent/busroute/where.go new file mode 100644 index 00000000..8dc46bca --- /dev/null +++ b/backend/domain/repository/ent/busroute/where.go @@ -0,0 +1,159 @@ +// Code generated by ent, DO NOT EDIT. + +package busroute + +import ( + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ID filters vertices based on their ID field. +func ID(id uuid.UUID) predicate.BusRoute { + return predicate.BusRoute(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id uuid.UUID) predicate.BusRoute { + return predicate.BusRoute(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id uuid.UUID) predicate.BusRoute { + return predicate.BusRoute(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...uuid.UUID) predicate.BusRoute { + return predicate.BusRoute(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...uuid.UUID) predicate.BusRoute { + return predicate.BusRoute(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id uuid.UUID) predicate.BusRoute { + return predicate.BusRoute(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id uuid.UUID) predicate.BusRoute { + return predicate.BusRoute(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id uuid.UUID) predicate.BusRoute { + return predicate.BusRoute(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id uuid.UUID) predicate.BusRoute { + return predicate.BusRoute(sql.FieldLTE(FieldID, id)) +} + +// BusTypeEQ applies the EQ predicate on the "bus_type" field. +func BusTypeEQ(v BusType) predicate.BusRoute { + return predicate.BusRoute(sql.FieldEQ(FieldBusType, v)) +} + +// BusTypeNEQ applies the NEQ predicate on the "bus_type" field. +func BusTypeNEQ(v BusType) predicate.BusRoute { + return predicate.BusRoute(sql.FieldNEQ(FieldBusType, v)) +} + +// BusTypeIn applies the In predicate on the "bus_type" field. +func BusTypeIn(vs ...BusType) predicate.BusRoute { + return predicate.BusRoute(sql.FieldIn(FieldBusType, vs...)) +} + +// BusTypeNotIn applies the NotIn predicate on the "bus_type" field. +func BusTypeNotIn(vs ...BusType) predicate.BusRoute { + return predicate.BusRoute(sql.FieldNotIn(FieldBusType, vs...)) +} + +// HasBus applies the HasEdge predicate on the "bus" edge. +func HasBus() predicate.BusRoute { + return predicate.BusRoute(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2M, false, BusTable, BusPrimaryKey...), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasBusWith applies the HasEdge predicate on the "bus" edge with a given conditions (other predicates). +func HasBusWith(preds ...predicate.Bus) predicate.BusRoute { + return predicate.BusRoute(func(s *sql.Selector) { + step := newBusStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasChildBusAssociations applies the HasEdge predicate on the "childBusAssociations" edge. +func HasChildBusAssociations() predicate.BusRoute { + return predicate.BusRoute(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, ChildBusAssociationsTable, ChildBusAssociationsColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasChildBusAssociationsWith applies the HasEdge predicate on the "childBusAssociations" edge with a given conditions (other predicates). +func HasChildBusAssociationsWith(preds ...predicate.ChildBusAssociation) predicate.BusRoute { + return predicate.BusRoute(func(s *sql.Selector) { + step := newChildBusAssociationsStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasBusRouteAssociations applies the HasEdge predicate on the "busRouteAssociations" edge. +func HasBusRouteAssociations() predicate.BusRoute { + return predicate.BusRoute(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, BusRouteAssociationsTable, BusRouteAssociationsColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasBusRouteAssociationsWith applies the HasEdge predicate on the "busRouteAssociations" edge with a given conditions (other predicates). +func HasBusRouteAssociationsWith(preds ...predicate.BusRouteAssociation) predicate.BusRoute { + return predicate.BusRoute(func(s *sql.Selector) { + step := newBusRouteAssociationsStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.BusRoute) predicate.BusRoute { + return predicate.BusRoute(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.BusRoute) predicate.BusRoute { + return predicate.BusRoute(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.BusRoute) predicate.BusRoute { + return predicate.BusRoute(sql.NotPredicates(p)) +} diff --git a/backend/domain/repository/ent/busroute_create.go b/backend/domain/repository/ent/busroute_create.go new file mode 100644 index 00000000..a10c9006 --- /dev/null +++ b/backend/domain/repository/ent/busroute_create.go @@ -0,0 +1,314 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/google/uuid" +) + +// BusRouteCreate is the builder for creating a BusRoute entity. +type BusRouteCreate struct { + config + mutation *BusRouteMutation + hooks []Hook +} + +// SetBusType sets the "bus_type" field. +func (brc *BusRouteCreate) SetBusType(bt busroute.BusType) *BusRouteCreate { + brc.mutation.SetBusType(bt) + return brc +} + +// SetID sets the "id" field. +func (brc *BusRouteCreate) SetID(u uuid.UUID) *BusRouteCreate { + brc.mutation.SetID(u) + return brc +} + +// SetNillableID sets the "id" field if the given value is not nil. +func (brc *BusRouteCreate) SetNillableID(u *uuid.UUID) *BusRouteCreate { + if u != nil { + brc.SetID(*u) + } + return brc +} + +// AddBuIDs adds the "bus" edge to the Bus entity by IDs. +func (brc *BusRouteCreate) AddBuIDs(ids ...uuid.UUID) *BusRouteCreate { + brc.mutation.AddBuIDs(ids...) + return brc +} + +// AddBus adds the "bus" edges to the Bus entity. +func (brc *BusRouteCreate) AddBus(b ...*Bus) *BusRouteCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return brc.AddBuIDs(ids...) +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (brc *BusRouteCreate) AddChildBusAssociationIDs(ids ...int) *BusRouteCreate { + brc.mutation.AddChildBusAssociationIDs(ids...) + return brc +} + +// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. +func (brc *BusRouteCreate) AddChildBusAssociations(c ...*ChildBusAssociation) *BusRouteCreate { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return brc.AddChildBusAssociationIDs(ids...) +} + +// AddBusRouteAssociationIDs adds the "busRouteAssociations" edge to the BusRouteAssociation entity by IDs. +func (brc *BusRouteCreate) AddBusRouteAssociationIDs(ids ...int) *BusRouteCreate { + brc.mutation.AddBusRouteAssociationIDs(ids...) + return brc +} + +// AddBusRouteAssociations adds the "busRouteAssociations" edges to the BusRouteAssociation entity. +func (brc *BusRouteCreate) AddBusRouteAssociations(b ...*BusRouteAssociation) *BusRouteCreate { + ids := make([]int, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return brc.AddBusRouteAssociationIDs(ids...) +} + +// Mutation returns the BusRouteMutation object of the builder. +func (brc *BusRouteCreate) Mutation() *BusRouteMutation { + return brc.mutation +} + +// Save creates the BusRoute in the database. +func (brc *BusRouteCreate) Save(ctx context.Context) (*BusRoute, error) { + brc.defaults() + return withHooks(ctx, brc.sqlSave, brc.mutation, brc.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (brc *BusRouteCreate) SaveX(ctx context.Context) *BusRoute { + v, err := brc.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (brc *BusRouteCreate) Exec(ctx context.Context) error { + _, err := brc.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (brc *BusRouteCreate) ExecX(ctx context.Context) { + if err := brc.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (brc *BusRouteCreate) defaults() { + if _, ok := brc.mutation.ID(); !ok { + v := busroute.DefaultID() + brc.mutation.SetID(v) + } +} + +// check runs all checks and user-defined validators on the builder. +func (brc *BusRouteCreate) check() error { + if _, ok := brc.mutation.BusType(); !ok { + return &ValidationError{Name: "bus_type", err: errors.New(`ent: missing required field "BusRoute.bus_type"`)} + } + if v, ok := brc.mutation.BusType(); ok { + if err := busroute.BusTypeValidator(v); err != nil { + return &ValidationError{Name: "bus_type", err: fmt.Errorf(`ent: validator failed for field "BusRoute.bus_type": %w`, err)} + } + } + return nil +} + +func (brc *BusRouteCreate) sqlSave(ctx context.Context) (*BusRoute, error) { + if err := brc.check(); err != nil { + return nil, err + } + _node, _spec := brc.createSpec() + if err := sqlgraph.CreateNode(ctx, brc.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + if _spec.ID.Value != nil { + if id, ok := _spec.ID.Value.(*uuid.UUID); ok { + _node.ID = *id + } else if err := _node.ID.Scan(_spec.ID.Value); err != nil { + return nil, err + } + } + brc.mutation.id = &_node.ID + brc.mutation.done = true + return _node, nil +} + +func (brc *BusRouteCreate) createSpec() (*BusRoute, *sqlgraph.CreateSpec) { + var ( + _node = &BusRoute{config: brc.config} + _spec = sqlgraph.NewCreateSpec(busroute.Table, sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID)) + ) + if id, ok := brc.mutation.ID(); ok { + _node.ID = id + _spec.ID.Value = &id + } + if value, ok := brc.mutation.BusType(); ok { + _spec.SetField(busroute.FieldBusType, field.TypeEnum, value) + _node.BusType = value + } + if nodes := brc.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: busroute.BusTable, + Columns: busroute.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := brc.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.ChildBusAssociationsTable, + Columns: []string{busroute.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := brc.mutation.BusRouteAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.BusRouteAssociationsTable, + Columns: []string{busroute.BusRouteAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// BusRouteCreateBulk is the builder for creating many BusRoute entities in bulk. +type BusRouteCreateBulk struct { + config + err error + builders []*BusRouteCreate +} + +// Save creates the BusRoute entities in the database. +func (brcb *BusRouteCreateBulk) Save(ctx context.Context) ([]*BusRoute, error) { + if brcb.err != nil { + return nil, brcb.err + } + specs := make([]*sqlgraph.CreateSpec, len(brcb.builders)) + nodes := make([]*BusRoute, len(brcb.builders)) + mutators := make([]Mutator, len(brcb.builders)) + for i := range brcb.builders { + func(i int, root context.Context) { + builder := brcb.builders[i] + builder.defaults() + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*BusRouteMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, brcb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, brcb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, brcb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (brcb *BusRouteCreateBulk) SaveX(ctx context.Context) []*BusRoute { + v, err := brcb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (brcb *BusRouteCreateBulk) Exec(ctx context.Context) error { + _, err := brcb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (brcb *BusRouteCreateBulk) ExecX(ctx context.Context) { + if err := brcb.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/busroute_delete.go b/backend/domain/repository/ent/busroute_delete.go new file mode 100644 index 00000000..7b864110 --- /dev/null +++ b/backend/domain/repository/ent/busroute_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" +) + +// BusRouteDelete is the builder for deleting a BusRoute entity. +type BusRouteDelete struct { + config + hooks []Hook + mutation *BusRouteMutation +} + +// Where appends a list predicates to the BusRouteDelete builder. +func (brd *BusRouteDelete) Where(ps ...predicate.BusRoute) *BusRouteDelete { + brd.mutation.Where(ps...) + return brd +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (brd *BusRouteDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, brd.sqlExec, brd.mutation, brd.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (brd *BusRouteDelete) ExecX(ctx context.Context) int { + n, err := brd.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (brd *BusRouteDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(busroute.Table, sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID)) + if ps := brd.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, brd.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + brd.mutation.done = true + return affected, err +} + +// BusRouteDeleteOne is the builder for deleting a single BusRoute entity. +type BusRouteDeleteOne struct { + brd *BusRouteDelete +} + +// Where appends a list predicates to the BusRouteDelete builder. +func (brdo *BusRouteDeleteOne) Where(ps ...predicate.BusRoute) *BusRouteDeleteOne { + brdo.brd.mutation.Where(ps...) + return brdo +} + +// Exec executes the deletion query. +func (brdo *BusRouteDeleteOne) Exec(ctx context.Context) error { + n, err := brdo.brd.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{busroute.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (brdo *BusRouteDeleteOne) ExecX(ctx context.Context) { + if err := brdo.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/busroute_query.go b/backend/domain/repository/ent/busroute_query.go new file mode 100644 index 00000000..2c329aa6 --- /dev/null +++ b/backend/domain/repository/ent/busroute_query.go @@ -0,0 +1,789 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "database/sql/driver" + "fmt" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// BusRouteQuery is the builder for querying BusRoute entities. +type BusRouteQuery struct { + config + ctx *QueryContext + order []busroute.OrderOption + inters []Interceptor + predicates []predicate.BusRoute + withBus *BusQuery + withChildBusAssociations *ChildBusAssociationQuery + withBusRouteAssociations *BusRouteAssociationQuery + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the BusRouteQuery builder. +func (brq *BusRouteQuery) Where(ps ...predicate.BusRoute) *BusRouteQuery { + brq.predicates = append(brq.predicates, ps...) + return brq +} + +// Limit the number of records to be returned by this query. +func (brq *BusRouteQuery) Limit(limit int) *BusRouteQuery { + brq.ctx.Limit = &limit + return brq +} + +// Offset to start from. +func (brq *BusRouteQuery) Offset(offset int) *BusRouteQuery { + brq.ctx.Offset = &offset + return brq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (brq *BusRouteQuery) Unique(unique bool) *BusRouteQuery { + brq.ctx.Unique = &unique + return brq +} + +// Order specifies how the records should be ordered. +func (brq *BusRouteQuery) Order(o ...busroute.OrderOption) *BusRouteQuery { + brq.order = append(brq.order, o...) + return brq +} + +// QueryBus chains the current query on the "bus" edge. +func (brq *BusRouteQuery) QueryBus() *BusQuery { + query := (&BusClient{config: brq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := brq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := brq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(busroute.Table, busroute.FieldID, selector), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.M2M, false, busroute.BusTable, busroute.BusPrimaryKey...), + ) + fromU = sqlgraph.SetNeighbors(brq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryChildBusAssociations chains the current query on the "childBusAssociations" edge. +func (brq *BusRouteQuery) QueryChildBusAssociations() *ChildBusAssociationQuery { + query := (&ChildBusAssociationClient{config: brq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := brq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := brq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(busroute.Table, busroute.FieldID, selector), + sqlgraph.To(childbusassociation.Table, childbusassociation.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, busroute.ChildBusAssociationsTable, busroute.ChildBusAssociationsColumn), + ) + fromU = sqlgraph.SetNeighbors(brq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryBusRouteAssociations chains the current query on the "busRouteAssociations" edge. +func (brq *BusRouteQuery) QueryBusRouteAssociations() *BusRouteAssociationQuery { + query := (&BusRouteAssociationClient{config: brq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := brq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := brq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(busroute.Table, busroute.FieldID, selector), + sqlgraph.To(busrouteassociation.Table, busrouteassociation.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, busroute.BusRouteAssociationsTable, busroute.BusRouteAssociationsColumn), + ) + fromU = sqlgraph.SetNeighbors(brq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first BusRoute entity from the query. +// Returns a *NotFoundError when no BusRoute was found. +func (brq *BusRouteQuery) First(ctx context.Context) (*BusRoute, error) { + nodes, err := brq.Limit(1).All(setContextOp(ctx, brq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{busroute.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (brq *BusRouteQuery) FirstX(ctx context.Context) *BusRoute { + node, err := brq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first BusRoute ID from the query. +// Returns a *NotFoundError when no BusRoute ID was found. +func (brq *BusRouteQuery) FirstID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = brq.Limit(1).IDs(setContextOp(ctx, brq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{busroute.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (brq *BusRouteQuery) FirstIDX(ctx context.Context) uuid.UUID { + id, err := brq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single BusRoute entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one BusRoute entity is found. +// Returns a *NotFoundError when no BusRoute entities are found. +func (brq *BusRouteQuery) Only(ctx context.Context) (*BusRoute, error) { + nodes, err := brq.Limit(2).All(setContextOp(ctx, brq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{busroute.Label} + default: + return nil, &NotSingularError{busroute.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (brq *BusRouteQuery) OnlyX(ctx context.Context) *BusRoute { + node, err := brq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only BusRoute ID in the query. +// Returns a *NotSingularError when more than one BusRoute ID is found. +// Returns a *NotFoundError when no entities are found. +func (brq *BusRouteQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { + var ids []uuid.UUID + if ids, err = brq.Limit(2).IDs(setContextOp(ctx, brq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{busroute.Label} + default: + err = &NotSingularError{busroute.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (brq *BusRouteQuery) OnlyIDX(ctx context.Context) uuid.UUID { + id, err := brq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of BusRoutes. +func (brq *BusRouteQuery) All(ctx context.Context) ([]*BusRoute, error) { + ctx = setContextOp(ctx, brq.ctx, "All") + if err := brq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*BusRoute, *BusRouteQuery]() + return withInterceptors[[]*BusRoute](ctx, brq, qr, brq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (brq *BusRouteQuery) AllX(ctx context.Context) []*BusRoute { + nodes, err := brq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of BusRoute IDs. +func (brq *BusRouteQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error) { + if brq.ctx.Unique == nil && brq.path != nil { + brq.Unique(true) + } + ctx = setContextOp(ctx, brq.ctx, "IDs") + if err = brq.Select(busroute.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (brq *BusRouteQuery) IDsX(ctx context.Context) []uuid.UUID { + ids, err := brq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (brq *BusRouteQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, brq.ctx, "Count") + if err := brq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, brq, querierCount[*BusRouteQuery](), brq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (brq *BusRouteQuery) CountX(ctx context.Context) int { + count, err := brq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (brq *BusRouteQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, brq.ctx, "Exist") + switch _, err := brq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (brq *BusRouteQuery) ExistX(ctx context.Context) bool { + exist, err := brq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the BusRouteQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (brq *BusRouteQuery) Clone() *BusRouteQuery { + if brq == nil { + return nil + } + return &BusRouteQuery{ + config: brq.config, + ctx: brq.ctx.Clone(), + order: append([]busroute.OrderOption{}, brq.order...), + inters: append([]Interceptor{}, brq.inters...), + predicates: append([]predicate.BusRoute{}, brq.predicates...), + withBus: brq.withBus.Clone(), + withChildBusAssociations: brq.withChildBusAssociations.Clone(), + withBusRouteAssociations: brq.withBusRouteAssociations.Clone(), + // clone intermediate query. + sql: brq.sql.Clone(), + path: brq.path, + } +} + +// WithBus tells the query-builder to eager-load the nodes that are connected to +// the "bus" edge. The optional arguments are used to configure the query builder of the edge. +func (brq *BusRouteQuery) WithBus(opts ...func(*BusQuery)) *BusRouteQuery { + query := (&BusClient{config: brq.config}).Query() + for _, opt := range opts { + opt(query) + } + brq.withBus = query + return brq +} + +// WithChildBusAssociations tells the query-builder to eager-load the nodes that are connected to +// the "childBusAssociations" edge. The optional arguments are used to configure the query builder of the edge. +func (brq *BusRouteQuery) WithChildBusAssociations(opts ...func(*ChildBusAssociationQuery)) *BusRouteQuery { + query := (&ChildBusAssociationClient{config: brq.config}).Query() + for _, opt := range opts { + opt(query) + } + brq.withChildBusAssociations = query + return brq +} + +// WithBusRouteAssociations tells the query-builder to eager-load the nodes that are connected to +// the "busRouteAssociations" edge. The optional arguments are used to configure the query builder of the edge. +func (brq *BusRouteQuery) WithBusRouteAssociations(opts ...func(*BusRouteAssociationQuery)) *BusRouteQuery { + query := (&BusRouteAssociationClient{config: brq.config}).Query() + for _, opt := range opts { + opt(query) + } + brq.withBusRouteAssociations = query + return brq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// BusType busroute.BusType `json:"bus_type,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.BusRoute.Query(). +// GroupBy(busroute.FieldBusType). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (brq *BusRouteQuery) GroupBy(field string, fields ...string) *BusRouteGroupBy { + brq.ctx.Fields = append([]string{field}, fields...) + grbuild := &BusRouteGroupBy{build: brq} + grbuild.flds = &brq.ctx.Fields + grbuild.label = busroute.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// BusType busroute.BusType `json:"bus_type,omitempty"` +// } +// +// client.BusRoute.Query(). +// Select(busroute.FieldBusType). +// Scan(ctx, &v) +func (brq *BusRouteQuery) Select(fields ...string) *BusRouteSelect { + brq.ctx.Fields = append(brq.ctx.Fields, fields...) + sbuild := &BusRouteSelect{BusRouteQuery: brq} + sbuild.label = busroute.Label + sbuild.flds, sbuild.scan = &brq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a BusRouteSelect configured with the given aggregations. +func (brq *BusRouteQuery) Aggregate(fns ...AggregateFunc) *BusRouteSelect { + return brq.Select().Aggregate(fns...) +} + +func (brq *BusRouteQuery) prepareQuery(ctx context.Context) error { + for _, inter := range brq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, brq); err != nil { + return err + } + } + } + for _, f := range brq.ctx.Fields { + if !busroute.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if brq.path != nil { + prev, err := brq.path(ctx) + if err != nil { + return err + } + brq.sql = prev + } + return nil +} + +func (brq *BusRouteQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BusRoute, error) { + var ( + nodes = []*BusRoute{} + _spec = brq.querySpec() + loadedTypes = [3]bool{ + brq.withBus != nil, + brq.withChildBusAssociations != nil, + brq.withBusRouteAssociations != nil, + } + ) + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*BusRoute).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &BusRoute{config: brq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, brq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := brq.withBus; query != nil { + if err := brq.loadBus(ctx, query, nodes, + func(n *BusRoute) { n.Edges.Bus = []*Bus{} }, + func(n *BusRoute, e *Bus) { n.Edges.Bus = append(n.Edges.Bus, e) }); err != nil { + return nil, err + } + } + if query := brq.withChildBusAssociations; query != nil { + if err := brq.loadChildBusAssociations(ctx, query, nodes, + func(n *BusRoute) { n.Edges.ChildBusAssociations = []*ChildBusAssociation{} }, + func(n *BusRoute, e *ChildBusAssociation) { + n.Edges.ChildBusAssociations = append(n.Edges.ChildBusAssociations, e) + }); err != nil { + return nil, err + } + } + if query := brq.withBusRouteAssociations; query != nil { + if err := brq.loadBusRouteAssociations(ctx, query, nodes, + func(n *BusRoute) { n.Edges.BusRouteAssociations = []*BusRouteAssociation{} }, + func(n *BusRoute, e *BusRouteAssociation) { + n.Edges.BusRouteAssociations = append(n.Edges.BusRouteAssociations, e) + }); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (brq *BusRouteQuery) loadBus(ctx context.Context, query *BusQuery, nodes []*BusRoute, init func(*BusRoute), assign func(*BusRoute, *Bus)) error { + edgeIDs := make([]driver.Value, len(nodes)) + byID := make(map[uuid.UUID]*BusRoute) + nids := make(map[uuid.UUID]map[*BusRoute]struct{}) + for i, node := range nodes { + edgeIDs[i] = node.ID + byID[node.ID] = node + if init != nil { + init(node) + } + } + query.Where(func(s *sql.Selector) { + joinT := sql.Table(busroute.BusTable) + s.Join(joinT).On(s.C(bus.FieldID), joinT.C(busroute.BusPrimaryKey[1])) + s.Where(sql.InValues(joinT.C(busroute.BusPrimaryKey[0]), edgeIDs...)) + columns := s.SelectedColumns() + s.Select(joinT.C(busroute.BusPrimaryKey[0])) + s.AppendSelect(columns...) + s.SetDistinct(false) + }) + if err := query.prepareQuery(ctx); err != nil { + return err + } + qr := QuerierFunc(func(ctx context.Context, q Query) (Value, error) { + return query.sqlAll(ctx, func(_ context.Context, spec *sqlgraph.QuerySpec) { + assign := spec.Assign + values := spec.ScanValues + spec.ScanValues = func(columns []string) ([]any, error) { + values, err := values(columns[1:]) + if err != nil { + return nil, err + } + return append([]any{new(uuid.UUID)}, values...), nil + } + spec.Assign = func(columns []string, values []any) error { + outValue := *values[0].(*uuid.UUID) + inValue := *values[1].(*uuid.UUID) + if nids[inValue] == nil { + nids[inValue] = map[*BusRoute]struct{}{byID[outValue]: {}} + return assign(columns[1:], values[1:]) + } + nids[inValue][byID[outValue]] = struct{}{} + return nil + } + }) + }) + neighbors, err := withInterceptors[[]*Bus](ctx, query, qr, query.inters) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nids[n.ID] + if !ok { + return fmt.Errorf(`unexpected "bus" node returned %v`, n.ID) + } + for kn := range nodes { + assign(kn, n) + } + } + return nil +} +func (brq *BusRouteQuery) loadChildBusAssociations(ctx context.Context, query *ChildBusAssociationQuery, nodes []*BusRoute, init func(*BusRoute), assign func(*BusRoute, *ChildBusAssociation)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*BusRoute) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(childbusassociation.FieldBusRouteID) + } + query.Where(predicate.ChildBusAssociation(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(busroute.ChildBusAssociationsColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.BusRouteID + node, ok := nodeids[fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "bus_route_id" returned %v for node %v`, fk, n.ID) + } + assign(node, n) + } + return nil +} +func (brq *BusRouteQuery) loadBusRouteAssociations(ctx context.Context, query *BusRouteAssociationQuery, nodes []*BusRoute, init func(*BusRoute), assign func(*BusRoute, *BusRouteAssociation)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*BusRoute) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(busrouteassociation.FieldBusRouteID) + } + query.Where(predicate.BusRouteAssociation(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(busroute.BusRouteAssociationsColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.BusRouteID + node, ok := nodeids[fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "bus_route_id" returned %v for node %v`, fk, n.ID) + } + assign(node, n) + } + return nil +} + +func (brq *BusRouteQuery) sqlCount(ctx context.Context) (int, error) { + _spec := brq.querySpec() + _spec.Node.Columns = brq.ctx.Fields + if len(brq.ctx.Fields) > 0 { + _spec.Unique = brq.ctx.Unique != nil && *brq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, brq.driver, _spec) +} + +func (brq *BusRouteQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(busroute.Table, busroute.Columns, sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID)) + _spec.From = brq.sql + if unique := brq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if brq.path != nil { + _spec.Unique = true + } + if fields := brq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, busroute.FieldID) + for i := range fields { + if fields[i] != busroute.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + } + if ps := brq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := brq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := brq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := brq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (brq *BusRouteQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(brq.driver.Dialect()) + t1 := builder.Table(busroute.Table) + columns := brq.ctx.Fields + if len(columns) == 0 { + columns = busroute.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if brq.sql != nil { + selector = brq.sql + selector.Select(selector.Columns(columns...)...) + } + if brq.ctx.Unique != nil && *brq.ctx.Unique { + selector.Distinct() + } + for _, p := range brq.predicates { + p(selector) + } + for _, p := range brq.order { + p(selector) + } + if offset := brq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := brq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// BusRouteGroupBy is the group-by builder for BusRoute entities. +type BusRouteGroupBy struct { + selector + build *BusRouteQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (brgb *BusRouteGroupBy) Aggregate(fns ...AggregateFunc) *BusRouteGroupBy { + brgb.fns = append(brgb.fns, fns...) + return brgb +} + +// Scan applies the selector query and scans the result into the given value. +func (brgb *BusRouteGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, brgb.build.ctx, "GroupBy") + if err := brgb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*BusRouteQuery, *BusRouteGroupBy](ctx, brgb.build, brgb, brgb.build.inters, v) +} + +func (brgb *BusRouteGroupBy) sqlScan(ctx context.Context, root *BusRouteQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(brgb.fns)) + for _, fn := range brgb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*brgb.flds)+len(brgb.fns)) + for _, f := range *brgb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*brgb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := brgb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// BusRouteSelect is the builder for selecting fields of BusRoute entities. +type BusRouteSelect struct { + *BusRouteQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (brs *BusRouteSelect) Aggregate(fns ...AggregateFunc) *BusRouteSelect { + brs.fns = append(brs.fns, fns...) + return brs +} + +// Scan applies the selector query and scans the result into the given value. +func (brs *BusRouteSelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, brs.ctx, "Select") + if err := brs.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*BusRouteQuery, *BusRouteSelect](ctx, brs.BusRouteQuery, brs, brs.inters, v) +} + +func (brs *BusRouteSelect) sqlScan(ctx context.Context, root *BusRouteQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(brs.fns)) + for _, fn := range brs.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*brs.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := brs.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/backend/domain/repository/ent/busroute_update.go b/backend/domain/repository/ent/busroute_update.go new file mode 100644 index 00000000..f8f94b66 --- /dev/null +++ b/backend/domain/repository/ent/busroute_update.go @@ -0,0 +1,725 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// BusRouteUpdate is the builder for updating BusRoute entities. +type BusRouteUpdate struct { + config + hooks []Hook + mutation *BusRouteMutation +} + +// Where appends a list predicates to the BusRouteUpdate builder. +func (bru *BusRouteUpdate) Where(ps ...predicate.BusRoute) *BusRouteUpdate { + bru.mutation.Where(ps...) + return bru +} + +// SetBusType sets the "bus_type" field. +func (bru *BusRouteUpdate) SetBusType(bt busroute.BusType) *BusRouteUpdate { + bru.mutation.SetBusType(bt) + return bru +} + +// SetNillableBusType sets the "bus_type" field if the given value is not nil. +func (bru *BusRouteUpdate) SetNillableBusType(bt *busroute.BusType) *BusRouteUpdate { + if bt != nil { + bru.SetBusType(*bt) + } + return bru +} + +// AddBuIDs adds the "bus" edge to the Bus entity by IDs. +func (bru *BusRouteUpdate) AddBuIDs(ids ...uuid.UUID) *BusRouteUpdate { + bru.mutation.AddBuIDs(ids...) + return bru +} + +// AddBus adds the "bus" edges to the Bus entity. +func (bru *BusRouteUpdate) AddBus(b ...*Bus) *BusRouteUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bru.AddBuIDs(ids...) +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (bru *BusRouteUpdate) AddChildBusAssociationIDs(ids ...int) *BusRouteUpdate { + bru.mutation.AddChildBusAssociationIDs(ids...) + return bru +} + +// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. +func (bru *BusRouteUpdate) AddChildBusAssociations(c ...*ChildBusAssociation) *BusRouteUpdate { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return bru.AddChildBusAssociationIDs(ids...) +} + +// AddBusRouteAssociationIDs adds the "busRouteAssociations" edge to the BusRouteAssociation entity by IDs. +func (bru *BusRouteUpdate) AddBusRouteAssociationIDs(ids ...int) *BusRouteUpdate { + bru.mutation.AddBusRouteAssociationIDs(ids...) + return bru +} + +// AddBusRouteAssociations adds the "busRouteAssociations" edges to the BusRouteAssociation entity. +func (bru *BusRouteUpdate) AddBusRouteAssociations(b ...*BusRouteAssociation) *BusRouteUpdate { + ids := make([]int, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bru.AddBusRouteAssociationIDs(ids...) +} + +// Mutation returns the BusRouteMutation object of the builder. +func (bru *BusRouteUpdate) Mutation() *BusRouteMutation { + return bru.mutation +} + +// ClearBus clears all "bus" edges to the Bus entity. +func (bru *BusRouteUpdate) ClearBus() *BusRouteUpdate { + bru.mutation.ClearBus() + return bru +} + +// RemoveBuIDs removes the "bus" edge to Bus entities by IDs. +func (bru *BusRouteUpdate) RemoveBuIDs(ids ...uuid.UUID) *BusRouteUpdate { + bru.mutation.RemoveBuIDs(ids...) + return bru +} + +// RemoveBus removes "bus" edges to Bus entities. +func (bru *BusRouteUpdate) RemoveBus(b ...*Bus) *BusRouteUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bru.RemoveBuIDs(ids...) +} + +// ClearChildBusAssociations clears all "childBusAssociations" edges to the ChildBusAssociation entity. +func (bru *BusRouteUpdate) ClearChildBusAssociations() *BusRouteUpdate { + bru.mutation.ClearChildBusAssociations() + return bru +} + +// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to ChildBusAssociation entities by IDs. +func (bru *BusRouteUpdate) RemoveChildBusAssociationIDs(ids ...int) *BusRouteUpdate { + bru.mutation.RemoveChildBusAssociationIDs(ids...) + return bru +} + +// RemoveChildBusAssociations removes "childBusAssociations" edges to ChildBusAssociation entities. +func (bru *BusRouteUpdate) RemoveChildBusAssociations(c ...*ChildBusAssociation) *BusRouteUpdate { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return bru.RemoveChildBusAssociationIDs(ids...) +} + +// ClearBusRouteAssociations clears all "busRouteAssociations" edges to the BusRouteAssociation entity. +func (bru *BusRouteUpdate) ClearBusRouteAssociations() *BusRouteUpdate { + bru.mutation.ClearBusRouteAssociations() + return bru +} + +// RemoveBusRouteAssociationIDs removes the "busRouteAssociations" edge to BusRouteAssociation entities by IDs. +func (bru *BusRouteUpdate) RemoveBusRouteAssociationIDs(ids ...int) *BusRouteUpdate { + bru.mutation.RemoveBusRouteAssociationIDs(ids...) + return bru +} + +// RemoveBusRouteAssociations removes "busRouteAssociations" edges to BusRouteAssociation entities. +func (bru *BusRouteUpdate) RemoveBusRouteAssociations(b ...*BusRouteAssociation) *BusRouteUpdate { + ids := make([]int, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bru.RemoveBusRouteAssociationIDs(ids...) +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (bru *BusRouteUpdate) Save(ctx context.Context) (int, error) { + return withHooks(ctx, bru.sqlSave, bru.mutation, bru.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (bru *BusRouteUpdate) SaveX(ctx context.Context) int { + affected, err := bru.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (bru *BusRouteUpdate) Exec(ctx context.Context) error { + _, err := bru.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bru *BusRouteUpdate) ExecX(ctx context.Context) { + if err := bru.Exec(ctx); err != nil { + panic(err) + } +} + +// check runs all checks and user-defined validators on the builder. +func (bru *BusRouteUpdate) check() error { + if v, ok := bru.mutation.BusType(); ok { + if err := busroute.BusTypeValidator(v); err != nil { + return &ValidationError{Name: "bus_type", err: fmt.Errorf(`ent: validator failed for field "BusRoute.bus_type": %w`, err)} + } + } + return nil +} + +func (bru *BusRouteUpdate) sqlSave(ctx context.Context) (n int, err error) { + if err := bru.check(); err != nil { + return n, err + } + _spec := sqlgraph.NewUpdateSpec(busroute.Table, busroute.Columns, sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID)) + if ps := bru.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := bru.mutation.BusType(); ok { + _spec.SetField(busroute.FieldBusType, field.TypeEnum, value) + } + if bru.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: busroute.BusTable, + Columns: busroute.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.RemovedBusIDs(); len(nodes) > 0 && !bru.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: busroute.BusTable, + Columns: busroute.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: busroute.BusTable, + Columns: busroute.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bru.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.ChildBusAssociationsTable, + Columns: []string{busroute.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.RemovedChildBusAssociationsIDs(); len(nodes) > 0 && !bru.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.ChildBusAssociationsTable, + Columns: []string{busroute.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.ChildBusAssociationsTable, + Columns: []string{busroute.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bru.mutation.BusRouteAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.BusRouteAssociationsTable, + Columns: []string{busroute.BusRouteAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.RemovedBusRouteAssociationsIDs(); len(nodes) > 0 && !bru.mutation.BusRouteAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.BusRouteAssociationsTable, + Columns: []string{busroute.BusRouteAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.BusRouteAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.BusRouteAssociationsTable, + Columns: []string{busroute.BusRouteAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if n, err = sqlgraph.UpdateNodes(ctx, bru.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{busroute.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + bru.mutation.done = true + return n, nil +} + +// BusRouteUpdateOne is the builder for updating a single BusRoute entity. +type BusRouteUpdateOne struct { + config + fields []string + hooks []Hook + mutation *BusRouteMutation +} + +// SetBusType sets the "bus_type" field. +func (bruo *BusRouteUpdateOne) SetBusType(bt busroute.BusType) *BusRouteUpdateOne { + bruo.mutation.SetBusType(bt) + return bruo +} + +// SetNillableBusType sets the "bus_type" field if the given value is not nil. +func (bruo *BusRouteUpdateOne) SetNillableBusType(bt *busroute.BusType) *BusRouteUpdateOne { + if bt != nil { + bruo.SetBusType(*bt) + } + return bruo +} + +// AddBuIDs adds the "bus" edge to the Bus entity by IDs. +func (bruo *BusRouteUpdateOne) AddBuIDs(ids ...uuid.UUID) *BusRouteUpdateOne { + bruo.mutation.AddBuIDs(ids...) + return bruo +} + +// AddBus adds the "bus" edges to the Bus entity. +func (bruo *BusRouteUpdateOne) AddBus(b ...*Bus) *BusRouteUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bruo.AddBuIDs(ids...) +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (bruo *BusRouteUpdateOne) AddChildBusAssociationIDs(ids ...int) *BusRouteUpdateOne { + bruo.mutation.AddChildBusAssociationIDs(ids...) + return bruo +} + +// AddChildBusAssociations adds the "childBusAssociations" edges to the ChildBusAssociation entity. +func (bruo *BusRouteUpdateOne) AddChildBusAssociations(c ...*ChildBusAssociation) *BusRouteUpdateOne { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return bruo.AddChildBusAssociationIDs(ids...) +} + +// AddBusRouteAssociationIDs adds the "busRouteAssociations" edge to the BusRouteAssociation entity by IDs. +func (bruo *BusRouteUpdateOne) AddBusRouteAssociationIDs(ids ...int) *BusRouteUpdateOne { + bruo.mutation.AddBusRouteAssociationIDs(ids...) + return bruo +} + +// AddBusRouteAssociations adds the "busRouteAssociations" edges to the BusRouteAssociation entity. +func (bruo *BusRouteUpdateOne) AddBusRouteAssociations(b ...*BusRouteAssociation) *BusRouteUpdateOne { + ids := make([]int, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bruo.AddBusRouteAssociationIDs(ids...) +} + +// Mutation returns the BusRouteMutation object of the builder. +func (bruo *BusRouteUpdateOne) Mutation() *BusRouteMutation { + return bruo.mutation +} + +// ClearBus clears all "bus" edges to the Bus entity. +func (bruo *BusRouteUpdateOne) ClearBus() *BusRouteUpdateOne { + bruo.mutation.ClearBus() + return bruo +} + +// RemoveBuIDs removes the "bus" edge to Bus entities by IDs. +func (bruo *BusRouteUpdateOne) RemoveBuIDs(ids ...uuid.UUID) *BusRouteUpdateOne { + bruo.mutation.RemoveBuIDs(ids...) + return bruo +} + +// RemoveBus removes "bus" edges to Bus entities. +func (bruo *BusRouteUpdateOne) RemoveBus(b ...*Bus) *BusRouteUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bruo.RemoveBuIDs(ids...) +} + +// ClearChildBusAssociations clears all "childBusAssociations" edges to the ChildBusAssociation entity. +func (bruo *BusRouteUpdateOne) ClearChildBusAssociations() *BusRouteUpdateOne { + bruo.mutation.ClearChildBusAssociations() + return bruo +} + +// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to ChildBusAssociation entities by IDs. +func (bruo *BusRouteUpdateOne) RemoveChildBusAssociationIDs(ids ...int) *BusRouteUpdateOne { + bruo.mutation.RemoveChildBusAssociationIDs(ids...) + return bruo +} + +// RemoveChildBusAssociations removes "childBusAssociations" edges to ChildBusAssociation entities. +func (bruo *BusRouteUpdateOne) RemoveChildBusAssociations(c ...*ChildBusAssociation) *BusRouteUpdateOne { + ids := make([]int, len(c)) + for i := range c { + ids[i] = c[i].ID + } + return bruo.RemoveChildBusAssociationIDs(ids...) +} + +// ClearBusRouteAssociations clears all "busRouteAssociations" edges to the BusRouteAssociation entity. +func (bruo *BusRouteUpdateOne) ClearBusRouteAssociations() *BusRouteUpdateOne { + bruo.mutation.ClearBusRouteAssociations() + return bruo +} + +// RemoveBusRouteAssociationIDs removes the "busRouteAssociations" edge to BusRouteAssociation entities by IDs. +func (bruo *BusRouteUpdateOne) RemoveBusRouteAssociationIDs(ids ...int) *BusRouteUpdateOne { + bruo.mutation.RemoveBusRouteAssociationIDs(ids...) + return bruo +} + +// RemoveBusRouteAssociations removes "busRouteAssociations" edges to BusRouteAssociation entities. +func (bruo *BusRouteUpdateOne) RemoveBusRouteAssociations(b ...*BusRouteAssociation) *BusRouteUpdateOne { + ids := make([]int, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bruo.RemoveBusRouteAssociationIDs(ids...) +} + +// Where appends a list predicates to the BusRouteUpdate builder. +func (bruo *BusRouteUpdateOne) Where(ps ...predicate.BusRoute) *BusRouteUpdateOne { + bruo.mutation.Where(ps...) + return bruo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (bruo *BusRouteUpdateOne) Select(field string, fields ...string) *BusRouteUpdateOne { + bruo.fields = append([]string{field}, fields...) + return bruo +} + +// Save executes the query and returns the updated BusRoute entity. +func (bruo *BusRouteUpdateOne) Save(ctx context.Context) (*BusRoute, error) { + return withHooks(ctx, bruo.sqlSave, bruo.mutation, bruo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (bruo *BusRouteUpdateOne) SaveX(ctx context.Context) *BusRoute { + node, err := bruo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (bruo *BusRouteUpdateOne) Exec(ctx context.Context) error { + _, err := bruo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bruo *BusRouteUpdateOne) ExecX(ctx context.Context) { + if err := bruo.Exec(ctx); err != nil { + panic(err) + } +} + +// check runs all checks and user-defined validators on the builder. +func (bruo *BusRouteUpdateOne) check() error { + if v, ok := bruo.mutation.BusType(); ok { + if err := busroute.BusTypeValidator(v); err != nil { + return &ValidationError{Name: "bus_type", err: fmt.Errorf(`ent: validator failed for field "BusRoute.bus_type": %w`, err)} + } + } + return nil +} + +func (bruo *BusRouteUpdateOne) sqlSave(ctx context.Context) (_node *BusRoute, err error) { + if err := bruo.check(); err != nil { + return _node, err + } + _spec := sqlgraph.NewUpdateSpec(busroute.Table, busroute.Columns, sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID)) + id, ok := bruo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "BusRoute.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := bruo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, busroute.FieldID) + for _, f := range fields { + if !busroute.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != busroute.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := bruo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := bruo.mutation.BusType(); ok { + _spec.SetField(busroute.FieldBusType, field.TypeEnum, value) + } + if bruo.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: busroute.BusTable, + Columns: busroute.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.RemovedBusIDs(); len(nodes) > 0 && !bruo.mutation.BusCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: busroute.BusTable, + Columns: busroute.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.BusIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2M, + Inverse: false, + Table: busroute.BusTable, + Columns: busroute.BusPrimaryKey, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bruo.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.ChildBusAssociationsTable, + Columns: []string{busroute.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.RemovedChildBusAssociationsIDs(); len(nodes) > 0 && !bruo.mutation.ChildBusAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.ChildBusAssociationsTable, + Columns: []string{busroute.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.ChildBusAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.ChildBusAssociationsTable, + Columns: []string{busroute.ChildBusAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bruo.mutation.BusRouteAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.BusRouteAssociationsTable, + Columns: []string{busroute.BusRouteAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.RemovedBusRouteAssociationsIDs(); len(nodes) > 0 && !bruo.mutation.BusRouteAssociationsCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.BusRouteAssociationsTable, + Columns: []string{busroute.BusRouteAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.BusRouteAssociationsIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: false, + Table: busroute.BusRouteAssociationsTable, + Columns: []string{busroute.BusRouteAssociationsColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + _node = &BusRoute{config: bruo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, bruo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{busroute.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + bruo.mutation.done = true + return _node, nil +} diff --git a/backend/domain/repository/ent/busrouteassociation.go b/backend/domain/repository/ent/busrouteassociation.go new file mode 100644 index 00000000..0ed88355 --- /dev/null +++ b/backend/domain/repository/ent/busrouteassociation.go @@ -0,0 +1,178 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "strings" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// BusRouteAssociation is the model entity for the BusRouteAssociation schema. +type BusRouteAssociation struct { + config `json:"-"` + // ID of the ent. + ID int `json:"id,omitempty"` + // StationID holds the value of the "station_id" field. + StationID uuid.UUID `json:"station_id,omitempty"` + // BusRouteID holds the value of the "bus_route_id" field. + BusRouteID uuid.UUID `json:"bus_route_id,omitempty"` + // Order holds the value of the "order" field. + Order int32 `json:"order,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the BusRouteAssociationQuery when eager-loading is set. + Edges BusRouteAssociationEdges `json:"edges"` + selectValues sql.SelectValues +} + +// BusRouteAssociationEdges holds the relations/edges for other nodes in the graph. +type BusRouteAssociationEdges struct { + // Station holds the value of the station edge. + Station *Station `json:"station,omitempty"` + // BusRoute holds the value of the busRoute edge. + BusRoute *BusRoute `json:"busRoute,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [2]bool +} + +// StationOrErr returns the Station value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BusRouteAssociationEdges) StationOrErr() (*Station, error) { + if e.loadedTypes[0] { + if e.Station == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: station.Label} + } + return e.Station, nil + } + return nil, &NotLoadedError{edge: "station"} +} + +// BusRouteOrErr returns the BusRoute value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BusRouteAssociationEdges) BusRouteOrErr() (*BusRoute, error) { + if e.loadedTypes[1] { + if e.BusRoute == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: busroute.Label} + } + return e.BusRoute, nil + } + return nil, &NotLoadedError{edge: "busRoute"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*BusRouteAssociation) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case busrouteassociation.FieldID, busrouteassociation.FieldOrder: + values[i] = new(sql.NullInt64) + case busrouteassociation.FieldStationID, busrouteassociation.FieldBusRouteID: + values[i] = new(uuid.UUID) + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the BusRouteAssociation fields. +func (bra *BusRouteAssociation) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case busrouteassociation.FieldID: + value, ok := values[i].(*sql.NullInt64) + if !ok { + return fmt.Errorf("unexpected type %T for field id", value) + } + bra.ID = int(value.Int64) + case busrouteassociation.FieldStationID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field station_id", values[i]) + } else if value != nil { + bra.StationID = *value + } + case busrouteassociation.FieldBusRouteID: + if value, ok := values[i].(*uuid.UUID); !ok { + return fmt.Errorf("unexpected type %T for field bus_route_id", values[i]) + } else if value != nil { + bra.BusRouteID = *value + } + case busrouteassociation.FieldOrder: + if value, ok := values[i].(*sql.NullInt64); !ok { + return fmt.Errorf("unexpected type %T for field order", values[i]) + } else if value.Valid { + bra.Order = int32(value.Int64) + } + default: + bra.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the BusRouteAssociation. +// This includes values selected through modifiers, order, etc. +func (bra *BusRouteAssociation) Value(name string) (ent.Value, error) { + return bra.selectValues.Get(name) +} + +// QueryStation queries the "station" edge of the BusRouteAssociation entity. +func (bra *BusRouteAssociation) QueryStation() *StationQuery { + return NewBusRouteAssociationClient(bra.config).QueryStation(bra) +} + +// QueryBusRoute queries the "busRoute" edge of the BusRouteAssociation entity. +func (bra *BusRouteAssociation) QueryBusRoute() *BusRouteQuery { + return NewBusRouteAssociationClient(bra.config).QueryBusRoute(bra) +} + +// Update returns a builder for updating this BusRouteAssociation. +// Note that you need to call BusRouteAssociation.Unwrap() before calling this method if this BusRouteAssociation +// was returned from a transaction, and the transaction was committed or rolled back. +func (bra *BusRouteAssociation) Update() *BusRouteAssociationUpdateOne { + return NewBusRouteAssociationClient(bra.config).UpdateOne(bra) +} + +// Unwrap unwraps the BusRouteAssociation entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (bra *BusRouteAssociation) Unwrap() *BusRouteAssociation { + _tx, ok := bra.config.driver.(*txDriver) + if !ok { + panic("ent: BusRouteAssociation is not a transactional entity") + } + bra.config.driver = _tx.drv + return bra +} + +// String implements the fmt.Stringer. +func (bra *BusRouteAssociation) String() string { + var builder strings.Builder + builder.WriteString("BusRouteAssociation(") + builder.WriteString(fmt.Sprintf("id=%v, ", bra.ID)) + builder.WriteString("station_id=") + builder.WriteString(fmt.Sprintf("%v", bra.StationID)) + builder.WriteString(", ") + builder.WriteString("bus_route_id=") + builder.WriteString(fmt.Sprintf("%v", bra.BusRouteID)) + builder.WriteString(", ") + builder.WriteString("order=") + builder.WriteString(fmt.Sprintf("%v", bra.Order)) + builder.WriteByte(')') + return builder.String() +} + +// BusRouteAssociations is a parsable slice of BusRouteAssociation. +type BusRouteAssociations []*BusRouteAssociation diff --git a/backend/domain/repository/ent/busrouteassociation/busrouteassociation.go b/backend/domain/repository/ent/busrouteassociation/busrouteassociation.go new file mode 100644 index 00000000..0657f7cb --- /dev/null +++ b/backend/domain/repository/ent/busrouteassociation/busrouteassociation.go @@ -0,0 +1,110 @@ +// Code generated by ent, DO NOT EDIT. + +package busrouteassociation + +import ( + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" +) + +const ( + // Label holds the string label denoting the busrouteassociation type in the database. + Label = "bus_route_association" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldStationID holds the string denoting the station_id field in the database. + FieldStationID = "station_id" + // FieldBusRouteID holds the string denoting the bus_route_id field in the database. + FieldBusRouteID = "bus_route_id" + // FieldOrder holds the string denoting the order field in the database. + FieldOrder = "order" + // EdgeStation holds the string denoting the station edge name in mutations. + EdgeStation = "station" + // EdgeBusRoute holds the string denoting the busroute edge name in mutations. + EdgeBusRoute = "busRoute" + // Table holds the table name of the busrouteassociation in the database. + Table = "bus_route_associations" + // StationTable is the table that holds the station relation/edge. + StationTable = "bus_route_associations" + // StationInverseTable is the table name for the Station entity. + // It exists in this package in order to avoid circular dependency with the "station" package. + StationInverseTable = "stations" + // StationColumn is the table column denoting the station relation/edge. + StationColumn = "station_id" + // BusRouteTable is the table that holds the busRoute relation/edge. + BusRouteTable = "bus_route_associations" + // BusRouteInverseTable is the table name for the BusRoute entity. + // It exists in this package in order to avoid circular dependency with the "busroute" package. + BusRouteInverseTable = "bus_routes" + // BusRouteColumn is the table column denoting the busRoute relation/edge. + BusRouteColumn = "bus_route_id" +) + +// Columns holds all SQL columns for busrouteassociation fields. +var Columns = []string{ + FieldID, + FieldStationID, + FieldBusRouteID, + FieldOrder, +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + return false +} + +// OrderOption defines the ordering options for the BusRouteAssociation queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByStationID orders the results by the station_id field. +func ByStationID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldStationID, opts...).ToFunc() +} + +// ByBusRouteID orders the results by the bus_route_id field. +func ByBusRouteID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldBusRouteID, opts...).ToFunc() +} + +// ByOrder orders the results by the order field. +func ByOrder(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldOrder, opts...).ToFunc() +} + +// ByStationField orders the results by station field. +func ByStationField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newStationStep(), sql.OrderByField(field, opts...)) + } +} + +// ByBusRouteField orders the results by busRoute field. +func ByBusRouteField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newBusRouteStep(), sql.OrderByField(field, opts...)) + } +} +func newStationStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(StationInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, StationTable, StationColumn), + ) +} +func newBusRouteStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(BusRouteInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, BusRouteTable, BusRouteColumn), + ) +} diff --git a/backend/domain/repository/ent/busrouteassociation/where.go b/backend/domain/repository/ent/busrouteassociation/where.go new file mode 100644 index 00000000..b223c0c1 --- /dev/null +++ b/backend/domain/repository/ent/busrouteassociation/where.go @@ -0,0 +1,211 @@ +// Code generated by ent, DO NOT EDIT. + +package busrouteassociation + +import ( + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/google/uuid" +) + +// ID filters vertices based on their ID field. +func ID(id int) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id int) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id int) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...int) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...int) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id int) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id int) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id int) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id int) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldLTE(FieldID, id)) +} + +// StationID applies equality check predicate on the "station_id" field. It's identical to StationIDEQ. +func StationID(v uuid.UUID) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldEQ(FieldStationID, v)) +} + +// BusRouteID applies equality check predicate on the "bus_route_id" field. It's identical to BusRouteIDEQ. +func BusRouteID(v uuid.UUID) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldEQ(FieldBusRouteID, v)) +} + +// Order applies equality check predicate on the "order" field. It's identical to OrderEQ. +func Order(v int32) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldEQ(FieldOrder, v)) +} + +// StationIDEQ applies the EQ predicate on the "station_id" field. +func StationIDEQ(v uuid.UUID) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldEQ(FieldStationID, v)) +} + +// StationIDNEQ applies the NEQ predicate on the "station_id" field. +func StationIDNEQ(v uuid.UUID) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldNEQ(FieldStationID, v)) +} + +// StationIDIn applies the In predicate on the "station_id" field. +func StationIDIn(vs ...uuid.UUID) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldIn(FieldStationID, vs...)) +} + +// StationIDNotIn applies the NotIn predicate on the "station_id" field. +func StationIDNotIn(vs ...uuid.UUID) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldNotIn(FieldStationID, vs...)) +} + +// BusRouteIDEQ applies the EQ predicate on the "bus_route_id" field. +func BusRouteIDEQ(v uuid.UUID) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldEQ(FieldBusRouteID, v)) +} + +// BusRouteIDNEQ applies the NEQ predicate on the "bus_route_id" field. +func BusRouteIDNEQ(v uuid.UUID) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldNEQ(FieldBusRouteID, v)) +} + +// BusRouteIDIn applies the In predicate on the "bus_route_id" field. +func BusRouteIDIn(vs ...uuid.UUID) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldIn(FieldBusRouteID, vs...)) +} + +// BusRouteIDNotIn applies the NotIn predicate on the "bus_route_id" field. +func BusRouteIDNotIn(vs ...uuid.UUID) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldNotIn(FieldBusRouteID, vs...)) +} + +// OrderEQ applies the EQ predicate on the "order" field. +func OrderEQ(v int32) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldEQ(FieldOrder, v)) +} + +// OrderNEQ applies the NEQ predicate on the "order" field. +func OrderNEQ(v int32) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldNEQ(FieldOrder, v)) +} + +// OrderIn applies the In predicate on the "order" field. +func OrderIn(vs ...int32) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldIn(FieldOrder, vs...)) +} + +// OrderNotIn applies the NotIn predicate on the "order" field. +func OrderNotIn(vs ...int32) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldNotIn(FieldOrder, vs...)) +} + +// OrderGT applies the GT predicate on the "order" field. +func OrderGT(v int32) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldGT(FieldOrder, v)) +} + +// OrderGTE applies the GTE predicate on the "order" field. +func OrderGTE(v int32) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldGTE(FieldOrder, v)) +} + +// OrderLT applies the LT predicate on the "order" field. +func OrderLT(v int32) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldLT(FieldOrder, v)) +} + +// OrderLTE applies the LTE predicate on the "order" field. +func OrderLTE(v int32) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.FieldLTE(FieldOrder, v)) +} + +// HasStation applies the HasEdge predicate on the "station" edge. +func HasStation() predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, StationTable, StationColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasStationWith applies the HasEdge predicate on the "station" edge with a given conditions (other predicates). +func HasStationWith(preds ...predicate.Station) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(func(s *sql.Selector) { + step := newStationStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasBusRoute applies the HasEdge predicate on the "busRoute" edge. +func HasBusRoute() predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, BusRouteTable, BusRouteColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasBusRouteWith applies the HasEdge predicate on the "busRoute" edge with a given conditions (other predicates). +func HasBusRouteWith(preds ...predicate.BusRoute) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(func(s *sql.Selector) { + step := newBusRouteStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.BusRouteAssociation) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.BusRouteAssociation) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.BusRouteAssociation) predicate.BusRouteAssociation { + return predicate.BusRouteAssociation(sql.NotPredicates(p)) +} diff --git a/backend/domain/repository/ent/busrouteassociation_create.go b/backend/domain/repository/ent/busrouteassociation_create.go new file mode 100644 index 00000000..0d6695f7 --- /dev/null +++ b/backend/domain/repository/ent/busrouteassociation_create.go @@ -0,0 +1,254 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// BusRouteAssociationCreate is the builder for creating a BusRouteAssociation entity. +type BusRouteAssociationCreate struct { + config + mutation *BusRouteAssociationMutation + hooks []Hook +} + +// SetStationID sets the "station_id" field. +func (brac *BusRouteAssociationCreate) SetStationID(u uuid.UUID) *BusRouteAssociationCreate { + brac.mutation.SetStationID(u) + return brac +} + +// SetBusRouteID sets the "bus_route_id" field. +func (brac *BusRouteAssociationCreate) SetBusRouteID(u uuid.UUID) *BusRouteAssociationCreate { + brac.mutation.SetBusRouteID(u) + return brac +} + +// SetOrder sets the "order" field. +func (brac *BusRouteAssociationCreate) SetOrder(i int32) *BusRouteAssociationCreate { + brac.mutation.SetOrder(i) + return brac +} + +// SetStation sets the "station" edge to the Station entity. +func (brac *BusRouteAssociationCreate) SetStation(s *Station) *BusRouteAssociationCreate { + return brac.SetStationID(s.ID) +} + +// SetBusRoute sets the "busRoute" edge to the BusRoute entity. +func (brac *BusRouteAssociationCreate) SetBusRoute(b *BusRoute) *BusRouteAssociationCreate { + return brac.SetBusRouteID(b.ID) +} + +// Mutation returns the BusRouteAssociationMutation object of the builder. +func (brac *BusRouteAssociationCreate) Mutation() *BusRouteAssociationMutation { + return brac.mutation +} + +// Save creates the BusRouteAssociation in the database. +func (brac *BusRouteAssociationCreate) Save(ctx context.Context) (*BusRouteAssociation, error) { + return withHooks(ctx, brac.sqlSave, brac.mutation, brac.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (brac *BusRouteAssociationCreate) SaveX(ctx context.Context) *BusRouteAssociation { + v, err := brac.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (brac *BusRouteAssociationCreate) Exec(ctx context.Context) error { + _, err := brac.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (brac *BusRouteAssociationCreate) ExecX(ctx context.Context) { + if err := brac.Exec(ctx); err != nil { + panic(err) + } +} + +// check runs all checks and user-defined validators on the builder. +func (brac *BusRouteAssociationCreate) check() error { + if _, ok := brac.mutation.StationID(); !ok { + return &ValidationError{Name: "station_id", err: errors.New(`ent: missing required field "BusRouteAssociation.station_id"`)} + } + if _, ok := brac.mutation.BusRouteID(); !ok { + return &ValidationError{Name: "bus_route_id", err: errors.New(`ent: missing required field "BusRouteAssociation.bus_route_id"`)} + } + if _, ok := brac.mutation.Order(); !ok { + return &ValidationError{Name: "order", err: errors.New(`ent: missing required field "BusRouteAssociation.order"`)} + } + if _, ok := brac.mutation.StationID(); !ok { + return &ValidationError{Name: "station", err: errors.New(`ent: missing required edge "BusRouteAssociation.station"`)} + } + if _, ok := brac.mutation.BusRouteID(); !ok { + return &ValidationError{Name: "busRoute", err: errors.New(`ent: missing required edge "BusRouteAssociation.busRoute"`)} + } + return nil +} + +func (brac *BusRouteAssociationCreate) sqlSave(ctx context.Context) (*BusRouteAssociation, error) { + if err := brac.check(); err != nil { + return nil, err + } + _node, _spec := brac.createSpec() + if err := sqlgraph.CreateNode(ctx, brac.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + id := _spec.ID.Value.(int64) + _node.ID = int(id) + brac.mutation.id = &_node.ID + brac.mutation.done = true + return _node, nil +} + +func (brac *BusRouteAssociationCreate) createSpec() (*BusRouteAssociation, *sqlgraph.CreateSpec) { + var ( + _node = &BusRouteAssociation{config: brac.config} + _spec = sqlgraph.NewCreateSpec(busrouteassociation.Table, sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt)) + ) + if value, ok := brac.mutation.Order(); ok { + _spec.SetField(busrouteassociation.FieldOrder, field.TypeInt32, value) + _node.Order = value + } + if nodes := brac.mutation.StationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: busrouteassociation.StationTable, + Columns: []string{busrouteassociation.StationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.StationID = nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := brac.mutation.BusRouteIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: busrouteassociation.BusRouteTable, + Columns: []string{busrouteassociation.BusRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.BusRouteID = nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// BusRouteAssociationCreateBulk is the builder for creating many BusRouteAssociation entities in bulk. +type BusRouteAssociationCreateBulk struct { + config + err error + builders []*BusRouteAssociationCreate +} + +// Save creates the BusRouteAssociation entities in the database. +func (bracb *BusRouteAssociationCreateBulk) Save(ctx context.Context) ([]*BusRouteAssociation, error) { + if bracb.err != nil { + return nil, bracb.err + } + specs := make([]*sqlgraph.CreateSpec, len(bracb.builders)) + nodes := make([]*BusRouteAssociation, len(bracb.builders)) + mutators := make([]Mutator, len(bracb.builders)) + for i := range bracb.builders { + func(i int, root context.Context) { + builder := bracb.builders[i] + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*BusRouteAssociationMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, bracb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, bracb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + if specs[i].ID.Value != nil { + id := specs[i].ID.Value.(int64) + nodes[i].ID = int(id) + } + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, bracb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (bracb *BusRouteAssociationCreateBulk) SaveX(ctx context.Context) []*BusRouteAssociation { + v, err := bracb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (bracb *BusRouteAssociationCreateBulk) Exec(ctx context.Context) error { + _, err := bracb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bracb *BusRouteAssociationCreateBulk) ExecX(ctx context.Context) { + if err := bracb.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/busrouteassociation_delete.go b/backend/domain/repository/ent/busrouteassociation_delete.go new file mode 100644 index 00000000..2ec0173a --- /dev/null +++ b/backend/domain/repository/ent/busrouteassociation_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" +) + +// BusRouteAssociationDelete is the builder for deleting a BusRouteAssociation entity. +type BusRouteAssociationDelete struct { + config + hooks []Hook + mutation *BusRouteAssociationMutation +} + +// Where appends a list predicates to the BusRouteAssociationDelete builder. +func (brad *BusRouteAssociationDelete) Where(ps ...predicate.BusRouteAssociation) *BusRouteAssociationDelete { + brad.mutation.Where(ps...) + return brad +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (brad *BusRouteAssociationDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, brad.sqlExec, brad.mutation, brad.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (brad *BusRouteAssociationDelete) ExecX(ctx context.Context) int { + n, err := brad.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (brad *BusRouteAssociationDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(busrouteassociation.Table, sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt)) + if ps := brad.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, brad.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + brad.mutation.done = true + return affected, err +} + +// BusRouteAssociationDeleteOne is the builder for deleting a single BusRouteAssociation entity. +type BusRouteAssociationDeleteOne struct { + brad *BusRouteAssociationDelete +} + +// Where appends a list predicates to the BusRouteAssociationDelete builder. +func (brado *BusRouteAssociationDeleteOne) Where(ps ...predicate.BusRouteAssociation) *BusRouteAssociationDeleteOne { + brado.brad.mutation.Where(ps...) + return brado +} + +// Exec executes the deletion query. +func (brado *BusRouteAssociationDeleteOne) Exec(ctx context.Context) error { + n, err := brado.brad.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{busrouteassociation.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (brado *BusRouteAssociationDeleteOne) ExecX(ctx context.Context) { + if err := brado.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/backend/domain/repository/ent/busrouteassociation_query.go b/backend/domain/repository/ent/busrouteassociation_query.go new file mode 100644 index 00000000..2dd67af6 --- /dev/null +++ b/backend/domain/repository/ent/busrouteassociation_query.go @@ -0,0 +1,681 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "fmt" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// BusRouteAssociationQuery is the builder for querying BusRouteAssociation entities. +type BusRouteAssociationQuery struct { + config + ctx *QueryContext + order []busrouteassociation.OrderOption + inters []Interceptor + predicates []predicate.BusRouteAssociation + withStation *StationQuery + withBusRoute *BusRouteQuery + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the BusRouteAssociationQuery builder. +func (braq *BusRouteAssociationQuery) Where(ps ...predicate.BusRouteAssociation) *BusRouteAssociationQuery { + braq.predicates = append(braq.predicates, ps...) + return braq +} + +// Limit the number of records to be returned by this query. +func (braq *BusRouteAssociationQuery) Limit(limit int) *BusRouteAssociationQuery { + braq.ctx.Limit = &limit + return braq +} + +// Offset to start from. +func (braq *BusRouteAssociationQuery) Offset(offset int) *BusRouteAssociationQuery { + braq.ctx.Offset = &offset + return braq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (braq *BusRouteAssociationQuery) Unique(unique bool) *BusRouteAssociationQuery { + braq.ctx.Unique = &unique + return braq +} + +// Order specifies how the records should be ordered. +func (braq *BusRouteAssociationQuery) Order(o ...busrouteassociation.OrderOption) *BusRouteAssociationQuery { + braq.order = append(braq.order, o...) + return braq +} + +// QueryStation chains the current query on the "station" edge. +func (braq *BusRouteAssociationQuery) QueryStation() *StationQuery { + query := (&StationClient{config: braq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := braq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := braq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(busrouteassociation.Table, busrouteassociation.FieldID, selector), + sqlgraph.To(station.Table, station.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, busrouteassociation.StationTable, busrouteassociation.StationColumn), + ) + fromU = sqlgraph.SetNeighbors(braq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryBusRoute chains the current query on the "busRoute" edge. +func (braq *BusRouteAssociationQuery) QueryBusRoute() *BusRouteQuery { + query := (&BusRouteClient{config: braq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := braq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := braq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(busrouteassociation.Table, busrouteassociation.FieldID, selector), + sqlgraph.To(busroute.Table, busroute.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, busrouteassociation.BusRouteTable, busrouteassociation.BusRouteColumn), + ) + fromU = sqlgraph.SetNeighbors(braq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first BusRouteAssociation entity from the query. +// Returns a *NotFoundError when no BusRouteAssociation was found. +func (braq *BusRouteAssociationQuery) First(ctx context.Context) (*BusRouteAssociation, error) { + nodes, err := braq.Limit(1).All(setContextOp(ctx, braq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{busrouteassociation.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (braq *BusRouteAssociationQuery) FirstX(ctx context.Context) *BusRouteAssociation { + node, err := braq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first BusRouteAssociation ID from the query. +// Returns a *NotFoundError when no BusRouteAssociation ID was found. +func (braq *BusRouteAssociationQuery) FirstID(ctx context.Context) (id int, err error) { + var ids []int + if ids, err = braq.Limit(1).IDs(setContextOp(ctx, braq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{busrouteassociation.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (braq *BusRouteAssociationQuery) FirstIDX(ctx context.Context) int { + id, err := braq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single BusRouteAssociation entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one BusRouteAssociation entity is found. +// Returns a *NotFoundError when no BusRouteAssociation entities are found. +func (braq *BusRouteAssociationQuery) Only(ctx context.Context) (*BusRouteAssociation, error) { + nodes, err := braq.Limit(2).All(setContextOp(ctx, braq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{busrouteassociation.Label} + default: + return nil, &NotSingularError{busrouteassociation.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (braq *BusRouteAssociationQuery) OnlyX(ctx context.Context) *BusRouteAssociation { + node, err := braq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only BusRouteAssociation ID in the query. +// Returns a *NotSingularError when more than one BusRouteAssociation ID is found. +// Returns a *NotFoundError when no entities are found. +func (braq *BusRouteAssociationQuery) OnlyID(ctx context.Context) (id int, err error) { + var ids []int + if ids, err = braq.Limit(2).IDs(setContextOp(ctx, braq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{busrouteassociation.Label} + default: + err = &NotSingularError{busrouteassociation.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (braq *BusRouteAssociationQuery) OnlyIDX(ctx context.Context) int { + id, err := braq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of BusRouteAssociations. +func (braq *BusRouteAssociationQuery) All(ctx context.Context) ([]*BusRouteAssociation, error) { + ctx = setContextOp(ctx, braq.ctx, "All") + if err := braq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*BusRouteAssociation, *BusRouteAssociationQuery]() + return withInterceptors[[]*BusRouteAssociation](ctx, braq, qr, braq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (braq *BusRouteAssociationQuery) AllX(ctx context.Context) []*BusRouteAssociation { + nodes, err := braq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of BusRouteAssociation IDs. +func (braq *BusRouteAssociationQuery) IDs(ctx context.Context) (ids []int, err error) { + if braq.ctx.Unique == nil && braq.path != nil { + braq.Unique(true) + } + ctx = setContextOp(ctx, braq.ctx, "IDs") + if err = braq.Select(busrouteassociation.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (braq *BusRouteAssociationQuery) IDsX(ctx context.Context) []int { + ids, err := braq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (braq *BusRouteAssociationQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, braq.ctx, "Count") + if err := braq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, braq, querierCount[*BusRouteAssociationQuery](), braq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (braq *BusRouteAssociationQuery) CountX(ctx context.Context) int { + count, err := braq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (braq *BusRouteAssociationQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, braq.ctx, "Exist") + switch _, err := braq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (braq *BusRouteAssociationQuery) ExistX(ctx context.Context) bool { + exist, err := braq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the BusRouteAssociationQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (braq *BusRouteAssociationQuery) Clone() *BusRouteAssociationQuery { + if braq == nil { + return nil + } + return &BusRouteAssociationQuery{ + config: braq.config, + ctx: braq.ctx.Clone(), + order: append([]busrouteassociation.OrderOption{}, braq.order...), + inters: append([]Interceptor{}, braq.inters...), + predicates: append([]predicate.BusRouteAssociation{}, braq.predicates...), + withStation: braq.withStation.Clone(), + withBusRoute: braq.withBusRoute.Clone(), + // clone intermediate query. + sql: braq.sql.Clone(), + path: braq.path, + } +} + +// WithStation tells the query-builder to eager-load the nodes that are connected to +// the "station" edge. The optional arguments are used to configure the query builder of the edge. +func (braq *BusRouteAssociationQuery) WithStation(opts ...func(*StationQuery)) *BusRouteAssociationQuery { + query := (&StationClient{config: braq.config}).Query() + for _, opt := range opts { + opt(query) + } + braq.withStation = query + return braq +} + +// WithBusRoute tells the query-builder to eager-load the nodes that are connected to +// the "busRoute" edge. The optional arguments are used to configure the query builder of the edge. +func (braq *BusRouteAssociationQuery) WithBusRoute(opts ...func(*BusRouteQuery)) *BusRouteAssociationQuery { + query := (&BusRouteClient{config: braq.config}).Query() + for _, opt := range opts { + opt(query) + } + braq.withBusRoute = query + return braq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// StationID uuid.UUID `json:"station_id,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.BusRouteAssociation.Query(). +// GroupBy(busrouteassociation.FieldStationID). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (braq *BusRouteAssociationQuery) GroupBy(field string, fields ...string) *BusRouteAssociationGroupBy { + braq.ctx.Fields = append([]string{field}, fields...) + grbuild := &BusRouteAssociationGroupBy{build: braq} + grbuild.flds = &braq.ctx.Fields + grbuild.label = busrouteassociation.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// StationID uuid.UUID `json:"station_id,omitempty"` +// } +// +// client.BusRouteAssociation.Query(). +// Select(busrouteassociation.FieldStationID). +// Scan(ctx, &v) +func (braq *BusRouteAssociationQuery) Select(fields ...string) *BusRouteAssociationSelect { + braq.ctx.Fields = append(braq.ctx.Fields, fields...) + sbuild := &BusRouteAssociationSelect{BusRouteAssociationQuery: braq} + sbuild.label = busrouteassociation.Label + sbuild.flds, sbuild.scan = &braq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a BusRouteAssociationSelect configured with the given aggregations. +func (braq *BusRouteAssociationQuery) Aggregate(fns ...AggregateFunc) *BusRouteAssociationSelect { + return braq.Select().Aggregate(fns...) +} + +func (braq *BusRouteAssociationQuery) prepareQuery(ctx context.Context) error { + for _, inter := range braq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, braq); err != nil { + return err + } + } + } + for _, f := range braq.ctx.Fields { + if !busrouteassociation.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if braq.path != nil { + prev, err := braq.path(ctx) + if err != nil { + return err + } + braq.sql = prev + } + return nil +} + +func (braq *BusRouteAssociationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BusRouteAssociation, error) { + var ( + nodes = []*BusRouteAssociation{} + _spec = braq.querySpec() + loadedTypes = [2]bool{ + braq.withStation != nil, + braq.withBusRoute != nil, + } + ) + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*BusRouteAssociation).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &BusRouteAssociation{config: braq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, braq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := braq.withStation; query != nil { + if err := braq.loadStation(ctx, query, nodes, nil, + func(n *BusRouteAssociation, e *Station) { n.Edges.Station = e }); err != nil { + return nil, err + } + } + if query := braq.withBusRoute; query != nil { + if err := braq.loadBusRoute(ctx, query, nodes, nil, + func(n *BusRouteAssociation, e *BusRoute) { n.Edges.BusRoute = e }); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (braq *BusRouteAssociationQuery) loadStation(ctx context.Context, query *StationQuery, nodes []*BusRouteAssociation, init func(*BusRouteAssociation), assign func(*BusRouteAssociation, *Station)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*BusRouteAssociation) + for i := range nodes { + fk := nodes[i].StationID + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(station.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "station_id" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (braq *BusRouteAssociationQuery) loadBusRoute(ctx context.Context, query *BusRouteQuery, nodes []*BusRouteAssociation, init func(*BusRouteAssociation), assign func(*BusRouteAssociation, *BusRoute)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*BusRouteAssociation) + for i := range nodes { + fk := nodes[i].BusRouteID + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(busroute.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "bus_route_id" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} + +func (braq *BusRouteAssociationQuery) sqlCount(ctx context.Context) (int, error) { + _spec := braq.querySpec() + _spec.Node.Columns = braq.ctx.Fields + if len(braq.ctx.Fields) > 0 { + _spec.Unique = braq.ctx.Unique != nil && *braq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, braq.driver, _spec) +} + +func (braq *BusRouteAssociationQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(busrouteassociation.Table, busrouteassociation.Columns, sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt)) + _spec.From = braq.sql + if unique := braq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if braq.path != nil { + _spec.Unique = true + } + if fields := braq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, busrouteassociation.FieldID) + for i := range fields { + if fields[i] != busrouteassociation.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + if braq.withStation != nil { + _spec.Node.AddColumnOnce(busrouteassociation.FieldStationID) + } + if braq.withBusRoute != nil { + _spec.Node.AddColumnOnce(busrouteassociation.FieldBusRouteID) + } + } + if ps := braq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := braq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := braq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := braq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (braq *BusRouteAssociationQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(braq.driver.Dialect()) + t1 := builder.Table(busrouteassociation.Table) + columns := braq.ctx.Fields + if len(columns) == 0 { + columns = busrouteassociation.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if braq.sql != nil { + selector = braq.sql + selector.Select(selector.Columns(columns...)...) + } + if braq.ctx.Unique != nil && *braq.ctx.Unique { + selector.Distinct() + } + for _, p := range braq.predicates { + p(selector) + } + for _, p := range braq.order { + p(selector) + } + if offset := braq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := braq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// BusRouteAssociationGroupBy is the group-by builder for BusRouteAssociation entities. +type BusRouteAssociationGroupBy struct { + selector + build *BusRouteAssociationQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (bragb *BusRouteAssociationGroupBy) Aggregate(fns ...AggregateFunc) *BusRouteAssociationGroupBy { + bragb.fns = append(bragb.fns, fns...) + return bragb +} + +// Scan applies the selector query and scans the result into the given value. +func (bragb *BusRouteAssociationGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, bragb.build.ctx, "GroupBy") + if err := bragb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*BusRouteAssociationQuery, *BusRouteAssociationGroupBy](ctx, bragb.build, bragb, bragb.build.inters, v) +} + +func (bragb *BusRouteAssociationGroupBy) sqlScan(ctx context.Context, root *BusRouteAssociationQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(bragb.fns)) + for _, fn := range bragb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*bragb.flds)+len(bragb.fns)) + for _, f := range *bragb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*bragb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := bragb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// BusRouteAssociationSelect is the builder for selecting fields of BusRouteAssociation entities. +type BusRouteAssociationSelect struct { + *BusRouteAssociationQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (bras *BusRouteAssociationSelect) Aggregate(fns ...AggregateFunc) *BusRouteAssociationSelect { + bras.fns = append(bras.fns, fns...) + return bras +} + +// Scan applies the selector query and scans the result into the given value. +func (bras *BusRouteAssociationSelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, bras.ctx, "Select") + if err := bras.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*BusRouteAssociationQuery, *BusRouteAssociationSelect](ctx, bras.BusRouteAssociationQuery, bras, bras.inters, v) +} + +func (bras *BusRouteAssociationSelect) sqlScan(ctx context.Context, root *BusRouteAssociationQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(bras.fns)) + for _, fn := range bras.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*bras.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := bras.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/backend/domain/repository/ent/busrouteassociation_update.go b/backend/domain/repository/ent/busrouteassociation_update.go new file mode 100644 index 00000000..41bfe4f2 --- /dev/null +++ b/backend/domain/repository/ent/busrouteassociation_update.go @@ -0,0 +1,476 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + "github.com/google/uuid" +) + +// BusRouteAssociationUpdate is the builder for updating BusRouteAssociation entities. +type BusRouteAssociationUpdate struct { + config + hooks []Hook + mutation *BusRouteAssociationMutation +} + +// Where appends a list predicates to the BusRouteAssociationUpdate builder. +func (brau *BusRouteAssociationUpdate) Where(ps ...predicate.BusRouteAssociation) *BusRouteAssociationUpdate { + brau.mutation.Where(ps...) + return brau +} + +// SetStationID sets the "station_id" field. +func (brau *BusRouteAssociationUpdate) SetStationID(u uuid.UUID) *BusRouteAssociationUpdate { + brau.mutation.SetStationID(u) + return brau +} + +// SetNillableStationID sets the "station_id" field if the given value is not nil. +func (brau *BusRouteAssociationUpdate) SetNillableStationID(u *uuid.UUID) *BusRouteAssociationUpdate { + if u != nil { + brau.SetStationID(*u) + } + return brau +} + +// SetBusRouteID sets the "bus_route_id" field. +func (brau *BusRouteAssociationUpdate) SetBusRouteID(u uuid.UUID) *BusRouteAssociationUpdate { + brau.mutation.SetBusRouteID(u) + return brau +} + +// SetNillableBusRouteID sets the "bus_route_id" field if the given value is not nil. +func (brau *BusRouteAssociationUpdate) SetNillableBusRouteID(u *uuid.UUID) *BusRouteAssociationUpdate { + if u != nil { + brau.SetBusRouteID(*u) + } + return brau +} + +// SetOrder sets the "order" field. +func (brau *BusRouteAssociationUpdate) SetOrder(i int32) *BusRouteAssociationUpdate { + brau.mutation.ResetOrder() + brau.mutation.SetOrder(i) + return brau +} + +// SetNillableOrder sets the "order" field if the given value is not nil. +func (brau *BusRouteAssociationUpdate) SetNillableOrder(i *int32) *BusRouteAssociationUpdate { + if i != nil { + brau.SetOrder(*i) + } + return brau +} + +// AddOrder adds i to the "order" field. +func (brau *BusRouteAssociationUpdate) AddOrder(i int32) *BusRouteAssociationUpdate { + brau.mutation.AddOrder(i) + return brau +} + +// SetStation sets the "station" edge to the Station entity. +func (brau *BusRouteAssociationUpdate) SetStation(s *Station) *BusRouteAssociationUpdate { + return brau.SetStationID(s.ID) +} + +// SetBusRoute sets the "busRoute" edge to the BusRoute entity. +func (brau *BusRouteAssociationUpdate) SetBusRoute(b *BusRoute) *BusRouteAssociationUpdate { + return brau.SetBusRouteID(b.ID) +} + +// Mutation returns the BusRouteAssociationMutation object of the builder. +func (brau *BusRouteAssociationUpdate) Mutation() *BusRouteAssociationMutation { + return brau.mutation +} + +// ClearStation clears the "station" edge to the Station entity. +func (brau *BusRouteAssociationUpdate) ClearStation() *BusRouteAssociationUpdate { + brau.mutation.ClearStation() + return brau +} + +// ClearBusRoute clears the "busRoute" edge to the BusRoute entity. +func (brau *BusRouteAssociationUpdate) ClearBusRoute() *BusRouteAssociationUpdate { + brau.mutation.ClearBusRoute() + return brau +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (brau *BusRouteAssociationUpdate) Save(ctx context.Context) (int, error) { + return withHooks(ctx, brau.sqlSave, brau.mutation, brau.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (brau *BusRouteAssociationUpdate) SaveX(ctx context.Context) int { + affected, err := brau.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (brau *BusRouteAssociationUpdate) Exec(ctx context.Context) error { + _, err := brau.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (brau *BusRouteAssociationUpdate) ExecX(ctx context.Context) { + if err := brau.Exec(ctx); err != nil { + panic(err) + } +} + +// check runs all checks and user-defined validators on the builder. +func (brau *BusRouteAssociationUpdate) check() error { + if _, ok := brau.mutation.StationID(); brau.mutation.StationCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "BusRouteAssociation.station"`) + } + if _, ok := brau.mutation.BusRouteID(); brau.mutation.BusRouteCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "BusRouteAssociation.busRoute"`) + } + return nil +} + +func (brau *BusRouteAssociationUpdate) sqlSave(ctx context.Context) (n int, err error) { + if err := brau.check(); err != nil { + return n, err + } + _spec := sqlgraph.NewUpdateSpec(busrouteassociation.Table, busrouteassociation.Columns, sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt)) + if ps := brau.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := brau.mutation.Order(); ok { + _spec.SetField(busrouteassociation.FieldOrder, field.TypeInt32, value) + } + if value, ok := brau.mutation.AddedOrder(); ok { + _spec.AddField(busrouteassociation.FieldOrder, field.TypeInt32, value) + } + if brau.mutation.StationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: busrouteassociation.StationTable, + Columns: []string{busrouteassociation.StationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := brau.mutation.StationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: busrouteassociation.StationTable, + Columns: []string{busrouteassociation.StationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if brau.mutation.BusRouteCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: busrouteassociation.BusRouteTable, + Columns: []string{busrouteassociation.BusRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := brau.mutation.BusRouteIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: busrouteassociation.BusRouteTable, + Columns: []string{busrouteassociation.BusRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if n, err = sqlgraph.UpdateNodes(ctx, brau.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{busrouteassociation.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + brau.mutation.done = true + return n, nil +} + +// BusRouteAssociationUpdateOne is the builder for updating a single BusRouteAssociation entity. +type BusRouteAssociationUpdateOne struct { + config + fields []string + hooks []Hook + mutation *BusRouteAssociationMutation +} + +// SetStationID sets the "station_id" field. +func (brauo *BusRouteAssociationUpdateOne) SetStationID(u uuid.UUID) *BusRouteAssociationUpdateOne { + brauo.mutation.SetStationID(u) + return brauo +} + +// SetNillableStationID sets the "station_id" field if the given value is not nil. +func (brauo *BusRouteAssociationUpdateOne) SetNillableStationID(u *uuid.UUID) *BusRouteAssociationUpdateOne { + if u != nil { + brauo.SetStationID(*u) + } + return brauo +} + +// SetBusRouteID sets the "bus_route_id" field. +func (brauo *BusRouteAssociationUpdateOne) SetBusRouteID(u uuid.UUID) *BusRouteAssociationUpdateOne { + brauo.mutation.SetBusRouteID(u) + return brauo +} + +// SetNillableBusRouteID sets the "bus_route_id" field if the given value is not nil. +func (brauo *BusRouteAssociationUpdateOne) SetNillableBusRouteID(u *uuid.UUID) *BusRouteAssociationUpdateOne { + if u != nil { + brauo.SetBusRouteID(*u) + } + return brauo +} + +// SetOrder sets the "order" field. +func (brauo *BusRouteAssociationUpdateOne) SetOrder(i int32) *BusRouteAssociationUpdateOne { + brauo.mutation.ResetOrder() + brauo.mutation.SetOrder(i) + return brauo +} + +// SetNillableOrder sets the "order" field if the given value is not nil. +func (brauo *BusRouteAssociationUpdateOne) SetNillableOrder(i *int32) *BusRouteAssociationUpdateOne { + if i != nil { + brauo.SetOrder(*i) + } + return brauo +} + +// AddOrder adds i to the "order" field. +func (brauo *BusRouteAssociationUpdateOne) AddOrder(i int32) *BusRouteAssociationUpdateOne { + brauo.mutation.AddOrder(i) + return brauo +} + +// SetStation sets the "station" edge to the Station entity. +func (brauo *BusRouteAssociationUpdateOne) SetStation(s *Station) *BusRouteAssociationUpdateOne { + return brauo.SetStationID(s.ID) +} + +// SetBusRoute sets the "busRoute" edge to the BusRoute entity. +func (brauo *BusRouteAssociationUpdateOne) SetBusRoute(b *BusRoute) *BusRouteAssociationUpdateOne { + return brauo.SetBusRouteID(b.ID) +} + +// Mutation returns the BusRouteAssociationMutation object of the builder. +func (brauo *BusRouteAssociationUpdateOne) Mutation() *BusRouteAssociationMutation { + return brauo.mutation +} + +// ClearStation clears the "station" edge to the Station entity. +func (brauo *BusRouteAssociationUpdateOne) ClearStation() *BusRouteAssociationUpdateOne { + brauo.mutation.ClearStation() + return brauo +} + +// ClearBusRoute clears the "busRoute" edge to the BusRoute entity. +func (brauo *BusRouteAssociationUpdateOne) ClearBusRoute() *BusRouteAssociationUpdateOne { + brauo.mutation.ClearBusRoute() + return brauo +} + +// Where appends a list predicates to the BusRouteAssociationUpdate builder. +func (brauo *BusRouteAssociationUpdateOne) Where(ps ...predicate.BusRouteAssociation) *BusRouteAssociationUpdateOne { + brauo.mutation.Where(ps...) + return brauo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (brauo *BusRouteAssociationUpdateOne) Select(field string, fields ...string) *BusRouteAssociationUpdateOne { + brauo.fields = append([]string{field}, fields...) + return brauo +} + +// Save executes the query and returns the updated BusRouteAssociation entity. +func (brauo *BusRouteAssociationUpdateOne) Save(ctx context.Context) (*BusRouteAssociation, error) { + return withHooks(ctx, brauo.sqlSave, brauo.mutation, brauo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (brauo *BusRouteAssociationUpdateOne) SaveX(ctx context.Context) *BusRouteAssociation { + node, err := brauo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (brauo *BusRouteAssociationUpdateOne) Exec(ctx context.Context) error { + _, err := brauo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (brauo *BusRouteAssociationUpdateOne) ExecX(ctx context.Context) { + if err := brauo.Exec(ctx); err != nil { + panic(err) + } +} + +// check runs all checks and user-defined validators on the builder. +func (brauo *BusRouteAssociationUpdateOne) check() error { + if _, ok := brauo.mutation.StationID(); brauo.mutation.StationCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "BusRouteAssociation.station"`) + } + if _, ok := brauo.mutation.BusRouteID(); brauo.mutation.BusRouteCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "BusRouteAssociation.busRoute"`) + } + return nil +} + +func (brauo *BusRouteAssociationUpdateOne) sqlSave(ctx context.Context) (_node *BusRouteAssociation, err error) { + if err := brauo.check(); err != nil { + return _node, err + } + _spec := sqlgraph.NewUpdateSpec(busrouteassociation.Table, busrouteassociation.Columns, sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt)) + id, ok := brauo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "BusRouteAssociation.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := brauo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, busrouteassociation.FieldID) + for _, f := range fields { + if !busrouteassociation.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != busrouteassociation.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := brauo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := brauo.mutation.Order(); ok { + _spec.SetField(busrouteassociation.FieldOrder, field.TypeInt32, value) + } + if value, ok := brauo.mutation.AddedOrder(); ok { + _spec.AddField(busrouteassociation.FieldOrder, field.TypeInt32, value) + } + if brauo.mutation.StationCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: busrouteassociation.StationTable, + Columns: []string{busrouteassociation.StationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := brauo.mutation.StationIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: busrouteassociation.StationTable, + Columns: []string{busrouteassociation.StationColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if brauo.mutation.BusRouteCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: busrouteassociation.BusRouteTable, + Columns: []string{busrouteassociation.BusRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := brauo.mutation.BusRouteIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: true, + Table: busrouteassociation.BusRouteTable, + Columns: []string{busrouteassociation.BusRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + _node = &BusRouteAssociation{config: brauo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, brauo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{busrouteassociation.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + brauo.mutation.done = true + return _node, nil +} diff --git a/backend/domain/repository/ent/childbusassociation.go b/backend/domain/repository/ent/childbusassociation.go index c09b1b36..2b74bb4d 100644 --- a/backend/domain/repository/ent/childbusassociation.go +++ b/backend/domain/repository/ent/childbusassociation.go @@ -8,7 +8,7 @@ import ( "entgo.io/ent" "entgo.io/ent/dialect/sql" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" "github.com/google/uuid" @@ -21,10 +21,8 @@ type ChildBusAssociation struct { ID int `json:"id,omitempty"` // ChildID holds the value of the "child_id" field. ChildID uuid.UUID `json:"child_id,omitempty"` - // BusID holds the value of the "bus_id" field. - BusID uuid.UUID `json:"bus_id,omitempty"` - // 朝のバスか放課後のバスかを示す - BusType childbusassociation.BusType `json:"bus_type,omitempty"` + // BusRouteID holds the value of the "bus_route_id" field. + BusRouteID uuid.UUID `json:"bus_route_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ChildBusAssociationQuery when eager-loading is set. Edges ChildBusAssociationEdges `json:"edges"` @@ -35,8 +33,8 @@ type ChildBusAssociation struct { type ChildBusAssociationEdges struct { // Child holds the value of the child edge. Child *Child `json:"child,omitempty"` - // Bus holds the value of the bus edge. - Bus *Bus `json:"bus,omitempty"` + // BusRoute holds the value of the bus_route edge. + BusRoute *BusRoute `json:"bus_route,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. loadedTypes [2]bool @@ -55,17 +53,17 @@ func (e ChildBusAssociationEdges) ChildOrErr() (*Child, error) { return nil, &NotLoadedError{edge: "child"} } -// BusOrErr returns the Bus value or an error if the edge +// BusRouteOrErr returns the BusRoute value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. -func (e ChildBusAssociationEdges) BusOrErr() (*Bus, error) { +func (e ChildBusAssociationEdges) BusRouteOrErr() (*BusRoute, error) { if e.loadedTypes[1] { - if e.Bus == nil { + if e.BusRoute == nil { // Edge was loaded but was not found. - return nil, &NotFoundError{label: bus.Label} + return nil, &NotFoundError{label: busroute.Label} } - return e.Bus, nil + return e.BusRoute, nil } - return nil, &NotLoadedError{edge: "bus"} + return nil, &NotLoadedError{edge: "bus_route"} } // scanValues returns the types for scanning values from sql.Rows. @@ -75,9 +73,7 @@ func (*ChildBusAssociation) scanValues(columns []string) ([]any, error) { switch columns[i] { case childbusassociation.FieldID: values[i] = new(sql.NullInt64) - case childbusassociation.FieldBusType: - values[i] = new(sql.NullString) - case childbusassociation.FieldChildID, childbusassociation.FieldBusID: + case childbusassociation.FieldChildID, childbusassociation.FieldBusRouteID: values[i] = new(uuid.UUID) default: values[i] = new(sql.UnknownType) @@ -106,17 +102,11 @@ func (cba *ChildBusAssociation) assignValues(columns []string, values []any) err } else if value != nil { cba.ChildID = *value } - case childbusassociation.FieldBusID: + case childbusassociation.FieldBusRouteID: if value, ok := values[i].(*uuid.UUID); !ok { - return fmt.Errorf("unexpected type %T for field bus_id", values[i]) + return fmt.Errorf("unexpected type %T for field bus_route_id", values[i]) } else if value != nil { - cba.BusID = *value - } - case childbusassociation.FieldBusType: - if value, ok := values[i].(*sql.NullString); !ok { - return fmt.Errorf("unexpected type %T for field bus_type", values[i]) - } else if value.Valid { - cba.BusType = childbusassociation.BusType(value.String) + cba.BusRouteID = *value } default: cba.selectValues.Set(columns[i], values[i]) @@ -136,9 +126,9 @@ func (cba *ChildBusAssociation) QueryChild() *ChildQuery { return NewChildBusAssociationClient(cba.config).QueryChild(cba) } -// QueryBus queries the "bus" edge of the ChildBusAssociation entity. -func (cba *ChildBusAssociation) QueryBus() *BusQuery { - return NewChildBusAssociationClient(cba.config).QueryBus(cba) +// QueryBusRoute queries the "bus_route" edge of the ChildBusAssociation entity. +func (cba *ChildBusAssociation) QueryBusRoute() *BusRouteQuery { + return NewChildBusAssociationClient(cba.config).QueryBusRoute(cba) } // Update returns a builder for updating this ChildBusAssociation. @@ -167,11 +157,8 @@ func (cba *ChildBusAssociation) String() string { builder.WriteString("child_id=") builder.WriteString(fmt.Sprintf("%v", cba.ChildID)) builder.WriteString(", ") - builder.WriteString("bus_id=") - builder.WriteString(fmt.Sprintf("%v", cba.BusID)) - builder.WriteString(", ") - builder.WriteString("bus_type=") - builder.WriteString(fmt.Sprintf("%v", cba.BusType)) + builder.WriteString("bus_route_id=") + builder.WriteString(fmt.Sprintf("%v", cba.BusRouteID)) builder.WriteByte(')') return builder.String() } diff --git a/backend/domain/repository/ent/childbusassociation/childbusassociation.go b/backend/domain/repository/ent/childbusassociation/childbusassociation.go index 73ce2324..df021730 100644 --- a/backend/domain/repository/ent/childbusassociation/childbusassociation.go +++ b/backend/domain/repository/ent/childbusassociation/childbusassociation.go @@ -3,8 +3,6 @@ package childbusassociation import ( - "fmt" - "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" ) @@ -16,14 +14,12 @@ const ( FieldID = "id" // FieldChildID holds the string denoting the child_id field in the database. FieldChildID = "child_id" - // FieldBusID holds the string denoting the bus_id field in the database. - FieldBusID = "bus_id" - // FieldBusType holds the string denoting the bus_type field in the database. - FieldBusType = "bus_type" + // FieldBusRouteID holds the string denoting the bus_route_id field in the database. + FieldBusRouteID = "bus_route_id" // EdgeChild holds the string denoting the child edge name in mutations. EdgeChild = "child" - // EdgeBus holds the string denoting the bus edge name in mutations. - EdgeBus = "bus" + // EdgeBusRoute holds the string denoting the bus_route edge name in mutations. + EdgeBusRoute = "bus_route" // Table holds the table name of the childbusassociation in the database. Table = "child_bus_associations" // ChildTable is the table that holds the child relation/edge. @@ -33,21 +29,20 @@ const ( ChildInverseTable = "childs" // ChildColumn is the table column denoting the child relation/edge. ChildColumn = "child_id" - // BusTable is the table that holds the bus relation/edge. - BusTable = "child_bus_associations" - // BusInverseTable is the table name for the Bus entity. - // It exists in this package in order to avoid circular dependency with the "bus" package. - BusInverseTable = "bus" - // BusColumn is the table column denoting the bus relation/edge. - BusColumn = "bus_id" + // BusRouteTable is the table that holds the bus_route relation/edge. + BusRouteTable = "child_bus_associations" + // BusRouteInverseTable is the table name for the BusRoute entity. + // It exists in this package in order to avoid circular dependency with the "busroute" package. + BusRouteInverseTable = "bus_routes" + // BusRouteColumn is the table column denoting the bus_route relation/edge. + BusRouteColumn = "bus_route_id" ) // Columns holds all SQL columns for childbusassociation fields. var Columns = []string{ FieldID, FieldChildID, - FieldBusID, - FieldBusType, + FieldBusRouteID, } // ValidColumn reports if the column name is valid (part of the table columns). @@ -60,29 +55,6 @@ func ValidColumn(column string) bool { return false } -// BusType defines the type for the "bus_type" enum field. -type BusType string - -// BusType values. -const ( - BusTypeMorning BusType = "morning" - BusTypeEvening BusType = "evening" -) - -func (bt BusType) String() string { - return string(bt) -} - -// BusTypeValidator is a validator for the "bus_type" field enum values. It is called by the builders before save. -func BusTypeValidator(bt BusType) error { - switch bt { - case BusTypeMorning, BusTypeEvening: - return nil - default: - return fmt.Errorf("childbusassociation: invalid enum value for bus_type field: %q", bt) - } -} - // OrderOption defines the ordering options for the ChildBusAssociation queries. type OrderOption func(*sql.Selector) @@ -96,14 +68,9 @@ func ByChildID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldChildID, opts...).ToFunc() } -// ByBusID orders the results by the bus_id field. -func ByBusID(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldBusID, opts...).ToFunc() -} - -// ByBusType orders the results by the bus_type field. -func ByBusType(opts ...sql.OrderTermOption) OrderOption { - return sql.OrderByField(FieldBusType, opts...).ToFunc() +// ByBusRouteID orders the results by the bus_route_id field. +func ByBusRouteID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldBusRouteID, opts...).ToFunc() } // ByChildField orders the results by child field. @@ -113,10 +80,10 @@ func ByChildField(field string, opts ...sql.OrderTermOption) OrderOption { } } -// ByBusField orders the results by bus field. -func ByBusField(field string, opts ...sql.OrderTermOption) OrderOption { +// ByBusRouteField orders the results by bus_route field. +func ByBusRouteField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newBusStep(), sql.OrderByField(field, opts...)) + sqlgraph.OrderByNeighborTerms(s, newBusRouteStep(), sql.OrderByField(field, opts...)) } } func newChildStep() *sqlgraph.Step { @@ -126,10 +93,10 @@ func newChildStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.M2O, true, ChildTable, ChildColumn), ) } -func newBusStep() *sqlgraph.Step { +func newBusRouteStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(BusInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, BusTable, BusColumn), + sqlgraph.To(BusRouteInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, BusRouteTable, BusRouteColumn), ) } diff --git a/backend/domain/repository/ent/childbusassociation/where.go b/backend/domain/repository/ent/childbusassociation/where.go index 5f755d08..2facdd84 100644 --- a/backend/domain/repository/ent/childbusassociation/where.go +++ b/backend/domain/repository/ent/childbusassociation/where.go @@ -59,9 +59,9 @@ func ChildID(v uuid.UUID) predicate.ChildBusAssociation { return predicate.ChildBusAssociation(sql.FieldEQ(FieldChildID, v)) } -// BusID applies equality check predicate on the "bus_id" field. It's identical to BusIDEQ. -func BusID(v uuid.UUID) predicate.ChildBusAssociation { - return predicate.ChildBusAssociation(sql.FieldEQ(FieldBusID, v)) +// BusRouteID applies equality check predicate on the "bus_route_id" field. It's identical to BusRouteIDEQ. +func BusRouteID(v uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldEQ(FieldBusRouteID, v)) } // ChildIDEQ applies the EQ predicate on the "child_id" field. @@ -84,44 +84,24 @@ func ChildIDNotIn(vs ...uuid.UUID) predicate.ChildBusAssociation { return predicate.ChildBusAssociation(sql.FieldNotIn(FieldChildID, vs...)) } -// BusIDEQ applies the EQ predicate on the "bus_id" field. -func BusIDEQ(v uuid.UUID) predicate.ChildBusAssociation { - return predicate.ChildBusAssociation(sql.FieldEQ(FieldBusID, v)) +// BusRouteIDEQ applies the EQ predicate on the "bus_route_id" field. +func BusRouteIDEQ(v uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldEQ(FieldBusRouteID, v)) } -// BusIDNEQ applies the NEQ predicate on the "bus_id" field. -func BusIDNEQ(v uuid.UUID) predicate.ChildBusAssociation { - return predicate.ChildBusAssociation(sql.FieldNEQ(FieldBusID, v)) +// BusRouteIDNEQ applies the NEQ predicate on the "bus_route_id" field. +func BusRouteIDNEQ(v uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldNEQ(FieldBusRouteID, v)) } -// BusIDIn applies the In predicate on the "bus_id" field. -func BusIDIn(vs ...uuid.UUID) predicate.ChildBusAssociation { - return predicate.ChildBusAssociation(sql.FieldIn(FieldBusID, vs...)) +// BusRouteIDIn applies the In predicate on the "bus_route_id" field. +func BusRouteIDIn(vs ...uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldIn(FieldBusRouteID, vs...)) } -// BusIDNotIn applies the NotIn predicate on the "bus_id" field. -func BusIDNotIn(vs ...uuid.UUID) predicate.ChildBusAssociation { - return predicate.ChildBusAssociation(sql.FieldNotIn(FieldBusID, vs...)) -} - -// BusTypeEQ applies the EQ predicate on the "bus_type" field. -func BusTypeEQ(v BusType) predicate.ChildBusAssociation { - return predicate.ChildBusAssociation(sql.FieldEQ(FieldBusType, v)) -} - -// BusTypeNEQ applies the NEQ predicate on the "bus_type" field. -func BusTypeNEQ(v BusType) predicate.ChildBusAssociation { - return predicate.ChildBusAssociation(sql.FieldNEQ(FieldBusType, v)) -} - -// BusTypeIn applies the In predicate on the "bus_type" field. -func BusTypeIn(vs ...BusType) predicate.ChildBusAssociation { - return predicate.ChildBusAssociation(sql.FieldIn(FieldBusType, vs...)) -} - -// BusTypeNotIn applies the NotIn predicate on the "bus_type" field. -func BusTypeNotIn(vs ...BusType) predicate.ChildBusAssociation { - return predicate.ChildBusAssociation(sql.FieldNotIn(FieldBusType, vs...)) +// BusRouteIDNotIn applies the NotIn predicate on the "bus_route_id" field. +func BusRouteIDNotIn(vs ...uuid.UUID) predicate.ChildBusAssociation { + return predicate.ChildBusAssociation(sql.FieldNotIn(FieldBusRouteID, vs...)) } // HasChild applies the HasEdge predicate on the "child" edge. @@ -147,21 +127,21 @@ func HasChildWith(preds ...predicate.Child) predicate.ChildBusAssociation { }) } -// HasBus applies the HasEdge predicate on the "bus" edge. -func HasBus() predicate.ChildBusAssociation { +// HasBusRoute applies the HasEdge predicate on the "bus_route" edge. +func HasBusRoute() predicate.ChildBusAssociation { return predicate.ChildBusAssociation(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, BusTable, BusColumn), + sqlgraph.Edge(sqlgraph.M2O, true, BusRouteTable, BusRouteColumn), ) sqlgraph.HasNeighbors(s, step) }) } -// HasBusWith applies the HasEdge predicate on the "bus" edge with a given conditions (other predicates). -func HasBusWith(preds ...predicate.Bus) predicate.ChildBusAssociation { +// HasBusRouteWith applies the HasEdge predicate on the "bus_route" edge with a given conditions (other predicates). +func HasBusRouteWith(preds ...predicate.BusRoute) predicate.ChildBusAssociation { return predicate.ChildBusAssociation(func(s *sql.Selector) { - step := newBusStep() + step := newBusRouteStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) diff --git a/backend/domain/repository/ent/childbusassociation_create.go b/backend/domain/repository/ent/childbusassociation_create.go index 36fe9b4f..472b1f97 100644 --- a/backend/domain/repository/ent/childbusassociation_create.go +++ b/backend/domain/repository/ent/childbusassociation_create.go @@ -9,7 +9,7 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" "github.com/google/uuid" @@ -28,15 +28,9 @@ func (cbac *ChildBusAssociationCreate) SetChildID(u uuid.UUID) *ChildBusAssociat return cbac } -// SetBusID sets the "bus_id" field. -func (cbac *ChildBusAssociationCreate) SetBusID(u uuid.UUID) *ChildBusAssociationCreate { - cbac.mutation.SetBusID(u) - return cbac -} - -// SetBusType sets the "bus_type" field. -func (cbac *ChildBusAssociationCreate) SetBusType(ct childbusassociation.BusType) *ChildBusAssociationCreate { - cbac.mutation.SetBusType(ct) +// SetBusRouteID sets the "bus_route_id" field. +func (cbac *ChildBusAssociationCreate) SetBusRouteID(u uuid.UUID) *ChildBusAssociationCreate { + cbac.mutation.SetBusRouteID(u) return cbac } @@ -45,9 +39,9 @@ func (cbac *ChildBusAssociationCreate) SetChild(c *Child) *ChildBusAssociationCr return cbac.SetChildID(c.ID) } -// SetBus sets the "bus" edge to the Bus entity. -func (cbac *ChildBusAssociationCreate) SetBus(b *Bus) *ChildBusAssociationCreate { - return cbac.SetBusID(b.ID) +// SetBusRoute sets the "bus_route" edge to the BusRoute entity. +func (cbac *ChildBusAssociationCreate) SetBusRoute(b *BusRoute) *ChildBusAssociationCreate { + return cbac.SetBusRouteID(b.ID) } // Mutation returns the ChildBusAssociationMutation object of the builder. @@ -87,22 +81,14 @@ func (cbac *ChildBusAssociationCreate) check() error { if _, ok := cbac.mutation.ChildID(); !ok { return &ValidationError{Name: "child_id", err: errors.New(`ent: missing required field "ChildBusAssociation.child_id"`)} } - if _, ok := cbac.mutation.BusID(); !ok { - return &ValidationError{Name: "bus_id", err: errors.New(`ent: missing required field "ChildBusAssociation.bus_id"`)} - } - if _, ok := cbac.mutation.BusType(); !ok { - return &ValidationError{Name: "bus_type", err: errors.New(`ent: missing required field "ChildBusAssociation.bus_type"`)} - } - if v, ok := cbac.mutation.BusType(); ok { - if err := childbusassociation.BusTypeValidator(v); err != nil { - return &ValidationError{Name: "bus_type", err: fmt.Errorf(`ent: validator failed for field "ChildBusAssociation.bus_type": %w`, err)} - } + if _, ok := cbac.mutation.BusRouteID(); !ok { + return &ValidationError{Name: "bus_route_id", err: errors.New(`ent: missing required field "ChildBusAssociation.bus_route_id"`)} } if _, ok := cbac.mutation.ChildID(); !ok { return &ValidationError{Name: "child", err: errors.New(`ent: missing required edge "ChildBusAssociation.child"`)} } - if _, ok := cbac.mutation.BusID(); !ok { - return &ValidationError{Name: "bus", err: errors.New(`ent: missing required edge "ChildBusAssociation.bus"`)} + if _, ok := cbac.mutation.BusRouteID(); !ok { + return &ValidationError{Name: "bus_route", err: errors.New(`ent: missing required edge "ChildBusAssociation.bus_route"`)} } return nil } @@ -130,10 +116,6 @@ func (cbac *ChildBusAssociationCreate) createSpec() (*ChildBusAssociation, *sqlg _node = &ChildBusAssociation{config: cbac.config} _spec = sqlgraph.NewCreateSpec(childbusassociation.Table, sqlgraph.NewFieldSpec(childbusassociation.FieldID, field.TypeInt)) ) - if value, ok := cbac.mutation.BusType(); ok { - _spec.SetField(childbusassociation.FieldBusType, field.TypeEnum, value) - _node.BusType = value - } if nodes := cbac.mutation.ChildIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, @@ -151,21 +133,21 @@ func (cbac *ChildBusAssociationCreate) createSpec() (*ChildBusAssociation, *sqlg _node.ChildID = nodes[0] _spec.Edges = append(_spec.Edges, edge) } - if nodes := cbac.mutation.BusIDs(); len(nodes) > 0 { + if nodes := cbac.mutation.BusRouteIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, Inverse: true, - Table: childbusassociation.BusTable, - Columns: []string{childbusassociation.BusColumn}, + Table: childbusassociation.BusRouteTable, + Columns: []string{childbusassociation.BusRouteColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } for _, k := range nodes { edge.Target.Nodes = append(edge.Target.Nodes, k) } - _node.BusID = nodes[0] + _node.BusRouteID = nodes[0] _spec.Edges = append(_spec.Edges, edge) } return _node, _spec diff --git a/backend/domain/repository/ent/childbusassociation_query.go b/backend/domain/repository/ent/childbusassociation_query.go index 86530953..ade7fe01 100644 --- a/backend/domain/repository/ent/childbusassociation_query.go +++ b/backend/domain/repository/ent/childbusassociation_query.go @@ -10,7 +10,7 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" @@ -20,12 +20,12 @@ import ( // ChildBusAssociationQuery is the builder for querying ChildBusAssociation entities. type ChildBusAssociationQuery struct { config - ctx *QueryContext - order []childbusassociation.OrderOption - inters []Interceptor - predicates []predicate.ChildBusAssociation - withChild *ChildQuery - withBus *BusQuery + ctx *QueryContext + order []childbusassociation.OrderOption + inters []Interceptor + predicates []predicate.ChildBusAssociation + withChild *ChildQuery + withBusRoute *BusRouteQuery // intermediate query (i.e. traversal path). sql *sql.Selector path func(context.Context) (*sql.Selector, error) @@ -84,9 +84,9 @@ func (cbaq *ChildBusAssociationQuery) QueryChild() *ChildQuery { return query } -// QueryBus chains the current query on the "bus" edge. -func (cbaq *ChildBusAssociationQuery) QueryBus() *BusQuery { - query := (&BusClient{config: cbaq.config}).Query() +// QueryBusRoute chains the current query on the "bus_route" edge. +func (cbaq *ChildBusAssociationQuery) QueryBusRoute() *BusRouteQuery { + query := (&BusRouteClient{config: cbaq.config}).Query() query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { if err := cbaq.prepareQuery(ctx); err != nil { return nil, err @@ -97,8 +97,8 @@ func (cbaq *ChildBusAssociationQuery) QueryBus() *BusQuery { } step := sqlgraph.NewStep( sqlgraph.From(childbusassociation.Table, childbusassociation.FieldID, selector), - sqlgraph.To(bus.Table, bus.FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, childbusassociation.BusTable, childbusassociation.BusColumn), + sqlgraph.To(busroute.Table, busroute.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, childbusassociation.BusRouteTable, childbusassociation.BusRouteColumn), ) fromU = sqlgraph.SetNeighbors(cbaq.driver.Dialect(), step) return fromU, nil @@ -293,13 +293,13 @@ func (cbaq *ChildBusAssociationQuery) Clone() *ChildBusAssociationQuery { return nil } return &ChildBusAssociationQuery{ - config: cbaq.config, - ctx: cbaq.ctx.Clone(), - order: append([]childbusassociation.OrderOption{}, cbaq.order...), - inters: append([]Interceptor{}, cbaq.inters...), - predicates: append([]predicate.ChildBusAssociation{}, cbaq.predicates...), - withChild: cbaq.withChild.Clone(), - withBus: cbaq.withBus.Clone(), + config: cbaq.config, + ctx: cbaq.ctx.Clone(), + order: append([]childbusassociation.OrderOption{}, cbaq.order...), + inters: append([]Interceptor{}, cbaq.inters...), + predicates: append([]predicate.ChildBusAssociation{}, cbaq.predicates...), + withChild: cbaq.withChild.Clone(), + withBusRoute: cbaq.withBusRoute.Clone(), // clone intermediate query. sql: cbaq.sql.Clone(), path: cbaq.path, @@ -317,14 +317,14 @@ func (cbaq *ChildBusAssociationQuery) WithChild(opts ...func(*ChildQuery)) *Chil return cbaq } -// WithBus tells the query-builder to eager-load the nodes that are connected to -// the "bus" edge. The optional arguments are used to configure the query builder of the edge. -func (cbaq *ChildBusAssociationQuery) WithBus(opts ...func(*BusQuery)) *ChildBusAssociationQuery { - query := (&BusClient{config: cbaq.config}).Query() +// WithBusRoute tells the query-builder to eager-load the nodes that are connected to +// the "bus_route" edge. The optional arguments are used to configure the query builder of the edge. +func (cbaq *ChildBusAssociationQuery) WithBusRoute(opts ...func(*BusRouteQuery)) *ChildBusAssociationQuery { + query := (&BusRouteClient{config: cbaq.config}).Query() for _, opt := range opts { opt(query) } - cbaq.withBus = query + cbaq.withBusRoute = query return cbaq } @@ -408,7 +408,7 @@ func (cbaq *ChildBusAssociationQuery) sqlAll(ctx context.Context, hooks ...query _spec = cbaq.querySpec() loadedTypes = [2]bool{ cbaq.withChild != nil, - cbaq.withBus != nil, + cbaq.withBusRoute != nil, } ) _spec.ScanValues = func(columns []string) ([]any, error) { @@ -435,9 +435,9 @@ func (cbaq *ChildBusAssociationQuery) sqlAll(ctx context.Context, hooks ...query return nil, err } } - if query := cbaq.withBus; query != nil { - if err := cbaq.loadBus(ctx, query, nodes, nil, - func(n *ChildBusAssociation, e *Bus) { n.Edges.Bus = e }); err != nil { + if query := cbaq.withBusRoute; query != nil { + if err := cbaq.loadBusRoute(ctx, query, nodes, nil, + func(n *ChildBusAssociation, e *BusRoute) { n.Edges.BusRoute = e }); err != nil { return nil, err } } @@ -473,11 +473,11 @@ func (cbaq *ChildBusAssociationQuery) loadChild(ctx context.Context, query *Chil } return nil } -func (cbaq *ChildBusAssociationQuery) loadBus(ctx context.Context, query *BusQuery, nodes []*ChildBusAssociation, init func(*ChildBusAssociation), assign func(*ChildBusAssociation, *Bus)) error { +func (cbaq *ChildBusAssociationQuery) loadBusRoute(ctx context.Context, query *BusRouteQuery, nodes []*ChildBusAssociation, init func(*ChildBusAssociation), assign func(*ChildBusAssociation, *BusRoute)) error { ids := make([]uuid.UUID, 0, len(nodes)) nodeids := make(map[uuid.UUID][]*ChildBusAssociation) for i := range nodes { - fk := nodes[i].BusID + fk := nodes[i].BusRouteID if _, ok := nodeids[fk]; !ok { ids = append(ids, fk) } @@ -486,7 +486,7 @@ func (cbaq *ChildBusAssociationQuery) loadBus(ctx context.Context, query *BusQue if len(ids) == 0 { return nil } - query.Where(bus.IDIn(ids...)) + query.Where(busroute.IDIn(ids...)) neighbors, err := query.All(ctx) if err != nil { return err @@ -494,7 +494,7 @@ func (cbaq *ChildBusAssociationQuery) loadBus(ctx context.Context, query *BusQue for _, n := range neighbors { nodes, ok := nodeids[n.ID] if !ok { - return fmt.Errorf(`unexpected foreign-key "bus_id" returned %v`, n.ID) + return fmt.Errorf(`unexpected foreign-key "bus_route_id" returned %v`, n.ID) } for i := range nodes { assign(nodes[i], n) @@ -531,8 +531,8 @@ func (cbaq *ChildBusAssociationQuery) querySpec() *sqlgraph.QuerySpec { if cbaq.withChild != nil { _spec.Node.AddColumnOnce(childbusassociation.FieldChildID) } - if cbaq.withBus != nil { - _spec.Node.AddColumnOnce(childbusassociation.FieldBusID) + if cbaq.withBusRoute != nil { + _spec.Node.AddColumnOnce(childbusassociation.FieldBusRouteID) } } if ps := cbaq.predicates; len(ps) > 0 { diff --git a/backend/domain/repository/ent/childbusassociation_update.go b/backend/domain/repository/ent/childbusassociation_update.go index e4011a15..1571e789 100644 --- a/backend/domain/repository/ent/childbusassociation_update.go +++ b/backend/domain/repository/ent/childbusassociation_update.go @@ -10,7 +10,7 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" @@ -44,30 +44,16 @@ func (cbau *ChildBusAssociationUpdate) SetNillableChildID(u *uuid.UUID) *ChildBu return cbau } -// SetBusID sets the "bus_id" field. -func (cbau *ChildBusAssociationUpdate) SetBusID(u uuid.UUID) *ChildBusAssociationUpdate { - cbau.mutation.SetBusID(u) +// SetBusRouteID sets the "bus_route_id" field. +func (cbau *ChildBusAssociationUpdate) SetBusRouteID(u uuid.UUID) *ChildBusAssociationUpdate { + cbau.mutation.SetBusRouteID(u) return cbau } -// SetNillableBusID sets the "bus_id" field if the given value is not nil. -func (cbau *ChildBusAssociationUpdate) SetNillableBusID(u *uuid.UUID) *ChildBusAssociationUpdate { +// SetNillableBusRouteID sets the "bus_route_id" field if the given value is not nil. +func (cbau *ChildBusAssociationUpdate) SetNillableBusRouteID(u *uuid.UUID) *ChildBusAssociationUpdate { if u != nil { - cbau.SetBusID(*u) - } - return cbau -} - -// SetBusType sets the "bus_type" field. -func (cbau *ChildBusAssociationUpdate) SetBusType(ct childbusassociation.BusType) *ChildBusAssociationUpdate { - cbau.mutation.SetBusType(ct) - return cbau -} - -// SetNillableBusType sets the "bus_type" field if the given value is not nil. -func (cbau *ChildBusAssociationUpdate) SetNillableBusType(ct *childbusassociation.BusType) *ChildBusAssociationUpdate { - if ct != nil { - cbau.SetBusType(*ct) + cbau.SetBusRouteID(*u) } return cbau } @@ -77,9 +63,9 @@ func (cbau *ChildBusAssociationUpdate) SetChild(c *Child) *ChildBusAssociationUp return cbau.SetChildID(c.ID) } -// SetBus sets the "bus" edge to the Bus entity. -func (cbau *ChildBusAssociationUpdate) SetBus(b *Bus) *ChildBusAssociationUpdate { - return cbau.SetBusID(b.ID) +// SetBusRoute sets the "bus_route" edge to the BusRoute entity. +func (cbau *ChildBusAssociationUpdate) SetBusRoute(b *BusRoute) *ChildBusAssociationUpdate { + return cbau.SetBusRouteID(b.ID) } // Mutation returns the ChildBusAssociationMutation object of the builder. @@ -93,9 +79,9 @@ func (cbau *ChildBusAssociationUpdate) ClearChild() *ChildBusAssociationUpdate { return cbau } -// ClearBus clears the "bus" edge to the Bus entity. -func (cbau *ChildBusAssociationUpdate) ClearBus() *ChildBusAssociationUpdate { - cbau.mutation.ClearBus() +// ClearBusRoute clears the "bus_route" edge to the BusRoute entity. +func (cbau *ChildBusAssociationUpdate) ClearBusRoute() *ChildBusAssociationUpdate { + cbau.mutation.ClearBusRoute() return cbau } @@ -128,16 +114,11 @@ func (cbau *ChildBusAssociationUpdate) ExecX(ctx context.Context) { // check runs all checks and user-defined validators on the builder. func (cbau *ChildBusAssociationUpdate) check() error { - if v, ok := cbau.mutation.BusType(); ok { - if err := childbusassociation.BusTypeValidator(v); err != nil { - return &ValidationError{Name: "bus_type", err: fmt.Errorf(`ent: validator failed for field "ChildBusAssociation.bus_type": %w`, err)} - } - } if _, ok := cbau.mutation.ChildID(); cbau.mutation.ChildCleared() && !ok { return errors.New(`ent: clearing a required unique edge "ChildBusAssociation.child"`) } - if _, ok := cbau.mutation.BusID(); cbau.mutation.BusCleared() && !ok { - return errors.New(`ent: clearing a required unique edge "ChildBusAssociation.bus"`) + if _, ok := cbau.mutation.BusRouteID(); cbau.mutation.BusRouteCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "ChildBusAssociation.bus_route"`) } return nil } @@ -154,9 +135,6 @@ func (cbau *ChildBusAssociationUpdate) sqlSave(ctx context.Context) (n int, err } } } - if value, ok := cbau.mutation.BusType(); ok { - _spec.SetField(childbusassociation.FieldBusType, field.TypeEnum, value) - } if cbau.mutation.ChildCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, @@ -186,28 +164,28 @@ func (cbau *ChildBusAssociationUpdate) sqlSave(ctx context.Context) (n int, err } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if cbau.mutation.BusCleared() { + if cbau.mutation.BusRouteCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, Inverse: true, - Table: childbusassociation.BusTable, - Columns: []string{childbusassociation.BusColumn}, + Table: childbusassociation.BusRouteTable, + Columns: []string{childbusassociation.BusRouteColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := cbau.mutation.BusIDs(); len(nodes) > 0 { + if nodes := cbau.mutation.BusRouteIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, Inverse: true, - Table: childbusassociation.BusTable, - Columns: []string{childbusassociation.BusColumn}, + Table: childbusassociation.BusRouteTable, + Columns: []string{childbusassociation.BusRouteColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } for _, k := range nodes { @@ -249,30 +227,16 @@ func (cbauo *ChildBusAssociationUpdateOne) SetNillableChildID(u *uuid.UUID) *Chi return cbauo } -// SetBusID sets the "bus_id" field. -func (cbauo *ChildBusAssociationUpdateOne) SetBusID(u uuid.UUID) *ChildBusAssociationUpdateOne { - cbauo.mutation.SetBusID(u) +// SetBusRouteID sets the "bus_route_id" field. +func (cbauo *ChildBusAssociationUpdateOne) SetBusRouteID(u uuid.UUID) *ChildBusAssociationUpdateOne { + cbauo.mutation.SetBusRouteID(u) return cbauo } -// SetNillableBusID sets the "bus_id" field if the given value is not nil. -func (cbauo *ChildBusAssociationUpdateOne) SetNillableBusID(u *uuid.UUID) *ChildBusAssociationUpdateOne { +// SetNillableBusRouteID sets the "bus_route_id" field if the given value is not nil. +func (cbauo *ChildBusAssociationUpdateOne) SetNillableBusRouteID(u *uuid.UUID) *ChildBusAssociationUpdateOne { if u != nil { - cbauo.SetBusID(*u) - } - return cbauo -} - -// SetBusType sets the "bus_type" field. -func (cbauo *ChildBusAssociationUpdateOne) SetBusType(ct childbusassociation.BusType) *ChildBusAssociationUpdateOne { - cbauo.mutation.SetBusType(ct) - return cbauo -} - -// SetNillableBusType sets the "bus_type" field if the given value is not nil. -func (cbauo *ChildBusAssociationUpdateOne) SetNillableBusType(ct *childbusassociation.BusType) *ChildBusAssociationUpdateOne { - if ct != nil { - cbauo.SetBusType(*ct) + cbauo.SetBusRouteID(*u) } return cbauo } @@ -282,9 +246,9 @@ func (cbauo *ChildBusAssociationUpdateOne) SetChild(c *Child) *ChildBusAssociati return cbauo.SetChildID(c.ID) } -// SetBus sets the "bus" edge to the Bus entity. -func (cbauo *ChildBusAssociationUpdateOne) SetBus(b *Bus) *ChildBusAssociationUpdateOne { - return cbauo.SetBusID(b.ID) +// SetBusRoute sets the "bus_route" edge to the BusRoute entity. +func (cbauo *ChildBusAssociationUpdateOne) SetBusRoute(b *BusRoute) *ChildBusAssociationUpdateOne { + return cbauo.SetBusRouteID(b.ID) } // Mutation returns the ChildBusAssociationMutation object of the builder. @@ -298,9 +262,9 @@ func (cbauo *ChildBusAssociationUpdateOne) ClearChild() *ChildBusAssociationUpda return cbauo } -// ClearBus clears the "bus" edge to the Bus entity. -func (cbauo *ChildBusAssociationUpdateOne) ClearBus() *ChildBusAssociationUpdateOne { - cbauo.mutation.ClearBus() +// ClearBusRoute clears the "bus_route" edge to the BusRoute entity. +func (cbauo *ChildBusAssociationUpdateOne) ClearBusRoute() *ChildBusAssociationUpdateOne { + cbauo.mutation.ClearBusRoute() return cbauo } @@ -346,16 +310,11 @@ func (cbauo *ChildBusAssociationUpdateOne) ExecX(ctx context.Context) { // check runs all checks and user-defined validators on the builder. func (cbauo *ChildBusAssociationUpdateOne) check() error { - if v, ok := cbauo.mutation.BusType(); ok { - if err := childbusassociation.BusTypeValidator(v); err != nil { - return &ValidationError{Name: "bus_type", err: fmt.Errorf(`ent: validator failed for field "ChildBusAssociation.bus_type": %w`, err)} - } - } if _, ok := cbauo.mutation.ChildID(); cbauo.mutation.ChildCleared() && !ok { return errors.New(`ent: clearing a required unique edge "ChildBusAssociation.child"`) } - if _, ok := cbauo.mutation.BusID(); cbauo.mutation.BusCleared() && !ok { - return errors.New(`ent: clearing a required unique edge "ChildBusAssociation.bus"`) + if _, ok := cbauo.mutation.BusRouteID(); cbauo.mutation.BusRouteCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "ChildBusAssociation.bus_route"`) } return nil } @@ -389,9 +348,6 @@ func (cbauo *ChildBusAssociationUpdateOne) sqlSave(ctx context.Context) (_node * } } } - if value, ok := cbauo.mutation.BusType(); ok { - _spec.SetField(childbusassociation.FieldBusType, field.TypeEnum, value) - } if cbauo.mutation.ChildCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, @@ -421,28 +377,28 @@ func (cbauo *ChildBusAssociationUpdateOne) sqlSave(ctx context.Context) (_node * } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if cbauo.mutation.BusCleared() { + if cbauo.mutation.BusRouteCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, Inverse: true, - Table: childbusassociation.BusTable, - Columns: []string{childbusassociation.BusColumn}, + Table: childbusassociation.BusRouteTable, + Columns: []string{childbusassociation.BusRouteColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := cbauo.mutation.BusIDs(); len(nodes) > 0 { + if nodes := cbauo.mutation.BusRouteIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2O, Inverse: true, - Table: childbusassociation.BusTable, - Columns: []string{childbusassociation.BusColumn}, + Table: childbusassociation.BusRouteTable, + Columns: []string{childbusassociation.BusRouteColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), }, } for _, k := range nodes { diff --git a/backend/domain/repository/ent/client.go b/backend/domain/repository/ent/client.go index 4b44fc08..e095b7a3 100644 --- a/backend/domain/repository/ent/client.go +++ b/backend/domain/repository/ent/client.go @@ -18,6 +18,8 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" @@ -35,6 +37,10 @@ type Client struct { BoardingRecord *BoardingRecordClient // Bus is the client for interacting with the Bus builders. Bus *BusClient + // BusRoute is the client for interacting with the BusRoute builders. + BusRoute *BusRouteClient + // BusRouteAssociation is the client for interacting with the BusRouteAssociation builders. + BusRouteAssociation *BusRouteAssociationClient // Child is the client for interacting with the Child builders. Child *ChildClient // ChildBusAssociation is the client for interacting with the ChildBusAssociation builders. @@ -60,6 +66,8 @@ func (c *Client) init() { c.Schema = migrate.NewSchema(c.driver) c.BoardingRecord = NewBoardingRecordClient(c.config) c.Bus = NewBusClient(c.config) + c.BusRoute = NewBusRouteClient(c.config) + c.BusRouteAssociation = NewBusRouteAssociationClient(c.config) c.Child = NewChildClient(c.config) c.ChildBusAssociation = NewChildBusAssociationClient(c.config) c.ChildPhoto = NewChildPhotoClient(c.config) @@ -160,6 +168,8 @@ func (c *Client) Tx(ctx context.Context) (*Tx, error) { config: cfg, BoardingRecord: NewBoardingRecordClient(cfg), Bus: NewBusClient(cfg), + BusRoute: NewBusRouteClient(cfg), + BusRouteAssociation: NewBusRouteAssociationClient(cfg), Child: NewChildClient(cfg), ChildBusAssociation: NewChildBusAssociationClient(cfg), ChildPhoto: NewChildPhotoClient(cfg), @@ -187,6 +197,8 @@ func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) config: cfg, BoardingRecord: NewBoardingRecordClient(cfg), Bus: NewBusClient(cfg), + BusRoute: NewBusRouteClient(cfg), + BusRouteAssociation: NewBusRouteAssociationClient(cfg), Child: NewChildClient(cfg), ChildBusAssociation: NewChildBusAssociationClient(cfg), ChildPhoto: NewChildPhotoClient(cfg), @@ -222,8 +234,8 @@ func (c *Client) Close() error { // In order to add hooks to a specific client, call: `client.Node.Use(...)`. func (c *Client) Use(hooks ...Hook) { for _, n := range []interface{ Use(...Hook) }{ - c.BoardingRecord, c.Bus, c.Child, c.ChildBusAssociation, c.ChildPhoto, - c.Guardian, c.Nursery, c.Station, + c.BoardingRecord, c.Bus, c.BusRoute, c.BusRouteAssociation, c.Child, + c.ChildBusAssociation, c.ChildPhoto, c.Guardian, c.Nursery, c.Station, } { n.Use(hooks...) } @@ -233,8 +245,8 @@ func (c *Client) Use(hooks ...Hook) { // In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`. func (c *Client) Intercept(interceptors ...Interceptor) { for _, n := range []interface{ Intercept(...Interceptor) }{ - c.BoardingRecord, c.Bus, c.Child, c.ChildBusAssociation, c.ChildPhoto, - c.Guardian, c.Nursery, c.Station, + c.BoardingRecord, c.Bus, c.BusRoute, c.BusRouteAssociation, c.Child, + c.ChildBusAssociation, c.ChildPhoto, c.Guardian, c.Nursery, c.Station, } { n.Intercept(interceptors...) } @@ -247,6 +259,10 @@ func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error) { return c.BoardingRecord.mutate(ctx, m) case *BusMutation: return c.Bus.mutate(ctx, m) + case *BusRouteMutation: + return c.BusRoute.mutate(ctx, m) + case *BusRouteAssociationMutation: + return c.BusRouteAssociation.mutate(ctx, m) case *ChildMutation: return c.Child.mutate(ctx, m) case *ChildBusAssociationMutation: @@ -553,15 +569,31 @@ func (c *BusClient) QueryNursery(b *Bus) *NurseryQuery { return query } -// QueryStations queries the stations edge of a Bus. -func (c *BusClient) QueryStations(b *Bus) *StationQuery { +// QueryBoardingRecords queries the boarding_records edge of a Bus. +func (c *BusClient) QueryBoardingRecords(b *Bus) *BoardingRecordQuery { + query := (&BoardingRecordClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.To(boardingrecord.Table, boardingrecord.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, bus.BoardingRecordsTable, bus.BoardingRecordsColumn), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryNextStation queries the next_station edge of a Bus. +func (c *BusClient) QueryNextStation(b *Bus) *StationQuery { query := (&StationClient{config: c.config}).Query() query.path = func(context.Context) (fromV *sql.Selector, _ error) { id := b.ID step := sqlgraph.NewStep( sqlgraph.From(bus.Table, bus.FieldID, id), sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2M, false, bus.StationsTable, bus.StationsPrimaryKey...), + sqlgraph.Edge(sqlgraph.M2O, false, bus.NextStationTable, bus.NextStationColumn), ) fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) return fromV, nil @@ -569,15 +601,15 @@ func (c *BusClient) QueryStations(b *Bus) *StationQuery { return query } -// QueryBoardingRecords queries the boarding_records edge of a Bus. -func (c *BusClient) QueryBoardingRecords(b *Bus) *BoardingRecordQuery { - query := (&BoardingRecordClient{config: c.config}).Query() +// QueryBusRoute queries the bus_route edge of a Bus. +func (c *BusClient) QueryBusRoute(b *Bus) *BusRouteQuery { + query := (&BusRouteClient{config: c.config}).Query() query.path = func(context.Context) (fromV *sql.Selector, _ error) { id := b.ID step := sqlgraph.NewStep( sqlgraph.From(bus.Table, bus.FieldID, id), - sqlgraph.To(boardingrecord.Table, boardingrecord.FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, bus.BoardingRecordsTable, bus.BoardingRecordsColumn), + sqlgraph.To(busroute.Table, busroute.FieldID), + sqlgraph.Edge(sqlgraph.M2M, true, bus.BusRouteTable, bus.BusRoutePrimaryKey...), ) fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) return fromV, nil @@ -585,92 +617,374 @@ func (c *BusClient) QueryBoardingRecords(b *Bus) *BoardingRecordQuery { return query } -// QueryChildBusAssociations queries the childBusAssociations edge of a Bus. -func (c *BusClient) QueryChildBusAssociations(b *Bus) *ChildBusAssociationQuery { +// Hooks returns the client hooks. +func (c *BusClient) Hooks() []Hook { + return c.hooks.Bus +} + +// Interceptors returns the client interceptors. +func (c *BusClient) Interceptors() []Interceptor { + return c.inters.Bus +} + +func (c *BusClient) mutate(ctx context.Context, m *BusMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&BusCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&BusUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&BusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&BusDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown Bus mutation op: %q", m.Op()) + } +} + +// BusRouteClient is a client for the BusRoute schema. +type BusRouteClient struct { + config +} + +// NewBusRouteClient returns a client for the BusRoute from the given config. +func NewBusRouteClient(c config) *BusRouteClient { + return &BusRouteClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `busroute.Hooks(f(g(h())))`. +func (c *BusRouteClient) Use(hooks ...Hook) { + c.hooks.BusRoute = append(c.hooks.BusRoute, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `busroute.Intercept(f(g(h())))`. +func (c *BusRouteClient) Intercept(interceptors ...Interceptor) { + c.inters.BusRoute = append(c.inters.BusRoute, interceptors...) +} + +// Create returns a builder for creating a BusRoute entity. +func (c *BusRouteClient) Create() *BusRouteCreate { + mutation := newBusRouteMutation(c.config, OpCreate) + return &BusRouteCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of BusRoute entities. +func (c *BusRouteClient) CreateBulk(builders ...*BusRouteCreate) *BusRouteCreateBulk { + return &BusRouteCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *BusRouteClient) MapCreateBulk(slice any, setFunc func(*BusRouteCreate, int)) *BusRouteCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &BusRouteCreateBulk{err: fmt.Errorf("calling to BusRouteClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*BusRouteCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &BusRouteCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for BusRoute. +func (c *BusRouteClient) Update() *BusRouteUpdate { + mutation := newBusRouteMutation(c.config, OpUpdate) + return &BusRouteUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *BusRouteClient) UpdateOne(br *BusRoute) *BusRouteUpdateOne { + mutation := newBusRouteMutation(c.config, OpUpdateOne, withBusRoute(br)) + return &BusRouteUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *BusRouteClient) UpdateOneID(id uuid.UUID) *BusRouteUpdateOne { + mutation := newBusRouteMutation(c.config, OpUpdateOne, withBusRouteID(id)) + return &BusRouteUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for BusRoute. +func (c *BusRouteClient) Delete() *BusRouteDelete { + mutation := newBusRouteMutation(c.config, OpDelete) + return &BusRouteDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *BusRouteClient) DeleteOne(br *BusRoute) *BusRouteDeleteOne { + return c.DeleteOneID(br.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *BusRouteClient) DeleteOneID(id uuid.UUID) *BusRouteDeleteOne { + builder := c.Delete().Where(busroute.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &BusRouteDeleteOne{builder} +} + +// Query returns a query builder for BusRoute. +func (c *BusRouteClient) Query() *BusRouteQuery { + return &BusRouteQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeBusRoute}, + inters: c.Interceptors(), + } +} + +// Get returns a BusRoute entity by its id. +func (c *BusRouteClient) Get(ctx context.Context, id uuid.UUID) (*BusRoute, error) { + return c.Query().Where(busroute.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *BusRouteClient) GetX(ctx context.Context, id uuid.UUID) *BusRoute { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryBus queries the bus edge of a BusRoute. +func (c *BusRouteClient) QueryBus(br *BusRoute) *BusQuery { + query := (&BusClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := br.ID + step := sqlgraph.NewStep( + sqlgraph.From(busroute.Table, busroute.FieldID, id), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.M2M, false, busroute.BusTable, busroute.BusPrimaryKey...), + ) + fromV = sqlgraph.Neighbors(br.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryChildBusAssociations queries the childBusAssociations edge of a BusRoute. +func (c *BusRouteClient) QueryChildBusAssociations(br *BusRoute) *ChildBusAssociationQuery { query := (&ChildBusAssociationClient{config: c.config}).Query() query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := b.ID + id := br.ID step := sqlgraph.NewStep( - sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.From(busroute.Table, busroute.FieldID, id), sqlgraph.To(childbusassociation.Table, childbusassociation.FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, bus.ChildBusAssociationsTable, bus.ChildBusAssociationsColumn), + sqlgraph.Edge(sqlgraph.O2M, false, busroute.ChildBusAssociationsTable, busroute.ChildBusAssociationsColumn), ) - fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + fromV = sqlgraph.Neighbors(br.driver.Dialect(), step) return fromV, nil } return query } -// QueryNextStation queries the next_station edge of a Bus. -func (c *BusClient) QueryNextStation(b *Bus) *StationQuery { - query := (&StationClient{config: c.config}).Query() +// QueryBusRouteAssociations queries the busRouteAssociations edge of a BusRoute. +func (c *BusRouteClient) QueryBusRouteAssociations(br *BusRoute) *BusRouteAssociationQuery { + query := (&BusRouteAssociationClient{config: c.config}).Query() query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := b.ID + id := br.ID step := sqlgraph.NewStep( - sqlgraph.From(bus.Table, bus.FieldID, id), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, bus.NextStationTable, bus.NextStationColumn), + sqlgraph.From(busroute.Table, busroute.FieldID, id), + sqlgraph.To(busrouteassociation.Table, busrouteassociation.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, busroute.BusRouteAssociationsTable, busroute.BusRouteAssociationsColumn), ) - fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + fromV = sqlgraph.Neighbors(br.driver.Dialect(), step) return fromV, nil } return query } -// QueryMorningFirstStation queries the morning_first_station edge of a Bus. -func (c *BusClient) QueryMorningFirstStation(b *Bus) *StationQuery { +// Hooks returns the client hooks. +func (c *BusRouteClient) Hooks() []Hook { + return c.hooks.BusRoute +} + +// Interceptors returns the client interceptors. +func (c *BusRouteClient) Interceptors() []Interceptor { + return c.inters.BusRoute +} + +func (c *BusRouteClient) mutate(ctx context.Context, m *BusRouteMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&BusRouteCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&BusRouteUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&BusRouteUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&BusRouteDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown BusRoute mutation op: %q", m.Op()) + } +} + +// BusRouteAssociationClient is a client for the BusRouteAssociation schema. +type BusRouteAssociationClient struct { + config +} + +// NewBusRouteAssociationClient returns a client for the BusRouteAssociation from the given config. +func NewBusRouteAssociationClient(c config) *BusRouteAssociationClient { + return &BusRouteAssociationClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `busrouteassociation.Hooks(f(g(h())))`. +func (c *BusRouteAssociationClient) Use(hooks ...Hook) { + c.hooks.BusRouteAssociation = append(c.hooks.BusRouteAssociation, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `busrouteassociation.Intercept(f(g(h())))`. +func (c *BusRouteAssociationClient) Intercept(interceptors ...Interceptor) { + c.inters.BusRouteAssociation = append(c.inters.BusRouteAssociation, interceptors...) +} + +// Create returns a builder for creating a BusRouteAssociation entity. +func (c *BusRouteAssociationClient) Create() *BusRouteAssociationCreate { + mutation := newBusRouteAssociationMutation(c.config, OpCreate) + return &BusRouteAssociationCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of BusRouteAssociation entities. +func (c *BusRouteAssociationClient) CreateBulk(builders ...*BusRouteAssociationCreate) *BusRouteAssociationCreateBulk { + return &BusRouteAssociationCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *BusRouteAssociationClient) MapCreateBulk(slice any, setFunc func(*BusRouteAssociationCreate, int)) *BusRouteAssociationCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &BusRouteAssociationCreateBulk{err: fmt.Errorf("calling to BusRouteAssociationClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*BusRouteAssociationCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &BusRouteAssociationCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for BusRouteAssociation. +func (c *BusRouteAssociationClient) Update() *BusRouteAssociationUpdate { + mutation := newBusRouteAssociationMutation(c.config, OpUpdate) + return &BusRouteAssociationUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *BusRouteAssociationClient) UpdateOne(bra *BusRouteAssociation) *BusRouteAssociationUpdateOne { + mutation := newBusRouteAssociationMutation(c.config, OpUpdateOne, withBusRouteAssociation(bra)) + return &BusRouteAssociationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *BusRouteAssociationClient) UpdateOneID(id int) *BusRouteAssociationUpdateOne { + mutation := newBusRouteAssociationMutation(c.config, OpUpdateOne, withBusRouteAssociationID(id)) + return &BusRouteAssociationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for BusRouteAssociation. +func (c *BusRouteAssociationClient) Delete() *BusRouteAssociationDelete { + mutation := newBusRouteAssociationMutation(c.config, OpDelete) + return &BusRouteAssociationDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *BusRouteAssociationClient) DeleteOne(bra *BusRouteAssociation) *BusRouteAssociationDeleteOne { + return c.DeleteOneID(bra.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *BusRouteAssociationClient) DeleteOneID(id int) *BusRouteAssociationDeleteOne { + builder := c.Delete().Where(busrouteassociation.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &BusRouteAssociationDeleteOne{builder} +} + +// Query returns a query builder for BusRouteAssociation. +func (c *BusRouteAssociationClient) Query() *BusRouteAssociationQuery { + return &BusRouteAssociationQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeBusRouteAssociation}, + inters: c.Interceptors(), + } +} + +// Get returns a BusRouteAssociation entity by its id. +func (c *BusRouteAssociationClient) Get(ctx context.Context, id int) (*BusRouteAssociation, error) { + return c.Query().Where(busrouteassociation.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *BusRouteAssociationClient) GetX(ctx context.Context, id int) *BusRouteAssociation { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryStation queries the station edge of a BusRouteAssociation. +func (c *BusRouteAssociationClient) QueryStation(bra *BusRouteAssociation) *StationQuery { query := (&StationClient{config: c.config}).Query() query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := b.ID + id := bra.ID step := sqlgraph.NewStep( - sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.From(busrouteassociation.Table, busrouteassociation.FieldID, id), sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, bus.MorningFirstStationTable, bus.MorningFirstStationColumn), + sqlgraph.Edge(sqlgraph.M2O, true, busrouteassociation.StationTable, busrouteassociation.StationColumn), ) - fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + fromV = sqlgraph.Neighbors(bra.driver.Dialect(), step) return fromV, nil } return query } -// QueryEveningFirstStation queries the evening_first_station edge of a Bus. -func (c *BusClient) QueryEveningFirstStation(b *Bus) *StationQuery { - query := (&StationClient{config: c.config}).Query() +// QueryBusRoute queries the busRoute edge of a BusRouteAssociation. +func (c *BusRouteAssociationClient) QueryBusRoute(bra *BusRouteAssociation) *BusRouteQuery { + query := (&BusRouteClient{config: c.config}).Query() query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := b.ID + id := bra.ID step := sqlgraph.NewStep( - sqlgraph.From(bus.Table, bus.FieldID, id), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, false, bus.EveningFirstStationTable, bus.EveningFirstStationColumn), + sqlgraph.From(busrouteassociation.Table, busrouteassociation.FieldID, id), + sqlgraph.To(busroute.Table, busroute.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, busrouteassociation.BusRouteTable, busrouteassociation.BusRouteColumn), ) - fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + fromV = sqlgraph.Neighbors(bra.driver.Dialect(), step) return fromV, nil } return query } // Hooks returns the client hooks. -func (c *BusClient) Hooks() []Hook { - return c.hooks.Bus +func (c *BusRouteAssociationClient) Hooks() []Hook { + return c.hooks.BusRouteAssociation } // Interceptors returns the client interceptors. -func (c *BusClient) Interceptors() []Interceptor { - return c.inters.Bus +func (c *BusRouteAssociationClient) Interceptors() []Interceptor { + return c.inters.BusRouteAssociation } -func (c *BusClient) mutate(ctx context.Context, m *BusMutation) (Value, error) { +func (c *BusRouteAssociationClient) mutate(ctx context.Context, m *BusRouteAssociationMutation) (Value, error) { switch m.Op() { case OpCreate: - return (&BusCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + return (&BusRouteAssociationCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) case OpUpdate: - return (&BusUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + return (&BusRouteAssociationUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) case OpUpdateOne: - return (&BusUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + return (&BusRouteAssociationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) case OpDelete, OpDeleteOne: - return (&BusDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + return (&BusRouteAssociationDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) default: - return nil, fmt.Errorf("ent: unknown Bus mutation op: %q", m.Op()) + return nil, fmt.Errorf("ent: unknown BusRouteAssociation mutation op: %q", m.Op()) } } @@ -995,15 +1309,15 @@ func (c *ChildBusAssociationClient) QueryChild(cba *ChildBusAssociation) *ChildQ return query } -// QueryBus queries the bus edge of a ChildBusAssociation. -func (c *ChildBusAssociationClient) QueryBus(cba *ChildBusAssociation) *BusQuery { - query := (&BusClient{config: c.config}).Query() +// QueryBusRoute queries the bus_route edge of a ChildBusAssociation. +func (c *ChildBusAssociationClient) QueryBusRoute(cba *ChildBusAssociation) *BusRouteQuery { + query := (&BusRouteClient{config: c.config}).Query() query.path = func(context.Context) (fromV *sql.Selector, _ error) { id := cba.ID step := sqlgraph.NewStep( sqlgraph.From(childbusassociation.Table, childbusassociation.FieldID, id), - sqlgraph.To(bus.Table, bus.FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, childbusassociation.BusTable, childbusassociation.BusColumn), + sqlgraph.To(busroute.Table, busroute.FieldID), + sqlgraph.Edge(sqlgraph.M2O, true, childbusassociation.BusRouteTable, childbusassociation.BusRouteColumn), ) fromV = sqlgraph.Neighbors(cba.driver.Dialect(), step) return fromV, nil @@ -1655,86 +1969,6 @@ func (c *StationClient) QueryGuardian(s *Station) *GuardianQuery { return query } -// QueryBus queries the bus edge of a Station. -func (c *StationClient) QueryBus(s *Station) *BusQuery { - query := (&BusClient{config: c.config}).Query() - query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := s.ID - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, id), - sqlgraph.To(bus.Table, bus.FieldID), - sqlgraph.Edge(sqlgraph.M2M, true, station.BusTable, station.BusPrimaryKey...), - ) - fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) - return fromV, nil - } - return query -} - -// QueryMorningPreviousStation queries the morning_previous_station edge of a Station. -func (c *StationClient) QueryMorningPreviousStation(s *Station) *StationQuery { - query := (&StationClient{config: c.config}).Query() - query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := s.ID - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, id), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, station.MorningPreviousStationTable, station.MorningPreviousStationColumn), - ) - fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) - return fromV, nil - } - return query -} - -// QueryMorningNextStation queries the morning_next_station edge of a Station. -func (c *StationClient) QueryMorningNextStation(s *Station) *StationQuery { - query := (&StationClient{config: c.config}).Query() - query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := s.ID - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, id), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, station.MorningNextStationTable, station.MorningNextStationColumn), - ) - fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) - return fromV, nil - } - return query -} - -// QueryEveningPreviousStation queries the evening_previous_station edge of a Station. -func (c *StationClient) QueryEveningPreviousStation(s *Station) *StationQuery { - query := (&StationClient{config: c.config}).Query() - query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := s.ID - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, id), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, station.EveningPreviousStationTable, station.EveningPreviousStationColumn), - ) - fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) - return fromV, nil - } - return query -} - -// QueryEveningNextStation queries the evening_next_station edge of a Station. -func (c *StationClient) QueryEveningNextStation(s *Station) *StationQuery { - query := (&StationClient{config: c.config}).Query() - query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := s.ID - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, id), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, station.EveningNextStationTable, station.EveningNextStationColumn), - ) - fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) - return fromV, nil - } - return query -} - // QueryNextForBuses queries the next_for_buses edge of a Station. func (c *StationClient) QueryNextForBuses(s *Station) *BusQuery { query := (&BusClient{config: c.config}).Query() @@ -1751,31 +1985,15 @@ func (c *StationClient) QueryNextForBuses(s *Station) *BusQuery { return query } -// QueryMorningFirstForBuses queries the morning_first_for_buses edge of a Station. -func (c *StationClient) QueryMorningFirstForBuses(s *Station) *BusQuery { - query := (&BusClient{config: c.config}).Query() +// QueryBusRouteAssociations queries the busRouteAssociations edge of a Station. +func (c *StationClient) QueryBusRouteAssociations(s *Station) *BusRouteAssociationQuery { + query := (&BusRouteAssociationClient{config: c.config}).Query() query.path = func(context.Context) (fromV *sql.Selector, _ error) { id := s.ID step := sqlgraph.NewStep( sqlgraph.From(station.Table, station.FieldID, id), - sqlgraph.To(bus.Table, bus.FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, station.MorningFirstForBusesTable, station.MorningFirstForBusesColumn), - ) - fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) - return fromV, nil - } - return query -} - -// QueryEveningFirstForBuses queries the evening_first_for_buses edge of a Station. -func (c *StationClient) QueryEveningFirstForBuses(s *Station) *BusQuery { - query := (&BusClient{config: c.config}).Query() - query.path = func(context.Context) (fromV *sql.Selector, _ error) { - id := s.ID - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, id), - sqlgraph.To(bus.Table, bus.FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, station.EveningFirstForBusesTable, station.EveningFirstForBusesColumn), + sqlgraph.To(busrouteassociation.Table, busrouteassociation.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, station.BusRouteAssociationsTable, station.BusRouteAssociationsColumn), ) fromV = sqlgraph.Neighbors(s.driver.Dialect(), step) return fromV, nil @@ -1811,11 +2029,11 @@ func (c *StationClient) mutate(ctx context.Context, m *StationMutation) (Value, // hooks and interceptors per client, for fast access. type ( hooks struct { - BoardingRecord, Bus, Child, ChildBusAssociation, ChildPhoto, Guardian, Nursery, - Station []ent.Hook + BoardingRecord, Bus, BusRoute, BusRouteAssociation, Child, ChildBusAssociation, + ChildPhoto, Guardian, Nursery, Station []ent.Hook } inters struct { - BoardingRecord, Bus, Child, ChildBusAssociation, ChildPhoto, Guardian, Nursery, - Station []ent.Interceptor + BoardingRecord, Bus, BusRoute, BusRouteAssociation, Child, ChildBusAssociation, + ChildPhoto, Guardian, Nursery, Station []ent.Interceptor } ) diff --git a/backend/domain/repository/ent/ent.go b/backend/domain/repository/ent/ent.go index 333641cc..1145e6c8 100644 --- a/backend/domain/repository/ent/ent.go +++ b/backend/domain/repository/ent/ent.go @@ -14,6 +14,8 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" @@ -82,6 +84,8 @@ func checkColumn(table, column string) error { columnCheck = sql.NewColumnCheck(map[string]func(string) bool{ boardingrecord.Table: boardingrecord.ValidColumn, bus.Table: bus.ValidColumn, + busroute.Table: busroute.ValidColumn, + busrouteassociation.Table: busrouteassociation.ValidColumn, child.Table: child.ValidColumn, childbusassociation.Table: childbusassociation.ValidColumn, childphoto.Table: childphoto.ValidColumn, diff --git a/backend/domain/repository/ent/hook/hook.go b/backend/domain/repository/ent/hook/hook.go index 94b96d72..a1ac0b57 100644 --- a/backend/domain/repository/ent/hook/hook.go +++ b/backend/domain/repository/ent/hook/hook.go @@ -33,6 +33,30 @@ func (f BusFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.BusMutation", m) } +// The BusRouteFunc type is an adapter to allow the use of ordinary +// function as BusRoute mutator. +type BusRouteFunc func(context.Context, *ent.BusRouteMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f BusRouteFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.BusRouteMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.BusRouteMutation", m) +} + +// The BusRouteAssociationFunc type is an adapter to allow the use of ordinary +// function as BusRouteAssociation mutator. +type BusRouteAssociationFunc func(context.Context, *ent.BusRouteAssociationMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f BusRouteAssociationFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.BusRouteAssociationMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.BusRouteAssociationMutation", m) +} + // The ChildFunc type is an adapter to allow the use of ordinary // function as Child mutator. type ChildFunc func(context.Context, *ent.ChildMutation) (ent.Value, error) diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index 7f1a17da..e91c8cd2 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -49,8 +49,6 @@ var ( {Name: "updated_at", Type: field.TypeTime}, {Name: "bus_nursery", Type: field.TypeUUID, Nullable: true}, {Name: "bus_next_station", Type: field.TypeUUID, Nullable: true}, - {Name: "bus_morning_first_station", Type: field.TypeUUID, Nullable: true}, - {Name: "bus_evening_first_station", Type: field.TypeUUID, Nullable: true}, } // BusTable holds the schema information for the "bus" table. BusTable = &schema.Table{ @@ -70,17 +68,43 @@ var ( RefColumns: []*schema.Column{StationsColumns[0]}, OnDelete: schema.SetNull, }, + }, + } + // BusRoutesColumns holds the columns for the "bus_routes" table. + BusRoutesColumns = []*schema.Column{ + {Name: "id", Type: field.TypeUUID, Unique: true}, + {Name: "bus_type", Type: field.TypeEnum, Enums: []string{"morning", "evening"}}, + } + // BusRoutesTable holds the schema information for the "bus_routes" table. + BusRoutesTable = &schema.Table{ + Name: "bus_routes", + Columns: BusRoutesColumns, + PrimaryKey: []*schema.Column{BusRoutesColumns[0]}, + } + // BusRouteAssociationsColumns holds the columns for the "bus_route_associations" table. + BusRouteAssociationsColumns = []*schema.Column{ + {Name: "id", Type: field.TypeInt, Increment: true}, + {Name: "order", Type: field.TypeInt32}, + {Name: "bus_route_id", Type: field.TypeUUID}, + {Name: "station_id", Type: field.TypeUUID}, + } + // BusRouteAssociationsTable holds the schema information for the "bus_route_associations" table. + BusRouteAssociationsTable = &schema.Table{ + Name: "bus_route_associations", + Columns: BusRouteAssociationsColumns, + PrimaryKey: []*schema.Column{BusRouteAssociationsColumns[0]}, + ForeignKeys: []*schema.ForeignKey{ { - Symbol: "bus_stations_morning_first_station", - Columns: []*schema.Column{BusColumns[11]}, - RefColumns: []*schema.Column{StationsColumns[0]}, - OnDelete: schema.SetNull, + Symbol: "bus_route_associations_bus_routes_busRouteAssociations", + Columns: []*schema.Column{BusRouteAssociationsColumns[2]}, + RefColumns: []*schema.Column{BusRoutesColumns[0]}, + OnDelete: schema.NoAction, }, { - Symbol: "bus_stations_evening_first_station", - Columns: []*schema.Column{BusColumns[12]}, + Symbol: "bus_route_associations_stations_busRouteAssociations", + Columns: []*schema.Column{BusRouteAssociationsColumns[3]}, RefColumns: []*schema.Column{StationsColumns[0]}, - OnDelete: schema.SetNull, + OnDelete: schema.NoAction, }, }, } @@ -117,8 +141,7 @@ var ( // ChildBusAssociationsColumns holds the columns for the "child_bus_associations" table. ChildBusAssociationsColumns = []*schema.Column{ {Name: "id", Type: field.TypeInt, Increment: true}, - {Name: "bus_type", Type: field.TypeEnum, Enums: []string{"morning", "evening"}}, - {Name: "bus_id", Type: field.TypeUUID}, + {Name: "bus_route_id", Type: field.TypeUUID}, {Name: "child_id", Type: field.TypeUUID}, } // ChildBusAssociationsTable holds the schema information for the "child_bus_associations" table. @@ -128,14 +151,14 @@ var ( PrimaryKey: []*schema.Column{ChildBusAssociationsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { - Symbol: "child_bus_associations_bus_childBusAssociations", - Columns: []*schema.Column{ChildBusAssociationsColumns[2]}, - RefColumns: []*schema.Column{BusColumns[0]}, + Symbol: "child_bus_associations_bus_routes_childBusAssociations", + Columns: []*schema.Column{ChildBusAssociationsColumns[1]}, + RefColumns: []*schema.Column{BusRoutesColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "child_bus_associations_childs_childBusAssociations", - Columns: []*schema.Column{ChildBusAssociationsColumns[3]}, + Columns: []*schema.Column{ChildBusAssociationsColumns[2]}, RefColumns: []*schema.Column{ChildsColumns[0]}, OnDelete: schema.NoAction, }, @@ -215,8 +238,6 @@ var ( {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, {Name: "guardian_station", Type: field.TypeUUID, Unique: true, Nullable: true}, - {Name: "station_morning_next_station", Type: field.TypeUUID, Nullable: true}, - {Name: "station_evening_next_station", Type: field.TypeUUID, Nullable: true}, } // StationsTable holds the schema information for the "stations" table. StationsTable = &schema.Table{ @@ -230,41 +251,29 @@ var ( RefColumns: []*schema.Column{GuardiansColumns[0]}, OnDelete: schema.SetNull, }, - { - Symbol: "stations_stations_morning_next_station", - Columns: []*schema.Column{StationsColumns[6]}, - RefColumns: []*schema.Column{StationsColumns[0]}, - OnDelete: schema.SetNull, - }, - { - Symbol: "stations_stations_evening_next_station", - Columns: []*schema.Column{StationsColumns[7]}, - RefColumns: []*schema.Column{StationsColumns[0]}, - OnDelete: schema.SetNull, - }, }, } - // BusStationsColumns holds the columns for the "bus_stations" table. - BusStationsColumns = []*schema.Column{ + // BusRouteBusColumns holds the columns for the "bus_route_bus" table. + BusRouteBusColumns = []*schema.Column{ + {Name: "bus_route_id", Type: field.TypeUUID}, {Name: "bus_id", Type: field.TypeUUID}, - {Name: "station_id", Type: field.TypeUUID}, } - // BusStationsTable holds the schema information for the "bus_stations" table. - BusStationsTable = &schema.Table{ - Name: "bus_stations", - Columns: BusStationsColumns, - PrimaryKey: []*schema.Column{BusStationsColumns[0], BusStationsColumns[1]}, + // BusRouteBusTable holds the schema information for the "bus_route_bus" table. + BusRouteBusTable = &schema.Table{ + Name: "bus_route_bus", + Columns: BusRouteBusColumns, + PrimaryKey: []*schema.Column{BusRouteBusColumns[0], BusRouteBusColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { - Symbol: "bus_stations_bus_id", - Columns: []*schema.Column{BusStationsColumns[0]}, - RefColumns: []*schema.Column{BusColumns[0]}, + Symbol: "bus_route_bus_bus_route_id", + Columns: []*schema.Column{BusRouteBusColumns[0]}, + RefColumns: []*schema.Column{BusRoutesColumns[0]}, OnDelete: schema.Cascade, }, { - Symbol: "bus_stations_station_id", - Columns: []*schema.Column{BusStationsColumns[1]}, - RefColumns: []*schema.Column{StationsColumns[0]}, + Symbol: "bus_route_bus_bus_id", + Columns: []*schema.Column{BusRouteBusColumns[1]}, + RefColumns: []*schema.Column{BusColumns[0]}, OnDelete: schema.Cascade, }, }, @@ -273,13 +282,15 @@ var ( Tables = []*schema.Table{ BoardingRecordsTable, BusTable, + BusRoutesTable, + BusRouteAssociationsTable, ChildsTable, ChildBusAssociationsTable, ChildPhotosTable, GuardiansTable, NurseriesTable, StationsTable, - BusStationsTable, + BusRouteBusTable, } ) @@ -288,16 +299,14 @@ func init() { BoardingRecordsTable.ForeignKeys[1].RefTable = ChildsTable BusTable.ForeignKeys[0].RefTable = NurseriesTable BusTable.ForeignKeys[1].RefTable = StationsTable - BusTable.ForeignKeys[2].RefTable = StationsTable - BusTable.ForeignKeys[3].RefTable = StationsTable + BusRouteAssociationsTable.ForeignKeys[0].RefTable = BusRoutesTable + BusRouteAssociationsTable.ForeignKeys[1].RefTable = StationsTable ChildsTable.ForeignKeys[0].RefTable = GuardiansTable - ChildBusAssociationsTable.ForeignKeys[0].RefTable = BusTable + ChildBusAssociationsTable.ForeignKeys[0].RefTable = BusRoutesTable ChildBusAssociationsTable.ForeignKeys[1].RefTable = ChildsTable ChildPhotosTable.ForeignKeys[0].RefTable = ChildsTable GuardiansTable.ForeignKeys[0].RefTable = NurseriesTable StationsTable.ForeignKeys[0].RefTable = GuardiansTable - StationsTable.ForeignKeys[1].RefTable = StationsTable - StationsTable.ForeignKeys[2].RefTable = StationsTable - BusStationsTable.ForeignKeys[0].RefTable = BusTable - BusStationsTable.ForeignKeys[1].RefTable = StationsTable + BusRouteBusTable.ForeignKeys[0].RefTable = BusRoutesTable + BusRouteBusTable.ForeignKeys[1].RefTable = BusTable } diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index 84fa0f38..9ad54dfa 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -13,6 +13,8 @@ import ( "entgo.io/ent/dialect/sql" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" @@ -34,6 +36,8 @@ const ( // Node types. TypeBoardingRecord = "BoardingRecord" TypeBus = "Bus" + TypeBusRoute = "BusRoute" + TypeBusRouteAssociation = "BusRouteAssociation" TypeChild = "Child" TypeChildBusAssociation = "ChildBusAssociation" TypeChildPhoto = "ChildPhoto" @@ -557,40 +561,33 @@ func (m *BoardingRecordMutation) ResetEdge(name string) error { // BusMutation represents an operation that mutates the Bus nodes in the graph. type BusMutation struct { config - op Op - typ string - id *uuid.UUID - name *string - plate_number *string - latitude *float64 - addlatitude *float64 - longitude *float64 - addlongitude *float64 - status *bus.Status - enable_face_recognition *bool - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - nursery *uuid.UUID - clearednursery bool - stations map[uuid.UUID]struct{} - removedstations map[uuid.UUID]struct{} - clearedstations bool - boarding_records map[uuid.UUID]struct{} - removedboarding_records map[uuid.UUID]struct{} - clearedboarding_records bool - childBusAssociations map[int]struct{} - removedchildBusAssociations map[int]struct{} - clearedchildBusAssociations bool - next_station *uuid.UUID - clearednext_station bool - morning_first_station *uuid.UUID - clearedmorning_first_station bool - evening_first_station *uuid.UUID - clearedevening_first_station bool - done bool - oldValue func(context.Context) (*Bus, error) - predicates []predicate.Bus + op Op + typ string + id *uuid.UUID + name *string + plate_number *string + latitude *float64 + addlatitude *float64 + longitude *float64 + addlongitude *float64 + status *bus.Status + enable_face_recognition *bool + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + nursery *uuid.UUID + clearednursery bool + boarding_records map[uuid.UUID]struct{} + removedboarding_records map[uuid.UUID]struct{} + clearedboarding_records bool + next_station *uuid.UUID + clearednext_station bool + bus_route map[uuid.UUID]struct{} + removedbus_route map[uuid.UUID]struct{} + clearedbus_route bool + done bool + oldValue func(context.Context) (*Bus, error) + predicates []predicate.Bus } var _ ent.Mutation = (*BusMutation)(nil) @@ -1105,60 +1102,6 @@ func (m *BusMutation) ResetNursery() { m.clearednursery = false } -// AddStationIDs adds the "stations" edge to the Station entity by ids. -func (m *BusMutation) AddStationIDs(ids ...uuid.UUID) { - if m.stations == nil { - m.stations = make(map[uuid.UUID]struct{}) - } - for i := range ids { - m.stations[ids[i]] = struct{}{} - } -} - -// ClearStations clears the "stations" edge to the Station entity. -func (m *BusMutation) ClearStations() { - m.clearedstations = true -} - -// StationsCleared reports if the "stations" edge to the Station entity was cleared. -func (m *BusMutation) StationsCleared() bool { - return m.clearedstations -} - -// RemoveStationIDs removes the "stations" edge to the Station entity by IDs. -func (m *BusMutation) RemoveStationIDs(ids ...uuid.UUID) { - if m.removedstations == nil { - m.removedstations = make(map[uuid.UUID]struct{}) - } - for i := range ids { - delete(m.stations, ids[i]) - m.removedstations[ids[i]] = struct{}{} - } -} - -// RemovedStations returns the removed IDs of the "stations" edge to the Station entity. -func (m *BusMutation) RemovedStationsIDs() (ids []uuid.UUID) { - for id := range m.removedstations { - ids = append(ids, id) - } - return -} - -// StationsIDs returns the "stations" edge IDs in the mutation. -func (m *BusMutation) StationsIDs() (ids []uuid.UUID) { - for id := range m.stations { - ids = append(ids, id) - } - return -} - -// ResetStations resets all changes to the "stations" edge. -func (m *BusMutation) ResetStations() { - m.stations = nil - m.clearedstations = false - m.removedstations = nil -} - // AddBoardingRecordIDs adds the "boarding_records" edge to the BoardingRecord entity by ids. func (m *BusMutation) AddBoardingRecordIDs(ids ...uuid.UUID) { if m.boarding_records == nil { @@ -1213,60 +1156,6 @@ func (m *BusMutation) ResetBoardingRecords() { m.removedboarding_records = nil } -// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by ids. -func (m *BusMutation) AddChildBusAssociationIDs(ids ...int) { - if m.childBusAssociations == nil { - m.childBusAssociations = make(map[int]struct{}) - } - for i := range ids { - m.childBusAssociations[ids[i]] = struct{}{} - } -} - -// ClearChildBusAssociations clears the "childBusAssociations" edge to the ChildBusAssociation entity. -func (m *BusMutation) ClearChildBusAssociations() { - m.clearedchildBusAssociations = true -} - -// ChildBusAssociationsCleared reports if the "childBusAssociations" edge to the ChildBusAssociation entity was cleared. -func (m *BusMutation) ChildBusAssociationsCleared() bool { - return m.clearedchildBusAssociations -} - -// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. -func (m *BusMutation) RemoveChildBusAssociationIDs(ids ...int) { - if m.removedchildBusAssociations == nil { - m.removedchildBusAssociations = make(map[int]struct{}) - } - for i := range ids { - delete(m.childBusAssociations, ids[i]) - m.removedchildBusAssociations[ids[i]] = struct{}{} - } -} - -// RemovedChildBusAssociations returns the removed IDs of the "childBusAssociations" edge to the ChildBusAssociation entity. -func (m *BusMutation) RemovedChildBusAssociationsIDs() (ids []int) { - for id := range m.removedchildBusAssociations { - ids = append(ids, id) - } - return -} - -// ChildBusAssociationsIDs returns the "childBusAssociations" edge IDs in the mutation. -func (m *BusMutation) ChildBusAssociationsIDs() (ids []int) { - for id := range m.childBusAssociations { - ids = append(ids, id) - } - return -} - -// ResetChildBusAssociations resets all changes to the "childBusAssociations" edge. -func (m *BusMutation) ResetChildBusAssociations() { - m.childBusAssociations = nil - m.clearedchildBusAssociations = false - m.removedchildBusAssociations = nil -} - // SetNextStationID sets the "next_station" edge to the Station entity by id. func (m *BusMutation) SetNextStationID(id uuid.UUID) { m.next_station = &id @@ -1306,82 +1195,58 @@ func (m *BusMutation) ResetNextStation() { m.clearednext_station = false } -// SetMorningFirstStationID sets the "morning_first_station" edge to the Station entity by id. -func (m *BusMutation) SetMorningFirstStationID(id uuid.UUID) { - m.morning_first_station = &id -} - -// ClearMorningFirstStation clears the "morning_first_station" edge to the Station entity. -func (m *BusMutation) ClearMorningFirstStation() { - m.clearedmorning_first_station = true -} - -// MorningFirstStationCleared reports if the "morning_first_station" edge to the Station entity was cleared. -func (m *BusMutation) MorningFirstStationCleared() bool { - return m.clearedmorning_first_station -} - -// MorningFirstStationID returns the "morning_first_station" edge ID in the mutation. -func (m *BusMutation) MorningFirstStationID() (id uuid.UUID, exists bool) { - if m.morning_first_station != nil { - return *m.morning_first_station, true +// AddBusRouteIDs adds the "bus_route" edge to the BusRoute entity by ids. +func (m *BusMutation) AddBusRouteIDs(ids ...uuid.UUID) { + if m.bus_route == nil { + m.bus_route = make(map[uuid.UUID]struct{}) } - return -} - -// MorningFirstStationIDs returns the "morning_first_station" edge IDs in the mutation. -// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use -// MorningFirstStationID instead. It exists only for internal usage by the builders. -func (m *BusMutation) MorningFirstStationIDs() (ids []uuid.UUID) { - if id := m.morning_first_station; id != nil { - ids = append(ids, *id) + for i := range ids { + m.bus_route[ids[i]] = struct{}{} } - return -} - -// ResetMorningFirstStation resets all changes to the "morning_first_station" edge. -func (m *BusMutation) ResetMorningFirstStation() { - m.morning_first_station = nil - m.clearedmorning_first_station = false } -// SetEveningFirstStationID sets the "evening_first_station" edge to the Station entity by id. -func (m *BusMutation) SetEveningFirstStationID(id uuid.UUID) { - m.evening_first_station = &id +// ClearBusRoute clears the "bus_route" edge to the BusRoute entity. +func (m *BusMutation) ClearBusRoute() { + m.clearedbus_route = true } -// ClearEveningFirstStation clears the "evening_first_station" edge to the Station entity. -func (m *BusMutation) ClearEveningFirstStation() { - m.clearedevening_first_station = true +// BusRouteCleared reports if the "bus_route" edge to the BusRoute entity was cleared. +func (m *BusMutation) BusRouteCleared() bool { + return m.clearedbus_route } -// EveningFirstStationCleared reports if the "evening_first_station" edge to the Station entity was cleared. -func (m *BusMutation) EveningFirstStationCleared() bool { - return m.clearedevening_first_station +// RemoveBusRouteIDs removes the "bus_route" edge to the BusRoute entity by IDs. +func (m *BusMutation) RemoveBusRouteIDs(ids ...uuid.UUID) { + if m.removedbus_route == nil { + m.removedbus_route = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.bus_route, ids[i]) + m.removedbus_route[ids[i]] = struct{}{} + } } -// EveningFirstStationID returns the "evening_first_station" edge ID in the mutation. -func (m *BusMutation) EveningFirstStationID() (id uuid.UUID, exists bool) { - if m.evening_first_station != nil { - return *m.evening_first_station, true +// RemovedBusRoute returns the removed IDs of the "bus_route" edge to the BusRoute entity. +func (m *BusMutation) RemovedBusRouteIDs() (ids []uuid.UUID) { + for id := range m.removedbus_route { + ids = append(ids, id) } return } -// EveningFirstStationIDs returns the "evening_first_station" edge IDs in the mutation. -// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use -// EveningFirstStationID instead. It exists only for internal usage by the builders. -func (m *BusMutation) EveningFirstStationIDs() (ids []uuid.UUID) { - if id := m.evening_first_station; id != nil { - ids = append(ids, *id) +// BusRouteIDs returns the "bus_route" edge IDs in the mutation. +func (m *BusMutation) BusRouteIDs() (ids []uuid.UUID) { + for id := range m.bus_route { + ids = append(ids, id) } return } -// ResetEveningFirstStation resets all changes to the "evening_first_station" edge. -func (m *BusMutation) ResetEveningFirstStation() { - m.evening_first_station = nil - m.clearedevening_first_station = false +// ResetBusRoute resets all changes to the "bus_route" edge. +func (m *BusMutation) ResetBusRoute() { + m.bus_route = nil + m.clearedbus_route = false + m.removedbus_route = nil } // Where appends a list predicates to the BusMutation builder. @@ -1541,35 +1406,1295 @@ func (m *BusMutation) SetField(name string, value ent.Value) error { if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetEnableFaceRecognition(v) + m.SetEnableFaceRecognition(v) + return nil + case bus.FieldCreatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetCreatedAt(v) + return nil + case bus.FieldUpdatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetUpdatedAt(v) + return nil + } + return fmt.Errorf("unknown Bus field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *BusMutation) AddedFields() []string { + var fields []string + if m.addlatitude != nil { + fields = append(fields, bus.FieldLatitude) + } + if m.addlongitude != nil { + fields = append(fields, bus.FieldLongitude) + } + return fields +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *BusMutation) AddedField(name string) (ent.Value, bool) { + switch name { + case bus.FieldLatitude: + return m.AddedLatitude() + case bus.FieldLongitude: + return m.AddedLongitude() + } + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *BusMutation) AddField(name string, value ent.Value) error { + switch name { + case bus.FieldLatitude: + v, ok := value.(float64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddLatitude(v) + return nil + case bus.FieldLongitude: + v, ok := value.(float64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddLongitude(v) + return nil + } + return fmt.Errorf("unknown Bus numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *BusMutation) ClearedFields() []string { + var fields []string + if m.FieldCleared(bus.FieldPlateNumber) { + fields = append(fields, bus.FieldPlateNumber) + } + if m.FieldCleared(bus.FieldLatitude) { + fields = append(fields, bus.FieldLatitude) + } + if m.FieldCleared(bus.FieldLongitude) { + fields = append(fields, bus.FieldLongitude) + } + return fields +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *BusMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *BusMutation) ClearField(name string) error { + switch name { + case bus.FieldPlateNumber: + m.ClearPlateNumber() + return nil + case bus.FieldLatitude: + m.ClearLatitude() + return nil + case bus.FieldLongitude: + m.ClearLongitude() + return nil + } + return fmt.Errorf("unknown Bus nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *BusMutation) ResetField(name string) error { + switch name { + case bus.FieldName: + m.ResetName() + return nil + case bus.FieldPlateNumber: + m.ResetPlateNumber() + return nil + case bus.FieldLatitude: + m.ResetLatitude() + return nil + case bus.FieldLongitude: + m.ResetLongitude() + return nil + case bus.FieldStatus: + m.ResetStatus() + return nil + case bus.FieldEnableFaceRecognition: + m.ResetEnableFaceRecognition() + return nil + case bus.FieldCreatedAt: + m.ResetCreatedAt() + return nil + case bus.FieldUpdatedAt: + m.ResetUpdatedAt() + return nil + } + return fmt.Errorf("unknown Bus field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *BusMutation) AddedEdges() []string { + edges := make([]string, 0, 4) + if m.nursery != nil { + edges = append(edges, bus.EdgeNursery) + } + if m.boarding_records != nil { + edges = append(edges, bus.EdgeBoardingRecords) + } + if m.next_station != nil { + edges = append(edges, bus.EdgeNextStation) + } + if m.bus_route != nil { + edges = append(edges, bus.EdgeBusRoute) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *BusMutation) AddedIDs(name string) []ent.Value { + switch name { + case bus.EdgeNursery: + if id := m.nursery; id != nil { + return []ent.Value{*id} + } + case bus.EdgeBoardingRecords: + ids := make([]ent.Value, 0, len(m.boarding_records)) + for id := range m.boarding_records { + ids = append(ids, id) + } + return ids + case bus.EdgeNextStation: + if id := m.next_station; id != nil { + return []ent.Value{*id} + } + case bus.EdgeBusRoute: + ids := make([]ent.Value, 0, len(m.bus_route)) + for id := range m.bus_route { + ids = append(ids, id) + } + return ids + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *BusMutation) RemovedEdges() []string { + edges := make([]string, 0, 4) + if m.removedboarding_records != nil { + edges = append(edges, bus.EdgeBoardingRecords) + } + if m.removedbus_route != nil { + edges = append(edges, bus.EdgeBusRoute) + } + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *BusMutation) RemovedIDs(name string) []ent.Value { + switch name { + case bus.EdgeBoardingRecords: + ids := make([]ent.Value, 0, len(m.removedboarding_records)) + for id := range m.removedboarding_records { + ids = append(ids, id) + } + return ids + case bus.EdgeBusRoute: + ids := make([]ent.Value, 0, len(m.removedbus_route)) + for id := range m.removedbus_route { + ids = append(ids, id) + } + return ids + } + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *BusMutation) ClearedEdges() []string { + edges := make([]string, 0, 4) + if m.clearednursery { + edges = append(edges, bus.EdgeNursery) + } + if m.clearedboarding_records { + edges = append(edges, bus.EdgeBoardingRecords) + } + if m.clearednext_station { + edges = append(edges, bus.EdgeNextStation) + } + if m.clearedbus_route { + edges = append(edges, bus.EdgeBusRoute) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *BusMutation) EdgeCleared(name string) bool { + switch name { + case bus.EdgeNursery: + return m.clearednursery + case bus.EdgeBoardingRecords: + return m.clearedboarding_records + case bus.EdgeNextStation: + return m.clearednext_station + case bus.EdgeBusRoute: + return m.clearedbus_route + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *BusMutation) ClearEdge(name string) error { + switch name { + case bus.EdgeNursery: + m.ClearNursery() + return nil + case bus.EdgeNextStation: + m.ClearNextStation() + return nil + } + return fmt.Errorf("unknown Bus unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *BusMutation) ResetEdge(name string) error { + switch name { + case bus.EdgeNursery: + m.ResetNursery() + return nil + case bus.EdgeBoardingRecords: + m.ResetBoardingRecords() + return nil + case bus.EdgeNextStation: + m.ResetNextStation() + return nil + case bus.EdgeBusRoute: + m.ResetBusRoute() + return nil + } + return fmt.Errorf("unknown Bus edge %s", name) +} + +// BusRouteMutation represents an operation that mutates the BusRoute nodes in the graph. +type BusRouteMutation struct { + config + op Op + typ string + id *uuid.UUID + bus_type *busroute.BusType + clearedFields map[string]struct{} + bus map[uuid.UUID]struct{} + removedbus map[uuid.UUID]struct{} + clearedbus bool + childBusAssociations map[int]struct{} + removedchildBusAssociations map[int]struct{} + clearedchildBusAssociations bool + busRouteAssociations map[int]struct{} + removedbusRouteAssociations map[int]struct{} + clearedbusRouteAssociations bool + done bool + oldValue func(context.Context) (*BusRoute, error) + predicates []predicate.BusRoute +} + +var _ ent.Mutation = (*BusRouteMutation)(nil) + +// busrouteOption allows management of the mutation configuration using functional options. +type busrouteOption func(*BusRouteMutation) + +// newBusRouteMutation creates new mutation for the BusRoute entity. +func newBusRouteMutation(c config, op Op, opts ...busrouteOption) *BusRouteMutation { + m := &BusRouteMutation{ + config: c, + op: op, + typ: TypeBusRoute, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withBusRouteID sets the ID field of the mutation. +func withBusRouteID(id uuid.UUID) busrouteOption { + return func(m *BusRouteMutation) { + var ( + err error + once sync.Once + value *BusRoute + ) + m.oldValue = func(ctx context.Context) (*BusRoute, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().BusRoute.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withBusRoute sets the old BusRoute of the mutation. +func withBusRoute(node *BusRoute) busrouteOption { + return func(m *BusRouteMutation) { + m.oldValue = func(context.Context) (*BusRoute, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m BusRouteMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m BusRouteMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// SetID sets the value of the id field. Note that this +// operation is only accepted on creation of BusRoute entities. +func (m *BusRouteMutation) SetID(id uuid.UUID) { + m.id = &id +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *BusRouteMutation) ID() (id uuid.UUID, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *BusRouteMutation) IDs(ctx context.Context) ([]uuid.UUID, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []uuid.UUID{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().BusRoute.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetBusType sets the "bus_type" field. +func (m *BusRouteMutation) SetBusType(bt busroute.BusType) { + m.bus_type = &bt +} + +// BusType returns the value of the "bus_type" field in the mutation. +func (m *BusRouteMutation) BusType() (r busroute.BusType, exists bool) { + v := m.bus_type + if v == nil { + return + } + return *v, true +} + +// OldBusType returns the old "bus_type" field's value of the BusRoute entity. +// If the BusRoute object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusRouteMutation) OldBusType(ctx context.Context) (v busroute.BusType, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldBusType is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldBusType requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldBusType: %w", err) + } + return oldValue.BusType, nil +} + +// ResetBusType resets all changes to the "bus_type" field. +func (m *BusRouteMutation) ResetBusType() { + m.bus_type = nil +} + +// AddBuIDs adds the "bus" edge to the Bus entity by ids. +func (m *BusRouteMutation) AddBuIDs(ids ...uuid.UUID) { + if m.bus == nil { + m.bus = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.bus[ids[i]] = struct{}{} + } +} + +// ClearBus clears the "bus" edge to the Bus entity. +func (m *BusRouteMutation) ClearBus() { + m.clearedbus = true +} + +// BusCleared reports if the "bus" edge to the Bus entity was cleared. +func (m *BusRouteMutation) BusCleared() bool { + return m.clearedbus +} + +// RemoveBuIDs removes the "bus" edge to the Bus entity by IDs. +func (m *BusRouteMutation) RemoveBuIDs(ids ...uuid.UUID) { + if m.removedbus == nil { + m.removedbus = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.bus, ids[i]) + m.removedbus[ids[i]] = struct{}{} + } +} + +// RemovedBus returns the removed IDs of the "bus" edge to the Bus entity. +func (m *BusRouteMutation) RemovedBusIDs() (ids []uuid.UUID) { + for id := range m.removedbus { + ids = append(ids, id) + } + return +} + +// BusIDs returns the "bus" edge IDs in the mutation. +func (m *BusRouteMutation) BusIDs() (ids []uuid.UUID) { + for id := range m.bus { + ids = append(ids, id) + } + return +} + +// ResetBus resets all changes to the "bus" edge. +func (m *BusRouteMutation) ResetBus() { + m.bus = nil + m.clearedbus = false + m.removedbus = nil +} + +// AddChildBusAssociationIDs adds the "childBusAssociations" edge to the ChildBusAssociation entity by ids. +func (m *BusRouteMutation) AddChildBusAssociationIDs(ids ...int) { + if m.childBusAssociations == nil { + m.childBusAssociations = make(map[int]struct{}) + } + for i := range ids { + m.childBusAssociations[ids[i]] = struct{}{} + } +} + +// ClearChildBusAssociations clears the "childBusAssociations" edge to the ChildBusAssociation entity. +func (m *BusRouteMutation) ClearChildBusAssociations() { + m.clearedchildBusAssociations = true +} + +// ChildBusAssociationsCleared reports if the "childBusAssociations" edge to the ChildBusAssociation entity was cleared. +func (m *BusRouteMutation) ChildBusAssociationsCleared() bool { + return m.clearedchildBusAssociations +} + +// RemoveChildBusAssociationIDs removes the "childBusAssociations" edge to the ChildBusAssociation entity by IDs. +func (m *BusRouteMutation) RemoveChildBusAssociationIDs(ids ...int) { + if m.removedchildBusAssociations == nil { + m.removedchildBusAssociations = make(map[int]struct{}) + } + for i := range ids { + delete(m.childBusAssociations, ids[i]) + m.removedchildBusAssociations[ids[i]] = struct{}{} + } +} + +// RemovedChildBusAssociations returns the removed IDs of the "childBusAssociations" edge to the ChildBusAssociation entity. +func (m *BusRouteMutation) RemovedChildBusAssociationsIDs() (ids []int) { + for id := range m.removedchildBusAssociations { + ids = append(ids, id) + } + return +} + +// ChildBusAssociationsIDs returns the "childBusAssociations" edge IDs in the mutation. +func (m *BusRouteMutation) ChildBusAssociationsIDs() (ids []int) { + for id := range m.childBusAssociations { + ids = append(ids, id) + } + return +} + +// ResetChildBusAssociations resets all changes to the "childBusAssociations" edge. +func (m *BusRouteMutation) ResetChildBusAssociations() { + m.childBusAssociations = nil + m.clearedchildBusAssociations = false + m.removedchildBusAssociations = nil +} + +// AddBusRouteAssociationIDs adds the "busRouteAssociations" edge to the BusRouteAssociation entity by ids. +func (m *BusRouteMutation) AddBusRouteAssociationIDs(ids ...int) { + if m.busRouteAssociations == nil { + m.busRouteAssociations = make(map[int]struct{}) + } + for i := range ids { + m.busRouteAssociations[ids[i]] = struct{}{} + } +} + +// ClearBusRouteAssociations clears the "busRouteAssociations" edge to the BusRouteAssociation entity. +func (m *BusRouteMutation) ClearBusRouteAssociations() { + m.clearedbusRouteAssociations = true +} + +// BusRouteAssociationsCleared reports if the "busRouteAssociations" edge to the BusRouteAssociation entity was cleared. +func (m *BusRouteMutation) BusRouteAssociationsCleared() bool { + return m.clearedbusRouteAssociations +} + +// RemoveBusRouteAssociationIDs removes the "busRouteAssociations" edge to the BusRouteAssociation entity by IDs. +func (m *BusRouteMutation) RemoveBusRouteAssociationIDs(ids ...int) { + if m.removedbusRouteAssociations == nil { + m.removedbusRouteAssociations = make(map[int]struct{}) + } + for i := range ids { + delete(m.busRouteAssociations, ids[i]) + m.removedbusRouteAssociations[ids[i]] = struct{}{} + } +} + +// RemovedBusRouteAssociations returns the removed IDs of the "busRouteAssociations" edge to the BusRouteAssociation entity. +func (m *BusRouteMutation) RemovedBusRouteAssociationsIDs() (ids []int) { + for id := range m.removedbusRouteAssociations { + ids = append(ids, id) + } + return +} + +// BusRouteAssociationsIDs returns the "busRouteAssociations" edge IDs in the mutation. +func (m *BusRouteMutation) BusRouteAssociationsIDs() (ids []int) { + for id := range m.busRouteAssociations { + ids = append(ids, id) + } + return +} + +// ResetBusRouteAssociations resets all changes to the "busRouteAssociations" edge. +func (m *BusRouteMutation) ResetBusRouteAssociations() { + m.busRouteAssociations = nil + m.clearedbusRouteAssociations = false + m.removedbusRouteAssociations = nil +} + +// Where appends a list predicates to the BusRouteMutation builder. +func (m *BusRouteMutation) Where(ps ...predicate.BusRoute) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the BusRouteMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *BusRouteMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.BusRoute, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *BusRouteMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *BusRouteMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (BusRoute). +func (m *BusRouteMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *BusRouteMutation) Fields() []string { + fields := make([]string, 0, 1) + if m.bus_type != nil { + fields = append(fields, busroute.FieldBusType) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *BusRouteMutation) Field(name string) (ent.Value, bool) { + switch name { + case busroute.FieldBusType: + return m.BusType() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *BusRouteMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case busroute.FieldBusType: + return m.OldBusType(ctx) + } + return nil, fmt.Errorf("unknown BusRoute field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *BusRouteMutation) SetField(name string, value ent.Value) error { + switch name { + case busroute.FieldBusType: + v, ok := value.(busroute.BusType) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetBusType(v) + return nil + } + return fmt.Errorf("unknown BusRoute field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *BusRouteMutation) AddedFields() []string { + return nil +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *BusRouteMutation) AddedField(name string) (ent.Value, bool) { + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *BusRouteMutation) AddField(name string, value ent.Value) error { + switch name { + } + return fmt.Errorf("unknown BusRoute numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *BusRouteMutation) ClearedFields() []string { + return nil +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *BusRouteMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *BusRouteMutation) ClearField(name string) error { + return fmt.Errorf("unknown BusRoute nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *BusRouteMutation) ResetField(name string) error { + switch name { + case busroute.FieldBusType: + m.ResetBusType() + return nil + } + return fmt.Errorf("unknown BusRoute field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *BusRouteMutation) AddedEdges() []string { + edges := make([]string, 0, 3) + if m.bus != nil { + edges = append(edges, busroute.EdgeBus) + } + if m.childBusAssociations != nil { + edges = append(edges, busroute.EdgeChildBusAssociations) + } + if m.busRouteAssociations != nil { + edges = append(edges, busroute.EdgeBusRouteAssociations) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *BusRouteMutation) AddedIDs(name string) []ent.Value { + switch name { + case busroute.EdgeBus: + ids := make([]ent.Value, 0, len(m.bus)) + for id := range m.bus { + ids = append(ids, id) + } + return ids + case busroute.EdgeChildBusAssociations: + ids := make([]ent.Value, 0, len(m.childBusAssociations)) + for id := range m.childBusAssociations { + ids = append(ids, id) + } + return ids + case busroute.EdgeBusRouteAssociations: + ids := make([]ent.Value, 0, len(m.busRouteAssociations)) + for id := range m.busRouteAssociations { + ids = append(ids, id) + } + return ids + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *BusRouteMutation) RemovedEdges() []string { + edges := make([]string, 0, 3) + if m.removedbus != nil { + edges = append(edges, busroute.EdgeBus) + } + if m.removedchildBusAssociations != nil { + edges = append(edges, busroute.EdgeChildBusAssociations) + } + if m.removedbusRouteAssociations != nil { + edges = append(edges, busroute.EdgeBusRouteAssociations) + } + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *BusRouteMutation) RemovedIDs(name string) []ent.Value { + switch name { + case busroute.EdgeBus: + ids := make([]ent.Value, 0, len(m.removedbus)) + for id := range m.removedbus { + ids = append(ids, id) + } + return ids + case busroute.EdgeChildBusAssociations: + ids := make([]ent.Value, 0, len(m.removedchildBusAssociations)) + for id := range m.removedchildBusAssociations { + ids = append(ids, id) + } + return ids + case busroute.EdgeBusRouteAssociations: + ids := make([]ent.Value, 0, len(m.removedbusRouteAssociations)) + for id := range m.removedbusRouteAssociations { + ids = append(ids, id) + } + return ids + } + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *BusRouteMutation) ClearedEdges() []string { + edges := make([]string, 0, 3) + if m.clearedbus { + edges = append(edges, busroute.EdgeBus) + } + if m.clearedchildBusAssociations { + edges = append(edges, busroute.EdgeChildBusAssociations) + } + if m.clearedbusRouteAssociations { + edges = append(edges, busroute.EdgeBusRouteAssociations) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *BusRouteMutation) EdgeCleared(name string) bool { + switch name { + case busroute.EdgeBus: + return m.clearedbus + case busroute.EdgeChildBusAssociations: + return m.clearedchildBusAssociations + case busroute.EdgeBusRouteAssociations: + return m.clearedbusRouteAssociations + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *BusRouteMutation) ClearEdge(name string) error { + switch name { + } + return fmt.Errorf("unknown BusRoute unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *BusRouteMutation) ResetEdge(name string) error { + switch name { + case busroute.EdgeBus: + m.ResetBus() + return nil + case busroute.EdgeChildBusAssociations: + m.ResetChildBusAssociations() + return nil + case busroute.EdgeBusRouteAssociations: + m.ResetBusRouteAssociations() + return nil + } + return fmt.Errorf("unknown BusRoute edge %s", name) +} + +// BusRouteAssociationMutation represents an operation that mutates the BusRouteAssociation nodes in the graph. +type BusRouteAssociationMutation struct { + config + op Op + typ string + id *int + _order *int32 + add_order *int32 + clearedFields map[string]struct{} + station *uuid.UUID + clearedstation bool + busRoute *uuid.UUID + clearedbusRoute bool + done bool + oldValue func(context.Context) (*BusRouteAssociation, error) + predicates []predicate.BusRouteAssociation +} + +var _ ent.Mutation = (*BusRouteAssociationMutation)(nil) + +// busrouteassociationOption allows management of the mutation configuration using functional options. +type busrouteassociationOption func(*BusRouteAssociationMutation) + +// newBusRouteAssociationMutation creates new mutation for the BusRouteAssociation entity. +func newBusRouteAssociationMutation(c config, op Op, opts ...busrouteassociationOption) *BusRouteAssociationMutation { + m := &BusRouteAssociationMutation{ + config: c, + op: op, + typ: TypeBusRouteAssociation, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withBusRouteAssociationID sets the ID field of the mutation. +func withBusRouteAssociationID(id int) busrouteassociationOption { + return func(m *BusRouteAssociationMutation) { + var ( + err error + once sync.Once + value *BusRouteAssociation + ) + m.oldValue = func(ctx context.Context) (*BusRouteAssociation, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().BusRouteAssociation.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withBusRouteAssociation sets the old BusRouteAssociation of the mutation. +func withBusRouteAssociation(node *BusRouteAssociation) busrouteassociationOption { + return func(m *BusRouteAssociationMutation) { + m.oldValue = func(context.Context) (*BusRouteAssociation, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m BusRouteAssociationMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m BusRouteAssociationMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *BusRouteAssociationMutation) ID() (id int, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *BusRouteAssociationMutation) IDs(ctx context.Context) ([]int, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().BusRouteAssociation.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetStationID sets the "station_id" field. +func (m *BusRouteAssociationMutation) SetStationID(u uuid.UUID) { + m.station = &u +} + +// StationID returns the value of the "station_id" field in the mutation. +func (m *BusRouteAssociationMutation) StationID() (r uuid.UUID, exists bool) { + v := m.station + if v == nil { + return + } + return *v, true +} + +// OldStationID returns the old "station_id" field's value of the BusRouteAssociation entity. +// If the BusRouteAssociation object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusRouteAssociationMutation) OldStationID(ctx context.Context) (v uuid.UUID, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldStationID is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldStationID requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldStationID: %w", err) + } + return oldValue.StationID, nil +} + +// ResetStationID resets all changes to the "station_id" field. +func (m *BusRouteAssociationMutation) ResetStationID() { + m.station = nil +} + +// SetBusRouteID sets the "bus_route_id" field. +func (m *BusRouteAssociationMutation) SetBusRouteID(u uuid.UUID) { + m.busRoute = &u +} + +// BusRouteID returns the value of the "bus_route_id" field in the mutation. +func (m *BusRouteAssociationMutation) BusRouteID() (r uuid.UUID, exists bool) { + v := m.busRoute + if v == nil { + return + } + return *v, true +} + +// OldBusRouteID returns the old "bus_route_id" field's value of the BusRouteAssociation entity. +// If the BusRouteAssociation object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusRouteAssociationMutation) OldBusRouteID(ctx context.Context) (v uuid.UUID, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldBusRouteID is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldBusRouteID requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldBusRouteID: %w", err) + } + return oldValue.BusRouteID, nil +} + +// ResetBusRouteID resets all changes to the "bus_route_id" field. +func (m *BusRouteAssociationMutation) ResetBusRouteID() { + m.busRoute = nil +} + +// SetOrder sets the "order" field. +func (m *BusRouteAssociationMutation) SetOrder(i int32) { + m._order = &i + m.add_order = nil +} + +// Order returns the value of the "order" field in the mutation. +func (m *BusRouteAssociationMutation) Order() (r int32, exists bool) { + v := m._order + if v == nil { + return + } + return *v, true +} + +// OldOrder returns the old "order" field's value of the BusRouteAssociation entity. +// If the BusRouteAssociation object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusRouteAssociationMutation) OldOrder(ctx context.Context) (v int32, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldOrder is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldOrder requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldOrder: %w", err) + } + return oldValue.Order, nil +} + +// AddOrder adds i to the "order" field. +func (m *BusRouteAssociationMutation) AddOrder(i int32) { + if m.add_order != nil { + *m.add_order += i + } else { + m.add_order = &i + } +} + +// AddedOrder returns the value that was added to the "order" field in this mutation. +func (m *BusRouteAssociationMutation) AddedOrder() (r int32, exists bool) { + v := m.add_order + if v == nil { + return + } + return *v, true +} + +// ResetOrder resets all changes to the "order" field. +func (m *BusRouteAssociationMutation) ResetOrder() { + m._order = nil + m.add_order = nil +} + +// ClearStation clears the "station" edge to the Station entity. +func (m *BusRouteAssociationMutation) ClearStation() { + m.clearedstation = true + m.clearedFields[busrouteassociation.FieldStationID] = struct{}{} +} + +// StationCleared reports if the "station" edge to the Station entity was cleared. +func (m *BusRouteAssociationMutation) StationCleared() bool { + return m.clearedstation +} + +// StationIDs returns the "station" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// StationID instead. It exists only for internal usage by the builders. +func (m *BusRouteAssociationMutation) StationIDs() (ids []uuid.UUID) { + if id := m.station; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetStation resets all changes to the "station" edge. +func (m *BusRouteAssociationMutation) ResetStation() { + m.station = nil + m.clearedstation = false +} + +// ClearBusRoute clears the "busRoute" edge to the BusRoute entity. +func (m *BusRouteAssociationMutation) ClearBusRoute() { + m.clearedbusRoute = true + m.clearedFields[busrouteassociation.FieldBusRouteID] = struct{}{} +} + +// BusRouteCleared reports if the "busRoute" edge to the BusRoute entity was cleared. +func (m *BusRouteAssociationMutation) BusRouteCleared() bool { + return m.clearedbusRoute +} + +// BusRouteIDs returns the "busRoute" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// BusRouteID instead. It exists only for internal usage by the builders. +func (m *BusRouteAssociationMutation) BusRouteIDs() (ids []uuid.UUID) { + if id := m.busRoute; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetBusRoute resets all changes to the "busRoute" edge. +func (m *BusRouteAssociationMutation) ResetBusRoute() { + m.busRoute = nil + m.clearedbusRoute = false +} + +// Where appends a list predicates to the BusRouteAssociationMutation builder. +func (m *BusRouteAssociationMutation) Where(ps ...predicate.BusRouteAssociation) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the BusRouteAssociationMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *BusRouteAssociationMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.BusRouteAssociation, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *BusRouteAssociationMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *BusRouteAssociationMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (BusRouteAssociation). +func (m *BusRouteAssociationMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *BusRouteAssociationMutation) Fields() []string { + fields := make([]string, 0, 3) + if m.station != nil { + fields = append(fields, busrouteassociation.FieldStationID) + } + if m.busRoute != nil { + fields = append(fields, busrouteassociation.FieldBusRouteID) + } + if m._order != nil { + fields = append(fields, busrouteassociation.FieldOrder) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *BusRouteAssociationMutation) Field(name string) (ent.Value, bool) { + switch name { + case busrouteassociation.FieldStationID: + return m.StationID() + case busrouteassociation.FieldBusRouteID: + return m.BusRouteID() + case busrouteassociation.FieldOrder: + return m.Order() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *BusRouteAssociationMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case busrouteassociation.FieldStationID: + return m.OldStationID(ctx) + case busrouteassociation.FieldBusRouteID: + return m.OldBusRouteID(ctx) + case busrouteassociation.FieldOrder: + return m.OldOrder(ctx) + } + return nil, fmt.Errorf("unknown BusRouteAssociation field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *BusRouteAssociationMutation) SetField(name string, value ent.Value) error { + switch name { + case busrouteassociation.FieldStationID: + v, ok := value.(uuid.UUID) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetStationID(v) return nil - case bus.FieldCreatedAt: - v, ok := value.(time.Time) + case busrouteassociation.FieldBusRouteID: + v, ok := value.(uuid.UUID) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetCreatedAt(v) + m.SetBusRouteID(v) return nil - case bus.FieldUpdatedAt: - v, ok := value.(time.Time) + case busrouteassociation.FieldOrder: + v, ok := value.(int32) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetUpdatedAt(v) + m.SetOrder(v) return nil } - return fmt.Errorf("unknown Bus field %s", name) + return fmt.Errorf("unknown BusRouteAssociation field %s", name) } // AddedFields returns all numeric fields that were incremented/decremented during // this mutation. -func (m *BusMutation) AddedFields() []string { +func (m *BusRouteAssociationMutation) AddedFields() []string { var fields []string - if m.addlatitude != nil { - fields = append(fields, bus.FieldLatitude) - } - if m.addlongitude != nil { - fields = append(fields, bus.FieldLongitude) + if m.add_order != nil { + fields = append(fields, busrouteassociation.FieldOrder) } return fields } @@ -1577,12 +2702,10 @@ func (m *BusMutation) AddedFields() []string { // AddedField returns the numeric value that was incremented/decremented on a field // with the given name. The second boolean return value indicates that this field // was not set, or was not defined in the schema. -func (m *BusMutation) AddedField(name string) (ent.Value, bool) { +func (m *BusRouteAssociationMutation) AddedField(name string) (ent.Value, bool) { switch name { - case bus.FieldLatitude: - return m.AddedLatitude() - case bus.FieldLongitude: - return m.AddedLongitude() + case busrouteassociation.FieldOrder: + return m.AddedOrder() } return nil, false } @@ -1590,161 +2713,77 @@ func (m *BusMutation) AddedField(name string) (ent.Value, bool) { // AddField adds the value to the field with the given name. It returns an error if // the field is not defined in the schema, or if the type mismatched the field // type. -func (m *BusMutation) AddField(name string, value ent.Value) error { +func (m *BusRouteAssociationMutation) AddField(name string, value ent.Value) error { switch name { - case bus.FieldLatitude: - v, ok := value.(float64) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.AddLatitude(v) - return nil - case bus.FieldLongitude: - v, ok := value.(float64) + case busrouteassociation.FieldOrder: + v, ok := value.(int32) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.AddLongitude(v) + m.AddOrder(v) return nil } - return fmt.Errorf("unknown Bus numeric field %s", name) + return fmt.Errorf("unknown BusRouteAssociation numeric field %s", name) } // ClearedFields returns all nullable fields that were cleared during this // mutation. -func (m *BusMutation) ClearedFields() []string { - var fields []string - if m.FieldCleared(bus.FieldPlateNumber) { - fields = append(fields, bus.FieldPlateNumber) - } - if m.FieldCleared(bus.FieldLatitude) { - fields = append(fields, bus.FieldLatitude) - } - if m.FieldCleared(bus.FieldLongitude) { - fields = append(fields, bus.FieldLongitude) - } - return fields +func (m *BusRouteAssociationMutation) ClearedFields() []string { + return nil } // FieldCleared returns a boolean indicating if a field with the given name was // cleared in this mutation. -func (m *BusMutation) FieldCleared(name string) bool { +func (m *BusRouteAssociationMutation) FieldCleared(name string) bool { _, ok := m.clearedFields[name] return ok } // ClearField clears the value of the field with the given name. It returns an // error if the field is not defined in the schema. -func (m *BusMutation) ClearField(name string) error { - switch name { - case bus.FieldPlateNumber: - m.ClearPlateNumber() - return nil - case bus.FieldLatitude: - m.ClearLatitude() - return nil - case bus.FieldLongitude: - m.ClearLongitude() - return nil - } - return fmt.Errorf("unknown Bus nullable field %s", name) +func (m *BusRouteAssociationMutation) ClearField(name string) error { + return fmt.Errorf("unknown BusRouteAssociation nullable field %s", name) } // ResetField resets all changes in the mutation for the field with the given name. // It returns an error if the field is not defined in the schema. -func (m *BusMutation) ResetField(name string) error { +func (m *BusRouteAssociationMutation) ResetField(name string) error { switch name { - case bus.FieldName: - m.ResetName() - return nil - case bus.FieldPlateNumber: - m.ResetPlateNumber() - return nil - case bus.FieldLatitude: - m.ResetLatitude() - return nil - case bus.FieldLongitude: - m.ResetLongitude() - return nil - case bus.FieldStatus: - m.ResetStatus() - return nil - case bus.FieldEnableFaceRecognition: - m.ResetEnableFaceRecognition() + case busrouteassociation.FieldStationID: + m.ResetStationID() return nil - case bus.FieldCreatedAt: - m.ResetCreatedAt() + case busrouteassociation.FieldBusRouteID: + m.ResetBusRouteID() return nil - case bus.FieldUpdatedAt: - m.ResetUpdatedAt() + case busrouteassociation.FieldOrder: + m.ResetOrder() return nil } - return fmt.Errorf("unknown Bus field %s", name) + return fmt.Errorf("unknown BusRouteAssociation field %s", name) } // AddedEdges returns all edge names that were set/added in this mutation. -func (m *BusMutation) AddedEdges() []string { - edges := make([]string, 0, 7) - if m.nursery != nil { - edges = append(edges, bus.EdgeNursery) - } - if m.stations != nil { - edges = append(edges, bus.EdgeStations) - } - if m.boarding_records != nil { - edges = append(edges, bus.EdgeBoardingRecords) - } - if m.childBusAssociations != nil { - edges = append(edges, bus.EdgeChildBusAssociations) - } - if m.next_station != nil { - edges = append(edges, bus.EdgeNextStation) - } - if m.morning_first_station != nil { - edges = append(edges, bus.EdgeMorningFirstStation) +func (m *BusRouteAssociationMutation) AddedEdges() []string { + edges := make([]string, 0, 2) + if m.station != nil { + edges = append(edges, busrouteassociation.EdgeStation) } - if m.evening_first_station != nil { - edges = append(edges, bus.EdgeEveningFirstStation) + if m.busRoute != nil { + edges = append(edges, busrouteassociation.EdgeBusRoute) } return edges } // AddedIDs returns all IDs (to other nodes) that were added for the given edge // name in this mutation. -func (m *BusMutation) AddedIDs(name string) []ent.Value { +func (m *BusRouteAssociationMutation) AddedIDs(name string) []ent.Value { switch name { - case bus.EdgeNursery: - if id := m.nursery; id != nil { - return []ent.Value{*id} - } - case bus.EdgeStations: - ids := make([]ent.Value, 0, len(m.stations)) - for id := range m.stations { - ids = append(ids, id) - } - return ids - case bus.EdgeBoardingRecords: - ids := make([]ent.Value, 0, len(m.boarding_records)) - for id := range m.boarding_records { - ids = append(ids, id) - } - return ids - case bus.EdgeChildBusAssociations: - ids := make([]ent.Value, 0, len(m.childBusAssociations)) - for id := range m.childBusAssociations { - ids = append(ids, id) - } - return ids - case bus.EdgeNextStation: - if id := m.next_station; id != nil { - return []ent.Value{*id} - } - case bus.EdgeMorningFirstStation: - if id := m.morning_first_station; id != nil { + case busrouteassociation.EdgeStation: + if id := m.station; id != nil { return []ent.Value{*id} } - case bus.EdgeEveningFirstStation: - if id := m.evening_first_station; id != nil { + case busrouteassociation.EdgeBusRoute: + if id := m.busRoute; id != nil { return []ent.Value{*id} } } @@ -1752,142 +2791,67 @@ func (m *BusMutation) AddedIDs(name string) []ent.Value { } // RemovedEdges returns all edge names that were removed in this mutation. -func (m *BusMutation) RemovedEdges() []string { - edges := make([]string, 0, 7) - if m.removedstations != nil { - edges = append(edges, bus.EdgeStations) - } - if m.removedboarding_records != nil { - edges = append(edges, bus.EdgeBoardingRecords) - } - if m.removedchildBusAssociations != nil { - edges = append(edges, bus.EdgeChildBusAssociations) - } +func (m *BusRouteAssociationMutation) RemovedEdges() []string { + edges := make([]string, 0, 2) return edges } // RemovedIDs returns all IDs (to other nodes) that were removed for the edge with // the given name in this mutation. -func (m *BusMutation) RemovedIDs(name string) []ent.Value { - switch name { - case bus.EdgeStations: - ids := make([]ent.Value, 0, len(m.removedstations)) - for id := range m.removedstations { - ids = append(ids, id) - } - return ids - case bus.EdgeBoardingRecords: - ids := make([]ent.Value, 0, len(m.removedboarding_records)) - for id := range m.removedboarding_records { - ids = append(ids, id) - } - return ids - case bus.EdgeChildBusAssociations: - ids := make([]ent.Value, 0, len(m.removedchildBusAssociations)) - for id := range m.removedchildBusAssociations { - ids = append(ids, id) - } - return ids - } +func (m *BusRouteAssociationMutation) RemovedIDs(name string) []ent.Value { return nil } // ClearedEdges returns all edge names that were cleared in this mutation. -func (m *BusMutation) ClearedEdges() []string { - edges := make([]string, 0, 7) - if m.clearednursery { - edges = append(edges, bus.EdgeNursery) - } - if m.clearedstations { - edges = append(edges, bus.EdgeStations) - } - if m.clearedboarding_records { - edges = append(edges, bus.EdgeBoardingRecords) - } - if m.clearedchildBusAssociations { - edges = append(edges, bus.EdgeChildBusAssociations) - } - if m.clearednext_station { - edges = append(edges, bus.EdgeNextStation) - } - if m.clearedmorning_first_station { - edges = append(edges, bus.EdgeMorningFirstStation) +func (m *BusRouteAssociationMutation) ClearedEdges() []string { + edges := make([]string, 0, 2) + if m.clearedstation { + edges = append(edges, busrouteassociation.EdgeStation) } - if m.clearedevening_first_station { - edges = append(edges, bus.EdgeEveningFirstStation) + if m.clearedbusRoute { + edges = append(edges, busrouteassociation.EdgeBusRoute) } return edges } // EdgeCleared returns a boolean which indicates if the edge with the given name // was cleared in this mutation. -func (m *BusMutation) EdgeCleared(name string) bool { +func (m *BusRouteAssociationMutation) EdgeCleared(name string) bool { switch name { - case bus.EdgeNursery: - return m.clearednursery - case bus.EdgeStations: - return m.clearedstations - case bus.EdgeBoardingRecords: - return m.clearedboarding_records - case bus.EdgeChildBusAssociations: - return m.clearedchildBusAssociations - case bus.EdgeNextStation: - return m.clearednext_station - case bus.EdgeMorningFirstStation: - return m.clearedmorning_first_station - case bus.EdgeEveningFirstStation: - return m.clearedevening_first_station + case busrouteassociation.EdgeStation: + return m.clearedstation + case busrouteassociation.EdgeBusRoute: + return m.clearedbusRoute } return false } // ClearEdge clears the value of the edge with the given name. It returns an error // if that edge is not defined in the schema. -func (m *BusMutation) ClearEdge(name string) error { +func (m *BusRouteAssociationMutation) ClearEdge(name string) error { switch name { - case bus.EdgeNursery: - m.ClearNursery() - return nil - case bus.EdgeNextStation: - m.ClearNextStation() - return nil - case bus.EdgeMorningFirstStation: - m.ClearMorningFirstStation() + case busrouteassociation.EdgeStation: + m.ClearStation() return nil - case bus.EdgeEveningFirstStation: - m.ClearEveningFirstStation() + case busrouteassociation.EdgeBusRoute: + m.ClearBusRoute() return nil } - return fmt.Errorf("unknown Bus unique edge %s", name) + return fmt.Errorf("unknown BusRouteAssociation unique edge %s", name) } // ResetEdge resets all changes to the edge with the given name in this mutation. // It returns an error if the edge is not defined in the schema. -func (m *BusMutation) ResetEdge(name string) error { +func (m *BusRouteAssociationMutation) ResetEdge(name string) error { switch name { - case bus.EdgeNursery: - m.ResetNursery() - return nil - case bus.EdgeStations: - m.ResetStations() - return nil - case bus.EdgeBoardingRecords: - m.ResetBoardingRecords() - return nil - case bus.EdgeChildBusAssociations: - m.ResetChildBusAssociations() - return nil - case bus.EdgeNextStation: - m.ResetNextStation() - return nil - case bus.EdgeMorningFirstStation: - m.ResetMorningFirstStation() + case busrouteassociation.EdgeStation: + m.ResetStation() return nil - case bus.EdgeEveningFirstStation: - m.ResetEveningFirstStation() + case busrouteassociation.EdgeBusRoute: + m.ResetBusRoute() return nil } - return fmt.Errorf("unknown Bus edge %s", name) + return fmt.Errorf("unknown BusRouteAssociation edge %s", name) } // ChildMutation represents an operation that mutates the Child nodes in the graph. @@ -3119,18 +4083,17 @@ func (m *ChildMutation) ResetEdge(name string) error { // ChildBusAssociationMutation represents an operation that mutates the ChildBusAssociation nodes in the graph. type ChildBusAssociationMutation struct { config - op Op - typ string - id *int - bus_type *childbusassociation.BusType - clearedFields map[string]struct{} - child *uuid.UUID - clearedchild bool - bus *uuid.UUID - clearedbus bool - done bool - oldValue func(context.Context) (*ChildBusAssociation, error) - predicates []predicate.ChildBusAssociation + op Op + typ string + id *int + clearedFields map[string]struct{} + child *uuid.UUID + clearedchild bool + bus_route *uuid.UUID + clearedbus_route bool + done bool + oldValue func(context.Context) (*ChildBusAssociation, error) + predicates []predicate.ChildBusAssociation } var _ ent.Mutation = (*ChildBusAssociationMutation)(nil) @@ -3267,76 +4230,40 @@ func (m *ChildBusAssociationMutation) ResetChildID() { m.child = nil } -// SetBusID sets the "bus_id" field. -func (m *ChildBusAssociationMutation) SetBusID(u uuid.UUID) { - m.bus = &u -} - -// BusID returns the value of the "bus_id" field in the mutation. -func (m *ChildBusAssociationMutation) BusID() (r uuid.UUID, exists bool) { - v := m.bus - if v == nil { - return - } - return *v, true -} - -// OldBusID returns the old "bus_id" field's value of the ChildBusAssociation entity. -// If the ChildBusAssociation object wasn't provided to the builder, the object is fetched from the database. -// An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *ChildBusAssociationMutation) OldBusID(ctx context.Context) (v uuid.UUID, err error) { - if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldBusID is only allowed on UpdateOne operations") - } - if m.id == nil || m.oldValue == nil { - return v, errors.New("OldBusID requires an ID field in the mutation") - } - oldValue, err := m.oldValue(ctx) - if err != nil { - return v, fmt.Errorf("querying old value for OldBusID: %w", err) - } - return oldValue.BusID, nil -} - -// ResetBusID resets all changes to the "bus_id" field. -func (m *ChildBusAssociationMutation) ResetBusID() { - m.bus = nil -} - -// SetBusType sets the "bus_type" field. -func (m *ChildBusAssociationMutation) SetBusType(ct childbusassociation.BusType) { - m.bus_type = &ct +// SetBusRouteID sets the "bus_route_id" field. +func (m *ChildBusAssociationMutation) SetBusRouteID(u uuid.UUID) { + m.bus_route = &u } -// BusType returns the value of the "bus_type" field in the mutation. -func (m *ChildBusAssociationMutation) BusType() (r childbusassociation.BusType, exists bool) { - v := m.bus_type +// BusRouteID returns the value of the "bus_route_id" field in the mutation. +func (m *ChildBusAssociationMutation) BusRouteID() (r uuid.UUID, exists bool) { + v := m.bus_route if v == nil { return } return *v, true } -// OldBusType returns the old "bus_type" field's value of the ChildBusAssociation entity. +// OldBusRouteID returns the old "bus_route_id" field's value of the ChildBusAssociation entity. // If the ChildBusAssociation object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *ChildBusAssociationMutation) OldBusType(ctx context.Context) (v childbusassociation.BusType, err error) { +func (m *ChildBusAssociationMutation) OldBusRouteID(ctx context.Context) (v uuid.UUID, err error) { if !m.op.Is(OpUpdateOne) { - return v, errors.New("OldBusType is only allowed on UpdateOne operations") + return v, errors.New("OldBusRouteID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, errors.New("OldBusType requires an ID field in the mutation") + return v, errors.New("OldBusRouteID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { - return v, fmt.Errorf("querying old value for OldBusType: %w", err) + return v, fmt.Errorf("querying old value for OldBusRouteID: %w", err) } - return oldValue.BusType, nil + return oldValue.BusRouteID, nil } -// ResetBusType resets all changes to the "bus_type" field. -func (m *ChildBusAssociationMutation) ResetBusType() { - m.bus_type = nil +// ResetBusRouteID resets all changes to the "bus_route_id" field. +func (m *ChildBusAssociationMutation) ResetBusRouteID() { + m.bus_route = nil } // ClearChild clears the "child" edge to the Child entity. @@ -3366,33 +4293,33 @@ func (m *ChildBusAssociationMutation) ResetChild() { m.clearedchild = false } -// ClearBus clears the "bus" edge to the Bus entity. -func (m *ChildBusAssociationMutation) ClearBus() { - m.clearedbus = true - m.clearedFields[childbusassociation.FieldBusID] = struct{}{} +// ClearBusRoute clears the "bus_route" edge to the BusRoute entity. +func (m *ChildBusAssociationMutation) ClearBusRoute() { + m.clearedbus_route = true + m.clearedFields[childbusassociation.FieldBusRouteID] = struct{}{} } -// BusCleared reports if the "bus" edge to the Bus entity was cleared. -func (m *ChildBusAssociationMutation) BusCleared() bool { - return m.clearedbus +// BusRouteCleared reports if the "bus_route" edge to the BusRoute entity was cleared. +func (m *ChildBusAssociationMutation) BusRouteCleared() bool { + return m.clearedbus_route } -// BusIDs returns the "bus" edge IDs in the mutation. +// BusRouteIDs returns the "bus_route" edge IDs in the mutation. // Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use -// BusID instead. It exists only for internal usage by the builders. -func (m *ChildBusAssociationMutation) BusIDs() (ids []uuid.UUID) { - if id := m.bus; id != nil { +// BusRouteID instead. It exists only for internal usage by the builders. +func (m *ChildBusAssociationMutation) BusRouteIDs() (ids []uuid.UUID) { + if id := m.bus_route; id != nil { ids = append(ids, *id) } return } -// ResetBus resets all changes to the "bus" edge. -func (m *ChildBusAssociationMutation) ResetBus() { - m.bus = nil - m.clearedbus = false -} - +// ResetBusRoute resets all changes to the "bus_route" edge. +func (m *ChildBusAssociationMutation) ResetBusRoute() { + m.bus_route = nil + m.clearedbus_route = false +} + // Where appends a list predicates to the ChildBusAssociationMutation builder. func (m *ChildBusAssociationMutation) Where(ps ...predicate.ChildBusAssociation) { m.predicates = append(m.predicates, ps...) @@ -3427,15 +4354,12 @@ func (m *ChildBusAssociationMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *ChildBusAssociationMutation) Fields() []string { - fields := make([]string, 0, 3) + fields := make([]string, 0, 2) if m.child != nil { fields = append(fields, childbusassociation.FieldChildID) } - if m.bus != nil { - fields = append(fields, childbusassociation.FieldBusID) - } - if m.bus_type != nil { - fields = append(fields, childbusassociation.FieldBusType) + if m.bus_route != nil { + fields = append(fields, childbusassociation.FieldBusRouteID) } return fields } @@ -3447,10 +4371,8 @@ func (m *ChildBusAssociationMutation) Field(name string) (ent.Value, bool) { switch name { case childbusassociation.FieldChildID: return m.ChildID() - case childbusassociation.FieldBusID: - return m.BusID() - case childbusassociation.FieldBusType: - return m.BusType() + case childbusassociation.FieldBusRouteID: + return m.BusRouteID() } return nil, false } @@ -3462,10 +4384,8 @@ func (m *ChildBusAssociationMutation) OldField(ctx context.Context, name string) switch name { case childbusassociation.FieldChildID: return m.OldChildID(ctx) - case childbusassociation.FieldBusID: - return m.OldBusID(ctx) - case childbusassociation.FieldBusType: - return m.OldBusType(ctx) + case childbusassociation.FieldBusRouteID: + return m.OldBusRouteID(ctx) } return nil, fmt.Errorf("unknown ChildBusAssociation field %s", name) } @@ -3482,19 +4402,12 @@ func (m *ChildBusAssociationMutation) SetField(name string, value ent.Value) err } m.SetChildID(v) return nil - case childbusassociation.FieldBusID: + case childbusassociation.FieldBusRouteID: v, ok := value.(uuid.UUID) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } - m.SetBusID(v) - return nil - case childbusassociation.FieldBusType: - v, ok := value.(childbusassociation.BusType) - if !ok { - return fmt.Errorf("unexpected type %T for field %s", value, name) - } - m.SetBusType(v) + m.SetBusRouteID(v) return nil } return fmt.Errorf("unknown ChildBusAssociation field %s", name) @@ -3548,11 +4461,8 @@ func (m *ChildBusAssociationMutation) ResetField(name string) error { case childbusassociation.FieldChildID: m.ResetChildID() return nil - case childbusassociation.FieldBusID: - m.ResetBusID() - return nil - case childbusassociation.FieldBusType: - m.ResetBusType() + case childbusassociation.FieldBusRouteID: + m.ResetBusRouteID() return nil } return fmt.Errorf("unknown ChildBusAssociation field %s", name) @@ -3564,8 +4474,8 @@ func (m *ChildBusAssociationMutation) AddedEdges() []string { if m.child != nil { edges = append(edges, childbusassociation.EdgeChild) } - if m.bus != nil { - edges = append(edges, childbusassociation.EdgeBus) + if m.bus_route != nil { + edges = append(edges, childbusassociation.EdgeBusRoute) } return edges } @@ -3578,8 +4488,8 @@ func (m *ChildBusAssociationMutation) AddedIDs(name string) []ent.Value { if id := m.child; id != nil { return []ent.Value{*id} } - case childbusassociation.EdgeBus: - if id := m.bus; id != nil { + case childbusassociation.EdgeBusRoute: + if id := m.bus_route; id != nil { return []ent.Value{*id} } } @@ -3604,8 +4514,8 @@ func (m *ChildBusAssociationMutation) ClearedEdges() []string { if m.clearedchild { edges = append(edges, childbusassociation.EdgeChild) } - if m.clearedbus { - edges = append(edges, childbusassociation.EdgeBus) + if m.clearedbus_route { + edges = append(edges, childbusassociation.EdgeBusRoute) } return edges } @@ -3616,8 +4526,8 @@ func (m *ChildBusAssociationMutation) EdgeCleared(name string) bool { switch name { case childbusassociation.EdgeChild: return m.clearedchild - case childbusassociation.EdgeBus: - return m.clearedbus + case childbusassociation.EdgeBusRoute: + return m.clearedbus_route } return false } @@ -3629,8 +4539,8 @@ func (m *ChildBusAssociationMutation) ClearEdge(name string) error { case childbusassociation.EdgeChild: m.ClearChild() return nil - case childbusassociation.EdgeBus: - m.ClearBus() + case childbusassociation.EdgeBusRoute: + m.ClearBusRoute() return nil } return fmt.Errorf("unknown ChildBusAssociation unique edge %s", name) @@ -3643,8 +4553,8 @@ func (m *ChildBusAssociationMutation) ResetEdge(name string) error { case childbusassociation.EdgeChild: m.ResetChild() return nil - case childbusassociation.EdgeBus: - m.ResetBus() + case childbusassociation.EdgeBusRoute: + m.ResetBusRoute() return nil } return fmt.Errorf("unknown ChildBusAssociation edge %s", name) @@ -5976,43 +6886,27 @@ func (m *NurseryMutation) ResetEdge(name string) error { // StationMutation represents an operation that mutates the Station nodes in the graph. type StationMutation struct { config - op Op - typ string - id *uuid.UUID - latitude *float64 - addlatitude *float64 - longitude *float64 - addlongitude *float64 - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - guardian *uuid.UUID - clearedguardian bool - bus map[uuid.UUID]struct{} - removedbus map[uuid.UUID]struct{} - clearedbus bool - morning_previous_station *uuid.UUID - clearedmorning_previous_station bool - morning_next_station map[uuid.UUID]struct{} - removedmorning_next_station map[uuid.UUID]struct{} - clearedmorning_next_station bool - evening_previous_station *uuid.UUID - clearedevening_previous_station bool - evening_next_station map[uuid.UUID]struct{} - removedevening_next_station map[uuid.UUID]struct{} - clearedevening_next_station bool - next_for_buses map[uuid.UUID]struct{} - removednext_for_buses map[uuid.UUID]struct{} - clearednext_for_buses bool - morning_first_for_buses map[uuid.UUID]struct{} - removedmorning_first_for_buses map[uuid.UUID]struct{} - clearedmorning_first_for_buses bool - evening_first_for_buses map[uuid.UUID]struct{} - removedevening_first_for_buses map[uuid.UUID]struct{} - clearedevening_first_for_buses bool - done bool - oldValue func(context.Context) (*Station, error) - predicates []predicate.Station + op Op + typ string + id *uuid.UUID + latitude *float64 + addlatitude *float64 + longitude *float64 + addlongitude *float64 + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + guardian *uuid.UUID + clearedguardian bool + next_for_buses map[uuid.UUID]struct{} + removednext_for_buses map[uuid.UUID]struct{} + clearednext_for_buses bool + busRouteAssociations map[int]struct{} + removedbusRouteAssociations map[int]struct{} + clearedbusRouteAssociations bool + done bool + oldValue func(context.Context) (*Station, error) + predicates []predicate.Station } var _ ent.Mutation = (*StationMutation)(nil) @@ -6370,246 +7264,6 @@ func (m *StationMutation) ResetGuardian() { m.clearedguardian = false } -// AddBuIDs adds the "bus" edge to the Bus entity by ids. -func (m *StationMutation) AddBuIDs(ids ...uuid.UUID) { - if m.bus == nil { - m.bus = make(map[uuid.UUID]struct{}) - } - for i := range ids { - m.bus[ids[i]] = struct{}{} - } -} - -// ClearBus clears the "bus" edge to the Bus entity. -func (m *StationMutation) ClearBus() { - m.clearedbus = true -} - -// BusCleared reports if the "bus" edge to the Bus entity was cleared. -func (m *StationMutation) BusCleared() bool { - return m.clearedbus -} - -// RemoveBuIDs removes the "bus" edge to the Bus entity by IDs. -func (m *StationMutation) RemoveBuIDs(ids ...uuid.UUID) { - if m.removedbus == nil { - m.removedbus = make(map[uuid.UUID]struct{}) - } - for i := range ids { - delete(m.bus, ids[i]) - m.removedbus[ids[i]] = struct{}{} - } -} - -// RemovedBus returns the removed IDs of the "bus" edge to the Bus entity. -func (m *StationMutation) RemovedBusIDs() (ids []uuid.UUID) { - for id := range m.removedbus { - ids = append(ids, id) - } - return -} - -// BusIDs returns the "bus" edge IDs in the mutation. -func (m *StationMutation) BusIDs() (ids []uuid.UUID) { - for id := range m.bus { - ids = append(ids, id) - } - return -} - -// ResetBus resets all changes to the "bus" edge. -func (m *StationMutation) ResetBus() { - m.bus = nil - m.clearedbus = false - m.removedbus = nil -} - -// SetMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by id. -func (m *StationMutation) SetMorningPreviousStationID(id uuid.UUID) { - m.morning_previous_station = &id -} - -// ClearMorningPreviousStation clears the "morning_previous_station" edge to the Station entity. -func (m *StationMutation) ClearMorningPreviousStation() { - m.clearedmorning_previous_station = true -} - -// MorningPreviousStationCleared reports if the "morning_previous_station" edge to the Station entity was cleared. -func (m *StationMutation) MorningPreviousStationCleared() bool { - return m.clearedmorning_previous_station -} - -// MorningPreviousStationID returns the "morning_previous_station" edge ID in the mutation. -func (m *StationMutation) MorningPreviousStationID() (id uuid.UUID, exists bool) { - if m.morning_previous_station != nil { - return *m.morning_previous_station, true - } - return -} - -// MorningPreviousStationIDs returns the "morning_previous_station" edge IDs in the mutation. -// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use -// MorningPreviousStationID instead. It exists only for internal usage by the builders. -func (m *StationMutation) MorningPreviousStationIDs() (ids []uuid.UUID) { - if id := m.morning_previous_station; id != nil { - ids = append(ids, *id) - } - return -} - -// ResetMorningPreviousStation resets all changes to the "morning_previous_station" edge. -func (m *StationMutation) ResetMorningPreviousStation() { - m.morning_previous_station = nil - m.clearedmorning_previous_station = false -} - -// AddMorningNextStationIDs adds the "morning_next_station" edge to the Station entity by ids. -func (m *StationMutation) AddMorningNextStationIDs(ids ...uuid.UUID) { - if m.morning_next_station == nil { - m.morning_next_station = make(map[uuid.UUID]struct{}) - } - for i := range ids { - m.morning_next_station[ids[i]] = struct{}{} - } -} - -// ClearMorningNextStation clears the "morning_next_station" edge to the Station entity. -func (m *StationMutation) ClearMorningNextStation() { - m.clearedmorning_next_station = true -} - -// MorningNextStationCleared reports if the "morning_next_station" edge to the Station entity was cleared. -func (m *StationMutation) MorningNextStationCleared() bool { - return m.clearedmorning_next_station -} - -// RemoveMorningNextStationIDs removes the "morning_next_station" edge to the Station entity by IDs. -func (m *StationMutation) RemoveMorningNextStationIDs(ids ...uuid.UUID) { - if m.removedmorning_next_station == nil { - m.removedmorning_next_station = make(map[uuid.UUID]struct{}) - } - for i := range ids { - delete(m.morning_next_station, ids[i]) - m.removedmorning_next_station[ids[i]] = struct{}{} - } -} - -// RemovedMorningNextStation returns the removed IDs of the "morning_next_station" edge to the Station entity. -func (m *StationMutation) RemovedMorningNextStationIDs() (ids []uuid.UUID) { - for id := range m.removedmorning_next_station { - ids = append(ids, id) - } - return -} - -// MorningNextStationIDs returns the "morning_next_station" edge IDs in the mutation. -func (m *StationMutation) MorningNextStationIDs() (ids []uuid.UUID) { - for id := range m.morning_next_station { - ids = append(ids, id) - } - return -} - -// ResetMorningNextStation resets all changes to the "morning_next_station" edge. -func (m *StationMutation) ResetMorningNextStation() { - m.morning_next_station = nil - m.clearedmorning_next_station = false - m.removedmorning_next_station = nil -} - -// SetEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by id. -func (m *StationMutation) SetEveningPreviousStationID(id uuid.UUID) { - m.evening_previous_station = &id -} - -// ClearEveningPreviousStation clears the "evening_previous_station" edge to the Station entity. -func (m *StationMutation) ClearEveningPreviousStation() { - m.clearedevening_previous_station = true -} - -// EveningPreviousStationCleared reports if the "evening_previous_station" edge to the Station entity was cleared. -func (m *StationMutation) EveningPreviousStationCleared() bool { - return m.clearedevening_previous_station -} - -// EveningPreviousStationID returns the "evening_previous_station" edge ID in the mutation. -func (m *StationMutation) EveningPreviousStationID() (id uuid.UUID, exists bool) { - if m.evening_previous_station != nil { - return *m.evening_previous_station, true - } - return -} - -// EveningPreviousStationIDs returns the "evening_previous_station" edge IDs in the mutation. -// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use -// EveningPreviousStationID instead. It exists only for internal usage by the builders. -func (m *StationMutation) EveningPreviousStationIDs() (ids []uuid.UUID) { - if id := m.evening_previous_station; id != nil { - ids = append(ids, *id) - } - return -} - -// ResetEveningPreviousStation resets all changes to the "evening_previous_station" edge. -func (m *StationMutation) ResetEveningPreviousStation() { - m.evening_previous_station = nil - m.clearedevening_previous_station = false -} - -// AddEveningNextStationIDs adds the "evening_next_station" edge to the Station entity by ids. -func (m *StationMutation) AddEveningNextStationIDs(ids ...uuid.UUID) { - if m.evening_next_station == nil { - m.evening_next_station = make(map[uuid.UUID]struct{}) - } - for i := range ids { - m.evening_next_station[ids[i]] = struct{}{} - } -} - -// ClearEveningNextStation clears the "evening_next_station" edge to the Station entity. -func (m *StationMutation) ClearEveningNextStation() { - m.clearedevening_next_station = true -} - -// EveningNextStationCleared reports if the "evening_next_station" edge to the Station entity was cleared. -func (m *StationMutation) EveningNextStationCleared() bool { - return m.clearedevening_next_station -} - -// RemoveEveningNextStationIDs removes the "evening_next_station" edge to the Station entity by IDs. -func (m *StationMutation) RemoveEveningNextStationIDs(ids ...uuid.UUID) { - if m.removedevening_next_station == nil { - m.removedevening_next_station = make(map[uuid.UUID]struct{}) - } - for i := range ids { - delete(m.evening_next_station, ids[i]) - m.removedevening_next_station[ids[i]] = struct{}{} - } -} - -// RemovedEveningNextStation returns the removed IDs of the "evening_next_station" edge to the Station entity. -func (m *StationMutation) RemovedEveningNextStationIDs() (ids []uuid.UUID) { - for id := range m.removedevening_next_station { - ids = append(ids, id) - } - return -} - -// EveningNextStationIDs returns the "evening_next_station" edge IDs in the mutation. -func (m *StationMutation) EveningNextStationIDs() (ids []uuid.UUID) { - for id := range m.evening_next_station { - ids = append(ids, id) - } - return -} - -// ResetEveningNextStation resets all changes to the "evening_next_station" edge. -func (m *StationMutation) ResetEveningNextStation() { - m.evening_next_station = nil - m.clearedevening_next_station = false - m.removedevening_next_station = nil -} - // AddNextForBusIDs adds the "next_for_buses" edge to the Bus entity by ids. func (m *StationMutation) AddNextForBusIDs(ids ...uuid.UUID) { if m.next_for_buses == nil { @@ -6664,112 +7318,58 @@ func (m *StationMutation) ResetNextForBuses() { m.removednext_for_buses = nil } -// AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by ids. -func (m *StationMutation) AddMorningFirstForBusIDs(ids ...uuid.UUID) { - if m.morning_first_for_buses == nil { - m.morning_first_for_buses = make(map[uuid.UUID]struct{}) - } - for i := range ids { - m.morning_first_for_buses[ids[i]] = struct{}{} - } -} - -// ClearMorningFirstForBuses clears the "morning_first_for_buses" edge to the Bus entity. -func (m *StationMutation) ClearMorningFirstForBuses() { - m.clearedmorning_first_for_buses = true -} - -// MorningFirstForBusesCleared reports if the "morning_first_for_buses" edge to the Bus entity was cleared. -func (m *StationMutation) MorningFirstForBusesCleared() bool { - return m.clearedmorning_first_for_buses -} - -// RemoveMorningFirstForBusIDs removes the "morning_first_for_buses" edge to the Bus entity by IDs. -func (m *StationMutation) RemoveMorningFirstForBusIDs(ids ...uuid.UUID) { - if m.removedmorning_first_for_buses == nil { - m.removedmorning_first_for_buses = make(map[uuid.UUID]struct{}) - } - for i := range ids { - delete(m.morning_first_for_buses, ids[i]) - m.removedmorning_first_for_buses[ids[i]] = struct{}{} - } -} - -// RemovedMorningFirstForBuses returns the removed IDs of the "morning_first_for_buses" edge to the Bus entity. -func (m *StationMutation) RemovedMorningFirstForBusesIDs() (ids []uuid.UUID) { - for id := range m.removedmorning_first_for_buses { - ids = append(ids, id) - } - return -} - -// MorningFirstForBusesIDs returns the "morning_first_for_buses" edge IDs in the mutation. -func (m *StationMutation) MorningFirstForBusesIDs() (ids []uuid.UUID) { - for id := range m.morning_first_for_buses { - ids = append(ids, id) - } - return -} - -// ResetMorningFirstForBuses resets all changes to the "morning_first_for_buses" edge. -func (m *StationMutation) ResetMorningFirstForBuses() { - m.morning_first_for_buses = nil - m.clearedmorning_first_for_buses = false - m.removedmorning_first_for_buses = nil -} - -// AddEveningFirstForBusIDs adds the "evening_first_for_buses" edge to the Bus entity by ids. -func (m *StationMutation) AddEveningFirstForBusIDs(ids ...uuid.UUID) { - if m.evening_first_for_buses == nil { - m.evening_first_for_buses = make(map[uuid.UUID]struct{}) +// AddBusRouteAssociationIDs adds the "busRouteAssociations" edge to the BusRouteAssociation entity by ids. +func (m *StationMutation) AddBusRouteAssociationIDs(ids ...int) { + if m.busRouteAssociations == nil { + m.busRouteAssociations = make(map[int]struct{}) } for i := range ids { - m.evening_first_for_buses[ids[i]] = struct{}{} + m.busRouteAssociations[ids[i]] = struct{}{} } } -// ClearEveningFirstForBuses clears the "evening_first_for_buses" edge to the Bus entity. -func (m *StationMutation) ClearEveningFirstForBuses() { - m.clearedevening_first_for_buses = true +// ClearBusRouteAssociations clears the "busRouteAssociations" edge to the BusRouteAssociation entity. +func (m *StationMutation) ClearBusRouteAssociations() { + m.clearedbusRouteAssociations = true } -// EveningFirstForBusesCleared reports if the "evening_first_for_buses" edge to the Bus entity was cleared. -func (m *StationMutation) EveningFirstForBusesCleared() bool { - return m.clearedevening_first_for_buses +// BusRouteAssociationsCleared reports if the "busRouteAssociations" edge to the BusRouteAssociation entity was cleared. +func (m *StationMutation) BusRouteAssociationsCleared() bool { + return m.clearedbusRouteAssociations } -// RemoveEveningFirstForBusIDs removes the "evening_first_for_buses" edge to the Bus entity by IDs. -func (m *StationMutation) RemoveEveningFirstForBusIDs(ids ...uuid.UUID) { - if m.removedevening_first_for_buses == nil { - m.removedevening_first_for_buses = make(map[uuid.UUID]struct{}) +// RemoveBusRouteAssociationIDs removes the "busRouteAssociations" edge to the BusRouteAssociation entity by IDs. +func (m *StationMutation) RemoveBusRouteAssociationIDs(ids ...int) { + if m.removedbusRouteAssociations == nil { + m.removedbusRouteAssociations = make(map[int]struct{}) } for i := range ids { - delete(m.evening_first_for_buses, ids[i]) - m.removedevening_first_for_buses[ids[i]] = struct{}{} + delete(m.busRouteAssociations, ids[i]) + m.removedbusRouteAssociations[ids[i]] = struct{}{} } } -// RemovedEveningFirstForBuses returns the removed IDs of the "evening_first_for_buses" edge to the Bus entity. -func (m *StationMutation) RemovedEveningFirstForBusesIDs() (ids []uuid.UUID) { - for id := range m.removedevening_first_for_buses { +// RemovedBusRouteAssociations returns the removed IDs of the "busRouteAssociations" edge to the BusRouteAssociation entity. +func (m *StationMutation) RemovedBusRouteAssociationsIDs() (ids []int) { + for id := range m.removedbusRouteAssociations { ids = append(ids, id) } return } -// EveningFirstForBusesIDs returns the "evening_first_for_buses" edge IDs in the mutation. -func (m *StationMutation) EveningFirstForBusesIDs() (ids []uuid.UUID) { - for id := range m.evening_first_for_buses { +// BusRouteAssociationsIDs returns the "busRouteAssociations" edge IDs in the mutation. +func (m *StationMutation) BusRouteAssociationsIDs() (ids []int) { + for id := range m.busRouteAssociations { ids = append(ids, id) } return } -// ResetEveningFirstForBuses resets all changes to the "evening_first_for_buses" edge. -func (m *StationMutation) ResetEveningFirstForBuses() { - m.evening_first_for_buses = nil - m.clearedevening_first_for_buses = false - m.removedevening_first_for_buses = nil +// ResetBusRouteAssociations resets all changes to the "busRouteAssociations" edge. +func (m *StationMutation) ResetBusRouteAssociations() { + m.busRouteAssociations = nil + m.clearedbusRouteAssociations = false + m.removedbusRouteAssociations = nil } // Where appends a list predicates to the StationMutation builder. @@ -6998,33 +7598,15 @@ func (m *StationMutation) ResetField(name string) error { // AddedEdges returns all edge names that were set/added in this mutation. func (m *StationMutation) AddedEdges() []string { - edges := make([]string, 0, 9) + edges := make([]string, 0, 3) if m.guardian != nil { edges = append(edges, station.EdgeGuardian) } - if m.bus != nil { - edges = append(edges, station.EdgeBus) - } - if m.morning_previous_station != nil { - edges = append(edges, station.EdgeMorningPreviousStation) - } - if m.morning_next_station != nil { - edges = append(edges, station.EdgeMorningNextStation) - } - if m.evening_previous_station != nil { - edges = append(edges, station.EdgeEveningPreviousStation) - } - if m.evening_next_station != nil { - edges = append(edges, station.EdgeEveningNextStation) - } if m.next_for_buses != nil { edges = append(edges, station.EdgeNextForBuses) } - if m.morning_first_for_buses != nil { - edges = append(edges, station.EdgeMorningFirstForBuses) - } - if m.evening_first_for_buses != nil { - edges = append(edges, station.EdgeEveningFirstForBuses) + if m.busRouteAssociations != nil { + edges = append(edges, station.EdgeBusRouteAssociations) } return edges } @@ -7037,47 +7619,15 @@ func (m *StationMutation) AddedIDs(name string) []ent.Value { if id := m.guardian; id != nil { return []ent.Value{*id} } - case station.EdgeBus: - ids := make([]ent.Value, 0, len(m.bus)) - for id := range m.bus { - ids = append(ids, id) - } - return ids - case station.EdgeMorningPreviousStation: - if id := m.morning_previous_station; id != nil { - return []ent.Value{*id} - } - case station.EdgeMorningNextStation: - ids := make([]ent.Value, 0, len(m.morning_next_station)) - for id := range m.morning_next_station { - ids = append(ids, id) - } - return ids - case station.EdgeEveningPreviousStation: - if id := m.evening_previous_station; id != nil { - return []ent.Value{*id} - } - case station.EdgeEveningNextStation: - ids := make([]ent.Value, 0, len(m.evening_next_station)) - for id := range m.evening_next_station { - ids = append(ids, id) - } - return ids case station.EdgeNextForBuses: ids := make([]ent.Value, 0, len(m.next_for_buses)) for id := range m.next_for_buses { ids = append(ids, id) } return ids - case station.EdgeMorningFirstForBuses: - ids := make([]ent.Value, 0, len(m.morning_first_for_buses)) - for id := range m.morning_first_for_buses { - ids = append(ids, id) - } - return ids - case station.EdgeEveningFirstForBuses: - ids := make([]ent.Value, 0, len(m.evening_first_for_buses)) - for id := range m.evening_first_for_buses { + case station.EdgeBusRouteAssociations: + ids := make([]ent.Value, 0, len(m.busRouteAssociations)) + for id := range m.busRouteAssociations { ids = append(ids, id) } return ids @@ -7087,24 +7637,12 @@ func (m *StationMutation) AddedIDs(name string) []ent.Value { // RemovedEdges returns all edge names that were removed in this mutation. func (m *StationMutation) RemovedEdges() []string { - edges := make([]string, 0, 9) - if m.removedbus != nil { - edges = append(edges, station.EdgeBus) - } - if m.removedmorning_next_station != nil { - edges = append(edges, station.EdgeMorningNextStation) - } - if m.removedevening_next_station != nil { - edges = append(edges, station.EdgeEveningNextStation) - } + edges := make([]string, 0, 3) if m.removednext_for_buses != nil { edges = append(edges, station.EdgeNextForBuses) } - if m.removedmorning_first_for_buses != nil { - edges = append(edges, station.EdgeMorningFirstForBuses) - } - if m.removedevening_first_for_buses != nil { - edges = append(edges, station.EdgeEveningFirstForBuses) + if m.removedbusRouteAssociations != nil { + edges = append(edges, station.EdgeBusRouteAssociations) } return edges } @@ -7113,39 +7651,15 @@ func (m *StationMutation) RemovedEdges() []string { // the given name in this mutation. func (m *StationMutation) RemovedIDs(name string) []ent.Value { switch name { - case station.EdgeBus: - ids := make([]ent.Value, 0, len(m.removedbus)) - for id := range m.removedbus { - ids = append(ids, id) - } - return ids - case station.EdgeMorningNextStation: - ids := make([]ent.Value, 0, len(m.removedmorning_next_station)) - for id := range m.removedmorning_next_station { - ids = append(ids, id) - } - return ids - case station.EdgeEveningNextStation: - ids := make([]ent.Value, 0, len(m.removedevening_next_station)) - for id := range m.removedevening_next_station { - ids = append(ids, id) - } - return ids case station.EdgeNextForBuses: ids := make([]ent.Value, 0, len(m.removednext_for_buses)) for id := range m.removednext_for_buses { ids = append(ids, id) } return ids - case station.EdgeMorningFirstForBuses: - ids := make([]ent.Value, 0, len(m.removedmorning_first_for_buses)) - for id := range m.removedmorning_first_for_buses { - ids = append(ids, id) - } - return ids - case station.EdgeEveningFirstForBuses: - ids := make([]ent.Value, 0, len(m.removedevening_first_for_buses)) - for id := range m.removedevening_first_for_buses { + case station.EdgeBusRouteAssociations: + ids := make([]ent.Value, 0, len(m.removedbusRouteAssociations)) + for id := range m.removedbusRouteAssociations { ids = append(ids, id) } return ids @@ -7155,33 +7669,15 @@ func (m *StationMutation) RemovedIDs(name string) []ent.Value { // ClearedEdges returns all edge names that were cleared in this mutation. func (m *StationMutation) ClearedEdges() []string { - edges := make([]string, 0, 9) + edges := make([]string, 0, 3) if m.clearedguardian { edges = append(edges, station.EdgeGuardian) } - if m.clearedbus { - edges = append(edges, station.EdgeBus) - } - if m.clearedmorning_previous_station { - edges = append(edges, station.EdgeMorningPreviousStation) - } - if m.clearedmorning_next_station { - edges = append(edges, station.EdgeMorningNextStation) - } - if m.clearedevening_previous_station { - edges = append(edges, station.EdgeEveningPreviousStation) - } - if m.clearedevening_next_station { - edges = append(edges, station.EdgeEveningNextStation) - } if m.clearednext_for_buses { edges = append(edges, station.EdgeNextForBuses) } - if m.clearedmorning_first_for_buses { - edges = append(edges, station.EdgeMorningFirstForBuses) - } - if m.clearedevening_first_for_buses { - edges = append(edges, station.EdgeEveningFirstForBuses) + if m.clearedbusRouteAssociations { + edges = append(edges, station.EdgeBusRouteAssociations) } return edges } @@ -7192,22 +7688,10 @@ func (m *StationMutation) EdgeCleared(name string) bool { switch name { case station.EdgeGuardian: return m.clearedguardian - case station.EdgeBus: - return m.clearedbus - case station.EdgeMorningPreviousStation: - return m.clearedmorning_previous_station - case station.EdgeMorningNextStation: - return m.clearedmorning_next_station - case station.EdgeEveningPreviousStation: - return m.clearedevening_previous_station - case station.EdgeEveningNextStation: - return m.clearedevening_next_station case station.EdgeNextForBuses: return m.clearednext_for_buses - case station.EdgeMorningFirstForBuses: - return m.clearedmorning_first_for_buses - case station.EdgeEveningFirstForBuses: - return m.clearedevening_first_for_buses + case station.EdgeBusRouteAssociations: + return m.clearedbusRouteAssociations } return false } @@ -7219,12 +7703,6 @@ func (m *StationMutation) ClearEdge(name string) error { case station.EdgeGuardian: m.ClearGuardian() return nil - case station.EdgeMorningPreviousStation: - m.ClearMorningPreviousStation() - return nil - case station.EdgeEveningPreviousStation: - m.ClearEveningPreviousStation() - return nil } return fmt.Errorf("unknown Station unique edge %s", name) } @@ -7236,29 +7714,11 @@ func (m *StationMutation) ResetEdge(name string) error { case station.EdgeGuardian: m.ResetGuardian() return nil - case station.EdgeBus: - m.ResetBus() - return nil - case station.EdgeMorningPreviousStation: - m.ResetMorningPreviousStation() - return nil - case station.EdgeMorningNextStation: - m.ResetMorningNextStation() - return nil - case station.EdgeEveningPreviousStation: - m.ResetEveningPreviousStation() - return nil - case station.EdgeEveningNextStation: - m.ResetEveningNextStation() - return nil case station.EdgeNextForBuses: m.ResetNextForBuses() return nil - case station.EdgeMorningFirstForBuses: - m.ResetMorningFirstForBuses() - return nil - case station.EdgeEveningFirstForBuses: - m.ResetEveningFirstForBuses() + case station.EdgeBusRouteAssociations: + m.ResetBusRouteAssociations() return nil } return fmt.Errorf("unknown Station edge %s", name) diff --git a/backend/domain/repository/ent/predicate/predicate.go b/backend/domain/repository/ent/predicate/predicate.go index 9f529600..1e29a729 100644 --- a/backend/domain/repository/ent/predicate/predicate.go +++ b/backend/domain/repository/ent/predicate/predicate.go @@ -12,6 +12,12 @@ type BoardingRecord func(*sql.Selector) // Bus is the predicate function for bus builders. type Bus func(*sql.Selector) +// BusRoute is the predicate function for busroute builders. +type BusRoute func(*sql.Selector) + +// BusRouteAssociation is the predicate function for busrouteassociation builders. +type BusRouteAssociation func(*sql.Selector) + // Child is the predicate function for child builders. type Child func(*sql.Selector) diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index 41fe4754..72df9d8b 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -7,6 +7,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childphoto" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" @@ -54,6 +55,12 @@ func init() { busDescID := busFields[0].Descriptor() // bus.DefaultID holds the default value on creation for the id field. bus.DefaultID = busDescID.Default.(func() uuid.UUID) + busrouteFields := schema.BusRoute{}.Fields() + _ = busrouteFields + // busrouteDescID is the schema descriptor for id field. + busrouteDescID := busrouteFields[0].Descriptor() + // busroute.DefaultID holds the default value on creation for the id field. + busroute.DefaultID = busrouteDescID.Default.(func() uuid.UUID) childFields := schema.Child{}.Fields() _ = childFields // childDescCheckForMissingItems is the schema descriptor for check_for_missing_items field. diff --git a/backend/domain/repository/ent/schema/bus.go b/backend/domain/repository/ent/schema/bus.go index 77d6df20..6748b4c1 100644 --- a/backend/domain/repository/ent/schema/bus.go +++ b/backend/domain/repository/ent/schema/bus.go @@ -34,14 +34,10 @@ func (Bus) Fields() []ent.Field { func (Bus) Edges() []ent.Edge { return []ent.Edge{ edge.To("nursery", Nursery.Type).Unique(), - edge.To("stations", Station.Type), edge.To("boarding_records", BoardingRecord.Type), - edge.To("childBusAssociations", ChildBusAssociation.Type), // バスが向かっている先のステーション edge.To("next_station", Station.Type).Unique(), - // 朝の最初のステーション - edge.To("morning_first_station", Station.Type).Unique(), - // 夕方の最初のステーション - edge.To("evening_first_station", Station.Type).Unique(), + edge.From("bus_route", BusRoute.Type). + Ref("bus"), } } diff --git a/backend/domain/repository/ent/schema/bus_route.go b/backend/domain/repository/ent/schema/bus_route.go new file mode 100644 index 00000000..b5aa3745 --- /dev/null +++ b/backend/domain/repository/ent/schema/bus_route.go @@ -0,0 +1,31 @@ +package schema + +import ( + "entgo.io/ent" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "github.com/google/uuid" +) + +// BusRoute holds the schema definition for the BusRoute entity. +type BusRoute struct { + ent.Schema +} + +// Fields of the BusRoute. +func (BusRoute) Fields() []ent.Field { + return []ent.Field{ + field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), + field.Enum("bus_type"). + Values("morning", "evening").Comment("朝のバスか放課後のバスかを示す"), + } +} + +// Edges of the BusRoute. +func (BusRoute) Edges() []ent.Edge { + return []ent.Edge{ + edge.To("bus", Bus.Type), + edge.To("childBusAssociations", ChildBusAssociation.Type), + edge.To("busRouteAssociations", BusRouteAssociation.Type), + } +} diff --git a/backend/domain/repository/ent/schema/bus_route_association.go b/backend/domain/repository/ent/schema/bus_route_association.go new file mode 100644 index 00000000..6a8937e6 --- /dev/null +++ b/backend/domain/repository/ent/schema/bus_route_association.go @@ -0,0 +1,38 @@ +package schema + +import ( + "entgo.io/ent" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "github.com/google/uuid" +) + +// BusRouteAssociation holds the schema definition for the association between Bus and BusRoute. +type BusRouteAssociation struct { + ent.Schema +} + +// Fields of the BusRouteAssociation. +func (BusRouteAssociation) Fields() []ent.Field { + return []ent.Field{ + field.UUID("station_id", uuid.UUID{}), + field.UUID("bus_route_id", uuid.UUID{}), + field.Int32("order"), + } +} + +// Edges of the BusRouteAssociation. +func (BusRouteAssociation) Edges() []ent.Edge { + return []ent.Edge{ + edge.From("station", Station.Type). + Ref("busRouteAssociations"). + Unique(). + Required(). + Field("station_id"), + edge.From("busRoute", BusRoute.Type). + Ref("busRouteAssociations"). + Unique(). + Required(). + Field("bus_route_id"), + } +} diff --git a/backend/domain/repository/ent/schema/child_bus_association.go b/backend/domain/repository/ent/schema/child_bus_association.go index 3645bd35..ee8ef89d 100644 --- a/backend/domain/repository/ent/schema/child_bus_association.go +++ b/backend/domain/repository/ent/schema/child_bus_association.go @@ -17,9 +17,7 @@ type ChildBusAssociation struct { func (ChildBusAssociation) Fields() []ent.Field { return []ent.Field{ field.UUID("child_id", uuid.UUID{}), - field.UUID("bus_id", uuid.UUID{}), - field.Enum("bus_type"). - Values("morning", "evening").Comment("朝のバスか放課後のバスかを示す"), + field.UUID("bus_route_id", uuid.UUID{}), } } @@ -31,10 +29,10 @@ func (ChildBusAssociation) Edges() []ent.Edge { Unique(). // 一つのChildBusAssociationは一人の子供に紐づく Required(). // 必ずChildBusAssociationが存在する Field("child_id"), - edge.From("bus", Bus.Type). - Ref("childBusAssociations"). // Busエンティティ側の参照名を合わせる - Unique(). // 一つのChildBusAssociationは一台のバスに紐づく + edge.From("bus_route", BusRoute.Type). + Ref("childBusAssociations"). // BusRouteエンティティ側の参照名を合わせる + Unique(). // 一つのChildBusAssociationは一つのバスルートに紐づく Required(). // 必ずChildBusAssociationが存在する - Field("bus_id"), + Field("bus_route_id"), } } diff --git a/backend/domain/repository/ent/schema/station.go b/backend/domain/repository/ent/schema/station.go index 176e8b48..b361c7d2 100644 --- a/backend/domain/repository/ent/schema/station.go +++ b/backend/domain/repository/ent/schema/station.go @@ -31,24 +31,9 @@ func (Station) Edges() []ent.Edge { edge.From("guardian", Guardian.Type). Ref("station"). Unique(), - edge.From("bus", Bus.Type). - Ref("stations"), - // 朝の次のステーションへの自己参照エッジ - edge.To("morning_next_station", Station.Type). - From("morning_previous_station"). - Unique(), - // 夕方の次のステーションへの自己参照エッジ - edge.To("evening_next_station", Station.Type). - From("evening_previous_station"). - Unique(), // このステーションが「現在」の目的地であるバス edge.From("next_for_buses", Bus.Type). Ref("next_station"), - // このステーションが朝の最初のステーションであるバス - edge.From("morning_first_for_buses", Bus.Type). - Ref("morning_first_station"), - // このステーションが夕方の最初のステーションであるバス - edge.From("evening_first_for_buses", Bus.Type). - Ref("evening_first_station"), + edge.To("busRouteAssociations", BusRouteAssociation.Type), } } diff --git a/backend/domain/repository/ent/station.go b/backend/domain/repository/ent/station.go index cddfe6da..66be2750 100644 --- a/backend/domain/repository/ent/station.go +++ b/backend/domain/repository/ent/station.go @@ -29,36 +29,22 @@ type Station struct { UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the StationQuery when eager-loading is set. - Edges StationEdges `json:"edges"` - guardian_station *uuid.UUID - station_morning_next_station *uuid.UUID - station_evening_next_station *uuid.UUID - selectValues sql.SelectValues + Edges StationEdges `json:"edges"` + guardian_station *uuid.UUID + selectValues sql.SelectValues } // StationEdges holds the relations/edges for other nodes in the graph. type StationEdges struct { // Guardian holds the value of the guardian edge. Guardian *Guardian `json:"guardian,omitempty"` - // Bus holds the value of the bus edge. - Bus []*Bus `json:"bus,omitempty"` - // MorningPreviousStation holds the value of the morning_previous_station edge. - MorningPreviousStation *Station `json:"morning_previous_station,omitempty"` - // MorningNextStation holds the value of the morning_next_station edge. - MorningNextStation []*Station `json:"morning_next_station,omitempty"` - // EveningPreviousStation holds the value of the evening_previous_station edge. - EveningPreviousStation *Station `json:"evening_previous_station,omitempty"` - // EveningNextStation holds the value of the evening_next_station edge. - EveningNextStation []*Station `json:"evening_next_station,omitempty"` // NextForBuses holds the value of the next_for_buses edge. NextForBuses []*Bus `json:"next_for_buses,omitempty"` - // MorningFirstForBuses holds the value of the morning_first_for_buses edge. - MorningFirstForBuses []*Bus `json:"morning_first_for_buses,omitempty"` - // EveningFirstForBuses holds the value of the evening_first_for_buses edge. - EveningFirstForBuses []*Bus `json:"evening_first_for_buses,omitempty"` + // BusRouteAssociations holds the value of the busRouteAssociations edge. + BusRouteAssociations []*BusRouteAssociation `json:"busRouteAssociations,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. - loadedTypes [9]bool + loadedTypes [3]bool } // GuardianOrErr returns the Guardian value or an error if the edge @@ -74,84 +60,22 @@ func (e StationEdges) GuardianOrErr() (*Guardian, error) { return nil, &NotLoadedError{edge: "guardian"} } -// BusOrErr returns the Bus value or an error if the edge -// was not loaded in eager-loading. -func (e StationEdges) BusOrErr() ([]*Bus, error) { - if e.loadedTypes[1] { - return e.Bus, nil - } - return nil, &NotLoadedError{edge: "bus"} -} - -// MorningPreviousStationOrErr returns the MorningPreviousStation value or an error if the edge -// was not loaded in eager-loading, or loaded but was not found. -func (e StationEdges) MorningPreviousStationOrErr() (*Station, error) { - if e.loadedTypes[2] { - if e.MorningPreviousStation == nil { - // Edge was loaded but was not found. - return nil, &NotFoundError{label: station.Label} - } - return e.MorningPreviousStation, nil - } - return nil, &NotLoadedError{edge: "morning_previous_station"} -} - -// MorningNextStationOrErr returns the MorningNextStation value or an error if the edge -// was not loaded in eager-loading. -func (e StationEdges) MorningNextStationOrErr() ([]*Station, error) { - if e.loadedTypes[3] { - return e.MorningNextStation, nil - } - return nil, &NotLoadedError{edge: "morning_next_station"} -} - -// EveningPreviousStationOrErr returns the EveningPreviousStation value or an error if the edge -// was not loaded in eager-loading, or loaded but was not found. -func (e StationEdges) EveningPreviousStationOrErr() (*Station, error) { - if e.loadedTypes[4] { - if e.EveningPreviousStation == nil { - // Edge was loaded but was not found. - return nil, &NotFoundError{label: station.Label} - } - return e.EveningPreviousStation, nil - } - return nil, &NotLoadedError{edge: "evening_previous_station"} -} - -// EveningNextStationOrErr returns the EveningNextStation value or an error if the edge -// was not loaded in eager-loading. -func (e StationEdges) EveningNextStationOrErr() ([]*Station, error) { - if e.loadedTypes[5] { - return e.EveningNextStation, nil - } - return nil, &NotLoadedError{edge: "evening_next_station"} -} - // NextForBusesOrErr returns the NextForBuses value or an error if the edge // was not loaded in eager-loading. func (e StationEdges) NextForBusesOrErr() ([]*Bus, error) { - if e.loadedTypes[6] { + if e.loadedTypes[1] { return e.NextForBuses, nil } return nil, &NotLoadedError{edge: "next_for_buses"} } -// MorningFirstForBusesOrErr returns the MorningFirstForBuses value or an error if the edge +// BusRouteAssociationsOrErr returns the BusRouteAssociations value or an error if the edge // was not loaded in eager-loading. -func (e StationEdges) MorningFirstForBusesOrErr() ([]*Bus, error) { - if e.loadedTypes[7] { - return e.MorningFirstForBuses, nil - } - return nil, &NotLoadedError{edge: "morning_first_for_buses"} -} - -// EveningFirstForBusesOrErr returns the EveningFirstForBuses value or an error if the edge -// was not loaded in eager-loading. -func (e StationEdges) EveningFirstForBusesOrErr() ([]*Bus, error) { - if e.loadedTypes[8] { - return e.EveningFirstForBuses, nil +func (e StationEdges) BusRouteAssociationsOrErr() ([]*BusRouteAssociation, error) { + if e.loadedTypes[2] { + return e.BusRouteAssociations, nil } - return nil, &NotLoadedError{edge: "evening_first_for_buses"} + return nil, &NotLoadedError{edge: "busRouteAssociations"} } // scanValues returns the types for scanning values from sql.Rows. @@ -167,10 +91,6 @@ func (*Station) scanValues(columns []string) ([]any, error) { values[i] = new(uuid.UUID) case station.ForeignKeys[0]: // guardian_station values[i] = &sql.NullScanner{S: new(uuid.UUID)} - case station.ForeignKeys[1]: // station_morning_next_station - values[i] = &sql.NullScanner{S: new(uuid.UUID)} - case station.ForeignKeys[2]: // station_evening_next_station - values[i] = &sql.NullScanner{S: new(uuid.UUID)} default: values[i] = new(sql.UnknownType) } @@ -223,20 +143,6 @@ func (s *Station) assignValues(columns []string, values []any) error { s.guardian_station = new(uuid.UUID) *s.guardian_station = *value.S.(*uuid.UUID) } - case station.ForeignKeys[1]: - if value, ok := values[i].(*sql.NullScanner); !ok { - return fmt.Errorf("unexpected type %T for field station_morning_next_station", values[i]) - } else if value.Valid { - s.station_morning_next_station = new(uuid.UUID) - *s.station_morning_next_station = *value.S.(*uuid.UUID) - } - case station.ForeignKeys[2]: - if value, ok := values[i].(*sql.NullScanner); !ok { - return fmt.Errorf("unexpected type %T for field station_evening_next_station", values[i]) - } else if value.Valid { - s.station_evening_next_station = new(uuid.UUID) - *s.station_evening_next_station = *value.S.(*uuid.UUID) - } default: s.selectValues.Set(columns[i], values[i]) } @@ -255,44 +161,14 @@ func (s *Station) QueryGuardian() *GuardianQuery { return NewStationClient(s.config).QueryGuardian(s) } -// QueryBus queries the "bus" edge of the Station entity. -func (s *Station) QueryBus() *BusQuery { - return NewStationClient(s.config).QueryBus(s) -} - -// QueryMorningPreviousStation queries the "morning_previous_station" edge of the Station entity. -func (s *Station) QueryMorningPreviousStation() *StationQuery { - return NewStationClient(s.config).QueryMorningPreviousStation(s) -} - -// QueryMorningNextStation queries the "morning_next_station" edge of the Station entity. -func (s *Station) QueryMorningNextStation() *StationQuery { - return NewStationClient(s.config).QueryMorningNextStation(s) -} - -// QueryEveningPreviousStation queries the "evening_previous_station" edge of the Station entity. -func (s *Station) QueryEveningPreviousStation() *StationQuery { - return NewStationClient(s.config).QueryEveningPreviousStation(s) -} - -// QueryEveningNextStation queries the "evening_next_station" edge of the Station entity. -func (s *Station) QueryEveningNextStation() *StationQuery { - return NewStationClient(s.config).QueryEveningNextStation(s) -} - // QueryNextForBuses queries the "next_for_buses" edge of the Station entity. func (s *Station) QueryNextForBuses() *BusQuery { return NewStationClient(s.config).QueryNextForBuses(s) } -// QueryMorningFirstForBuses queries the "morning_first_for_buses" edge of the Station entity. -func (s *Station) QueryMorningFirstForBuses() *BusQuery { - return NewStationClient(s.config).QueryMorningFirstForBuses(s) -} - -// QueryEveningFirstForBuses queries the "evening_first_for_buses" edge of the Station entity. -func (s *Station) QueryEveningFirstForBuses() *BusQuery { - return NewStationClient(s.config).QueryEveningFirstForBuses(s) +// QueryBusRouteAssociations queries the "busRouteAssociations" edge of the Station entity. +func (s *Station) QueryBusRouteAssociations() *BusRouteAssociationQuery { + return NewStationClient(s.config).QueryBusRouteAssociations(s) } // Update returns a builder for updating this Station. diff --git a/backend/domain/repository/ent/station/station.go b/backend/domain/repository/ent/station/station.go index 5996e29c..a205e5d0 100644 --- a/backend/domain/repository/ent/station/station.go +++ b/backend/domain/repository/ent/station/station.go @@ -25,22 +25,10 @@ const ( FieldUpdatedAt = "updated_at" // EdgeGuardian holds the string denoting the guardian edge name in mutations. EdgeGuardian = "guardian" - // EdgeBus holds the string denoting the bus edge name in mutations. - EdgeBus = "bus" - // EdgeMorningPreviousStation holds the string denoting the morning_previous_station edge name in mutations. - EdgeMorningPreviousStation = "morning_previous_station" - // EdgeMorningNextStation holds the string denoting the morning_next_station edge name in mutations. - EdgeMorningNextStation = "morning_next_station" - // EdgeEveningPreviousStation holds the string denoting the evening_previous_station edge name in mutations. - EdgeEveningPreviousStation = "evening_previous_station" - // EdgeEveningNextStation holds the string denoting the evening_next_station edge name in mutations. - EdgeEveningNextStation = "evening_next_station" // EdgeNextForBuses holds the string denoting the next_for_buses edge name in mutations. EdgeNextForBuses = "next_for_buses" - // EdgeMorningFirstForBuses holds the string denoting the morning_first_for_buses edge name in mutations. - EdgeMorningFirstForBuses = "morning_first_for_buses" - // EdgeEveningFirstForBuses holds the string denoting the evening_first_for_buses edge name in mutations. - EdgeEveningFirstForBuses = "evening_first_for_buses" + // EdgeBusRouteAssociations holds the string denoting the busrouteassociations edge name in mutations. + EdgeBusRouteAssociations = "busRouteAssociations" // Table holds the table name of the station in the database. Table = "stations" // GuardianTable is the table that holds the guardian relation/edge. @@ -50,27 +38,6 @@ const ( GuardianInverseTable = "guardians" // GuardianColumn is the table column denoting the guardian relation/edge. GuardianColumn = "guardian_station" - // BusTable is the table that holds the bus relation/edge. The primary key declared below. - BusTable = "bus_stations" - // BusInverseTable is the table name for the Bus entity. - // It exists in this package in order to avoid circular dependency with the "bus" package. - BusInverseTable = "bus" - // MorningPreviousStationTable is the table that holds the morning_previous_station relation/edge. - MorningPreviousStationTable = "stations" - // MorningPreviousStationColumn is the table column denoting the morning_previous_station relation/edge. - MorningPreviousStationColumn = "station_morning_next_station" - // MorningNextStationTable is the table that holds the morning_next_station relation/edge. - MorningNextStationTable = "stations" - // MorningNextStationColumn is the table column denoting the morning_next_station relation/edge. - MorningNextStationColumn = "station_morning_next_station" - // EveningPreviousStationTable is the table that holds the evening_previous_station relation/edge. - EveningPreviousStationTable = "stations" - // EveningPreviousStationColumn is the table column denoting the evening_previous_station relation/edge. - EveningPreviousStationColumn = "station_evening_next_station" - // EveningNextStationTable is the table that holds the evening_next_station relation/edge. - EveningNextStationTable = "stations" - // EveningNextStationColumn is the table column denoting the evening_next_station relation/edge. - EveningNextStationColumn = "station_evening_next_station" // NextForBusesTable is the table that holds the next_for_buses relation/edge. NextForBusesTable = "bus" // NextForBusesInverseTable is the table name for the Bus entity. @@ -78,20 +45,13 @@ const ( NextForBusesInverseTable = "bus" // NextForBusesColumn is the table column denoting the next_for_buses relation/edge. NextForBusesColumn = "bus_next_station" - // MorningFirstForBusesTable is the table that holds the morning_first_for_buses relation/edge. - MorningFirstForBusesTable = "bus" - // MorningFirstForBusesInverseTable is the table name for the Bus entity. - // It exists in this package in order to avoid circular dependency with the "bus" package. - MorningFirstForBusesInverseTable = "bus" - // MorningFirstForBusesColumn is the table column denoting the morning_first_for_buses relation/edge. - MorningFirstForBusesColumn = "bus_morning_first_station" - // EveningFirstForBusesTable is the table that holds the evening_first_for_buses relation/edge. - EveningFirstForBusesTable = "bus" - // EveningFirstForBusesInverseTable is the table name for the Bus entity. - // It exists in this package in order to avoid circular dependency with the "bus" package. - EveningFirstForBusesInverseTable = "bus" - // EveningFirstForBusesColumn is the table column denoting the evening_first_for_buses relation/edge. - EveningFirstForBusesColumn = "bus_evening_first_station" + // BusRouteAssociationsTable is the table that holds the busRouteAssociations relation/edge. + BusRouteAssociationsTable = "bus_route_associations" + // BusRouteAssociationsInverseTable is the table name for the BusRouteAssociation entity. + // It exists in this package in order to avoid circular dependency with the "busrouteassociation" package. + BusRouteAssociationsInverseTable = "bus_route_associations" + // BusRouteAssociationsColumn is the table column denoting the busRouteAssociations relation/edge. + BusRouteAssociationsColumn = "station_id" ) // Columns holds all SQL columns for station fields. @@ -107,16 +67,8 @@ var Columns = []string{ // table and are not defined as standalone fields in the schema. var ForeignKeys = []string{ "guardian_station", - "station_morning_next_station", - "station_evening_next_station", } -var ( - // BusPrimaryKey and BusColumn2 are the table columns denoting the - // primary key for the bus relation (M2M). - BusPrimaryKey = []string{"bus_id", "station_id"} -) - // ValidColumn reports if the column name is valid (part of the table columns). func ValidColumn(column string) bool { for i := range Columns { @@ -182,62 +134,6 @@ func ByGuardianField(field string, opts ...sql.OrderTermOption) OrderOption { } } -// ByBusCount orders the results by bus count. -func ByBusCount(opts ...sql.OrderTermOption) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborsCount(s, newBusStep(), opts...) - } -} - -// ByBus orders the results by bus terms. -func ByBus(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newBusStep(), append([]sql.OrderTerm{term}, terms...)...) - } -} - -// ByMorningPreviousStationField orders the results by morning_previous_station field. -func ByMorningPreviousStationField(field string, opts ...sql.OrderTermOption) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newMorningPreviousStationStep(), sql.OrderByField(field, opts...)) - } -} - -// ByMorningNextStationCount orders the results by morning_next_station count. -func ByMorningNextStationCount(opts ...sql.OrderTermOption) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborsCount(s, newMorningNextStationStep(), opts...) - } -} - -// ByMorningNextStation orders the results by morning_next_station terms. -func ByMorningNextStation(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newMorningNextStationStep(), append([]sql.OrderTerm{term}, terms...)...) - } -} - -// ByEveningPreviousStationField orders the results by evening_previous_station field. -func ByEveningPreviousStationField(field string, opts ...sql.OrderTermOption) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newEveningPreviousStationStep(), sql.OrderByField(field, opts...)) - } -} - -// ByEveningNextStationCount orders the results by evening_next_station count. -func ByEveningNextStationCount(opts ...sql.OrderTermOption) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborsCount(s, newEveningNextStationStep(), opts...) - } -} - -// ByEveningNextStation orders the results by evening_next_station terms. -func ByEveningNextStation(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newEveningNextStationStep(), append([]sql.OrderTerm{term}, terms...)...) - } -} - // ByNextForBusesCount orders the results by next_for_buses count. func ByNextForBusesCount(opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { @@ -252,31 +148,17 @@ func ByNextForBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { } } -// ByMorningFirstForBusesCount orders the results by morning_first_for_buses count. -func ByMorningFirstForBusesCount(opts ...sql.OrderTermOption) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborsCount(s, newMorningFirstForBusesStep(), opts...) - } -} - -// ByMorningFirstForBuses orders the results by morning_first_for_buses terms. -func ByMorningFirstForBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { - return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newMorningFirstForBusesStep(), append([]sql.OrderTerm{term}, terms...)...) - } -} - -// ByEveningFirstForBusesCount orders the results by evening_first_for_buses count. -func ByEveningFirstForBusesCount(opts ...sql.OrderTermOption) OrderOption { +// ByBusRouteAssociationsCount orders the results by busRouteAssociations count. +func ByBusRouteAssociationsCount(opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { - sqlgraph.OrderByNeighborsCount(s, newEveningFirstForBusesStep(), opts...) + sqlgraph.OrderByNeighborsCount(s, newBusRouteAssociationsStep(), opts...) } } -// ByEveningFirstForBuses orders the results by evening_first_for_buses terms. -func ByEveningFirstForBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { +// ByBusRouteAssociations orders the results by busRouteAssociations terms. +func ByBusRouteAssociations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { return func(s *sql.Selector) { - sqlgraph.OrderByNeighborTerms(s, newEveningFirstForBusesStep(), append([]sql.OrderTerm{term}, terms...)...) + sqlgraph.OrderByNeighborTerms(s, newBusRouteAssociationsStep(), append([]sql.OrderTerm{term}, terms...)...) } } func newGuardianStep() *sqlgraph.Step { @@ -286,41 +168,6 @@ func newGuardianStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.O2O, true, GuardianTable, GuardianColumn), ) } -func newBusStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(BusInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.M2M, true, BusTable, BusPrimaryKey...), - ) -} -func newMorningPreviousStationStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, MorningPreviousStationTable, MorningPreviousStationColumn), - ) -} -func newMorningNextStationStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(Table, FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, MorningNextStationTable, MorningNextStationColumn), - ) -} -func newEveningPreviousStationStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, EveningPreviousStationTable, EveningPreviousStationColumn), - ) -} -func newEveningNextStationStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(Table, FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, EveningNextStationTable, EveningNextStationColumn), - ) -} func newNextForBusesStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), @@ -328,17 +175,10 @@ func newNextForBusesStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.O2M, true, NextForBusesTable, NextForBusesColumn), ) } -func newMorningFirstForBusesStep() *sqlgraph.Step { - return sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.To(MorningFirstForBusesInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, MorningFirstForBusesTable, MorningFirstForBusesColumn), - ) -} -func newEveningFirstForBusesStep() *sqlgraph.Step { +func newBusRouteAssociationsStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(EveningFirstForBusesInverseTable, FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, EveningFirstForBusesTable, EveningFirstForBusesColumn), + sqlgraph.To(BusRouteAssociationsInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, BusRouteAssociationsTable, BusRouteAssociationsColumn), ) } diff --git a/backend/domain/repository/ent/station/where.go b/backend/domain/repository/ent/station/where.go index fcdb0e63..2aeeeceb 100644 --- a/backend/domain/repository/ent/station/where.go +++ b/backend/domain/repository/ent/station/where.go @@ -279,121 +279,6 @@ func HasGuardianWith(preds ...predicate.Guardian) predicate.Station { }) } -// HasBus applies the HasEdge predicate on the "bus" edge. -func HasBus() predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2M, true, BusTable, BusPrimaryKey...), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasBusWith applies the HasEdge predicate on the "bus" edge with a given conditions (other predicates). -func HasBusWith(preds ...predicate.Bus) predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := newBusStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - -// HasMorningPreviousStation applies the HasEdge predicate on the "morning_previous_station" edge. -func HasMorningPreviousStation() predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, MorningPreviousStationTable, MorningPreviousStationColumn), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasMorningPreviousStationWith applies the HasEdge predicate on the "morning_previous_station" edge with a given conditions (other predicates). -func HasMorningPreviousStationWith(preds ...predicate.Station) predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := newMorningPreviousStationStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - -// HasMorningNextStation applies the HasEdge predicate on the "morning_next_station" edge. -func HasMorningNextStation() predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, MorningNextStationTable, MorningNextStationColumn), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasMorningNextStationWith applies the HasEdge predicate on the "morning_next_station" edge with a given conditions (other predicates). -func HasMorningNextStationWith(preds ...predicate.Station) predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := newMorningNextStationStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - -// HasEveningPreviousStation applies the HasEdge predicate on the "evening_previous_station" edge. -func HasEveningPreviousStation() predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, EveningPreviousStationTable, EveningPreviousStationColumn), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasEveningPreviousStationWith applies the HasEdge predicate on the "evening_previous_station" edge with a given conditions (other predicates). -func HasEveningPreviousStationWith(preds ...predicate.Station) predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := newEveningPreviousStationStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - -// HasEveningNextStation applies the HasEdge predicate on the "evening_next_station" edge. -func HasEveningNextStation() predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, EveningNextStationTable, EveningNextStationColumn), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasEveningNextStationWith applies the HasEdge predicate on the "evening_next_station" edge with a given conditions (other predicates). -func HasEveningNextStationWith(preds ...predicate.Station) predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := newEveningNextStationStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - // HasNextForBuses applies the HasEdge predicate on the "next_for_buses" edge. func HasNextForBuses() predicate.Station { return predicate.Station(func(s *sql.Selector) { @@ -417,44 +302,21 @@ func HasNextForBusesWith(preds ...predicate.Bus) predicate.Station { }) } -// HasMorningFirstForBuses applies the HasEdge predicate on the "morning_first_for_buses" edge. -func HasMorningFirstForBuses() predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := sqlgraph.NewStep( - sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, MorningFirstForBusesTable, MorningFirstForBusesColumn), - ) - sqlgraph.HasNeighbors(s, step) - }) -} - -// HasMorningFirstForBusesWith applies the HasEdge predicate on the "morning_first_for_buses" edge with a given conditions (other predicates). -func HasMorningFirstForBusesWith(preds ...predicate.Bus) predicate.Station { - return predicate.Station(func(s *sql.Selector) { - step := newMorningFirstForBusesStep() - sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { - for _, p := range preds { - p(s) - } - }) - }) -} - -// HasEveningFirstForBuses applies the HasEdge predicate on the "evening_first_for_buses" edge. -func HasEveningFirstForBuses() predicate.Station { +// HasBusRouteAssociations applies the HasEdge predicate on the "busRouteAssociations" edge. +func HasBusRouteAssociations() predicate.Station { return predicate.Station(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, EveningFirstForBusesTable, EveningFirstForBusesColumn), + sqlgraph.Edge(sqlgraph.O2M, false, BusRouteAssociationsTable, BusRouteAssociationsColumn), ) sqlgraph.HasNeighbors(s, step) }) } -// HasEveningFirstForBusesWith applies the HasEdge predicate on the "evening_first_for_buses" edge with a given conditions (other predicates). -func HasEveningFirstForBusesWith(preds ...predicate.Bus) predicate.Station { +// HasBusRouteAssociationsWith applies the HasEdge predicate on the "busRouteAssociations" edge with a given conditions (other predicates). +func HasBusRouteAssociationsWith(preds ...predicate.BusRouteAssociation) predicate.Station { return predicate.Station(func(s *sql.Selector) { - step := newEveningFirstForBusesStep() + step := newBusRouteAssociationsStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) diff --git a/backend/domain/repository/ent/station_create.go b/backend/domain/repository/ent/station_create.go index a3011899..3b3aaa8c 100644 --- a/backend/domain/repository/ent/station_create.go +++ b/backend/domain/repository/ent/station_create.go @@ -11,6 +11,7 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" "github.com/google/uuid" @@ -112,89 +113,6 @@ func (sc *StationCreate) SetGuardian(g *Guardian) *StationCreate { return sc.SetGuardianID(g.ID) } -// AddBuIDs adds the "bus" edge to the Bus entity by IDs. -func (sc *StationCreate) AddBuIDs(ids ...uuid.UUID) *StationCreate { - sc.mutation.AddBuIDs(ids...) - return sc -} - -// AddBus adds the "bus" edges to the Bus entity. -func (sc *StationCreate) AddBus(b ...*Bus) *StationCreate { - ids := make([]uuid.UUID, len(b)) - for i := range b { - ids[i] = b[i].ID - } - return sc.AddBuIDs(ids...) -} - -// SetMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID. -func (sc *StationCreate) SetMorningPreviousStationID(id uuid.UUID) *StationCreate { - sc.mutation.SetMorningPreviousStationID(id) - return sc -} - -// SetNillableMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID if the given value is not nil. -func (sc *StationCreate) SetNillableMorningPreviousStationID(id *uuid.UUID) *StationCreate { - if id != nil { - sc = sc.SetMorningPreviousStationID(*id) - } - return sc -} - -// SetMorningPreviousStation sets the "morning_previous_station" edge to the Station entity. -func (sc *StationCreate) SetMorningPreviousStation(s *Station) *StationCreate { - return sc.SetMorningPreviousStationID(s.ID) -} - -// AddMorningNextStationIDs adds the "morning_next_station" edge to the Station entity by IDs. -func (sc *StationCreate) AddMorningNextStationIDs(ids ...uuid.UUID) *StationCreate { - sc.mutation.AddMorningNextStationIDs(ids...) - return sc -} - -// AddMorningNextStation adds the "morning_next_station" edges to the Station entity. -func (sc *StationCreate) AddMorningNextStation(s ...*Station) *StationCreate { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return sc.AddMorningNextStationIDs(ids...) -} - -// SetEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID. -func (sc *StationCreate) SetEveningPreviousStationID(id uuid.UUID) *StationCreate { - sc.mutation.SetEveningPreviousStationID(id) - return sc -} - -// SetNillableEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID if the given value is not nil. -func (sc *StationCreate) SetNillableEveningPreviousStationID(id *uuid.UUID) *StationCreate { - if id != nil { - sc = sc.SetEveningPreviousStationID(*id) - } - return sc -} - -// SetEveningPreviousStation sets the "evening_previous_station" edge to the Station entity. -func (sc *StationCreate) SetEveningPreviousStation(s *Station) *StationCreate { - return sc.SetEveningPreviousStationID(s.ID) -} - -// AddEveningNextStationIDs adds the "evening_next_station" edge to the Station entity by IDs. -func (sc *StationCreate) AddEveningNextStationIDs(ids ...uuid.UUID) *StationCreate { - sc.mutation.AddEveningNextStationIDs(ids...) - return sc -} - -// AddEveningNextStation adds the "evening_next_station" edges to the Station entity. -func (sc *StationCreate) AddEveningNextStation(s ...*Station) *StationCreate { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return sc.AddEveningNextStationIDs(ids...) -} - // AddNextForBusIDs adds the "next_for_buses" edge to the Bus entity by IDs. func (sc *StationCreate) AddNextForBusIDs(ids ...uuid.UUID) *StationCreate { sc.mutation.AddNextForBusIDs(ids...) @@ -210,34 +128,19 @@ func (sc *StationCreate) AddNextForBuses(b ...*Bus) *StationCreate { return sc.AddNextForBusIDs(ids...) } -// AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by IDs. -func (sc *StationCreate) AddMorningFirstForBusIDs(ids ...uuid.UUID) *StationCreate { - sc.mutation.AddMorningFirstForBusIDs(ids...) +// AddBusRouteAssociationIDs adds the "busRouteAssociations" edge to the BusRouteAssociation entity by IDs. +func (sc *StationCreate) AddBusRouteAssociationIDs(ids ...int) *StationCreate { + sc.mutation.AddBusRouteAssociationIDs(ids...) return sc } -// AddMorningFirstForBuses adds the "morning_first_for_buses" edges to the Bus entity. -func (sc *StationCreate) AddMorningFirstForBuses(b ...*Bus) *StationCreate { - ids := make([]uuid.UUID, len(b)) +// AddBusRouteAssociations adds the "busRouteAssociations" edges to the BusRouteAssociation entity. +func (sc *StationCreate) AddBusRouteAssociations(b ...*BusRouteAssociation) *StationCreate { + ids := make([]int, len(b)) for i := range b { ids[i] = b[i].ID } - return sc.AddMorningFirstForBusIDs(ids...) -} - -// AddEveningFirstForBusIDs adds the "evening_first_for_buses" edge to the Bus entity by IDs. -func (sc *StationCreate) AddEveningFirstForBusIDs(ids ...uuid.UUID) *StationCreate { - sc.mutation.AddEveningFirstForBusIDs(ids...) - return sc -} - -// AddEveningFirstForBuses adds the "evening_first_for_buses" edges to the Bus entity. -func (sc *StationCreate) AddEveningFirstForBuses(b ...*Bus) *StationCreate { - ids := make([]uuid.UUID, len(b)) - for i := range b { - ids[i] = b[i].ID - } - return sc.AddEveningFirstForBusIDs(ids...) + return sc.AddBusRouteAssociationIDs(ids...) } // Mutation returns the StationMutation object of the builder. @@ -373,88 +276,6 @@ func (sc *StationCreate) createSpec() (*Station, *sqlgraph.CreateSpec) { _node.guardian_station = &nodes[0] _spec.Edges = append(_spec.Edges, edge) } - if nodes := sc.mutation.BusIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: true, - Table: station.BusTable, - Columns: station.BusPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges = append(_spec.Edges, edge) - } - if nodes := sc.mutation.MorningPreviousStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: true, - Table: station.MorningPreviousStationTable, - Columns: []string{station.MorningPreviousStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _node.station_morning_next_station = &nodes[0] - _spec.Edges = append(_spec.Edges, edge) - } - if nodes := sc.mutation.MorningNextStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.MorningNextStationTable, - Columns: []string{station.MorningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges = append(_spec.Edges, edge) - } - if nodes := sc.mutation.EveningPreviousStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: true, - Table: station.EveningPreviousStationTable, - Columns: []string{station.EveningPreviousStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _node.station_evening_next_station = &nodes[0] - _spec.Edges = append(_spec.Edges, edge) - } - if nodes := sc.mutation.EveningNextStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.EveningNextStationTable, - Columns: []string{station.EveningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges = append(_spec.Edges, edge) - } if nodes := sc.mutation.NextForBusesIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, @@ -471,31 +292,15 @@ func (sc *StationCreate) createSpec() (*Station, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } - if nodes := sc.mutation.MorningFirstForBusesIDs(); len(nodes) > 0 { + if nodes := sc.mutation.BusRouteAssociationsIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, - Inverse: true, - Table: station.MorningFirstForBusesTable, - Columns: []string{station.MorningFirstForBusesColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges = append(_spec.Edges, edge) - } - if nodes := sc.mutation.EveningFirstForBusesIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: station.EveningFirstForBusesTable, - Columns: []string{station.EveningFirstForBusesColumn}, + Inverse: false, + Table: station.BusRouteAssociationsTable, + Columns: []string{station.BusRouteAssociationsColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), }, } for _, k := range nodes { diff --git a/backend/domain/repository/ent/station_query.go b/backend/domain/repository/ent/station_query.go index e5995c82..051f8fe7 100644 --- a/backend/domain/repository/ent/station_query.go +++ b/backend/domain/repository/ent/station_query.go @@ -12,6 +12,7 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" @@ -21,20 +22,14 @@ import ( // StationQuery is the builder for querying Station entities. type StationQuery struct { config - ctx *QueryContext - order []station.OrderOption - inters []Interceptor - predicates []predicate.Station - withGuardian *GuardianQuery - withBus *BusQuery - withMorningPreviousStation *StationQuery - withMorningNextStation *StationQuery - withEveningPreviousStation *StationQuery - withEveningNextStation *StationQuery - withNextForBuses *BusQuery - withMorningFirstForBuses *BusQuery - withEveningFirstForBuses *BusQuery - withFKs bool + ctx *QueryContext + order []station.OrderOption + inters []Interceptor + predicates []predicate.Station + withGuardian *GuardianQuery + withNextForBuses *BusQuery + withBusRouteAssociations *BusRouteAssociationQuery + withFKs bool // intermediate query (i.e. traversal path). sql *sql.Selector path func(context.Context) (*sql.Selector, error) @@ -93,116 +88,6 @@ func (sq *StationQuery) QueryGuardian() *GuardianQuery { return query } -// QueryBus chains the current query on the "bus" edge. -func (sq *StationQuery) QueryBus() *BusQuery { - query := (&BusClient{config: sq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := sq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := sq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, selector), - sqlgraph.To(bus.Table, bus.FieldID), - sqlgraph.Edge(sqlgraph.M2M, true, station.BusTable, station.BusPrimaryKey...), - ) - fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) - return fromU, nil - } - return query -} - -// QueryMorningPreviousStation chains the current query on the "morning_previous_station" edge. -func (sq *StationQuery) QueryMorningPreviousStation() *StationQuery { - query := (&StationClient{config: sq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := sq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := sq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, selector), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, station.MorningPreviousStationTable, station.MorningPreviousStationColumn), - ) - fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) - return fromU, nil - } - return query -} - -// QueryMorningNextStation chains the current query on the "morning_next_station" edge. -func (sq *StationQuery) QueryMorningNextStation() *StationQuery { - query := (&StationClient{config: sq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := sq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := sq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, selector), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, station.MorningNextStationTable, station.MorningNextStationColumn), - ) - fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) - return fromU, nil - } - return query -} - -// QueryEveningPreviousStation chains the current query on the "evening_previous_station" edge. -func (sq *StationQuery) QueryEveningPreviousStation() *StationQuery { - query := (&StationClient{config: sq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := sq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := sq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, selector), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.M2O, true, station.EveningPreviousStationTable, station.EveningPreviousStationColumn), - ) - fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) - return fromU, nil - } - return query -} - -// QueryEveningNextStation chains the current query on the "evening_next_station" edge. -func (sq *StationQuery) QueryEveningNextStation() *StationQuery { - query := (&StationClient{config: sq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := sq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := sq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, selector), - sqlgraph.To(station.Table, station.FieldID), - sqlgraph.Edge(sqlgraph.O2M, false, station.EveningNextStationTable, station.EveningNextStationColumn), - ) - fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) - return fromU, nil - } - return query -} - // QueryNextForBuses chains the current query on the "next_for_buses" edge. func (sq *StationQuery) QueryNextForBuses() *BusQuery { query := (&BusClient{config: sq.config}).Query() @@ -225,31 +110,9 @@ func (sq *StationQuery) QueryNextForBuses() *BusQuery { return query } -// QueryMorningFirstForBuses chains the current query on the "morning_first_for_buses" edge. -func (sq *StationQuery) QueryMorningFirstForBuses() *BusQuery { - query := (&BusClient{config: sq.config}).Query() - query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { - if err := sq.prepareQuery(ctx); err != nil { - return nil, err - } - selector := sq.sqlQuery(ctx) - if err := selector.Err(); err != nil { - return nil, err - } - step := sqlgraph.NewStep( - sqlgraph.From(station.Table, station.FieldID, selector), - sqlgraph.To(bus.Table, bus.FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, station.MorningFirstForBusesTable, station.MorningFirstForBusesColumn), - ) - fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) - return fromU, nil - } - return query -} - -// QueryEveningFirstForBuses chains the current query on the "evening_first_for_buses" edge. -func (sq *StationQuery) QueryEveningFirstForBuses() *BusQuery { - query := (&BusClient{config: sq.config}).Query() +// QueryBusRouteAssociations chains the current query on the "busRouteAssociations" edge. +func (sq *StationQuery) QueryBusRouteAssociations() *BusRouteAssociationQuery { + query := (&BusRouteAssociationClient{config: sq.config}).Query() query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { if err := sq.prepareQuery(ctx); err != nil { return nil, err @@ -260,8 +123,8 @@ func (sq *StationQuery) QueryEveningFirstForBuses() *BusQuery { } step := sqlgraph.NewStep( sqlgraph.From(station.Table, station.FieldID, selector), - sqlgraph.To(bus.Table, bus.FieldID), - sqlgraph.Edge(sqlgraph.O2M, true, station.EveningFirstForBusesTable, station.EveningFirstForBusesColumn), + sqlgraph.To(busrouteassociation.Table, busrouteassociation.FieldID), + sqlgraph.Edge(sqlgraph.O2M, false, station.BusRouteAssociationsTable, station.BusRouteAssociationsColumn), ) fromU = sqlgraph.SetNeighbors(sq.driver.Dialect(), step) return fromU, nil @@ -456,20 +319,14 @@ func (sq *StationQuery) Clone() *StationQuery { return nil } return &StationQuery{ - config: sq.config, - ctx: sq.ctx.Clone(), - order: append([]station.OrderOption{}, sq.order...), - inters: append([]Interceptor{}, sq.inters...), - predicates: append([]predicate.Station{}, sq.predicates...), - withGuardian: sq.withGuardian.Clone(), - withBus: sq.withBus.Clone(), - withMorningPreviousStation: sq.withMorningPreviousStation.Clone(), - withMorningNextStation: sq.withMorningNextStation.Clone(), - withEveningPreviousStation: sq.withEveningPreviousStation.Clone(), - withEveningNextStation: sq.withEveningNextStation.Clone(), - withNextForBuses: sq.withNextForBuses.Clone(), - withMorningFirstForBuses: sq.withMorningFirstForBuses.Clone(), - withEveningFirstForBuses: sq.withEveningFirstForBuses.Clone(), + config: sq.config, + ctx: sq.ctx.Clone(), + order: append([]station.OrderOption{}, sq.order...), + inters: append([]Interceptor{}, sq.inters...), + predicates: append([]predicate.Station{}, sq.predicates...), + withGuardian: sq.withGuardian.Clone(), + withNextForBuses: sq.withNextForBuses.Clone(), + withBusRouteAssociations: sq.withBusRouteAssociations.Clone(), // clone intermediate query. sql: sq.sql.Clone(), path: sq.path, @@ -487,61 +344,6 @@ func (sq *StationQuery) WithGuardian(opts ...func(*GuardianQuery)) *StationQuery return sq } -// WithBus tells the query-builder to eager-load the nodes that are connected to -// the "bus" edge. The optional arguments are used to configure the query builder of the edge. -func (sq *StationQuery) WithBus(opts ...func(*BusQuery)) *StationQuery { - query := (&BusClient{config: sq.config}).Query() - for _, opt := range opts { - opt(query) - } - sq.withBus = query - return sq -} - -// WithMorningPreviousStation tells the query-builder to eager-load the nodes that are connected to -// the "morning_previous_station" edge. The optional arguments are used to configure the query builder of the edge. -func (sq *StationQuery) WithMorningPreviousStation(opts ...func(*StationQuery)) *StationQuery { - query := (&StationClient{config: sq.config}).Query() - for _, opt := range opts { - opt(query) - } - sq.withMorningPreviousStation = query - return sq -} - -// WithMorningNextStation tells the query-builder to eager-load the nodes that are connected to -// the "morning_next_station" edge. The optional arguments are used to configure the query builder of the edge. -func (sq *StationQuery) WithMorningNextStation(opts ...func(*StationQuery)) *StationQuery { - query := (&StationClient{config: sq.config}).Query() - for _, opt := range opts { - opt(query) - } - sq.withMorningNextStation = query - return sq -} - -// WithEveningPreviousStation tells the query-builder to eager-load the nodes that are connected to -// the "evening_previous_station" edge. The optional arguments are used to configure the query builder of the edge. -func (sq *StationQuery) WithEveningPreviousStation(opts ...func(*StationQuery)) *StationQuery { - query := (&StationClient{config: sq.config}).Query() - for _, opt := range opts { - opt(query) - } - sq.withEveningPreviousStation = query - return sq -} - -// WithEveningNextStation tells the query-builder to eager-load the nodes that are connected to -// the "evening_next_station" edge. The optional arguments are used to configure the query builder of the edge. -func (sq *StationQuery) WithEveningNextStation(opts ...func(*StationQuery)) *StationQuery { - query := (&StationClient{config: sq.config}).Query() - for _, opt := range opts { - opt(query) - } - sq.withEveningNextStation = query - return sq -} - // WithNextForBuses tells the query-builder to eager-load the nodes that are connected to // the "next_for_buses" edge. The optional arguments are used to configure the query builder of the edge. func (sq *StationQuery) WithNextForBuses(opts ...func(*BusQuery)) *StationQuery { @@ -553,25 +355,14 @@ func (sq *StationQuery) WithNextForBuses(opts ...func(*BusQuery)) *StationQuery return sq } -// WithMorningFirstForBuses tells the query-builder to eager-load the nodes that are connected to -// the "morning_first_for_buses" edge. The optional arguments are used to configure the query builder of the edge. -func (sq *StationQuery) WithMorningFirstForBuses(opts ...func(*BusQuery)) *StationQuery { - query := (&BusClient{config: sq.config}).Query() - for _, opt := range opts { - opt(query) - } - sq.withMorningFirstForBuses = query - return sq -} - -// WithEveningFirstForBuses tells the query-builder to eager-load the nodes that are connected to -// the "evening_first_for_buses" edge. The optional arguments are used to configure the query builder of the edge. -func (sq *StationQuery) WithEveningFirstForBuses(opts ...func(*BusQuery)) *StationQuery { - query := (&BusClient{config: sq.config}).Query() +// WithBusRouteAssociations tells the query-builder to eager-load the nodes that are connected to +// the "busRouteAssociations" edge. The optional arguments are used to configure the query builder of the edge. +func (sq *StationQuery) WithBusRouteAssociations(opts ...func(*BusRouteAssociationQuery)) *StationQuery { + query := (&BusRouteAssociationClient{config: sq.config}).Query() for _, opt := range opts { opt(query) } - sq.withEveningFirstForBuses = query + sq.withBusRouteAssociations = query return sq } @@ -654,19 +445,13 @@ func (sq *StationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Stat nodes = []*Station{} withFKs = sq.withFKs _spec = sq.querySpec() - loadedTypes = [9]bool{ + loadedTypes = [3]bool{ sq.withGuardian != nil, - sq.withBus != nil, - sq.withMorningPreviousStation != nil, - sq.withMorningNextStation != nil, - sq.withEveningPreviousStation != nil, - sq.withEveningNextStation != nil, sq.withNextForBuses != nil, - sq.withMorningFirstForBuses != nil, - sq.withEveningFirstForBuses != nil, + sq.withBusRouteAssociations != nil, } ) - if sq.withGuardian != nil || sq.withMorningPreviousStation != nil || sq.withEveningPreviousStation != nil { + if sq.withGuardian != nil { withFKs = true } if withFKs { @@ -696,39 +481,6 @@ func (sq *StationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Stat return nil, err } } - if query := sq.withBus; query != nil { - if err := sq.loadBus(ctx, query, nodes, - func(n *Station) { n.Edges.Bus = []*Bus{} }, - func(n *Station, e *Bus) { n.Edges.Bus = append(n.Edges.Bus, e) }); err != nil { - return nil, err - } - } - if query := sq.withMorningPreviousStation; query != nil { - if err := sq.loadMorningPreviousStation(ctx, query, nodes, nil, - func(n *Station, e *Station) { n.Edges.MorningPreviousStation = e }); err != nil { - return nil, err - } - } - if query := sq.withMorningNextStation; query != nil { - if err := sq.loadMorningNextStation(ctx, query, nodes, - func(n *Station) { n.Edges.MorningNextStation = []*Station{} }, - func(n *Station, e *Station) { n.Edges.MorningNextStation = append(n.Edges.MorningNextStation, e) }); err != nil { - return nil, err - } - } - if query := sq.withEveningPreviousStation; query != nil { - if err := sq.loadEveningPreviousStation(ctx, query, nodes, nil, - func(n *Station, e *Station) { n.Edges.EveningPreviousStation = e }); err != nil { - return nil, err - } - } - if query := sq.withEveningNextStation; query != nil { - if err := sq.loadEveningNextStation(ctx, query, nodes, - func(n *Station) { n.Edges.EveningNextStation = []*Station{} }, - func(n *Station, e *Station) { n.Edges.EveningNextStation = append(n.Edges.EveningNextStation, e) }); err != nil { - return nil, err - } - } if query := sq.withNextForBuses; query != nil { if err := sq.loadNextForBuses(ctx, query, nodes, func(n *Station) { n.Edges.NextForBuses = []*Bus{} }, @@ -736,17 +488,12 @@ func (sq *StationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Stat return nil, err } } - if query := sq.withMorningFirstForBuses; query != nil { - if err := sq.loadMorningFirstForBuses(ctx, query, nodes, - func(n *Station) { n.Edges.MorningFirstForBuses = []*Bus{} }, - func(n *Station, e *Bus) { n.Edges.MorningFirstForBuses = append(n.Edges.MorningFirstForBuses, e) }); err != nil { - return nil, err - } - } - if query := sq.withEveningFirstForBuses; query != nil { - if err := sq.loadEveningFirstForBuses(ctx, query, nodes, - func(n *Station) { n.Edges.EveningFirstForBuses = []*Bus{} }, - func(n *Station, e *Bus) { n.Edges.EveningFirstForBuses = append(n.Edges.EveningFirstForBuses, e) }); err != nil { + if query := sq.withBusRouteAssociations; query != nil { + if err := sq.loadBusRouteAssociations(ctx, query, nodes, + func(n *Station) { n.Edges.BusRouteAssociations = []*BusRouteAssociation{} }, + func(n *Station, e *BusRouteAssociation) { + n.Edges.BusRouteAssociations = append(n.Edges.BusRouteAssociations, e) + }); err != nil { return nil, err } } @@ -785,193 +532,6 @@ func (sq *StationQuery) loadGuardian(ctx context.Context, query *GuardianQuery, } return nil } -func (sq *StationQuery) loadBus(ctx context.Context, query *BusQuery, nodes []*Station, init func(*Station), assign func(*Station, *Bus)) error { - edgeIDs := make([]driver.Value, len(nodes)) - byID := make(map[uuid.UUID]*Station) - nids := make(map[uuid.UUID]map[*Station]struct{}) - for i, node := range nodes { - edgeIDs[i] = node.ID - byID[node.ID] = node - if init != nil { - init(node) - } - } - query.Where(func(s *sql.Selector) { - joinT := sql.Table(station.BusTable) - s.Join(joinT).On(s.C(bus.FieldID), joinT.C(station.BusPrimaryKey[0])) - s.Where(sql.InValues(joinT.C(station.BusPrimaryKey[1]), edgeIDs...)) - columns := s.SelectedColumns() - s.Select(joinT.C(station.BusPrimaryKey[1])) - s.AppendSelect(columns...) - s.SetDistinct(false) - }) - if err := query.prepareQuery(ctx); err != nil { - return err - } - qr := QuerierFunc(func(ctx context.Context, q Query) (Value, error) { - return query.sqlAll(ctx, func(_ context.Context, spec *sqlgraph.QuerySpec) { - assign := spec.Assign - values := spec.ScanValues - spec.ScanValues = func(columns []string) ([]any, error) { - values, err := values(columns[1:]) - if err != nil { - return nil, err - } - return append([]any{new(uuid.UUID)}, values...), nil - } - spec.Assign = func(columns []string, values []any) error { - outValue := *values[0].(*uuid.UUID) - inValue := *values[1].(*uuid.UUID) - if nids[inValue] == nil { - nids[inValue] = map[*Station]struct{}{byID[outValue]: {}} - return assign(columns[1:], values[1:]) - } - nids[inValue][byID[outValue]] = struct{}{} - return nil - } - }) - }) - neighbors, err := withInterceptors[[]*Bus](ctx, query, qr, query.inters) - if err != nil { - return err - } - for _, n := range neighbors { - nodes, ok := nids[n.ID] - if !ok { - return fmt.Errorf(`unexpected "bus" node returned %v`, n.ID) - } - for kn := range nodes { - assign(kn, n) - } - } - return nil -} -func (sq *StationQuery) loadMorningPreviousStation(ctx context.Context, query *StationQuery, nodes []*Station, init func(*Station), assign func(*Station, *Station)) error { - ids := make([]uuid.UUID, 0, len(nodes)) - nodeids := make(map[uuid.UUID][]*Station) - for i := range nodes { - if nodes[i].station_morning_next_station == nil { - continue - } - fk := *nodes[i].station_morning_next_station - if _, ok := nodeids[fk]; !ok { - ids = append(ids, fk) - } - nodeids[fk] = append(nodeids[fk], nodes[i]) - } - if len(ids) == 0 { - return nil - } - query.Where(station.IDIn(ids...)) - neighbors, err := query.All(ctx) - if err != nil { - return err - } - for _, n := range neighbors { - nodes, ok := nodeids[n.ID] - if !ok { - return fmt.Errorf(`unexpected foreign-key "station_morning_next_station" returned %v`, n.ID) - } - for i := range nodes { - assign(nodes[i], n) - } - } - return nil -} -func (sq *StationQuery) loadMorningNextStation(ctx context.Context, query *StationQuery, nodes []*Station, init func(*Station), assign func(*Station, *Station)) error { - fks := make([]driver.Value, 0, len(nodes)) - nodeids := make(map[uuid.UUID]*Station) - for i := range nodes { - fks = append(fks, nodes[i].ID) - nodeids[nodes[i].ID] = nodes[i] - if init != nil { - init(nodes[i]) - } - } - query.withFKs = true - query.Where(predicate.Station(func(s *sql.Selector) { - s.Where(sql.InValues(s.C(station.MorningNextStationColumn), fks...)) - })) - neighbors, err := query.All(ctx) - if err != nil { - return err - } - for _, n := range neighbors { - fk := n.station_morning_next_station - if fk == nil { - return fmt.Errorf(`foreign-key "station_morning_next_station" is nil for node %v`, n.ID) - } - node, ok := nodeids[*fk] - if !ok { - return fmt.Errorf(`unexpected referenced foreign-key "station_morning_next_station" returned %v for node %v`, *fk, n.ID) - } - assign(node, n) - } - return nil -} -func (sq *StationQuery) loadEveningPreviousStation(ctx context.Context, query *StationQuery, nodes []*Station, init func(*Station), assign func(*Station, *Station)) error { - ids := make([]uuid.UUID, 0, len(nodes)) - nodeids := make(map[uuid.UUID][]*Station) - for i := range nodes { - if nodes[i].station_evening_next_station == nil { - continue - } - fk := *nodes[i].station_evening_next_station - if _, ok := nodeids[fk]; !ok { - ids = append(ids, fk) - } - nodeids[fk] = append(nodeids[fk], nodes[i]) - } - if len(ids) == 0 { - return nil - } - query.Where(station.IDIn(ids...)) - neighbors, err := query.All(ctx) - if err != nil { - return err - } - for _, n := range neighbors { - nodes, ok := nodeids[n.ID] - if !ok { - return fmt.Errorf(`unexpected foreign-key "station_evening_next_station" returned %v`, n.ID) - } - for i := range nodes { - assign(nodes[i], n) - } - } - return nil -} -func (sq *StationQuery) loadEveningNextStation(ctx context.Context, query *StationQuery, nodes []*Station, init func(*Station), assign func(*Station, *Station)) error { - fks := make([]driver.Value, 0, len(nodes)) - nodeids := make(map[uuid.UUID]*Station) - for i := range nodes { - fks = append(fks, nodes[i].ID) - nodeids[nodes[i].ID] = nodes[i] - if init != nil { - init(nodes[i]) - } - } - query.withFKs = true - query.Where(predicate.Station(func(s *sql.Selector) { - s.Where(sql.InValues(s.C(station.EveningNextStationColumn), fks...)) - })) - neighbors, err := query.All(ctx) - if err != nil { - return err - } - for _, n := range neighbors { - fk := n.station_evening_next_station - if fk == nil { - return fmt.Errorf(`foreign-key "station_evening_next_station" is nil for node %v`, n.ID) - } - node, ok := nodeids[*fk] - if !ok { - return fmt.Errorf(`unexpected referenced foreign-key "station_evening_next_station" returned %v for node %v`, *fk, n.ID) - } - assign(node, n) - } - return nil -} func (sq *StationQuery) loadNextForBuses(ctx context.Context, query *BusQuery, nodes []*Station, init func(*Station), assign func(*Station, *Bus)) error { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[uuid.UUID]*Station) @@ -1003,7 +563,7 @@ func (sq *StationQuery) loadNextForBuses(ctx context.Context, query *BusQuery, n } return nil } -func (sq *StationQuery) loadMorningFirstForBuses(ctx context.Context, query *BusQuery, nodes []*Station, init func(*Station), assign func(*Station, *Bus)) error { +func (sq *StationQuery) loadBusRouteAssociations(ctx context.Context, query *BusRouteAssociationQuery, nodes []*Station, init func(*Station), assign func(*Station, *BusRouteAssociation)) error { fks := make([]driver.Value, 0, len(nodes)) nodeids := make(map[uuid.UUID]*Station) for i := range nodes { @@ -1013,53 +573,21 @@ func (sq *StationQuery) loadMorningFirstForBuses(ctx context.Context, query *Bus init(nodes[i]) } } - query.withFKs = true - query.Where(predicate.Bus(func(s *sql.Selector) { - s.Where(sql.InValues(s.C(station.MorningFirstForBusesColumn), fks...)) - })) - neighbors, err := query.All(ctx) - if err != nil { - return err + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(busrouteassociation.FieldStationID) } - for _, n := range neighbors { - fk := n.bus_morning_first_station - if fk == nil { - return fmt.Errorf(`foreign-key "bus_morning_first_station" is nil for node %v`, n.ID) - } - node, ok := nodeids[*fk] - if !ok { - return fmt.Errorf(`unexpected referenced foreign-key "bus_morning_first_station" returned %v for node %v`, *fk, n.ID) - } - assign(node, n) - } - return nil -} -func (sq *StationQuery) loadEveningFirstForBuses(ctx context.Context, query *BusQuery, nodes []*Station, init func(*Station), assign func(*Station, *Bus)) error { - fks := make([]driver.Value, 0, len(nodes)) - nodeids := make(map[uuid.UUID]*Station) - for i := range nodes { - fks = append(fks, nodes[i].ID) - nodeids[nodes[i].ID] = nodes[i] - if init != nil { - init(nodes[i]) - } - } - query.withFKs = true - query.Where(predicate.Bus(func(s *sql.Selector) { - s.Where(sql.InValues(s.C(station.EveningFirstForBusesColumn), fks...)) + query.Where(predicate.BusRouteAssociation(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(station.BusRouteAssociationsColumn), fks...)) })) neighbors, err := query.All(ctx) if err != nil { return err } for _, n := range neighbors { - fk := n.bus_evening_first_station - if fk == nil { - return fmt.Errorf(`foreign-key "bus_evening_first_station" is nil for node %v`, n.ID) - } - node, ok := nodeids[*fk] + fk := n.StationID + node, ok := nodeids[fk] if !ok { - return fmt.Errorf(`unexpected referenced foreign-key "bus_evening_first_station" returned %v for node %v`, *fk, n.ID) + return fmt.Errorf(`unexpected referenced foreign-key "station_id" returned %v for node %v`, fk, n.ID) } assign(node, n) } diff --git a/backend/domain/repository/ent/station_update.go b/backend/domain/repository/ent/station_update.go index 83587069..86931193 100644 --- a/backend/domain/repository/ent/station_update.go +++ b/backend/domain/repository/ent/station_update.go @@ -12,6 +12,7 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" @@ -124,89 +125,6 @@ func (su *StationUpdate) SetGuardian(g *Guardian) *StationUpdate { return su.SetGuardianID(g.ID) } -// AddBuIDs adds the "bus" edge to the Bus entity by IDs. -func (su *StationUpdate) AddBuIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.AddBuIDs(ids...) - return su -} - -// AddBus adds the "bus" edges to the Bus entity. -func (su *StationUpdate) AddBus(b ...*Bus) *StationUpdate { - ids := make([]uuid.UUID, len(b)) - for i := range b { - ids[i] = b[i].ID - } - return su.AddBuIDs(ids...) -} - -// SetMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID. -func (su *StationUpdate) SetMorningPreviousStationID(id uuid.UUID) *StationUpdate { - su.mutation.SetMorningPreviousStationID(id) - return su -} - -// SetNillableMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID if the given value is not nil. -func (su *StationUpdate) SetNillableMorningPreviousStationID(id *uuid.UUID) *StationUpdate { - if id != nil { - su = su.SetMorningPreviousStationID(*id) - } - return su -} - -// SetMorningPreviousStation sets the "morning_previous_station" edge to the Station entity. -func (su *StationUpdate) SetMorningPreviousStation(s *Station) *StationUpdate { - return su.SetMorningPreviousStationID(s.ID) -} - -// AddMorningNextStationIDs adds the "morning_next_station" edge to the Station entity by IDs. -func (su *StationUpdate) AddMorningNextStationIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.AddMorningNextStationIDs(ids...) - return su -} - -// AddMorningNextStation adds the "morning_next_station" edges to the Station entity. -func (su *StationUpdate) AddMorningNextStation(s ...*Station) *StationUpdate { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return su.AddMorningNextStationIDs(ids...) -} - -// SetEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID. -func (su *StationUpdate) SetEveningPreviousStationID(id uuid.UUID) *StationUpdate { - su.mutation.SetEveningPreviousStationID(id) - return su -} - -// SetNillableEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID if the given value is not nil. -func (su *StationUpdate) SetNillableEveningPreviousStationID(id *uuid.UUID) *StationUpdate { - if id != nil { - su = su.SetEveningPreviousStationID(*id) - } - return su -} - -// SetEveningPreviousStation sets the "evening_previous_station" edge to the Station entity. -func (su *StationUpdate) SetEveningPreviousStation(s *Station) *StationUpdate { - return su.SetEveningPreviousStationID(s.ID) -} - -// AddEveningNextStationIDs adds the "evening_next_station" edge to the Station entity by IDs. -func (su *StationUpdate) AddEveningNextStationIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.AddEveningNextStationIDs(ids...) - return su -} - -// AddEveningNextStation adds the "evening_next_station" edges to the Station entity. -func (su *StationUpdate) AddEveningNextStation(s ...*Station) *StationUpdate { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return su.AddEveningNextStationIDs(ids...) -} - // AddNextForBusIDs adds the "next_for_buses" edge to the Bus entity by IDs. func (su *StationUpdate) AddNextForBusIDs(ids ...uuid.UUID) *StationUpdate { su.mutation.AddNextForBusIDs(ids...) @@ -222,34 +140,19 @@ func (su *StationUpdate) AddNextForBuses(b ...*Bus) *StationUpdate { return su.AddNextForBusIDs(ids...) } -// AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by IDs. -func (su *StationUpdate) AddMorningFirstForBusIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.AddMorningFirstForBusIDs(ids...) +// AddBusRouteAssociationIDs adds the "busRouteAssociations" edge to the BusRouteAssociation entity by IDs. +func (su *StationUpdate) AddBusRouteAssociationIDs(ids ...int) *StationUpdate { + su.mutation.AddBusRouteAssociationIDs(ids...) return su } -// AddMorningFirstForBuses adds the "morning_first_for_buses" edges to the Bus entity. -func (su *StationUpdate) AddMorningFirstForBuses(b ...*Bus) *StationUpdate { - ids := make([]uuid.UUID, len(b)) +// AddBusRouteAssociations adds the "busRouteAssociations" edges to the BusRouteAssociation entity. +func (su *StationUpdate) AddBusRouteAssociations(b ...*BusRouteAssociation) *StationUpdate { + ids := make([]int, len(b)) for i := range b { ids[i] = b[i].ID } - return su.AddMorningFirstForBusIDs(ids...) -} - -// AddEveningFirstForBusIDs adds the "evening_first_for_buses" edge to the Bus entity by IDs. -func (su *StationUpdate) AddEveningFirstForBusIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.AddEveningFirstForBusIDs(ids...) - return su -} - -// AddEveningFirstForBuses adds the "evening_first_for_buses" edges to the Bus entity. -func (su *StationUpdate) AddEveningFirstForBuses(b ...*Bus) *StationUpdate { - ids := make([]uuid.UUID, len(b)) - for i := range b { - ids[i] = b[i].ID - } - return su.AddEveningFirstForBusIDs(ids...) + return su.AddBusRouteAssociationIDs(ids...) } // Mutation returns the StationMutation object of the builder. @@ -263,81 +166,6 @@ func (su *StationUpdate) ClearGuardian() *StationUpdate { return su } -// ClearBus clears all "bus" edges to the Bus entity. -func (su *StationUpdate) ClearBus() *StationUpdate { - su.mutation.ClearBus() - return su -} - -// RemoveBuIDs removes the "bus" edge to Bus entities by IDs. -func (su *StationUpdate) RemoveBuIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.RemoveBuIDs(ids...) - return su -} - -// RemoveBus removes "bus" edges to Bus entities. -func (su *StationUpdate) RemoveBus(b ...*Bus) *StationUpdate { - ids := make([]uuid.UUID, len(b)) - for i := range b { - ids[i] = b[i].ID - } - return su.RemoveBuIDs(ids...) -} - -// ClearMorningPreviousStation clears the "morning_previous_station" edge to the Station entity. -func (su *StationUpdate) ClearMorningPreviousStation() *StationUpdate { - su.mutation.ClearMorningPreviousStation() - return su -} - -// ClearMorningNextStation clears all "morning_next_station" edges to the Station entity. -func (su *StationUpdate) ClearMorningNextStation() *StationUpdate { - su.mutation.ClearMorningNextStation() - return su -} - -// RemoveMorningNextStationIDs removes the "morning_next_station" edge to Station entities by IDs. -func (su *StationUpdate) RemoveMorningNextStationIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.RemoveMorningNextStationIDs(ids...) - return su -} - -// RemoveMorningNextStation removes "morning_next_station" edges to Station entities. -func (su *StationUpdate) RemoveMorningNextStation(s ...*Station) *StationUpdate { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return su.RemoveMorningNextStationIDs(ids...) -} - -// ClearEveningPreviousStation clears the "evening_previous_station" edge to the Station entity. -func (su *StationUpdate) ClearEveningPreviousStation() *StationUpdate { - su.mutation.ClearEveningPreviousStation() - return su -} - -// ClearEveningNextStation clears all "evening_next_station" edges to the Station entity. -func (su *StationUpdate) ClearEveningNextStation() *StationUpdate { - su.mutation.ClearEveningNextStation() - return su -} - -// RemoveEveningNextStationIDs removes the "evening_next_station" edge to Station entities by IDs. -func (su *StationUpdate) RemoveEveningNextStationIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.RemoveEveningNextStationIDs(ids...) - return su -} - -// RemoveEveningNextStation removes "evening_next_station" edges to Station entities. -func (su *StationUpdate) RemoveEveningNextStation(s ...*Station) *StationUpdate { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return su.RemoveEveningNextStationIDs(ids...) -} - // ClearNextForBuses clears all "next_for_buses" edges to the Bus entity. func (su *StationUpdate) ClearNextForBuses() *StationUpdate { su.mutation.ClearNextForBuses() @@ -359,46 +187,25 @@ func (su *StationUpdate) RemoveNextForBuses(b ...*Bus) *StationUpdate { return su.RemoveNextForBusIDs(ids...) } -// ClearMorningFirstForBuses clears all "morning_first_for_buses" edges to the Bus entity. -func (su *StationUpdate) ClearMorningFirstForBuses() *StationUpdate { - su.mutation.ClearMorningFirstForBuses() +// ClearBusRouteAssociations clears all "busRouteAssociations" edges to the BusRouteAssociation entity. +func (su *StationUpdate) ClearBusRouteAssociations() *StationUpdate { + su.mutation.ClearBusRouteAssociations() return su } -// RemoveMorningFirstForBusIDs removes the "morning_first_for_buses" edge to Bus entities by IDs. -func (su *StationUpdate) RemoveMorningFirstForBusIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.RemoveMorningFirstForBusIDs(ids...) +// RemoveBusRouteAssociationIDs removes the "busRouteAssociations" edge to BusRouteAssociation entities by IDs. +func (su *StationUpdate) RemoveBusRouteAssociationIDs(ids ...int) *StationUpdate { + su.mutation.RemoveBusRouteAssociationIDs(ids...) return su } -// RemoveMorningFirstForBuses removes "morning_first_for_buses" edges to Bus entities. -func (su *StationUpdate) RemoveMorningFirstForBuses(b ...*Bus) *StationUpdate { - ids := make([]uuid.UUID, len(b)) +// RemoveBusRouteAssociations removes "busRouteAssociations" edges to BusRouteAssociation entities. +func (su *StationUpdate) RemoveBusRouteAssociations(b ...*BusRouteAssociation) *StationUpdate { + ids := make([]int, len(b)) for i := range b { ids[i] = b[i].ID } - return su.RemoveMorningFirstForBusIDs(ids...) -} - -// ClearEveningFirstForBuses clears all "evening_first_for_buses" edges to the Bus entity. -func (su *StationUpdate) ClearEveningFirstForBuses() *StationUpdate { - su.mutation.ClearEveningFirstForBuses() - return su -} - -// RemoveEveningFirstForBusIDs removes the "evening_first_for_buses" edge to Bus entities by IDs. -func (su *StationUpdate) RemoveEveningFirstForBusIDs(ids ...uuid.UUID) *StationUpdate { - su.mutation.RemoveEveningFirstForBusIDs(ids...) - return su -} - -// RemoveEveningFirstForBuses removes "evening_first_for_buses" edges to Bus entities. -func (su *StationUpdate) RemoveEveningFirstForBuses(b ...*Bus) *StationUpdate { - ids := make([]uuid.UUID, len(b)) - for i := range b { - ids[i] = b[i].ID - } - return su.RemoveEveningFirstForBusIDs(ids...) + return su.RemoveBusRouteAssociationIDs(ids...) } // Save executes the query and returns the number of nodes affected by the update operation. @@ -499,199 +306,6 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if su.mutation.BusCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: true, - Table: station.BusTable, - Columns: station.BusPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := su.mutation.RemovedBusIDs(); len(nodes) > 0 && !su.mutation.BusCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: true, - Table: station.BusTable, - Columns: station.BusPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := su.mutation.BusIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: true, - Table: station.BusTable, - Columns: station.BusPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if su.mutation.MorningPreviousStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: true, - Table: station.MorningPreviousStationTable, - Columns: []string{station.MorningPreviousStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := su.mutation.MorningPreviousStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: true, - Table: station.MorningPreviousStationTable, - Columns: []string{station.MorningPreviousStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if su.mutation.MorningNextStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.MorningNextStationTable, - Columns: []string{station.MorningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := su.mutation.RemovedMorningNextStationIDs(); len(nodes) > 0 && !su.mutation.MorningNextStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.MorningNextStationTable, - Columns: []string{station.MorningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := su.mutation.MorningNextStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.MorningNextStationTable, - Columns: []string{station.MorningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if su.mutation.EveningPreviousStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: true, - Table: station.EveningPreviousStationTable, - Columns: []string{station.EveningPreviousStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := su.mutation.EveningPreviousStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: true, - Table: station.EveningPreviousStationTable, - Columns: []string{station.EveningPreviousStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if su.mutation.EveningNextStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.EveningNextStationTable, - Columns: []string{station.EveningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := su.mutation.RemovedEveningNextStationIDs(); len(nodes) > 0 && !su.mutation.EveningNextStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.EveningNextStationTable, - Columns: []string{station.EveningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := su.mutation.EveningNextStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.EveningNextStationTable, - Columns: []string{station.EveningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } if su.mutation.NextForBusesCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, @@ -737,73 +351,28 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if su.mutation.MorningFirstForBusesCleared() { + if su.mutation.BusRouteAssociationsCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, - Inverse: true, - Table: station.MorningFirstForBusesTable, - Columns: []string{station.MorningFirstForBusesColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := su.mutation.RemovedMorningFirstForBusesIDs(); len(nodes) > 0 && !su.mutation.MorningFirstForBusesCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: station.MorningFirstForBusesTable, - Columns: []string{station.MorningFirstForBusesColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := su.mutation.MorningFirstForBusesIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: station.MorningFirstForBusesTable, - Columns: []string{station.MorningFirstForBusesColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if su.mutation.EveningFirstForBusesCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: station.EveningFirstForBusesTable, - Columns: []string{station.EveningFirstForBusesColumn}, + Inverse: false, + Table: station.BusRouteAssociationsTable, + Columns: []string{station.BusRouteAssociationsColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), }, } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := su.mutation.RemovedEveningFirstForBusesIDs(); len(nodes) > 0 && !su.mutation.EveningFirstForBusesCleared() { + if nodes := su.mutation.RemovedBusRouteAssociationsIDs(); len(nodes) > 0 && !su.mutation.BusRouteAssociationsCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, - Inverse: true, - Table: station.EveningFirstForBusesTable, - Columns: []string{station.EveningFirstForBusesColumn}, + Inverse: false, + Table: station.BusRouteAssociationsTable, + Columns: []string{station.BusRouteAssociationsColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), }, } for _, k := range nodes { @@ -811,15 +380,15 @@ func (su *StationUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := su.mutation.EveningFirstForBusesIDs(); len(nodes) > 0 { + if nodes := su.mutation.BusRouteAssociationsIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, - Inverse: true, - Table: station.EveningFirstForBusesTable, - Columns: []string{station.EveningFirstForBusesColumn}, + Inverse: false, + Table: station.BusRouteAssociationsTable, + Columns: []string{station.BusRouteAssociationsColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), }, } for _, k := range nodes { @@ -921,106 +490,23 @@ func (suo *StationUpdateOne) SetUpdatedAt(t time.Time) *StationUpdateOne { return suo } -// SetGuardianID sets the "guardian" edge to the Guardian entity by ID. -func (suo *StationUpdateOne) SetGuardianID(id uuid.UUID) *StationUpdateOne { - suo.mutation.SetGuardianID(id) - return suo -} - -// SetNillableGuardianID sets the "guardian" edge to the Guardian entity by ID if the given value is not nil. -func (suo *StationUpdateOne) SetNillableGuardianID(id *uuid.UUID) *StationUpdateOne { - if id != nil { - suo = suo.SetGuardianID(*id) - } - return suo -} - -// SetGuardian sets the "guardian" edge to the Guardian entity. -func (suo *StationUpdateOne) SetGuardian(g *Guardian) *StationUpdateOne { - return suo.SetGuardianID(g.ID) -} - -// AddBuIDs adds the "bus" edge to the Bus entity by IDs. -func (suo *StationUpdateOne) AddBuIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.AddBuIDs(ids...) - return suo -} - -// AddBus adds the "bus" edges to the Bus entity. -func (suo *StationUpdateOne) AddBus(b ...*Bus) *StationUpdateOne { - ids := make([]uuid.UUID, len(b)) - for i := range b { - ids[i] = b[i].ID - } - return suo.AddBuIDs(ids...) -} - -// SetMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID. -func (suo *StationUpdateOne) SetMorningPreviousStationID(id uuid.UUID) *StationUpdateOne { - suo.mutation.SetMorningPreviousStationID(id) - return suo -} - -// SetNillableMorningPreviousStationID sets the "morning_previous_station" edge to the Station entity by ID if the given value is not nil. -func (suo *StationUpdateOne) SetNillableMorningPreviousStationID(id *uuid.UUID) *StationUpdateOne { - if id != nil { - suo = suo.SetMorningPreviousStationID(*id) - } - return suo -} - -// SetMorningPreviousStation sets the "morning_previous_station" edge to the Station entity. -func (suo *StationUpdateOne) SetMorningPreviousStation(s *Station) *StationUpdateOne { - return suo.SetMorningPreviousStationID(s.ID) -} - -// AddMorningNextStationIDs adds the "morning_next_station" edge to the Station entity by IDs. -func (suo *StationUpdateOne) AddMorningNextStationIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.AddMorningNextStationIDs(ids...) - return suo -} - -// AddMorningNextStation adds the "morning_next_station" edges to the Station entity. -func (suo *StationUpdateOne) AddMorningNextStation(s ...*Station) *StationUpdateOne { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return suo.AddMorningNextStationIDs(ids...) -} - -// SetEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID. -func (suo *StationUpdateOne) SetEveningPreviousStationID(id uuid.UUID) *StationUpdateOne { - suo.mutation.SetEveningPreviousStationID(id) +// SetGuardianID sets the "guardian" edge to the Guardian entity by ID. +func (suo *StationUpdateOne) SetGuardianID(id uuid.UUID) *StationUpdateOne { + suo.mutation.SetGuardianID(id) return suo } -// SetNillableEveningPreviousStationID sets the "evening_previous_station" edge to the Station entity by ID if the given value is not nil. -func (suo *StationUpdateOne) SetNillableEveningPreviousStationID(id *uuid.UUID) *StationUpdateOne { +// SetNillableGuardianID sets the "guardian" edge to the Guardian entity by ID if the given value is not nil. +func (suo *StationUpdateOne) SetNillableGuardianID(id *uuid.UUID) *StationUpdateOne { if id != nil { - suo = suo.SetEveningPreviousStationID(*id) + suo = suo.SetGuardianID(*id) } return suo } -// SetEveningPreviousStation sets the "evening_previous_station" edge to the Station entity. -func (suo *StationUpdateOne) SetEveningPreviousStation(s *Station) *StationUpdateOne { - return suo.SetEveningPreviousStationID(s.ID) -} - -// AddEveningNextStationIDs adds the "evening_next_station" edge to the Station entity by IDs. -func (suo *StationUpdateOne) AddEveningNextStationIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.AddEveningNextStationIDs(ids...) - return suo -} - -// AddEveningNextStation adds the "evening_next_station" edges to the Station entity. -func (suo *StationUpdateOne) AddEveningNextStation(s ...*Station) *StationUpdateOne { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return suo.AddEveningNextStationIDs(ids...) +// SetGuardian sets the "guardian" edge to the Guardian entity. +func (suo *StationUpdateOne) SetGuardian(g *Guardian) *StationUpdateOne { + return suo.SetGuardianID(g.ID) } // AddNextForBusIDs adds the "next_for_buses" edge to the Bus entity by IDs. @@ -1038,34 +524,19 @@ func (suo *StationUpdateOne) AddNextForBuses(b ...*Bus) *StationUpdateOne { return suo.AddNextForBusIDs(ids...) } -// AddMorningFirstForBusIDs adds the "morning_first_for_buses" edge to the Bus entity by IDs. -func (suo *StationUpdateOne) AddMorningFirstForBusIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.AddMorningFirstForBusIDs(ids...) - return suo -} - -// AddMorningFirstForBuses adds the "morning_first_for_buses" edges to the Bus entity. -func (suo *StationUpdateOne) AddMorningFirstForBuses(b ...*Bus) *StationUpdateOne { - ids := make([]uuid.UUID, len(b)) - for i := range b { - ids[i] = b[i].ID - } - return suo.AddMorningFirstForBusIDs(ids...) -} - -// AddEveningFirstForBusIDs adds the "evening_first_for_buses" edge to the Bus entity by IDs. -func (suo *StationUpdateOne) AddEveningFirstForBusIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.AddEveningFirstForBusIDs(ids...) +// AddBusRouteAssociationIDs adds the "busRouteAssociations" edge to the BusRouteAssociation entity by IDs. +func (suo *StationUpdateOne) AddBusRouteAssociationIDs(ids ...int) *StationUpdateOne { + suo.mutation.AddBusRouteAssociationIDs(ids...) return suo } -// AddEveningFirstForBuses adds the "evening_first_for_buses" edges to the Bus entity. -func (suo *StationUpdateOne) AddEveningFirstForBuses(b ...*Bus) *StationUpdateOne { - ids := make([]uuid.UUID, len(b)) +// AddBusRouteAssociations adds the "busRouteAssociations" edges to the BusRouteAssociation entity. +func (suo *StationUpdateOne) AddBusRouteAssociations(b ...*BusRouteAssociation) *StationUpdateOne { + ids := make([]int, len(b)) for i := range b { ids[i] = b[i].ID } - return suo.AddEveningFirstForBusIDs(ids...) + return suo.AddBusRouteAssociationIDs(ids...) } // Mutation returns the StationMutation object of the builder. @@ -1079,81 +550,6 @@ func (suo *StationUpdateOne) ClearGuardian() *StationUpdateOne { return suo } -// ClearBus clears all "bus" edges to the Bus entity. -func (suo *StationUpdateOne) ClearBus() *StationUpdateOne { - suo.mutation.ClearBus() - return suo -} - -// RemoveBuIDs removes the "bus" edge to Bus entities by IDs. -func (suo *StationUpdateOne) RemoveBuIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.RemoveBuIDs(ids...) - return suo -} - -// RemoveBus removes "bus" edges to Bus entities. -func (suo *StationUpdateOne) RemoveBus(b ...*Bus) *StationUpdateOne { - ids := make([]uuid.UUID, len(b)) - for i := range b { - ids[i] = b[i].ID - } - return suo.RemoveBuIDs(ids...) -} - -// ClearMorningPreviousStation clears the "morning_previous_station" edge to the Station entity. -func (suo *StationUpdateOne) ClearMorningPreviousStation() *StationUpdateOne { - suo.mutation.ClearMorningPreviousStation() - return suo -} - -// ClearMorningNextStation clears all "morning_next_station" edges to the Station entity. -func (suo *StationUpdateOne) ClearMorningNextStation() *StationUpdateOne { - suo.mutation.ClearMorningNextStation() - return suo -} - -// RemoveMorningNextStationIDs removes the "morning_next_station" edge to Station entities by IDs. -func (suo *StationUpdateOne) RemoveMorningNextStationIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.RemoveMorningNextStationIDs(ids...) - return suo -} - -// RemoveMorningNextStation removes "morning_next_station" edges to Station entities. -func (suo *StationUpdateOne) RemoveMorningNextStation(s ...*Station) *StationUpdateOne { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return suo.RemoveMorningNextStationIDs(ids...) -} - -// ClearEveningPreviousStation clears the "evening_previous_station" edge to the Station entity. -func (suo *StationUpdateOne) ClearEveningPreviousStation() *StationUpdateOne { - suo.mutation.ClearEveningPreviousStation() - return suo -} - -// ClearEveningNextStation clears all "evening_next_station" edges to the Station entity. -func (suo *StationUpdateOne) ClearEveningNextStation() *StationUpdateOne { - suo.mutation.ClearEveningNextStation() - return suo -} - -// RemoveEveningNextStationIDs removes the "evening_next_station" edge to Station entities by IDs. -func (suo *StationUpdateOne) RemoveEveningNextStationIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.RemoveEveningNextStationIDs(ids...) - return suo -} - -// RemoveEveningNextStation removes "evening_next_station" edges to Station entities. -func (suo *StationUpdateOne) RemoveEveningNextStation(s ...*Station) *StationUpdateOne { - ids := make([]uuid.UUID, len(s)) - for i := range s { - ids[i] = s[i].ID - } - return suo.RemoveEveningNextStationIDs(ids...) -} - // ClearNextForBuses clears all "next_for_buses" edges to the Bus entity. func (suo *StationUpdateOne) ClearNextForBuses() *StationUpdateOne { suo.mutation.ClearNextForBuses() @@ -1175,46 +571,25 @@ func (suo *StationUpdateOne) RemoveNextForBuses(b ...*Bus) *StationUpdateOne { return suo.RemoveNextForBusIDs(ids...) } -// ClearMorningFirstForBuses clears all "morning_first_for_buses" edges to the Bus entity. -func (suo *StationUpdateOne) ClearMorningFirstForBuses() *StationUpdateOne { - suo.mutation.ClearMorningFirstForBuses() - return suo -} - -// RemoveMorningFirstForBusIDs removes the "morning_first_for_buses" edge to Bus entities by IDs. -func (suo *StationUpdateOne) RemoveMorningFirstForBusIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.RemoveMorningFirstForBusIDs(ids...) +// ClearBusRouteAssociations clears all "busRouteAssociations" edges to the BusRouteAssociation entity. +func (suo *StationUpdateOne) ClearBusRouteAssociations() *StationUpdateOne { + suo.mutation.ClearBusRouteAssociations() return suo } -// RemoveMorningFirstForBuses removes "morning_first_for_buses" edges to Bus entities. -func (suo *StationUpdateOne) RemoveMorningFirstForBuses(b ...*Bus) *StationUpdateOne { - ids := make([]uuid.UUID, len(b)) - for i := range b { - ids[i] = b[i].ID - } - return suo.RemoveMorningFirstForBusIDs(ids...) -} - -// ClearEveningFirstForBuses clears all "evening_first_for_buses" edges to the Bus entity. -func (suo *StationUpdateOne) ClearEveningFirstForBuses() *StationUpdateOne { - suo.mutation.ClearEveningFirstForBuses() - return suo -} - -// RemoveEveningFirstForBusIDs removes the "evening_first_for_buses" edge to Bus entities by IDs. -func (suo *StationUpdateOne) RemoveEveningFirstForBusIDs(ids ...uuid.UUID) *StationUpdateOne { - suo.mutation.RemoveEveningFirstForBusIDs(ids...) +// RemoveBusRouteAssociationIDs removes the "busRouteAssociations" edge to BusRouteAssociation entities by IDs. +func (suo *StationUpdateOne) RemoveBusRouteAssociationIDs(ids ...int) *StationUpdateOne { + suo.mutation.RemoveBusRouteAssociationIDs(ids...) return suo } -// RemoveEveningFirstForBuses removes "evening_first_for_buses" edges to Bus entities. -func (suo *StationUpdateOne) RemoveEveningFirstForBuses(b ...*Bus) *StationUpdateOne { - ids := make([]uuid.UUID, len(b)) +// RemoveBusRouteAssociations removes "busRouteAssociations" edges to BusRouteAssociation entities. +func (suo *StationUpdateOne) RemoveBusRouteAssociations(b ...*BusRouteAssociation) *StationUpdateOne { + ids := make([]int, len(b)) for i := range b { ids[i] = b[i].ID } - return suo.RemoveEveningFirstForBusIDs(ids...) + return suo.RemoveBusRouteAssociationIDs(ids...) } // Where appends a list predicates to the StationUpdate builder. @@ -1345,199 +720,6 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if suo.mutation.BusCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: true, - Table: station.BusTable, - Columns: station.BusPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := suo.mutation.RemovedBusIDs(); len(nodes) > 0 && !suo.mutation.BusCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: true, - Table: station.BusTable, - Columns: station.BusPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := suo.mutation.BusIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2M, - Inverse: true, - Table: station.BusTable, - Columns: station.BusPrimaryKey, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if suo.mutation.MorningPreviousStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: true, - Table: station.MorningPreviousStationTable, - Columns: []string{station.MorningPreviousStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := suo.mutation.MorningPreviousStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: true, - Table: station.MorningPreviousStationTable, - Columns: []string{station.MorningPreviousStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if suo.mutation.MorningNextStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.MorningNextStationTable, - Columns: []string{station.MorningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := suo.mutation.RemovedMorningNextStationIDs(); len(nodes) > 0 && !suo.mutation.MorningNextStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.MorningNextStationTable, - Columns: []string{station.MorningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := suo.mutation.MorningNextStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.MorningNextStationTable, - Columns: []string{station.MorningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if suo.mutation.EveningPreviousStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: true, - Table: station.EveningPreviousStationTable, - Columns: []string{station.EveningPreviousStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := suo.mutation.EveningPreviousStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.M2O, - Inverse: true, - Table: station.EveningPreviousStationTable, - Columns: []string{station.EveningPreviousStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if suo.mutation.EveningNextStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.EveningNextStationTable, - Columns: []string{station.EveningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := suo.mutation.RemovedEveningNextStationIDs(); len(nodes) > 0 && !suo.mutation.EveningNextStationCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.EveningNextStationTable, - Columns: []string{station.EveningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := suo.mutation.EveningNextStationIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: false, - Table: station.EveningNextStationTable, - Columns: []string{station.EveningNextStationColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(station.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } if suo.mutation.NextForBusesCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, @@ -1583,73 +765,28 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e } _spec.Edges.Add = append(_spec.Edges.Add, edge) } - if suo.mutation.MorningFirstForBusesCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: station.MorningFirstForBusesTable, - Columns: []string{station.MorningFirstForBusesColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := suo.mutation.RemovedMorningFirstForBusesIDs(); len(nodes) > 0 && !suo.mutation.MorningFirstForBusesCleared() { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: station.MorningFirstForBusesTable, - Columns: []string{station.MorningFirstForBusesColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Clear = append(_spec.Edges.Clear, edge) - } - if nodes := suo.mutation.MorningFirstForBusesIDs(); len(nodes) > 0 { - edge := &sqlgraph.EdgeSpec{ - Rel: sqlgraph.O2M, - Inverse: true, - Table: station.MorningFirstForBusesTable, - Columns: []string{station.MorningFirstForBusesColumn}, - Bidi: false, - Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), - }, - } - for _, k := range nodes { - edge.Target.Nodes = append(edge.Target.Nodes, k) - } - _spec.Edges.Add = append(_spec.Edges.Add, edge) - } - if suo.mutation.EveningFirstForBusesCleared() { + if suo.mutation.BusRouteAssociationsCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, - Inverse: true, - Table: station.EveningFirstForBusesTable, - Columns: []string{station.EveningFirstForBusesColumn}, + Inverse: false, + Table: station.BusRouteAssociationsTable, + Columns: []string{station.BusRouteAssociationsColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), }, } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := suo.mutation.RemovedEveningFirstForBusesIDs(); len(nodes) > 0 && !suo.mutation.EveningFirstForBusesCleared() { + if nodes := suo.mutation.RemovedBusRouteAssociationsIDs(); len(nodes) > 0 && !suo.mutation.BusRouteAssociationsCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, - Inverse: true, - Table: station.EveningFirstForBusesTable, - Columns: []string{station.EveningFirstForBusesColumn}, + Inverse: false, + Table: station.BusRouteAssociationsTable, + Columns: []string{station.BusRouteAssociationsColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), }, } for _, k := range nodes { @@ -1657,15 +794,15 @@ func (suo *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err e } _spec.Edges.Clear = append(_spec.Edges.Clear, edge) } - if nodes := suo.mutation.EveningFirstForBusesIDs(); len(nodes) > 0 { + if nodes := suo.mutation.BusRouteAssociationsIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2M, - Inverse: true, - Table: station.EveningFirstForBusesTable, - Columns: []string{station.EveningFirstForBusesColumn}, + Inverse: false, + Table: station.BusRouteAssociationsTable, + Columns: []string{station.BusRouteAssociationsColumn}, Bidi: false, Target: &sqlgraph.EdgeTarget{ - IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + IDSpec: sqlgraph.NewFieldSpec(busrouteassociation.FieldID, field.TypeInt), }, } for _, k := range nodes { diff --git a/backend/domain/repository/ent/tx.go b/backend/domain/repository/ent/tx.go index 4fdd2ad6..12a7dd20 100644 --- a/backend/domain/repository/ent/tx.go +++ b/backend/domain/repository/ent/tx.go @@ -16,6 +16,10 @@ type Tx struct { BoardingRecord *BoardingRecordClient // Bus is the client for interacting with the Bus builders. Bus *BusClient + // BusRoute is the client for interacting with the BusRoute builders. + BusRoute *BusRouteClient + // BusRouteAssociation is the client for interacting with the BusRouteAssociation builders. + BusRouteAssociation *BusRouteAssociationClient // Child is the client for interacting with the Child builders. Child *ChildClient // ChildBusAssociation is the client for interacting with the ChildBusAssociation builders. @@ -161,6 +165,8 @@ func (tx *Tx) Client() *Client { func (tx *Tx) init() { tx.BoardingRecord = NewBoardingRecordClient(tx.config) tx.Bus = NewBusClient(tx.config) + tx.BusRoute = NewBusRouteClient(tx.config) + tx.BusRouteAssociation = NewBusRouteAssociationClient(tx.config) tx.Child = NewChildClient(tx.config) tx.ChildBusAssociation = NewChildBusAssociationClient(tx.config) tx.ChildPhoto = NewChildPhotoClient(tx.config) From db9ef54c3a9af53c559876b381beae5760323cc3 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 22 Feb 2024 12:24:04 +0900 Subject: [PATCH 635/771] =?UTF-8?q?feat:=20proto=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../go/where_child_bus/v1/resources.pb.go | 487 ++++++++---------- .../go/where_child_bus/v1/station.pb.go | 362 +++++++++---- .../go/where_child_bus/v1/station_grpc.pb.go | 37 ++ .../where_child_bus/v1/resources.pb.dart | 302 +++++------ .../where_child_bus/v1/resources.pbjson.dart | 64 +-- .../where_child_bus/v1/station.pb.dart | 117 +++++ .../where_child_bus/v1/station.pbgrpc.dart | 20 + .../where_child_bus/v1/station.pbjson.dart | 28 + .../generated/where_child_bus/v1/child_pb2.py | 72 ++- .../where_child_bus/v1/child_pb2.pyi | 78 +-- .../where_child_bus/v1/child_pb2_grpc.py | 354 +++++-------- .../where_child_bus/v1/child_photo_pb2.py | 49 +- .../where_child_bus/v1/child_photo_pb2.pyi | 31 +- .../v1/child_photo_pb2_grpc.py | 184 +++---- .../where_child_bus/v1/guardian_pb2.py | 72 ++- .../where_child_bus/v1/guardian_pb2.pyi | 91 +--- .../where_child_bus/v1/guardian_pb2_grpc.py | 358 +++++-------- .../where_child_bus/v1/health_check_pb2.py | 29 +- .../where_child_bus/v1/health_check_pb2.pyi | 4 +- .../v1/health_check_pb2_grpc.py | 68 +-- .../where_child_bus/v1/nursery_pb2.py | 56 +- .../where_child_bus/v1/nursery_pb2.pyi | 63 +-- .../where_child_bus/v1/nursery_pb2_grpc.py | 238 ++++----- .../where_child_bus/v1/resources_pb2.py | 44 +- .../where_child_bus/v1/resources_pb2.pyi | 51 +- .../where_child_bus/v1/station_pb2.py | 19 +- .../where_child_bus/v1/station_pb2.pyi | 20 +- .../where_child_bus/v1/station_pb2_grpc.py | 20 +- proto/where_child_bus/v1/resources.proto | 22 +- proto/where_child_bus/v1/station.proto | 10 + 30 files changed, 1576 insertions(+), 1774 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 6c9cd40d..516530c3 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -683,8 +683,6 @@ type Bus struct { Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` EnableFaceRecognition bool `protobuf:"varint,8,opt,name=enable_face_recognition,json=enableFaceRecognition,proto3" json:"enable_face_recognition,omitempty"` - MorningFirstStationId string `protobuf:"bytes,9,opt,name=morning_first_station_id,json=morningFirstStationId,proto3" json:"morning_first_station_id,omitempty"` - EveningFirstStationId string `protobuf:"bytes,10,opt,name=evening_first_station_id,json=eveningFirstStationId,proto3" json:"evening_first_station_id,omitempty"` NextStationId string `protobuf:"bytes,11,opt,name=next_station_id,json=nextStationId,proto3" json:"next_station_id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` @@ -778,20 +776,6 @@ func (x *Bus) GetEnableFaceRecognition() bool { return false } -func (x *Bus) GetMorningFirstStationId() string { - if x != nil { - return x.MorningFirstStationId - } - return "" -} - -func (x *Bus) GetEveningFirstStationId() string { - if x != nil { - return x.EveningFirstStationId - } - return "" -} - func (x *Bus) GetNextStationId() string { if x != nil { return x.NextStationId @@ -969,14 +953,12 @@ type Station struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - GuardianId string `protobuf:"bytes,2,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` - MorningNextStationId string `protobuf:"bytes,3,opt,name=morning_next_station_id,json=morningNextStationId,proto3" json:"morning_next_station_id,omitempty"` - EveningNextStationId string `protobuf:"bytes,4,opt,name=evening_next_station_id,json=eveningNextStationId,proto3" json:"evening_next_station_id,omitempty"` - Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` - Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + GuardianId string `protobuf:"bytes,2,opt,name=guardian_id,json=guardianId,proto3" json:"guardian_id,omitempty"` + Latitude float64 `protobuf:"fixed64,5,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,6,opt,name=longitude,proto3" json:"longitude,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *Station) Reset() { @@ -1025,20 +1007,6 @@ func (x *Station) GetGuardianId() string { return "" } -func (x *Station) GetMorningNextStationId() string { - if x != nil { - return x.MorningNextStationId - } - return "" -} - -func (x *Station) GetEveningNextStationId() string { - if x != nil { - return x.EveningNextStationId - } - return "" -} - func (x *Station) GetLatitude() float64 { if x != nil { return x.Latitude @@ -1072,10 +1040,8 @@ type ChildBusAssociation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - ChildId string `protobuf:"bytes,3,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` - BusType BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` + BusRouteId string `protobuf:"bytes,1,opt,name=bus_route_id,json=busRouteId,proto3" json:"bus_route_id,omitempty"` + ChildId string `protobuf:"bytes,2,opt,name=child_id,json=childId,proto3" json:"child_id,omitempty"` } func (x *ChildBusAssociation) Reset() { @@ -1110,16 +1076,9 @@ func (*ChildBusAssociation) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{7} } -func (x *ChildBusAssociation) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ChildBusAssociation) GetBusId() string { +func (x *ChildBusAssociation) GetBusRouteId() string { if x != nil { - return x.BusId + return x.BusRouteId } return "" } @@ -1131,68 +1090,6 @@ func (x *ChildBusAssociation) GetChildId() string { return "" } -func (x *ChildBusAssociation) GetBusType() BusType { - if x != nil { - return x.BusType - } - return BusType_BUS_TYPE_UNSPECIFIED -} - -type BusStationAssociation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - StationId string `protobuf:"bytes,2,opt,name=station_id,json=stationId,proto3" json:"station_id,omitempty"` -} - -func (x *BusStationAssociation) Reset() { - *x = BusStationAssociation{} - if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BusStationAssociation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BusStationAssociation) ProtoMessage() {} - -func (x *BusStationAssociation) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BusStationAssociation.ProtoReflect.Descriptor instead. -func (*BusStationAssociation) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{8} -} - -func (x *BusStationAssociation) GetBusId() string { - if x != nil { - return x.BusId - } - return "" -} - -func (x *BusStationAssociation) GetStationId() string { - if x != nil { - return x.StationId - } - return "" -} - type ChildPhoto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1208,7 +1105,7 @@ type ChildPhoto struct { func (x *ChildPhoto) Reset() { *x = ChildPhoto{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[9] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1221,7 +1118,7 @@ func (x *ChildPhoto) String() string { func (*ChildPhoto) ProtoMessage() {} func (x *ChildPhoto) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[9] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1234,7 +1131,7 @@ func (x *ChildPhoto) ProtoReflect() protoreflect.Message { // Deprecated: Use ChildPhoto.ProtoReflect.Descriptor instead. func (*ChildPhoto) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{9} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{8} } func (x *ChildPhoto) GetId() string { @@ -1287,7 +1184,7 @@ type BoardingRecord struct { func (x *BoardingRecord) Reset() { *x = BoardingRecord{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[10] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1300,7 +1197,7 @@ func (x *BoardingRecord) String() string { func (*BoardingRecord) ProtoMessage() {} func (x *BoardingRecord) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_resources_proto_msgTypes[10] + mi := &file_where_child_bus_v1_resources_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1313,7 +1210,7 @@ func (x *BoardingRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use BoardingRecord.ProtoReflect.Descriptor instead. func (*BoardingRecord) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{10} + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{9} } func (x *BoardingRecord) GetId() string { @@ -1351,6 +1248,77 @@ func (x *BoardingRecord) GetTimestamp() *timestamppb.Timestamp { return nil } +type BusRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + OrderedStationIds []string `protobuf:"bytes,3,rep,name=ordered_station_ids,json=orderedStationIds,proto3" json:"ordered_station_ids,omitempty"` + BusType BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` +} + +func (x *BusRoute) Reset() { + *x = BusRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BusRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BusRoute) ProtoMessage() {} + +func (x *BusRoute) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_resources_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BusRoute.ProtoReflect.Descriptor instead. +func (*BusRoute) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_resources_proto_rawDescGZIP(), []int{10} +} + +func (x *BusRoute) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BusRoute) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *BusRoute) GetOrderedStationIds() []string { + if x != nil { + return x.OrderedStationIds + } + return nil +} + +func (x *BusRoute) GetBusType() BusType { + if x != nil { + return x.BusType + } + return BusType_BUS_TYPE_UNSPECIFIED +} + var File_where_child_bus_v1_resources_proto protoreflect.FileDescriptor var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ @@ -1444,7 +1412,7 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x04, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb9, 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, @@ -1462,66 +1430,52 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, - 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x69, - 0x72, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x18, - 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, - 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x22, 0xfc, 0x03, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, - 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x35, - 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, - 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, - 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, - 0x6f, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, - 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, - 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x68, 0x61, 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, - 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x22, 0xd8, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, - 0x35, 0x0a, 0x17, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, - 0x67, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, - 0x4e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x22, 0xfc, 0x03, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, + 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x35, 0x0a, 0x17, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, + 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, + 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, + 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, + 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, + 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, + 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x1b, 0x0a, + 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x22, 0xea, 0x01, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, @@ -1532,84 +1486,85 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x8f, 0x01, - 0x0a, 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x4d, 0x0a, 0x15, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x73, - 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xcc, - 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x68, 0x6f, 0x74, - 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x68, - 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, 0x01, - 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x52, 0x0a, + 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0c, 0x62, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x73, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, + 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, - 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, - 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x73, 0x0a, - 0x09, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, - 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, - 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, - 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, - 0x10, 0x03, 0x2a, 0x62, 0x0a, 0x0c, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x56, - 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, - 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, - 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, - 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, - 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, - 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, - 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, - 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0x99, 0x01, 0x0a, 0x08, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, + 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, + 0x75, 0x73, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x11, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2a, 0x73, 0x0a, 0x09, + 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, 0x0a, + 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, + 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, + 0x03, 0x2a, 0x62, 0x0a, 0x0c, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x18, 0x0a, 0x14, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x56, 0x45, + 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, + 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, + 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, + 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, + 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, + 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, + 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, + 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1639,9 +1594,9 @@ var file_where_child_bus_v1_resources_proto_goTypes = []interface{}{ (*Child)(nil), // 9: where_child_bus.v1.Child (*Station)(nil), // 10: where_child_bus.v1.Station (*ChildBusAssociation)(nil), // 11: where_child_bus.v1.ChildBusAssociation - (*BusStationAssociation)(nil), // 12: where_child_bus.v1.BusStationAssociation - (*ChildPhoto)(nil), // 13: where_child_bus.v1.ChildPhoto - (*BoardingRecord)(nil), // 14: where_child_bus.v1.BoardingRecord + (*ChildPhoto)(nil), // 12: where_child_bus.v1.ChildPhoto + (*BoardingRecord)(nil), // 13: where_child_bus.v1.BoardingRecord + (*BusRoute)(nil), // 14: where_child_bus.v1.BusRoute (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp } var file_where_child_bus_v1_resources_proto_depIdxs = []int32{ @@ -1661,10 +1616,10 @@ var file_where_child_bus_v1_resources_proto_depIdxs = []int32{ 15, // 13: where_child_bus.v1.Child.updated_at:type_name -> google.protobuf.Timestamp 15, // 14: where_child_bus.v1.Station.created_at:type_name -> google.protobuf.Timestamp 15, // 15: where_child_bus.v1.Station.updated_at:type_name -> google.protobuf.Timestamp - 3, // 16: where_child_bus.v1.ChildBusAssociation.bus_type:type_name -> where_child_bus.v1.BusType - 15, // 17: where_child_bus.v1.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp - 15, // 18: where_child_bus.v1.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp - 15, // 19: where_child_bus.v1.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp + 15, // 16: where_child_bus.v1.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp + 15, // 17: where_child_bus.v1.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp + 15, // 18: where_child_bus.v1.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp + 3, // 19: where_child_bus.v1.BusRoute.bus_type:type_name -> where_child_bus.v1.BusType 20, // [20:20] is the sub-list for method output_type 20, // [20:20] is the sub-list for method input_type 20, // [20:20] is the sub-list for extension type_name @@ -1775,7 +1730,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BusStationAssociation); i { + switch v := v.(*ChildPhoto); i { case 0: return &v.state case 1: @@ -1787,7 +1742,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChildPhoto); i { + switch v := v.(*BoardingRecord); i { case 0: return &v.state case 1: @@ -1799,7 +1754,7 @@ func file_where_child_bus_v1_resources_proto_init() { } } file_where_child_bus_v1_resources_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BoardingRecord); i { + switch v := v.(*BusRoute); i { case 0: return &v.state case 1: diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index da339174..68724944 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -351,6 +351,108 @@ func (x *GetUnregisteredStationListResponse) GetGuardians() []*GuardianResponse return nil } +type GetCorrectOrderStationListByBusIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` +} + +func (x *GetCorrectOrderStationListByBusIdRequest) Reset() { + *x = GetCorrectOrderStationListByBusIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_station_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCorrectOrderStationListByBusIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCorrectOrderStationListByBusIdRequest) ProtoMessage() {} + +func (x *GetCorrectOrderStationListByBusIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_station_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCorrectOrderStationListByBusIdRequest.ProtoReflect.Descriptor instead. +func (*GetCorrectOrderStationListByBusIdRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{6} +} + +func (x *GetCorrectOrderStationListByBusIdRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *GetCorrectOrderStationListByBusIdRequest) GetBusType() BusType { + if x != nil { + return x.BusType + } + return BusType_BUS_TYPE_UNSPECIFIED +} + +type GetCorrectOrderStationListByBusIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusRoute *BusRoute `protobuf:"bytes,1,opt,name=bus_route,json=busRoute,proto3" json:"bus_route,omitempty"` +} + +func (x *GetCorrectOrderStationListByBusIdResponse) Reset() { + *x = GetCorrectOrderStationListByBusIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_station_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCorrectOrderStationListByBusIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCorrectOrderStationListByBusIdResponse) ProtoMessage() {} + +func (x *GetCorrectOrderStationListByBusIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_station_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCorrectOrderStationListByBusIdResponse.ProtoReflect.Descriptor instead. +func (*GetCorrectOrderStationListByBusIdResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{7} +} + +func (x *GetCorrectOrderStationListByBusIdResponse) GetBusRoute() *BusRoute { + if x != nil { + return x.BusRoute + } + return nil +} + type UpdateStationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -366,7 +468,7 @@ type UpdateStationRequest struct { func (x *UpdateStationRequest) Reset() { *x = UpdateStationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_station_proto_msgTypes[6] + mi := &file_where_child_bus_v1_station_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -379,7 +481,7 @@ func (x *UpdateStationRequest) String() string { func (*UpdateStationRequest) ProtoMessage() {} func (x *UpdateStationRequest) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_station_proto_msgTypes[6] + mi := &file_where_child_bus_v1_station_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -392,7 +494,7 @@ func (x *UpdateStationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateStationRequest.ProtoReflect.Descriptor instead. func (*UpdateStationRequest) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{6} + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{8} } func (x *UpdateStationRequest) GetId() string { @@ -441,7 +543,7 @@ type UpdateStationResponse struct { func (x *UpdateStationResponse) Reset() { *x = UpdateStationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_where_child_bus_v1_station_proto_msgTypes[7] + mi := &file_where_child_bus_v1_station_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -454,7 +556,7 @@ func (x *UpdateStationResponse) String() string { func (*UpdateStationResponse) ProtoMessage() {} func (x *UpdateStationResponse) ProtoReflect() protoreflect.Message { - mi := &file_where_child_bus_v1_station_proto_msgTypes[7] + mi := &file_where_child_bus_v1_station_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -467,7 +569,7 @@ func (x *UpdateStationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateStationResponse.ProtoReflect.Descriptor instead. func (*UpdateStationResponse) Descriptor() ([]byte, []int) { - return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{7} + return file_where_child_bus_v1_station_proto_rawDescGZIP(), []int{9} } func (x *UpdateStationResponse) GetStation() *Station { @@ -536,74 +638,98 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x22, 0xb4, 0x01, - 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, - 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, - 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, - 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x73, 0x65, 0x52, 0x09, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x22, 0x79, 0x0a, + 0x28, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, + 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, + 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x66, 0x0a, 0x29, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x62, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x08, 0x62, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x22, 0xb4, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xc8, 0x05, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, + 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xa5, 0x04, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x2e, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, + 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, + 0x64, 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x3d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, + 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x2e, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, - 0x73, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, - 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, - 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, + 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, + 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -618,7 +744,7 @@ func file_where_child_bus_v1_station_proto_rawDescGZIP() []byte { return file_where_child_bus_v1_station_proto_rawDescData } -var file_where_child_bus_v1_station_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_where_child_bus_v1_station_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_where_child_bus_v1_station_proto_goTypes = []interface{}{ (*UpdateStationLocationByGuardianIdRequest)(nil), // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdRequest (*UpdateStationLocationByGuardianIdResponse)(nil), // 1: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse @@ -626,37 +752,45 @@ var file_where_child_bus_v1_station_proto_goTypes = []interface{}{ (*GetStationListByBusIdResponse)(nil), // 3: where_child_bus.v1.GetStationListByBusIdResponse (*GetUnregisteredStationListRequest)(nil), // 4: where_child_bus.v1.GetUnregisteredStationListRequest (*GetUnregisteredStationListResponse)(nil), // 5: where_child_bus.v1.GetUnregisteredStationListResponse - (*UpdateStationRequest)(nil), // 6: where_child_bus.v1.UpdateStationRequest - (*UpdateStationResponse)(nil), // 7: where_child_bus.v1.UpdateStationResponse - (*Station)(nil), // 8: where_child_bus.v1.Station - (*GuardianResponse)(nil), // 9: where_child_bus.v1.GuardianResponse - (*Child)(nil), // 10: where_child_bus.v1.Child - (*ChildPhoto)(nil), // 11: where_child_bus.v1.ChildPhoto - (*fieldmaskpb.FieldMask)(nil), // 12: google.protobuf.FieldMask + (*GetCorrectOrderStationListByBusIdRequest)(nil), // 6: where_child_bus.v1.GetCorrectOrderStationListByBusIdRequest + (*GetCorrectOrderStationListByBusIdResponse)(nil), // 7: where_child_bus.v1.GetCorrectOrderStationListByBusIdResponse + (*UpdateStationRequest)(nil), // 8: where_child_bus.v1.UpdateStationRequest + (*UpdateStationResponse)(nil), // 9: where_child_bus.v1.UpdateStationResponse + (*Station)(nil), // 10: where_child_bus.v1.Station + (*GuardianResponse)(nil), // 11: where_child_bus.v1.GuardianResponse + (*Child)(nil), // 12: where_child_bus.v1.Child + (*ChildPhoto)(nil), // 13: where_child_bus.v1.ChildPhoto + (BusType)(0), // 14: where_child_bus.v1.BusType + (*BusRoute)(nil), // 15: where_child_bus.v1.BusRoute + (*fieldmaskpb.FieldMask)(nil), // 16: google.protobuf.FieldMask } var file_where_child_bus_v1_station_proto_depIdxs = []int32{ - 8, // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse.station:type_name -> where_child_bus.v1.Station - 8, // 1: where_child_bus.v1.GetStationListByBusIdResponse.stations:type_name -> where_child_bus.v1.Station - 9, // 2: where_child_bus.v1.GetStationListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse - 10, // 3: where_child_bus.v1.GetStationListByBusIdResponse.children:type_name -> where_child_bus.v1.Child - 11, // 4: where_child_bus.v1.GetStationListByBusIdResponse.photos:type_name -> where_child_bus.v1.ChildPhoto - 8, // 5: where_child_bus.v1.GetUnregisteredStationListResponse.stations:type_name -> where_child_bus.v1.Station - 9, // 6: where_child_bus.v1.GetUnregisteredStationListResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse - 12, // 7: where_child_bus.v1.UpdateStationRequest.update_mask:type_name -> google.protobuf.FieldMask - 8, // 8: where_child_bus.v1.UpdateStationResponse.station:type_name -> where_child_bus.v1.Station - 0, // 9: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:input_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdRequest - 2, // 10: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest - 4, // 11: where_child_bus.v1.StationService.GetUnregisteredStationList:input_type -> where_child_bus.v1.GetUnregisteredStationListRequest - 6, // 12: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest - 1, // 13: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:output_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdResponse - 3, // 14: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse - 5, // 15: where_child_bus.v1.StationService.GetUnregisteredStationList:output_type -> where_child_bus.v1.GetUnregisteredStationListResponse - 7, // 16: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse - 13, // [13:17] is the sub-list for method output_type - 9, // [9:13] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 10, // 0: where_child_bus.v1.UpdateStationLocationByGuardianIdResponse.station:type_name -> where_child_bus.v1.Station + 10, // 1: where_child_bus.v1.GetStationListByBusIdResponse.stations:type_name -> where_child_bus.v1.Station + 11, // 2: where_child_bus.v1.GetStationListByBusIdResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 12, // 3: where_child_bus.v1.GetStationListByBusIdResponse.children:type_name -> where_child_bus.v1.Child + 13, // 4: where_child_bus.v1.GetStationListByBusIdResponse.photos:type_name -> where_child_bus.v1.ChildPhoto + 10, // 5: where_child_bus.v1.GetUnregisteredStationListResponse.stations:type_name -> where_child_bus.v1.Station + 11, // 6: where_child_bus.v1.GetUnregisteredStationListResponse.guardians:type_name -> where_child_bus.v1.GuardianResponse + 14, // 7: where_child_bus.v1.GetCorrectOrderStationListByBusIdRequest.bus_type:type_name -> where_child_bus.v1.BusType + 15, // 8: where_child_bus.v1.GetCorrectOrderStationListByBusIdResponse.bus_route:type_name -> where_child_bus.v1.BusRoute + 16, // 9: where_child_bus.v1.UpdateStationRequest.update_mask:type_name -> google.protobuf.FieldMask + 10, // 10: where_child_bus.v1.UpdateStationResponse.station:type_name -> where_child_bus.v1.Station + 0, // 11: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:input_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdRequest + 2, // 12: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest + 6, // 13: where_child_bus.v1.StationService.GetCorrectOrderStationListByBusId:input_type -> where_child_bus.v1.GetCorrectOrderStationListByBusIdRequest + 4, // 14: where_child_bus.v1.StationService.GetUnregisteredStationList:input_type -> where_child_bus.v1.GetUnregisteredStationListRequest + 8, // 15: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest + 1, // 16: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:output_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdResponse + 3, // 17: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse + 7, // 18: where_child_bus.v1.StationService.GetCorrectOrderStationListByBusId:output_type -> where_child_bus.v1.GetCorrectOrderStationListByBusIdResponse + 5, // 19: where_child_bus.v1.StationService.GetUnregisteredStationList:output_type -> where_child_bus.v1.GetUnregisteredStationListResponse + 9, // 20: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse + 16, // [16:21] is the sub-list for method output_type + 11, // [11:16] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_where_child_bus_v1_station_proto_init() } @@ -739,7 +873,7 @@ func file_where_child_bus_v1_station_proto_init() { } } file_where_child_bus_v1_station_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateStationRequest); i { + switch v := v.(*GetCorrectOrderStationListByBusIdRequest); i { case 0: return &v.state case 1: @@ -751,6 +885,30 @@ func file_where_child_bus_v1_station_proto_init() { } } file_where_child_bus_v1_station_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCorrectOrderStationListByBusIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_station_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateStationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_station_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateStationResponse); i { case 0: return &v.state @@ -769,7 +927,7 @@ func file_where_child_bus_v1_station_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_where_child_bus_v1_station_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go index 7ac2fac7..0edbd36b 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( StationService_UpdateStationLocationByGuardianId_FullMethodName = "/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId" StationService_GetStationListByBusId_FullMethodName = "/where_child_bus.v1.StationService/GetStationListByBusId" + StationService_GetCorrectOrderStationListByBusId_FullMethodName = "/where_child_bus.v1.StationService/GetCorrectOrderStationListByBusId" StationService_GetUnregisteredStationList_FullMethodName = "/where_child_bus.v1.StationService/GetUnregisteredStationList" StationService_UpdateStation_FullMethodName = "/where_child_bus.v1.StationService/UpdateStation" ) @@ -31,6 +32,7 @@ const ( type StationServiceClient interface { UpdateStationLocationByGuardianId(ctx context.Context, in *UpdateStationLocationByGuardianIdRequest, opts ...grpc.CallOption) (*UpdateStationLocationByGuardianIdResponse, error) GetStationListByBusId(ctx context.Context, in *GetStationListByBusIdRequest, opts ...grpc.CallOption) (*GetStationListByBusIdResponse, error) + GetCorrectOrderStationListByBusId(ctx context.Context, in *GetCorrectOrderStationListByBusIdRequest, opts ...grpc.CallOption) (*GetCorrectOrderStationListByBusIdResponse, error) GetUnregisteredStationList(ctx context.Context, in *GetUnregisteredStationListRequest, opts ...grpc.CallOption) (*GetUnregisteredStationListResponse, error) UpdateStation(ctx context.Context, in *UpdateStationRequest, opts ...grpc.CallOption) (*UpdateStationResponse, error) } @@ -61,6 +63,15 @@ func (c *stationServiceClient) GetStationListByBusId(ctx context.Context, in *Ge return out, nil } +func (c *stationServiceClient) GetCorrectOrderStationListByBusId(ctx context.Context, in *GetCorrectOrderStationListByBusIdRequest, opts ...grpc.CallOption) (*GetCorrectOrderStationListByBusIdResponse, error) { + out := new(GetCorrectOrderStationListByBusIdResponse) + err := c.cc.Invoke(ctx, StationService_GetCorrectOrderStationListByBusId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *stationServiceClient) GetUnregisteredStationList(ctx context.Context, in *GetUnregisteredStationListRequest, opts ...grpc.CallOption) (*GetUnregisteredStationListResponse, error) { out := new(GetUnregisteredStationListResponse) err := c.cc.Invoke(ctx, StationService_GetUnregisteredStationList_FullMethodName, in, out, opts...) @@ -85,6 +96,7 @@ func (c *stationServiceClient) UpdateStation(ctx context.Context, in *UpdateStat type StationServiceServer interface { UpdateStationLocationByGuardianId(context.Context, *UpdateStationLocationByGuardianIdRequest) (*UpdateStationLocationByGuardianIdResponse, error) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) + GetCorrectOrderStationListByBusId(context.Context, *GetCorrectOrderStationListByBusIdRequest) (*GetCorrectOrderStationListByBusIdResponse, error) GetUnregisteredStationList(context.Context, *GetUnregisteredStationListRequest) (*GetUnregisteredStationListResponse, error) UpdateStation(context.Context, *UpdateStationRequest) (*UpdateStationResponse, error) } @@ -99,6 +111,9 @@ func (UnimplementedStationServiceServer) UpdateStationLocationByGuardianId(conte func (UnimplementedStationServiceServer) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStationListByBusId not implemented") } +func (UnimplementedStationServiceServer) GetCorrectOrderStationListByBusId(context.Context, *GetCorrectOrderStationListByBusIdRequest) (*GetCorrectOrderStationListByBusIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCorrectOrderStationListByBusId not implemented") +} func (UnimplementedStationServiceServer) GetUnregisteredStationList(context.Context, *GetUnregisteredStationListRequest) (*GetUnregisteredStationListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUnregisteredStationList not implemented") } @@ -153,6 +168,24 @@ func _StationService_GetStationListByBusId_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } +func _StationService_GetCorrectOrderStationListByBusId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCorrectOrderStationListByBusIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StationServiceServer).GetCorrectOrderStationListByBusId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StationService_GetCorrectOrderStationListByBusId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StationServiceServer).GetCorrectOrderStationListByBusId(ctx, req.(*GetCorrectOrderStationListByBusIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _StationService_GetUnregisteredStationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetUnregisteredStationListRequest) if err := dec(in); err != nil { @@ -204,6 +237,10 @@ var StationService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetStationListByBusId", Handler: _StationService_GetStationListByBusId_Handler, }, + { + MethodName: "GetCorrectOrderStationListByBusId", + Handler: _StationService_GetCorrectOrderStationListByBusId_Handler, + }, { MethodName: "GetUnregisteredStationList", Handler: _StationService_GetUnregisteredStationList_Handler, diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index 5a8e0135..e664cce3 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -694,8 +694,6 @@ class Bus extends $pb.GeneratedMessage { $core.double? latitude, $core.double? longitude, $core.bool? enableFaceRecognition, - $core.String? morningFirstStationId, - $core.String? eveningFirstStationId, $core.String? nextStationId, $7.Timestamp? createdAt, $7.Timestamp? updatedAt, @@ -725,12 +723,6 @@ class Bus extends $pb.GeneratedMessage { if (enableFaceRecognition != null) { $result.enableFaceRecognition = enableFaceRecognition; } - if (morningFirstStationId != null) { - $result.morningFirstStationId = morningFirstStationId; - } - if (eveningFirstStationId != null) { - $result.eveningFirstStationId = eveningFirstStationId; - } if (nextStationId != null) { $result.nextStationId = nextStationId; } @@ -755,8 +747,6 @@ class Bus extends $pb.GeneratedMessage { ..a<$core.double>(6, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..aOB(8, _omitFieldNames ? '' : 'enableFaceRecognition') - ..aOS(9, _omitFieldNames ? '' : 'morningFirstStationId') - ..aOS(10, _omitFieldNames ? '' : 'eveningFirstStationId') ..aOS(11, _omitFieldNames ? '' : 'nextStationId') ..aOM<$7.Timestamp>(12, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) ..aOM<$7.Timestamp>(13, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) @@ -857,54 +847,36 @@ class Bus extends $pb.GeneratedMessage { @$pb.TagNumber(8) void clearEnableFaceRecognition() => clearField(8); - @$pb.TagNumber(9) - $core.String get morningFirstStationId => $_getSZ(8); - @$pb.TagNumber(9) - set morningFirstStationId($core.String v) { $_setString(8, v); } - @$pb.TagNumber(9) - $core.bool hasMorningFirstStationId() => $_has(8); - @$pb.TagNumber(9) - void clearMorningFirstStationId() => clearField(9); - - @$pb.TagNumber(10) - $core.String get eveningFirstStationId => $_getSZ(9); - @$pb.TagNumber(10) - set eveningFirstStationId($core.String v) { $_setString(9, v); } - @$pb.TagNumber(10) - $core.bool hasEveningFirstStationId() => $_has(9); - @$pb.TagNumber(10) - void clearEveningFirstStationId() => clearField(10); - @$pb.TagNumber(11) - $core.String get nextStationId => $_getSZ(10); + $core.String get nextStationId => $_getSZ(8); @$pb.TagNumber(11) - set nextStationId($core.String v) { $_setString(10, v); } + set nextStationId($core.String v) { $_setString(8, v); } @$pb.TagNumber(11) - $core.bool hasNextStationId() => $_has(10); + $core.bool hasNextStationId() => $_has(8); @$pb.TagNumber(11) void clearNextStationId() => clearField(11); @$pb.TagNumber(12) - $7.Timestamp get createdAt => $_getN(11); + $7.Timestamp get createdAt => $_getN(9); @$pb.TagNumber(12) set createdAt($7.Timestamp v) { setField(12, v); } @$pb.TagNumber(12) - $core.bool hasCreatedAt() => $_has(11); + $core.bool hasCreatedAt() => $_has(9); @$pb.TagNumber(12) void clearCreatedAt() => clearField(12); @$pb.TagNumber(12) - $7.Timestamp ensureCreatedAt() => $_ensure(11); + $7.Timestamp ensureCreatedAt() => $_ensure(9); @$pb.TagNumber(13) - $7.Timestamp get updatedAt => $_getN(12); + $7.Timestamp get updatedAt => $_getN(10); @$pb.TagNumber(13) set updatedAt($7.Timestamp v) { setField(13, v); } @$pb.TagNumber(13) - $core.bool hasUpdatedAt() => $_has(12); + $core.bool hasUpdatedAt() => $_has(10); @$pb.TagNumber(13) void clearUpdatedAt() => clearField(13); @$pb.TagNumber(13) - $7.Timestamp ensureUpdatedAt() => $_ensure(12); + $7.Timestamp ensureUpdatedAt() => $_ensure(10); } class Child extends $pb.GeneratedMessage { @@ -1147,8 +1119,6 @@ class Station extends $pb.GeneratedMessage { factory Station({ $core.String? id, $core.String? guardianId, - $core.String? morningNextStationId, - $core.String? eveningNextStationId, $core.double? latitude, $core.double? longitude, $7.Timestamp? createdAt, @@ -1161,12 +1131,6 @@ class Station extends $pb.GeneratedMessage { if (guardianId != null) { $result.guardianId = guardianId; } - if (morningNextStationId != null) { - $result.morningNextStationId = morningNextStationId; - } - if (eveningNextStationId != null) { - $result.eveningNextStationId = eveningNextStationId; - } if (latitude != null) { $result.latitude = latitude; } @@ -1188,8 +1152,6 @@ class Station extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Station', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'guardianId') - ..aOS(3, _omitFieldNames ? '' : 'morningNextStationId') - ..aOS(4, _omitFieldNames ? '' : 'eveningNextStationId') ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) @@ -1236,85 +1198,59 @@ class Station extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearGuardianId() => clearField(2); - @$pb.TagNumber(3) - $core.String get morningNextStationId => $_getSZ(2); - @$pb.TagNumber(3) - set morningNextStationId($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasMorningNextStationId() => $_has(2); - @$pb.TagNumber(3) - void clearMorningNextStationId() => clearField(3); - - @$pb.TagNumber(4) - $core.String get eveningNextStationId => $_getSZ(3); - @$pb.TagNumber(4) - set eveningNextStationId($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasEveningNextStationId() => $_has(3); - @$pb.TagNumber(4) - void clearEveningNextStationId() => clearField(4); - @$pb.TagNumber(5) - $core.double get latitude => $_getN(4); + $core.double get latitude => $_getN(2); @$pb.TagNumber(5) - set latitude($core.double v) { $_setDouble(4, v); } + set latitude($core.double v) { $_setDouble(2, v); } @$pb.TagNumber(5) - $core.bool hasLatitude() => $_has(4); + $core.bool hasLatitude() => $_has(2); @$pb.TagNumber(5) void clearLatitude() => clearField(5); @$pb.TagNumber(6) - $core.double get longitude => $_getN(5); + $core.double get longitude => $_getN(3); @$pb.TagNumber(6) - set longitude($core.double v) { $_setDouble(5, v); } + set longitude($core.double v) { $_setDouble(3, v); } @$pb.TagNumber(6) - $core.bool hasLongitude() => $_has(5); + $core.bool hasLongitude() => $_has(3); @$pb.TagNumber(6) void clearLongitude() => clearField(6); @$pb.TagNumber(7) - $7.Timestamp get createdAt => $_getN(6); + $7.Timestamp get createdAt => $_getN(4); @$pb.TagNumber(7) set createdAt($7.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) - $core.bool hasCreatedAt() => $_has(6); + $core.bool hasCreatedAt() => $_has(4); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $7.Timestamp ensureCreatedAt() => $_ensure(6); + $7.Timestamp ensureCreatedAt() => $_ensure(4); @$pb.TagNumber(8) - $7.Timestamp get updatedAt => $_getN(7); + $7.Timestamp get updatedAt => $_getN(5); @$pb.TagNumber(8) set updatedAt($7.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) - $core.bool hasUpdatedAt() => $_has(7); + $core.bool hasUpdatedAt() => $_has(5); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $7.Timestamp ensureUpdatedAt() => $_ensure(7); + $7.Timestamp ensureUpdatedAt() => $_ensure(5); } class ChildBusAssociation extends $pb.GeneratedMessage { factory ChildBusAssociation({ - $core.String? id, - $core.String? busId, + $core.String? busRouteId, $core.String? childId, - BusType? busType, }) { final $result = create(); - if (id != null) { - $result.id = id; - } - if (busId != null) { - $result.busId = busId; + if (busRouteId != null) { + $result.busRouteId = busRouteId; } if (childId != null) { $result.childId = childId; } - if (busType != null) { - $result.busType = busType; - } return $result; } ChildBusAssociation._() : super(); @@ -1322,10 +1258,8 @@ class ChildBusAssociation extends $pb.GeneratedMessage { factory ChildBusAssociation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChildBusAssociation', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'id') - ..aOS(2, _omitFieldNames ? '' : 'busId') - ..aOS(3, _omitFieldNames ? '' : 'childId') - ..e(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: BusType.BUS_TYPE_UNSPECIFIED, valueOf: BusType.valueOf, enumValues: BusType.values) + ..aOS(1, _omitFieldNames ? '' : 'busRouteId') + ..aOS(2, _omitFieldNames ? '' : 'childId') ..hasRequiredFields = false ; @@ -1351,104 +1285,22 @@ class ChildBusAssociation extends $pb.GeneratedMessage { static ChildBusAssociation? _defaultInstance; @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); + $core.String get busRouteId => $_getSZ(0); @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } + set busRouteId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); + $core.bool hasBusRouteId() => $_has(0); @$pb.TagNumber(1) - void clearId() => clearField(1); + void clearBusRouteId() => clearField(1); @$pb.TagNumber(2) - $core.String get busId => $_getSZ(1); - @$pb.TagNumber(2) - set busId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasBusId() => $_has(1); - @$pb.TagNumber(2) - void clearBusId() => clearField(2); - - @$pb.TagNumber(3) - $core.String get childId => $_getSZ(2); - @$pb.TagNumber(3) - set childId($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasChildId() => $_has(2); - @$pb.TagNumber(3) - void clearChildId() => clearField(3); - - @$pb.TagNumber(4) - BusType get busType => $_getN(3); - @$pb.TagNumber(4) - set busType(BusType v) { setField(4, v); } - @$pb.TagNumber(4) - $core.bool hasBusType() => $_has(3); - @$pb.TagNumber(4) - void clearBusType() => clearField(4); -} - -class BusStationAssociation extends $pb.GeneratedMessage { - factory BusStationAssociation({ - $core.String? busId, - $core.String? stationId, - }) { - final $result = create(); - if (busId != null) { - $result.busId = busId; - } - if (stationId != null) { - $result.stationId = stationId; - } - return $result; - } - BusStationAssociation._() : super(); - factory BusStationAssociation.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory BusStationAssociation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BusStationAssociation', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'busId') - ..aOS(2, _omitFieldNames ? '' : 'stationId') - ..hasRequiredFields = false - ; - - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - BusStationAssociation clone() => BusStationAssociation()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - BusStationAssociation copyWith(void Function(BusStationAssociation) updates) => super.copyWith((message) => updates(message as BusStationAssociation)) as BusStationAssociation; - - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static BusStationAssociation create() => BusStationAssociation._(); - BusStationAssociation createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static BusStationAssociation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static BusStationAssociation? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get busId => $_getSZ(0); - @$pb.TagNumber(1) - set busId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasBusId() => $_has(0); - @$pb.TagNumber(1) - void clearBusId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get stationId => $_getSZ(1); + $core.String get childId => $_getSZ(1); @$pb.TagNumber(2) - set stationId($core.String v) { $_setString(1, v); } + set childId($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) - $core.bool hasStationId() => $_has(1); + $core.bool hasChildId() => $_has(1); @$pb.TagNumber(2) - void clearStationId() => clearField(2); + void clearChildId() => clearField(2); } class ChildPhoto extends $pb.GeneratedMessage { @@ -1669,6 +1521,92 @@ class BoardingRecord extends $pb.GeneratedMessage { $7.Timestamp ensureTimestamp() => $_ensure(4); } +class BusRoute extends $pb.GeneratedMessage { + factory BusRoute({ + $core.String? id, + $core.String? busId, + $core.Iterable<$core.String>? orderedStationIds, + BusType? busType, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (busId != null) { + $result.busId = busId; + } + if (orderedStationIds != null) { + $result.orderedStationIds.addAll(orderedStationIds); + } + if (busType != null) { + $result.busType = busType; + } + return $result; + } + BusRoute._() : super(); + factory BusRoute.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BusRoute.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BusRoute', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'busId') + ..pPS(3, _omitFieldNames ? '' : 'orderedStationIds') + ..e(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: BusType.BUS_TYPE_UNSPECIFIED, valueOf: BusType.valueOf, enumValues: BusType.values) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + BusRoute clone() => BusRoute()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + BusRoute copyWith(void Function(BusRoute) updates) => super.copyWith((message) => updates(message as BusRoute)) as BusRoute; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BusRoute create() => BusRoute._(); + BusRoute createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BusRoute getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BusRoute? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get busId => $_getSZ(1); + @$pb.TagNumber(2) + set busId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasBusId() => $_has(1); + @$pb.TagNumber(2) + void clearBusId() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$core.String> get orderedStationIds => $_getList(2); + + @$pb.TagNumber(4) + BusType get busType => $_getN(3); + @$pb.TagNumber(4) + set busType(BusType v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasBusType() => $_has(3); + @$pb.TagNumber(4) + void clearBusType() => clearField(4); +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index 5e40fb57..e261a6f9 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -190,8 +190,6 @@ const Bus$json = { {'1': 'latitude', '3': 6, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 7, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'enable_face_recognition', '3': 8, '4': 1, '5': 8, '10': 'enableFaceRecognition'}, - {'1': 'morning_first_station_id', '3': 9, '4': 1, '5': 9, '10': 'morningFirstStationId'}, - {'1': 'evening_first_station_id', '3': 10, '4': 1, '5': 9, '10': 'eveningFirstStationId'}, {'1': 'next_station_id', '3': 11, '4': 1, '5': 9, '10': 'nextStationId'}, {'1': 'created_at', '3': 12, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, {'1': 'updated_at', '3': 13, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, @@ -205,11 +203,9 @@ final $typed_data.Uint8List busDescriptor = $convert.base64Decode( 'YnVzX3N0YXR1cxgFIAEoDjIdLndoZXJlX2NoaWxkX2J1cy52MS5CdXNTdGF0dXNSCWJ1c1N0YX' 'R1cxIaCghsYXRpdHVkZRgGIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAcgASgBUglsb25n' 'aXR1ZGUSNgoXZW5hYmxlX2ZhY2VfcmVjb2duaXRpb24YCCABKAhSFWVuYWJsZUZhY2VSZWNvZ2' - '5pdGlvbhI3Chhtb3JuaW5nX2ZpcnN0X3N0YXRpb25faWQYCSABKAlSFW1vcm5pbmdGaXJzdFN0' - 'YXRpb25JZBI3ChhldmVuaW5nX2ZpcnN0X3N0YXRpb25faWQYCiABKAlSFWV2ZW5pbmdGaXJzdF' - 'N0YXRpb25JZBImCg9uZXh0X3N0YXRpb25faWQYCyABKAlSDW5leHRTdGF0aW9uSWQSOQoKY3Jl' - 'YXRlZF9hdBgMIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cg' - 'p1cGRhdGVkX2F0GA0gASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); + '5pdGlvbhImCg9uZXh0X3N0YXRpb25faWQYCyABKAlSDW5leHRTdGF0aW9uSWQSOQoKY3JlYXRl' + 'ZF9hdBgMIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cG' + 'RhdGVkX2F0GA0gASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); @$core.Deprecated('Use childDescriptor instead') const Child$json = { @@ -251,8 +247,6 @@ const Station$json = { '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'guardian_id', '3': 2, '4': 1, '5': 9, '10': 'guardianId'}, - {'1': 'morning_next_station_id', '3': 3, '4': 1, '5': 9, '10': 'morningNextStationId'}, - {'1': 'evening_next_station_id', '3': 4, '4': 1, '5': 9, '10': 'eveningNextStationId'}, {'1': 'latitude', '3': 5, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 6, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'created_at', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, @@ -263,43 +257,24 @@ const Station$json = { /// Descriptor for `Station`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List stationDescriptor = $convert.base64Decode( 'CgdTdGF0aW9uEg4KAmlkGAEgASgJUgJpZBIfCgtndWFyZGlhbl9pZBgCIAEoCVIKZ3VhcmRpYW' - '5JZBI1Chdtb3JuaW5nX25leHRfc3RhdGlvbl9pZBgDIAEoCVIUbW9ybmluZ05leHRTdGF0aW9u' - 'SWQSNQoXZXZlbmluZ19uZXh0X3N0YXRpb25faWQYBCABKAlSFGV2ZW5pbmdOZXh0U3RhdGlvbk' - 'lkEhoKCGxhdGl0dWRlGAUgASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYBiABKAFSCWxvbmdp' - 'dHVkZRI5CgpjcmVhdGVkX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3' - 'JlYXRlZEF0EjkKCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1w' - 'Ugl1cGRhdGVkQXQ='); + '5JZBIaCghsYXRpdHVkZRgFIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAYgASgBUglsb25n' + 'aXR1ZGUSOQoKY3JlYXRlZF9hdBgHIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCW' + 'NyZWF0ZWRBdBI5Cgp1cGRhdGVkX2F0GAggASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFt' + 'cFIJdXBkYXRlZEF0'); @$core.Deprecated('Use childBusAssociationDescriptor instead') const ChildBusAssociation$json = { '1': 'ChildBusAssociation', '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - {'1': 'bus_id', '3': 2, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'child_id', '3': 3, '4': 1, '5': 9, '10': 'childId'}, - {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, + {'1': 'bus_route_id', '3': 1, '4': 1, '5': 9, '10': 'busRouteId'}, + {'1': 'child_id', '3': 2, '4': 1, '5': 9, '10': 'childId'}, ], }; /// Descriptor for `ChildBusAssociation`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List childBusAssociationDescriptor = $convert.base64Decode( - 'ChNDaGlsZEJ1c0Fzc29jaWF0aW9uEg4KAmlkGAEgASgJUgJpZBIVCgZidXNfaWQYAiABKAlSBW' - 'J1c0lkEhkKCGNoaWxkX2lkGAMgASgJUgdjaGlsZElkEjYKCGJ1c190eXBlGAQgASgOMhsud2hl' - 'cmVfY2hpbGRfYnVzLnYxLkJ1c1R5cGVSB2J1c1R5cGU='); - -@$core.Deprecated('Use busStationAssociationDescriptor instead') -const BusStationAssociation$json = { - '1': 'BusStationAssociation', - '2': [ - {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'station_id', '3': 2, '4': 1, '5': 9, '10': 'stationId'}, - ], -}; - -/// Descriptor for `BusStationAssociation`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List busStationAssociationDescriptor = $convert.base64Decode( - 'ChVCdXNTdGF0aW9uQXNzb2NpYXRpb24SFQoGYnVzX2lkGAEgASgJUgVidXNJZBIdCgpzdGF0aW' - '9uX2lkGAIgASgJUglzdGF0aW9uSWQ='); + 'ChNDaGlsZEJ1c0Fzc29jaWF0aW9uEiAKDGJ1c19yb3V0ZV9pZBgBIAEoCVIKYnVzUm91dGVJZB' + 'IZCghjaGlsZF9pZBgCIAEoCVIHY2hpbGRJZA=='); @$core.Deprecated('Use childPhotoDescriptor instead') const ChildPhoto$json = { @@ -339,3 +314,20 @@ final $typed_data.Uint8List boardingRecordDescriptor = $convert.base64Decode( 'ZGluZxI4Cgl0aW1lc3RhbXAYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl0aW' '1lc3RhbXA='); +@$core.Deprecated('Use busRouteDescriptor instead') +const BusRoute$json = { + '1': 'BusRoute', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'bus_id', '3': 2, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'ordered_station_ids', '3': 3, '4': 3, '5': 9, '10': 'orderedStationIds'}, + {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, + ], +}; + +/// Descriptor for `BusRoute`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List busRouteDescriptor = $convert.base64Decode( + 'CghCdXNSb3V0ZRIOCgJpZBgBIAEoCVICaWQSFQoGYnVzX2lkGAIgASgJUgVidXNJZBIuChNvcm' + 'RlcmVkX3N0YXRpb25faWRzGAMgAygJUhFvcmRlcmVkU3RhdGlvbklkcxI2CghidXNfdHlwZRgE' + 'IAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBl'); + diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart index fc5c2425..f97f0d4d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -15,6 +15,7 @@ import 'package:protobuf/protobuf.dart' as $pb; import '../../google/protobuf/field_mask.pb.dart' as $9; import 'resources.pb.dart' as $8; +import 'resources.pbenum.dart' as $8; class UpdateStationLocationByGuardianIdRequest extends $pb.GeneratedMessage { factory UpdateStationLocationByGuardianIdRequest({ @@ -366,6 +367,122 @@ class GetUnregisteredStationListResponse extends $pb.GeneratedMessage { $core.List<$8.GuardianResponse> get guardians => $_getList(1); } +class GetCorrectOrderStationListByBusIdRequest extends $pb.GeneratedMessage { + factory GetCorrectOrderStationListByBusIdRequest({ + $core.String? busId, + $8.BusType? busType, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + if (busType != null) { + $result.busType = busType; + } + return $result; + } + GetCorrectOrderStationListByBusIdRequest._() : super(); + factory GetCorrectOrderStationListByBusIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetCorrectOrderStationListByBusIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetCorrectOrderStationListByBusIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..e<$8.BusType>(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetCorrectOrderStationListByBusIdRequest clone() => GetCorrectOrderStationListByBusIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetCorrectOrderStationListByBusIdRequest copyWith(void Function(GetCorrectOrderStationListByBusIdRequest) updates) => super.copyWith((message) => updates(message as GetCorrectOrderStationListByBusIdRequest)) as GetCorrectOrderStationListByBusIdRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetCorrectOrderStationListByBusIdRequest create() => GetCorrectOrderStationListByBusIdRequest._(); + GetCorrectOrderStationListByBusIdRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetCorrectOrderStationListByBusIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetCorrectOrderStationListByBusIdRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + $8.BusType get busType => $_getN(1); + @$pb.TagNumber(2) + set busType($8.BusType v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasBusType() => $_has(1); + @$pb.TagNumber(2) + void clearBusType() => clearField(2); +} + +class GetCorrectOrderStationListByBusIdResponse extends $pb.GeneratedMessage { + factory GetCorrectOrderStationListByBusIdResponse({ + $8.BusRoute? busRoute, + }) { + final $result = create(); + if (busRoute != null) { + $result.busRoute = busRoute; + } + return $result; + } + GetCorrectOrderStationListByBusIdResponse._() : super(); + factory GetCorrectOrderStationListByBusIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetCorrectOrderStationListByBusIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetCorrectOrderStationListByBusIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$8.BusRoute>(1, _omitFieldNames ? '' : 'busRoute', subBuilder: $8.BusRoute.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetCorrectOrderStationListByBusIdResponse clone() => GetCorrectOrderStationListByBusIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetCorrectOrderStationListByBusIdResponse copyWith(void Function(GetCorrectOrderStationListByBusIdResponse) updates) => super.copyWith((message) => updates(message as GetCorrectOrderStationListByBusIdResponse)) as GetCorrectOrderStationListByBusIdResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetCorrectOrderStationListByBusIdResponse create() => GetCorrectOrderStationListByBusIdResponse._(); + GetCorrectOrderStationListByBusIdResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetCorrectOrderStationListByBusIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetCorrectOrderStationListByBusIdResponse? _defaultInstance; + + @$pb.TagNumber(1) + $8.BusRoute get busRoute => $_getN(0); + @$pb.TagNumber(1) + set busRoute($8.BusRoute v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasBusRoute() => $_has(0); + @$pb.TagNumber(1) + void clearBusRoute() => clearField(1); + @$pb.TagNumber(1) + $8.BusRoute ensureBusRoute() => $_ensure(0); +} + class UpdateStationRequest extends $pb.GeneratedMessage { factory UpdateStationRequest({ $core.String? id, diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart index 3c1624b9..332f01f8 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart @@ -29,6 +29,10 @@ class StationServiceClient extends $grpc.Client { '/where_child_bus.v1.StationService/GetStationListByBusId', ($6.GetStationListByBusIdRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $6.GetStationListByBusIdResponse.fromBuffer(value)); + static final _$getCorrectOrderStationListByBusId = $grpc.ClientMethod<$6.GetCorrectOrderStationListByBusIdRequest, $6.GetCorrectOrderStationListByBusIdResponse>( + '/where_child_bus.v1.StationService/GetCorrectOrderStationListByBusId', + ($6.GetCorrectOrderStationListByBusIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.GetCorrectOrderStationListByBusIdResponse.fromBuffer(value)); static final _$getUnregisteredStationList = $grpc.ClientMethod<$6.GetUnregisteredStationListRequest, $6.GetUnregisteredStationListResponse>( '/where_child_bus.v1.StationService/GetUnregisteredStationList', ($6.GetUnregisteredStationListRequest value) => value.writeToBuffer(), @@ -52,6 +56,10 @@ class StationServiceClient extends $grpc.Client { return $createUnaryCall(_$getStationListByBusId, request, options: options); } + $grpc.ResponseFuture<$6.GetCorrectOrderStationListByBusIdResponse> getCorrectOrderStationListByBusId($6.GetCorrectOrderStationListByBusIdRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getCorrectOrderStationListByBusId, request, options: options); + } + $grpc.ResponseFuture<$6.GetUnregisteredStationListResponse> getUnregisteredStationList($6.GetUnregisteredStationListRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getUnregisteredStationList, request, options: options); } @@ -80,6 +88,13 @@ abstract class StationServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $6.GetStationListByBusIdRequest.fromBuffer(value), ($6.GetStationListByBusIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$6.GetCorrectOrderStationListByBusIdRequest, $6.GetCorrectOrderStationListByBusIdResponse>( + 'GetCorrectOrderStationListByBusId', + getCorrectOrderStationListByBusId_Pre, + false, + false, + ($core.List<$core.int> value) => $6.GetCorrectOrderStationListByBusIdRequest.fromBuffer(value), + ($6.GetCorrectOrderStationListByBusIdResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$6.GetUnregisteredStationListRequest, $6.GetUnregisteredStationListResponse>( 'GetUnregisteredStationList', getUnregisteredStationList_Pre, @@ -104,6 +119,10 @@ abstract class StationServiceBase extends $grpc.Service { return getStationListByBusId(call, await request); } + $async.Future<$6.GetCorrectOrderStationListByBusIdResponse> getCorrectOrderStationListByBusId_Pre($grpc.ServiceCall call, $async.Future<$6.GetCorrectOrderStationListByBusIdRequest> request) async { + return getCorrectOrderStationListByBusId(call, await request); + } + $async.Future<$6.GetUnregisteredStationListResponse> getUnregisteredStationList_Pre($grpc.ServiceCall call, $async.Future<$6.GetUnregisteredStationListRequest> request) async { return getUnregisteredStationList(call, await request); } @@ -114,6 +133,7 @@ abstract class StationServiceBase extends $grpc.Service { $async.Future<$6.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId($grpc.ServiceCall call, $6.UpdateStationLocationByGuardianIdRequest request); $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId($grpc.ServiceCall call, $6.GetStationListByBusIdRequest request); + $async.Future<$6.GetCorrectOrderStationListByBusIdResponse> getCorrectOrderStationListByBusId($grpc.ServiceCall call, $6.GetCorrectOrderStationListByBusIdRequest request); $async.Future<$6.GetUnregisteredStationListResponse> getUnregisteredStationList($grpc.ServiceCall call, $6.GetUnregisteredStationListRequest request); $async.Future<$6.UpdateStationResponse> updateStation($grpc.ServiceCall call, $6.UpdateStationRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart index 01ba95ba..0a6db727 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbjson.dart @@ -101,6 +101,34 @@ final $typed_data.Uint8List getUnregisteredStationListResponseDescriptor = $conv 'sud2hlcmVfY2hpbGRfYnVzLnYxLlN0YXRpb25SCHN0YXRpb25zEkIKCWd1YXJkaWFucxgCIAMo' 'CzIkLndoZXJlX2NoaWxkX2J1cy52MS5HdWFyZGlhblJlc3BvbnNlUglndWFyZGlhbnM='); +@$core.Deprecated('Use getCorrectOrderStationListByBusIdRequestDescriptor instead') +const GetCorrectOrderStationListByBusIdRequest$json = { + '1': 'GetCorrectOrderStationListByBusIdRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'bus_type', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, + ], +}; + +/// Descriptor for `GetCorrectOrderStationListByBusIdRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getCorrectOrderStationListByBusIdRequestDescriptor = $convert.base64Decode( + 'CihHZXRDb3JyZWN0T3JkZXJTdGF0aW9uTGlzdEJ5QnVzSWRSZXF1ZXN0EhUKBmJ1c19pZBgBIA' + 'EoCVIFYnVzSWQSNgoIYnVzX3R5cGUYAiABKA4yGy53aGVyZV9jaGlsZF9idXMudjEuQnVzVHlw' + 'ZVIHYnVzVHlwZQ=='); + +@$core.Deprecated('Use getCorrectOrderStationListByBusIdResponseDescriptor instead') +const GetCorrectOrderStationListByBusIdResponse$json = { + '1': 'GetCorrectOrderStationListByBusIdResponse', + '2': [ + {'1': 'bus_route', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.BusRoute', '10': 'busRoute'}, + ], +}; + +/// Descriptor for `GetCorrectOrderStationListByBusIdResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getCorrectOrderStationListByBusIdResponseDescriptor = $convert.base64Decode( + 'CilHZXRDb3JyZWN0T3JkZXJTdGF0aW9uTGlzdEJ5QnVzSWRSZXNwb25zZRI5CglidXNfcm91dG' + 'UYASABKAsyHC53aGVyZV9jaGlsZF9idXMudjEuQnVzUm91dGVSCGJ1c1JvdXRl'); + @$core.Deprecated('Use updateStationRequestDescriptor instead') const UpdateStationRequest$json = { '1': 'UpdateStationRequest', diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2.py b/machine_learning/src/generated/where_child_bus/v1/child_pb2.py index a5cb9fb7..febe4511 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2.py @@ -7,55 +7,47 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from where_child_bus.v1 import ( - resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, -) -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos"5\n\x18\x43heckIsChildInBusRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId"7\n\x19\x43heckIsChildInBusResponse\x12\x1a\n\tis_in_bus\x18\x01 \x01(\x08R\x07isInBus"\x9b\x03\n\x12UpdateChildRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x03 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x04 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x05 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x06 \x01(\x08R\x06hasBag\x12"\n\rhas_lunch_box\x18\x07 \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x08 \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\t \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\n \x01(\x08R\x08hasOther\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask"F\n\x13UpdateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild2\xc5\x05\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponse\x12p\n\x11\x43heckIsChildInBus\x12,.where_child_bus.v1.CheckIsChildInBusRequest\x1a-.where_child_bus.v1.CheckIsChildInBusResponse\x12^\n\x0bUpdateChild\x12&.where_child_bus.v1.UpdateChildRequest\x1a\'.where_child_bus.v1.UpdateChildResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' -) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewhere_child_bus/v1/child.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xbd\x01\n\x12\x43reateChildRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x04 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x05 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x16\n\x06photos\x18\x06 \x03(\x0cR\x06photos\"F\n\x13\x43reateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild\"?\n\x1eGetChildListByNurseryIDRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"\x90\x01\n\x1fGetChildListByNurseryIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"B\n\x1fGetChildListByGuardianIDRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"\x91\x01\n GetChildListByGuardianIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"3\n\x1aGetChildListByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8c\x01\n\x1bGetChildListByBusIDResponse\x12\x35\n\x08\x63hildren\x18\x01 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x02 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\"5\n\x18\x43heckIsChildInBusRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"7\n\x19\x43heckIsChildInBusResponse\x12\x1a\n\tis_in_bus\x18\x01 \x01(\x08R\x07isInBus\"\x9b\x03\n\x12UpdateChildRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x03 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x04 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x05 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x06 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\x07 \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\x08 \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\t \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\n \x01(\x08R\x08hasOther\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"F\n\x13UpdateChildResponse\x12/\n\x05\x63hild\x18\x01 \x01(\x0b\x32\x19.where_child_bus.v1.ChildR\x05\x63hild2\xc5\x05\n\x0c\x43hildService\x12^\n\x0b\x43reateChild\x12&.where_child_bus.v1.CreateChildRequest\x1a\'.where_child_bus.v1.CreateChildResponse\x12\x82\x01\n\x17GetChildListByNurseryID\x12\x32.where_child_bus.v1.GetChildListByNurseryIDRequest\x1a\x33.where_child_bus.v1.GetChildListByNurseryIDResponse\x12\x85\x01\n\x18GetChildListByGuardianID\x12\x33.where_child_bus.v1.GetChildListByGuardianIDRequest\x1a\x34.where_child_bus.v1.GetChildListByGuardianIDResponse\x12v\n\x13GetChildListByBusID\x12..where_child_bus.v1.GetChildListByBusIDRequest\x1a/.where_child_bus.v1.GetChildListByBusIDResponse\x12p\n\x11\x43heckIsChildInBus\x12,.where_child_bus.v1.CheckIsChildInBusRequest\x1a-.where_child_bus.v1.CheckIsChildInBusResponse\x12^\n\x0bUpdateChild\x12&.where_child_bus.v1.UpdateChildRequest\x1a\'.where_child_bus.v1.UpdateChildResponseB\xed\x01\n\x16\x63om.where_child_bus.v1B\nChildProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.child_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.child_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals[ - "DESCRIPTOR" - ]._serialized_options = b"\n\026com.where_child_bus.v1B\nChildProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - _globals["_CREATECHILDREQUEST"]._serialized_start = 125 - _globals["_CREATECHILDREQUEST"]._serialized_end = 314 - _globals["_CREATECHILDRESPONSE"]._serialized_start = 316 - _globals["_CREATECHILDRESPONSE"]._serialized_end = 386 - _globals["_GETCHILDLISTBYNURSERYIDREQUEST"]._serialized_start = 388 - _globals["_GETCHILDLISTBYNURSERYIDREQUEST"]._serialized_end = 451 - _globals["_GETCHILDLISTBYNURSERYIDRESPONSE"]._serialized_start = 454 - _globals["_GETCHILDLISTBYNURSERYIDRESPONSE"]._serialized_end = 598 - _globals["_GETCHILDLISTBYGUARDIANIDREQUEST"]._serialized_start = 600 - _globals["_GETCHILDLISTBYGUARDIANIDREQUEST"]._serialized_end = 666 - _globals["_GETCHILDLISTBYGUARDIANIDRESPONSE"]._serialized_start = 669 - _globals["_GETCHILDLISTBYGUARDIANIDRESPONSE"]._serialized_end = 814 - _globals["_GETCHILDLISTBYBUSIDREQUEST"]._serialized_start = 816 - _globals["_GETCHILDLISTBYBUSIDREQUEST"]._serialized_end = 867 - _globals["_GETCHILDLISTBYBUSIDRESPONSE"]._serialized_start = 870 - _globals["_GETCHILDLISTBYBUSIDRESPONSE"]._serialized_end = 1010 - _globals["_CHECKISCHILDINBUSREQUEST"]._serialized_start = 1012 - _globals["_CHECKISCHILDINBUSREQUEST"]._serialized_end = 1065 - _globals["_CHECKISCHILDINBUSRESPONSE"]._serialized_start = 1067 - _globals["_CHECKISCHILDINBUSRESPONSE"]._serialized_end = 1122 - _globals["_UPDATECHILDREQUEST"]._serialized_start = 1125 - _globals["_UPDATECHILDREQUEST"]._serialized_end = 1536 - _globals["_UPDATECHILDRESPONSE"]._serialized_start = 1538 - _globals["_UPDATECHILDRESPONSE"]._serialized_end = 1608 - _globals["_CHILDSERVICE"]._serialized_start = 1611 - _globals["_CHILDSERVICE"]._serialized_end = 2320 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\nChildProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_CREATECHILDREQUEST']._serialized_start=125 + _globals['_CREATECHILDREQUEST']._serialized_end=314 + _globals['_CREATECHILDRESPONSE']._serialized_start=316 + _globals['_CREATECHILDRESPONSE']._serialized_end=386 + _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_start=388 + _globals['_GETCHILDLISTBYNURSERYIDREQUEST']._serialized_end=451 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_start=454 + _globals['_GETCHILDLISTBYNURSERYIDRESPONSE']._serialized_end=598 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_start=600 + _globals['_GETCHILDLISTBYGUARDIANIDREQUEST']._serialized_end=666 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_start=669 + _globals['_GETCHILDLISTBYGUARDIANIDRESPONSE']._serialized_end=814 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_start=816 + _globals['_GETCHILDLISTBYBUSIDREQUEST']._serialized_end=867 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_start=870 + _globals['_GETCHILDLISTBYBUSIDRESPONSE']._serialized_end=1010 + _globals['_CHECKISCHILDINBUSREQUEST']._serialized_start=1012 + _globals['_CHECKISCHILDINBUSREQUEST']._serialized_end=1065 + _globals['_CHECKISCHILDINBUSRESPONSE']._serialized_start=1067 + _globals['_CHECKISCHILDINBUSRESPONSE']._serialized_end=1122 + _globals['_UPDATECHILDREQUEST']._serialized_start=1125 + _globals['_UPDATECHILDREQUEST']._serialized_end=1536 + _globals['_UPDATECHILDRESPONSE']._serialized_start=1538 + _globals['_UPDATECHILDRESPONSE']._serialized_end=1608 + _globals['_CHILDSERVICE']._serialized_start=1611 + _globals['_CHILDSERVICE']._serialized_end=2320 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi index df9075e1..affd722c 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2.pyi @@ -1,14 +1,9 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor +from where_child_bus.v1 import resources_pb2 as _resources_pb2 from google.protobuf import field_mask_pb2 as _field_mask_pb2 -from google.protobuf import message as _message from google.protobuf.internal import containers as _containers -from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -26,23 +21,13 @@ class CreateChildRequest(_message.Message): age: int sex: _resources_pb2.Sex photos: _containers.RepeatedScalarFieldContainer[bytes] - def __init__( - self, - nursery_id: _Optional[str] = ..., - guardian_id: _Optional[str] = ..., - name: _Optional[str] = ..., - age: _Optional[int] = ..., - sex: _Optional[_Union[_resources_pb2.Sex, str]] = ..., - photos: _Optional[_Iterable[bytes]] = ..., - ) -> None: ... + def __init__(self, nursery_id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[_resources_pb2.Sex, str]] = ..., photos: _Optional[_Iterable[bytes]] = ...) -> None: ... class CreateChildResponse(_message.Message): __slots__ = ("child",) CHILD_FIELD_NUMBER: _ClassVar[int] child: _resources_pb2.Child - def __init__( - self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ... - ) -> None: ... + def __init__(self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ...) -> None: ... class GetChildListByNurseryIDRequest(_message.Message): __slots__ = ("nursery_id",) @@ -56,11 +41,7 @@ class GetChildListByNurseryIDResponse(_message.Message): PHOTOS_FIELD_NUMBER: _ClassVar[int] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] - def __init__( - self, - children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., - photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ..., - ) -> None: ... + def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... class GetChildListByGuardianIDRequest(_message.Message): __slots__ = ("guardian_id",) @@ -74,11 +55,7 @@ class GetChildListByGuardianIDResponse(_message.Message): PHOTOS_FIELD_NUMBER: _ClassVar[int] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] - def __init__( - self, - children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., - photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ..., - ) -> None: ... + def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... class GetChildListByBusIDRequest(_message.Message): __slots__ = ("bus_id",) @@ -92,11 +69,7 @@ class GetChildListByBusIDResponse(_message.Message): PHOTOS_FIELD_NUMBER: _ClassVar[int] children: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Child] photos: _containers.RepeatedCompositeFieldContainer[_resources_pb2.ChildPhoto] - def __init__( - self, - children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., - photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ..., - ) -> None: ... + def __init__(self, children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ..., photos: _Optional[_Iterable[_Union[_resources_pb2.ChildPhoto, _Mapping]]] = ...) -> None: ... class CheckIsChildInBusRequest(_message.Message): __slots__ = ("child_id",) @@ -111,19 +84,7 @@ class CheckIsChildInBusResponse(_message.Message): def __init__(self, is_in_bus: bool = ...) -> None: ... class UpdateChildRequest(_message.Message): - __slots__ = ( - "child_id", - "name", - "age", - "sex", - "check_for_missing_items", - "has_bag", - "has_lunch_box", - "has_water_bottle", - "has_umbrella", - "has_other", - "update_mask", - ) + __slots__ = ("child_id", "name", "age", "sex", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "update_mask") CHILD_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] AGE_FIELD_NUMBER: _ClassVar[int] @@ -146,25 +107,10 @@ class UpdateChildRequest(_message.Message): has_umbrella: bool has_other: bool update_mask: _field_mask_pb2.FieldMask - def __init__( - self, - child_id: _Optional[str] = ..., - name: _Optional[str] = ..., - age: _Optional[int] = ..., - sex: _Optional[_Union[_resources_pb2.Sex, str]] = ..., - check_for_missing_items: bool = ..., - has_bag: bool = ..., - has_lunch_box: bool = ..., - has_water_bottle: bool = ..., - has_umbrella: bool = ..., - has_other: bool = ..., - update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ..., - ) -> None: ... + def __init__(self, child_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[_resources_pb2.Sex, str]] = ..., check_for_missing_items: bool = ..., has_bag: bool = ..., has_lunch_box: bool = ..., has_water_bottle: bool = ..., has_umbrella: bool = ..., has_other: bool = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateChildResponse(_message.Message): __slots__ = ("child",) CHILD_FIELD_NUMBER: _ClassVar[int] child: _resources_pb2.Child - def __init__( - self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ... - ) -> None: ... + def __init__(self, child: _Optional[_Union[_resources_pb2.Child, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py index 1fe37acb..d46ec0d9 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_pb2_grpc.py @@ -1,6 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc + from where_child_bus.v1 import child_pb2 as where__child__bus_dot_v1_dot_child__pb2 @@ -14,35 +15,35 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.CreateChild = channel.unary_unary( - "/where_child_bus.v1.ChildService/CreateChild", - request_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.FromString, - ) + '/where_child_bus.v1.ChildService/CreateChild', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.FromString, + ) self.GetChildListByNurseryID = channel.unary_unary( - "/where_child_bus.v1.ChildService/GetChildListByNurseryID", - request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, - ) + '/where_child_bus.v1.ChildService/GetChildListByNurseryID', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, + ) self.GetChildListByGuardianID = channel.unary_unary( - "/where_child_bus.v1.ChildService/GetChildListByGuardianID", - request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.FromString, - ) + '/where_child_bus.v1.ChildService/GetChildListByGuardianID', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.FromString, + ) self.GetChildListByBusID = channel.unary_unary( - "/where_child_bus.v1.ChildService/GetChildListByBusID", - request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.FromString, - ) + '/where_child_bus.v1.ChildService/GetChildListByBusID', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.FromString, + ) self.CheckIsChildInBus = channel.unary_unary( - "/where_child_bus.v1.ChildService/CheckIsChildInBus", - request_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.FromString, - ) + '/where_child_bus.v1.ChildService/CheckIsChildInBus', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.FromString, + ) self.UpdateChild = channel.unary_unary( - "/where_child_bus.v1.ChildService/UpdateChild", - request_serializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.FromString, - ) + '/where_child_bus.v1.ChildService/UpdateChild', + request_serializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.FromString, + ) class ChildServiceServicer(object): @@ -51,253 +52,180 @@ class ChildServiceServicer(object): def CreateChild(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetChildListByNurseryID(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetChildListByGuardianID(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetChildListByBusID(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def CheckIsChildInBus(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def UpdateChild(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_ChildServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "CreateChild": grpc.unary_unary_rpc_method_handler( - servicer.CreateChild, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.SerializeToString, - ), - "GetChildListByNurseryID": grpc.unary_unary_rpc_method_handler( - servicer.GetChildListByNurseryID, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.SerializeToString, - ), - "GetChildListByGuardianID": grpc.unary_unary_rpc_method_handler( - servicer.GetChildListByGuardianID, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.SerializeToString, - ), - "GetChildListByBusID": grpc.unary_unary_rpc_method_handler( - servicer.GetChildListByBusID, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.SerializeToString, - ), - "CheckIsChildInBus": grpc.unary_unary_rpc_method_handler( - servicer.CheckIsChildInBus, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.SerializeToString, - ), - "UpdateChild": grpc.unary_unary_rpc_method_handler( - servicer.UpdateChild, - request_deserializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.SerializeToString, - ), + 'CreateChild': grpc.unary_unary_rpc_method_handler( + servicer.CreateChild, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.SerializeToString, + ), + 'GetChildListByNurseryID': grpc.unary_unary_rpc_method_handler( + servicer.GetChildListByNurseryID, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.SerializeToString, + ), + 'GetChildListByGuardianID': grpc.unary_unary_rpc_method_handler( + servicer.GetChildListByGuardianID, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.SerializeToString, + ), + 'GetChildListByBusID': grpc.unary_unary_rpc_method_handler( + servicer.GetChildListByBusID, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.SerializeToString, + ), + 'CheckIsChildInBus': grpc.unary_unary_rpc_method_handler( + servicer.CheckIsChildInBus, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.SerializeToString, + ), + 'UpdateChild': grpc.unary_unary_rpc_method_handler( + servicer.UpdateChild, + request_deserializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "where_child_bus.v1.ChildService", rpc_method_handlers - ) + 'where_child_bus.v1.ChildService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class ChildService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def CreateChild( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def CreateChild(request, target, - "/where_child_bus.v1.ChildService/CreateChild", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/CreateChild', where__child__bus_dot_v1_dot_child__pb2.CreateChildRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.CreateChildResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetChildListByNurseryID( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetChildListByNurseryID(request, target, - "/where_child_bus.v1.ChildService/GetChildListByNurseryID", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByNurseryID', where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.GetChildListByNurseryIDResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetChildListByGuardianID( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetChildListByGuardianID(request, target, - "/where_child_bus.v1.ChildService/GetChildListByGuardianID", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByGuardianID', where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.GetChildListByGuardianIDResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetChildListByBusID( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetChildListByBusID(request, target, - "/where_child_bus.v1.ChildService/GetChildListByBusID", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/GetChildListByBusID', where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.GetChildListByBusIDResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def CheckIsChildInBus( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def CheckIsChildInBus(request, target, - "/where_child_bus.v1.ChildService/CheckIsChildInBus", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/CheckIsChildInBus', where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.CheckIsChildInBusResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def UpdateChild( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def UpdateChild(request, target, - "/where_child_bus.v1.ChildService/UpdateChild", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildService/UpdateChild', where__child__bus_dot_v1_dot_child__pb2.UpdateChildRequest.SerializeToString, where__child__bus_dot_v1_dot_child__pb2.UpdateChildResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.py b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.py index 5fdb5451..b1182eaa 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.py @@ -7,40 +7,35 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n$where_child_bus/v1/child_photo.proto\x12\x12where_child_bus.v1"6\n\x17\x44uplicationCheckRequest\x12\x1b\n\tchild_ids\x18\x01 \x03(\tR\x08\x63hildIds"\x89\x01\n\x18\x44uplicationCheckResponse\x12#\n\ris_duplicated\x18\x01 \x01(\x08R\x0cisDuplicated\x12\x1b\n\tphoto_ids\x18\x02 \x03(\tR\x08photoIds\x12+\n\x11\x64uplicated_photos\x18\x03 \x03(\x0cR\x10\x64uplicatedPhotos"+\n\x17\x44\x65leteChildPhotoRequest\x12\x10\n\x03ids\x18\x01 \x03(\tR\x03ids"T\n\x18\x44\x65leteChildPhotoResponse\x12&\n\x0fis_success_list\x18\x01 \x03(\x08R\risSuccessList\x12\x10\n\x03ids\x18\x02 \x03(\tR\x03ids"1\n\x14GetChildPhotoRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId"P\n\x12\x43hildPhotoResponse\x12$\n\x0e\x63hild_photo_id\x18\x01 \x01(\tR\x0c\x63hildPhotoId\x12\x14\n\x05photo\x18\x02 \x01(\x0cR\x05photo"b\n\x15GetChildPhotoResponse\x12I\n\x0c\x63hild_photos\x18\x01 \x03(\x0b\x32&.where_child_bus.v1.ChildPhotoResponseR\x0b\x63hildPhotos2\xd7\x02\n\x11\x43hildPhotoService\x12m\n\x10\x44uplicationCheck\x12+.where_child_bus.v1.DuplicationCheckRequest\x1a,.where_child_bus.v1.DuplicationCheckResponse\x12m\n\x10\x44\x65leteChildPhoto\x12+.where_child_bus.v1.DeleteChildPhotoRequest\x1a,.where_child_bus.v1.DeleteChildPhotoResponse\x12\x64\n\rGetChildPhoto\x12(.where_child_bus.v1.GetChildPhotoRequest\x1a).where_child_bus.v1.GetChildPhotoResponseB\xf2\x01\n\x16\x63om.where_child_bus.v1B\x0f\x43hildPhotoProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' -) + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$where_child_bus/v1/child_photo.proto\x12\x12where_child_bus.v1\"6\n\x17\x44uplicationCheckRequest\x12\x1b\n\tchild_ids\x18\x01 \x03(\tR\x08\x63hildIds\"\x89\x01\n\x18\x44uplicationCheckResponse\x12#\n\ris_duplicated\x18\x01 \x01(\x08R\x0cisDuplicated\x12\x1b\n\tphoto_ids\x18\x02 \x03(\tR\x08photoIds\x12+\n\x11\x64uplicated_photos\x18\x03 \x03(\x0cR\x10\x64uplicatedPhotos\"+\n\x17\x44\x65leteChildPhotoRequest\x12\x10\n\x03ids\x18\x01 \x03(\tR\x03ids\"T\n\x18\x44\x65leteChildPhotoResponse\x12&\n\x0fis_success_list\x18\x01 \x03(\x08R\risSuccessList\x12\x10\n\x03ids\x18\x02 \x03(\tR\x03ids\"1\n\x14GetChildPhotoRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"P\n\x12\x43hildPhotoResponse\x12$\n\x0e\x63hild_photo_id\x18\x01 \x01(\tR\x0c\x63hildPhotoId\x12\x14\n\x05photo\x18\x02 \x01(\x0cR\x05photo\"b\n\x15GetChildPhotoResponse\x12I\n\x0c\x63hild_photos\x18\x01 \x03(\x0b\x32&.where_child_bus.v1.ChildPhotoResponseR\x0b\x63hildPhotos2\xd7\x02\n\x11\x43hildPhotoService\x12m\n\x10\x44uplicationCheck\x12+.where_child_bus.v1.DuplicationCheckRequest\x1a,.where_child_bus.v1.DuplicationCheckResponse\x12m\n\x10\x44\x65leteChildPhoto\x12+.where_child_bus.v1.DeleteChildPhotoRequest\x1a,.where_child_bus.v1.DeleteChildPhotoResponse\x12\x64\n\rGetChildPhoto\x12(.where_child_bus.v1.GetChildPhotoRequest\x1a).where_child_bus.v1.GetChildPhotoResponseB\xf2\x01\n\x16\x63om.where_child_bus.v1B\x0f\x43hildPhotoProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.child_photo_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.child_photo_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals[ - "DESCRIPTOR" - ]._serialized_options = b"\n\026com.where_child_bus.v1B\017ChildPhotoProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - _globals["_DUPLICATIONCHECKREQUEST"]._serialized_start = 60 - _globals["_DUPLICATIONCHECKREQUEST"]._serialized_end = 114 - _globals["_DUPLICATIONCHECKRESPONSE"]._serialized_start = 117 - _globals["_DUPLICATIONCHECKRESPONSE"]._serialized_end = 254 - _globals["_DELETECHILDPHOTOREQUEST"]._serialized_start = 256 - _globals["_DELETECHILDPHOTOREQUEST"]._serialized_end = 299 - _globals["_DELETECHILDPHOTORESPONSE"]._serialized_start = 301 - _globals["_DELETECHILDPHOTORESPONSE"]._serialized_end = 385 - _globals["_GETCHILDPHOTOREQUEST"]._serialized_start = 387 - _globals["_GETCHILDPHOTOREQUEST"]._serialized_end = 436 - _globals["_CHILDPHOTORESPONSE"]._serialized_start = 438 - _globals["_CHILDPHOTORESPONSE"]._serialized_end = 518 - _globals["_GETCHILDPHOTORESPONSE"]._serialized_start = 520 - _globals["_GETCHILDPHOTORESPONSE"]._serialized_end = 618 - _globals["_CHILDPHOTOSERVICE"]._serialized_start = 621 - _globals["_CHILDPHOTOSERVICE"]._serialized_end = 964 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\017ChildPhotoProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_DUPLICATIONCHECKREQUEST']._serialized_start=60 + _globals['_DUPLICATIONCHECKREQUEST']._serialized_end=114 + _globals['_DUPLICATIONCHECKRESPONSE']._serialized_start=117 + _globals['_DUPLICATIONCHECKRESPONSE']._serialized_end=254 + _globals['_DELETECHILDPHOTOREQUEST']._serialized_start=256 + _globals['_DELETECHILDPHOTOREQUEST']._serialized_end=299 + _globals['_DELETECHILDPHOTORESPONSE']._serialized_start=301 + _globals['_DELETECHILDPHOTORESPONSE']._serialized_end=385 + _globals['_GETCHILDPHOTOREQUEST']._serialized_start=387 + _globals['_GETCHILDPHOTOREQUEST']._serialized_end=436 + _globals['_CHILDPHOTORESPONSE']._serialized_start=438 + _globals['_CHILDPHOTORESPONSE']._serialized_end=518 + _globals['_GETCHILDPHOTORESPONSE']._serialized_start=520 + _globals['_GETCHILDPHOTORESPONSE']._serialized_end=618 + _globals['_CHILDPHOTOSERVICE']._serialized_start=621 + _globals['_CHILDPHOTOSERVICE']._serialized_end=964 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.pyi index 65a8d964..231461af 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2.pyi @@ -1,12 +1,7 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - +from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -24,12 +19,7 @@ class DuplicationCheckResponse(_message.Message): is_duplicated: bool photo_ids: _containers.RepeatedScalarFieldContainer[str] duplicated_photos: _containers.RepeatedScalarFieldContainer[bytes] - def __init__( - self, - is_duplicated: bool = ..., - photo_ids: _Optional[_Iterable[str]] = ..., - duplicated_photos: _Optional[_Iterable[bytes]] = ..., - ) -> None: ... + def __init__(self, is_duplicated: bool = ..., photo_ids: _Optional[_Iterable[str]] = ..., duplicated_photos: _Optional[_Iterable[bytes]] = ...) -> None: ... class DeleteChildPhotoRequest(_message.Message): __slots__ = ("ids",) @@ -43,11 +33,7 @@ class DeleteChildPhotoResponse(_message.Message): IDS_FIELD_NUMBER: _ClassVar[int] is_success_list: _containers.RepeatedScalarFieldContainer[bool] ids: _containers.RepeatedScalarFieldContainer[str] - def __init__( - self, - is_success_list: _Optional[_Iterable[bool]] = ..., - ids: _Optional[_Iterable[str]] = ..., - ) -> None: ... + def __init__(self, is_success_list: _Optional[_Iterable[bool]] = ..., ids: _Optional[_Iterable[str]] = ...) -> None: ... class GetChildPhotoRequest(_message.Message): __slots__ = ("child_id",) @@ -61,15 +47,10 @@ class ChildPhotoResponse(_message.Message): PHOTO_FIELD_NUMBER: _ClassVar[int] child_photo_id: str photo: bytes - def __init__( - self, child_photo_id: _Optional[str] = ..., photo: _Optional[bytes] = ... - ) -> None: ... + def __init__(self, child_photo_id: _Optional[str] = ..., photo: _Optional[bytes] = ...) -> None: ... class GetChildPhotoResponse(_message.Message): __slots__ = ("child_photos",) CHILD_PHOTOS_FIELD_NUMBER: _ClassVar[int] child_photos: _containers.RepeatedCompositeFieldContainer[ChildPhotoResponse] - def __init__( - self, - child_photos: _Optional[_Iterable[_Union[ChildPhotoResponse, _Mapping]]] = ..., - ) -> None: ... + def __init__(self, child_photos: _Optional[_Iterable[_Union[ChildPhotoResponse, _Mapping]]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py index 1b67a22d..af91ae42 100644 --- a/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/child_photo_pb2_grpc.py @@ -1,9 +1,8 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -from where_child_bus.v1 import ( - child_photo_pb2 as where__child__bus_dot_v1_dot_child__photo__pb2, -) + +from where_child_bus.v1 import child_photo_pb2 as where__child__bus_dot_v1_dot_child__photo__pb2 class ChildPhotoServiceStub(object): @@ -16,20 +15,20 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.DuplicationCheck = channel.unary_unary( - "/where_child_bus.v1.ChildPhotoService/DuplicationCheck", - request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.FromString, - ) + '/where_child_bus.v1.ChildPhotoService/DuplicationCheck', + request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.FromString, + ) self.DeleteChildPhoto = channel.unary_unary( - "/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto", - request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.FromString, - ) + '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', + request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.FromString, + ) self.GetChildPhoto = channel.unary_unary( - "/where_child_bus.v1.ChildPhotoService/GetChildPhoto", - request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.FromString, - ) + '/where_child_bus.v1.ChildPhotoService/GetChildPhoto', + request_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.FromString, + ) class ChildPhotoServiceServicer(object): @@ -38,133 +37,96 @@ class ChildPhotoServiceServicer(object): def DuplicationCheck(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def DeleteChildPhoto(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetChildPhoto(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_ChildPhotoServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "DuplicationCheck": grpc.unary_unary_rpc_method_handler( - servicer.DuplicationCheck, - request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.SerializeToString, - ), - "DeleteChildPhoto": grpc.unary_unary_rpc_method_handler( - servicer.DeleteChildPhoto, - request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.SerializeToString, - ), - "GetChildPhoto": grpc.unary_unary_rpc_method_handler( - servicer.GetChildPhoto, - request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.SerializeToString, - ), + 'DuplicationCheck': grpc.unary_unary_rpc_method_handler( + servicer.DuplicationCheck, + request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.SerializeToString, + ), + 'DeleteChildPhoto': grpc.unary_unary_rpc_method_handler( + servicer.DeleteChildPhoto, + request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.SerializeToString, + ), + 'GetChildPhoto': grpc.unary_unary_rpc_method_handler( + servicer.GetChildPhoto, + request_deserializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "where_child_bus.v1.ChildPhotoService", rpc_method_handlers - ) + 'where_child_bus.v1.ChildPhotoService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class ChildPhotoService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def DuplicationCheck( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def DuplicationCheck(request, target, - "/where_child_bus.v1.ChildPhotoService/DuplicationCheck", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildPhotoService/DuplicationCheck', where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckRequest.SerializeToString, where__child__bus_dot_v1_dot_child__photo__pb2.DuplicationCheckResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def DeleteChildPhoto( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def DeleteChildPhoto(request, target, - "/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoRequest.SerializeToString, where__child__bus_dot_v1_dot_child__photo__pb2.DeleteChildPhotoResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetChildPhoto( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetChildPhoto(request, target, - "/where_child_bus.v1.ChildPhotoService/GetChildPhoto", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.ChildPhotoService/GetChildPhoto', where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoRequest.SerializeToString, where__child__bus_dot_v1_dot_child__photo__pb2.GetChildPhotoResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py index 80ae2207..ac939a62 100644 --- a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.py @@ -7,55 +7,47 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from where_child_bus.v1 import ( - resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, -) -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian"B\n!GetGuardianListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"h\n"GetGuardianListByNurseryIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians"\x9c\x02\n\x15UpdateGuardianRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x03 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x05 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x06 \x01(\x08R\x0fisUseEveningBus\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask"Z\n\x16UpdateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian2\xd3\x05\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponse\x12y\n\x14GetGuardianByChildId\x12/.where_child_bus.v1.GetGuardianByChildIdRequest\x1a\x30.where_child_bus.v1.GetGuardianByChildIdResponse\x12\x8b\x01\n\x1aGetGuardianListByNurseryId\x12\x35.where_child_bus.v1.GetGuardianListByNurseryIdRequest\x1a\x36.where_child_bus.v1.GetGuardianListByNurseryIdResponse\x12g\n\x0eUpdateGuardian\x12).where_child_bus.v1.UpdateGuardianRequest\x1a*.where_child_bus.v1.UpdateGuardianResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' -) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!where_child_bus/v1/guardian.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xa3\x01\n\x15\x43reateGuardianRequest\x12!\n\x0cnursery_code\x18\x01 \x01(\tR\x0bnurseryCode\x12\x14\n\x05\x65mail\x18\x02 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\"Z\n\x16\x43reateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"H\n\x14GuardianLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"\xb2\x01\n\x15GuardianLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12@\n\x08guardian\x18\x02 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\x12=\n\x07nursery\x18\x03 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"6\n\x1dGetGuardianListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"d\n\x1eGetGuardianListByBusIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"8\n\x1bGetGuardianByChildIdRequest\x12\x19\n\x08\x63hild_id\x18\x01 \x01(\tR\x07\x63hildId\"`\n\x1cGetGuardianByChildIdResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian\"B\n!GetGuardianListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"h\n\"GetGuardianListByNurseryIdResponse\x12\x42\n\tguardians\x18\x01 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"\x9c\x02\n\x15UpdateGuardianRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x03 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x05 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x06 \x01(\x08R\x0fisUseEveningBus\x12;\n\x0bupdate_mask\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"Z\n\x16UpdateGuardianResponse\x12@\n\x08guardian\x18\x01 \x01(\x0b\x32$.where_child_bus.v1.GuardianResponseR\x08guardian2\xd3\x05\n\x0fGuardianService\x12g\n\x0e\x43reateGuardian\x12).where_child_bus.v1.CreateGuardianRequest\x1a*.where_child_bus.v1.CreateGuardianResponse\x12\x64\n\rGuardianLogin\x12(.where_child_bus.v1.GuardianLoginRequest\x1a).where_child_bus.v1.GuardianLoginResponse\x12\x7f\n\x16GetGuardianListByBusId\x12\x31.where_child_bus.v1.GetGuardianListByBusIdRequest\x1a\x32.where_child_bus.v1.GetGuardianListByBusIdResponse\x12y\n\x14GetGuardianByChildId\x12/.where_child_bus.v1.GetGuardianByChildIdRequest\x1a\x30.where_child_bus.v1.GetGuardianByChildIdResponse\x12\x8b\x01\n\x1aGetGuardianListByNurseryId\x12\x35.where_child_bus.v1.GetGuardianListByNurseryIdRequest\x1a\x36.where_child_bus.v1.GetGuardianListByNurseryIdResponse\x12g\n\x0eUpdateGuardian\x12).where_child_bus.v1.UpdateGuardianRequest\x1a*.where_child_bus.v1.UpdateGuardianResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rGuardianProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.guardian_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.guardian_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals[ - "DESCRIPTOR" - ]._serialized_options = b"\n\026com.where_child_bus.v1B\rGuardianProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - _globals["_CREATEGUARDIANREQUEST"]._serialized_start = 128 - _globals["_CREATEGUARDIANREQUEST"]._serialized_end = 291 - _globals["_CREATEGUARDIANRESPONSE"]._serialized_start = 293 - _globals["_CREATEGUARDIANRESPONSE"]._serialized_end = 383 - _globals["_GUARDIANLOGINREQUEST"]._serialized_start = 385 - _globals["_GUARDIANLOGINREQUEST"]._serialized_end = 457 - _globals["_GUARDIANLOGINRESPONSE"]._serialized_start = 460 - _globals["_GUARDIANLOGINRESPONSE"]._serialized_end = 638 - _globals["_GETGUARDIANLISTBYBUSIDREQUEST"]._serialized_start = 640 - _globals["_GETGUARDIANLISTBYBUSIDREQUEST"]._serialized_end = 694 - _globals["_GETGUARDIANLISTBYBUSIDRESPONSE"]._serialized_start = 696 - _globals["_GETGUARDIANLISTBYBUSIDRESPONSE"]._serialized_end = 796 - _globals["_GETGUARDIANBYCHILDIDREQUEST"]._serialized_start = 798 - _globals["_GETGUARDIANBYCHILDIDREQUEST"]._serialized_end = 854 - _globals["_GETGUARDIANBYCHILDIDRESPONSE"]._serialized_start = 856 - _globals["_GETGUARDIANBYCHILDIDRESPONSE"]._serialized_end = 952 - _globals["_GETGUARDIANLISTBYNURSERYIDREQUEST"]._serialized_start = 954 - _globals["_GETGUARDIANLISTBYNURSERYIDREQUEST"]._serialized_end = 1020 - _globals["_GETGUARDIANLISTBYNURSERYIDRESPONSE"]._serialized_start = 1022 - _globals["_GETGUARDIANLISTBYNURSERYIDRESPONSE"]._serialized_end = 1126 - _globals["_UPDATEGUARDIANREQUEST"]._serialized_start = 1129 - _globals["_UPDATEGUARDIANREQUEST"]._serialized_end = 1413 - _globals["_UPDATEGUARDIANRESPONSE"]._serialized_start = 1415 - _globals["_UPDATEGUARDIANRESPONSE"]._serialized_end = 1505 - _globals["_GUARDIANSERVICE"]._serialized_start = 1508 - _globals["_GUARDIANSERVICE"]._serialized_end = 2231 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\rGuardianProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_CREATEGUARDIANREQUEST']._serialized_start=128 + _globals['_CREATEGUARDIANREQUEST']._serialized_end=291 + _globals['_CREATEGUARDIANRESPONSE']._serialized_start=293 + _globals['_CREATEGUARDIANRESPONSE']._serialized_end=383 + _globals['_GUARDIANLOGINREQUEST']._serialized_start=385 + _globals['_GUARDIANLOGINREQUEST']._serialized_end=457 + _globals['_GUARDIANLOGINRESPONSE']._serialized_start=460 + _globals['_GUARDIANLOGINRESPONSE']._serialized_end=638 + _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_start=640 + _globals['_GETGUARDIANLISTBYBUSIDREQUEST']._serialized_end=694 + _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_start=696 + _globals['_GETGUARDIANLISTBYBUSIDRESPONSE']._serialized_end=796 + _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_start=798 + _globals['_GETGUARDIANBYCHILDIDREQUEST']._serialized_end=854 + _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_start=856 + _globals['_GETGUARDIANBYCHILDIDRESPONSE']._serialized_end=952 + _globals['_GETGUARDIANLISTBYNURSERYIDREQUEST']._serialized_start=954 + _globals['_GETGUARDIANLISTBYNURSERYIDREQUEST']._serialized_end=1020 + _globals['_GETGUARDIANLISTBYNURSERYIDRESPONSE']._serialized_start=1022 + _globals['_GETGUARDIANLISTBYNURSERYIDRESPONSE']._serialized_end=1126 + _globals['_UPDATEGUARDIANREQUEST']._serialized_start=1129 + _globals['_UPDATEGUARDIANREQUEST']._serialized_end=1413 + _globals['_UPDATEGUARDIANRESPONSE']._serialized_start=1415 + _globals['_UPDATEGUARDIANRESPONSE']._serialized_end=1505 + _globals['_GUARDIANSERVICE']._serialized_start=1508 + _globals['_GUARDIANSERVICE']._serialized_end=2231 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi index 00b098b8..5d451be4 100644 --- a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2.pyi @@ -1,14 +1,9 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor +from where_child_bus.v1 import resources_pb2 as _resources_pb2 from google.protobuf import field_mask_pb2 as _field_mask_pb2 -from google.protobuf import message as _message from google.protobuf.internal import containers as _containers -from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -24,23 +19,13 @@ class CreateGuardianRequest(_message.Message): password: str name: str phone_number: str - def __init__( - self, - nursery_code: _Optional[str] = ..., - email: _Optional[str] = ..., - password: _Optional[str] = ..., - name: _Optional[str] = ..., - phone_number: _Optional[str] = ..., - ) -> None: ... + def __init__(self, nursery_code: _Optional[str] = ..., email: _Optional[str] = ..., password: _Optional[str] = ..., name: _Optional[str] = ..., phone_number: _Optional[str] = ...) -> None: ... class CreateGuardianResponse(_message.Message): __slots__ = ("guardian",) GUARDIAN_FIELD_NUMBER: _ClassVar[int] guardian: _resources_pb2.GuardianResponse - def __init__( - self, - guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., - ) -> None: ... + def __init__(self, guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ...) -> None: ... class GuardianLoginRequest(_message.Message): __slots__ = ("email", "password") @@ -48,9 +33,7 @@ class GuardianLoginRequest(_message.Message): PASSWORD_FIELD_NUMBER: _ClassVar[int] email: str password: str - def __init__( - self, email: _Optional[str] = ..., password: _Optional[str] = ... - ) -> None: ... + def __init__(self, email: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... class GuardianLoginResponse(_message.Message): __slots__ = ("success", "guardian", "nursery") @@ -60,12 +43,7 @@ class GuardianLoginResponse(_message.Message): success: bool guardian: _resources_pb2.GuardianResponse nursery: _resources_pb2.NurseryResponse - def __init__( - self, - success: bool = ..., - guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., - nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ..., - ) -> None: ... + def __init__(self, success: bool = ..., guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... class GetGuardianListByBusIdRequest(_message.Message): __slots__ = ("bus_id",) @@ -76,15 +54,8 @@ class GetGuardianListByBusIdRequest(_message.Message): class GetGuardianListByBusIdResponse(_message.Message): __slots__ = ("guardians",) GUARDIANS_FIELD_NUMBER: _ClassVar[int] - guardians: _containers.RepeatedCompositeFieldContainer[ - _resources_pb2.GuardianResponse - ] - def __init__( - self, - guardians: _Optional[ - _Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]] - ] = ..., - ) -> None: ... + guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] + def __init__(self, guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... class GetGuardianByChildIdRequest(_message.Message): __slots__ = ("child_id",) @@ -96,10 +67,7 @@ class GetGuardianByChildIdResponse(_message.Message): __slots__ = ("guardian",) GUARDIAN_FIELD_NUMBER: _ClassVar[int] guardian: _resources_pb2.GuardianResponse - def __init__( - self, - guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., - ) -> None: ... + def __init__(self, guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ...) -> None: ... class GetGuardianListByNurseryIdRequest(_message.Message): __slots__ = ("nursery_id",) @@ -110,26 +78,11 @@ class GetGuardianListByNurseryIdRequest(_message.Message): class GetGuardianListByNurseryIdResponse(_message.Message): __slots__ = ("guardians",) GUARDIANS_FIELD_NUMBER: _ClassVar[int] - guardians: _containers.RepeatedCompositeFieldContainer[ - _resources_pb2.GuardianResponse - ] - def __init__( - self, - guardians: _Optional[ - _Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]] - ] = ..., - ) -> None: ... + guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] + def __init__(self, guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... class UpdateGuardianRequest(_message.Message): - __slots__ = ( - "guardian_id", - "name", - "email", - "phone_number", - "is_use_morning_bus", - "is_use_evening_bus", - "update_mask", - ) + __slots__ = ("guardian_id", "name", "email", "phone_number", "is_use_morning_bus", "is_use_evening_bus", "update_mask") GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] EMAIL_FIELD_NUMBER: _ClassVar[int] @@ -144,22 +97,10 @@ class UpdateGuardianRequest(_message.Message): is_use_morning_bus: bool is_use_evening_bus: bool update_mask: _field_mask_pb2.FieldMask - def __init__( - self, - guardian_id: _Optional[str] = ..., - name: _Optional[str] = ..., - email: _Optional[str] = ..., - phone_number: _Optional[str] = ..., - is_use_morning_bus: bool = ..., - is_use_evening_bus: bool = ..., - update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ..., - ) -> None: ... + def __init__(self, guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateGuardianResponse(_message.Message): __slots__ = ("guardian",) GUARDIAN_FIELD_NUMBER: _ClassVar[int] guardian: _resources_pb2.GuardianResponse - def __init__( - self, - guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ..., - ) -> None: ... + def __init__(self, guardian: _Optional[_Union[_resources_pb2.GuardianResponse, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py index c2b5722a..0de6966e 100644 --- a/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/guardian_pb2_grpc.py @@ -1,9 +1,8 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -from where_child_bus.v1 import ( - guardian_pb2 as where__child__bus_dot_v1_dot_guardian__pb2, -) + +from where_child_bus.v1 import guardian_pb2 as where__child__bus_dot_v1_dot_guardian__pb2 class GuardianServiceStub(object): @@ -16,35 +15,35 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.CreateGuardian = channel.unary_unary( - "/where_child_bus.v1.GuardianService/CreateGuardian", - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.FromString, - ) + '/where_child_bus.v1.GuardianService/CreateGuardian', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.FromString, + ) self.GuardianLogin = channel.unary_unary( - "/where_child_bus.v1.GuardianService/GuardianLogin", - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.FromString, - ) + '/where_child_bus.v1.GuardianService/GuardianLogin', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.FromString, + ) self.GetGuardianListByBusId = channel.unary_unary( - "/where_child_bus.v1.GuardianService/GetGuardianListByBusId", - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.FromString, - ) + '/where_child_bus.v1.GuardianService/GetGuardianListByBusId', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.FromString, + ) self.GetGuardianByChildId = channel.unary_unary( - "/where_child_bus.v1.GuardianService/GetGuardianByChildId", - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.FromString, - ) + '/where_child_bus.v1.GuardianService/GetGuardianByChildId', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.FromString, + ) self.GetGuardianListByNurseryId = channel.unary_unary( - "/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId", - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.FromString, - ) + '/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.FromString, + ) self.UpdateGuardian = channel.unary_unary( - "/where_child_bus.v1.GuardianService/UpdateGuardian", - request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.FromString, - ) + '/where_child_bus.v1.GuardianService/UpdateGuardian', + request_serializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.FromString, + ) class GuardianServiceServicer(object): @@ -53,253 +52,180 @@ class GuardianServiceServicer(object): def CreateGuardian(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GuardianLogin(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetGuardianListByBusId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetGuardianByChildId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetGuardianListByNurseryId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def UpdateGuardian(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_GuardianServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "CreateGuardian": grpc.unary_unary_rpc_method_handler( - servicer.CreateGuardian, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.SerializeToString, - ), - "GuardianLogin": grpc.unary_unary_rpc_method_handler( - servicer.GuardianLogin, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.SerializeToString, - ), - "GetGuardianListByBusId": grpc.unary_unary_rpc_method_handler( - servicer.GetGuardianListByBusId, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.SerializeToString, - ), - "GetGuardianByChildId": grpc.unary_unary_rpc_method_handler( - servicer.GetGuardianByChildId, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.SerializeToString, - ), - "GetGuardianListByNurseryId": grpc.unary_unary_rpc_method_handler( - servicer.GetGuardianListByNurseryId, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.SerializeToString, - ), - "UpdateGuardian": grpc.unary_unary_rpc_method_handler( - servicer.UpdateGuardian, - request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.SerializeToString, - ), + 'CreateGuardian': grpc.unary_unary_rpc_method_handler( + servicer.CreateGuardian, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.SerializeToString, + ), + 'GuardianLogin': grpc.unary_unary_rpc_method_handler( + servicer.GuardianLogin, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.SerializeToString, + ), + 'GetGuardianListByBusId': grpc.unary_unary_rpc_method_handler( + servicer.GetGuardianListByBusId, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.SerializeToString, + ), + 'GetGuardianByChildId': grpc.unary_unary_rpc_method_handler( + servicer.GetGuardianByChildId, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.SerializeToString, + ), + 'GetGuardianListByNurseryId': grpc.unary_unary_rpc_method_handler( + servicer.GetGuardianListByNurseryId, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.SerializeToString, + ), + 'UpdateGuardian': grpc.unary_unary_rpc_method_handler( + servicer.UpdateGuardian, + request_deserializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "where_child_bus.v1.GuardianService", rpc_method_handlers - ) + 'where_child_bus.v1.GuardianService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class GuardianService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def CreateGuardian( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def CreateGuardian(request, target, - "/where_child_bus.v1.GuardianService/CreateGuardian", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/CreateGuardian', where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.CreateGuardianResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GuardianLogin( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GuardianLogin(request, target, - "/where_child_bus.v1.GuardianService/GuardianLogin", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GuardianLogin', where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.GuardianLoginResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetGuardianListByBusId( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetGuardianListByBusId(request, target, - "/where_child_bus.v1.GuardianService/GetGuardianListByBusId", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GetGuardianListByBusId', where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByBusIdResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetGuardianByChildId( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetGuardianByChildId(request, target, - "/where_child_bus.v1.GuardianService/GetGuardianByChildId", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GetGuardianByChildId', where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianByChildIdResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetGuardianListByNurseryId( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetGuardianListByNurseryId(request, target, - "/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId', where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.GetGuardianListByNurseryIdResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def UpdateGuardian( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def UpdateGuardian(request, target, - "/where_child_bus.v1.GuardianService/UpdateGuardian", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.GuardianService/UpdateGuardian', where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianRequest.SerializeToString, where__child__bus_dot_v1_dot_guardian__pb2.UpdateGuardianResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.py b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.py index 73842cef..81c56abf 100644 --- a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.py @@ -7,30 +7,25 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n%where_child_bus/v1/health_check.proto\x12\x12where_child_bus.v1"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2_\n\x12HealthcheckService\x12I\n\x04Ping\x12\x1f.where_child_bus.v1.PingRequest\x1a .where_child_bus.v1.PingResponseB\xf3\x01\n\x16\x63om.where_child_bus.v1B\x10HealthCheckProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' -) + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%where_child_bus/v1/health_check.proto\x12\x12where_child_bus.v1\"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2_\n\x12HealthcheckService\x12I\n\x04Ping\x12\x1f.where_child_bus.v1.PingRequest\x1a .where_child_bus.v1.PingResponseB\xf3\x01\n\x16\x63om.where_child_bus.v1B\x10HealthCheckProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.health_check_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.health_check_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals[ - "DESCRIPTOR" - ]._serialized_options = b"\n\026com.where_child_bus.v1B\020HealthCheckProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - _globals["_PINGREQUEST"]._serialized_start = 61 - _globals["_PINGREQUEST"]._serialized_end = 94 - _globals["_PINGRESPONSE"]._serialized_start = 96 - _globals["_PINGRESPONSE"]._serialized_end = 136 - _globals["_HEALTHCHECKSERVICE"]._serialized_start = 138 - _globals["_HEALTHCHECKSERVICE"]._serialized_end = 233 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\020HealthCheckProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_PINGREQUEST']._serialized_start=61 + _globals['_PINGREQUEST']._serialized_end=94 + _globals['_PINGRESPONSE']._serialized_start=96 + _globals['_PINGRESPONSE']._serialized_end=136 + _globals['_HEALTHCHECKSERVICE']._serialized_start=138 + _globals['_HEALTHCHECKSERVICE']._serialized_end=233 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.pyi index 49aebc89..fb2e805c 100644 --- a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2.pyi @@ -1,8 +1,6 @@ -from typing import ClassVar as _ClassVar -from typing import Optional as _Optional - from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional DESCRIPTOR: _descriptor.FileDescriptor diff --git a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py index 165b520d..f0f6381c 100644 --- a/machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/health_check_pb2_grpc.py @@ -1,9 +1,8 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -from where_child_bus.v1 import ( - health_check_pb2 as where__child__bus_dot_v1_dot_health__check__pb2, -) + +from where_child_bus.v1 import health_check_pb2 as where__child__bus_dot_v1_dot_health__check__pb2 class HealthcheckServiceStub(object): @@ -16,10 +15,10 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.Ping = channel.unary_unary( - "/where_child_bus.v1.HealthcheckService/Ping", - request_serializer=where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.FromString, - ) + '/where_child_bus.v1.HealthcheckService/Ping', + request_serializer=where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.FromString, + ) class HealthcheckServiceServicer(object): @@ -28,53 +27,40 @@ class HealthcheckServiceServicer(object): def Ping(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_HealthcheckServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "Ping": grpc.unary_unary_rpc_method_handler( - servicer.Ping, - request_deserializer=where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.SerializeToString, - ), + 'Ping': grpc.unary_unary_rpc_method_handler( + servicer.Ping, + request_deserializer=where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "where_child_bus.v1.HealthcheckService", rpc_method_handlers - ) + 'where_child_bus.v1.HealthcheckService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class HealthcheckService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def Ping( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def Ping(request, target, - "/where_child_bus.v1.HealthcheckService/Ping", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.HealthcheckService/Ping', where__child__bus_dot_v1_dot_health__check__pb2.PingRequest.SerializeToString, where__child__bus_dot_v1_dot_health__check__pb2.PingResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py index d02bd4b3..144b73b5 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.py @@ -7,47 +7,39 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from where_child_bus.v1 import ( - resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, -) -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"@\n\x1dGetNurseryByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId"c\n\x1eGetNurseryByGuardianIdResponse\x12\x41\n\tnurseries\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\tnurseries"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery"\xe6\x01\n\x14UpdateNurseryRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x05 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x06 \x01(\tR\x08password\x12;\n\x0bupdate_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask"V\n\x15UpdateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xc0\x03\n\x0eNurseryService\x12\x7f\n\x16GetNurseryByGuardianId\x12\x31.where_child_bus.v1.GetNurseryByGuardianIdRequest\x1a\x32.where_child_bus.v1.GetNurseryByGuardianIdResponse\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponse\x12\x64\n\rUpdateNursery\x12(.where_child_bus.v1.UpdateNurseryRequest\x1a).where_child_bus.v1.UpdateNurseryResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' -) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/nursery.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"@\n\x1dGetNurseryByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"c\n\x1eGetNurseryByGuardianIdResponse\x12\x41\n\tnurseries\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\tnurseries\"\x99\x01\n\x14\x43reateNurseryRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"V\n\x15\x43reateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"G\n\x13NurseryLoginRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\"o\n\x14NurseryLoginResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12=\n\x07nursery\x18\x02 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery\"\xe6\x01\n\x14UpdateNurseryRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x04 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x05 \x01(\tR\x05\x65mail\x12\x1a\n\x08password\x18\x06 \x01(\tR\x08password\x12;\n\x0bupdate_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"V\n\x15UpdateNurseryResponse\x12=\n\x07nursery\x18\x01 \x01(\x0b\x32#.where_child_bus.v1.NurseryResponseR\x07nursery2\xc0\x03\n\x0eNurseryService\x12\x7f\n\x16GetNurseryByGuardianId\x12\x31.where_child_bus.v1.GetNurseryByGuardianIdRequest\x1a\x32.where_child_bus.v1.GetNurseryByGuardianIdResponse\x12\x64\n\rCreateNursery\x12(.where_child_bus.v1.CreateNurseryRequest\x1a).where_child_bus.v1.CreateNurseryResponse\x12\x61\n\x0cNurseryLogin\x12\'.where_child_bus.v1.NurseryLoginRequest\x1a(.where_child_bus.v1.NurseryLoginResponse\x12\x64\n\rUpdateNursery\x12(.where_child_bus.v1.UpdateNurseryRequest\x1a).where_child_bus.v1.UpdateNurseryResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cNurseryProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.nursery_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.nursery_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals[ - "DESCRIPTOR" - ]._serialized_options = b"\n\026com.where_child_bus.v1B\014NurseryProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - _globals["_GETNURSERYBYGUARDIANIDREQUEST"]._serialized_start = 126 - _globals["_GETNURSERYBYGUARDIANIDREQUEST"]._serialized_end = 190 - _globals["_GETNURSERYBYGUARDIANIDRESPONSE"]._serialized_start = 192 - _globals["_GETNURSERYBYGUARDIANIDRESPONSE"]._serialized_end = 291 - _globals["_CREATENURSERYREQUEST"]._serialized_start = 294 - _globals["_CREATENURSERYREQUEST"]._serialized_end = 447 - _globals["_CREATENURSERYRESPONSE"]._serialized_start = 449 - _globals["_CREATENURSERYRESPONSE"]._serialized_end = 535 - _globals["_NURSERYLOGINREQUEST"]._serialized_start = 537 - _globals["_NURSERYLOGINREQUEST"]._serialized_end = 608 - _globals["_NURSERYLOGINRESPONSE"]._serialized_start = 610 - _globals["_NURSERYLOGINRESPONSE"]._serialized_end = 721 - _globals["_UPDATENURSERYREQUEST"]._serialized_start = 724 - _globals["_UPDATENURSERYREQUEST"]._serialized_end = 954 - _globals["_UPDATENURSERYRESPONSE"]._serialized_start = 956 - _globals["_UPDATENURSERYRESPONSE"]._serialized_end = 1042 - _globals["_NURSERYSERVICE"]._serialized_start = 1045 - _globals["_NURSERYSERVICE"]._serialized_end = 1493 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\014NurseryProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_GETNURSERYBYGUARDIANIDREQUEST']._serialized_start=126 + _globals['_GETNURSERYBYGUARDIANIDREQUEST']._serialized_end=190 + _globals['_GETNURSERYBYGUARDIANIDRESPONSE']._serialized_start=192 + _globals['_GETNURSERYBYGUARDIANIDRESPONSE']._serialized_end=291 + _globals['_CREATENURSERYREQUEST']._serialized_start=294 + _globals['_CREATENURSERYREQUEST']._serialized_end=447 + _globals['_CREATENURSERYRESPONSE']._serialized_start=449 + _globals['_CREATENURSERYRESPONSE']._serialized_end=535 + _globals['_NURSERYLOGINREQUEST']._serialized_start=537 + _globals['_NURSERYLOGINREQUEST']._serialized_end=608 + _globals['_NURSERYLOGINRESPONSE']._serialized_start=610 + _globals['_NURSERYLOGINRESPONSE']._serialized_end=721 + _globals['_UPDATENURSERYREQUEST']._serialized_start=724 + _globals['_UPDATENURSERYREQUEST']._serialized_end=954 + _globals['_UPDATENURSERYRESPONSE']._serialized_start=956 + _globals['_UPDATENURSERYRESPONSE']._serialized_end=1042 + _globals['_NURSERYSERVICE']._serialized_start=1045 + _globals['_NURSERYSERVICE']._serialized_end=1493 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi index 4a955823..808c9f67 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2.pyi @@ -1,12 +1,8 @@ -from typing import ClassVar as _ClassVar -from typing import Mapping as _Mapping -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor +from where_child_bus.v1 import resources_pb2 as _resources_pb2 from google.protobuf import field_mask_pb2 as _field_mask_pb2 +from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -20,10 +16,7 @@ class GetNurseryByGuardianIdResponse(_message.Message): __slots__ = ("nurseries",) NURSERIES_FIELD_NUMBER: _ClassVar[int] nurseries: _resources_pb2.NurseryResponse - def __init__( - self, - nurseries: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ..., - ) -> None: ... + def __init__(self, nurseries: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... class CreateNurseryRequest(_message.Message): __slots__ = ("email", "password", "name", "phone_number", "address") @@ -37,22 +30,13 @@ class CreateNurseryRequest(_message.Message): name: str phone_number: str address: str - def __init__( - self, - email: _Optional[str] = ..., - password: _Optional[str] = ..., - name: _Optional[str] = ..., - phone_number: _Optional[str] = ..., - address: _Optional[str] = ..., - ) -> None: ... + def __init__(self, email: _Optional[str] = ..., password: _Optional[str] = ..., name: _Optional[str] = ..., phone_number: _Optional[str] = ..., address: _Optional[str] = ...) -> None: ... class CreateNurseryResponse(_message.Message): __slots__ = ("nursery",) NURSERY_FIELD_NUMBER: _ClassVar[int] nursery: _resources_pb2.NurseryResponse - def __init__( - self, nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ... - ) -> None: ... + def __init__(self, nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... class NurseryLoginRequest(_message.Message): __slots__ = ("email", "password") @@ -60,9 +44,7 @@ class NurseryLoginRequest(_message.Message): PASSWORD_FIELD_NUMBER: _ClassVar[int] email: str password: str - def __init__( - self, email: _Optional[str] = ..., password: _Optional[str] = ... - ) -> None: ... + def __init__(self, email: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... class NurseryLoginResponse(_message.Message): __slots__ = ("success", "nursery") @@ -70,22 +52,10 @@ class NurseryLoginResponse(_message.Message): NURSERY_FIELD_NUMBER: _ClassVar[int] success: bool nursery: _resources_pb2.NurseryResponse - def __init__( - self, - success: bool = ..., - nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ..., - ) -> None: ... + def __init__(self, success: bool = ..., nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... class UpdateNurseryRequest(_message.Message): - __slots__ = ( - "id", - "name", - "address", - "phone_number", - "email", - "password", - "update_mask", - ) + __slots__ = ("id", "name", "address", "phone_number", "email", "password", "update_mask") ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] ADDRESS_FIELD_NUMBER: _ClassVar[int] @@ -100,21 +70,10 @@ class UpdateNurseryRequest(_message.Message): email: str password: str update_mask: _field_mask_pb2.FieldMask - def __init__( - self, - id: _Optional[str] = ..., - name: _Optional[str] = ..., - address: _Optional[str] = ..., - phone_number: _Optional[str] = ..., - email: _Optional[str] = ..., - password: _Optional[str] = ..., - update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ..., - ) -> None: ... + def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., phone_number: _Optional[str] = ..., email: _Optional[str] = ..., password: _Optional[str] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateNurseryResponse(_message.Message): __slots__ = ("nursery",) NURSERY_FIELD_NUMBER: _ClassVar[int] nursery: _resources_pb2.NurseryResponse - def __init__( - self, nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ... - ) -> None: ... + def __init__(self, nursery: _Optional[_Union[_resources_pb2.NurseryResponse, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py index 0b9ce945..642aff51 100644 --- a/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/nursery_pb2_grpc.py @@ -1,6 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc + from where_child_bus.v1 import nursery_pb2 as where__child__bus_dot_v1_dot_nursery__pb2 @@ -14,25 +15,25 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.GetNurseryByGuardianId = channel.unary_unary( - "/where_child_bus.v1.NurseryService/GetNurseryByGuardianId", - request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.FromString, - ) + '/where_child_bus.v1.NurseryService/GetNurseryByGuardianId', + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.FromString, + ) self.CreateNursery = channel.unary_unary( - "/where_child_bus.v1.NurseryService/CreateNursery", - request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.FromString, - ) + '/where_child_bus.v1.NurseryService/CreateNursery', + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.FromString, + ) self.NurseryLogin = channel.unary_unary( - "/where_child_bus.v1.NurseryService/NurseryLogin", - request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.FromString, - ) + '/where_child_bus.v1.NurseryService/NurseryLogin', + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.FromString, + ) self.UpdateNursery = channel.unary_unary( - "/where_child_bus.v1.NurseryService/UpdateNursery", - request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.FromString, - ) + '/where_child_bus.v1.NurseryService/UpdateNursery', + request_serializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.FromString, + ) class NurseryServiceServicer(object): @@ -41,173 +42,124 @@ class NurseryServiceServicer(object): def GetNurseryByGuardianId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def CreateNursery(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def NurseryLogin(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def UpdateNursery(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_NurseryServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "GetNurseryByGuardianId": grpc.unary_unary_rpc_method_handler( - servicer.GetNurseryByGuardianId, - request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.SerializeToString, - ), - "CreateNursery": grpc.unary_unary_rpc_method_handler( - servicer.CreateNursery, - request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.SerializeToString, - ), - "NurseryLogin": grpc.unary_unary_rpc_method_handler( - servicer.NurseryLogin, - request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.SerializeToString, - ), - "UpdateNursery": grpc.unary_unary_rpc_method_handler( - servicer.UpdateNursery, - request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.SerializeToString, - ), + 'GetNurseryByGuardianId': grpc.unary_unary_rpc_method_handler( + servicer.GetNurseryByGuardianId, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.SerializeToString, + ), + 'CreateNursery': grpc.unary_unary_rpc_method_handler( + servicer.CreateNursery, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.SerializeToString, + ), + 'NurseryLogin': grpc.unary_unary_rpc_method_handler( + servicer.NurseryLogin, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.SerializeToString, + ), + 'UpdateNursery': grpc.unary_unary_rpc_method_handler( + servicer.UpdateNursery, + request_deserializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "where_child_bus.v1.NurseryService", rpc_method_handlers - ) + 'where_child_bus.v1.NurseryService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class NurseryService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def GetNurseryByGuardianId( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def GetNurseryByGuardianId(request, target, - "/where_child_bus.v1.NurseryService/GetNurseryByGuardianId", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/GetNurseryByGuardianId', where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdRequest.SerializeToString, where__child__bus_dot_v1_dot_nursery__pb2.GetNurseryByGuardianIdResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def CreateNursery( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def CreateNursery(request, target, - "/where_child_bus.v1.NurseryService/CreateNursery", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/CreateNursery', where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryRequest.SerializeToString, where__child__bus_dot_v1_dot_nursery__pb2.CreateNurseryResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def NurseryLogin( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def NurseryLogin(request, target, - "/where_child_bus.v1.NurseryService/NurseryLogin", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/NurseryLogin', where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginRequest.SerializeToString, where__child__bus_dot_v1_dot_nursery__pb2.NurseryLoginResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def UpdateNursery( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, + def UpdateNursery(request, target, - "/where_child_bus.v1.NurseryService/UpdateNursery", + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.NurseryService/UpdateNursery', where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryRequest.SerializeToString, where__child__bus_dot_v1_dot_nursery__pb2.UpdateNurseryResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py index 9a0764fb..491a3f6a 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xab\x04\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12\x37\n\x18morning_first_station_id\x18\t \x01(\tR\x15morningFirstStationId\x12\x37\n\x18\x65vening_first_station_id\x18\n \x01(\tR\x15\x65veningFirstStationId\x12&\n\x0fnext_station_id\x18\x0b \x01(\tR\rnextStationId\x12\x39\n\ncreated_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xd8\x02\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x35\n\x17morning_next_station_id\x18\x03 \x01(\tR\x14morningNextStationId\x12\x35\n\x17\x65vening_next_station_id\x18\x04 \x01(\tR\x14\x65veningNextStationId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8f\x01\n\x13\x43hildBusAssociation\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x19\n\x08\x63hild_id\x18\x03 \x01(\tR\x07\x63hildId\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"M\n\x15\x42usStationAssociation\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nstation_id\x18\x02 \x01(\tR\tstationId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb9\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12&\n\x0fnext_station_id\x18\x0b \x01(\tR\rnextStationId\x12\x39\n\ncreated_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xea\x01\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"R\n\x13\x43hildBusAssociation\x12 \n\x0c\x62us_route_id\x18\x01 \x01(\tR\nbusRouteId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"\x99\x01\n\x08\x42usRoute\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12.\n\x13ordered_station_ids\x18\x03 \x03(\tR\x11orderedStationIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_BUSSTATUS']._serialized_start=3471 - _globals['_BUSSTATUS']._serialized_end=3586 - _globals['_VEHICLEEVENT']._serialized_start=3588 - _globals['_VEHICLEEVENT']._serialized_end=3686 - _globals['_SEX']._serialized_start=3688 - _globals['_SEX']._serialized_end=3757 - _globals['_BUSTYPE']._serialized_start=3759 - _globals['_BUSTYPE']._serialized_end=3838 + _globals['_BUSSTATUS']._serialized_start=3262 + _globals['_BUSSTATUS']._serialized_end=3377 + _globals['_VEHICLEEVENT']._serialized_start=3379 + _globals['_VEHICLEEVENT']._serialized_end=3477 + _globals['_SEX']._serialized_start=3479 + _globals['_SEX']._serialized_end=3548 + _globals['_BUSTYPE']._serialized_start=3550 + _globals['_BUSTYPE']._serialized_end=3629 _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=414 _globals['_NURSERYRESPONSE']._serialized_start=417 @@ -40,17 +40,17 @@ _globals['_GUARDIANRESPONSE']._serialized_start=1095 _globals['_GUARDIANRESPONSE']._serialized_end=1445 _globals['_BUS']._serialized_start=1448 - _globals['_BUS']._serialized_end=2003 - _globals['_CHILD']._serialized_start=2006 - _globals['_CHILD']._serialized_end=2514 - _globals['_STATION']._serialized_start=2517 - _globals['_STATION']._serialized_end=2861 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2864 - _globals['_CHILDBUSASSOCIATION']._serialized_end=3007 - _globals['_BUSSTATIONASSOCIATION']._serialized_start=3009 - _globals['_BUSSTATIONASSOCIATION']._serialized_end=3086 - _globals['_CHILDPHOTO']._serialized_start=3089 - _globals['_CHILDPHOTO']._serialized_end=3293 - _globals['_BOARDINGRECORD']._serialized_start=3296 - _globals['_BOARDINGRECORD']._serialized_end=3469 + _globals['_BUS']._serialized_end=1889 + _globals['_CHILD']._serialized_start=1892 + _globals['_CHILD']._serialized_end=2400 + _globals['_STATION']._serialized_start=2403 + _globals['_STATION']._serialized_end=2637 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2639 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2721 + _globals['_CHILDPHOTO']._serialized_start=2724 + _globals['_CHILDPHOTO']._serialized_end=2928 + _globals['_BOARDINGRECORD']._serialized_start=2931 + _globals['_BOARDINGRECORD']._serialized_end=3104 + _globals['_BUSROUTE']._serialized_start=3107 + _globals['_BUSROUTE']._serialized_end=3260 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi index b11b2b10..cdcce127 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi @@ -1,8 +1,9 @@ from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -135,7 +136,7 @@ class GuardianResponse(_message.Message): def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Bus(_message.Message): - __slots__ = ("id", "nursery_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "morning_first_station_id", "evening_first_station_id", "next_station_id", "created_at", "updated_at") + __slots__ = ("id", "nursery_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "next_station_id", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -144,8 +145,6 @@ class Bus(_message.Message): LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] ENABLE_FACE_RECOGNITION_FIELD_NUMBER: _ClassVar[int] - MORNING_FIRST_STATION_ID_FIELD_NUMBER: _ClassVar[int] - EVENING_FIRST_STATION_ID_FIELD_NUMBER: _ClassVar[int] NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] @@ -157,12 +156,10 @@ class Bus(_message.Message): latitude: float longitude: float enable_face_recognition: bool - morning_first_station_id: str - evening_first_station_id: str next_station_id: str created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., morning_first_station_id: _Optional[str] = ..., evening_first_station_id: _Optional[str] = ..., next_station_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., next_station_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Child(_message.Message): __slots__ = ("id", "nursery_id", "guardian_id", "name", "age", "sex", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "created_at", "updated_at") @@ -197,44 +194,28 @@ class Child(_message.Message): def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., name: _Optional[str] = ..., age: _Optional[int] = ..., sex: _Optional[_Union[Sex, str]] = ..., check_for_missing_items: bool = ..., has_bag: bool = ..., has_lunch_box: bool = ..., has_water_bottle: bool = ..., has_umbrella: bool = ..., has_other: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Station(_message.Message): - __slots__ = ("id", "guardian_id", "morning_next_station_id", "evening_next_station_id", "latitude", "longitude", "created_at", "updated_at") + __slots__ = ("id", "guardian_id", "latitude", "longitude", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] GUARDIAN_ID_FIELD_NUMBER: _ClassVar[int] - MORNING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] - EVENING_NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str guardian_id: str - morning_next_station_id: str - evening_next_station_id: str latitude: float longitude: float created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., morning_next_station_id: _Optional[str] = ..., evening_next_station_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., guardian_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class ChildBusAssociation(_message.Message): - __slots__ = ("id", "bus_id", "child_id", "bus_type") - ID_FIELD_NUMBER: _ClassVar[int] - BUS_ID_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("bus_route_id", "child_id") + BUS_ROUTE_ID_FIELD_NUMBER: _ClassVar[int] CHILD_ID_FIELD_NUMBER: _ClassVar[int] - BUS_TYPE_FIELD_NUMBER: _ClassVar[int] - id: str - bus_id: str + bus_route_id: str child_id: str - bus_type: BusType - def __init__(self, id: _Optional[str] = ..., bus_id: _Optional[str] = ..., child_id: _Optional[str] = ..., bus_type: _Optional[_Union[BusType, str]] = ...) -> None: ... - -class BusStationAssociation(_message.Message): - __slots__ = ("bus_id", "station_id") - BUS_ID_FIELD_NUMBER: _ClassVar[int] - STATION_ID_FIELD_NUMBER: _ClassVar[int] - bus_id: str - station_id: str - def __init__(self, bus_id: _Optional[str] = ..., station_id: _Optional[str] = ...) -> None: ... + def __init__(self, bus_route_id: _Optional[str] = ..., child_id: _Optional[str] = ...) -> None: ... class ChildPhoto(_message.Message): __slots__ = ("id", "child_id", "photo_data", "created_at", "updated_at") @@ -263,3 +244,15 @@ class BoardingRecord(_message.Message): is_boarding: bool timestamp: _timestamp_pb2.Timestamp def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., bus_id: _Optional[str] = ..., is_boarding: bool = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class BusRoute(_message.Message): + __slots__ = ("id", "bus_id", "ordered_station_ids", "bus_type") + ID_FIELD_NUMBER: _ClassVar[int] + BUS_ID_FIELD_NUMBER: _ClassVar[int] + ORDERED_STATION_IDS_FIELD_NUMBER: _ClassVar[int] + BUS_TYPE_FIELD_NUMBER: _ClassVar[int] + id: str + bus_id: str + ordered_station_ids: _containers.RepeatedScalarFieldContainer[str] + bus_type: BusType + def __init__(self, id: _Optional[str] = ..., bus_id: _Optional[str] = ..., ordered_station_ids: _Optional[_Iterable[str]] = ..., bus_type: _Optional[_Union[BusType, str]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py index d858f1a2..ffc7ebc8 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py @@ -16,8 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\":\n!GetUnregisteredStationListRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa1\x01\n\"GetUnregisteredStationListResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"\xb4\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\xa5\x04\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x8b\x01\n\x1aGetUnregisteredStationList\x12\x35.where_child_bus.v1.GetUnregisteredStationListRequest\x1a\x36.where_child_bus.v1.GetUnregisteredStationListResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') - +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\":\n!GetUnregisteredStationListRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa1\x01\n\"GetUnregisteredStationListResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"y\n(GetCorrectOrderStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"f\n)GetCorrectOrderStationListByBusIdResponse\x12\x39\n\tbus_route\x18\x01 \x01(\x0b\x32\x1c.where_child_bus.v1.BusRouteR\x08\x62usRoute\"\xb4\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\xc8\x05\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\xa0\x01\n!GetCorrectOrderStationListByBusId\x12<.where_child_bus.v1.GetCorrectOrderStationListByBusIdRequest\x1a=.where_child_bus.v1.GetCorrectOrderStationListByBusIdResponse\x12\x8b\x01\n\x1aGetUnregisteredStationList\x12\x35.where_child_bus.v1.GetUnregisteredStationListRequest\x1a\x36.where_child_bus.v1.GetUnregisteredStationListResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -37,10 +36,14 @@ _globals['_GETUNREGISTEREDSTATIONLISTREQUEST']._serialized_end=745 _globals['_GETUNREGISTEREDSTATIONLISTRESPONSE']._serialized_start=748 _globals['_GETUNREGISTEREDSTATIONLISTRESPONSE']._serialized_end=909 - _globals['_UPDATESTATIONREQUEST']._serialized_start=912 - _globals['_UPDATESTATIONREQUEST']._serialized_end=1092 - _globals['_UPDATESTATIONRESPONSE']._serialized_start=1094 - _globals['_UPDATESTATIONRESPONSE']._serialized_end=1172 - _globals['_STATIONSERVICE']._serialized_start=1175 - _globals['_STATIONSERVICE']._serialized_end=1724 + _globals['_GETCORRECTORDERSTATIONLISTBYBUSIDREQUEST']._serialized_start=911 + _globals['_GETCORRECTORDERSTATIONLISTBYBUSIDREQUEST']._serialized_end=1032 + _globals['_GETCORRECTORDERSTATIONLISTBYBUSIDRESPONSE']._serialized_start=1034 + _globals['_GETCORRECTORDERSTATIONLISTBYBUSIDRESPONSE']._serialized_end=1136 + _globals['_UPDATESTATIONREQUEST']._serialized_start=1139 + _globals['_UPDATESTATIONREQUEST']._serialized_end=1319 + _globals['_UPDATESTATIONRESPONSE']._serialized_start=1321 + _globals['_UPDATESTATIONRESPONSE']._serialized_end=1399 + _globals['_STATIONSERVICE']._serialized_start=1402 + _globals['_STATIONSERVICE']._serialized_end=2114 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi index a534b6cb..73edef11 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.pyi @@ -55,19 +55,19 @@ class GetUnregisteredStationListResponse(_message.Message): guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... -class GetUnregisteredStationListRequest(_message.Message): - __slots__ = ("bus_id",) +class GetCorrectOrderStationListByBusIdRequest(_message.Message): + __slots__ = ("bus_id", "bus_type") BUS_ID_FIELD_NUMBER: _ClassVar[int] + BUS_TYPE_FIELD_NUMBER: _ClassVar[int] bus_id: str - def __init__(self, bus_id: _Optional[str] = ...) -> None: ... + bus_type: _resources_pb2.BusType + def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ...) -> None: ... -class GetUnregisteredStationListResponse(_message.Message): - __slots__ = ("stations", "guardians") - STATIONS_FIELD_NUMBER: _ClassVar[int] - GUARDIANS_FIELD_NUMBER: _ClassVar[int] - stations: _containers.RepeatedCompositeFieldContainer[_resources_pb2.Station] - guardians: _containers.RepeatedCompositeFieldContainer[_resources_pb2.GuardianResponse] - def __init__(self, stations: _Optional[_Iterable[_Union[_resources_pb2.Station, _Mapping]]] = ..., guardians: _Optional[_Iterable[_Union[_resources_pb2.GuardianResponse, _Mapping]]] = ...) -> None: ... +class GetCorrectOrderStationListByBusIdResponse(_message.Message): + __slots__ = ("bus_route",) + BUS_ROUTE_FIELD_NUMBER: _ClassVar[int] + bus_route: _resources_pb2.BusRoute + def __init__(self, bus_route: _Optional[_Union[_resources_pb2.BusRoute, _Mapping]] = ...) -> None: ... class UpdateStationRequest(_message.Message): __slots__ = ("id", "bus_id", "latitude", "longitude", "update_mask") diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py index e695245c..dea23215 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py @@ -24,6 +24,11 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.FromString, ) + self.GetCorrectOrderStationListByBusId = channel.unary_unary( + '/where_child_bus.v1.StationService/GetCorrectOrderStationListByBusId', + request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdResponse.FromString, + ) self.GetUnregisteredStationList = channel.unary_unary( '/where_child_bus.v1.StationService/GetUnregisteredStationList', request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.SerializeToString, @@ -51,7 +56,7 @@ def GetStationListByBusId(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def GetUnregisteredStationList(self, request, context): + def GetCorrectOrderStationListByBusId(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -82,6 +87,11 @@ def add_StationServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.SerializeToString, ), + 'GetCorrectOrderStationListByBusId': grpc.unary_unary_rpc_method_handler( + servicer.GetCorrectOrderStationListByBusId, + request_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdResponse.SerializeToString, + ), 'GetUnregisteredStationList': grpc.unary_unary_rpc_method_handler( servicer.GetUnregisteredStationList, request_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.FromString, @@ -137,7 +147,7 @@ def GetStationListByBusId(request, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetUnregisteredStationList(request, + def GetCorrectOrderStationListByBusId(request, target, options=(), channel_credentials=None, @@ -147,9 +157,9 @@ def GetUnregisteredStationList(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/GetUnregisteredStationList', - where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.SerializeToString, - where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/GetCorrectOrderStationListByBusId', + where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdRequest.SerializeToString, + where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/where_child_bus/v1/resources.proto b/proto/where_child_bus/v1/resources.proto index 215034f3..8c1c14d8 100644 --- a/proto/where_child_bus/v1/resources.proto +++ b/proto/where_child_bus/v1/resources.proto @@ -77,8 +77,6 @@ message Bus { double latitude = 6; double longitude = 7; bool enable_face_recognition = 8; - string morning_first_station_id = 9; - string evening_first_station_id = 10; string next_station_id = 11; google.protobuf.Timestamp created_at = 12; google.protobuf.Timestamp updated_at = 13; @@ -111,8 +109,6 @@ message Child { message Station { string id = 1; string guardian_id = 2; - string morning_next_station_id = 3; - string evening_next_station_id = 4; double latitude = 5; double longitude = 6; google.protobuf.Timestamp created_at = 7; @@ -126,15 +122,8 @@ enum BusType { } message ChildBusAssociation { - string id = 1; - string bus_id = 2; - string child_id = 3; - BusType bus_type = 4; -} - -message BusStationAssociation { - string bus_id = 1; - string station_id = 2; + string bus_route_id = 1; + string child_id = 2; } message ChildPhoto { @@ -152,3 +141,10 @@ message BoardingRecord { bool is_boarding = 4; google.protobuf.Timestamp timestamp = 5; } + +message BusRoute { + string id = 1; + string bus_id = 2; + repeated string ordered_station_ids = 3; + BusType bus_type = 4; +} diff --git a/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto index 6f664187..8f477715 100644 --- a/proto/where_child_bus/v1/station.proto +++ b/proto/where_child_bus/v1/station.proto @@ -8,6 +8,7 @@ import "google/protobuf/field_mask.proto"; service StationService { rpc UpdateStationLocationByGuardianId(UpdateStationLocationByGuardianIdRequest) returns (UpdateStationLocationByGuardianIdResponse); rpc GetStationListByBusId(GetStationListByBusIdRequest) returns (GetStationListByBusIdResponse); + rpc GetCorrectOrderStationListByBusId(GetCorrectOrderStationListByBusIdRequest) returns (GetCorrectOrderStationListByBusIdResponse); rpc GetUnregisteredStationList(GetUnregisteredStationListRequest) returns (GetUnregisteredStationListResponse); rpc UpdateStation(UpdateStationRequest) returns (UpdateStationResponse); } @@ -42,6 +43,15 @@ message GetUnregisteredStationListResponse { repeated GuardianResponse guardians = 2; } +message GetCorrectOrderStationListByBusIdRequest { + string bus_id = 1; + BusType bus_type = 2; +} + +message GetCorrectOrderStationListByBusIdResponse { + BusRoute bus_route = 1; +} + message UpdateStationRequest { string id = 1; string bus_id = 2; From 0401e0219bdecbdd7fe6c841f69817c080898896 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 22 Feb 2024 12:30:55 +0900 Subject: [PATCH 636/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E3=83=AB?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E3=82=B5?= =?UTF-8?q?=E3=83=BC=E3=83=93=E3=82=B9=E3=81=AA=E3=81=A9proto=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 419 ++++++++---------- .../go/where_child_bus/v1/bus_route.pb.go | 412 +++++++++++++++++ .../where_child_bus/v1/bus_route_grpc.pb.go | 144 ++++++ .../go/where_child_bus/v1/station.pb.go | 94 ++-- .../go/where_child_bus/v1/station_grpc.pb.go | 37 -- .../proto-gen/where_child_bus/v1/bus.pb.dart | 184 +++----- .../where_child_bus/v1/bus.pbjson.dart | 28 +- .../where_child_bus/v1/bus_route.pb.dart | 261 +++++++++++ .../where_child_bus/v1/bus_route.pbenum.dart | 11 + .../where_child_bus/v1/bus_route.pbgrpc.dart | 79 ++++ .../where_child_bus/v1/bus_route.pbjson.dart | 71 +++ .../where_child_bus/v1/child.pb.dart | 88 ++-- .../where_child_bus/v1/child.pbgrpc.dart | 110 ++--- .../v1/child_photo.pbgrpc.dart | 56 +-- .../where_child_bus/v1/guardian.pb.dart | 76 ++-- .../where_child_bus/v1/guardian.pbgrpc.dart | 110 ++--- .../v1/health_check.pbgrpc.dart | 20 +- .../where_child_bus/v1/nursery.pb.dart | 54 +-- .../where_child_bus/v1/nursery.pbgrpc.dart | 74 ++-- .../where_child_bus/v1/resources.pb.dart | 172 +++---- .../where_child_bus/v1/station.pb.dart | 90 ++-- .../where_child_bus/v1/station.pbgrpc.dart | 94 ++-- .../generated/where_child_bus/v1/bus_pb2.py | 70 +-- .../generated/where_child_bus/v1/bus_pb2.pyi | 22 +- .../where_child_bus/v1/bus_route_pb2.py | 36 ++ .../where_child_bus/v1/bus_route_pb2.pyi | 37 ++ .../where_child_bus/v1/bus_route_pb2_grpc.py | 99 +++++ .../where_child_bus/v1/station_pb2.py | 4 +- .../where_child_bus/v1/station_pb2_grpc.py | 33 -- proto/where_child_bus/v1/bus.proto | 5 - proto/where_child_bus/v1/bus_route.proto | 29 ++ proto/where_child_bus/v1/station.proto | 1 - 32 files changed, 1979 insertions(+), 1041 deletions(-) create mode 100644 backend/proto-gen/go/where_child_bus/v1/bus_route.pb.go create mode 100644 backend/proto-gen/go/where_child_bus/v1/bus_route_grpc.pb.go create mode 100644 frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pb.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbenum.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart create mode 100644 frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbjson.dart create mode 100644 machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.py create mode 100644 machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.pyi create mode 100644 machine_learning/src/generated/where_child_bus/v1/bus_route_pb2_grpc.py create mode 100644 proto/where_child_bus/v1/bus_route.proto diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index e44bef4e..ef5008fa 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -26,11 +26,9 @@ type CreateBusRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - PlateNumber string `protobuf:"bytes,3,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` - MorningGuardianIds []string `protobuf:"bytes,4,rep,name=morning_guardian_ids,json=morningGuardianIds,proto3" json:"morning_guardian_ids,omitempty"` - EveningGuardianIds []string `protobuf:"bytes,5,rep,name=evening_guardian_ids,json=eveningGuardianIds,proto3" json:"evening_guardian_ids,omitempty"` + NurseryId string `protobuf:"bytes,1,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + PlateNumber string `protobuf:"bytes,3,opt,name=plate_number,json=plateNumber,proto3" json:"plate_number,omitempty"` } func (x *CreateBusRequest) Reset() { @@ -86,20 +84,6 @@ func (x *CreateBusRequest) GetPlateNumber() string { return "" } -func (x *CreateBusRequest) GetMorningGuardianIds() []string { - if x != nil { - return x.MorningGuardianIds - } - return nil -} - -func (x *CreateBusRequest) GetEveningGuardianIds() []string { - if x != nil { - return x.EveningGuardianIds - } - return nil -} - type CreateBusResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -671,7 +655,6 @@ type StreamBusVideoRequest struct { unknownFields protoimpl.UnknownFields BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` BusType BusType `protobuf:"varint,3,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` VehicleEvent VehicleEvent `protobuf:"varint,4,opt,name=vehicle_event,json=vehicleEvent,proto3,enum=where_child_bus.v1.VehicleEvent" json:"vehicle_event,omitempty"` VideoChunk [][]byte `protobuf:"bytes,5,rep,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data @@ -718,13 +701,6 @@ func (x *StreamBusVideoRequest) GetBusId() string { return "" } -func (x *StreamBusVideoRequest) GetNurseryId() string { - if x != nil { - return x.NurseryId - } - return "" -} - func (x *StreamBusVideoRequest) GetBusType() BusType { if x != nil { return x.BusType @@ -826,8 +802,6 @@ type UpdateBusRequest struct { Latitude float64 `protobuf:"fixed64,4,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,5,opt,name=longitude,proto3" json:"longitude,omitempty"` EnableFaceRecognition bool `protobuf:"varint,6,opt,name=enable_face_recognition,json=enableFaceRecognition,proto3" json:"enable_face_recognition,omitempty"` - MorningFirstStationId string `protobuf:"bytes,7,opt,name=morning_first_station_id,json=morningFirstStationId,proto3" json:"morning_first_station_id,omitempty"` - EveningFirstStationId string `protobuf:"bytes,8,opt,name=evening_first_station_id,json=eveningFirstStationId,proto3" json:"evening_first_station_id,omitempty"` NextStationId string `protobuf:"bytes,9,opt,name=next_station_id,json=nextStationId,proto3" json:"next_station_id,omitempty"` UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,10,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } @@ -906,20 +880,6 @@ func (x *UpdateBusRequest) GetEnableFaceRecognition() bool { return false } -func (x *UpdateBusRequest) GetMorningFirstStationId() string { - if x != nil { - return x.MorningFirstStationId - } - return "" -} - -func (x *UpdateBusRequest) GetEveningFirstStationId() string { - if x != nil { - return x.EveningFirstStationId - } - return "" -} - func (x *UpdateBusRequest) GetNextStationId() string { if x != nil { return x.NextStationId @@ -991,209 +951,194 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, - 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x12, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, - 0x5f, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x3e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, - 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, - 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, - 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x21, 0x47, - 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x16, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, - 0x0a, 0x62, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x09, 0x62, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x62, - 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x22, 0x44, 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, - 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0x70, 0x0a, 0x1d, 0x53, 0x65, 0x6e, - 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, - 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, - 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x53, - 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, - 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, - 0x19, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, - 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, - 0x64, 0x22, 0x95, 0x01, 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, - 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, - 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xb1, 0x02, 0x0a, 0x15, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, - 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, - 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, - 0x6f, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, - 0x69, 0x64, 0x65, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, - 0x74, 0x6f, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0b, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x57, 0x69, 0x64, 0x74, 0x68, 0x22, 0x70, 0x0a, - 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, - 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, - 0xa9, 0x03, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x68, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, + 0x65, 0x72, 0x22, 0x3e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, + 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, 0x62, 0x75, 0x73, 0x65, + 0x73, 0x22, 0x43, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, + 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, + 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x75, 0x73, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x62, 0x75, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x44, + 0x0a, 0x17, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, + 0x03, 0x62, 0x75, 0x73, 0x22, 0x70, 0x0a, 0x1d, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, + 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x63, + 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x22, 0x95, 0x01, 0x0a, + 0x1a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, + 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, - 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x46, - 0x69, 0x72, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x37, 0x0a, - 0x18, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x15, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, - 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0x9b, 0x07, 0x0a, 0x0a, - 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x92, 0x02, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, + 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, + 0x0d, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, + 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x68, 0x6f, + 0x74, 0x6f, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x74, + 0x6f, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, + 0x68, 0x6f, 0x74, 0x6f, 0x57, 0x69, 0x64, 0x74, 0x68, 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xb7, 0x02, 0x0a, 0x10, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, + 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, + 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, + 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0x9b, 0x07, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, + 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, - 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, - 0x12, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, + 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, + 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, + 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x34, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, - 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, - 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, - 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, - 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, - 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, - 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, + 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, - 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, - 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, - 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, - 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, - 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, + 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, + 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, + 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, + 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_route.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_route.pb.go new file mode 100644 index 00000000..f0fe7658 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/bus_route.pb.go @@ -0,0 +1,412 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: where_child_bus/v1/bus_route.proto + +package where_child_busv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateBusRouteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` + GuardianIds []string `protobuf:"bytes,3,rep,name=guardian_ids,json=guardianIds,proto3" json:"guardian_ids,omitempty"` +} + +func (x *CreateBusRouteRequest) Reset() { + *x = CreateBusRouteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateBusRouteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBusRouteRequest) ProtoMessage() {} + +func (x *CreateBusRouteRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBusRouteRequest.ProtoReflect.Descriptor instead. +func (*CreateBusRouteRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_route_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateBusRouteRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *CreateBusRouteRequest) GetBusType() BusType { + if x != nil { + return x.BusType + } + return BusType_BUS_TYPE_UNSPECIFIED +} + +func (x *CreateBusRouteRequest) GetGuardianIds() []string { + if x != nil { + return x.GuardianIds + } + return nil +} + +type CreateBusRouteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusRoute *BusRoute `protobuf:"bytes,1,opt,name=bus_route,json=busRoute,proto3" json:"bus_route,omitempty"` +} + +func (x *CreateBusRouteResponse) Reset() { + *x = CreateBusRouteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateBusRouteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBusRouteResponse) ProtoMessage() {} + +func (x *CreateBusRouteResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBusRouteResponse.ProtoReflect.Descriptor instead. +func (*CreateBusRouteResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_route_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateBusRouteResponse) GetBusRoute() *BusRoute { + if x != nil { + return x.BusRoute + } + return nil +} + +type GetBusRouteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` +} + +func (x *GetBusRouteRequest) Reset() { + *x = GetBusRouteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBusRouteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBusRouteRequest) ProtoMessage() {} + +func (x *GetBusRouteRequest) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBusRouteRequest.ProtoReflect.Descriptor instead. +func (*GetBusRouteRequest) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_route_proto_rawDescGZIP(), []int{2} +} + +func (x *GetBusRouteRequest) GetBusId() string { + if x != nil { + return x.BusId + } + return "" +} + +func (x *GetBusRouteRequest) GetBusType() BusType { + if x != nil { + return x.BusType + } + return BusType_BUS_TYPE_UNSPECIFIED +} + +type GetBusRouteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BusRoute *BusRoute `protobuf:"bytes,1,opt,name=bus_route,json=busRoute,proto3" json:"bus_route,omitempty"` +} + +func (x *GetBusRouteResponse) Reset() { + *x = GetBusRouteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBusRouteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBusRouteResponse) ProtoMessage() {} + +func (x *GetBusRouteResponse) ProtoReflect() protoreflect.Message { + mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBusRouteResponse.ProtoReflect.Descriptor instead. +func (*GetBusRouteResponse) Descriptor() ([]byte, []int) { + return file_where_child_bus_v1_bus_route_proto_rawDescGZIP(), []int{3} +} + +func (x *GetBusRouteResponse) GetBusRoute() *BusRoute { + if x != nil { + return x.BusRoute + } + return nil +} + +var File_where_child_bus_v1_bus_route_proto protoreflect.FileDescriptor + +var file_where_child_bus_v1_bus_route_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, + 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x36, 0x0a, + 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x53, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x62, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x52, 0x08, 0x62, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x63, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, + 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x22, 0x50, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x62, 0x75, 0x73, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x08, 0x62, 0x75, 0x73, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x32, 0xda, 0x01, 0x0a, 0x0f, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x42, 0x75, + 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, + 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, + 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_where_child_bus_v1_bus_route_proto_rawDescOnce sync.Once + file_where_child_bus_v1_bus_route_proto_rawDescData = file_where_child_bus_v1_bus_route_proto_rawDesc +) + +func file_where_child_bus_v1_bus_route_proto_rawDescGZIP() []byte { + file_where_child_bus_v1_bus_route_proto_rawDescOnce.Do(func() { + file_where_child_bus_v1_bus_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_where_child_bus_v1_bus_route_proto_rawDescData) + }) + return file_where_child_bus_v1_bus_route_proto_rawDescData +} + +var file_where_child_bus_v1_bus_route_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_where_child_bus_v1_bus_route_proto_goTypes = []interface{}{ + (*CreateBusRouteRequest)(nil), // 0: where_child_bus.v1.CreateBusRouteRequest + (*CreateBusRouteResponse)(nil), // 1: where_child_bus.v1.CreateBusRouteResponse + (*GetBusRouteRequest)(nil), // 2: where_child_bus.v1.GetBusRouteRequest + (*GetBusRouteResponse)(nil), // 3: where_child_bus.v1.GetBusRouteResponse + (BusType)(0), // 4: where_child_bus.v1.BusType + (*BusRoute)(nil), // 5: where_child_bus.v1.BusRoute +} +var file_where_child_bus_v1_bus_route_proto_depIdxs = []int32{ + 4, // 0: where_child_bus.v1.CreateBusRouteRequest.bus_type:type_name -> where_child_bus.v1.BusType + 5, // 1: where_child_bus.v1.CreateBusRouteResponse.bus_route:type_name -> where_child_bus.v1.BusRoute + 4, // 2: where_child_bus.v1.GetBusRouteRequest.bus_type:type_name -> where_child_bus.v1.BusType + 5, // 3: where_child_bus.v1.GetBusRouteResponse.bus_route:type_name -> where_child_bus.v1.BusRoute + 0, // 4: where_child_bus.v1.BusRouteService.CreateBusRoute:input_type -> where_child_bus.v1.CreateBusRouteRequest + 2, // 5: where_child_bus.v1.BusRouteService.GetBusRoute:input_type -> where_child_bus.v1.GetBusRouteRequest + 1, // 6: where_child_bus.v1.BusRouteService.CreateBusRoute:output_type -> where_child_bus.v1.CreateBusRouteResponse + 3, // 7: where_child_bus.v1.BusRouteService.GetBusRoute:output_type -> where_child_bus.v1.GetBusRouteResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_where_child_bus_v1_bus_route_proto_init() } +func file_where_child_bus_v1_bus_route_proto_init() { + if File_where_child_bus_v1_bus_route_proto != nil { + return + } + file_where_child_bus_v1_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_where_child_bus_v1_bus_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateBusRouteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateBusRouteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBusRouteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_where_child_bus_v1_bus_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBusRouteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_where_child_bus_v1_bus_route_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_where_child_bus_v1_bus_route_proto_goTypes, + DependencyIndexes: file_where_child_bus_v1_bus_route_proto_depIdxs, + MessageInfos: file_where_child_bus_v1_bus_route_proto_msgTypes, + }.Build() + File_where_child_bus_v1_bus_route_proto = out.File + file_where_child_bus_v1_bus_route_proto_rawDesc = nil + file_where_child_bus_v1_bus_route_proto_goTypes = nil + file_where_child_bus_v1_bus_route_proto_depIdxs = nil +} diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_route_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_route_grpc.pb.go new file mode 100644 index 00000000..06aa8ed0 --- /dev/null +++ b/backend/proto-gen/go/where_child_bus/v1/bus_route_grpc.pb.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: where_child_bus/v1/bus_route.proto + +package where_child_busv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + BusRouteService_CreateBusRoute_FullMethodName = "/where_child_bus.v1.BusRouteService/CreateBusRoute" + BusRouteService_GetBusRoute_FullMethodName = "/where_child_bus.v1.BusRouteService/GetBusRoute" +) + +// BusRouteServiceClient is the client API for BusRouteService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type BusRouteServiceClient interface { + CreateBusRoute(ctx context.Context, in *CreateBusRouteRequest, opts ...grpc.CallOption) (*CreateBusRouteResponse, error) + GetBusRoute(ctx context.Context, in *GetBusRouteRequest, opts ...grpc.CallOption) (*GetBusRouteResponse, error) +} + +type busRouteServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBusRouteServiceClient(cc grpc.ClientConnInterface) BusRouteServiceClient { + return &busRouteServiceClient{cc} +} + +func (c *busRouteServiceClient) CreateBusRoute(ctx context.Context, in *CreateBusRouteRequest, opts ...grpc.CallOption) (*CreateBusRouteResponse, error) { + out := new(CreateBusRouteResponse) + err := c.cc.Invoke(ctx, BusRouteService_CreateBusRoute_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *busRouteServiceClient) GetBusRoute(ctx context.Context, in *GetBusRouteRequest, opts ...grpc.CallOption) (*GetBusRouteResponse, error) { + out := new(GetBusRouteResponse) + err := c.cc.Invoke(ctx, BusRouteService_GetBusRoute_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BusRouteServiceServer is the server API for BusRouteService service. +// All implementations should embed UnimplementedBusRouteServiceServer +// for forward compatibility +type BusRouteServiceServer interface { + CreateBusRoute(context.Context, *CreateBusRouteRequest) (*CreateBusRouteResponse, error) + GetBusRoute(context.Context, *GetBusRouteRequest) (*GetBusRouteResponse, error) +} + +// UnimplementedBusRouteServiceServer should be embedded to have forward compatible implementations. +type UnimplementedBusRouteServiceServer struct { +} + +func (UnimplementedBusRouteServiceServer) CreateBusRoute(context.Context, *CreateBusRouteRequest) (*CreateBusRouteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBusRoute not implemented") +} +func (UnimplementedBusRouteServiceServer) GetBusRoute(context.Context, *GetBusRouteRequest) (*GetBusRouteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBusRoute not implemented") +} + +// UnsafeBusRouteServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BusRouteServiceServer will +// result in compilation errors. +type UnsafeBusRouteServiceServer interface { + mustEmbedUnimplementedBusRouteServiceServer() +} + +func RegisterBusRouteServiceServer(s grpc.ServiceRegistrar, srv BusRouteServiceServer) { + s.RegisterService(&BusRouteService_ServiceDesc, srv) +} + +func _BusRouteService_CreateBusRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBusRouteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BusRouteServiceServer).CreateBusRoute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BusRouteService_CreateBusRoute_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BusRouteServiceServer).CreateBusRoute(ctx, req.(*CreateBusRouteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BusRouteService_GetBusRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBusRouteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BusRouteServiceServer).GetBusRoute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BusRouteService_GetBusRoute_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BusRouteServiceServer).GetBusRoute(ctx, req.(*GetBusRouteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// BusRouteService_ServiceDesc is the grpc.ServiceDesc for BusRouteService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var BusRouteService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "where_child_bus.v1.BusRouteService", + HandlerType: (*BusRouteServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateBusRoute", + Handler: _BusRouteService_CreateBusRoute_Handler, + }, + { + MethodName: "GetBusRoute", + Handler: _BusRouteService_GetBusRoute_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "where_child_bus/v1/bus_route.proto", +} diff --git a/backend/proto-gen/go/where_child_bus/v1/station.pb.go b/backend/proto-gen/go/where_child_bus/v1/station.pb.go index 68724944..0cb63b5c 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station.pb.go @@ -669,7 +669,7 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x12, 0x35, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xc8, 0x05, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xa5, 0x04, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, @@ -688,48 +688,38 @@ var file_where_child_bus_v1_station_proto_rawDesc = []byte{ 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, - 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x21, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, - 0x64, 0x12, 0x3c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, - 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x3d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x42, - 0x79, 0x42, 0x75, 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, - 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, - 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, - 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x36, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0xef, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, + 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, + 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, + 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, + 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -778,16 +768,14 @@ var file_where_child_bus_v1_station_proto_depIdxs = []int32{ 10, // 10: where_child_bus.v1.UpdateStationResponse.station:type_name -> where_child_bus.v1.Station 0, // 11: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:input_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdRequest 2, // 12: where_child_bus.v1.StationService.GetStationListByBusId:input_type -> where_child_bus.v1.GetStationListByBusIdRequest - 6, // 13: where_child_bus.v1.StationService.GetCorrectOrderStationListByBusId:input_type -> where_child_bus.v1.GetCorrectOrderStationListByBusIdRequest - 4, // 14: where_child_bus.v1.StationService.GetUnregisteredStationList:input_type -> where_child_bus.v1.GetUnregisteredStationListRequest - 8, // 15: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest - 1, // 16: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:output_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdResponse - 3, // 17: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse - 7, // 18: where_child_bus.v1.StationService.GetCorrectOrderStationListByBusId:output_type -> where_child_bus.v1.GetCorrectOrderStationListByBusIdResponse - 5, // 19: where_child_bus.v1.StationService.GetUnregisteredStationList:output_type -> where_child_bus.v1.GetUnregisteredStationListResponse - 9, // 20: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse - 16, // [16:21] is the sub-list for method output_type - 11, // [11:16] is the sub-list for method input_type + 4, // 13: where_child_bus.v1.StationService.GetUnregisteredStationList:input_type -> where_child_bus.v1.GetUnregisteredStationListRequest + 8, // 14: where_child_bus.v1.StationService.UpdateStation:input_type -> where_child_bus.v1.UpdateStationRequest + 1, // 15: where_child_bus.v1.StationService.UpdateStationLocationByGuardianId:output_type -> where_child_bus.v1.UpdateStationLocationByGuardianIdResponse + 3, // 16: where_child_bus.v1.StationService.GetStationListByBusId:output_type -> where_child_bus.v1.GetStationListByBusIdResponse + 5, // 17: where_child_bus.v1.StationService.GetUnregisteredStationList:output_type -> where_child_bus.v1.GetUnregisteredStationListResponse + 9, // 18: where_child_bus.v1.StationService.UpdateStation:output_type -> where_child_bus.v1.UpdateStationResponse + 15, // [15:19] is the sub-list for method output_type + 11, // [11:15] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name 11, // [11:11] is the sub-list for extension extendee 0, // [0:11] is the sub-list for field type_name diff --git a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go index 0edbd36b..7ac2fac7 100644 --- a/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/station_grpc.pb.go @@ -21,7 +21,6 @@ const _ = grpc.SupportPackageIsVersion7 const ( StationService_UpdateStationLocationByGuardianId_FullMethodName = "/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId" StationService_GetStationListByBusId_FullMethodName = "/where_child_bus.v1.StationService/GetStationListByBusId" - StationService_GetCorrectOrderStationListByBusId_FullMethodName = "/where_child_bus.v1.StationService/GetCorrectOrderStationListByBusId" StationService_GetUnregisteredStationList_FullMethodName = "/where_child_bus.v1.StationService/GetUnregisteredStationList" StationService_UpdateStation_FullMethodName = "/where_child_bus.v1.StationService/UpdateStation" ) @@ -32,7 +31,6 @@ const ( type StationServiceClient interface { UpdateStationLocationByGuardianId(ctx context.Context, in *UpdateStationLocationByGuardianIdRequest, opts ...grpc.CallOption) (*UpdateStationLocationByGuardianIdResponse, error) GetStationListByBusId(ctx context.Context, in *GetStationListByBusIdRequest, opts ...grpc.CallOption) (*GetStationListByBusIdResponse, error) - GetCorrectOrderStationListByBusId(ctx context.Context, in *GetCorrectOrderStationListByBusIdRequest, opts ...grpc.CallOption) (*GetCorrectOrderStationListByBusIdResponse, error) GetUnregisteredStationList(ctx context.Context, in *GetUnregisteredStationListRequest, opts ...grpc.CallOption) (*GetUnregisteredStationListResponse, error) UpdateStation(ctx context.Context, in *UpdateStationRequest, opts ...grpc.CallOption) (*UpdateStationResponse, error) } @@ -63,15 +61,6 @@ func (c *stationServiceClient) GetStationListByBusId(ctx context.Context, in *Ge return out, nil } -func (c *stationServiceClient) GetCorrectOrderStationListByBusId(ctx context.Context, in *GetCorrectOrderStationListByBusIdRequest, opts ...grpc.CallOption) (*GetCorrectOrderStationListByBusIdResponse, error) { - out := new(GetCorrectOrderStationListByBusIdResponse) - err := c.cc.Invoke(ctx, StationService_GetCorrectOrderStationListByBusId_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *stationServiceClient) GetUnregisteredStationList(ctx context.Context, in *GetUnregisteredStationListRequest, opts ...grpc.CallOption) (*GetUnregisteredStationListResponse, error) { out := new(GetUnregisteredStationListResponse) err := c.cc.Invoke(ctx, StationService_GetUnregisteredStationList_FullMethodName, in, out, opts...) @@ -96,7 +85,6 @@ func (c *stationServiceClient) UpdateStation(ctx context.Context, in *UpdateStat type StationServiceServer interface { UpdateStationLocationByGuardianId(context.Context, *UpdateStationLocationByGuardianIdRequest) (*UpdateStationLocationByGuardianIdResponse, error) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) - GetCorrectOrderStationListByBusId(context.Context, *GetCorrectOrderStationListByBusIdRequest) (*GetCorrectOrderStationListByBusIdResponse, error) GetUnregisteredStationList(context.Context, *GetUnregisteredStationListRequest) (*GetUnregisteredStationListResponse, error) UpdateStation(context.Context, *UpdateStationRequest) (*UpdateStationResponse, error) } @@ -111,9 +99,6 @@ func (UnimplementedStationServiceServer) UpdateStationLocationByGuardianId(conte func (UnimplementedStationServiceServer) GetStationListByBusId(context.Context, *GetStationListByBusIdRequest) (*GetStationListByBusIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStationListByBusId not implemented") } -func (UnimplementedStationServiceServer) GetCorrectOrderStationListByBusId(context.Context, *GetCorrectOrderStationListByBusIdRequest) (*GetCorrectOrderStationListByBusIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCorrectOrderStationListByBusId not implemented") -} func (UnimplementedStationServiceServer) GetUnregisteredStationList(context.Context, *GetUnregisteredStationListRequest) (*GetUnregisteredStationListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUnregisteredStationList not implemented") } @@ -168,24 +153,6 @@ func _StationService_GetStationListByBusId_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } -func _StationService_GetCorrectOrderStationListByBusId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCorrectOrderStationListByBusIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StationServiceServer).GetCorrectOrderStationListByBusId(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StationService_GetCorrectOrderStationListByBusId_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StationServiceServer).GetCorrectOrderStationListByBusId(ctx, req.(*GetCorrectOrderStationListByBusIdRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _StationService_GetUnregisteredStationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetUnregisteredStationListRequest) if err := dec(in); err != nil { @@ -237,10 +204,6 @@ var StationService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetStationListByBusId", Handler: _StationService_GetStationListByBusId_Handler, }, - { - MethodName: "GetCorrectOrderStationListByBusId", - Handler: _StationService_GetCorrectOrderStationListByBusId_Handler, - }, { MethodName: "GetUnregisteredStationList", Handler: _StationService_GetUnregisteredStationList_Handler, diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index 9b4f88dc..a7d0bc8d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -13,17 +13,15 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/field_mask.pb.dart' as $9; -import 'resources.pb.dart' as $8; -import 'resources.pbenum.dart' as $8; +import '../../google/protobuf/field_mask.pb.dart' as $10; +import 'resources.pb.dart' as $9; +import 'resources.pbenum.dart' as $9; class CreateBusRequest extends $pb.GeneratedMessage { factory CreateBusRequest({ $core.String? nurseryId, $core.String? name, $core.String? plateNumber, - $core.Iterable<$core.String>? morningGuardianIds, - $core.Iterable<$core.String>? eveningGuardianIds, }) { final $result = create(); if (nurseryId != null) { @@ -35,12 +33,6 @@ class CreateBusRequest extends $pb.GeneratedMessage { if (plateNumber != null) { $result.plateNumber = plateNumber; } - if (morningGuardianIds != null) { - $result.morningGuardianIds.addAll(morningGuardianIds); - } - if (eveningGuardianIds != null) { - $result.eveningGuardianIds.addAll(eveningGuardianIds); - } return $result; } CreateBusRequest._() : super(); @@ -51,8 +43,6 @@ class CreateBusRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'nurseryId') ..aOS(2, _omitFieldNames ? '' : 'name') ..aOS(3, _omitFieldNames ? '' : 'plateNumber') - ..pPS(4, _omitFieldNames ? '' : 'morningGuardianIds') - ..pPS(5, _omitFieldNames ? '' : 'eveningGuardianIds') ..hasRequiredFields = false ; @@ -103,17 +93,11 @@ class CreateBusRequest extends $pb.GeneratedMessage { $core.bool hasPlateNumber() => $_has(2); @$pb.TagNumber(3) void clearPlateNumber() => clearField(3); - - @$pb.TagNumber(4) - $core.List<$core.String> get morningGuardianIds => $_getList(3); - - @$pb.TagNumber(5) - $core.List<$core.String> get eveningGuardianIds => $_getList(4); } class CreateBusResponse extends $pb.GeneratedMessage { factory CreateBusResponse({ - $8.Bus? bus, + $9.Bus? bus, }) { final $result = create(); if (bus != null) { @@ -126,7 +110,7 @@ class CreateBusResponse extends $pb.GeneratedMessage { factory CreateBusResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateBusResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $8.Bus.create) + ..aOM<$9.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $9.Bus.create) ..hasRequiredFields = false ; @@ -152,15 +136,15 @@ class CreateBusResponse extends $pb.GeneratedMessage { static CreateBusResponse? _defaultInstance; @$pb.TagNumber(1) - $8.Bus get bus => $_getN(0); + $9.Bus get bus => $_getN(0); @$pb.TagNumber(1) - set bus($8.Bus v) { setField(1, v); } + set bus($9.Bus v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasBus() => $_has(0); @$pb.TagNumber(1) void clearBus() => clearField(1); @$pb.TagNumber(1) - $8.Bus ensureBus() => $_ensure(0); + $9.Bus ensureBus() => $_ensure(0); } class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { @@ -215,7 +199,7 @@ class GetBusListByNurseryIdRequest extends $pb.GeneratedMessage { class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetBusListByNurseryIdResponse({ - $core.Iterable<$8.Bus>? buses, + $core.Iterable<$9.Bus>? buses, }) { final $result = create(); if (buses != null) { @@ -228,7 +212,7 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetBusListByNurseryIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusListByNurseryIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $8.Bus.create) + ..pc<$9.Bus>(1, _omitFieldNames ? '' : 'buses', $pb.PbFieldType.PM, subBuilder: $9.Bus.create) ..hasRequiredFields = false ; @@ -254,7 +238,7 @@ class GetBusListByNurseryIdResponse extends $pb.GeneratedMessage { static GetBusListByNurseryIdResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$8.Bus> get buses => $_getList(0); + $core.List<$9.Bus> get buses => $_getList(0); } class GetRunningBusByGuardianIdRequest extends $pb.GeneratedMessage { @@ -309,7 +293,7 @@ class GetRunningBusByGuardianIdRequest extends $pb.GeneratedMessage { class GetRunningBusByGuardianIdResponse extends $pb.GeneratedMessage { factory GetRunningBusByGuardianIdResponse({ - $8.Bus? bus, + $9.Bus? bus, }) { final $result = create(); if (bus != null) { @@ -322,7 +306,7 @@ class GetRunningBusByGuardianIdResponse extends $pb.GeneratedMessage { factory GetRunningBusByGuardianIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetRunningBusByGuardianIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $8.Bus.create) + ..aOM<$9.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $9.Bus.create) ..hasRequiredFields = false ; @@ -348,22 +332,22 @@ class GetRunningBusByGuardianIdResponse extends $pb.GeneratedMessage { static GetRunningBusByGuardianIdResponse? _defaultInstance; @$pb.TagNumber(1) - $8.Bus get bus => $_getN(0); + $9.Bus get bus => $_getN(0); @$pb.TagNumber(1) - set bus($8.Bus v) { setField(1, v); } + set bus($9.Bus v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasBus() => $_has(0); @$pb.TagNumber(1) void clearBus() => clearField(1); @$pb.TagNumber(1) - $8.Bus ensureBus() => $_ensure(0); + $9.Bus ensureBus() => $_ensure(0); } class ChangeBusStatusRequest extends $pb.GeneratedMessage { factory ChangeBusStatusRequest({ $core.String? busId, - $8.BusStatus? busStatus, - $8.BusType? busType, + $9.BusStatus? busStatus, + $9.BusType? busType, }) { final $result = create(); if (busId != null) { @@ -383,8 +367,8 @@ class ChangeBusStatusRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChangeBusStatusRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') - ..e<$8.BusStatus>(2, _omitFieldNames ? '' : 'busStatus', $pb.PbFieldType.OE, defaultOrMaker: $8.BusStatus.BUS_STATUS_UNSPECIFIED, valueOf: $8.BusStatus.valueOf, enumValues: $8.BusStatus.values) - ..e<$8.BusType>(3, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) + ..e<$9.BusStatus>(2, _omitFieldNames ? '' : 'busStatus', $pb.PbFieldType.OE, defaultOrMaker: $9.BusStatus.BUS_STATUS_UNSPECIFIED, valueOf: $9.BusStatus.valueOf, enumValues: $9.BusStatus.values) + ..e<$9.BusType>(3, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $9.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $9.BusType.valueOf, enumValues: $9.BusType.values) ..hasRequiredFields = false ; @@ -419,18 +403,18 @@ class ChangeBusStatusRequest extends $pb.GeneratedMessage { void clearBusId() => clearField(1); @$pb.TagNumber(2) - $8.BusStatus get busStatus => $_getN(1); + $9.BusStatus get busStatus => $_getN(1); @$pb.TagNumber(2) - set busStatus($8.BusStatus v) { setField(2, v); } + set busStatus($9.BusStatus v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasBusStatus() => $_has(1); @$pb.TagNumber(2) void clearBusStatus() => clearField(2); @$pb.TagNumber(3) - $8.BusType get busType => $_getN(2); + $9.BusType get busType => $_getN(2); @$pb.TagNumber(3) - set busType($8.BusType v) { setField(3, v); } + set busType($9.BusType v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasBusType() => $_has(2); @$pb.TagNumber(3) @@ -439,7 +423,7 @@ class ChangeBusStatusRequest extends $pb.GeneratedMessage { class ChangeBusStatusResponse extends $pb.GeneratedMessage { factory ChangeBusStatusResponse({ - $8.Bus? bus, + $9.Bus? bus, }) { final $result = create(); if (bus != null) { @@ -452,7 +436,7 @@ class ChangeBusStatusResponse extends $pb.GeneratedMessage { factory ChangeBusStatusResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ChangeBusStatusResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $8.Bus.create) + ..aOM<$9.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $9.Bus.create) ..hasRequiredFields = false ; @@ -478,15 +462,15 @@ class ChangeBusStatusResponse extends $pb.GeneratedMessage { static ChangeBusStatusResponse? _defaultInstance; @$pb.TagNumber(1) - $8.Bus get bus => $_getN(0); + $9.Bus get bus => $_getN(0); @$pb.TagNumber(1) - set bus($8.Bus v) { setField(1, v); } + set bus($9.Bus v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasBus() => $_has(0); @$pb.TagNumber(1) void clearBus() => clearField(1); @$pb.TagNumber(1) - $8.Bus ensureBus() => $_ensure(0); + $9.Bus ensureBus() => $_ensure(0); } /// Updated and newly defined messages for the adjusted RPCs @@ -745,9 +729,8 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { class StreamBusVideoRequest extends $pb.GeneratedMessage { factory StreamBusVideoRequest({ $core.String? busId, - $core.String? nurseryId, - $8.BusType? busType, - $8.VehicleEvent? vehicleEvent, + $9.BusType? busType, + $9.VehicleEvent? vehicleEvent, $core.Iterable<$core.List<$core.int>>? videoChunk, $core.int? photoHeight, $core.int? photoWidth, @@ -756,9 +739,6 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { if (busId != null) { $result.busId = busId; } - if (nurseryId != null) { - $result.nurseryId = nurseryId; - } if (busType != null) { $result.busType = busType; } @@ -782,9 +762,8 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StreamBusVideoRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') - ..aOS(2, _omitFieldNames ? '' : 'nurseryId') - ..e<$8.BusType>(3, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) - ..e<$8.VehicleEvent>(4, _omitFieldNames ? '' : 'vehicleEvent', $pb.PbFieldType.OE, defaultOrMaker: $8.VehicleEvent.VEHICLE_EVENT_UNSPECIFIED, valueOf: $8.VehicleEvent.valueOf, enumValues: $8.VehicleEvent.values) + ..e<$9.BusType>(3, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $9.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $9.BusType.valueOf, enumValues: $9.BusType.values) + ..e<$9.VehicleEvent>(4, _omitFieldNames ? '' : 'vehicleEvent', $pb.PbFieldType.OE, defaultOrMaker: $9.VehicleEvent.VEHICLE_EVENT_UNSPECIFIED, valueOf: $9.VehicleEvent.valueOf, enumValues: $9.VehicleEvent.values) ..p<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.PY) ..a<$core.int>(6, _omitFieldNames ? '' : 'photoHeight', $pb.PbFieldType.O3) ..a<$core.int>(7, _omitFieldNames ? '' : 'photoWidth', $pb.PbFieldType.O3) @@ -821,51 +800,42 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearBusId() => clearField(1); - @$pb.TagNumber(2) - $core.String get nurseryId => $_getSZ(1); - @$pb.TagNumber(2) - set nurseryId($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasNurseryId() => $_has(1); - @$pb.TagNumber(2) - void clearNurseryId() => clearField(2); - @$pb.TagNumber(3) - $8.BusType get busType => $_getN(2); + $9.BusType get busType => $_getN(1); @$pb.TagNumber(3) - set busType($8.BusType v) { setField(3, v); } + set busType($9.BusType v) { setField(3, v); } @$pb.TagNumber(3) - $core.bool hasBusType() => $_has(2); + $core.bool hasBusType() => $_has(1); @$pb.TagNumber(3) void clearBusType() => clearField(3); @$pb.TagNumber(4) - $8.VehicleEvent get vehicleEvent => $_getN(3); + $9.VehicleEvent get vehicleEvent => $_getN(2); @$pb.TagNumber(4) - set vehicleEvent($8.VehicleEvent v) { setField(4, v); } + set vehicleEvent($9.VehicleEvent v) { setField(4, v); } @$pb.TagNumber(4) - $core.bool hasVehicleEvent() => $_has(3); + $core.bool hasVehicleEvent() => $_has(2); @$pb.TagNumber(4) void clearVehicleEvent() => clearField(4); @$pb.TagNumber(5) - $core.List<$core.List<$core.int>> get videoChunk => $_getList(4); + $core.List<$core.List<$core.int>> get videoChunk => $_getList(3); @$pb.TagNumber(6) - $core.int get photoHeight => $_getIZ(5); + $core.int get photoHeight => $_getIZ(4); @$pb.TagNumber(6) - set photoHeight($core.int v) { $_setSignedInt32(5, v); } + set photoHeight($core.int v) { $_setSignedInt32(4, v); } @$pb.TagNumber(6) - $core.bool hasPhotoHeight() => $_has(5); + $core.bool hasPhotoHeight() => $_has(4); @$pb.TagNumber(6) void clearPhotoHeight() => clearField(6); @$pb.TagNumber(7) - $core.int get photoWidth => $_getIZ(6); + $core.int get photoWidth => $_getIZ(5); @$pb.TagNumber(7) - set photoWidth($core.int v) { $_setSignedInt32(6, v); } + set photoWidth($core.int v) { $_setSignedInt32(5, v); } @$pb.TagNumber(7) - $core.bool hasPhotoWidth() => $_has(6); + $core.bool hasPhotoWidth() => $_has(5); @$pb.TagNumber(7) void clearPhotoWidth() => clearField(7); } @@ -873,7 +843,7 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { class StreamBusVideoResponse extends $pb.GeneratedMessage { factory StreamBusVideoResponse({ $core.bool? isDetected, - $core.Iterable<$8.Child>? children, + $core.Iterable<$9.Child>? children, }) { final $result = create(); if (isDetected != null) { @@ -890,7 +860,7 @@ class StreamBusVideoResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StreamBusVideoResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'isDetected') - ..pc<$8.Child>(2, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) + ..pc<$9.Child>(2, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $9.Child.create) ..hasRequiredFields = false ; @@ -925,7 +895,7 @@ class StreamBusVideoResponse extends $pb.GeneratedMessage { void clearIsDetected() => clearField(1); @$pb.TagNumber(2) - $core.List<$8.Child> get children => $_getList(1); + $core.List<$9.Child> get children => $_getList(1); } class UpdateBusRequest extends $pb.GeneratedMessage { @@ -936,10 +906,8 @@ class UpdateBusRequest extends $pb.GeneratedMessage { $core.double? latitude, $core.double? longitude, $core.bool? enableFaceRecognition, - $core.String? morningFirstStationId, - $core.String? eveningFirstStationId, $core.String? nextStationId, - $9.FieldMask? updateMask, + $10.FieldMask? updateMask, }) { final $result = create(); if (busId != null) { @@ -960,12 +928,6 @@ class UpdateBusRequest extends $pb.GeneratedMessage { if (enableFaceRecognition != null) { $result.enableFaceRecognition = enableFaceRecognition; } - if (morningFirstStationId != null) { - $result.morningFirstStationId = morningFirstStationId; - } - if (eveningFirstStationId != null) { - $result.eveningFirstStationId = eveningFirstStationId; - } if (nextStationId != null) { $result.nextStationId = nextStationId; } @@ -985,10 +947,8 @@ class UpdateBusRequest extends $pb.GeneratedMessage { ..a<$core.double>(4, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(5, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..aOB(6, _omitFieldNames ? '' : 'enableFaceRecognition') - ..aOS(7, _omitFieldNames ? '' : 'morningFirstStationId') - ..aOS(8, _omitFieldNames ? '' : 'eveningFirstStationId') ..aOS(9, _omitFieldNames ? '' : 'nextStationId') - ..aOM<$9.FieldMask>(10, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..aOM<$10.FieldMask>(10, _omitFieldNames ? '' : 'updateMask', subBuilder: $10.FieldMask.create) ..hasRequiredFields = false ; @@ -1067,48 +1027,30 @@ class UpdateBusRequest extends $pb.GeneratedMessage { @$pb.TagNumber(6) void clearEnableFaceRecognition() => clearField(6); - @$pb.TagNumber(7) - $core.String get morningFirstStationId => $_getSZ(6); - @$pb.TagNumber(7) - set morningFirstStationId($core.String v) { $_setString(6, v); } - @$pb.TagNumber(7) - $core.bool hasMorningFirstStationId() => $_has(6); - @$pb.TagNumber(7) - void clearMorningFirstStationId() => clearField(7); - - @$pb.TagNumber(8) - $core.String get eveningFirstStationId => $_getSZ(7); - @$pb.TagNumber(8) - set eveningFirstStationId($core.String v) { $_setString(7, v); } - @$pb.TagNumber(8) - $core.bool hasEveningFirstStationId() => $_has(7); - @$pb.TagNumber(8) - void clearEveningFirstStationId() => clearField(8); - @$pb.TagNumber(9) - $core.String get nextStationId => $_getSZ(8); + $core.String get nextStationId => $_getSZ(6); @$pb.TagNumber(9) - set nextStationId($core.String v) { $_setString(8, v); } + set nextStationId($core.String v) { $_setString(6, v); } @$pb.TagNumber(9) - $core.bool hasNextStationId() => $_has(8); + $core.bool hasNextStationId() => $_has(6); @$pb.TagNumber(9) void clearNextStationId() => clearField(9); @$pb.TagNumber(10) - $9.FieldMask get updateMask => $_getN(9); + $10.FieldMask get updateMask => $_getN(7); @$pb.TagNumber(10) - set updateMask($9.FieldMask v) { setField(10, v); } + set updateMask($10.FieldMask v) { setField(10, v); } @$pb.TagNumber(10) - $core.bool hasUpdateMask() => $_has(9); + $core.bool hasUpdateMask() => $_has(7); @$pb.TagNumber(10) void clearUpdateMask() => clearField(10); @$pb.TagNumber(10) - $9.FieldMask ensureUpdateMask() => $_ensure(9); + $10.FieldMask ensureUpdateMask() => $_ensure(7); } class UpdateBusResponse extends $pb.GeneratedMessage { factory UpdateBusResponse({ - $8.Bus? bus, + $9.Bus? bus, }) { final $result = create(); if (bus != null) { @@ -1121,7 +1063,7 @@ class UpdateBusResponse extends $pb.GeneratedMessage { factory UpdateBusResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateBusResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $8.Bus.create) + ..aOM<$9.Bus>(1, _omitFieldNames ? '' : 'bus', subBuilder: $9.Bus.create) ..hasRequiredFields = false ; @@ -1147,15 +1089,15 @@ class UpdateBusResponse extends $pb.GeneratedMessage { static UpdateBusResponse? _defaultInstance; @$pb.TagNumber(1) - $8.Bus get bus => $_getN(0); + $9.Bus get bus => $_getN(0); @$pb.TagNumber(1) - set bus($8.Bus v) { setField(1, v); } + set bus($9.Bus v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasBus() => $_has(0); @$pb.TagNumber(1) void clearBus() => clearField(1); @$pb.TagNumber(1) - $8.Bus ensureBus() => $_ensure(0); + $9.Bus ensureBus() => $_ensure(0); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 15930db9..90d3cb93 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -20,17 +20,13 @@ const CreateBusRequest$json = { {'1': 'nursery_id', '3': 1, '4': 1, '5': 9, '10': 'nurseryId'}, {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, {'1': 'plate_number', '3': 3, '4': 1, '5': 9, '10': 'plateNumber'}, - {'1': 'morning_guardian_ids', '3': 4, '4': 3, '5': 9, '10': 'morningGuardianIds'}, - {'1': 'evening_guardian_ids', '3': 5, '4': 3, '5': 9, '10': 'eveningGuardianIds'}, ], }; /// Descriptor for `CreateBusRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List createBusRequestDescriptor = $convert.base64Decode( 'ChBDcmVhdGVCdXNSZXF1ZXN0Eh0KCm51cnNlcnlfaWQYASABKAlSCW51cnNlcnlJZBISCgRuYW' - '1lGAIgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgDIAEoCVILcGxhdGVOdW1iZXISMAoUbW9y' - 'bmluZ19ndWFyZGlhbl9pZHMYBCADKAlSEm1vcm5pbmdHdWFyZGlhbklkcxIwChRldmVuaW5nX2' - 'd1YXJkaWFuX2lkcxgFIAMoCVISZXZlbmluZ0d1YXJkaWFuSWRz'); + '1lGAIgASgJUgRuYW1lEiEKDHBsYXRlX251bWJlchgDIAEoCVILcGxhdGVOdW1iZXI='); @$core.Deprecated('Use createBusResponseDescriptor instead') const CreateBusResponse$json = { @@ -185,7 +181,6 @@ const StreamBusVideoRequest$json = { '1': 'StreamBusVideoRequest', '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, {'1': 'bus_type', '3': 3, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, {'1': 'vehicle_event', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.VehicleEvent', '10': 'vehicleEvent'}, {'1': 'video_chunk', '3': 5, '4': 3, '5': 12, '10': 'videoChunk'}, @@ -196,12 +191,11 @@ const StreamBusVideoRequest$json = { /// Descriptor for `StreamBusVideoRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Decode( - 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBIdCgpudXJzZX' - 'J5X2lkGAIgASgJUgludXJzZXJ5SWQSNgoIYnVzX3R5cGUYAyABKA4yGy53aGVyZV9jaGlsZF9i' - 'dXMudjEuQnVzVHlwZVIHYnVzVHlwZRJFCg12ZWhpY2xlX2V2ZW50GAQgASgOMiAud2hlcmVfY2' - 'hpbGRfYnVzLnYxLlZlaGljbGVFdmVudFIMdmVoaWNsZUV2ZW50Eh8KC3ZpZGVvX2NodW5rGAUg' - 'AygMUgp2aWRlb0NodW5rEiEKDHBob3RvX2hlaWdodBgGIAEoBVILcGhvdG9IZWlnaHQSHwoLcG' - 'hvdG9fd2lkdGgYByABKAVSCnBob3RvV2lkdGg='); + 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI2CghidXNfdH' + 'lwZRgDIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBlEkUKDXZlaGlj' + 'bGVfZXZlbnQYBCABKA4yIC53aGVyZV9jaGlsZF9idXMudjEuVmVoaWNsZUV2ZW50Ugx2ZWhpY2' + 'xlRXZlbnQSHwoLdmlkZW9fY2h1bmsYBSADKAxSCnZpZGVvQ2h1bmsSIQoMcGhvdG9faGVpZ2h0' + 'GAYgASgFUgtwaG90b0hlaWdodBIfCgtwaG90b193aWR0aBgHIAEoBVIKcGhvdG9XaWR0aA=='); @$core.Deprecated('Use streamBusVideoResponseDescriptor instead') const StreamBusVideoResponse$json = { @@ -228,8 +222,6 @@ const UpdateBusRequest$json = { {'1': 'latitude', '3': 4, '4': 1, '5': 1, '10': 'latitude'}, {'1': 'longitude', '3': 5, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'enable_face_recognition', '3': 6, '4': 1, '5': 8, '10': 'enableFaceRecognition'}, - {'1': 'morning_first_station_id', '3': 7, '4': 1, '5': 9, '10': 'morningFirstStationId'}, - {'1': 'evening_first_station_id', '3': 8, '4': 1, '5': 9, '10': 'eveningFirstStationId'}, {'1': 'next_station_id', '3': 9, '4': 1, '5': 9, '10': 'nextStationId'}, {'1': 'update_mask', '3': 10, '4': 1, '5': 11, '6': '.google.protobuf.FieldMask', '10': 'updateMask'}, ], @@ -240,11 +232,9 @@ final $typed_data.Uint8List updateBusRequestDescriptor = $convert.base64Decode( 'ChBVcGRhdGVCdXNSZXF1ZXN0EhUKBmJ1c19pZBgBIAEoCVIFYnVzSWQSEgoEbmFtZRgCIAEoCV' 'IEbmFtZRIhCgxwbGF0ZV9udW1iZXIYAyABKAlSC3BsYXRlTnVtYmVyEhoKCGxhdGl0dWRlGAQg' 'ASgBUghsYXRpdHVkZRIcCglsb25naXR1ZGUYBSABKAFSCWxvbmdpdHVkZRI2ChdlbmFibGVfZm' - 'FjZV9yZWNvZ25pdGlvbhgGIAEoCFIVZW5hYmxlRmFjZVJlY29nbml0aW9uEjcKGG1vcm5pbmdf' - 'Zmlyc3Rfc3RhdGlvbl9pZBgHIAEoCVIVbW9ybmluZ0ZpcnN0U3RhdGlvbklkEjcKGGV2ZW5pbm' - 'dfZmlyc3Rfc3RhdGlvbl9pZBgIIAEoCVIVZXZlbmluZ0ZpcnN0U3RhdGlvbklkEiYKD25leHRf' - 'c3RhdGlvbl9pZBgJIAEoCVINbmV4dFN0YXRpb25JZBI7Cgt1cGRhdGVfbWFzaxgKIAEoCzIaLm' - 'dvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tSCnVwZGF0ZU1hc2s='); + 'FjZV9yZWNvZ25pdGlvbhgGIAEoCFIVZW5hYmxlRmFjZVJlY29nbml0aW9uEiYKD25leHRfc3Rh' + 'dGlvbl9pZBgJIAEoCVINbmV4dFN0YXRpb25JZBI7Cgt1cGRhdGVfbWFzaxgKIAEoCzIaLmdvb2' + 'dsZS5wcm90b2J1Zi5GaWVsZE1hc2tSCnVwZGF0ZU1hc2s='); @$core.Deprecated('Use updateBusResponseDescriptor instead') const UpdateBusResponse$json = { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pb.dart new file mode 100644 index 00000000..15a791f1 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pb.dart @@ -0,0 +1,261 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/bus_route.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'resources.pb.dart' as $9; +import 'resources.pbenum.dart' as $9; + +class CreateBusRouteRequest extends $pb.GeneratedMessage { + factory CreateBusRouteRequest({ + $core.String? busId, + $9.BusType? busType, + $core.Iterable<$core.String>? guardianIds, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + if (busType != null) { + $result.busType = busType; + } + if (guardianIds != null) { + $result.guardianIds.addAll(guardianIds); + } + return $result; + } + CreateBusRouteRequest._() : super(); + factory CreateBusRouteRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateBusRouteRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateBusRouteRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..e<$9.BusType>(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $9.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $9.BusType.valueOf, enumValues: $9.BusType.values) + ..pPS(3, _omitFieldNames ? '' : 'guardianIds') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateBusRouteRequest clone() => CreateBusRouteRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateBusRouteRequest copyWith(void Function(CreateBusRouteRequest) updates) => super.copyWith((message) => updates(message as CreateBusRouteRequest)) as CreateBusRouteRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateBusRouteRequest create() => CreateBusRouteRequest._(); + CreateBusRouteRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateBusRouteRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateBusRouteRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + $9.BusType get busType => $_getN(1); + @$pb.TagNumber(2) + set busType($9.BusType v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasBusType() => $_has(1); + @$pb.TagNumber(2) + void clearBusType() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$core.String> get guardianIds => $_getList(2); +} + +class CreateBusRouteResponse extends $pb.GeneratedMessage { + factory CreateBusRouteResponse({ + $9.BusRoute? busRoute, + }) { + final $result = create(); + if (busRoute != null) { + $result.busRoute = busRoute; + } + return $result; + } + CreateBusRouteResponse._() : super(); + factory CreateBusRouteResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateBusRouteResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateBusRouteResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$9.BusRoute>(1, _omitFieldNames ? '' : 'busRoute', subBuilder: $9.BusRoute.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateBusRouteResponse clone() => CreateBusRouteResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateBusRouteResponse copyWith(void Function(CreateBusRouteResponse) updates) => super.copyWith((message) => updates(message as CreateBusRouteResponse)) as CreateBusRouteResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateBusRouteResponse create() => CreateBusRouteResponse._(); + CreateBusRouteResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateBusRouteResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateBusRouteResponse? _defaultInstance; + + @$pb.TagNumber(1) + $9.BusRoute get busRoute => $_getN(0); + @$pb.TagNumber(1) + set busRoute($9.BusRoute v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasBusRoute() => $_has(0); + @$pb.TagNumber(1) + void clearBusRoute() => clearField(1); + @$pb.TagNumber(1) + $9.BusRoute ensureBusRoute() => $_ensure(0); +} + +class GetBusRouteRequest extends $pb.GeneratedMessage { + factory GetBusRouteRequest({ + $core.String? busId, + $9.BusType? busType, + }) { + final $result = create(); + if (busId != null) { + $result.busId = busId; + } + if (busType != null) { + $result.busType = busType; + } + return $result; + } + GetBusRouteRequest._() : super(); + factory GetBusRouteRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBusRouteRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusRouteRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'busId') + ..e<$9.BusType>(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $9.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $9.BusType.valueOf, enumValues: $9.BusType.values) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBusRouteRequest clone() => GetBusRouteRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBusRouteRequest copyWith(void Function(GetBusRouteRequest) updates) => super.copyWith((message) => updates(message as GetBusRouteRequest)) as GetBusRouteRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetBusRouteRequest create() => GetBusRouteRequest._(); + GetBusRouteRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBusRouteRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBusRouteRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get busId => $_getSZ(0); + @$pb.TagNumber(1) + set busId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasBusId() => $_has(0); + @$pb.TagNumber(1) + void clearBusId() => clearField(1); + + @$pb.TagNumber(2) + $9.BusType get busType => $_getN(1); + @$pb.TagNumber(2) + set busType($9.BusType v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasBusType() => $_has(1); + @$pb.TagNumber(2) + void clearBusType() => clearField(2); +} + +class GetBusRouteResponse extends $pb.GeneratedMessage { + factory GetBusRouteResponse({ + $9.BusRoute? busRoute, + }) { + final $result = create(); + if (busRoute != null) { + $result.busRoute = busRoute; + } + return $result; + } + GetBusRouteResponse._() : super(); + factory GetBusRouteResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBusRouteResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusRouteResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$9.BusRoute>(1, _omitFieldNames ? '' : 'busRoute', subBuilder: $9.BusRoute.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBusRouteResponse clone() => GetBusRouteResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBusRouteResponse copyWith(void Function(GetBusRouteResponse) updates) => super.copyWith((message) => updates(message as GetBusRouteResponse)) as GetBusRouteResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetBusRouteResponse create() => GetBusRouteResponse._(); + GetBusRouteResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBusRouteResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBusRouteResponse? _defaultInstance; + + @$pb.TagNumber(1) + $9.BusRoute get busRoute => $_getN(0); + @$pb.TagNumber(1) + set busRoute($9.BusRoute v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasBusRoute() => $_has(0); + @$pb.TagNumber(1) + void clearBusRoute() => clearField(1); + @$pb.TagNumber(1) + $9.BusRoute ensureBusRoute() => $_ensure(0); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbenum.dart new file mode 100644 index 00000000..a819b9d2 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/bus_route.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart new file mode 100644 index 00000000..479d7547 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart @@ -0,0 +1,79 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/bus_route.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'bus_route.pb.dart' as $1; + +export 'bus_route.pb.dart'; + +@$pb.GrpcServiceName('where_child_bus.v1.BusRouteService') +class BusRouteServiceClient extends $grpc.Client { + static final _$createBusRoute = $grpc.ClientMethod<$1.CreateBusRouteRequest, $1.CreateBusRouteResponse>( + '/where_child_bus.v1.BusRouteService/CreateBusRoute', + ($1.CreateBusRouteRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.CreateBusRouteResponse.fromBuffer(value)); + static final _$getBusRoute = $grpc.ClientMethod<$1.GetBusRouteRequest, $1.GetBusRouteResponse>( + '/where_child_bus.v1.BusRouteService/GetBusRoute', + ($1.GetBusRouteRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.GetBusRouteResponse.fromBuffer(value)); + + BusRouteServiceClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$1.CreateBusRouteResponse> createBusRoute($1.CreateBusRouteRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$createBusRoute, request, options: options); + } + + $grpc.ResponseFuture<$1.GetBusRouteResponse> getBusRoute($1.GetBusRouteRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getBusRoute, request, options: options); + } +} + +@$pb.GrpcServiceName('where_child_bus.v1.BusRouteService') +abstract class BusRouteServiceBase extends $grpc.Service { + $core.String get $name => 'where_child_bus.v1.BusRouteService'; + + BusRouteServiceBase() { + $addMethod($grpc.ServiceMethod<$1.CreateBusRouteRequest, $1.CreateBusRouteResponse>( + 'CreateBusRoute', + createBusRoute_Pre, + false, + false, + ($core.List<$core.int> value) => $1.CreateBusRouteRequest.fromBuffer(value), + ($1.CreateBusRouteResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.GetBusRouteRequest, $1.GetBusRouteResponse>( + 'GetBusRoute', + getBusRoute_Pre, + false, + false, + ($core.List<$core.int> value) => $1.GetBusRouteRequest.fromBuffer(value), + ($1.GetBusRouteResponse value) => value.writeToBuffer())); + } + + $async.Future<$1.CreateBusRouteResponse> createBusRoute_Pre($grpc.ServiceCall call, $async.Future<$1.CreateBusRouteRequest> request) async { + return createBusRoute(call, await request); + } + + $async.Future<$1.GetBusRouteResponse> getBusRoute_Pre($grpc.ServiceCall call, $async.Future<$1.GetBusRouteRequest> request) async { + return getBusRoute(call, await request); + } + + $async.Future<$1.CreateBusRouteResponse> createBusRoute($grpc.ServiceCall call, $1.CreateBusRouteRequest request); + $async.Future<$1.GetBusRouteResponse> getBusRoute($grpc.ServiceCall call, $1.GetBusRouteRequest request); +} diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbjson.dart new file mode 100644 index 00000000..211948d3 --- /dev/null +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbjson.dart @@ -0,0 +1,71 @@ +// +// Generated code. Do not modify. +// source: where_child_bus/v1/bus_route.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use createBusRouteRequestDescriptor instead') +const CreateBusRouteRequest$json = { + '1': 'CreateBusRouteRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'bus_type', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, + {'1': 'guardian_ids', '3': 3, '4': 3, '5': 9, '10': 'guardianIds'}, + ], +}; + +/// Descriptor for `CreateBusRouteRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createBusRouteRequestDescriptor = $convert.base64Decode( + 'ChVDcmVhdGVCdXNSb3V0ZVJlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI2CghidXNfdH' + 'lwZRgCIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBlEiEKDGd1YXJk' + 'aWFuX2lkcxgDIAMoCVILZ3VhcmRpYW5JZHM='); + +@$core.Deprecated('Use createBusRouteResponseDescriptor instead') +const CreateBusRouteResponse$json = { + '1': 'CreateBusRouteResponse', + '2': [ + {'1': 'bus_route', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.BusRoute', '10': 'busRoute'}, + ], +}; + +/// Descriptor for `CreateBusRouteResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createBusRouteResponseDescriptor = $convert.base64Decode( + 'ChZDcmVhdGVCdXNSb3V0ZVJlc3BvbnNlEjkKCWJ1c19yb3V0ZRgBIAEoCzIcLndoZXJlX2NoaW' + 'xkX2J1cy52MS5CdXNSb3V0ZVIIYnVzUm91dGU='); + +@$core.Deprecated('Use getBusRouteRequestDescriptor instead') +const GetBusRouteRequest$json = { + '1': 'GetBusRouteRequest', + '2': [ + {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'bus_type', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, + ], +}; + +/// Descriptor for `GetBusRouteRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBusRouteRequestDescriptor = $convert.base64Decode( + 'ChJHZXRCdXNSb3V0ZVJlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI2CghidXNfdHlwZR' + 'gCIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBl'); + +@$core.Deprecated('Use getBusRouteResponseDescriptor instead') +const GetBusRouteResponse$json = { + '1': 'GetBusRouteResponse', + '2': [ + {'1': 'bus_route', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.BusRoute', '10': 'busRoute'}, + ], +}; + +/// Descriptor for `GetBusRouteResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBusRouteResponseDescriptor = $convert.base64Decode( + 'ChNHZXRCdXNSb3V0ZVJlc3BvbnNlEjkKCWJ1c19yb3V0ZRgBIAEoCzIcLndoZXJlX2NoaWxkX2' + 'J1cy52MS5CdXNSb3V0ZVIIYnVzUm91dGU='); + diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart index 2a5941a6..776e4e55 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pb.dart @@ -13,9 +13,9 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/field_mask.pb.dart' as $9; -import 'resources.pb.dart' as $8; -import 'resources.pbenum.dart' as $8; +import '../../google/protobuf/field_mask.pb.dart' as $10; +import 'resources.pb.dart' as $9; +import 'resources.pbenum.dart' as $9; class CreateChildRequest extends $pb.GeneratedMessage { factory CreateChildRequest({ @@ -23,7 +23,7 @@ class CreateChildRequest extends $pb.GeneratedMessage { $core.String? guardianId, $core.String? name, $core.int? age, - $8.Sex? sex, + $9.Sex? sex, $core.Iterable<$core.List<$core.int>>? photos, }) { final $result = create(); @@ -56,7 +56,7 @@ class CreateChildRequest extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'guardianId') ..aOS(3, _omitFieldNames ? '' : 'name') ..a<$core.int>(4, _omitFieldNames ? '' : 'age', $pb.PbFieldType.O3) - ..e<$8.Sex>(5, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: $8.Sex.SEX_UNSPECIFIED, valueOf: $8.Sex.valueOf, enumValues: $8.Sex.values) + ..e<$9.Sex>(5, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: $9.Sex.SEX_UNSPECIFIED, valueOf: $9.Sex.valueOf, enumValues: $9.Sex.values) ..p<$core.List<$core.int>>(6, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PY) ..hasRequiredFields = false ; @@ -119,9 +119,9 @@ class CreateChildRequest extends $pb.GeneratedMessage { void clearAge() => clearField(4); @$pb.TagNumber(5) - $8.Sex get sex => $_getN(4); + $9.Sex get sex => $_getN(4); @$pb.TagNumber(5) - set sex($8.Sex v) { setField(5, v); } + set sex($9.Sex v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasSex() => $_has(4); @$pb.TagNumber(5) @@ -133,7 +133,7 @@ class CreateChildRequest extends $pb.GeneratedMessage { class CreateChildResponse extends $pb.GeneratedMessage { factory CreateChildResponse({ - $8.Child? child, + $9.Child? child, }) { final $result = create(); if (child != null) { @@ -146,7 +146,7 @@ class CreateChildResponse extends $pb.GeneratedMessage { factory CreateChildResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateChildResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.Child>(1, _omitFieldNames ? '' : 'child', subBuilder: $8.Child.create) + ..aOM<$9.Child>(1, _omitFieldNames ? '' : 'child', subBuilder: $9.Child.create) ..hasRequiredFields = false ; @@ -172,15 +172,15 @@ class CreateChildResponse extends $pb.GeneratedMessage { static CreateChildResponse? _defaultInstance; @$pb.TagNumber(1) - $8.Child get child => $_getN(0); + $9.Child get child => $_getN(0); @$pb.TagNumber(1) - set child($8.Child v) { setField(1, v); } + set child($9.Child v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasChild() => $_has(0); @$pb.TagNumber(1) void clearChild() => clearField(1); @$pb.TagNumber(1) - $8.Child ensureChild() => $_ensure(0); + $9.Child ensureChild() => $_ensure(0); } class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { @@ -235,8 +235,8 @@ class GetChildListByNurseryIDRequest extends $pb.GeneratedMessage { class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse({ - $core.Iterable<$8.Child>? children, - $core.Iterable<$8.ChildPhoto>? photos, + $core.Iterable<$9.Child>? children, + $core.Iterable<$9.ChildPhoto>? photos, }) { final $result = create(); if (children != null) { @@ -252,8 +252,8 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { factory GetChildListByNurseryIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByNurseryIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) - ..pc<$8.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $8.ChildPhoto.create) + ..pc<$9.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $9.Child.create) + ..pc<$9.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $9.ChildPhoto.create) ..hasRequiredFields = false ; @@ -279,10 +279,10 @@ class GetChildListByNurseryIDResponse extends $pb.GeneratedMessage { static GetChildListByNurseryIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$8.Child> get children => $_getList(0); + $core.List<$9.Child> get children => $_getList(0); @$pb.TagNumber(2) - $core.List<$8.ChildPhoto> get photos => $_getList(1); + $core.List<$9.ChildPhoto> get photos => $_getList(1); } class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { @@ -337,8 +337,8 @@ class GetChildListByGuardianIDRequest extends $pb.GeneratedMessage { class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse({ - $core.Iterable<$8.Child>? children, - $core.Iterable<$8.ChildPhoto>? photos, + $core.Iterable<$9.Child>? children, + $core.Iterable<$9.ChildPhoto>? photos, }) { final $result = create(); if (children != null) { @@ -354,8 +354,8 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { factory GetChildListByGuardianIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByGuardianIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) - ..pc<$8.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $8.ChildPhoto.create) + ..pc<$9.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $9.Child.create) + ..pc<$9.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $9.ChildPhoto.create) ..hasRequiredFields = false ; @@ -381,10 +381,10 @@ class GetChildListByGuardianIDResponse extends $pb.GeneratedMessage { static GetChildListByGuardianIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$8.Child> get children => $_getList(0); + $core.List<$9.Child> get children => $_getList(0); @$pb.TagNumber(2) - $core.List<$8.ChildPhoto> get photos => $_getList(1); + $core.List<$9.ChildPhoto> get photos => $_getList(1); } class GetChildListByBusIDRequest extends $pb.GeneratedMessage { @@ -439,8 +439,8 @@ class GetChildListByBusIDRequest extends $pb.GeneratedMessage { class GetChildListByBusIDResponse extends $pb.GeneratedMessage { factory GetChildListByBusIDResponse({ - $core.Iterable<$8.Child>? children, - $core.Iterable<$8.ChildPhoto>? photos, + $core.Iterable<$9.Child>? children, + $core.Iterable<$9.ChildPhoto>? photos, }) { final $result = create(); if (children != null) { @@ -456,8 +456,8 @@ class GetChildListByBusIDResponse extends $pb.GeneratedMessage { factory GetChildListByBusIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetChildListByBusIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) - ..pc<$8.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $8.ChildPhoto.create) + ..pc<$9.Child>(1, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $9.Child.create) + ..pc<$9.ChildPhoto>(2, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $9.ChildPhoto.create) ..hasRequiredFields = false ; @@ -483,10 +483,10 @@ class GetChildListByBusIDResponse extends $pb.GeneratedMessage { static GetChildListByBusIDResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$8.Child> get children => $_getList(0); + $core.List<$9.Child> get children => $_getList(0); @$pb.TagNumber(2) - $core.List<$8.ChildPhoto> get photos => $_getList(1); + $core.List<$9.ChildPhoto> get photos => $_getList(1); } class CheckIsChildInBusRequest extends $pb.GeneratedMessage { @@ -594,14 +594,14 @@ class UpdateChildRequest extends $pb.GeneratedMessage { $core.String? childId, $core.String? name, $core.int? age, - $8.Sex? sex, + $9.Sex? sex, $core.bool? checkForMissingItems, $core.bool? hasBag, $core.bool? hasLunchBox, $core.bool? hasWaterBottle, $core.bool? hasUmbrella, $core.bool? hasOther, - $9.FieldMask? updateMask, + $10.FieldMask? updateMask, }) { final $result = create(); if (childId != null) { @@ -647,14 +647,14 @@ class UpdateChildRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'childId') ..aOS(2, _omitFieldNames ? '' : 'name') ..a<$core.int>(3, _omitFieldNames ? '' : 'age', $pb.PbFieldType.O3) - ..e<$8.Sex>(4, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: $8.Sex.SEX_UNSPECIFIED, valueOf: $8.Sex.valueOf, enumValues: $8.Sex.values) + ..e<$9.Sex>(4, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.OE, defaultOrMaker: $9.Sex.SEX_UNSPECIFIED, valueOf: $9.Sex.valueOf, enumValues: $9.Sex.values) ..aOB(5, _omitFieldNames ? '' : 'checkForMissingItems') ..aOB(6, _omitFieldNames ? '' : 'hasBag') ..aOB(7, _omitFieldNames ? '' : 'hasLunchBox') ..aOB(8, _omitFieldNames ? '' : 'hasWaterBottle') ..aOB(9, _omitFieldNames ? '' : 'hasUmbrella') ..aOB(10, _omitFieldNames ? '' : 'hasOther') - ..aOM<$9.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..aOM<$10.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', subBuilder: $10.FieldMask.create) ..hasRequiredFields = false ; @@ -707,9 +707,9 @@ class UpdateChildRequest extends $pb.GeneratedMessage { void clearAge() => clearField(3); @$pb.TagNumber(4) - $8.Sex get sex => $_getN(3); + $9.Sex get sex => $_getN(3); @$pb.TagNumber(4) - set sex($8.Sex v) { setField(4, v); } + set sex($9.Sex v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasSex() => $_has(3); @$pb.TagNumber(4) @@ -770,20 +770,20 @@ class UpdateChildRequest extends $pb.GeneratedMessage { void clearHasOther() => clearField(10); @$pb.TagNumber(11) - $9.FieldMask get updateMask => $_getN(10); + $10.FieldMask get updateMask => $_getN(10); @$pb.TagNumber(11) - set updateMask($9.FieldMask v) { setField(11, v); } + set updateMask($10.FieldMask v) { setField(11, v); } @$pb.TagNumber(11) $core.bool hasUpdateMask() => $_has(10); @$pb.TagNumber(11) void clearUpdateMask() => clearField(11); @$pb.TagNumber(11) - $9.FieldMask ensureUpdateMask() => $_ensure(10); + $10.FieldMask ensureUpdateMask() => $_ensure(10); } class UpdateChildResponse extends $pb.GeneratedMessage { factory UpdateChildResponse({ - $8.Child? child, + $9.Child? child, }) { final $result = create(); if (child != null) { @@ -796,7 +796,7 @@ class UpdateChildResponse extends $pb.GeneratedMessage { factory UpdateChildResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateChildResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.Child>(1, _omitFieldNames ? '' : 'child', subBuilder: $8.Child.create) + ..aOM<$9.Child>(1, _omitFieldNames ? '' : 'child', subBuilder: $9.Child.create) ..hasRequiredFields = false ; @@ -822,15 +822,15 @@ class UpdateChildResponse extends $pb.GeneratedMessage { static UpdateChildResponse? _defaultInstance; @$pb.TagNumber(1) - $8.Child get child => $_getN(0); + $9.Child get child => $_getN(0); @$pb.TagNumber(1) - set child($8.Child v) { setField(1, v); } + set child($9.Child v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasChild() => $_has(0); @$pb.TagNumber(1) void clearChild() => clearField(1); @$pb.TagNumber(1) - $8.Child ensureChild() => $_ensure(0); + $9.Child ensureChild() => $_ensure(0); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart index b6c9699a..9b2f5e62 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child.pbgrpc.dart @@ -15,36 +15,36 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'child.pb.dart' as $1; +import 'child.pb.dart' as $2; export 'child.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.ChildService') class ChildServiceClient extends $grpc.Client { - static final _$createChild = $grpc.ClientMethod<$1.CreateChildRequest, $1.CreateChildResponse>( + static final _$createChild = $grpc.ClientMethod<$2.CreateChildRequest, $2.CreateChildResponse>( '/where_child_bus.v1.ChildService/CreateChild', - ($1.CreateChildRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.CreateChildResponse.fromBuffer(value)); - static final _$getChildListByNurseryID = $grpc.ClientMethod<$1.GetChildListByNurseryIDRequest, $1.GetChildListByNurseryIDResponse>( + ($2.CreateChildRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.CreateChildResponse.fromBuffer(value)); + static final _$getChildListByNurseryID = $grpc.ClientMethod<$2.GetChildListByNurseryIDRequest, $2.GetChildListByNurseryIDResponse>( '/where_child_bus.v1.ChildService/GetChildListByNurseryID', - ($1.GetChildListByNurseryIDRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.GetChildListByNurseryIDResponse.fromBuffer(value)); - static final _$getChildListByGuardianID = $grpc.ClientMethod<$1.GetChildListByGuardianIDRequest, $1.GetChildListByGuardianIDResponse>( + ($2.GetChildListByNurseryIDRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.GetChildListByNurseryIDResponse.fromBuffer(value)); + static final _$getChildListByGuardianID = $grpc.ClientMethod<$2.GetChildListByGuardianIDRequest, $2.GetChildListByGuardianIDResponse>( '/where_child_bus.v1.ChildService/GetChildListByGuardianID', - ($1.GetChildListByGuardianIDRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.GetChildListByGuardianIDResponse.fromBuffer(value)); - static final _$getChildListByBusID = $grpc.ClientMethod<$1.GetChildListByBusIDRequest, $1.GetChildListByBusIDResponse>( + ($2.GetChildListByGuardianIDRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.GetChildListByGuardianIDResponse.fromBuffer(value)); + static final _$getChildListByBusID = $grpc.ClientMethod<$2.GetChildListByBusIDRequest, $2.GetChildListByBusIDResponse>( '/where_child_bus.v1.ChildService/GetChildListByBusID', - ($1.GetChildListByBusIDRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.GetChildListByBusIDResponse.fromBuffer(value)); - static final _$checkIsChildInBus = $grpc.ClientMethod<$1.CheckIsChildInBusRequest, $1.CheckIsChildInBusResponse>( + ($2.GetChildListByBusIDRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.GetChildListByBusIDResponse.fromBuffer(value)); + static final _$checkIsChildInBus = $grpc.ClientMethod<$2.CheckIsChildInBusRequest, $2.CheckIsChildInBusResponse>( '/where_child_bus.v1.ChildService/CheckIsChildInBus', - ($1.CheckIsChildInBusRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.CheckIsChildInBusResponse.fromBuffer(value)); - static final _$updateChild = $grpc.ClientMethod<$1.UpdateChildRequest, $1.UpdateChildResponse>( + ($2.CheckIsChildInBusRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.CheckIsChildInBusResponse.fromBuffer(value)); + static final _$updateChild = $grpc.ClientMethod<$2.UpdateChildRequest, $2.UpdateChildResponse>( '/where_child_bus.v1.ChildService/UpdateChild', - ($1.UpdateChildRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.UpdateChildResponse.fromBuffer(value)); + ($2.UpdateChildRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.UpdateChildResponse.fromBuffer(value)); ChildServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -52,27 +52,27 @@ class ChildServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$1.CreateChildResponse> createChild($1.CreateChildRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$2.CreateChildResponse> createChild($2.CreateChildRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$createChild, request, options: options); } - $grpc.ResponseFuture<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($1.GetChildListByNurseryIDRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$2.GetChildListByNurseryIDResponse> getChildListByNurseryID($2.GetChildListByNurseryIDRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getChildListByNurseryID, request, options: options); } - $grpc.ResponseFuture<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($1.GetChildListByGuardianIDRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$2.GetChildListByGuardianIDResponse> getChildListByGuardianID($2.GetChildListByGuardianIDRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getChildListByGuardianID, request, options: options); } - $grpc.ResponseFuture<$1.GetChildListByBusIDResponse> getChildListByBusID($1.GetChildListByBusIDRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$2.GetChildListByBusIDResponse> getChildListByBusID($2.GetChildListByBusIDRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getChildListByBusID, request, options: options); } - $grpc.ResponseFuture<$1.CheckIsChildInBusResponse> checkIsChildInBus($1.CheckIsChildInBusRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$2.CheckIsChildInBusResponse> checkIsChildInBus($2.CheckIsChildInBusRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$checkIsChildInBus, request, options: options); } - $grpc.ResponseFuture<$1.UpdateChildResponse> updateChild($1.UpdateChildRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$2.UpdateChildResponse> updateChild($2.UpdateChildRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$updateChild, request, options: options); } } @@ -82,78 +82,78 @@ abstract class ChildServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.ChildService'; ChildServiceBase() { - $addMethod($grpc.ServiceMethod<$1.CreateChildRequest, $1.CreateChildResponse>( + $addMethod($grpc.ServiceMethod<$2.CreateChildRequest, $2.CreateChildResponse>( 'CreateChild', createChild_Pre, false, false, - ($core.List<$core.int> value) => $1.CreateChildRequest.fromBuffer(value), - ($1.CreateChildResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.GetChildListByNurseryIDRequest, $1.GetChildListByNurseryIDResponse>( + ($core.List<$core.int> value) => $2.CreateChildRequest.fromBuffer(value), + ($2.CreateChildResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$2.GetChildListByNurseryIDRequest, $2.GetChildListByNurseryIDResponse>( 'GetChildListByNurseryID', getChildListByNurseryID_Pre, false, false, - ($core.List<$core.int> value) => $1.GetChildListByNurseryIDRequest.fromBuffer(value), - ($1.GetChildListByNurseryIDResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.GetChildListByGuardianIDRequest, $1.GetChildListByGuardianIDResponse>( + ($core.List<$core.int> value) => $2.GetChildListByNurseryIDRequest.fromBuffer(value), + ($2.GetChildListByNurseryIDResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$2.GetChildListByGuardianIDRequest, $2.GetChildListByGuardianIDResponse>( 'GetChildListByGuardianID', getChildListByGuardianID_Pre, false, false, - ($core.List<$core.int> value) => $1.GetChildListByGuardianIDRequest.fromBuffer(value), - ($1.GetChildListByGuardianIDResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.GetChildListByBusIDRequest, $1.GetChildListByBusIDResponse>( + ($core.List<$core.int> value) => $2.GetChildListByGuardianIDRequest.fromBuffer(value), + ($2.GetChildListByGuardianIDResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$2.GetChildListByBusIDRequest, $2.GetChildListByBusIDResponse>( 'GetChildListByBusID', getChildListByBusID_Pre, false, false, - ($core.List<$core.int> value) => $1.GetChildListByBusIDRequest.fromBuffer(value), - ($1.GetChildListByBusIDResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.CheckIsChildInBusRequest, $1.CheckIsChildInBusResponse>( + ($core.List<$core.int> value) => $2.GetChildListByBusIDRequest.fromBuffer(value), + ($2.GetChildListByBusIDResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$2.CheckIsChildInBusRequest, $2.CheckIsChildInBusResponse>( 'CheckIsChildInBus', checkIsChildInBus_Pre, false, false, - ($core.List<$core.int> value) => $1.CheckIsChildInBusRequest.fromBuffer(value), - ($1.CheckIsChildInBusResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.UpdateChildRequest, $1.UpdateChildResponse>( + ($core.List<$core.int> value) => $2.CheckIsChildInBusRequest.fromBuffer(value), + ($2.CheckIsChildInBusResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$2.UpdateChildRequest, $2.UpdateChildResponse>( 'UpdateChild', updateChild_Pre, false, false, - ($core.List<$core.int> value) => $1.UpdateChildRequest.fromBuffer(value), - ($1.UpdateChildResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $2.UpdateChildRequest.fromBuffer(value), + ($2.UpdateChildResponse value) => value.writeToBuffer())); } - $async.Future<$1.CreateChildResponse> createChild_Pre($grpc.ServiceCall call, $async.Future<$1.CreateChildRequest> request) async { + $async.Future<$2.CreateChildResponse> createChild_Pre($grpc.ServiceCall call, $async.Future<$2.CreateChildRequest> request) async { return createChild(call, await request); } - $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByNurseryIDRequest> request) async { + $async.Future<$2.GetChildListByNurseryIDResponse> getChildListByNurseryID_Pre($grpc.ServiceCall call, $async.Future<$2.GetChildListByNurseryIDRequest> request) async { return getChildListByNurseryID(call, await request); } - $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByGuardianIDRequest> request) async { + $async.Future<$2.GetChildListByGuardianIDResponse> getChildListByGuardianID_Pre($grpc.ServiceCall call, $async.Future<$2.GetChildListByGuardianIDRequest> request) async { return getChildListByGuardianID(call, await request); } - $async.Future<$1.GetChildListByBusIDResponse> getChildListByBusID_Pre($grpc.ServiceCall call, $async.Future<$1.GetChildListByBusIDRequest> request) async { + $async.Future<$2.GetChildListByBusIDResponse> getChildListByBusID_Pre($grpc.ServiceCall call, $async.Future<$2.GetChildListByBusIDRequest> request) async { return getChildListByBusID(call, await request); } - $async.Future<$1.CheckIsChildInBusResponse> checkIsChildInBus_Pre($grpc.ServiceCall call, $async.Future<$1.CheckIsChildInBusRequest> request) async { + $async.Future<$2.CheckIsChildInBusResponse> checkIsChildInBus_Pre($grpc.ServiceCall call, $async.Future<$2.CheckIsChildInBusRequest> request) async { return checkIsChildInBus(call, await request); } - $async.Future<$1.UpdateChildResponse> updateChild_Pre($grpc.ServiceCall call, $async.Future<$1.UpdateChildRequest> request) async { + $async.Future<$2.UpdateChildResponse> updateChild_Pre($grpc.ServiceCall call, $async.Future<$2.UpdateChildRequest> request) async { return updateChild(call, await request); } - $async.Future<$1.CreateChildResponse> createChild($grpc.ServiceCall call, $1.CreateChildRequest request); - $async.Future<$1.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $1.GetChildListByNurseryIDRequest request); - $async.Future<$1.GetChildListByGuardianIDResponse> getChildListByGuardianID($grpc.ServiceCall call, $1.GetChildListByGuardianIDRequest request); - $async.Future<$1.GetChildListByBusIDResponse> getChildListByBusID($grpc.ServiceCall call, $1.GetChildListByBusIDRequest request); - $async.Future<$1.CheckIsChildInBusResponse> checkIsChildInBus($grpc.ServiceCall call, $1.CheckIsChildInBusRequest request); - $async.Future<$1.UpdateChildResponse> updateChild($grpc.ServiceCall call, $1.UpdateChildRequest request); + $async.Future<$2.CreateChildResponse> createChild($grpc.ServiceCall call, $2.CreateChildRequest request); + $async.Future<$2.GetChildListByNurseryIDResponse> getChildListByNurseryID($grpc.ServiceCall call, $2.GetChildListByNurseryIDRequest request); + $async.Future<$2.GetChildListByGuardianIDResponse> getChildListByGuardianID($grpc.ServiceCall call, $2.GetChildListByGuardianIDRequest request); + $async.Future<$2.GetChildListByBusIDResponse> getChildListByBusID($grpc.ServiceCall call, $2.GetChildListByBusIDRequest request); + $async.Future<$2.CheckIsChildInBusResponse> checkIsChildInBus($grpc.ServiceCall call, $2.CheckIsChildInBusRequest request); + $async.Future<$2.UpdateChildResponse> updateChild($grpc.ServiceCall call, $2.UpdateChildRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart index e1f7b94d..ea53ed3e 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/child_photo.pbgrpc.dart @@ -15,24 +15,24 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'child_photo.pb.dart' as $2; +import 'child_photo.pb.dart' as $3; export 'child_photo.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.ChildPhotoService') class ChildPhotoServiceClient extends $grpc.Client { - static final _$duplicationCheck = $grpc.ClientMethod<$2.DuplicationCheckRequest, $2.DuplicationCheckResponse>( + static final _$duplicationCheck = $grpc.ClientMethod<$3.DuplicationCheckRequest, $3.DuplicationCheckResponse>( '/where_child_bus.v1.ChildPhotoService/DuplicationCheck', - ($2.DuplicationCheckRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $2.DuplicationCheckResponse.fromBuffer(value)); - static final _$deleteChildPhoto = $grpc.ClientMethod<$2.DeleteChildPhotoRequest, $2.DeleteChildPhotoResponse>( + ($3.DuplicationCheckRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.DuplicationCheckResponse.fromBuffer(value)); + static final _$deleteChildPhoto = $grpc.ClientMethod<$3.DeleteChildPhotoRequest, $3.DeleteChildPhotoResponse>( '/where_child_bus.v1.ChildPhotoService/DeleteChildPhoto', - ($2.DeleteChildPhotoRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $2.DeleteChildPhotoResponse.fromBuffer(value)); - static final _$getChildPhoto = $grpc.ClientMethod<$2.GetChildPhotoRequest, $2.GetChildPhotoResponse>( + ($3.DeleteChildPhotoRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.DeleteChildPhotoResponse.fromBuffer(value)); + static final _$getChildPhoto = $grpc.ClientMethod<$3.GetChildPhotoRequest, $3.GetChildPhotoResponse>( '/where_child_bus.v1.ChildPhotoService/GetChildPhoto', - ($2.GetChildPhotoRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $2.GetChildPhotoResponse.fromBuffer(value)); + ($3.GetChildPhotoRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $3.GetChildPhotoResponse.fromBuffer(value)); ChildPhotoServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -40,15 +40,15 @@ class ChildPhotoServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$2.DuplicationCheckResponse> duplicationCheck($2.DuplicationCheckRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$3.DuplicationCheckResponse> duplicationCheck($3.DuplicationCheckRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$duplicationCheck, request, options: options); } - $grpc.ResponseFuture<$2.DeleteChildPhotoResponse> deleteChildPhoto($2.DeleteChildPhotoRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$3.DeleteChildPhotoResponse> deleteChildPhoto($3.DeleteChildPhotoRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$deleteChildPhoto, request, options: options); } - $grpc.ResponseFuture<$2.GetChildPhotoResponse> getChildPhoto($2.GetChildPhotoRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$3.GetChildPhotoResponse> getChildPhoto($3.GetChildPhotoRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getChildPhoto, request, options: options); } } @@ -58,42 +58,42 @@ abstract class ChildPhotoServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.ChildPhotoService'; ChildPhotoServiceBase() { - $addMethod($grpc.ServiceMethod<$2.DuplicationCheckRequest, $2.DuplicationCheckResponse>( + $addMethod($grpc.ServiceMethod<$3.DuplicationCheckRequest, $3.DuplicationCheckResponse>( 'DuplicationCheck', duplicationCheck_Pre, false, false, - ($core.List<$core.int> value) => $2.DuplicationCheckRequest.fromBuffer(value), - ($2.DuplicationCheckResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$2.DeleteChildPhotoRequest, $2.DeleteChildPhotoResponse>( + ($core.List<$core.int> value) => $3.DuplicationCheckRequest.fromBuffer(value), + ($3.DuplicationCheckResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$3.DeleteChildPhotoRequest, $3.DeleteChildPhotoResponse>( 'DeleteChildPhoto', deleteChildPhoto_Pre, false, false, - ($core.List<$core.int> value) => $2.DeleteChildPhotoRequest.fromBuffer(value), - ($2.DeleteChildPhotoResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$2.GetChildPhotoRequest, $2.GetChildPhotoResponse>( + ($core.List<$core.int> value) => $3.DeleteChildPhotoRequest.fromBuffer(value), + ($3.DeleteChildPhotoResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$3.GetChildPhotoRequest, $3.GetChildPhotoResponse>( 'GetChildPhoto', getChildPhoto_Pre, false, false, - ($core.List<$core.int> value) => $2.GetChildPhotoRequest.fromBuffer(value), - ($2.GetChildPhotoResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $3.GetChildPhotoRequest.fromBuffer(value), + ($3.GetChildPhotoResponse value) => value.writeToBuffer())); } - $async.Future<$2.DuplicationCheckResponse> duplicationCheck_Pre($grpc.ServiceCall call, $async.Future<$2.DuplicationCheckRequest> request) async { + $async.Future<$3.DuplicationCheckResponse> duplicationCheck_Pre($grpc.ServiceCall call, $async.Future<$3.DuplicationCheckRequest> request) async { return duplicationCheck(call, await request); } - $async.Future<$2.DeleteChildPhotoResponse> deleteChildPhoto_Pre($grpc.ServiceCall call, $async.Future<$2.DeleteChildPhotoRequest> request) async { + $async.Future<$3.DeleteChildPhotoResponse> deleteChildPhoto_Pre($grpc.ServiceCall call, $async.Future<$3.DeleteChildPhotoRequest> request) async { return deleteChildPhoto(call, await request); } - $async.Future<$2.GetChildPhotoResponse> getChildPhoto_Pre($grpc.ServiceCall call, $async.Future<$2.GetChildPhotoRequest> request) async { + $async.Future<$3.GetChildPhotoResponse> getChildPhoto_Pre($grpc.ServiceCall call, $async.Future<$3.GetChildPhotoRequest> request) async { return getChildPhoto(call, await request); } - $async.Future<$2.DuplicationCheckResponse> duplicationCheck($grpc.ServiceCall call, $2.DuplicationCheckRequest request); - $async.Future<$2.DeleteChildPhotoResponse> deleteChildPhoto($grpc.ServiceCall call, $2.DeleteChildPhotoRequest request); - $async.Future<$2.GetChildPhotoResponse> getChildPhoto($grpc.ServiceCall call, $2.GetChildPhotoRequest request); + $async.Future<$3.DuplicationCheckResponse> duplicationCheck($grpc.ServiceCall call, $3.DuplicationCheckRequest request); + $async.Future<$3.DeleteChildPhotoResponse> deleteChildPhoto($grpc.ServiceCall call, $3.DeleteChildPhotoRequest request); + $async.Future<$3.GetChildPhotoResponse> getChildPhoto($grpc.ServiceCall call, $3.GetChildPhotoRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index 8e2d960d..a3ceb10d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -13,8 +13,8 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/field_mask.pb.dart' as $9; -import 'resources.pb.dart' as $8; +import '../../google/protobuf/field_mask.pb.dart' as $10; +import 'resources.pb.dart' as $9; class CreateGuardianRequest extends $pb.GeneratedMessage { factory CreateGuardianRequest({ @@ -124,7 +124,7 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { class CreateGuardianResponse extends $pb.GeneratedMessage { factory CreateGuardianResponse({ - $8.GuardianResponse? guardian, + $9.GuardianResponse? guardian, }) { final $result = create(); if (guardian != null) { @@ -137,7 +137,7 @@ class CreateGuardianResponse extends $pb.GeneratedMessage { factory CreateGuardianResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateGuardianResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) + ..aOM<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $9.GuardianResponse.create) ..hasRequiredFields = false ; @@ -163,15 +163,15 @@ class CreateGuardianResponse extends $pb.GeneratedMessage { static CreateGuardianResponse? _defaultInstance; @$pb.TagNumber(1) - $8.GuardianResponse get guardian => $_getN(0); + $9.GuardianResponse get guardian => $_getN(0); @$pb.TagNumber(1) - set guardian($8.GuardianResponse v) { setField(1, v); } + set guardian($9.GuardianResponse v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasGuardian() => $_has(0); @$pb.TagNumber(1) void clearGuardian() => clearField(1); @$pb.TagNumber(1) - $8.GuardianResponse ensureGuardian() => $_ensure(0); + $9.GuardianResponse ensureGuardian() => $_ensure(0); } class GuardianLoginRequest extends $pb.GeneratedMessage { @@ -241,8 +241,8 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { class GuardianLoginResponse extends $pb.GeneratedMessage { factory GuardianLoginResponse({ $core.bool? success, - $8.GuardianResponse? guardian, - $8.NurseryResponse? nursery, + $9.GuardianResponse? guardian, + $9.NurseryResponse? nursery, }) { final $result = create(); if (success != null) { @@ -262,8 +262,8 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$8.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) - ..aOM<$8.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $8.NurseryResponse.create) + ..aOM<$9.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $9.GuardianResponse.create) + ..aOM<$9.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $9.NurseryResponse.create) ..hasRequiredFields = false ; @@ -298,26 +298,26 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $8.GuardianResponse get guardian => $_getN(1); + $9.GuardianResponse get guardian => $_getN(1); @$pb.TagNumber(2) - set guardian($8.GuardianResponse v) { setField(2, v); } + set guardian($9.GuardianResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasGuardian() => $_has(1); @$pb.TagNumber(2) void clearGuardian() => clearField(2); @$pb.TagNumber(2) - $8.GuardianResponse ensureGuardian() => $_ensure(1); + $9.GuardianResponse ensureGuardian() => $_ensure(1); @$pb.TagNumber(3) - $8.NurseryResponse get nursery => $_getN(2); + $9.NurseryResponse get nursery => $_getN(2); @$pb.TagNumber(3) - set nursery($8.NurseryResponse v) { setField(3, v); } + set nursery($9.NurseryResponse v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasNursery() => $_has(2); @$pb.TagNumber(3) void clearNursery() => clearField(3); @$pb.TagNumber(3) - $8.NurseryResponse ensureNursery() => $_ensure(2); + $9.NurseryResponse ensureNursery() => $_ensure(2); } class GetGuardianListByBusIdRequest extends $pb.GeneratedMessage { @@ -372,7 +372,7 @@ class GetGuardianListByBusIdRequest extends $pb.GeneratedMessage { class GetGuardianListByBusIdResponse extends $pb.GeneratedMessage { factory GetGuardianListByBusIdResponse({ - $core.Iterable<$8.GuardianResponse>? guardians, + $core.Iterable<$9.GuardianResponse>? guardians, }) { final $result = create(); if (guardians != null) { @@ -385,7 +385,7 @@ class GetGuardianListByBusIdResponse extends $pb.GeneratedMessage { factory GetGuardianListByBusIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByBusIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) + ..pc<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $9.GuardianResponse.create) ..hasRequiredFields = false ; @@ -411,7 +411,7 @@ class GetGuardianListByBusIdResponse extends $pb.GeneratedMessage { static GetGuardianListByBusIdResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$8.GuardianResponse> get guardians => $_getList(0); + $core.List<$9.GuardianResponse> get guardians => $_getList(0); } class GetGuardianByChildIdRequest extends $pb.GeneratedMessage { @@ -466,7 +466,7 @@ class GetGuardianByChildIdRequest extends $pb.GeneratedMessage { class GetGuardianByChildIdResponse extends $pb.GeneratedMessage { factory GetGuardianByChildIdResponse({ - $8.GuardianResponse? guardian, + $9.GuardianResponse? guardian, }) { final $result = create(); if (guardian != null) { @@ -479,7 +479,7 @@ class GetGuardianByChildIdResponse extends $pb.GeneratedMessage { factory GetGuardianByChildIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianByChildIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) + ..aOM<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $9.GuardianResponse.create) ..hasRequiredFields = false ; @@ -505,15 +505,15 @@ class GetGuardianByChildIdResponse extends $pb.GeneratedMessage { static GetGuardianByChildIdResponse? _defaultInstance; @$pb.TagNumber(1) - $8.GuardianResponse get guardian => $_getN(0); + $9.GuardianResponse get guardian => $_getN(0); @$pb.TagNumber(1) - set guardian($8.GuardianResponse v) { setField(1, v); } + set guardian($9.GuardianResponse v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasGuardian() => $_has(0); @$pb.TagNumber(1) void clearGuardian() => clearField(1); @$pb.TagNumber(1) - $8.GuardianResponse ensureGuardian() => $_ensure(0); + $9.GuardianResponse ensureGuardian() => $_ensure(0); } class GetGuardianListByNurseryIdRequest extends $pb.GeneratedMessage { @@ -568,7 +568,7 @@ class GetGuardianListByNurseryIdRequest extends $pb.GeneratedMessage { class GetGuardianListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetGuardianListByNurseryIdResponse({ - $core.Iterable<$8.GuardianResponse>? guardians, + $core.Iterable<$9.GuardianResponse>? guardians, }) { final $result = create(); if (guardians != null) { @@ -581,7 +581,7 @@ class GetGuardianListByNurseryIdResponse extends $pb.GeneratedMessage { factory GetGuardianListByNurseryIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByNurseryIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) + ..pc<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $9.GuardianResponse.create) ..hasRequiredFields = false ; @@ -607,7 +607,7 @@ class GetGuardianListByNurseryIdResponse extends $pb.GeneratedMessage { static GetGuardianListByNurseryIdResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$8.GuardianResponse> get guardians => $_getList(0); + $core.List<$9.GuardianResponse> get guardians => $_getList(0); } class UpdateGuardianRequest extends $pb.GeneratedMessage { @@ -618,7 +618,7 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.bool? isUseMorningBus, $core.bool? isUseEveningBus, - $9.FieldMask? updateMask, + $10.FieldMask? updateMask, }) { final $result = create(); if (guardianId != null) { @@ -655,7 +655,7 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'phoneNumber') ..aOB(5, _omitFieldNames ? '' : 'isUseMorningBus') ..aOB(6, _omitFieldNames ? '' : 'isUseEveningBus') - ..aOM<$9.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..aOM<$10.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', subBuilder: $10.FieldMask.create) ..hasRequiredFields = false ; @@ -735,20 +735,20 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { void clearIsUseEveningBus() => clearField(6); @$pb.TagNumber(11) - $9.FieldMask get updateMask => $_getN(6); + $10.FieldMask get updateMask => $_getN(6); @$pb.TagNumber(11) - set updateMask($9.FieldMask v) { setField(11, v); } + set updateMask($10.FieldMask v) { setField(11, v); } @$pb.TagNumber(11) $core.bool hasUpdateMask() => $_has(6); @$pb.TagNumber(11) void clearUpdateMask() => clearField(11); @$pb.TagNumber(11) - $9.FieldMask ensureUpdateMask() => $_ensure(6); + $10.FieldMask ensureUpdateMask() => $_ensure(6); } class UpdateGuardianResponse extends $pb.GeneratedMessage { factory UpdateGuardianResponse({ - $8.GuardianResponse? guardian, + $9.GuardianResponse? guardian, }) { final $result = create(); if (guardian != null) { @@ -761,7 +761,7 @@ class UpdateGuardianResponse extends $pb.GeneratedMessage { factory UpdateGuardianResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateGuardianResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $8.GuardianResponse.create) + ..aOM<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $9.GuardianResponse.create) ..hasRequiredFields = false ; @@ -787,15 +787,15 @@ class UpdateGuardianResponse extends $pb.GeneratedMessage { static UpdateGuardianResponse? _defaultInstance; @$pb.TagNumber(1) - $8.GuardianResponse get guardian => $_getN(0); + $9.GuardianResponse get guardian => $_getN(0); @$pb.TagNumber(1) - set guardian($8.GuardianResponse v) { setField(1, v); } + set guardian($9.GuardianResponse v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasGuardian() => $_has(0); @$pb.TagNumber(1) void clearGuardian() => clearField(1); @$pb.TagNumber(1) - $8.GuardianResponse ensureGuardian() => $_ensure(0); + $9.GuardianResponse ensureGuardian() => $_ensure(0); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart index 9601fae9..cb8f41b3 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart @@ -15,36 +15,36 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'guardian.pb.dart' as $3; +import 'guardian.pb.dart' as $4; export 'guardian.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.GuardianService') class GuardianServiceClient extends $grpc.Client { - static final _$createGuardian = $grpc.ClientMethod<$3.CreateGuardianRequest, $3.CreateGuardianResponse>( + static final _$createGuardian = $grpc.ClientMethod<$4.CreateGuardianRequest, $4.CreateGuardianResponse>( '/where_child_bus.v1.GuardianService/CreateGuardian', - ($3.CreateGuardianRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $3.CreateGuardianResponse.fromBuffer(value)); - static final _$guardianLogin = $grpc.ClientMethod<$3.GuardianLoginRequest, $3.GuardianLoginResponse>( + ($4.CreateGuardianRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $4.CreateGuardianResponse.fromBuffer(value)); + static final _$guardianLogin = $grpc.ClientMethod<$4.GuardianLoginRequest, $4.GuardianLoginResponse>( '/where_child_bus.v1.GuardianService/GuardianLogin', - ($3.GuardianLoginRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $3.GuardianLoginResponse.fromBuffer(value)); - static final _$getGuardianListByBusId = $grpc.ClientMethod<$3.GetGuardianListByBusIdRequest, $3.GetGuardianListByBusIdResponse>( + ($4.GuardianLoginRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $4.GuardianLoginResponse.fromBuffer(value)); + static final _$getGuardianListByBusId = $grpc.ClientMethod<$4.GetGuardianListByBusIdRequest, $4.GetGuardianListByBusIdResponse>( '/where_child_bus.v1.GuardianService/GetGuardianListByBusId', - ($3.GetGuardianListByBusIdRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $3.GetGuardianListByBusIdResponse.fromBuffer(value)); - static final _$getGuardianByChildId = $grpc.ClientMethod<$3.GetGuardianByChildIdRequest, $3.GetGuardianByChildIdResponse>( + ($4.GetGuardianListByBusIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $4.GetGuardianListByBusIdResponse.fromBuffer(value)); + static final _$getGuardianByChildId = $grpc.ClientMethod<$4.GetGuardianByChildIdRequest, $4.GetGuardianByChildIdResponse>( '/where_child_bus.v1.GuardianService/GetGuardianByChildId', - ($3.GetGuardianByChildIdRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $3.GetGuardianByChildIdResponse.fromBuffer(value)); - static final _$getGuardianListByNurseryId = $grpc.ClientMethod<$3.GetGuardianListByNurseryIdRequest, $3.GetGuardianListByNurseryIdResponse>( + ($4.GetGuardianByChildIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $4.GetGuardianByChildIdResponse.fromBuffer(value)); + static final _$getGuardianListByNurseryId = $grpc.ClientMethod<$4.GetGuardianListByNurseryIdRequest, $4.GetGuardianListByNurseryIdResponse>( '/where_child_bus.v1.GuardianService/GetGuardianListByNurseryId', - ($3.GetGuardianListByNurseryIdRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $3.GetGuardianListByNurseryIdResponse.fromBuffer(value)); - static final _$updateGuardian = $grpc.ClientMethod<$3.UpdateGuardianRequest, $3.UpdateGuardianResponse>( + ($4.GetGuardianListByNurseryIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $4.GetGuardianListByNurseryIdResponse.fromBuffer(value)); + static final _$updateGuardian = $grpc.ClientMethod<$4.UpdateGuardianRequest, $4.UpdateGuardianResponse>( '/where_child_bus.v1.GuardianService/UpdateGuardian', - ($3.UpdateGuardianRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $3.UpdateGuardianResponse.fromBuffer(value)); + ($4.UpdateGuardianRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $4.UpdateGuardianResponse.fromBuffer(value)); GuardianServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -52,27 +52,27 @@ class GuardianServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$3.CreateGuardianResponse> createGuardian($3.CreateGuardianRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$4.CreateGuardianResponse> createGuardian($4.CreateGuardianRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$createGuardian, request, options: options); } - $grpc.ResponseFuture<$3.GuardianLoginResponse> guardianLogin($3.GuardianLoginRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$4.GuardianLoginResponse> guardianLogin($4.GuardianLoginRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$guardianLogin, request, options: options); } - $grpc.ResponseFuture<$3.GetGuardianListByBusIdResponse> getGuardianListByBusId($3.GetGuardianListByBusIdRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$4.GetGuardianListByBusIdResponse> getGuardianListByBusId($4.GetGuardianListByBusIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getGuardianListByBusId, request, options: options); } - $grpc.ResponseFuture<$3.GetGuardianByChildIdResponse> getGuardianByChildId($3.GetGuardianByChildIdRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$4.GetGuardianByChildIdResponse> getGuardianByChildId($4.GetGuardianByChildIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getGuardianByChildId, request, options: options); } - $grpc.ResponseFuture<$3.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId($3.GetGuardianListByNurseryIdRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$4.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId($4.GetGuardianListByNurseryIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getGuardianListByNurseryId, request, options: options); } - $grpc.ResponseFuture<$3.UpdateGuardianResponse> updateGuardian($3.UpdateGuardianRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$4.UpdateGuardianResponse> updateGuardian($4.UpdateGuardianRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$updateGuardian, request, options: options); } } @@ -82,78 +82,78 @@ abstract class GuardianServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.GuardianService'; GuardianServiceBase() { - $addMethod($grpc.ServiceMethod<$3.CreateGuardianRequest, $3.CreateGuardianResponse>( + $addMethod($grpc.ServiceMethod<$4.CreateGuardianRequest, $4.CreateGuardianResponse>( 'CreateGuardian', createGuardian_Pre, false, false, - ($core.List<$core.int> value) => $3.CreateGuardianRequest.fromBuffer(value), - ($3.CreateGuardianResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$3.GuardianLoginRequest, $3.GuardianLoginResponse>( + ($core.List<$core.int> value) => $4.CreateGuardianRequest.fromBuffer(value), + ($4.CreateGuardianResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$4.GuardianLoginRequest, $4.GuardianLoginResponse>( 'GuardianLogin', guardianLogin_Pre, false, false, - ($core.List<$core.int> value) => $3.GuardianLoginRequest.fromBuffer(value), - ($3.GuardianLoginResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$3.GetGuardianListByBusIdRequest, $3.GetGuardianListByBusIdResponse>( + ($core.List<$core.int> value) => $4.GuardianLoginRequest.fromBuffer(value), + ($4.GuardianLoginResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$4.GetGuardianListByBusIdRequest, $4.GetGuardianListByBusIdResponse>( 'GetGuardianListByBusId', getGuardianListByBusId_Pre, false, false, - ($core.List<$core.int> value) => $3.GetGuardianListByBusIdRequest.fromBuffer(value), - ($3.GetGuardianListByBusIdResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$3.GetGuardianByChildIdRequest, $3.GetGuardianByChildIdResponse>( + ($core.List<$core.int> value) => $4.GetGuardianListByBusIdRequest.fromBuffer(value), + ($4.GetGuardianListByBusIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$4.GetGuardianByChildIdRequest, $4.GetGuardianByChildIdResponse>( 'GetGuardianByChildId', getGuardianByChildId_Pre, false, false, - ($core.List<$core.int> value) => $3.GetGuardianByChildIdRequest.fromBuffer(value), - ($3.GetGuardianByChildIdResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$3.GetGuardianListByNurseryIdRequest, $3.GetGuardianListByNurseryIdResponse>( + ($core.List<$core.int> value) => $4.GetGuardianByChildIdRequest.fromBuffer(value), + ($4.GetGuardianByChildIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$4.GetGuardianListByNurseryIdRequest, $4.GetGuardianListByNurseryIdResponse>( 'GetGuardianListByNurseryId', getGuardianListByNurseryId_Pre, false, false, - ($core.List<$core.int> value) => $3.GetGuardianListByNurseryIdRequest.fromBuffer(value), - ($3.GetGuardianListByNurseryIdResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$3.UpdateGuardianRequest, $3.UpdateGuardianResponse>( + ($core.List<$core.int> value) => $4.GetGuardianListByNurseryIdRequest.fromBuffer(value), + ($4.GetGuardianListByNurseryIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$4.UpdateGuardianRequest, $4.UpdateGuardianResponse>( 'UpdateGuardian', updateGuardian_Pre, false, false, - ($core.List<$core.int> value) => $3.UpdateGuardianRequest.fromBuffer(value), - ($3.UpdateGuardianResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $4.UpdateGuardianRequest.fromBuffer(value), + ($4.UpdateGuardianResponse value) => value.writeToBuffer())); } - $async.Future<$3.CreateGuardianResponse> createGuardian_Pre($grpc.ServiceCall call, $async.Future<$3.CreateGuardianRequest> request) async { + $async.Future<$4.CreateGuardianResponse> createGuardian_Pre($grpc.ServiceCall call, $async.Future<$4.CreateGuardianRequest> request) async { return createGuardian(call, await request); } - $async.Future<$3.GuardianLoginResponse> guardianLogin_Pre($grpc.ServiceCall call, $async.Future<$3.GuardianLoginRequest> request) async { + $async.Future<$4.GuardianLoginResponse> guardianLogin_Pre($grpc.ServiceCall call, $async.Future<$4.GuardianLoginRequest> request) async { return guardianLogin(call, await request); } - $async.Future<$3.GetGuardianListByBusIdResponse> getGuardianListByBusId_Pre($grpc.ServiceCall call, $async.Future<$3.GetGuardianListByBusIdRequest> request) async { + $async.Future<$4.GetGuardianListByBusIdResponse> getGuardianListByBusId_Pre($grpc.ServiceCall call, $async.Future<$4.GetGuardianListByBusIdRequest> request) async { return getGuardianListByBusId(call, await request); } - $async.Future<$3.GetGuardianByChildIdResponse> getGuardianByChildId_Pre($grpc.ServiceCall call, $async.Future<$3.GetGuardianByChildIdRequest> request) async { + $async.Future<$4.GetGuardianByChildIdResponse> getGuardianByChildId_Pre($grpc.ServiceCall call, $async.Future<$4.GetGuardianByChildIdRequest> request) async { return getGuardianByChildId(call, await request); } - $async.Future<$3.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId_Pre($grpc.ServiceCall call, $async.Future<$3.GetGuardianListByNurseryIdRequest> request) async { + $async.Future<$4.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId_Pre($grpc.ServiceCall call, $async.Future<$4.GetGuardianListByNurseryIdRequest> request) async { return getGuardianListByNurseryId(call, await request); } - $async.Future<$3.UpdateGuardianResponse> updateGuardian_Pre($grpc.ServiceCall call, $async.Future<$3.UpdateGuardianRequest> request) async { + $async.Future<$4.UpdateGuardianResponse> updateGuardian_Pre($grpc.ServiceCall call, $async.Future<$4.UpdateGuardianRequest> request) async { return updateGuardian(call, await request); } - $async.Future<$3.CreateGuardianResponse> createGuardian($grpc.ServiceCall call, $3.CreateGuardianRequest request); - $async.Future<$3.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $3.GuardianLoginRequest request); - $async.Future<$3.GetGuardianListByBusIdResponse> getGuardianListByBusId($grpc.ServiceCall call, $3.GetGuardianListByBusIdRequest request); - $async.Future<$3.GetGuardianByChildIdResponse> getGuardianByChildId($grpc.ServiceCall call, $3.GetGuardianByChildIdRequest request); - $async.Future<$3.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId($grpc.ServiceCall call, $3.GetGuardianListByNurseryIdRequest request); - $async.Future<$3.UpdateGuardianResponse> updateGuardian($grpc.ServiceCall call, $3.UpdateGuardianRequest request); + $async.Future<$4.CreateGuardianResponse> createGuardian($grpc.ServiceCall call, $4.CreateGuardianRequest request); + $async.Future<$4.GuardianLoginResponse> guardianLogin($grpc.ServiceCall call, $4.GuardianLoginRequest request); + $async.Future<$4.GetGuardianListByBusIdResponse> getGuardianListByBusId($grpc.ServiceCall call, $4.GetGuardianListByBusIdRequest request); + $async.Future<$4.GetGuardianByChildIdResponse> getGuardianByChildId($grpc.ServiceCall call, $4.GetGuardianByChildIdRequest request); + $async.Future<$4.GetGuardianListByNurseryIdResponse> getGuardianListByNurseryId($grpc.ServiceCall call, $4.GetGuardianListByNurseryIdRequest request); + $async.Future<$4.UpdateGuardianResponse> updateGuardian($grpc.ServiceCall call, $4.UpdateGuardianRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart index 3aec87de..88562fd4 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/health_check.pbgrpc.dart @@ -15,16 +15,16 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'health_check.pb.dart' as $4; +import 'health_check.pb.dart' as $5; export 'health_check.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.HealthcheckService') class HealthcheckServiceClient extends $grpc.Client { - static final _$ping = $grpc.ClientMethod<$4.PingRequest, $4.PingResponse>( + static final _$ping = $grpc.ClientMethod<$5.PingRequest, $5.PingResponse>( '/where_child_bus.v1.HealthcheckService/Ping', - ($4.PingRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $4.PingResponse.fromBuffer(value)); + ($5.PingRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $5.PingResponse.fromBuffer(value)); HealthcheckServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -32,7 +32,7 @@ class HealthcheckServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$4.PingResponse> ping($4.PingRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$5.PingResponse> ping($5.PingRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$ping, request, options: options); } } @@ -42,18 +42,18 @@ abstract class HealthcheckServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.HealthcheckService'; HealthcheckServiceBase() { - $addMethod($grpc.ServiceMethod<$4.PingRequest, $4.PingResponse>( + $addMethod($grpc.ServiceMethod<$5.PingRequest, $5.PingResponse>( 'Ping', ping_Pre, false, false, - ($core.List<$core.int> value) => $4.PingRequest.fromBuffer(value), - ($4.PingResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $5.PingRequest.fromBuffer(value), + ($5.PingResponse value) => value.writeToBuffer())); } - $async.Future<$4.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$4.PingRequest> request) async { + $async.Future<$5.PingResponse> ping_Pre($grpc.ServiceCall call, $async.Future<$5.PingRequest> request) async { return ping(call, await request); } - $async.Future<$4.PingResponse> ping($grpc.ServiceCall call, $4.PingRequest request); + $async.Future<$5.PingResponse> ping($grpc.ServiceCall call, $5.PingRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart index 4636f8ad..36ceaba8 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pb.dart @@ -13,8 +13,8 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/field_mask.pb.dart' as $9; -import 'resources.pb.dart' as $8; +import '../../google/protobuf/field_mask.pb.dart' as $10; +import 'resources.pb.dart' as $9; class GetNurseryByGuardianIdRequest extends $pb.GeneratedMessage { factory GetNurseryByGuardianIdRequest({ @@ -68,7 +68,7 @@ class GetNurseryByGuardianIdRequest extends $pb.GeneratedMessage { class GetNurseryByGuardianIdResponse extends $pb.GeneratedMessage { factory GetNurseryByGuardianIdResponse({ - $8.NurseryResponse? nurseries, + $9.NurseryResponse? nurseries, }) { final $result = create(); if (nurseries != null) { @@ -81,7 +81,7 @@ class GetNurseryByGuardianIdResponse extends $pb.GeneratedMessage { factory GetNurseryByGuardianIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetNurseryByGuardianIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.NurseryResponse>(1, _omitFieldNames ? '' : 'nurseries', subBuilder: $8.NurseryResponse.create) + ..aOM<$9.NurseryResponse>(1, _omitFieldNames ? '' : 'nurseries', subBuilder: $9.NurseryResponse.create) ..hasRequiredFields = false ; @@ -107,15 +107,15 @@ class GetNurseryByGuardianIdResponse extends $pb.GeneratedMessage { static GetNurseryByGuardianIdResponse? _defaultInstance; @$pb.TagNumber(1) - $8.NurseryResponse get nurseries => $_getN(0); + $9.NurseryResponse get nurseries => $_getN(0); @$pb.TagNumber(1) - set nurseries($8.NurseryResponse v) { setField(1, v); } + set nurseries($9.NurseryResponse v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasNurseries() => $_has(0); @$pb.TagNumber(1) void clearNurseries() => clearField(1); @$pb.TagNumber(1) - $8.NurseryResponse ensureNurseries() => $_ensure(0); + $9.NurseryResponse ensureNurseries() => $_ensure(0); } class CreateNurseryRequest extends $pb.GeneratedMessage { @@ -226,7 +226,7 @@ class CreateNurseryRequest extends $pb.GeneratedMessage { class CreateNurseryResponse extends $pb.GeneratedMessage { factory CreateNurseryResponse({ - $8.NurseryResponse? nursery, + $9.NurseryResponse? nursery, }) { final $result = create(); if (nursery != null) { @@ -239,7 +239,7 @@ class CreateNurseryResponse extends $pb.GeneratedMessage { factory CreateNurseryResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateNurseryResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.NurseryResponse>(1, _omitFieldNames ? '' : 'nursery', subBuilder: $8.NurseryResponse.create) + ..aOM<$9.NurseryResponse>(1, _omitFieldNames ? '' : 'nursery', subBuilder: $9.NurseryResponse.create) ..hasRequiredFields = false ; @@ -265,15 +265,15 @@ class CreateNurseryResponse extends $pb.GeneratedMessage { static CreateNurseryResponse? _defaultInstance; @$pb.TagNumber(1) - $8.NurseryResponse get nursery => $_getN(0); + $9.NurseryResponse get nursery => $_getN(0); @$pb.TagNumber(1) - set nursery($8.NurseryResponse v) { setField(1, v); } + set nursery($9.NurseryResponse v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasNursery() => $_has(0); @$pb.TagNumber(1) void clearNursery() => clearField(1); @$pb.TagNumber(1) - $8.NurseryResponse ensureNursery() => $_ensure(0); + $9.NurseryResponse ensureNursery() => $_ensure(0); } class NurseryLoginRequest extends $pb.GeneratedMessage { @@ -343,7 +343,7 @@ class NurseryLoginRequest extends $pb.GeneratedMessage { class NurseryLoginResponse extends $pb.GeneratedMessage { factory NurseryLoginResponse({ $core.bool? success, - $8.NurseryResponse? nursery, + $9.NurseryResponse? nursery, }) { final $result = create(); if (success != null) { @@ -360,7 +360,7 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NurseryLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$8.NurseryResponse>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $8.NurseryResponse.create) + ..aOM<$9.NurseryResponse>(2, _omitFieldNames ? '' : 'nursery', subBuilder: $9.NurseryResponse.create) ..hasRequiredFields = false ; @@ -395,15 +395,15 @@ class NurseryLoginResponse extends $pb.GeneratedMessage { void clearSuccess() => clearField(1); @$pb.TagNumber(2) - $8.NurseryResponse get nursery => $_getN(1); + $9.NurseryResponse get nursery => $_getN(1); @$pb.TagNumber(2) - set nursery($8.NurseryResponse v) { setField(2, v); } + set nursery($9.NurseryResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasNursery() => $_has(1); @$pb.TagNumber(2) void clearNursery() => clearField(2); @$pb.TagNumber(2) - $8.NurseryResponse ensureNursery() => $_ensure(1); + $9.NurseryResponse ensureNursery() => $_ensure(1); } class UpdateNurseryRequest extends $pb.GeneratedMessage { @@ -414,7 +414,7 @@ class UpdateNurseryRequest extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.String? email, $core.String? password, - $9.FieldMask? updateMask, + $10.FieldMask? updateMask, }) { final $result = create(); if (id != null) { @@ -451,7 +451,7 @@ class UpdateNurseryRequest extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'phoneNumber') ..aOS(5, _omitFieldNames ? '' : 'email') ..aOS(6, _omitFieldNames ? '' : 'password') - ..aOM<$9.FieldMask>(7, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..aOM<$10.FieldMask>(7, _omitFieldNames ? '' : 'updateMask', subBuilder: $10.FieldMask.create) ..hasRequiredFields = false ; @@ -531,20 +531,20 @@ class UpdateNurseryRequest extends $pb.GeneratedMessage { void clearPassword() => clearField(6); @$pb.TagNumber(7) - $9.FieldMask get updateMask => $_getN(6); + $10.FieldMask get updateMask => $_getN(6); @$pb.TagNumber(7) - set updateMask($9.FieldMask v) { setField(7, v); } + set updateMask($10.FieldMask v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasUpdateMask() => $_has(6); @$pb.TagNumber(7) void clearUpdateMask() => clearField(7); @$pb.TagNumber(7) - $9.FieldMask ensureUpdateMask() => $_ensure(6); + $10.FieldMask ensureUpdateMask() => $_ensure(6); } class UpdateNurseryResponse extends $pb.GeneratedMessage { factory UpdateNurseryResponse({ - $8.NurseryResponse? nursery, + $9.NurseryResponse? nursery, }) { final $result = create(); if (nursery != null) { @@ -557,7 +557,7 @@ class UpdateNurseryResponse extends $pb.GeneratedMessage { factory UpdateNurseryResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateNurseryResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.NurseryResponse>(1, _omitFieldNames ? '' : 'nursery', subBuilder: $8.NurseryResponse.create) + ..aOM<$9.NurseryResponse>(1, _omitFieldNames ? '' : 'nursery', subBuilder: $9.NurseryResponse.create) ..hasRequiredFields = false ; @@ -583,15 +583,15 @@ class UpdateNurseryResponse extends $pb.GeneratedMessage { static UpdateNurseryResponse? _defaultInstance; @$pb.TagNumber(1) - $8.NurseryResponse get nursery => $_getN(0); + $9.NurseryResponse get nursery => $_getN(0); @$pb.TagNumber(1) - set nursery($8.NurseryResponse v) { setField(1, v); } + set nursery($9.NurseryResponse v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasNursery() => $_has(0); @$pb.TagNumber(1) void clearNursery() => clearField(1); @$pb.TagNumber(1) - $8.NurseryResponse ensureNursery() => $_ensure(0); + $9.NurseryResponse ensureNursery() => $_ensure(0); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart index ee095431..bba1d2a7 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/nursery.pbgrpc.dart @@ -15,28 +15,28 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'nursery.pb.dart' as $5; +import 'nursery.pb.dart' as $6; export 'nursery.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.NurseryService') class NurseryServiceClient extends $grpc.Client { - static final _$getNurseryByGuardianId = $grpc.ClientMethod<$5.GetNurseryByGuardianIdRequest, $5.GetNurseryByGuardianIdResponse>( + static final _$getNurseryByGuardianId = $grpc.ClientMethod<$6.GetNurseryByGuardianIdRequest, $6.GetNurseryByGuardianIdResponse>( '/where_child_bus.v1.NurseryService/GetNurseryByGuardianId', - ($5.GetNurseryByGuardianIdRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $5.GetNurseryByGuardianIdResponse.fromBuffer(value)); - static final _$createNursery = $grpc.ClientMethod<$5.CreateNurseryRequest, $5.CreateNurseryResponse>( + ($6.GetNurseryByGuardianIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.GetNurseryByGuardianIdResponse.fromBuffer(value)); + static final _$createNursery = $grpc.ClientMethod<$6.CreateNurseryRequest, $6.CreateNurseryResponse>( '/where_child_bus.v1.NurseryService/CreateNursery', - ($5.CreateNurseryRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $5.CreateNurseryResponse.fromBuffer(value)); - static final _$nurseryLogin = $grpc.ClientMethod<$5.NurseryLoginRequest, $5.NurseryLoginResponse>( + ($6.CreateNurseryRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.CreateNurseryResponse.fromBuffer(value)); + static final _$nurseryLogin = $grpc.ClientMethod<$6.NurseryLoginRequest, $6.NurseryLoginResponse>( '/where_child_bus.v1.NurseryService/NurseryLogin', - ($5.NurseryLoginRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $5.NurseryLoginResponse.fromBuffer(value)); - static final _$updateNursery = $grpc.ClientMethod<$5.UpdateNurseryRequest, $5.UpdateNurseryResponse>( + ($6.NurseryLoginRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.NurseryLoginResponse.fromBuffer(value)); + static final _$updateNursery = $grpc.ClientMethod<$6.UpdateNurseryRequest, $6.UpdateNurseryResponse>( '/where_child_bus.v1.NurseryService/UpdateNursery', - ($5.UpdateNurseryRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $5.UpdateNurseryResponse.fromBuffer(value)); + ($6.UpdateNurseryRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $6.UpdateNurseryResponse.fromBuffer(value)); NurseryServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -44,19 +44,19 @@ class NurseryServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$5.GetNurseryByGuardianIdResponse> getNurseryByGuardianId($5.GetNurseryByGuardianIdRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$6.GetNurseryByGuardianIdResponse> getNurseryByGuardianId($6.GetNurseryByGuardianIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getNurseryByGuardianId, request, options: options); } - $grpc.ResponseFuture<$5.CreateNurseryResponse> createNursery($5.CreateNurseryRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$6.CreateNurseryResponse> createNursery($6.CreateNurseryRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$createNursery, request, options: options); } - $grpc.ResponseFuture<$5.NurseryLoginResponse> nurseryLogin($5.NurseryLoginRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$6.NurseryLoginResponse> nurseryLogin($6.NurseryLoginRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$nurseryLogin, request, options: options); } - $grpc.ResponseFuture<$5.UpdateNurseryResponse> updateNursery($5.UpdateNurseryRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$6.UpdateNurseryResponse> updateNursery($6.UpdateNurseryRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$updateNursery, request, options: options); } } @@ -66,54 +66,54 @@ abstract class NurseryServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.NurseryService'; NurseryServiceBase() { - $addMethod($grpc.ServiceMethod<$5.GetNurseryByGuardianIdRequest, $5.GetNurseryByGuardianIdResponse>( + $addMethod($grpc.ServiceMethod<$6.GetNurseryByGuardianIdRequest, $6.GetNurseryByGuardianIdResponse>( 'GetNurseryByGuardianId', getNurseryByGuardianId_Pre, false, false, - ($core.List<$core.int> value) => $5.GetNurseryByGuardianIdRequest.fromBuffer(value), - ($5.GetNurseryByGuardianIdResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$5.CreateNurseryRequest, $5.CreateNurseryResponse>( + ($core.List<$core.int> value) => $6.GetNurseryByGuardianIdRequest.fromBuffer(value), + ($6.GetNurseryByGuardianIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$6.CreateNurseryRequest, $6.CreateNurseryResponse>( 'CreateNursery', createNursery_Pre, false, false, - ($core.List<$core.int> value) => $5.CreateNurseryRequest.fromBuffer(value), - ($5.CreateNurseryResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$5.NurseryLoginRequest, $5.NurseryLoginResponse>( + ($core.List<$core.int> value) => $6.CreateNurseryRequest.fromBuffer(value), + ($6.CreateNurseryResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$6.NurseryLoginRequest, $6.NurseryLoginResponse>( 'NurseryLogin', nurseryLogin_Pre, false, false, - ($core.List<$core.int> value) => $5.NurseryLoginRequest.fromBuffer(value), - ($5.NurseryLoginResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$5.UpdateNurseryRequest, $5.UpdateNurseryResponse>( + ($core.List<$core.int> value) => $6.NurseryLoginRequest.fromBuffer(value), + ($6.NurseryLoginResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$6.UpdateNurseryRequest, $6.UpdateNurseryResponse>( 'UpdateNursery', updateNursery_Pre, false, false, - ($core.List<$core.int> value) => $5.UpdateNurseryRequest.fromBuffer(value), - ($5.UpdateNurseryResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $6.UpdateNurseryRequest.fromBuffer(value), + ($6.UpdateNurseryResponse value) => value.writeToBuffer())); } - $async.Future<$5.GetNurseryByGuardianIdResponse> getNurseryByGuardianId_Pre($grpc.ServiceCall call, $async.Future<$5.GetNurseryByGuardianIdRequest> request) async { + $async.Future<$6.GetNurseryByGuardianIdResponse> getNurseryByGuardianId_Pre($grpc.ServiceCall call, $async.Future<$6.GetNurseryByGuardianIdRequest> request) async { return getNurseryByGuardianId(call, await request); } - $async.Future<$5.CreateNurseryResponse> createNursery_Pre($grpc.ServiceCall call, $async.Future<$5.CreateNurseryRequest> request) async { + $async.Future<$6.CreateNurseryResponse> createNursery_Pre($grpc.ServiceCall call, $async.Future<$6.CreateNurseryRequest> request) async { return createNursery(call, await request); } - $async.Future<$5.NurseryLoginResponse> nurseryLogin_Pre($grpc.ServiceCall call, $async.Future<$5.NurseryLoginRequest> request) async { + $async.Future<$6.NurseryLoginResponse> nurseryLogin_Pre($grpc.ServiceCall call, $async.Future<$6.NurseryLoginRequest> request) async { return nurseryLogin(call, await request); } - $async.Future<$5.UpdateNurseryResponse> updateNursery_Pre($grpc.ServiceCall call, $async.Future<$5.UpdateNurseryRequest> request) async { + $async.Future<$6.UpdateNurseryResponse> updateNursery_Pre($grpc.ServiceCall call, $async.Future<$6.UpdateNurseryRequest> request) async { return updateNursery(call, await request); } - $async.Future<$5.GetNurseryByGuardianIdResponse> getNurseryByGuardianId($grpc.ServiceCall call, $5.GetNurseryByGuardianIdRequest request); - $async.Future<$5.CreateNurseryResponse> createNursery($grpc.ServiceCall call, $5.CreateNurseryRequest request); - $async.Future<$5.NurseryLoginResponse> nurseryLogin($grpc.ServiceCall call, $5.NurseryLoginRequest request); - $async.Future<$5.UpdateNurseryResponse> updateNursery($grpc.ServiceCall call, $5.UpdateNurseryRequest request); + $async.Future<$6.GetNurseryByGuardianIdResponse> getNurseryByGuardianId($grpc.ServiceCall call, $6.GetNurseryByGuardianIdRequest request); + $async.Future<$6.CreateNurseryResponse> createNursery($grpc.ServiceCall call, $6.CreateNurseryRequest request); + $async.Future<$6.NurseryLoginResponse> nurseryLogin($grpc.ServiceCall call, $6.NurseryLoginRequest request); + $async.Future<$6.UpdateNurseryResponse> updateNursery($grpc.ServiceCall call, $6.UpdateNurseryRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index e664cce3..e54703af 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -13,7 +13,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/timestamp.pb.dart' as $7; +import '../../google/protobuf/timestamp.pb.dart' as $8; import 'resources.pbenum.dart'; export 'resources.pbenum.dart'; @@ -27,8 +27,8 @@ class Nursery extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.String? email, $core.String? hashedPassword, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $8.Timestamp? createdAt, + $8.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -72,8 +72,8 @@ class Nursery extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') ..aOS(7, _omitFieldNames ? '' : 'hashedPassword') - ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$8.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $8.Timestamp.create) + ..aOM<$8.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $8.Timestamp.create) ..hasRequiredFields = false ; @@ -162,26 +162,26 @@ class Nursery extends $pb.GeneratedMessage { void clearHashedPassword() => clearField(7); @$pb.TagNumber(8) - $7.Timestamp get createdAt => $_getN(7); + $8.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($7.Timestamp v) { setField(8, v); } + set createdAt($8.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $7.Timestamp ensureCreatedAt() => $_ensure(7); + $8.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $7.Timestamp get updatedAt => $_getN(8); + $8.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($7.Timestamp v) { setField(9, v); } + set updatedAt($8.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $7.Timestamp ensureUpdatedAt() => $_ensure(8); + $8.Timestamp ensureUpdatedAt() => $_ensure(8); } class NurseryResponse extends $pb.GeneratedMessage { @@ -192,8 +192,8 @@ class NurseryResponse extends $pb.GeneratedMessage { $core.String? address, $core.String? phoneNumber, $core.String? email, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $8.Timestamp? createdAt, + $8.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -233,8 +233,8 @@ class NurseryResponse extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'address') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOS(6, _omitFieldNames ? '' : 'email') - ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$8.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $8.Timestamp.create) + ..aOM<$8.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $8.Timestamp.create) ..hasRequiredFields = false ; @@ -315,26 +315,26 @@ class NurseryResponse extends $pb.GeneratedMessage { /// ハッシュ化されたパスワードは除外 @$pb.TagNumber(7) - $7.Timestamp get createdAt => $_getN(6); + $8.Timestamp get createdAt => $_getN(6); @$pb.TagNumber(7) - set createdAt($7.Timestamp v) { setField(7, v); } + set createdAt($8.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(6); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $7.Timestamp ensureCreatedAt() => $_ensure(6); + $8.Timestamp ensureCreatedAt() => $_ensure(6); @$pb.TagNumber(8) - $7.Timestamp get updatedAt => $_getN(7); + $8.Timestamp get updatedAt => $_getN(7); @$pb.TagNumber(8) - set updatedAt($7.Timestamp v) { setField(8, v); } + set updatedAt($8.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(7); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $7.Timestamp ensureUpdatedAt() => $_ensure(7); + $8.Timestamp ensureUpdatedAt() => $_ensure(7); } class Guardian extends $pb.GeneratedMessage { @@ -347,8 +347,8 @@ class Guardian extends $pb.GeneratedMessage { $core.String? hashedPassword, $core.bool? isUseMorningBus, $core.bool? isUseEveningBus, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $8.Timestamp? createdAt, + $8.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -396,8 +396,8 @@ class Guardian extends $pb.GeneratedMessage { ..aOS(6, _omitFieldNames ? '' : 'hashedPassword') ..aOB(7, _omitFieldNames ? '' : 'isUseMorningBus') ..aOB(8, _omitFieldNames ? '' : 'isUseEveningBus') - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$8.Timestamp>(9, _omitFieldNames ? '' : 'createdAt', subBuilder: $8.Timestamp.create) + ..aOM<$8.Timestamp>(10, _omitFieldNames ? '' : 'updatedAt', subBuilder: $8.Timestamp.create) ..hasRequiredFields = false ; @@ -495,26 +495,26 @@ class Guardian extends $pb.GeneratedMessage { void clearIsUseEveningBus() => clearField(8); @$pb.TagNumber(9) - $7.Timestamp get createdAt => $_getN(8); + $8.Timestamp get createdAt => $_getN(8); @$pb.TagNumber(9) - set createdAt($7.Timestamp v) { setField(9, v); } + set createdAt($8.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasCreatedAt() => $_has(8); @$pb.TagNumber(9) void clearCreatedAt() => clearField(9); @$pb.TagNumber(9) - $7.Timestamp ensureCreatedAt() => $_ensure(8); + $8.Timestamp ensureCreatedAt() => $_ensure(8); @$pb.TagNumber(10) - $7.Timestamp get updatedAt => $_getN(9); + $8.Timestamp get updatedAt => $_getN(9); @$pb.TagNumber(10) - set updatedAt($7.Timestamp v) { setField(10, v); } + set updatedAt($8.Timestamp v) { setField(10, v); } @$pb.TagNumber(10) $core.bool hasUpdatedAt() => $_has(9); @$pb.TagNumber(10) void clearUpdatedAt() => clearField(10); @$pb.TagNumber(10) - $7.Timestamp ensureUpdatedAt() => $_ensure(9); + $8.Timestamp ensureUpdatedAt() => $_ensure(9); } class GuardianResponse extends $pb.GeneratedMessage { @@ -526,8 +526,8 @@ class GuardianResponse extends $pb.GeneratedMessage { $core.String? phoneNumber, $core.bool? isUseMorningBus, $core.bool? isUseEveningBus, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $8.Timestamp? createdAt, + $8.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -571,8 +571,8 @@ class GuardianResponse extends $pb.GeneratedMessage { ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') ..aOB(6, _omitFieldNames ? '' : 'isUseMorningBus') ..aOB(7, _omitFieldNames ? '' : 'isUseEveningBus') - ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$8.Timestamp>(8, _omitFieldNames ? '' : 'createdAt', subBuilder: $8.Timestamp.create) + ..aOM<$8.Timestamp>(9, _omitFieldNames ? '' : 'updatedAt', subBuilder: $8.Timestamp.create) ..hasRequiredFields = false ; @@ -662,26 +662,26 @@ class GuardianResponse extends $pb.GeneratedMessage { void clearIsUseEveningBus() => clearField(7); @$pb.TagNumber(8) - $7.Timestamp get createdAt => $_getN(7); + $8.Timestamp get createdAt => $_getN(7); @$pb.TagNumber(8) - set createdAt($7.Timestamp v) { setField(8, v); } + set createdAt($8.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasCreatedAt() => $_has(7); @$pb.TagNumber(8) void clearCreatedAt() => clearField(8); @$pb.TagNumber(8) - $7.Timestamp ensureCreatedAt() => $_ensure(7); + $8.Timestamp ensureCreatedAt() => $_ensure(7); @$pb.TagNumber(9) - $7.Timestamp get updatedAt => $_getN(8); + $8.Timestamp get updatedAt => $_getN(8); @$pb.TagNumber(9) - set updatedAt($7.Timestamp v) { setField(9, v); } + set updatedAt($8.Timestamp v) { setField(9, v); } @$pb.TagNumber(9) $core.bool hasUpdatedAt() => $_has(8); @$pb.TagNumber(9) void clearUpdatedAt() => clearField(9); @$pb.TagNumber(9) - $7.Timestamp ensureUpdatedAt() => $_ensure(8); + $8.Timestamp ensureUpdatedAt() => $_ensure(8); } class Bus extends $pb.GeneratedMessage { @@ -695,8 +695,8 @@ class Bus extends $pb.GeneratedMessage { $core.double? longitude, $core.bool? enableFaceRecognition, $core.String? nextStationId, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $8.Timestamp? createdAt, + $8.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -748,8 +748,8 @@ class Bus extends $pb.GeneratedMessage { ..a<$core.double>(7, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) ..aOB(8, _omitFieldNames ? '' : 'enableFaceRecognition') ..aOS(11, _omitFieldNames ? '' : 'nextStationId') - ..aOM<$7.Timestamp>(12, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(13, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$8.Timestamp>(12, _omitFieldNames ? '' : 'createdAt', subBuilder: $8.Timestamp.create) + ..aOM<$8.Timestamp>(13, _omitFieldNames ? '' : 'updatedAt', subBuilder: $8.Timestamp.create) ..hasRequiredFields = false ; @@ -857,26 +857,26 @@ class Bus extends $pb.GeneratedMessage { void clearNextStationId() => clearField(11); @$pb.TagNumber(12) - $7.Timestamp get createdAt => $_getN(9); + $8.Timestamp get createdAt => $_getN(9); @$pb.TagNumber(12) - set createdAt($7.Timestamp v) { setField(12, v); } + set createdAt($8.Timestamp v) { setField(12, v); } @$pb.TagNumber(12) $core.bool hasCreatedAt() => $_has(9); @$pb.TagNumber(12) void clearCreatedAt() => clearField(12); @$pb.TagNumber(12) - $7.Timestamp ensureCreatedAt() => $_ensure(9); + $8.Timestamp ensureCreatedAt() => $_ensure(9); @$pb.TagNumber(13) - $7.Timestamp get updatedAt => $_getN(10); + $8.Timestamp get updatedAt => $_getN(10); @$pb.TagNumber(13) - set updatedAt($7.Timestamp v) { setField(13, v); } + set updatedAt($8.Timestamp v) { setField(13, v); } @$pb.TagNumber(13) $core.bool hasUpdatedAt() => $_has(10); @$pb.TagNumber(13) void clearUpdatedAt() => clearField(13); @$pb.TagNumber(13) - $7.Timestamp ensureUpdatedAt() => $_ensure(10); + $8.Timestamp ensureUpdatedAt() => $_ensure(10); } class Child extends $pb.GeneratedMessage { @@ -893,8 +893,8 @@ class Child extends $pb.GeneratedMessage { $core.bool? hasWaterBottle, $core.bool? hasUmbrella, $core.bool? hasOther, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $8.Timestamp? createdAt, + $8.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -958,8 +958,8 @@ class Child extends $pb.GeneratedMessage { ..aOB(10, _omitFieldNames ? '' : 'hasWaterBottle') ..aOB(11, _omitFieldNames ? '' : 'hasUmbrella') ..aOB(12, _omitFieldNames ? '' : 'hasOther') - ..aOM<$7.Timestamp>(13, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(14, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$8.Timestamp>(13, _omitFieldNames ? '' : 'createdAt', subBuilder: $8.Timestamp.create) + ..aOM<$8.Timestamp>(14, _omitFieldNames ? '' : 'updatedAt', subBuilder: $8.Timestamp.create) ..hasRequiredFields = false ; @@ -1093,26 +1093,26 @@ class Child extends $pb.GeneratedMessage { void clearHasOther() => clearField(12); @$pb.TagNumber(13) - $7.Timestamp get createdAt => $_getN(12); + $8.Timestamp get createdAt => $_getN(12); @$pb.TagNumber(13) - set createdAt($7.Timestamp v) { setField(13, v); } + set createdAt($8.Timestamp v) { setField(13, v); } @$pb.TagNumber(13) $core.bool hasCreatedAt() => $_has(12); @$pb.TagNumber(13) void clearCreatedAt() => clearField(13); @$pb.TagNumber(13) - $7.Timestamp ensureCreatedAt() => $_ensure(12); + $8.Timestamp ensureCreatedAt() => $_ensure(12); @$pb.TagNumber(14) - $7.Timestamp get updatedAt => $_getN(13); + $8.Timestamp get updatedAt => $_getN(13); @$pb.TagNumber(14) - set updatedAt($7.Timestamp v) { setField(14, v); } + set updatedAt($8.Timestamp v) { setField(14, v); } @$pb.TagNumber(14) $core.bool hasUpdatedAt() => $_has(13); @$pb.TagNumber(14) void clearUpdatedAt() => clearField(14); @$pb.TagNumber(14) - $7.Timestamp ensureUpdatedAt() => $_ensure(13); + $8.Timestamp ensureUpdatedAt() => $_ensure(13); } class Station extends $pb.GeneratedMessage { @@ -1121,8 +1121,8 @@ class Station extends $pb.GeneratedMessage { $core.String? guardianId, $core.double? latitude, $core.double? longitude, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $8.Timestamp? createdAt, + $8.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1154,8 +1154,8 @@ class Station extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'guardianId') ..a<$core.double>(5, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(6, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$7.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$8.Timestamp>(7, _omitFieldNames ? '' : 'createdAt', subBuilder: $8.Timestamp.create) + ..aOM<$8.Timestamp>(8, _omitFieldNames ? '' : 'updatedAt', subBuilder: $8.Timestamp.create) ..hasRequiredFields = false ; @@ -1217,26 +1217,26 @@ class Station extends $pb.GeneratedMessage { void clearLongitude() => clearField(6); @$pb.TagNumber(7) - $7.Timestamp get createdAt => $_getN(4); + $8.Timestamp get createdAt => $_getN(4); @$pb.TagNumber(7) - set createdAt($7.Timestamp v) { setField(7, v); } + set createdAt($8.Timestamp v) { setField(7, v); } @$pb.TagNumber(7) $core.bool hasCreatedAt() => $_has(4); @$pb.TagNumber(7) void clearCreatedAt() => clearField(7); @$pb.TagNumber(7) - $7.Timestamp ensureCreatedAt() => $_ensure(4); + $8.Timestamp ensureCreatedAt() => $_ensure(4); @$pb.TagNumber(8) - $7.Timestamp get updatedAt => $_getN(5); + $8.Timestamp get updatedAt => $_getN(5); @$pb.TagNumber(8) - set updatedAt($7.Timestamp v) { setField(8, v); } + set updatedAt($8.Timestamp v) { setField(8, v); } @$pb.TagNumber(8) $core.bool hasUpdatedAt() => $_has(5); @$pb.TagNumber(8) void clearUpdatedAt() => clearField(8); @$pb.TagNumber(8) - $7.Timestamp ensureUpdatedAt() => $_ensure(5); + $8.Timestamp ensureUpdatedAt() => $_ensure(5); } class ChildBusAssociation extends $pb.GeneratedMessage { @@ -1308,8 +1308,8 @@ class ChildPhoto extends $pb.GeneratedMessage { $core.String? id, $core.String? childId, $core.List<$core.int>? photoData, - $7.Timestamp? createdAt, - $7.Timestamp? updatedAt, + $8.Timestamp? createdAt, + $8.Timestamp? updatedAt, }) { final $result = create(); if (id != null) { @@ -1337,8 +1337,8 @@ class ChildPhoto extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'childId') ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'photoData', $pb.PbFieldType.OY) - ..aOM<$7.Timestamp>(4, _omitFieldNames ? '' : 'createdAt', subBuilder: $7.Timestamp.create) - ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'updatedAt', subBuilder: $7.Timestamp.create) + ..aOM<$8.Timestamp>(4, _omitFieldNames ? '' : 'createdAt', subBuilder: $8.Timestamp.create) + ..aOM<$8.Timestamp>(5, _omitFieldNames ? '' : 'updatedAt', subBuilder: $8.Timestamp.create) ..hasRequiredFields = false ; @@ -1391,26 +1391,26 @@ class ChildPhoto extends $pb.GeneratedMessage { void clearPhotoData() => clearField(3); @$pb.TagNumber(4) - $7.Timestamp get createdAt => $_getN(3); + $8.Timestamp get createdAt => $_getN(3); @$pb.TagNumber(4) - set createdAt($7.Timestamp v) { setField(4, v); } + set createdAt($8.Timestamp v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasCreatedAt() => $_has(3); @$pb.TagNumber(4) void clearCreatedAt() => clearField(4); @$pb.TagNumber(4) - $7.Timestamp ensureCreatedAt() => $_ensure(3); + $8.Timestamp ensureCreatedAt() => $_ensure(3); @$pb.TagNumber(5) - $7.Timestamp get updatedAt => $_getN(4); + $8.Timestamp get updatedAt => $_getN(4); @$pb.TagNumber(5) - set updatedAt($7.Timestamp v) { setField(5, v); } + set updatedAt($8.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasUpdatedAt() => $_has(4); @$pb.TagNumber(5) void clearUpdatedAt() => clearField(5); @$pb.TagNumber(5) - $7.Timestamp ensureUpdatedAt() => $_ensure(4); + $8.Timestamp ensureUpdatedAt() => $_ensure(4); } class BoardingRecord extends $pb.GeneratedMessage { @@ -1419,7 +1419,7 @@ class BoardingRecord extends $pb.GeneratedMessage { $core.String? childId, $core.String? busId, $core.bool? isBoarding, - $7.Timestamp? timestamp, + $8.Timestamp? timestamp, }) { final $result = create(); if (id != null) { @@ -1448,7 +1448,7 @@ class BoardingRecord extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'childId') ..aOS(3, _omitFieldNames ? '' : 'busId') ..aOB(4, _omitFieldNames ? '' : 'isBoarding') - ..aOM<$7.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $7.Timestamp.create) + ..aOM<$8.Timestamp>(5, _omitFieldNames ? '' : 'timestamp', subBuilder: $8.Timestamp.create) ..hasRequiredFields = false ; @@ -1510,15 +1510,15 @@ class BoardingRecord extends $pb.GeneratedMessage { void clearIsBoarding() => clearField(4); @$pb.TagNumber(5) - $7.Timestamp get timestamp => $_getN(4); + $8.Timestamp get timestamp => $_getN(4); @$pb.TagNumber(5) - set timestamp($7.Timestamp v) { setField(5, v); } + set timestamp($8.Timestamp v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasTimestamp() => $_has(4); @$pb.TagNumber(5) void clearTimestamp() => clearField(5); @$pb.TagNumber(5) - $7.Timestamp ensureTimestamp() => $_ensure(4); + $8.Timestamp ensureTimestamp() => $_ensure(4); } class BusRoute extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart index f97f0d4d..60fb54a6 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pb.dart @@ -13,9 +13,9 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../../google/protobuf/field_mask.pb.dart' as $9; -import 'resources.pb.dart' as $8; -import 'resources.pbenum.dart' as $8; +import '../../google/protobuf/field_mask.pb.dart' as $10; +import 'resources.pb.dart' as $9; +import 'resources.pbenum.dart' as $9; class UpdateStationLocationByGuardianIdRequest extends $pb.GeneratedMessage { factory UpdateStationLocationByGuardianIdRequest({ @@ -97,7 +97,7 @@ class UpdateStationLocationByGuardianIdRequest extends $pb.GeneratedMessage { class UpdateStationLocationByGuardianIdResponse extends $pb.GeneratedMessage { factory UpdateStationLocationByGuardianIdResponse({ - $8.Station? station, + $9.Station? station, }) { final $result = create(); if (station != null) { @@ -110,7 +110,7 @@ class UpdateStationLocationByGuardianIdResponse extends $pb.GeneratedMessage { factory UpdateStationLocationByGuardianIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationLocationByGuardianIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.Station>(1, _omitFieldNames ? '' : 'station', subBuilder: $8.Station.create) + ..aOM<$9.Station>(1, _omitFieldNames ? '' : 'station', subBuilder: $9.Station.create) ..hasRequiredFields = false ; @@ -136,15 +136,15 @@ class UpdateStationLocationByGuardianIdResponse extends $pb.GeneratedMessage { static UpdateStationLocationByGuardianIdResponse? _defaultInstance; @$pb.TagNumber(1) - $8.Station get station => $_getN(0); + $9.Station get station => $_getN(0); @$pb.TagNumber(1) - set station($8.Station v) { setField(1, v); } + set station($9.Station v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasStation() => $_has(0); @$pb.TagNumber(1) void clearStation() => clearField(1); @$pb.TagNumber(1) - $8.Station ensureStation() => $_ensure(0); + $9.Station ensureStation() => $_ensure(0); } class GetStationListByBusIdRequest extends $pb.GeneratedMessage { @@ -199,10 +199,10 @@ class GetStationListByBusIdRequest extends $pb.GeneratedMessage { class GetStationListByBusIdResponse extends $pb.GeneratedMessage { factory GetStationListByBusIdResponse({ - $core.Iterable<$8.Station>? stations, - $core.Iterable<$8.GuardianResponse>? guardians, - $core.Iterable<$8.Child>? children, - $core.Iterable<$8.ChildPhoto>? photos, + $core.Iterable<$9.Station>? stations, + $core.Iterable<$9.GuardianResponse>? guardians, + $core.Iterable<$9.Child>? children, + $core.Iterable<$9.ChildPhoto>? photos, }) { final $result = create(); if (stations != null) { @@ -224,10 +224,10 @@ class GetStationListByBusIdResponse extends $pb.GeneratedMessage { factory GetStationListByBusIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetStationListByBusIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.Station>(1, _omitFieldNames ? '' : 'stations', $pb.PbFieldType.PM, subBuilder: $8.Station.create) - ..pc<$8.GuardianResponse>(2, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) - ..pc<$8.Child>(3, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $8.Child.create) - ..pc<$8.ChildPhoto>(4, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $8.ChildPhoto.create) + ..pc<$9.Station>(1, _omitFieldNames ? '' : 'stations', $pb.PbFieldType.PM, subBuilder: $9.Station.create) + ..pc<$9.GuardianResponse>(2, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $9.GuardianResponse.create) + ..pc<$9.Child>(3, _omitFieldNames ? '' : 'children', $pb.PbFieldType.PM, subBuilder: $9.Child.create) + ..pc<$9.ChildPhoto>(4, _omitFieldNames ? '' : 'photos', $pb.PbFieldType.PM, subBuilder: $9.ChildPhoto.create) ..hasRequiredFields = false ; @@ -253,16 +253,16 @@ class GetStationListByBusIdResponse extends $pb.GeneratedMessage { static GetStationListByBusIdResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$8.Station> get stations => $_getList(0); + $core.List<$9.Station> get stations => $_getList(0); @$pb.TagNumber(2) - $core.List<$8.GuardianResponse> get guardians => $_getList(1); + $core.List<$9.GuardianResponse> get guardians => $_getList(1); @$pb.TagNumber(3) - $core.List<$8.Child> get children => $_getList(2); + $core.List<$9.Child> get children => $_getList(2); @$pb.TagNumber(4) - $core.List<$8.ChildPhoto> get photos => $_getList(3); + $core.List<$9.ChildPhoto> get photos => $_getList(3); } class GetUnregisteredStationListRequest extends $pb.GeneratedMessage { @@ -317,8 +317,8 @@ class GetUnregisteredStationListRequest extends $pb.GeneratedMessage { class GetUnregisteredStationListResponse extends $pb.GeneratedMessage { factory GetUnregisteredStationListResponse({ - $core.Iterable<$8.Station>? stations, - $core.Iterable<$8.GuardianResponse>? guardians, + $core.Iterable<$9.Station>? stations, + $core.Iterable<$9.GuardianResponse>? guardians, }) { final $result = create(); if (stations != null) { @@ -334,8 +334,8 @@ class GetUnregisteredStationListResponse extends $pb.GeneratedMessage { factory GetUnregisteredStationListResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetUnregisteredStationListResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..pc<$8.Station>(1, _omitFieldNames ? '' : 'stations', $pb.PbFieldType.PM, subBuilder: $8.Station.create) - ..pc<$8.GuardianResponse>(2, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $8.GuardianResponse.create) + ..pc<$9.Station>(1, _omitFieldNames ? '' : 'stations', $pb.PbFieldType.PM, subBuilder: $9.Station.create) + ..pc<$9.GuardianResponse>(2, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $9.GuardianResponse.create) ..hasRequiredFields = false ; @@ -361,16 +361,16 @@ class GetUnregisteredStationListResponse extends $pb.GeneratedMessage { static GetUnregisteredStationListResponse? _defaultInstance; @$pb.TagNumber(1) - $core.List<$8.Station> get stations => $_getList(0); + $core.List<$9.Station> get stations => $_getList(0); @$pb.TagNumber(2) - $core.List<$8.GuardianResponse> get guardians => $_getList(1); + $core.List<$9.GuardianResponse> get guardians => $_getList(1); } class GetCorrectOrderStationListByBusIdRequest extends $pb.GeneratedMessage { factory GetCorrectOrderStationListByBusIdRequest({ $core.String? busId, - $8.BusType? busType, + $9.BusType? busType, }) { final $result = create(); if (busId != null) { @@ -387,7 +387,7 @@ class GetCorrectOrderStationListByBusIdRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetCorrectOrderStationListByBusIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') - ..e<$8.BusType>(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $8.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $8.BusType.valueOf, enumValues: $8.BusType.values) + ..e<$9.BusType>(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $9.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $9.BusType.valueOf, enumValues: $9.BusType.values) ..hasRequiredFields = false ; @@ -422,9 +422,9 @@ class GetCorrectOrderStationListByBusIdRequest extends $pb.GeneratedMessage { void clearBusId() => clearField(1); @$pb.TagNumber(2) - $8.BusType get busType => $_getN(1); + $9.BusType get busType => $_getN(1); @$pb.TagNumber(2) - set busType($8.BusType v) { setField(2, v); } + set busType($9.BusType v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasBusType() => $_has(1); @$pb.TagNumber(2) @@ -433,7 +433,7 @@ class GetCorrectOrderStationListByBusIdRequest extends $pb.GeneratedMessage { class GetCorrectOrderStationListByBusIdResponse extends $pb.GeneratedMessage { factory GetCorrectOrderStationListByBusIdResponse({ - $8.BusRoute? busRoute, + $9.BusRoute? busRoute, }) { final $result = create(); if (busRoute != null) { @@ -446,7 +446,7 @@ class GetCorrectOrderStationListByBusIdResponse extends $pb.GeneratedMessage { factory GetCorrectOrderStationListByBusIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetCorrectOrderStationListByBusIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.BusRoute>(1, _omitFieldNames ? '' : 'busRoute', subBuilder: $8.BusRoute.create) + ..aOM<$9.BusRoute>(1, _omitFieldNames ? '' : 'busRoute', subBuilder: $9.BusRoute.create) ..hasRequiredFields = false ; @@ -472,15 +472,15 @@ class GetCorrectOrderStationListByBusIdResponse extends $pb.GeneratedMessage { static GetCorrectOrderStationListByBusIdResponse? _defaultInstance; @$pb.TagNumber(1) - $8.BusRoute get busRoute => $_getN(0); + $9.BusRoute get busRoute => $_getN(0); @$pb.TagNumber(1) - set busRoute($8.BusRoute v) { setField(1, v); } + set busRoute($9.BusRoute v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasBusRoute() => $_has(0); @$pb.TagNumber(1) void clearBusRoute() => clearField(1); @$pb.TagNumber(1) - $8.BusRoute ensureBusRoute() => $_ensure(0); + $9.BusRoute ensureBusRoute() => $_ensure(0); } class UpdateStationRequest extends $pb.GeneratedMessage { @@ -489,7 +489,7 @@ class UpdateStationRequest extends $pb.GeneratedMessage { $core.String? busId, $core.double? latitude, $core.double? longitude, - $9.FieldMask? updateMask, + $10.FieldMask? updateMask, }) { final $result = create(); if (id != null) { @@ -518,7 +518,7 @@ class UpdateStationRequest extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'busId') ..a<$core.double>(3, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) ..a<$core.double>(4, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) - ..aOM<$9.FieldMask>(5, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.FieldMask.create) + ..aOM<$10.FieldMask>(5, _omitFieldNames ? '' : 'updateMask', subBuilder: $10.FieldMask.create) ..hasRequiredFields = false ; @@ -580,20 +580,20 @@ class UpdateStationRequest extends $pb.GeneratedMessage { void clearLongitude() => clearField(4); @$pb.TagNumber(5) - $9.FieldMask get updateMask => $_getN(4); + $10.FieldMask get updateMask => $_getN(4); @$pb.TagNumber(5) - set updateMask($9.FieldMask v) { setField(5, v); } + set updateMask($10.FieldMask v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasUpdateMask() => $_has(4); @$pb.TagNumber(5) void clearUpdateMask() => clearField(5); @$pb.TagNumber(5) - $9.FieldMask ensureUpdateMask() => $_ensure(4); + $10.FieldMask ensureUpdateMask() => $_ensure(4); } class UpdateStationResponse extends $pb.GeneratedMessage { factory UpdateStationResponse({ - $8.Station? station, + $9.Station? station, }) { final $result = create(); if (station != null) { @@ -606,7 +606,7 @@ class UpdateStationResponse extends $pb.GeneratedMessage { factory UpdateStationResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateStationResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) - ..aOM<$8.Station>(1, _omitFieldNames ? '' : 'station', subBuilder: $8.Station.create) + ..aOM<$9.Station>(1, _omitFieldNames ? '' : 'station', subBuilder: $9.Station.create) ..hasRequiredFields = false ; @@ -632,15 +632,15 @@ class UpdateStationResponse extends $pb.GeneratedMessage { static UpdateStationResponse? _defaultInstance; @$pb.TagNumber(1) - $8.Station get station => $_getN(0); + $9.Station get station => $_getN(0); @$pb.TagNumber(1) - set station($8.Station v) { setField(1, v); } + set station($9.Station v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasStation() => $_has(0); @$pb.TagNumber(1) void clearStation() => clearField(1); @$pb.TagNumber(1) - $8.Station ensureStation() => $_ensure(0); + $9.Station ensureStation() => $_ensure(0); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart index 332f01f8..a3703cd5 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/station.pbgrpc.dart @@ -15,32 +15,28 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'station.pb.dart' as $6; +import 'station.pb.dart' as $7; export 'station.pb.dart'; @$pb.GrpcServiceName('where_child_bus.v1.StationService') class StationServiceClient extends $grpc.Client { - static final _$updateStationLocationByGuardianId = $grpc.ClientMethod<$6.UpdateStationLocationByGuardianIdRequest, $6.UpdateStationLocationByGuardianIdResponse>( + static final _$updateStationLocationByGuardianId = $grpc.ClientMethod<$7.UpdateStationLocationByGuardianIdRequest, $7.UpdateStationLocationByGuardianIdResponse>( '/where_child_bus.v1.StationService/UpdateStationLocationByGuardianId', - ($6.UpdateStationLocationByGuardianIdRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $6.UpdateStationLocationByGuardianIdResponse.fromBuffer(value)); - static final _$getStationListByBusId = $grpc.ClientMethod<$6.GetStationListByBusIdRequest, $6.GetStationListByBusIdResponse>( + ($7.UpdateStationLocationByGuardianIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $7.UpdateStationLocationByGuardianIdResponse.fromBuffer(value)); + static final _$getStationListByBusId = $grpc.ClientMethod<$7.GetStationListByBusIdRequest, $7.GetStationListByBusIdResponse>( '/where_child_bus.v1.StationService/GetStationListByBusId', - ($6.GetStationListByBusIdRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $6.GetStationListByBusIdResponse.fromBuffer(value)); - static final _$getCorrectOrderStationListByBusId = $grpc.ClientMethod<$6.GetCorrectOrderStationListByBusIdRequest, $6.GetCorrectOrderStationListByBusIdResponse>( - '/where_child_bus.v1.StationService/GetCorrectOrderStationListByBusId', - ($6.GetCorrectOrderStationListByBusIdRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $6.GetCorrectOrderStationListByBusIdResponse.fromBuffer(value)); - static final _$getUnregisteredStationList = $grpc.ClientMethod<$6.GetUnregisteredStationListRequest, $6.GetUnregisteredStationListResponse>( + ($7.GetStationListByBusIdRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $7.GetStationListByBusIdResponse.fromBuffer(value)); + static final _$getUnregisteredStationList = $grpc.ClientMethod<$7.GetUnregisteredStationListRequest, $7.GetUnregisteredStationListResponse>( '/where_child_bus.v1.StationService/GetUnregisteredStationList', - ($6.GetUnregisteredStationListRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $6.GetUnregisteredStationListResponse.fromBuffer(value)); - static final _$updateStation = $grpc.ClientMethod<$6.UpdateStationRequest, $6.UpdateStationResponse>( + ($7.GetUnregisteredStationListRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $7.GetUnregisteredStationListResponse.fromBuffer(value)); + static final _$updateStation = $grpc.ClientMethod<$7.UpdateStationRequest, $7.UpdateStationResponse>( '/where_child_bus.v1.StationService/UpdateStation', - ($6.UpdateStationRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $6.UpdateStationResponse.fromBuffer(value)); + ($7.UpdateStationRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $7.UpdateStationResponse.fromBuffer(value)); StationServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -48,23 +44,19 @@ class StationServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$6.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId($6.UpdateStationLocationByGuardianIdRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$7.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId($7.UpdateStationLocationByGuardianIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$updateStationLocationByGuardianId, request, options: options); } - $grpc.ResponseFuture<$6.GetStationListByBusIdResponse> getStationListByBusId($6.GetStationListByBusIdRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$7.GetStationListByBusIdResponse> getStationListByBusId($7.GetStationListByBusIdRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getStationListByBusId, request, options: options); } - $grpc.ResponseFuture<$6.GetCorrectOrderStationListByBusIdResponse> getCorrectOrderStationListByBusId($6.GetCorrectOrderStationListByBusIdRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$getCorrectOrderStationListByBusId, request, options: options); - } - - $grpc.ResponseFuture<$6.GetUnregisteredStationListResponse> getUnregisteredStationList($6.GetUnregisteredStationListRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$7.GetUnregisteredStationListResponse> getUnregisteredStationList($7.GetUnregisteredStationListRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$getUnregisteredStationList, request, options: options); } - $grpc.ResponseFuture<$6.UpdateStationResponse> updateStation($6.UpdateStationRequest request, {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$7.UpdateStationResponse> updateStation($7.UpdateStationRequest request, {$grpc.CallOptions? options}) { return $createUnaryCall(_$updateStation, request, options: options); } } @@ -74,66 +66,54 @@ abstract class StationServiceBase extends $grpc.Service { $core.String get $name => 'where_child_bus.v1.StationService'; StationServiceBase() { - $addMethod($grpc.ServiceMethod<$6.UpdateStationLocationByGuardianIdRequest, $6.UpdateStationLocationByGuardianIdResponse>( + $addMethod($grpc.ServiceMethod<$7.UpdateStationLocationByGuardianIdRequest, $7.UpdateStationLocationByGuardianIdResponse>( 'UpdateStationLocationByGuardianId', updateStationLocationByGuardianId_Pre, false, false, - ($core.List<$core.int> value) => $6.UpdateStationLocationByGuardianIdRequest.fromBuffer(value), - ($6.UpdateStationLocationByGuardianIdResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$6.GetStationListByBusIdRequest, $6.GetStationListByBusIdResponse>( + ($core.List<$core.int> value) => $7.UpdateStationLocationByGuardianIdRequest.fromBuffer(value), + ($7.UpdateStationLocationByGuardianIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$7.GetStationListByBusIdRequest, $7.GetStationListByBusIdResponse>( 'GetStationListByBusId', getStationListByBusId_Pre, false, false, - ($core.List<$core.int> value) => $6.GetStationListByBusIdRequest.fromBuffer(value), - ($6.GetStationListByBusIdResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$6.GetCorrectOrderStationListByBusIdRequest, $6.GetCorrectOrderStationListByBusIdResponse>( - 'GetCorrectOrderStationListByBusId', - getCorrectOrderStationListByBusId_Pre, - false, - false, - ($core.List<$core.int> value) => $6.GetCorrectOrderStationListByBusIdRequest.fromBuffer(value), - ($6.GetCorrectOrderStationListByBusIdResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$6.GetUnregisteredStationListRequest, $6.GetUnregisteredStationListResponse>( + ($core.List<$core.int> value) => $7.GetStationListByBusIdRequest.fromBuffer(value), + ($7.GetStationListByBusIdResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$7.GetUnregisteredStationListRequest, $7.GetUnregisteredStationListResponse>( 'GetUnregisteredStationList', getUnregisteredStationList_Pre, false, false, - ($core.List<$core.int> value) => $6.GetUnregisteredStationListRequest.fromBuffer(value), - ($6.GetUnregisteredStationListResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$6.UpdateStationRequest, $6.UpdateStationResponse>( + ($core.List<$core.int> value) => $7.GetUnregisteredStationListRequest.fromBuffer(value), + ($7.GetUnregisteredStationListResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$7.UpdateStationRequest, $7.UpdateStationResponse>( 'UpdateStation', updateStation_Pre, false, false, - ($core.List<$core.int> value) => $6.UpdateStationRequest.fromBuffer(value), - ($6.UpdateStationResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $7.UpdateStationRequest.fromBuffer(value), + ($7.UpdateStationResponse value) => value.writeToBuffer())); } - $async.Future<$6.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId_Pre($grpc.ServiceCall call, $async.Future<$6.UpdateStationLocationByGuardianIdRequest> request) async { + $async.Future<$7.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId_Pre($grpc.ServiceCall call, $async.Future<$7.UpdateStationLocationByGuardianIdRequest> request) async { return updateStationLocationByGuardianId(call, await request); } - $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId_Pre($grpc.ServiceCall call, $async.Future<$6.GetStationListByBusIdRequest> request) async { + $async.Future<$7.GetStationListByBusIdResponse> getStationListByBusId_Pre($grpc.ServiceCall call, $async.Future<$7.GetStationListByBusIdRequest> request) async { return getStationListByBusId(call, await request); } - $async.Future<$6.GetCorrectOrderStationListByBusIdResponse> getCorrectOrderStationListByBusId_Pre($grpc.ServiceCall call, $async.Future<$6.GetCorrectOrderStationListByBusIdRequest> request) async { - return getCorrectOrderStationListByBusId(call, await request); - } - - $async.Future<$6.GetUnregisteredStationListResponse> getUnregisteredStationList_Pre($grpc.ServiceCall call, $async.Future<$6.GetUnregisteredStationListRequest> request) async { + $async.Future<$7.GetUnregisteredStationListResponse> getUnregisteredStationList_Pre($grpc.ServiceCall call, $async.Future<$7.GetUnregisteredStationListRequest> request) async { return getUnregisteredStationList(call, await request); } - $async.Future<$6.UpdateStationResponse> updateStation_Pre($grpc.ServiceCall call, $async.Future<$6.UpdateStationRequest> request) async { + $async.Future<$7.UpdateStationResponse> updateStation_Pre($grpc.ServiceCall call, $async.Future<$7.UpdateStationRequest> request) async { return updateStation(call, await request); } - $async.Future<$6.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId($grpc.ServiceCall call, $6.UpdateStationLocationByGuardianIdRequest request); - $async.Future<$6.GetStationListByBusIdResponse> getStationListByBusId($grpc.ServiceCall call, $6.GetStationListByBusIdRequest request); - $async.Future<$6.GetCorrectOrderStationListByBusIdResponse> getCorrectOrderStationListByBusId($grpc.ServiceCall call, $6.GetCorrectOrderStationListByBusIdRequest request); - $async.Future<$6.GetUnregisteredStationListResponse> getUnregisteredStationList($grpc.ServiceCall call, $6.GetUnregisteredStationListRequest request); - $async.Future<$6.UpdateStationResponse> updateStation($grpc.ServiceCall call, $6.UpdateStationRequest request); + $async.Future<$7.UpdateStationLocationByGuardianIdResponse> updateStationLocationByGuardianId($grpc.ServiceCall call, $7.UpdateStationLocationByGuardianIdRequest request); + $async.Future<$7.GetStationListByBusIdResponse> getStationListByBusId($grpc.ServiceCall call, $7.GetStationListByBusIdRequest request); + $async.Future<$7.GetUnregisteredStationListResponse> getUnregisteredStationList($grpc.ServiceCall call, $7.GetUnregisteredStationListRequest request); + $async.Future<$7.UpdateStationResponse> updateStation($grpc.ServiceCall call, $7.UpdateStationRequest request); } diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index f310e5fe..33c9deae 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\xcc\x01\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x30\n\x14morning_guardian_ids\x18\x04 \x03(\tR\x12morningGuardianIds\x12\x30\n\x14\x65vening_guardian_ids\x18\x05 \x03(\tR\x12\x65veningGuardianIds\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xa5\x01\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x95\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12&\n\x0fnext_station_id\x18\x04 \x01(\tR\rnextStationId\"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xa9\x03\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1a\n\x08latitude\x18\x04 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x05 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x06 \x01(\x08R\x15\x65nableFaceRecognition\x12\x37\n\x18morning_first_station_id\x18\x07 \x01(\tR\x15morningFirstStationId\x12\x37\n\x18\x65vening_first_station_id\x18\x08 \x01(\tR\x15\x65veningFirstStationId\x12&\n\x0fnext_station_id\x18\t \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\n \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\x9b\x07\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"h\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xa5\x01\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x95\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12&\n\x0fnext_station_id\x18\x04 \x01(\tR\rnextStationId\"\x92\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xb7\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1a\n\x08latitude\x18\x04 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x05 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x06 \x01(\x08R\x15\x65nableFaceRecognition\x12&\n\x0fnext_station_id\x18\t \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\n \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\x9b\x07\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,38 +24,38 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATEBUSREQUEST']._serialized_start=123 - _globals['_CREATEBUSREQUEST']._serialized_end=327 - _globals['_CREATEBUSRESPONSE']._serialized_start=329 - _globals['_CREATEBUSRESPONSE']._serialized_end=391 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=393 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=454 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=456 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=534 - _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_start=536 - _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_end=603 - _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_start=605 - _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_end=683 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=686 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=851 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=853 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=921 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=923 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=1035 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=1037 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=1069 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=1071 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=1121 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=1124 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1273 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1276 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1581 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1583 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1695 - _globals['_UPDATEBUSREQUEST']._serialized_start=1698 - _globals['_UPDATEBUSREQUEST']._serialized_end=2123 - _globals['_UPDATEBUSRESPONSE']._serialized_start=2125 - _globals['_UPDATEBUSRESPONSE']._serialized_end=2187 - _globals['_BUSSERVICE']._serialized_start=2190 - _globals['_BUSSERVICE']._serialized_end=3113 + _globals['_CREATEBUSREQUEST']._serialized_start=122 + _globals['_CREATEBUSREQUEST']._serialized_end=226 + _globals['_CREATEBUSRESPONSE']._serialized_start=228 + _globals['_CREATEBUSRESPONSE']._serialized_end=290 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=292 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=353 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=355 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=433 + _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_start=435 + _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_end=502 + _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_start=504 + _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_end=582 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=585 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=750 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=752 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=820 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=822 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=934 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=936 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=968 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=970 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=1020 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=1023 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1172 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1175 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1449 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1451 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1563 + _globals['_UPDATEBUSREQUEST']._serialized_start=1566 + _globals['_UPDATEBUSREQUEST']._serialized_end=1877 + _globals['_UPDATEBUSRESPONSE']._serialized_start=1879 + _globals['_UPDATEBUSRESPONSE']._serialized_end=1941 + _globals['_BUSSERVICE']._serialized_start=1944 + _globals['_BUSSERVICE']._serialized_end=2867 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index 76aec3e8..d54ebec6 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -8,18 +8,14 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor class CreateBusRequest(_message.Message): - __slots__ = ("nursery_id", "name", "plate_number", "morning_guardian_ids", "evening_guardian_ids") + __slots__ = ("nursery_id", "name", "plate_number") NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] - MORNING_GUARDIAN_IDS_FIELD_NUMBER: _ClassVar[int] - EVENING_GUARDIAN_IDS_FIELD_NUMBER: _ClassVar[int] nursery_id: str name: str plate_number: str - morning_guardian_ids: _containers.RepeatedScalarFieldContainer[str] - evening_guardian_ids: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., morning_guardian_ids: _Optional[_Iterable[str]] = ..., evening_guardian_ids: _Optional[_Iterable[str]] = ...) -> None: ... + def __init__(self, nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ...) -> None: ... class CreateBusResponse(_message.Message): __slots__ = ("bus",) @@ -100,22 +96,20 @@ class TrackBusContinuousResponse(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., next_station_id: _Optional[str] = ...) -> None: ... class StreamBusVideoRequest(_message.Message): - __slots__ = ("bus_id", "nursery_id", "bus_type", "vehicle_event", "video_chunk", "photo_height", "photo_width") + __slots__ = ("bus_id", "bus_type", "vehicle_event", "video_chunk", "photo_height", "photo_width") BUS_ID_FIELD_NUMBER: _ClassVar[int] - NURSERY_ID_FIELD_NUMBER: _ClassVar[int] BUS_TYPE_FIELD_NUMBER: _ClassVar[int] VEHICLE_EVENT_FIELD_NUMBER: _ClassVar[int] VIDEO_CHUNK_FIELD_NUMBER: _ClassVar[int] PHOTO_HEIGHT_FIELD_NUMBER: _ClassVar[int] PHOTO_WIDTH_FIELD_NUMBER: _ClassVar[int] bus_id: str - nursery_id: str bus_type: _resources_pb2.BusType vehicle_event: _resources_pb2.VehicleEvent video_chunk: _containers.RepeatedScalarFieldContainer[bytes] photo_height: int photo_width: int - def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[_Iterable[bytes]] = ..., photo_height: _Optional[int] = ..., photo_width: _Optional[int] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[_Iterable[bytes]] = ..., photo_height: _Optional[int] = ..., photo_width: _Optional[int] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = ("is_detected", "children") @@ -126,15 +120,13 @@ class StreamBusVideoResponse(_message.Message): def __init__(self, is_detected: bool = ..., children: _Optional[_Iterable[_Union[_resources_pb2.Child, _Mapping]]] = ...) -> None: ... class UpdateBusRequest(_message.Message): - __slots__ = ("bus_id", "name", "plate_number", "latitude", "longitude", "enable_face_recognition", "morning_first_station_id", "evening_first_station_id", "next_station_id", "update_mask") + __slots__ = ("bus_id", "name", "plate_number", "latitude", "longitude", "enable_face_recognition", "next_station_id", "update_mask") BUS_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] PLATE_NUMBER_FIELD_NUMBER: _ClassVar[int] LATITUDE_FIELD_NUMBER: _ClassVar[int] LONGITUDE_FIELD_NUMBER: _ClassVar[int] ENABLE_FACE_RECOGNITION_FIELD_NUMBER: _ClassVar[int] - MORNING_FIRST_STATION_ID_FIELD_NUMBER: _ClassVar[int] - EVENING_FIRST_STATION_ID_FIELD_NUMBER: _ClassVar[int] NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] UPDATE_MASK_FIELD_NUMBER: _ClassVar[int] bus_id: str @@ -143,11 +135,9 @@ class UpdateBusRequest(_message.Message): latitude: float longitude: float enable_face_recognition: bool - morning_first_station_id: str - evening_first_station_id: str next_station_id: str update_mask: _field_mask_pb2.FieldMask - def __init__(self, bus_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., morning_first_station_id: _Optional[str] = ..., evening_first_station_id: _Optional[str] = ..., next_station_id: _Optional[str] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., next_station_id: _Optional[str] = ..., update_mask: _Optional[_Union[_field_mask_pb2.FieldMask, _Mapping]] = ...) -> None: ... class UpdateBusResponse(_message.Message): __slots__ = ("bus",) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.py new file mode 100644 index 00000000..2fa6db9e --- /dev/null +++ b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: where_child_bus/v1/bus_route.proto +# Protobuf Python Version: 4.25.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/bus_route.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\x89\x01\n\x15\x43reateBusRouteRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12!\n\x0cguardian_ids\x18\x03 \x03(\tR\x0bguardianIds\"S\n\x16\x43reateBusRouteResponse\x12\x39\n\tbus_route\x18\x01 \x01(\x0b\x32\x1c.where_child_bus.v1.BusRouteR\x08\x62usRoute\"c\n\x12GetBusRouteRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"P\n\x13GetBusRouteResponse\x12\x39\n\tbus_route\x18\x01 \x01(\x0b\x32\x1c.where_child_bus.v1.BusRouteR\x08\x62usRoute2\xda\x01\n\x0f\x42usRouteService\x12g\n\x0e\x43reateBusRoute\x12).where_child_bus.v1.CreateBusRouteRequest\x1a*.where_child_bus.v1.CreateBusRouteResponse\x12^\n\x0bGetBusRoute\x12&.where_child_bus.v1.GetBusRouteRequest\x1a\'.where_child_bus.v1.GetBusRouteResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rBusRouteProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.bus_route_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\rBusRouteProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_CREATEBUSROUTEREQUEST']._serialized_start=95 + _globals['_CREATEBUSROUTEREQUEST']._serialized_end=232 + _globals['_CREATEBUSROUTERESPONSE']._serialized_start=234 + _globals['_CREATEBUSROUTERESPONSE']._serialized_end=317 + _globals['_GETBUSROUTEREQUEST']._serialized_start=319 + _globals['_GETBUSROUTEREQUEST']._serialized_end=418 + _globals['_GETBUSROUTERESPONSE']._serialized_start=420 + _globals['_GETBUSROUTERESPONSE']._serialized_end=500 + _globals['_BUSROUTESERVICE']._serialized_start=503 + _globals['_BUSROUTESERVICE']._serialized_end=721 +# @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.pyi new file mode 100644 index 00000000..98f9a551 --- /dev/null +++ b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.pyi @@ -0,0 +1,37 @@ +from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CreateBusRouteRequest(_message.Message): + __slots__ = ("bus_id", "bus_type", "guardian_ids") + BUS_ID_FIELD_NUMBER: _ClassVar[int] + BUS_TYPE_FIELD_NUMBER: _ClassVar[int] + GUARDIAN_IDS_FIELD_NUMBER: _ClassVar[int] + bus_id: str + bus_type: _resources_pb2.BusType + guardian_ids: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., guardian_ids: _Optional[_Iterable[str]] = ...) -> None: ... + +class CreateBusRouteResponse(_message.Message): + __slots__ = ("bus_route",) + BUS_ROUTE_FIELD_NUMBER: _ClassVar[int] + bus_route: _resources_pb2.BusRoute + def __init__(self, bus_route: _Optional[_Union[_resources_pb2.BusRoute, _Mapping]] = ...) -> None: ... + +class GetBusRouteRequest(_message.Message): + __slots__ = ("bus_id", "bus_type") + BUS_ID_FIELD_NUMBER: _ClassVar[int] + BUS_TYPE_FIELD_NUMBER: _ClassVar[int] + bus_id: str + bus_type: _resources_pb2.BusType + def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ...) -> None: ... + +class GetBusRouteResponse(_message.Message): + __slots__ = ("bus_route",) + BUS_ROUTE_FIELD_NUMBER: _ClassVar[int] + bus_route: _resources_pb2.BusRoute + def __init__(self, bus_route: _Optional[_Union[_resources_pb2.BusRoute, _Mapping]] = ...) -> None: ... diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2_grpc.py new file mode 100644 index 00000000..5a9f0eed --- /dev/null +++ b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from where_child_bus.v1 import bus_route_pb2 as where__child__bus_dot_v1_dot_bus__route__pb2 + + +class BusRouteServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateBusRoute = channel.unary_unary( + '/where_child_bus.v1.BusRouteService/CreateBusRoute', + request_serializer=where__child__bus_dot_v1_dot_bus__route__pb2.CreateBusRouteRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__route__pb2.CreateBusRouteResponse.FromString, + ) + self.GetBusRoute = channel.unary_unary( + '/where_child_bus.v1.BusRouteService/GetBusRoute', + request_serializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteResponse.FromString, + ) + + +class BusRouteServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreateBusRoute(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetBusRoute(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BusRouteServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateBusRoute': grpc.unary_unary_rpc_method_handler( + servicer.CreateBusRoute, + request_deserializer=where__child__bus_dot_v1_dot_bus__route__pb2.CreateBusRouteRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__route__pb2.CreateBusRouteResponse.SerializeToString, + ), + 'GetBusRoute': grpc.unary_unary_rpc_method_handler( + servicer.GetBusRoute, + request_deserializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'where_child_bus.v1.BusRouteService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class BusRouteService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreateBusRoute(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusRouteService/CreateBusRoute', + where__child__bus_dot_v1_dot_bus__route__pb2.CreateBusRouteRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__route__pb2.CreateBusRouteResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetBusRoute(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusRouteService/GetBusRoute', + where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py index ffc7ebc8..1104de03 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\":\n!GetUnregisteredStationListRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa1\x01\n\"GetUnregisteredStationListResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"y\n(GetCorrectOrderStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"f\n)GetCorrectOrderStationListByBusIdResponse\x12\x39\n\tbus_route\x18\x01 \x01(\x0b\x32\x1c.where_child_bus.v1.BusRouteR\x08\x62usRoute\"\xb4\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\xc8\x05\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\xa0\x01\n!GetCorrectOrderStationListByBusId\x12<.where_child_bus.v1.GetCorrectOrderStationListByBusIdRequest\x1a=.where_child_bus.v1.GetCorrectOrderStationListByBusIdResponse\x12\x8b\x01\n\x1aGetUnregisteredStationList\x12\x35.where_child_bus.v1.GetUnregisteredStationListRequest\x1a\x36.where_child_bus.v1.GetUnregisteredStationListResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n where_child_bus/v1/station.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"\x85\x01\n(UpdateStationLocationByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\x12\x1c\n\tlongitude\x18\x02 \x01(\x01R\tlongitude\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\"b\n)UpdateStationLocationByGuardianIdResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station\"5\n\x1cGetStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x8b\x02\n\x1dGetStationListByBusIdResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\x12\x35\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\x12\x36\n\x06photos\x18\x04 \x03(\x0b\x32\x1e.where_child_bus.v1.ChildPhotoR\x06photos\":\n!GetUnregisteredStationListRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\xa1\x01\n\"GetUnregisteredStationListResponse\x12\x37\n\x08stations\x18\x01 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x08stations\x12\x42\n\tguardians\x18\x02 \x03(\x0b\x32$.where_child_bus.v1.GuardianResponseR\tguardians\"y\n(GetCorrectOrderStationListByBusIdRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"f\n)GetCorrectOrderStationListByBusIdResponse\x12\x39\n\tbus_route\x18\x01 \x01(\x0b\x32\x1c.where_child_bus.v1.BusRouteR\x08\x62usRoute\"\xb4\x01\n\x14UpdateStationRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x03 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x04 \x01(\x01R\tlongitude\x12;\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\"N\n\x15UpdateStationResponse\x12\x35\n\x07station\x18\x01 \x01(\x0b\x32\x1b.where_child_bus.v1.StationR\x07station2\xa5\x04\n\x0eStationService\x12\xa0\x01\n!UpdateStationLocationByGuardianId\x12<.where_child_bus.v1.UpdateStationLocationByGuardianIdRequest\x1a=.where_child_bus.v1.UpdateStationLocationByGuardianIdResponse\x12|\n\x15GetStationListByBusId\x12\x30.where_child_bus.v1.GetStationListByBusIdRequest\x1a\x31.where_child_bus.v1.GetStationListByBusIdResponse\x12\x8b\x01\n\x1aGetUnregisteredStationList\x12\x35.where_child_bus.v1.GetUnregisteredStationListRequest\x1a\x36.where_child_bus.v1.GetUnregisteredStationListResponse\x12\x64\n\rUpdateStation\x12(.where_child_bus.v1.UpdateStationRequest\x1a).where_child_bus.v1.UpdateStationResponseB\xef\x01\n\x16\x63om.where_child_bus.v1B\x0cStationProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -45,5 +45,5 @@ _globals['_UPDATESTATIONRESPONSE']._serialized_start=1321 _globals['_UPDATESTATIONRESPONSE']._serialized_end=1399 _globals['_STATIONSERVICE']._serialized_start=1402 - _globals['_STATIONSERVICE']._serialized_end=2114 + _globals['_STATIONSERVICE']._serialized_end=1951 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py index dea23215..236c8e8d 100644 --- a/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/station_pb2_grpc.py @@ -24,11 +24,6 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.FromString, ) - self.GetCorrectOrderStationListByBusId = channel.unary_unary( - '/where_child_bus.v1.StationService/GetCorrectOrderStationListByBusId', - request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdResponse.FromString, - ) self.GetUnregisteredStationList = channel.unary_unary( '/where_child_bus.v1.StationService/GetUnregisteredStationList', request_serializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.SerializeToString, @@ -56,12 +51,6 @@ def GetStationListByBusId(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def GetCorrectOrderStationListByBusId(self, request, context): - """Missing associated documentation comment in .proto file.""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def GetUnregisteredStationList(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -87,11 +76,6 @@ def add_StationServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_station__pb2.GetStationListByBusIdResponse.SerializeToString, ), - 'GetCorrectOrderStationListByBusId': grpc.unary_unary_rpc_method_handler( - servicer.GetCorrectOrderStationListByBusId, - request_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdResponse.SerializeToString, - ), 'GetUnregisteredStationList': grpc.unary_unary_rpc_method_handler( servicer.GetUnregisteredStationList, request_deserializer=where__child__bus_dot_v1_dot_station__pb2.GetUnregisteredStationListRequest.FromString, @@ -146,23 +130,6 @@ def GetStationListByBusId(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - @staticmethod - def GetCorrectOrderStationListByBusId(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.StationService/GetCorrectOrderStationListByBusId', - where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdRequest.SerializeToString, - where__child__bus_dot_v1_dot_station__pb2.GetCorrectOrderStationListByBusIdResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - @staticmethod def GetUnregisteredStationList(request, target, diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index ceac322a..ababf574 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -21,8 +21,6 @@ message CreateBusRequest { string nursery_id = 1; string name = 2; string plate_number = 3; - repeated string morning_guardian_ids = 4; - repeated string evening_guardian_ids = 5; } message CreateBusResponse { @@ -79,7 +77,6 @@ message TrackBusContinuousResponse { message StreamBusVideoRequest { string bus_id = 1; - string nursery_id = 2; BusType bus_type = 3; VehicleEvent vehicle_event = 4; repeated bytes video_chunk = 5; // Chunk of video data @@ -99,8 +96,6 @@ message UpdateBusRequest { double latitude = 4; double longitude = 5; bool enable_face_recognition = 6; - string morning_first_station_id = 7; - string evening_first_station_id = 8; string next_station_id = 9; google.protobuf.FieldMask update_mask = 10; } diff --git a/proto/where_child_bus/v1/bus_route.proto b/proto/where_child_bus/v1/bus_route.proto new file mode 100644 index 00000000..051371b7 --- /dev/null +++ b/proto/where_child_bus/v1/bus_route.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package where_child_bus.v1; + +import "where_child_bus/v1/resources.proto"; + +service BusRouteService { + rpc CreateBusRoute(CreateBusRouteRequest) returns (CreateBusRouteResponse ); + rpc GetBusRoute(GetBusRouteRequest) returns (GetBusRouteResponse); +} + +message CreateBusRouteRequest { + string bus_id = 1; + BusType bus_type = 2; + repeated string guardian_ids = 3; +} + +message CreateBusRouteResponse { + BusRoute bus_route = 1; +} + +message GetBusRouteRequest { + string bus_id = 1; + BusType bus_type = 2; +} + +message GetBusRouteResponse { + BusRoute bus_route = 1; +} \ No newline at end of file diff --git a/proto/where_child_bus/v1/station.proto b/proto/where_child_bus/v1/station.proto index 8f477715..109ece91 100644 --- a/proto/where_child_bus/v1/station.proto +++ b/proto/where_child_bus/v1/station.proto @@ -8,7 +8,6 @@ import "google/protobuf/field_mask.proto"; service StationService { rpc UpdateStationLocationByGuardianId(UpdateStationLocationByGuardianIdRequest) returns (UpdateStationLocationByGuardianIdResponse); rpc GetStationListByBusId(GetStationListByBusIdRequest) returns (GetStationListByBusIdResponse); - rpc GetCorrectOrderStationListByBusId(GetCorrectOrderStationListByBusIdRequest) returns (GetCorrectOrderStationListByBusIdResponse); rpc GetUnregisteredStationList(GetUnregisteredStationListRequest) returns (GetUnregisteredStationListResponse); rpc UpdateStation(UpdateStationRequest) returns (UpdateStationResponse); } From 1f66f99350699cf265180849f8518befa161e98c Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 22 Feb 2024 12:53:47 +0900 Subject: [PATCH 637/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9usecase?= =?UTF-8?q?=E3=82=92=E5=85=88=E3=81=AE=E5=A4=89=E6=9B=B4=E3=81=AB=E5=90=88?= =?UTF-8?q?=E3=82=8F=E3=81=9B=E3=81=A6=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 239 +++--------------------------------- 1 file changed, 15 insertions(+), 224 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index aec5ee09..5dde9acb 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -17,10 +17,8 @@ import ( boardingrecordRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" - childbusassociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" - stationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" mlv1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1" ) @@ -47,20 +45,6 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* return nil, err } defer utils.RollbackTx(tx, i.logger) - - morningFirstStation, err := tx.Station.Query(). - Where(stationRepo.HasGuardianWith(guardianRepo.ID(uuid.MustParse(req.MorningGuardianIds[0])))). - Only(ctx) - - if err != nil { - i.logger.Error("failed to get morning first station", "error", err) - return nil, err - } - - eveningFirstStation, err := tx.Station.Query(). - Where(stationRepo.HasGuardianWith(guardianRepo.ID(uuid.MustParse(req.EveningGuardianIds[0])))). - Only(ctx) - if err != nil { i.logger.Error("failed to get evening first station", "error", err) return nil, err @@ -69,8 +53,6 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* SetNurseryID(nurseryID). SetName(req.Name). SetPlateNumber(req.PlateNumber). - SetMorningFirstStation(morningFirstStation). - SetEveningFirstStation(eveningFirstStation). Save(ctx) if err != nil { @@ -90,8 +72,6 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* Where(busRepo.IDEQ(bus.ID)). WithNursery(). WithNextStation(). - WithMorningFirstStation(). - WithEveningFirstStation(). Only(ctx) if err != nil { @@ -99,102 +79,7 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* return nil, err } - err = setNextStation(*i.logger, ctx, tx, req.MorningGuardianIds, func(updateOp *ent.StationUpdateOne, nextStation *ent.Station) *ent.StationUpdateOne { - return updateOp.AddMorningNextStation(nextStation) - }) - if err != nil { - return nil, err // 朝のステーション設定中にエラーが発生しました - } - - err = setNextStation(*i.logger, ctx, tx, req.EveningGuardianIds, func(updateOp *ent.StationUpdateOne, nextStation *ent.Station) *ent.StationUpdateOne { - return updateOp.AddEveningNextStation(nextStation) - }) - if err != nil { - return nil, err // 夕方のステーション設定中にエラーが発生しました - } - // 以下のコードはリファクタリング後のメインの処理フローです。 - - morningGuardianIDs, err := parseGuardianIDs(*i.logger, req.MorningGuardianIds) - if err != nil { - return nil, err // エラーハンドリングは簡潔に - } - - eveningGuardianIDs, err := parseGuardianIDs(*i.logger, req.EveningGuardianIds) - if err != nil { - return nil, err // エラーハンドリングは簡潔に - } - - // ステーションの取得処理は変更なし - stations, err := tx.Station.Query(). - Where(stationRepo.HasGuardianWith(guardianRepo.IDIn(morningGuardianIDs...))). - Where(stationRepo.HasGuardianWith(guardianRepo.IDIn(eveningGuardianIDs...))). - All(ctx) - if err != nil { - i.logger.Error("failed to get stations", "error", err) - return nil, err - } - - // 子供たちの処理を関数を用いて簡潔に - morningChildren := tx.Child.Query(). - Where(childRepo.HasGuardianWith(guardianRepo.IDIn(morningGuardianIDs...))).AllX(ctx) - if err := createChildBusAssociations(*i.logger, ctx, tx, morningChildren, bus, childbusassociationRepo.BusTypeMorning); err != nil { - return nil, err - } - - eveningChildren := tx.Child.Query(). - Where(childRepo.HasGuardianWith(guardianRepo.IDIn(eveningGuardianIDs...))).AllX(ctx) - if err := createChildBusAssociations(*i.logger, ctx, tx, eveningChildren, bus, childbusassociationRepo.BusTypeEvening); err != nil { - return nil, err - } - - // ステーションの更新処理は変更なし - for _, station := range stations { - _, err = tx.Bus.UpdateOne(bus). - AddStations(station). - Save(ctx) - if err != nil { - i.logger.Error("failed to update bus with stations", err) - return nil, err - } - } - - morningChildIds := make([]string, len(morningChildren)) - for i, child := range morningChildren { - morningChildIds[i] = child.ID.String() - } - - resp, err := i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ - BusId: bus.ID.String(), - BusType: pb.BusType_BUS_TYPE_MORNING, - ChildIds: morningChildIds, - }) - - if err != nil || !resp.IsStarted { - i.logger.Error("failed to train ML model", err) - return nil, err - } - - eveningChildIds := make([]string, len(eveningChildren)) - for i, child := range eveningChildren { - eveningChildIds[i] = child.ID.String() - } - - resp, err = i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ - BusId: bus.ID.String(), - BusType: pb.BusType_BUS_TYPE_EVENING, - ChildIds: eveningChildIds, - }) - - if err != nil || !resp.IsStarted { - i.logger.Error("failed to train ML model", err) - return nil, err - } - - nextStationID, morningFirstStationID, eveningFirstStaionID, err := getStationIDs(i.logger, ctx, bus) - if err != nil { - i.logger.Error("failed to get station IDs", "error", err) - return nil, err - } + nextStationID, err := getStationIDs(i.logger, ctx, bus) if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) @@ -202,7 +87,7 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* } return &pb.CreateBusResponse{ - Bus: utils.ToPbBus(bus, nextStationID, morningFirstStationID, eveningFirstStaionID), + Bus: utils.ToPbBus(bus, nextStationID), }, nil } @@ -217,8 +102,6 @@ func (i *Interactor) GetBusListByNurseryID(ctx context.Context, req *pb.GetBusLi return tx.Bus.Query(). Where(busRepo.HasNurseryWith(nurseryRepo.IDEQ(nurseryID))). WithNextStation(). - WithMorningFirstStation(). - WithEveningFirstStation(). WithNursery(), nil }) @@ -242,8 +125,6 @@ func (i *Interactor) GetRunningBusByGuardianID(ctx context.Context, req *pb.GetR Where(busRepo.StatusEQ(busRepo.StatusRunning)). WithNursery(). WithNextStation(). - WithMorningFirstStation(). - WithEveningFirstStation(). Only(ctx) if err != nil { @@ -251,13 +132,13 @@ func (i *Interactor) GetRunningBusByGuardianID(ctx context.Context, req *pb.GetR return nil, err } - nextStationID, morningFirstStationID, eveningFirstStaionID, err := getStationIDs(i.logger, ctx, bus) + nextStationID, err := getStationIDs(i.logger, ctx, bus) if err != nil { i.logger.Error("failed to get station IDs", "error", err) return nil, err } - return &pb.GetRunningBusByGuardianIdResponse{Bus: utils.ToPbBus(bus, nextStationID, morningFirstStationID, eveningFirstStaionID)}, nil + return &pb.GetRunningBusByGuardianIdResponse{Bus: utils.ToPbBus(bus, nextStationID)}, nil } func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatusRequest) (*pb.ChangeBusStatusResponse, error) { @@ -280,8 +161,6 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu } bus, err := tx.Bus.Query().Where(busRepo.IDEQ(busID)). - WithMorningFirstStation(). - WithEveningFirstStation(). WithNursery(). Only(ctx) @@ -291,6 +170,7 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu } + // TODO :後で関数化 update := tx.Bus.UpdateOneID(busID) // バスを停止に変更する場合、次のステーションをクリア switch req.BusStatus { @@ -325,12 +205,10 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu } // Nurseryエッジを持つBusを取得 - bus, err = i.entClient.Bus.Query(). + bus, err = tx.Bus.Query(). Where(busRepo.IDEQ(bus.ID)). WithNursery(). WithNextStation(). - WithMorningFirstStation(). - WithEveningFirstStation(). Only(ctx) if err != nil { @@ -338,7 +216,7 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu return nil, err } - nextStationID, morningFirstStationID, eveningFirstStaionID, err := getStationIDs(i.logger, ctx, bus) + nextStationID, err := getStationIDs(i.logger, ctx, bus) if err != nil { i.logger.Error("failed to get station IDs", "error", err) return nil, err @@ -348,7 +226,7 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu i.logger.Error("failed to commit transaction", "error", err) return nil, err } - return &pb.ChangeBusStatusResponse{Bus: utils.ToPbBus(bus, nextStationID, morningFirstStationID, eveningFirstStaionID)}, nil + return &pb.ChangeBusStatusResponse{Bus: utils.ToPbBus(bus, nextStationID)}, nil } func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (*pb.UpdateBusResponse, error) { @@ -402,9 +280,6 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* updatedBus, err := tx.Bus.Query().Where(busRepo.IDEQ(busID)). WithNursery(). - WithNextStation(). - WithMorningFirstStation(). - WithEveningFirstStation(). Only(ctx) if err != nil { @@ -422,16 +297,13 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* // 更新されたバスを取得 updatedBus, err = tx.Bus.Query().Where(busRepo.ID(busID)). WithNursery(). - WithNextStation(). - WithMorningFirstStation(). - WithEveningFirstStation(). Only(ctx) if err != nil { i.logger.Error("failed to retrieve updated bus", "error", err) } - nextStationID, morningFirstStationID, eveningFirstStaionID, err := getStationIDs(i.logger, ctx, updatedBus) + nextStationID, err := getStationIDs(i.logger, ctx, updatedBus) if err != nil { i.logger.Error("failed to get station IDs", "error", err) @@ -446,7 +318,7 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* // レスポンスの生成と返却 return &pb.UpdateBusResponse{ - Bus: utils.ToPbBus(updatedBus, nextStationID, morningFirstStationID, eveningFirstStaionID), + Bus: utils.ToPbBus(updatedBus, nextStationID), }, nil } @@ -494,9 +366,6 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea bus, err := i.entClient.Bus.Query(). Where(busRepo.IDEQ(busID)). WithNursery(). - WithNextStation(). - WithMorningFirstStation(). - WithEveningFirstStation(). Only(context.Background()) if err != nil { @@ -712,12 +581,12 @@ func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*e pbBuses := make([]*pb.Bus, len(entBuses)) for index, b := range entBuses { - nextStationID, morningFirstStationID, eveningFirstStaionID, err := getStationIDs(i.logger, ctx, b) // !なんか違う気がする + nextStationID, err := getStationIDs(i.logger, ctx, b) if err != nil { i.logger.Error("failed to get station IDs", "error", err) return nil, err } - pbBuses[index] = utils.ToPbBus(b, nextStationID, morningFirstStationID, eveningFirstStaionID) + pbBuses[index] = utils.ToPbBus(b, nextStationID) } if err := tx.Commit(); err != nil { @@ -742,93 +611,15 @@ func parseGuardianIDs(logger slog.Logger, ids []string) ([]uuid.UUID, error) { return parsedIDs, nil } -// createChildBusAssociations は、指定された子供たちに対してBusChildAssociationを作成します。 -func createChildBusAssociations(logger slog.Logger, ctx context.Context, tx *ent.Tx, children []*ent.Child, bus *ent.Bus, busType childbusassociationRepo.BusType) error { - for _, child := range children { - _, err := tx.ChildBusAssociation.Create(). - SetChild(child). - SetBus(bus). - SetBusType(busType). - Save(ctx) // ctxを関数の引数から渡す - if err != nil { - logger.Error("failed to create bus child association", "error", err) - return err - } - } - return nil -} - -func setNextStation(logger slog.Logger, ctx context.Context, tx *ent.Tx, guardianIDs []string, setNextStationFunc func(*ent.StationUpdateOne, *ent.Station) *ent.StationUpdateOne) error { - for index, guardianID := range guardianIDs { - guardianIDParsed, err := uuid.Parse(guardianID) - if err != nil { - logger.Error("failed to parse guardian ID", "error", err) - return err - } - - currentStation, err := tx.Station.Query(). - Where(stationRepo.HasGuardianWith(guardianRepo.IDEQ(guardianIDParsed))). - Only(ctx) - if err != nil { - logger.Error("failed to find station for guardian ID", "error", err) - return err - } - - if index < len(guardianIDs)-1 { - nextGuardianID := guardianIDs[index+1] - nextGuardianIDParsed, err := uuid.Parse(nextGuardianID) - if err != nil { - logger.Error("failed to parse next guardian ID", "error", err) - return err - } - - nextStation, err := tx.Station.Query(). - Where(stationRepo.HasGuardianWith(guardianRepo.IDEQ(nextGuardianIDParsed))). - Only(ctx) - if err != nil { - logger.Error("failed to find next station for guardian ID", "error", err) - return err - } - - err = setNextStationFunc(tx.Station.UpdateOne(currentStation), nextStation).Exec(ctx) - if err != nil { - logger.Error("failed to set next station for station ID", "error", err) - return err - } - } - } - return nil -} - -func getStationIDs(logger *slog.Logger, ctx context.Context, bus *ent.Bus) (nextStationId, morningFirstStationId, eveningFirstStationId string, err error) { +func getStationIDs(logger *slog.Logger, ctx context.Context, bus *ent.Bus) (nextStationId string, err error) { nextStation, err := bus.QueryNextStation().Only(ctx) if err != nil && !ent.IsNotFound(err) { logger.Error("failed to query next station", "error", err) - return "", "", "", err + return "", err } if nextStation != nil { nextStationId = nextStation.ID.String() } - morningFirstStation, err := bus.QueryMorningFirstStation().Only(ctx) - if err != nil && !ent.IsNotFound(err) { - logger.Error("failed to query morning first station", "error", err) - return "", "", "", err - } - - if morningFirstStation != nil { - morningFirstStationId = morningFirstStation.ID.String() - } - - eveningFirstStation, err := bus.QueryEveningFirstStation().Only(ctx) - if err != nil && !ent.IsNotFound(err) { - logger.Error("failed to query evening first station", "error", err) - return "", "", "", err - } - - if eveningFirstStation != nil { - eveningFirstStationId = eveningFirstStation.ID.String() - } - - return nextStationId, morningFirstStationId, eveningFirstStationId, nil + return nextStationId, nil } From cac8ba8177cd943fbe47b911a0d22a34f4233279 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 22 Feb 2024 13:46:17 +0900 Subject: [PATCH 638/771] =?UTF-8?q?feat:=20=E6=9C=80=E6=96=B0=E3=81=AE?= =?UTF-8?q?=E3=83=90=E3=82=B9=E3=83=AB=E3=83=BC=E3=83=88=E3=82=92=E4=BF=9D?= =?UTF-8?q?=E6=8C=81=E3=81=99=E3=82=8B=E3=82=A8=E3=83=83=E3=82=B8=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/domain/repository/ent/bus.go | 71 ++- backend/domain/repository/ent/bus/bus.go | 48 ++ backend/domain/repository/ent/bus/where.go | 46 ++ backend/domain/repository/ent/bus_create.go | 72 +++ backend/domain/repository/ent/bus_query.go | 188 ++++++- backend/domain/repository/ent/bus_update.go | 216 ++++++++ backend/domain/repository/ent/busroute.go | 59 ++- .../repository/ent/busroute/busroute.go | 83 ++++ .../domain/repository/ent/busroute/where.go | 138 ++++++ .../domain/repository/ent/busroute_create.go | 113 +++++ .../domain/repository/ent/busroute_query.go | 150 +++++- .../domain/repository/ent/busroute_update.go | 395 +++++++++++++++ backend/domain/repository/ent/client.go | 64 +++ .../domain/repository/ent/migrate/schema.go | 18 + backend/domain/repository/ent/mutation.go | 460 ++++++++++++++++-- backend/domain/repository/ent/runtime.go | 10 + backend/domain/repository/ent/schema/bus.go | 4 + .../domain/repository/ent/schema/bus_route.go | 10 + 18 files changed, 2084 insertions(+), 61 deletions(-) diff --git a/backend/domain/repository/ent/bus.go b/backend/domain/repository/ent/bus.go index db3190f4..f9a9be1b 100644 --- a/backend/domain/repository/ent/bus.go +++ b/backend/domain/repository/ent/bus.go @@ -10,6 +10,7 @@ import ( "entgo.io/ent" "entgo.io/ent/dialect/sql" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" "github.com/google/uuid" @@ -38,10 +39,12 @@ type Bus struct { UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BusQuery when eager-loading is set. - Edges BusEdges `json:"edges"` - bus_nursery *uuid.UUID - bus_next_station *uuid.UUID - selectValues sql.SelectValues + Edges BusEdges `json:"edges"` + bus_nursery *uuid.UUID + bus_next_station *uuid.UUID + bus_latest_morning_route *uuid.UUID + bus_latest_evening_route *uuid.UUID + selectValues sql.SelectValues } // BusEdges holds the relations/edges for other nodes in the graph. @@ -54,9 +57,13 @@ type BusEdges struct { NextStation *Station `json:"next_station,omitempty"` // BusRoute holds the value of the bus_route edge. BusRoute []*BusRoute `json:"bus_route,omitempty"` + // LatestMorningRoute holds the value of the latest_morning_route edge. + LatestMorningRoute *BusRoute `json:"latest_morning_route,omitempty"` + // LatestEveningRoute holds the value of the latest_evening_route edge. + LatestEveningRoute *BusRoute `json:"latest_evening_route,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. - loadedTypes [4]bool + loadedTypes [6]bool } // NurseryOrErr returns the Nursery value or an error if the edge @@ -103,6 +110,32 @@ func (e BusEdges) BusRouteOrErr() ([]*BusRoute, error) { return nil, &NotLoadedError{edge: "bus_route"} } +// LatestMorningRouteOrErr returns the LatestMorningRoute value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BusEdges) LatestMorningRouteOrErr() (*BusRoute, error) { + if e.loadedTypes[4] { + if e.LatestMorningRoute == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: busroute.Label} + } + return e.LatestMorningRoute, nil + } + return nil, &NotLoadedError{edge: "latest_morning_route"} +} + +// LatestEveningRouteOrErr returns the LatestEveningRoute value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BusEdges) LatestEveningRouteOrErr() (*BusRoute, error) { + if e.loadedTypes[5] { + if e.LatestEveningRoute == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: busroute.Label} + } + return e.LatestEveningRoute, nil + } + return nil, &NotLoadedError{edge: "latest_evening_route"} +} + // scanValues returns the types for scanning values from sql.Rows. func (*Bus) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) @@ -122,6 +155,10 @@ func (*Bus) scanValues(columns []string) ([]any, error) { values[i] = &sql.NullScanner{S: new(uuid.UUID)} case bus.ForeignKeys[1]: // bus_next_station values[i] = &sql.NullScanner{S: new(uuid.UUID)} + case bus.ForeignKeys[2]: // bus_latest_morning_route + values[i] = &sql.NullScanner{S: new(uuid.UUID)} + case bus.ForeignKeys[3]: // bus_latest_evening_route + values[i] = &sql.NullScanner{S: new(uuid.UUID)} default: values[i] = new(sql.UnknownType) } @@ -205,6 +242,20 @@ func (b *Bus) assignValues(columns []string, values []any) error { b.bus_next_station = new(uuid.UUID) *b.bus_next_station = *value.S.(*uuid.UUID) } + case bus.ForeignKeys[2]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field bus_latest_morning_route", values[i]) + } else if value.Valid { + b.bus_latest_morning_route = new(uuid.UUID) + *b.bus_latest_morning_route = *value.S.(*uuid.UUID) + } + case bus.ForeignKeys[3]: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field bus_latest_evening_route", values[i]) + } else if value.Valid { + b.bus_latest_evening_route = new(uuid.UUID) + *b.bus_latest_evening_route = *value.S.(*uuid.UUID) + } default: b.selectValues.Set(columns[i], values[i]) } @@ -238,6 +289,16 @@ func (b *Bus) QueryBusRoute() *BusRouteQuery { return NewBusClient(b.config).QueryBusRoute(b) } +// QueryLatestMorningRoute queries the "latest_morning_route" edge of the Bus entity. +func (b *Bus) QueryLatestMorningRoute() *BusRouteQuery { + return NewBusClient(b.config).QueryLatestMorningRoute(b) +} + +// QueryLatestEveningRoute queries the "latest_evening_route" edge of the Bus entity. +func (b *Bus) QueryLatestEveningRoute() *BusRouteQuery { + return NewBusClient(b.config).QueryLatestEveningRoute(b) +} + // Update returns a builder for updating this Bus. // Note that you need to call Bus.Unwrap() before calling this method if this Bus // was returned from a transaction, and the transaction was committed or rolled back. diff --git a/backend/domain/repository/ent/bus/bus.go b/backend/domain/repository/ent/bus/bus.go index 359038b2..6a3d13b5 100644 --- a/backend/domain/repository/ent/bus/bus.go +++ b/backend/domain/repository/ent/bus/bus.go @@ -40,6 +40,10 @@ const ( EdgeNextStation = "next_station" // EdgeBusRoute holds the string denoting the bus_route edge name in mutations. EdgeBusRoute = "bus_route" + // EdgeLatestMorningRoute holds the string denoting the latest_morning_route edge name in mutations. + EdgeLatestMorningRoute = "latest_morning_route" + // EdgeLatestEveningRoute holds the string denoting the latest_evening_route edge name in mutations. + EdgeLatestEveningRoute = "latest_evening_route" // Table holds the table name of the bus in the database. Table = "bus" // NurseryTable is the table that holds the nursery relation/edge. @@ -68,6 +72,20 @@ const ( // BusRouteInverseTable is the table name for the BusRoute entity. // It exists in this package in order to avoid circular dependency with the "busroute" package. BusRouteInverseTable = "bus_routes" + // LatestMorningRouteTable is the table that holds the latest_morning_route relation/edge. + LatestMorningRouteTable = "bus" + // LatestMorningRouteInverseTable is the table name for the BusRoute entity. + // It exists in this package in order to avoid circular dependency with the "busroute" package. + LatestMorningRouteInverseTable = "bus_routes" + // LatestMorningRouteColumn is the table column denoting the latest_morning_route relation/edge. + LatestMorningRouteColumn = "bus_latest_morning_route" + // LatestEveningRouteTable is the table that holds the latest_evening_route relation/edge. + LatestEveningRouteTable = "bus" + // LatestEveningRouteInverseTable is the table name for the BusRoute entity. + // It exists in this package in order to avoid circular dependency with the "busroute" package. + LatestEveningRouteInverseTable = "bus_routes" + // LatestEveningRouteColumn is the table column denoting the latest_evening_route relation/edge. + LatestEveningRouteColumn = "bus_latest_evening_route" ) // Columns holds all SQL columns for bus fields. @@ -88,6 +106,8 @@ var Columns = []string{ var ForeignKeys = []string{ "bus_nursery", "bus_next_station", + "bus_latest_morning_route", + "bus_latest_evening_route", } var ( @@ -240,6 +260,20 @@ func ByBusRoute(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { sqlgraph.OrderByNeighborTerms(s, newBusRouteStep(), append([]sql.OrderTerm{term}, terms...)...) } } + +// ByLatestMorningRouteField orders the results by latest_morning_route field. +func ByLatestMorningRouteField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newLatestMorningRouteStep(), sql.OrderByField(field, opts...)) + } +} + +// ByLatestEveningRouteField orders the results by latest_evening_route field. +func ByLatestEveningRouteField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newLatestEveningRouteStep(), sql.OrderByField(field, opts...)) + } +} func newNurseryStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), @@ -268,3 +302,17 @@ func newBusRouteStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.M2M, true, BusRouteTable, BusRoutePrimaryKey...), ) } +func newLatestMorningRouteStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(LatestMorningRouteInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, LatestMorningRouteTable, LatestMorningRouteColumn), + ) +} +func newLatestEveningRouteStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(LatestEveningRouteInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, LatestEveningRouteTable, LatestEveningRouteColumn), + ) +} diff --git a/backend/domain/repository/ent/bus/where.go b/backend/domain/repository/ent/bus/where.go index 89892c70..28af53a7 100644 --- a/backend/domain/repository/ent/bus/where.go +++ b/backend/domain/repository/ent/bus/where.go @@ -533,6 +533,52 @@ func HasBusRouteWith(preds ...predicate.BusRoute) predicate.Bus { }) } +// HasLatestMorningRoute applies the HasEdge predicate on the "latest_morning_route" edge. +func HasLatestMorningRoute() predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, LatestMorningRouteTable, LatestMorningRouteColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasLatestMorningRouteWith applies the HasEdge predicate on the "latest_morning_route" edge with a given conditions (other predicates). +func HasLatestMorningRouteWith(preds ...predicate.BusRoute) predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := newLatestMorningRouteStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasLatestEveningRoute applies the HasEdge predicate on the "latest_evening_route" edge. +func HasLatestEveningRoute() predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, LatestEveningRouteTable, LatestEveningRouteColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasLatestEveningRouteWith applies the HasEdge predicate on the "latest_evening_route" edge with a given conditions (other predicates). +func HasLatestEveningRouteWith(preds ...predicate.BusRoute) predicate.Bus { + return predicate.Bus(func(s *sql.Selector) { + step := newLatestEveningRouteStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + // And groups predicates with the AND operator between them. func And(predicates ...predicate.Bus) predicate.Bus { return predicate.Bus(sql.AndPredicates(predicates...)) diff --git a/backend/domain/repository/ent/bus_create.go b/backend/domain/repository/ent/bus_create.go index a6cacc47..8050f4cd 100644 --- a/backend/domain/repository/ent/bus_create.go +++ b/backend/domain/repository/ent/bus_create.go @@ -211,6 +211,44 @@ func (bc *BusCreate) AddBusRoute(b ...*BusRoute) *BusCreate { return bc.AddBusRouteIDs(ids...) } +// SetLatestMorningRouteID sets the "latest_morning_route" edge to the BusRoute entity by ID. +func (bc *BusCreate) SetLatestMorningRouteID(id uuid.UUID) *BusCreate { + bc.mutation.SetLatestMorningRouteID(id) + return bc +} + +// SetNillableLatestMorningRouteID sets the "latest_morning_route" edge to the BusRoute entity by ID if the given value is not nil. +func (bc *BusCreate) SetNillableLatestMorningRouteID(id *uuid.UUID) *BusCreate { + if id != nil { + bc = bc.SetLatestMorningRouteID(*id) + } + return bc +} + +// SetLatestMorningRoute sets the "latest_morning_route" edge to the BusRoute entity. +func (bc *BusCreate) SetLatestMorningRoute(b *BusRoute) *BusCreate { + return bc.SetLatestMorningRouteID(b.ID) +} + +// SetLatestEveningRouteID sets the "latest_evening_route" edge to the BusRoute entity by ID. +func (bc *BusCreate) SetLatestEveningRouteID(id uuid.UUID) *BusCreate { + bc.mutation.SetLatestEveningRouteID(id) + return bc +} + +// SetNillableLatestEveningRouteID sets the "latest_evening_route" edge to the BusRoute entity by ID if the given value is not nil. +func (bc *BusCreate) SetNillableLatestEveningRouteID(id *uuid.UUID) *BusCreate { + if id != nil { + bc = bc.SetLatestEveningRouteID(*id) + } + return bc +} + +// SetLatestEveningRoute sets the "latest_evening_route" edge to the BusRoute entity. +func (bc *BusCreate) SetLatestEveningRoute(b *BusRoute) *BusCreate { + return bc.SetLatestEveningRouteID(b.ID) +} + // Mutation returns the BusMutation object of the builder. func (bc *BusCreate) Mutation() *BusMutation { return bc.mutation @@ -423,6 +461,40 @@ func (bc *BusCreate) createSpec() (*Bus, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } + if nodes := bc.mutation.LatestMorningRouteIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.LatestMorningRouteTable, + Columns: []string{bus.LatestMorningRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.bus_latest_morning_route = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := bc.mutation.LatestEveningRouteIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.LatestEveningRouteTable, + Columns: []string{bus.LatestEveningRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.bus_latest_evening_route = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } return _node, _spec } diff --git a/backend/domain/repository/ent/bus_query.go b/backend/domain/repository/ent/bus_query.go index a9257db9..4748fe77 100644 --- a/backend/domain/repository/ent/bus_query.go +++ b/backend/domain/repository/ent/bus_query.go @@ -23,15 +23,17 @@ import ( // BusQuery is the builder for querying Bus entities. type BusQuery struct { config - ctx *QueryContext - order []bus.OrderOption - inters []Interceptor - predicates []predicate.Bus - withNursery *NurseryQuery - withBoardingRecords *BoardingRecordQuery - withNextStation *StationQuery - withBusRoute *BusRouteQuery - withFKs bool + ctx *QueryContext + order []bus.OrderOption + inters []Interceptor + predicates []predicate.Bus + withNursery *NurseryQuery + withBoardingRecords *BoardingRecordQuery + withNextStation *StationQuery + withBusRoute *BusRouteQuery + withLatestMorningRoute *BusRouteQuery + withLatestEveningRoute *BusRouteQuery + withFKs bool // intermediate query (i.e. traversal path). sql *sql.Selector path func(context.Context) (*sql.Selector, error) @@ -156,6 +158,50 @@ func (bq *BusQuery) QueryBusRoute() *BusRouteQuery { return query } +// QueryLatestMorningRoute chains the current query on the "latest_morning_route" edge. +func (bq *BusQuery) QueryLatestMorningRoute() *BusRouteQuery { + query := (&BusRouteClient{config: bq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, selector), + sqlgraph.To(busroute.Table, busroute.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.LatestMorningRouteTable, bus.LatestMorningRouteColumn), + ) + fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryLatestEveningRoute chains the current query on the "latest_evening_route" edge. +func (bq *BusQuery) QueryLatestEveningRoute() *BusRouteQuery { + query := (&BusRouteClient{config: bq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, selector), + sqlgraph.To(busroute.Table, busroute.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.LatestEveningRouteTable, bus.LatestEveningRouteColumn), + ) + fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) + return fromU, nil + } + return query +} + // First returns the first Bus entity from the query. // Returns a *NotFoundError when no Bus was found. func (bq *BusQuery) First(ctx context.Context) (*Bus, error) { @@ -343,15 +389,17 @@ func (bq *BusQuery) Clone() *BusQuery { return nil } return &BusQuery{ - config: bq.config, - ctx: bq.ctx.Clone(), - order: append([]bus.OrderOption{}, bq.order...), - inters: append([]Interceptor{}, bq.inters...), - predicates: append([]predicate.Bus{}, bq.predicates...), - withNursery: bq.withNursery.Clone(), - withBoardingRecords: bq.withBoardingRecords.Clone(), - withNextStation: bq.withNextStation.Clone(), - withBusRoute: bq.withBusRoute.Clone(), + config: bq.config, + ctx: bq.ctx.Clone(), + order: append([]bus.OrderOption{}, bq.order...), + inters: append([]Interceptor{}, bq.inters...), + predicates: append([]predicate.Bus{}, bq.predicates...), + withNursery: bq.withNursery.Clone(), + withBoardingRecords: bq.withBoardingRecords.Clone(), + withNextStation: bq.withNextStation.Clone(), + withBusRoute: bq.withBusRoute.Clone(), + withLatestMorningRoute: bq.withLatestMorningRoute.Clone(), + withLatestEveningRoute: bq.withLatestEveningRoute.Clone(), // clone intermediate query. sql: bq.sql.Clone(), path: bq.path, @@ -402,6 +450,28 @@ func (bq *BusQuery) WithBusRoute(opts ...func(*BusRouteQuery)) *BusQuery { return bq } +// WithLatestMorningRoute tells the query-builder to eager-load the nodes that are connected to +// the "latest_morning_route" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithLatestMorningRoute(opts ...func(*BusRouteQuery)) *BusQuery { + query := (&BusRouteClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + bq.withLatestMorningRoute = query + return bq +} + +// WithLatestEveningRoute tells the query-builder to eager-load the nodes that are connected to +// the "latest_evening_route" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BusQuery) WithLatestEveningRoute(opts ...func(*BusRouteQuery)) *BusQuery { + query := (&BusRouteClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + bq.withLatestEveningRoute = query + return bq +} + // GroupBy is used to group vertices by one or more fields/columns. // It is often used with aggregate functions, like: count, max, mean, min, sum. // @@ -481,14 +551,16 @@ func (bq *BusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bus, err nodes = []*Bus{} withFKs = bq.withFKs _spec = bq.querySpec() - loadedTypes = [4]bool{ + loadedTypes = [6]bool{ bq.withNursery != nil, bq.withBoardingRecords != nil, bq.withNextStation != nil, bq.withBusRoute != nil, + bq.withLatestMorningRoute != nil, + bq.withLatestEveningRoute != nil, } ) - if bq.withNursery != nil || bq.withNextStation != nil { + if bq.withNursery != nil || bq.withNextStation != nil || bq.withLatestMorningRoute != nil || bq.withLatestEveningRoute != nil { withFKs = true } if withFKs { @@ -538,6 +610,18 @@ func (bq *BusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bus, err return nil, err } } + if query := bq.withLatestMorningRoute; query != nil { + if err := bq.loadLatestMorningRoute(ctx, query, nodes, nil, + func(n *Bus, e *BusRoute) { n.Edges.LatestMorningRoute = e }); err != nil { + return nil, err + } + } + if query := bq.withLatestEveningRoute; query != nil { + if err := bq.loadLatestEveningRoute(ctx, query, nodes, nil, + func(n *Bus, e *BusRoute) { n.Edges.LatestEveningRoute = e }); err != nil { + return nil, err + } + } return nodes, nil } @@ -697,6 +781,70 @@ func (bq *BusQuery) loadBusRoute(ctx context.Context, query *BusRouteQuery, node } return nil } +func (bq *BusQuery) loadLatestMorningRoute(ctx context.Context, query *BusRouteQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *BusRoute)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Bus) + for i := range nodes { + if nodes[i].bus_latest_morning_route == nil { + continue + } + fk := *nodes[i].bus_latest_morning_route + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(busroute.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "bus_latest_morning_route" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} +func (bq *BusQuery) loadLatestEveningRoute(ctx context.Context, query *BusRouteQuery, nodes []*Bus, init func(*Bus), assign func(*Bus, *BusRoute)) error { + ids := make([]uuid.UUID, 0, len(nodes)) + nodeids := make(map[uuid.UUID][]*Bus) + for i := range nodes { + if nodes[i].bus_latest_evening_route == nil { + continue + } + fk := *nodes[i].bus_latest_evening_route + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(busroute.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "bus_latest_evening_route" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} func (bq *BusQuery) sqlCount(ctx context.Context) (int, error) { _spec := bq.querySpec() diff --git a/backend/domain/repository/ent/bus_update.go b/backend/domain/repository/ent/bus_update.go index 3596c4c8..889acae3 100644 --- a/backend/domain/repository/ent/bus_update.go +++ b/backend/domain/repository/ent/bus_update.go @@ -237,6 +237,44 @@ func (bu *BusUpdate) AddBusRoute(b ...*BusRoute) *BusUpdate { return bu.AddBusRouteIDs(ids...) } +// SetLatestMorningRouteID sets the "latest_morning_route" edge to the BusRoute entity by ID. +func (bu *BusUpdate) SetLatestMorningRouteID(id uuid.UUID) *BusUpdate { + bu.mutation.SetLatestMorningRouteID(id) + return bu +} + +// SetNillableLatestMorningRouteID sets the "latest_morning_route" edge to the BusRoute entity by ID if the given value is not nil. +func (bu *BusUpdate) SetNillableLatestMorningRouteID(id *uuid.UUID) *BusUpdate { + if id != nil { + bu = bu.SetLatestMorningRouteID(*id) + } + return bu +} + +// SetLatestMorningRoute sets the "latest_morning_route" edge to the BusRoute entity. +func (bu *BusUpdate) SetLatestMorningRoute(b *BusRoute) *BusUpdate { + return bu.SetLatestMorningRouteID(b.ID) +} + +// SetLatestEveningRouteID sets the "latest_evening_route" edge to the BusRoute entity by ID. +func (bu *BusUpdate) SetLatestEveningRouteID(id uuid.UUID) *BusUpdate { + bu.mutation.SetLatestEveningRouteID(id) + return bu +} + +// SetNillableLatestEveningRouteID sets the "latest_evening_route" edge to the BusRoute entity by ID if the given value is not nil. +func (bu *BusUpdate) SetNillableLatestEveningRouteID(id *uuid.UUID) *BusUpdate { + if id != nil { + bu = bu.SetLatestEveningRouteID(*id) + } + return bu +} + +// SetLatestEveningRoute sets the "latest_evening_route" edge to the BusRoute entity. +func (bu *BusUpdate) SetLatestEveningRoute(b *BusRoute) *BusUpdate { + return bu.SetLatestEveningRouteID(b.ID) +} + // Mutation returns the BusMutation object of the builder. func (bu *BusUpdate) Mutation() *BusMutation { return bu.mutation @@ -296,6 +334,18 @@ func (bu *BusUpdate) RemoveBusRoute(b ...*BusRoute) *BusUpdate { return bu.RemoveBusRouteIDs(ids...) } +// ClearLatestMorningRoute clears the "latest_morning_route" edge to the BusRoute entity. +func (bu *BusUpdate) ClearLatestMorningRoute() *BusUpdate { + bu.mutation.ClearLatestMorningRoute() + return bu +} + +// ClearLatestEveningRoute clears the "latest_evening_route" edge to the BusRoute entity. +func (bu *BusUpdate) ClearLatestEveningRoute() *BusUpdate { + bu.mutation.ClearLatestEveningRoute() + return bu +} + // Save executes the query and returns the number of nodes affected by the update operation. func (bu *BusUpdate) Save(ctx context.Context) (int, error) { bu.defaults() @@ -541,6 +591,64 @@ func (bu *BusUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if bu.mutation.LatestMorningRouteCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.LatestMorningRouteTable, + Columns: []string{bus.LatestMorningRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.LatestMorningRouteIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.LatestMorningRouteTable, + Columns: []string{bus.LatestMorningRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bu.mutation.LatestEveningRouteCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.LatestEveningRouteTable, + Columns: []string{bus.LatestEveningRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.LatestEveningRouteIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.LatestEveningRouteTable, + Columns: []string{bus.LatestEveningRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } if n, err = sqlgraph.UpdateNodes(ctx, bu.driver, _spec); err != nil { if _, ok := err.(*sqlgraph.NotFoundError); ok { err = &NotFoundError{bus.Label} @@ -765,6 +873,44 @@ func (buo *BusUpdateOne) AddBusRoute(b ...*BusRoute) *BusUpdateOne { return buo.AddBusRouteIDs(ids...) } +// SetLatestMorningRouteID sets the "latest_morning_route" edge to the BusRoute entity by ID. +func (buo *BusUpdateOne) SetLatestMorningRouteID(id uuid.UUID) *BusUpdateOne { + buo.mutation.SetLatestMorningRouteID(id) + return buo +} + +// SetNillableLatestMorningRouteID sets the "latest_morning_route" edge to the BusRoute entity by ID if the given value is not nil. +func (buo *BusUpdateOne) SetNillableLatestMorningRouteID(id *uuid.UUID) *BusUpdateOne { + if id != nil { + buo = buo.SetLatestMorningRouteID(*id) + } + return buo +} + +// SetLatestMorningRoute sets the "latest_morning_route" edge to the BusRoute entity. +func (buo *BusUpdateOne) SetLatestMorningRoute(b *BusRoute) *BusUpdateOne { + return buo.SetLatestMorningRouteID(b.ID) +} + +// SetLatestEveningRouteID sets the "latest_evening_route" edge to the BusRoute entity by ID. +func (buo *BusUpdateOne) SetLatestEveningRouteID(id uuid.UUID) *BusUpdateOne { + buo.mutation.SetLatestEveningRouteID(id) + return buo +} + +// SetNillableLatestEveningRouteID sets the "latest_evening_route" edge to the BusRoute entity by ID if the given value is not nil. +func (buo *BusUpdateOne) SetNillableLatestEveningRouteID(id *uuid.UUID) *BusUpdateOne { + if id != nil { + buo = buo.SetLatestEveningRouteID(*id) + } + return buo +} + +// SetLatestEveningRoute sets the "latest_evening_route" edge to the BusRoute entity. +func (buo *BusUpdateOne) SetLatestEveningRoute(b *BusRoute) *BusUpdateOne { + return buo.SetLatestEveningRouteID(b.ID) +} + // Mutation returns the BusMutation object of the builder. func (buo *BusUpdateOne) Mutation() *BusMutation { return buo.mutation @@ -824,6 +970,18 @@ func (buo *BusUpdateOne) RemoveBusRoute(b ...*BusRoute) *BusUpdateOne { return buo.RemoveBusRouteIDs(ids...) } +// ClearLatestMorningRoute clears the "latest_morning_route" edge to the BusRoute entity. +func (buo *BusUpdateOne) ClearLatestMorningRoute() *BusUpdateOne { + buo.mutation.ClearLatestMorningRoute() + return buo +} + +// ClearLatestEveningRoute clears the "latest_evening_route" edge to the BusRoute entity. +func (buo *BusUpdateOne) ClearLatestEveningRoute() *BusUpdateOne { + buo.mutation.ClearLatestEveningRoute() + return buo +} + // Where appends a list predicates to the BusUpdate builder. func (buo *BusUpdateOne) Where(ps ...predicate.Bus) *BusUpdateOne { buo.mutation.Where(ps...) @@ -1099,6 +1257,64 @@ func (buo *BusUpdateOne) sqlSave(ctx context.Context) (_node *Bus, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if buo.mutation.LatestMorningRouteCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.LatestMorningRouteTable, + Columns: []string{bus.LatestMorningRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.LatestMorningRouteIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.LatestMorningRouteTable, + Columns: []string{bus.LatestMorningRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if buo.mutation.LatestEveningRouteCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.LatestEveningRouteTable, + Columns: []string{bus.LatestEveningRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.LatestEveningRouteIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bus.LatestEveningRouteTable, + Columns: []string{bus.LatestEveningRouteColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(busroute.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } _node = &Bus{config: buo.config} _spec.Assign = _node.assignValues _spec.ScanValues = _node.scanValues diff --git a/backend/domain/repository/ent/busroute.go b/backend/domain/repository/ent/busroute.go index 917e4fc4..c72cfa41 100644 --- a/backend/domain/repository/ent/busroute.go +++ b/backend/domain/repository/ent/busroute.go @@ -5,6 +5,7 @@ package ent import ( "fmt" "strings" + "time" "entgo.io/ent" "entgo.io/ent/dialect/sql" @@ -19,6 +20,10 @@ type BusRoute struct { ID uuid.UUID `json:"id,omitempty"` // 朝のバスか放課後のバスかを示す BusType busroute.BusType `json:"bus_type,omitempty"` + // CreatedAt holds the value of the "created_at" field. + CreatedAt time.Time `json:"created_at,omitempty"` + // UpdatedAt holds the value of the "updated_at" field. + UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BusRouteQuery when eager-loading is set. Edges BusRouteEdges `json:"edges"` @@ -33,9 +38,13 @@ type BusRouteEdges struct { ChildBusAssociations []*ChildBusAssociation `json:"childBusAssociations,omitempty"` // BusRouteAssociations holds the value of the busRouteAssociations edge. BusRouteAssociations []*BusRouteAssociation `json:"busRouteAssociations,omitempty"` + // MorningBuses holds the value of the morning_buses edge. + MorningBuses []*Bus `json:"morning_buses,omitempty"` + // EveningBuses holds the value of the evening_buses edge. + EveningBuses []*Bus `json:"evening_buses,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. - loadedTypes [3]bool + loadedTypes [5]bool } // BusOrErr returns the Bus value or an error if the edge @@ -65,6 +74,24 @@ func (e BusRouteEdges) BusRouteAssociationsOrErr() ([]*BusRouteAssociation, erro return nil, &NotLoadedError{edge: "busRouteAssociations"} } +// MorningBusesOrErr returns the MorningBuses value or an error if the edge +// was not loaded in eager-loading. +func (e BusRouteEdges) MorningBusesOrErr() ([]*Bus, error) { + if e.loadedTypes[3] { + return e.MorningBuses, nil + } + return nil, &NotLoadedError{edge: "morning_buses"} +} + +// EveningBusesOrErr returns the EveningBuses value or an error if the edge +// was not loaded in eager-loading. +func (e BusRouteEdges) EveningBusesOrErr() ([]*Bus, error) { + if e.loadedTypes[4] { + return e.EveningBuses, nil + } + return nil, &NotLoadedError{edge: "evening_buses"} +} + // scanValues returns the types for scanning values from sql.Rows. func (*BusRoute) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) @@ -72,6 +99,8 @@ func (*BusRoute) scanValues(columns []string) ([]any, error) { switch columns[i] { case busroute.FieldBusType: values[i] = new(sql.NullString) + case busroute.FieldCreatedAt, busroute.FieldUpdatedAt: + values[i] = new(sql.NullTime) case busroute.FieldID: values[i] = new(uuid.UUID) default: @@ -101,6 +130,18 @@ func (br *BusRoute) assignValues(columns []string, values []any) error { } else if value.Valid { br.BusType = busroute.BusType(value.String) } + case busroute.FieldCreatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field created_at", values[i]) + } else if value.Valid { + br.CreatedAt = value.Time + } + case busroute.FieldUpdatedAt: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field updated_at", values[i]) + } else if value.Valid { + br.UpdatedAt = value.Time + } default: br.selectValues.Set(columns[i], values[i]) } @@ -129,6 +170,16 @@ func (br *BusRoute) QueryBusRouteAssociations() *BusRouteAssociationQuery { return NewBusRouteClient(br.config).QueryBusRouteAssociations(br) } +// QueryMorningBuses queries the "morning_buses" edge of the BusRoute entity. +func (br *BusRoute) QueryMorningBuses() *BusQuery { + return NewBusRouteClient(br.config).QueryMorningBuses(br) +} + +// QueryEveningBuses queries the "evening_buses" edge of the BusRoute entity. +func (br *BusRoute) QueryEveningBuses() *BusQuery { + return NewBusRouteClient(br.config).QueryEveningBuses(br) +} + // Update returns a builder for updating this BusRoute. // Note that you need to call BusRoute.Unwrap() before calling this method if this BusRoute // was returned from a transaction, and the transaction was committed or rolled back. @@ -154,6 +205,12 @@ func (br *BusRoute) String() string { builder.WriteString(fmt.Sprintf("id=%v, ", br.ID)) builder.WriteString("bus_type=") builder.WriteString(fmt.Sprintf("%v", br.BusType)) + builder.WriteString(", ") + builder.WriteString("created_at=") + builder.WriteString(br.CreatedAt.Format(time.ANSIC)) + builder.WriteString(", ") + builder.WriteString("updated_at=") + builder.WriteString(br.UpdatedAt.Format(time.ANSIC)) builder.WriteByte(')') return builder.String() } diff --git a/backend/domain/repository/ent/busroute/busroute.go b/backend/domain/repository/ent/busroute/busroute.go index 5562a4f6..b5905ee7 100644 --- a/backend/domain/repository/ent/busroute/busroute.go +++ b/backend/domain/repository/ent/busroute/busroute.go @@ -4,6 +4,7 @@ package busroute import ( "fmt" + "time" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" @@ -17,12 +18,20 @@ const ( FieldID = "id" // FieldBusType holds the string denoting the bus_type field in the database. FieldBusType = "bus_type" + // FieldCreatedAt holds the string denoting the created_at field in the database. + FieldCreatedAt = "created_at" + // FieldUpdatedAt holds the string denoting the updated_at field in the database. + FieldUpdatedAt = "updated_at" // EdgeBus holds the string denoting the bus edge name in mutations. EdgeBus = "bus" // EdgeChildBusAssociations holds the string denoting the childbusassociations edge name in mutations. EdgeChildBusAssociations = "childBusAssociations" // EdgeBusRouteAssociations holds the string denoting the busrouteassociations edge name in mutations. EdgeBusRouteAssociations = "busRouteAssociations" + // EdgeMorningBuses holds the string denoting the morning_buses edge name in mutations. + EdgeMorningBuses = "morning_buses" + // EdgeEveningBuses holds the string denoting the evening_buses edge name in mutations. + EdgeEveningBuses = "evening_buses" // Table holds the table name of the busroute in the database. Table = "bus_routes" // BusTable is the table that holds the bus relation/edge. The primary key declared below. @@ -44,12 +53,28 @@ const ( BusRouteAssociationsInverseTable = "bus_route_associations" // BusRouteAssociationsColumn is the table column denoting the busRouteAssociations relation/edge. BusRouteAssociationsColumn = "bus_route_id" + // MorningBusesTable is the table that holds the morning_buses relation/edge. + MorningBusesTable = "bus" + // MorningBusesInverseTable is the table name for the Bus entity. + // It exists in this package in order to avoid circular dependency with the "bus" package. + MorningBusesInverseTable = "bus" + // MorningBusesColumn is the table column denoting the morning_buses relation/edge. + MorningBusesColumn = "bus_latest_morning_route" + // EveningBusesTable is the table that holds the evening_buses relation/edge. + EveningBusesTable = "bus" + // EveningBusesInverseTable is the table name for the Bus entity. + // It exists in this package in order to avoid circular dependency with the "bus" package. + EveningBusesInverseTable = "bus" + // EveningBusesColumn is the table column denoting the evening_buses relation/edge. + EveningBusesColumn = "bus_latest_evening_route" ) // Columns holds all SQL columns for busroute fields. var Columns = []string{ FieldID, FieldBusType, + FieldCreatedAt, + FieldUpdatedAt, } var ( @@ -69,6 +94,12 @@ func ValidColumn(column string) bool { } var ( + // DefaultCreatedAt holds the default value on creation for the "created_at" field. + DefaultCreatedAt time.Time + // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. + DefaultUpdatedAt func() time.Time + // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. + UpdateDefaultUpdatedAt func() time.Time // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID ) @@ -109,6 +140,16 @@ func ByBusType(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldBusType, opts...).ToFunc() } +// ByCreatedAt orders the results by the created_at field. +func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() +} + +// ByUpdatedAt orders the results by the updated_at field. +func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() +} + // ByBusCount orders the results by bus count. func ByBusCount(opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { @@ -150,6 +191,34 @@ func ByBusRouteAssociations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOpt sqlgraph.OrderByNeighborTerms(s, newBusRouteAssociationsStep(), append([]sql.OrderTerm{term}, terms...)...) } } + +// ByMorningBusesCount orders the results by morning_buses count. +func ByMorningBusesCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newMorningBusesStep(), opts...) + } +} + +// ByMorningBuses orders the results by morning_buses terms. +func ByMorningBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newMorningBusesStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} + +// ByEveningBusesCount orders the results by evening_buses count. +func ByEveningBusesCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newEveningBusesStep(), opts...) + } +} + +// ByEveningBuses orders the results by evening_buses terms. +func ByEveningBuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newEveningBusesStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} func newBusStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), @@ -171,3 +240,17 @@ func newBusRouteAssociationsStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.O2M, false, BusRouteAssociationsTable, BusRouteAssociationsColumn), ) } +func newMorningBusesStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(MorningBusesInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, MorningBusesTable, MorningBusesColumn), + ) +} +func newEveningBusesStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(EveningBusesInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, EveningBusesTable, EveningBusesColumn), + ) +} diff --git a/backend/domain/repository/ent/busroute/where.go b/backend/domain/repository/ent/busroute/where.go index 8dc46bca..6b681c07 100644 --- a/backend/domain/repository/ent/busroute/where.go +++ b/backend/domain/repository/ent/busroute/where.go @@ -3,6 +3,8 @@ package busroute import ( + "time" + "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/predicate" @@ -54,6 +56,16 @@ func IDLTE(id uuid.UUID) predicate.BusRoute { return predicate.BusRoute(sql.FieldLTE(FieldID, id)) } +// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. +func CreatedAt(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldEQ(FieldCreatedAt, v)) +} + +// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ. +func UpdatedAt(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldEQ(FieldUpdatedAt, v)) +} + // BusTypeEQ applies the EQ predicate on the "bus_type" field. func BusTypeEQ(v BusType) predicate.BusRoute { return predicate.BusRoute(sql.FieldEQ(FieldBusType, v)) @@ -74,6 +86,86 @@ func BusTypeNotIn(vs ...BusType) predicate.BusRoute { return predicate.BusRoute(sql.FieldNotIn(FieldBusType, vs...)) } +// CreatedAtEQ applies the EQ predicate on the "created_at" field. +func CreatedAtEQ(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldEQ(FieldCreatedAt, v)) +} + +// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. +func CreatedAtNEQ(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldNEQ(FieldCreatedAt, v)) +} + +// CreatedAtIn applies the In predicate on the "created_at" field. +func CreatedAtIn(vs ...time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldIn(FieldCreatedAt, vs...)) +} + +// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. +func CreatedAtNotIn(vs ...time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldNotIn(FieldCreatedAt, vs...)) +} + +// CreatedAtGT applies the GT predicate on the "created_at" field. +func CreatedAtGT(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldGT(FieldCreatedAt, v)) +} + +// CreatedAtGTE applies the GTE predicate on the "created_at" field. +func CreatedAtGTE(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldGTE(FieldCreatedAt, v)) +} + +// CreatedAtLT applies the LT predicate on the "created_at" field. +func CreatedAtLT(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldLT(FieldCreatedAt, v)) +} + +// CreatedAtLTE applies the LTE predicate on the "created_at" field. +func CreatedAtLTE(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldLTE(FieldCreatedAt, v)) +} + +// UpdatedAtEQ applies the EQ predicate on the "updated_at" field. +func UpdatedAtEQ(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field. +func UpdatedAtNEQ(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldNEQ(FieldUpdatedAt, v)) +} + +// UpdatedAtIn applies the In predicate on the "updated_at" field. +func UpdatedAtIn(vs ...time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field. +func UpdatedAtNotIn(vs ...time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldNotIn(FieldUpdatedAt, vs...)) +} + +// UpdatedAtGT applies the GT predicate on the "updated_at" field. +func UpdatedAtGT(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldGT(FieldUpdatedAt, v)) +} + +// UpdatedAtGTE applies the GTE predicate on the "updated_at" field. +func UpdatedAtGTE(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldGTE(FieldUpdatedAt, v)) +} + +// UpdatedAtLT applies the LT predicate on the "updated_at" field. +func UpdatedAtLT(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldLT(FieldUpdatedAt, v)) +} + +// UpdatedAtLTE applies the LTE predicate on the "updated_at" field. +func UpdatedAtLTE(v time.Time) predicate.BusRoute { + return predicate.BusRoute(sql.FieldLTE(FieldUpdatedAt, v)) +} + // HasBus applies the HasEdge predicate on the "bus" edge. func HasBus() predicate.BusRoute { return predicate.BusRoute(func(s *sql.Selector) { @@ -143,6 +235,52 @@ func HasBusRouteAssociationsWith(preds ...predicate.BusRouteAssociation) predica }) } +// HasMorningBuses applies the HasEdge predicate on the "morning_buses" edge. +func HasMorningBuses() predicate.BusRoute { + return predicate.BusRoute(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, MorningBusesTable, MorningBusesColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasMorningBusesWith applies the HasEdge predicate on the "morning_buses" edge with a given conditions (other predicates). +func HasMorningBusesWith(preds ...predicate.Bus) predicate.BusRoute { + return predicate.BusRoute(func(s *sql.Selector) { + step := newMorningBusesStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// HasEveningBuses applies the HasEdge predicate on the "evening_buses" edge. +func HasEveningBuses() predicate.BusRoute { + return predicate.BusRoute(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, EveningBusesTable, EveningBusesColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasEveningBusesWith applies the HasEdge predicate on the "evening_buses" edge with a given conditions (other predicates). +func HasEveningBusesWith(preds ...predicate.Bus) predicate.BusRoute { + return predicate.BusRoute(func(s *sql.Selector) { + step := newEveningBusesStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + // And groups predicates with the AND operator between them. func And(predicates ...predicate.BusRoute) predicate.BusRoute { return predicate.BusRoute(sql.AndPredicates(predicates...)) diff --git a/backend/domain/repository/ent/busroute_create.go b/backend/domain/repository/ent/busroute_create.go index a10c9006..04429c07 100644 --- a/backend/domain/repository/ent/busroute_create.go +++ b/backend/domain/repository/ent/busroute_create.go @@ -6,6 +6,7 @@ import ( "context" "errors" "fmt" + "time" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" @@ -29,6 +30,34 @@ func (brc *BusRouteCreate) SetBusType(bt busroute.BusType) *BusRouteCreate { return brc } +// SetCreatedAt sets the "created_at" field. +func (brc *BusRouteCreate) SetCreatedAt(t time.Time) *BusRouteCreate { + brc.mutation.SetCreatedAt(t) + return brc +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (brc *BusRouteCreate) SetNillableCreatedAt(t *time.Time) *BusRouteCreate { + if t != nil { + brc.SetCreatedAt(*t) + } + return brc +} + +// SetUpdatedAt sets the "updated_at" field. +func (brc *BusRouteCreate) SetUpdatedAt(t time.Time) *BusRouteCreate { + brc.mutation.SetUpdatedAt(t) + return brc +} + +// SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil. +func (brc *BusRouteCreate) SetNillableUpdatedAt(t *time.Time) *BusRouteCreate { + if t != nil { + brc.SetUpdatedAt(*t) + } + return brc +} + // SetID sets the "id" field. func (brc *BusRouteCreate) SetID(u uuid.UUID) *BusRouteCreate { brc.mutation.SetID(u) @@ -88,6 +117,36 @@ func (brc *BusRouteCreate) AddBusRouteAssociations(b ...*BusRouteAssociation) *B return brc.AddBusRouteAssociationIDs(ids...) } +// AddMorningBusIDs adds the "morning_buses" edge to the Bus entity by IDs. +func (brc *BusRouteCreate) AddMorningBusIDs(ids ...uuid.UUID) *BusRouteCreate { + brc.mutation.AddMorningBusIDs(ids...) + return brc +} + +// AddMorningBuses adds the "morning_buses" edges to the Bus entity. +func (brc *BusRouteCreate) AddMorningBuses(b ...*Bus) *BusRouteCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return brc.AddMorningBusIDs(ids...) +} + +// AddEveningBusIDs adds the "evening_buses" edge to the Bus entity by IDs. +func (brc *BusRouteCreate) AddEveningBusIDs(ids ...uuid.UUID) *BusRouteCreate { + brc.mutation.AddEveningBusIDs(ids...) + return brc +} + +// AddEveningBuses adds the "evening_buses" edges to the Bus entity. +func (brc *BusRouteCreate) AddEveningBuses(b ...*Bus) *BusRouteCreate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return brc.AddEveningBusIDs(ids...) +} + // Mutation returns the BusRouteMutation object of the builder. func (brc *BusRouteCreate) Mutation() *BusRouteMutation { return brc.mutation @@ -123,6 +182,14 @@ func (brc *BusRouteCreate) ExecX(ctx context.Context) { // defaults sets the default values of the builder before save. func (brc *BusRouteCreate) defaults() { + if _, ok := brc.mutation.CreatedAt(); !ok { + v := busroute.DefaultCreatedAt + brc.mutation.SetCreatedAt(v) + } + if _, ok := brc.mutation.UpdatedAt(); !ok { + v := busroute.DefaultUpdatedAt() + brc.mutation.SetUpdatedAt(v) + } if _, ok := brc.mutation.ID(); !ok { v := busroute.DefaultID() brc.mutation.SetID(v) @@ -139,6 +206,12 @@ func (brc *BusRouteCreate) check() error { return &ValidationError{Name: "bus_type", err: fmt.Errorf(`ent: validator failed for field "BusRoute.bus_type": %w`, err)} } } + if _, ok := brc.mutation.CreatedAt(); !ok { + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "BusRoute.created_at"`)} + } + if _, ok := brc.mutation.UpdatedAt(); !ok { + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "BusRoute.updated_at"`)} + } return nil } @@ -178,6 +251,14 @@ func (brc *BusRouteCreate) createSpec() (*BusRoute, *sqlgraph.CreateSpec) { _spec.SetField(busroute.FieldBusType, field.TypeEnum, value) _node.BusType = value } + if value, ok := brc.mutation.CreatedAt(); ok { + _spec.SetField(busroute.FieldCreatedAt, field.TypeTime, value) + _node.CreatedAt = value + } + if value, ok := brc.mutation.UpdatedAt(); ok { + _spec.SetField(busroute.FieldUpdatedAt, field.TypeTime, value) + _node.UpdatedAt = value + } if nodes := brc.mutation.BusIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2M, @@ -226,6 +307,38 @@ func (brc *BusRouteCreate) createSpec() (*BusRoute, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } + if nodes := brc.mutation.MorningBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.MorningBusesTable, + Columns: []string{busroute.MorningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } + if nodes := brc.mutation.EveningBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.EveningBusesTable, + Columns: []string{busroute.EveningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } return _node, _spec } diff --git a/backend/domain/repository/ent/busroute_query.go b/backend/domain/repository/ent/busroute_query.go index 2c329aa6..996b028c 100644 --- a/backend/domain/repository/ent/busroute_query.go +++ b/backend/domain/repository/ent/busroute_query.go @@ -29,6 +29,8 @@ type BusRouteQuery struct { withBus *BusQuery withChildBusAssociations *ChildBusAssociationQuery withBusRouteAssociations *BusRouteAssociationQuery + withMorningBuses *BusQuery + withEveningBuses *BusQuery // intermediate query (i.e. traversal path). sql *sql.Selector path func(context.Context) (*sql.Selector, error) @@ -131,6 +133,50 @@ func (brq *BusRouteQuery) QueryBusRouteAssociations() *BusRouteAssociationQuery return query } +// QueryMorningBuses chains the current query on the "morning_buses" edge. +func (brq *BusRouteQuery) QueryMorningBuses() *BusQuery { + query := (&BusClient{config: brq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := brq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := brq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(busroute.Table, busroute.FieldID, selector), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, busroute.MorningBusesTable, busroute.MorningBusesColumn), + ) + fromU = sqlgraph.SetNeighbors(brq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// QueryEveningBuses chains the current query on the "evening_buses" edge. +func (brq *BusRouteQuery) QueryEveningBuses() *BusQuery { + query := (&BusClient{config: brq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := brq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := brq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(busroute.Table, busroute.FieldID, selector), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, busroute.EveningBusesTable, busroute.EveningBusesColumn), + ) + fromU = sqlgraph.SetNeighbors(brq.driver.Dialect(), step) + return fromU, nil + } + return query +} + // First returns the first BusRoute entity from the query. // Returns a *NotFoundError when no BusRoute was found. func (brq *BusRouteQuery) First(ctx context.Context) (*BusRoute, error) { @@ -326,6 +372,8 @@ func (brq *BusRouteQuery) Clone() *BusRouteQuery { withBus: brq.withBus.Clone(), withChildBusAssociations: brq.withChildBusAssociations.Clone(), withBusRouteAssociations: brq.withBusRouteAssociations.Clone(), + withMorningBuses: brq.withMorningBuses.Clone(), + withEveningBuses: brq.withEveningBuses.Clone(), // clone intermediate query. sql: brq.sql.Clone(), path: brq.path, @@ -365,6 +413,28 @@ func (brq *BusRouteQuery) WithBusRouteAssociations(opts ...func(*BusRouteAssocia return brq } +// WithMorningBuses tells the query-builder to eager-load the nodes that are connected to +// the "morning_buses" edge. The optional arguments are used to configure the query builder of the edge. +func (brq *BusRouteQuery) WithMorningBuses(opts ...func(*BusQuery)) *BusRouteQuery { + query := (&BusClient{config: brq.config}).Query() + for _, opt := range opts { + opt(query) + } + brq.withMorningBuses = query + return brq +} + +// WithEveningBuses tells the query-builder to eager-load the nodes that are connected to +// the "evening_buses" edge. The optional arguments are used to configure the query builder of the edge. +func (brq *BusRouteQuery) WithEveningBuses(opts ...func(*BusQuery)) *BusRouteQuery { + query := (&BusClient{config: brq.config}).Query() + for _, opt := range opts { + opt(query) + } + brq.withEveningBuses = query + return brq +} + // GroupBy is used to group vertices by one or more fields/columns. // It is often used with aggregate functions, like: count, max, mean, min, sum. // @@ -443,10 +513,12 @@ func (brq *BusRouteQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bu var ( nodes = []*BusRoute{} _spec = brq.querySpec() - loadedTypes = [3]bool{ + loadedTypes = [5]bool{ brq.withBus != nil, brq.withChildBusAssociations != nil, brq.withBusRouteAssociations != nil, + brq.withMorningBuses != nil, + brq.withEveningBuses != nil, } ) _spec.ScanValues = func(columns []string) ([]any, error) { @@ -492,6 +564,20 @@ func (brq *BusRouteQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bu return nil, err } } + if query := brq.withMorningBuses; query != nil { + if err := brq.loadMorningBuses(ctx, query, nodes, + func(n *BusRoute) { n.Edges.MorningBuses = []*Bus{} }, + func(n *BusRoute, e *Bus) { n.Edges.MorningBuses = append(n.Edges.MorningBuses, e) }); err != nil { + return nil, err + } + } + if query := brq.withEveningBuses; query != nil { + if err := brq.loadEveningBuses(ctx, query, nodes, + func(n *BusRoute) { n.Edges.EveningBuses = []*Bus{} }, + func(n *BusRoute, e *Bus) { n.Edges.EveningBuses = append(n.Edges.EveningBuses, e) }); err != nil { + return nil, err + } + } return nodes, nil } @@ -616,6 +702,68 @@ func (brq *BusRouteQuery) loadBusRouteAssociations(ctx context.Context, query *B } return nil } +func (brq *BusRouteQuery) loadMorningBuses(ctx context.Context, query *BusQuery, nodes []*BusRoute, init func(*BusRoute), assign func(*BusRoute, *Bus)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*BusRoute) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Bus(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(busroute.MorningBusesColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.bus_latest_morning_route + if fk == nil { + return fmt.Errorf(`foreign-key "bus_latest_morning_route" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "bus_latest_morning_route" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} +func (brq *BusRouteQuery) loadEveningBuses(ctx context.Context, query *BusQuery, nodes []*BusRoute, init func(*BusRoute), assign func(*BusRoute, *Bus)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[uuid.UUID]*BusRoute) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.Bus(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(busroute.EveningBusesColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.bus_latest_evening_route + if fk == nil { + return fmt.Errorf(`foreign-key "bus_latest_evening_route" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "bus_latest_evening_route" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} func (brq *BusRouteQuery) sqlCount(ctx context.Context) (int, error) { _spec := brq.querySpec() diff --git a/backend/domain/repository/ent/busroute_update.go b/backend/domain/repository/ent/busroute_update.go index f8f94b66..480e14c3 100644 --- a/backend/domain/repository/ent/busroute_update.go +++ b/backend/domain/repository/ent/busroute_update.go @@ -6,6 +6,7 @@ import ( "context" "errors" "fmt" + "time" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" @@ -45,6 +46,26 @@ func (bru *BusRouteUpdate) SetNillableBusType(bt *busroute.BusType) *BusRouteUpd return bru } +// SetCreatedAt sets the "created_at" field. +func (bru *BusRouteUpdate) SetCreatedAt(t time.Time) *BusRouteUpdate { + bru.mutation.SetCreatedAt(t) + return bru +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (bru *BusRouteUpdate) SetNillableCreatedAt(t *time.Time) *BusRouteUpdate { + if t != nil { + bru.SetCreatedAt(*t) + } + return bru +} + +// SetUpdatedAt sets the "updated_at" field. +func (bru *BusRouteUpdate) SetUpdatedAt(t time.Time) *BusRouteUpdate { + bru.mutation.SetUpdatedAt(t) + return bru +} + // AddBuIDs adds the "bus" edge to the Bus entity by IDs. func (bru *BusRouteUpdate) AddBuIDs(ids ...uuid.UUID) *BusRouteUpdate { bru.mutation.AddBuIDs(ids...) @@ -90,6 +111,36 @@ func (bru *BusRouteUpdate) AddBusRouteAssociations(b ...*BusRouteAssociation) *B return bru.AddBusRouteAssociationIDs(ids...) } +// AddMorningBusIDs adds the "morning_buses" edge to the Bus entity by IDs. +func (bru *BusRouteUpdate) AddMorningBusIDs(ids ...uuid.UUID) *BusRouteUpdate { + bru.mutation.AddMorningBusIDs(ids...) + return bru +} + +// AddMorningBuses adds the "morning_buses" edges to the Bus entity. +func (bru *BusRouteUpdate) AddMorningBuses(b ...*Bus) *BusRouteUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bru.AddMorningBusIDs(ids...) +} + +// AddEveningBusIDs adds the "evening_buses" edge to the Bus entity by IDs. +func (bru *BusRouteUpdate) AddEveningBusIDs(ids ...uuid.UUID) *BusRouteUpdate { + bru.mutation.AddEveningBusIDs(ids...) + return bru +} + +// AddEveningBuses adds the "evening_buses" edges to the Bus entity. +func (bru *BusRouteUpdate) AddEveningBuses(b ...*Bus) *BusRouteUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bru.AddEveningBusIDs(ids...) +} + // Mutation returns the BusRouteMutation object of the builder. func (bru *BusRouteUpdate) Mutation() *BusRouteMutation { return bru.mutation @@ -158,8 +209,51 @@ func (bru *BusRouteUpdate) RemoveBusRouteAssociations(b ...*BusRouteAssociation) return bru.RemoveBusRouteAssociationIDs(ids...) } +// ClearMorningBuses clears all "morning_buses" edges to the Bus entity. +func (bru *BusRouteUpdate) ClearMorningBuses() *BusRouteUpdate { + bru.mutation.ClearMorningBuses() + return bru +} + +// RemoveMorningBusIDs removes the "morning_buses" edge to Bus entities by IDs. +func (bru *BusRouteUpdate) RemoveMorningBusIDs(ids ...uuid.UUID) *BusRouteUpdate { + bru.mutation.RemoveMorningBusIDs(ids...) + return bru +} + +// RemoveMorningBuses removes "morning_buses" edges to Bus entities. +func (bru *BusRouteUpdate) RemoveMorningBuses(b ...*Bus) *BusRouteUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bru.RemoveMorningBusIDs(ids...) +} + +// ClearEveningBuses clears all "evening_buses" edges to the Bus entity. +func (bru *BusRouteUpdate) ClearEveningBuses() *BusRouteUpdate { + bru.mutation.ClearEveningBuses() + return bru +} + +// RemoveEveningBusIDs removes the "evening_buses" edge to Bus entities by IDs. +func (bru *BusRouteUpdate) RemoveEveningBusIDs(ids ...uuid.UUID) *BusRouteUpdate { + bru.mutation.RemoveEveningBusIDs(ids...) + return bru +} + +// RemoveEveningBuses removes "evening_buses" edges to Bus entities. +func (bru *BusRouteUpdate) RemoveEveningBuses(b ...*Bus) *BusRouteUpdate { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bru.RemoveEveningBusIDs(ids...) +} + // Save executes the query and returns the number of nodes affected by the update operation. func (bru *BusRouteUpdate) Save(ctx context.Context) (int, error) { + bru.defaults() return withHooks(ctx, bru.sqlSave, bru.mutation, bru.hooks) } @@ -185,6 +279,14 @@ func (bru *BusRouteUpdate) ExecX(ctx context.Context) { } } +// defaults sets the default values of the builder before save. +func (bru *BusRouteUpdate) defaults() { + if _, ok := bru.mutation.UpdatedAt(); !ok { + v := busroute.UpdateDefaultUpdatedAt() + bru.mutation.SetUpdatedAt(v) + } +} + // check runs all checks and user-defined validators on the builder. func (bru *BusRouteUpdate) check() error { if v, ok := bru.mutation.BusType(); ok { @@ -210,6 +312,12 @@ func (bru *BusRouteUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := bru.mutation.BusType(); ok { _spec.SetField(busroute.FieldBusType, field.TypeEnum, value) } + if value, ok := bru.mutation.CreatedAt(); ok { + _spec.SetField(busroute.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := bru.mutation.UpdatedAt(); ok { + _spec.SetField(busroute.FieldUpdatedAt, field.TypeTime, value) + } if bru.mutation.BusCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2M, @@ -345,6 +453,96 @@ func (bru *BusRouteUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if bru.mutation.MorningBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.MorningBusesTable, + Columns: []string{busroute.MorningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.RemovedMorningBusesIDs(); len(nodes) > 0 && !bru.mutation.MorningBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.MorningBusesTable, + Columns: []string{busroute.MorningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.MorningBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.MorningBusesTable, + Columns: []string{busroute.MorningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bru.mutation.EveningBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.EveningBusesTable, + Columns: []string{busroute.EveningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.RemovedEveningBusesIDs(); len(nodes) > 0 && !bru.mutation.EveningBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.EveningBusesTable, + Columns: []string{busroute.EveningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bru.mutation.EveningBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.EveningBusesTable, + Columns: []string{busroute.EveningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } if n, err = sqlgraph.UpdateNodes(ctx, bru.driver, _spec); err != nil { if _, ok := err.(*sqlgraph.NotFoundError); ok { err = &NotFoundError{busroute.Label} @@ -379,6 +577,26 @@ func (bruo *BusRouteUpdateOne) SetNillableBusType(bt *busroute.BusType) *BusRout return bruo } +// SetCreatedAt sets the "created_at" field. +func (bruo *BusRouteUpdateOne) SetCreatedAt(t time.Time) *BusRouteUpdateOne { + bruo.mutation.SetCreatedAt(t) + return bruo +} + +// SetNillableCreatedAt sets the "created_at" field if the given value is not nil. +func (bruo *BusRouteUpdateOne) SetNillableCreatedAt(t *time.Time) *BusRouteUpdateOne { + if t != nil { + bruo.SetCreatedAt(*t) + } + return bruo +} + +// SetUpdatedAt sets the "updated_at" field. +func (bruo *BusRouteUpdateOne) SetUpdatedAt(t time.Time) *BusRouteUpdateOne { + bruo.mutation.SetUpdatedAt(t) + return bruo +} + // AddBuIDs adds the "bus" edge to the Bus entity by IDs. func (bruo *BusRouteUpdateOne) AddBuIDs(ids ...uuid.UUID) *BusRouteUpdateOne { bruo.mutation.AddBuIDs(ids...) @@ -424,6 +642,36 @@ func (bruo *BusRouteUpdateOne) AddBusRouteAssociations(b ...*BusRouteAssociation return bruo.AddBusRouteAssociationIDs(ids...) } +// AddMorningBusIDs adds the "morning_buses" edge to the Bus entity by IDs. +func (bruo *BusRouteUpdateOne) AddMorningBusIDs(ids ...uuid.UUID) *BusRouteUpdateOne { + bruo.mutation.AddMorningBusIDs(ids...) + return bruo +} + +// AddMorningBuses adds the "morning_buses" edges to the Bus entity. +func (bruo *BusRouteUpdateOne) AddMorningBuses(b ...*Bus) *BusRouteUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bruo.AddMorningBusIDs(ids...) +} + +// AddEveningBusIDs adds the "evening_buses" edge to the Bus entity by IDs. +func (bruo *BusRouteUpdateOne) AddEveningBusIDs(ids ...uuid.UUID) *BusRouteUpdateOne { + bruo.mutation.AddEveningBusIDs(ids...) + return bruo +} + +// AddEveningBuses adds the "evening_buses" edges to the Bus entity. +func (bruo *BusRouteUpdateOne) AddEveningBuses(b ...*Bus) *BusRouteUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bruo.AddEveningBusIDs(ids...) +} + // Mutation returns the BusRouteMutation object of the builder. func (bruo *BusRouteUpdateOne) Mutation() *BusRouteMutation { return bruo.mutation @@ -492,6 +740,48 @@ func (bruo *BusRouteUpdateOne) RemoveBusRouteAssociations(b ...*BusRouteAssociat return bruo.RemoveBusRouteAssociationIDs(ids...) } +// ClearMorningBuses clears all "morning_buses" edges to the Bus entity. +func (bruo *BusRouteUpdateOne) ClearMorningBuses() *BusRouteUpdateOne { + bruo.mutation.ClearMorningBuses() + return bruo +} + +// RemoveMorningBusIDs removes the "morning_buses" edge to Bus entities by IDs. +func (bruo *BusRouteUpdateOne) RemoveMorningBusIDs(ids ...uuid.UUID) *BusRouteUpdateOne { + bruo.mutation.RemoveMorningBusIDs(ids...) + return bruo +} + +// RemoveMorningBuses removes "morning_buses" edges to Bus entities. +func (bruo *BusRouteUpdateOne) RemoveMorningBuses(b ...*Bus) *BusRouteUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bruo.RemoveMorningBusIDs(ids...) +} + +// ClearEveningBuses clears all "evening_buses" edges to the Bus entity. +func (bruo *BusRouteUpdateOne) ClearEveningBuses() *BusRouteUpdateOne { + bruo.mutation.ClearEveningBuses() + return bruo +} + +// RemoveEveningBusIDs removes the "evening_buses" edge to Bus entities by IDs. +func (bruo *BusRouteUpdateOne) RemoveEveningBusIDs(ids ...uuid.UUID) *BusRouteUpdateOne { + bruo.mutation.RemoveEveningBusIDs(ids...) + return bruo +} + +// RemoveEveningBuses removes "evening_buses" edges to Bus entities. +func (bruo *BusRouteUpdateOne) RemoveEveningBuses(b ...*Bus) *BusRouteUpdateOne { + ids := make([]uuid.UUID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bruo.RemoveEveningBusIDs(ids...) +} + // Where appends a list predicates to the BusRouteUpdate builder. func (bruo *BusRouteUpdateOne) Where(ps ...predicate.BusRoute) *BusRouteUpdateOne { bruo.mutation.Where(ps...) @@ -507,6 +797,7 @@ func (bruo *BusRouteUpdateOne) Select(field string, fields ...string) *BusRouteU // Save executes the query and returns the updated BusRoute entity. func (bruo *BusRouteUpdateOne) Save(ctx context.Context) (*BusRoute, error) { + bruo.defaults() return withHooks(ctx, bruo.sqlSave, bruo.mutation, bruo.hooks) } @@ -532,6 +823,14 @@ func (bruo *BusRouteUpdateOne) ExecX(ctx context.Context) { } } +// defaults sets the default values of the builder before save. +func (bruo *BusRouteUpdateOne) defaults() { + if _, ok := bruo.mutation.UpdatedAt(); !ok { + v := busroute.UpdateDefaultUpdatedAt() + bruo.mutation.SetUpdatedAt(v) + } +} + // check runs all checks and user-defined validators on the builder. func (bruo *BusRouteUpdateOne) check() error { if v, ok := bruo.mutation.BusType(); ok { @@ -574,6 +873,12 @@ func (bruo *BusRouteUpdateOne) sqlSave(ctx context.Context) (_node *BusRoute, er if value, ok := bruo.mutation.BusType(); ok { _spec.SetField(busroute.FieldBusType, field.TypeEnum, value) } + if value, ok := bruo.mutation.CreatedAt(); ok { + _spec.SetField(busroute.FieldCreatedAt, field.TypeTime, value) + } + if value, ok := bruo.mutation.UpdatedAt(); ok { + _spec.SetField(busroute.FieldUpdatedAt, field.TypeTime, value) + } if bruo.mutation.BusCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.M2M, @@ -709,6 +1014,96 @@ func (bruo *BusRouteUpdateOne) sqlSave(ctx context.Context) (_node *BusRoute, er } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if bruo.mutation.MorningBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.MorningBusesTable, + Columns: []string{busroute.MorningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.RemovedMorningBusesIDs(); len(nodes) > 0 && !bruo.mutation.MorningBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.MorningBusesTable, + Columns: []string{busroute.MorningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.MorningBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.MorningBusesTable, + Columns: []string{busroute.MorningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } + if bruo.mutation.EveningBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.EveningBusesTable, + Columns: []string{busroute.EveningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.RemovedEveningBusesIDs(); len(nodes) > 0 && !bruo.mutation.EveningBusesCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.EveningBusesTable, + Columns: []string{busroute.EveningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bruo.mutation.EveningBusesIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: busroute.EveningBusesTable, + Columns: []string{busroute.EveningBusesColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bus.FieldID, field.TypeUUID), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } _node = &BusRoute{config: bruo.config} _spec.Assign = _node.assignValues _spec.ScanValues = _node.scanValues diff --git a/backend/domain/repository/ent/client.go b/backend/domain/repository/ent/client.go index e095b7a3..e8863d0e 100644 --- a/backend/domain/repository/ent/client.go +++ b/backend/domain/repository/ent/client.go @@ -617,6 +617,38 @@ func (c *BusClient) QueryBusRoute(b *Bus) *BusRouteQuery { return query } +// QueryLatestMorningRoute queries the latest_morning_route edge of a Bus. +func (c *BusClient) QueryLatestMorningRoute(b *Bus) *BusRouteQuery { + query := (&BusRouteClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.To(busroute.Table, busroute.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.LatestMorningRouteTable, bus.LatestMorningRouteColumn), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryLatestEveningRoute queries the latest_evening_route edge of a Bus. +func (c *BusClient) QueryLatestEveningRoute(b *Bus) *BusRouteQuery { + query := (&BusRouteClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(bus.Table, bus.FieldID, id), + sqlgraph.To(busroute.Table, busroute.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bus.LatestEveningRouteTable, bus.LatestEveningRouteColumn), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + // Hooks returns the client hooks. func (c *BusClient) Hooks() []Hook { return c.hooks.Bus @@ -798,6 +830,38 @@ func (c *BusRouteClient) QueryBusRouteAssociations(br *BusRoute) *BusRouteAssoci return query } +// QueryMorningBuses queries the morning_buses edge of a BusRoute. +func (c *BusRouteClient) QueryMorningBuses(br *BusRoute) *BusQuery { + query := (&BusClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := br.ID + step := sqlgraph.NewStep( + sqlgraph.From(busroute.Table, busroute.FieldID, id), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, busroute.MorningBusesTable, busroute.MorningBusesColumn), + ) + fromV = sqlgraph.Neighbors(br.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// QueryEveningBuses queries the evening_buses edge of a BusRoute. +func (c *BusRouteClient) QueryEveningBuses(br *BusRoute) *BusQuery { + query := (&BusClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := br.ID + step := sqlgraph.NewStep( + sqlgraph.From(busroute.Table, busroute.FieldID, id), + sqlgraph.To(bus.Table, bus.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, busroute.EveningBusesTable, busroute.EveningBusesColumn), + ) + fromV = sqlgraph.Neighbors(br.driver.Dialect(), step) + return fromV, nil + } + return query +} + // Hooks returns the client hooks. func (c *BusRouteClient) Hooks() []Hook { return c.hooks.BusRoute diff --git a/backend/domain/repository/ent/migrate/schema.go b/backend/domain/repository/ent/migrate/schema.go index e91c8cd2..1694f7c6 100644 --- a/backend/domain/repository/ent/migrate/schema.go +++ b/backend/domain/repository/ent/migrate/schema.go @@ -49,6 +49,8 @@ var ( {Name: "updated_at", Type: field.TypeTime}, {Name: "bus_nursery", Type: field.TypeUUID, Nullable: true}, {Name: "bus_next_station", Type: field.TypeUUID, Nullable: true}, + {Name: "bus_latest_morning_route", Type: field.TypeUUID, Nullable: true}, + {Name: "bus_latest_evening_route", Type: field.TypeUUID, Nullable: true}, } // BusTable holds the schema information for the "bus" table. BusTable = &schema.Table{ @@ -68,12 +70,26 @@ var ( RefColumns: []*schema.Column{StationsColumns[0]}, OnDelete: schema.SetNull, }, + { + Symbol: "bus_bus_routes_latest_morning_route", + Columns: []*schema.Column{BusColumns[11]}, + RefColumns: []*schema.Column{BusRoutesColumns[0]}, + OnDelete: schema.SetNull, + }, + { + Symbol: "bus_bus_routes_latest_evening_route", + Columns: []*schema.Column{BusColumns[12]}, + RefColumns: []*schema.Column{BusRoutesColumns[0]}, + OnDelete: schema.SetNull, + }, }, } // BusRoutesColumns holds the columns for the "bus_routes" table. BusRoutesColumns = []*schema.Column{ {Name: "id", Type: field.TypeUUID, Unique: true}, {Name: "bus_type", Type: field.TypeEnum, Enums: []string{"morning", "evening"}}, + {Name: "created_at", Type: field.TypeTime}, + {Name: "updated_at", Type: field.TypeTime}, } // BusRoutesTable holds the schema information for the "bus_routes" table. BusRoutesTable = &schema.Table{ @@ -299,6 +315,8 @@ func init() { BoardingRecordsTable.ForeignKeys[1].RefTable = ChildsTable BusTable.ForeignKeys[0].RefTable = NurseriesTable BusTable.ForeignKeys[1].RefTable = StationsTable + BusTable.ForeignKeys[2].RefTable = BusRoutesTable + BusTable.ForeignKeys[3].RefTable = BusRoutesTable BusRouteAssociationsTable.ForeignKeys[0].RefTable = BusRoutesTable BusRouteAssociationsTable.ForeignKeys[1].RefTable = StationsTable ChildsTable.ForeignKeys[0].RefTable = GuardiansTable diff --git a/backend/domain/repository/ent/mutation.go b/backend/domain/repository/ent/mutation.go index 9ad54dfa..c8aede49 100644 --- a/backend/domain/repository/ent/mutation.go +++ b/backend/domain/repository/ent/mutation.go @@ -561,33 +561,37 @@ func (m *BoardingRecordMutation) ResetEdge(name string) error { // BusMutation represents an operation that mutates the Bus nodes in the graph. type BusMutation struct { config - op Op - typ string - id *uuid.UUID - name *string - plate_number *string - latitude *float64 - addlatitude *float64 - longitude *float64 - addlongitude *float64 - status *bus.Status - enable_face_recognition *bool - created_at *time.Time - updated_at *time.Time - clearedFields map[string]struct{} - nursery *uuid.UUID - clearednursery bool - boarding_records map[uuid.UUID]struct{} - removedboarding_records map[uuid.UUID]struct{} - clearedboarding_records bool - next_station *uuid.UUID - clearednext_station bool - bus_route map[uuid.UUID]struct{} - removedbus_route map[uuid.UUID]struct{} - clearedbus_route bool - done bool - oldValue func(context.Context) (*Bus, error) - predicates []predicate.Bus + op Op + typ string + id *uuid.UUID + name *string + plate_number *string + latitude *float64 + addlatitude *float64 + longitude *float64 + addlongitude *float64 + status *bus.Status + enable_face_recognition *bool + created_at *time.Time + updated_at *time.Time + clearedFields map[string]struct{} + nursery *uuid.UUID + clearednursery bool + boarding_records map[uuid.UUID]struct{} + removedboarding_records map[uuid.UUID]struct{} + clearedboarding_records bool + next_station *uuid.UUID + clearednext_station bool + bus_route map[uuid.UUID]struct{} + removedbus_route map[uuid.UUID]struct{} + clearedbus_route bool + latest_morning_route *uuid.UUID + clearedlatest_morning_route bool + latest_evening_route *uuid.UUID + clearedlatest_evening_route bool + done bool + oldValue func(context.Context) (*Bus, error) + predicates []predicate.Bus } var _ ent.Mutation = (*BusMutation)(nil) @@ -1249,6 +1253,84 @@ func (m *BusMutation) ResetBusRoute() { m.removedbus_route = nil } +// SetLatestMorningRouteID sets the "latest_morning_route" edge to the BusRoute entity by id. +func (m *BusMutation) SetLatestMorningRouteID(id uuid.UUID) { + m.latest_morning_route = &id +} + +// ClearLatestMorningRoute clears the "latest_morning_route" edge to the BusRoute entity. +func (m *BusMutation) ClearLatestMorningRoute() { + m.clearedlatest_morning_route = true +} + +// LatestMorningRouteCleared reports if the "latest_morning_route" edge to the BusRoute entity was cleared. +func (m *BusMutation) LatestMorningRouteCleared() bool { + return m.clearedlatest_morning_route +} + +// LatestMorningRouteID returns the "latest_morning_route" edge ID in the mutation. +func (m *BusMutation) LatestMorningRouteID() (id uuid.UUID, exists bool) { + if m.latest_morning_route != nil { + return *m.latest_morning_route, true + } + return +} + +// LatestMorningRouteIDs returns the "latest_morning_route" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// LatestMorningRouteID instead. It exists only for internal usage by the builders. +func (m *BusMutation) LatestMorningRouteIDs() (ids []uuid.UUID) { + if id := m.latest_morning_route; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetLatestMorningRoute resets all changes to the "latest_morning_route" edge. +func (m *BusMutation) ResetLatestMorningRoute() { + m.latest_morning_route = nil + m.clearedlatest_morning_route = false +} + +// SetLatestEveningRouteID sets the "latest_evening_route" edge to the BusRoute entity by id. +func (m *BusMutation) SetLatestEveningRouteID(id uuid.UUID) { + m.latest_evening_route = &id +} + +// ClearLatestEveningRoute clears the "latest_evening_route" edge to the BusRoute entity. +func (m *BusMutation) ClearLatestEveningRoute() { + m.clearedlatest_evening_route = true +} + +// LatestEveningRouteCleared reports if the "latest_evening_route" edge to the BusRoute entity was cleared. +func (m *BusMutation) LatestEveningRouteCleared() bool { + return m.clearedlatest_evening_route +} + +// LatestEveningRouteID returns the "latest_evening_route" edge ID in the mutation. +func (m *BusMutation) LatestEveningRouteID() (id uuid.UUID, exists bool) { + if m.latest_evening_route != nil { + return *m.latest_evening_route, true + } + return +} + +// LatestEveningRouteIDs returns the "latest_evening_route" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// LatestEveningRouteID instead. It exists only for internal usage by the builders. +func (m *BusMutation) LatestEveningRouteIDs() (ids []uuid.UUID) { + if id := m.latest_evening_route; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetLatestEveningRoute resets all changes to the "latest_evening_route" edge. +func (m *BusMutation) ResetLatestEveningRoute() { + m.latest_evening_route = nil + m.clearedlatest_evening_route = false +} + // Where appends a list predicates to the BusMutation builder. func (m *BusMutation) Where(ps ...predicate.Bus) { m.predicates = append(m.predicates, ps...) @@ -1549,7 +1631,7 @@ func (m *BusMutation) ResetField(name string) error { // AddedEdges returns all edge names that were set/added in this mutation. func (m *BusMutation) AddedEdges() []string { - edges := make([]string, 0, 4) + edges := make([]string, 0, 6) if m.nursery != nil { edges = append(edges, bus.EdgeNursery) } @@ -1562,6 +1644,12 @@ func (m *BusMutation) AddedEdges() []string { if m.bus_route != nil { edges = append(edges, bus.EdgeBusRoute) } + if m.latest_morning_route != nil { + edges = append(edges, bus.EdgeLatestMorningRoute) + } + if m.latest_evening_route != nil { + edges = append(edges, bus.EdgeLatestEveningRoute) + } return edges } @@ -1589,13 +1677,21 @@ func (m *BusMutation) AddedIDs(name string) []ent.Value { ids = append(ids, id) } return ids + case bus.EdgeLatestMorningRoute: + if id := m.latest_morning_route; id != nil { + return []ent.Value{*id} + } + case bus.EdgeLatestEveningRoute: + if id := m.latest_evening_route; id != nil { + return []ent.Value{*id} + } } return nil } // RemovedEdges returns all edge names that were removed in this mutation. func (m *BusMutation) RemovedEdges() []string { - edges := make([]string, 0, 4) + edges := make([]string, 0, 6) if m.removedboarding_records != nil { edges = append(edges, bus.EdgeBoardingRecords) } @@ -1627,7 +1723,7 @@ func (m *BusMutation) RemovedIDs(name string) []ent.Value { // ClearedEdges returns all edge names that were cleared in this mutation. func (m *BusMutation) ClearedEdges() []string { - edges := make([]string, 0, 4) + edges := make([]string, 0, 6) if m.clearednursery { edges = append(edges, bus.EdgeNursery) } @@ -1640,6 +1736,12 @@ func (m *BusMutation) ClearedEdges() []string { if m.clearedbus_route { edges = append(edges, bus.EdgeBusRoute) } + if m.clearedlatest_morning_route { + edges = append(edges, bus.EdgeLatestMorningRoute) + } + if m.clearedlatest_evening_route { + edges = append(edges, bus.EdgeLatestEveningRoute) + } return edges } @@ -1655,6 +1757,10 @@ func (m *BusMutation) EdgeCleared(name string) bool { return m.clearednext_station case bus.EdgeBusRoute: return m.clearedbus_route + case bus.EdgeLatestMorningRoute: + return m.clearedlatest_morning_route + case bus.EdgeLatestEveningRoute: + return m.clearedlatest_evening_route } return false } @@ -1669,6 +1775,12 @@ func (m *BusMutation) ClearEdge(name string) error { case bus.EdgeNextStation: m.ClearNextStation() return nil + case bus.EdgeLatestMorningRoute: + m.ClearLatestMorningRoute() + return nil + case bus.EdgeLatestEveningRoute: + m.ClearLatestEveningRoute() + return nil } return fmt.Errorf("unknown Bus unique edge %s", name) } @@ -1689,6 +1801,12 @@ func (m *BusMutation) ResetEdge(name string) error { case bus.EdgeBusRoute: m.ResetBusRoute() return nil + case bus.EdgeLatestMorningRoute: + m.ResetLatestMorningRoute() + return nil + case bus.EdgeLatestEveningRoute: + m.ResetLatestEveningRoute() + return nil } return fmt.Errorf("unknown Bus edge %s", name) } @@ -1700,6 +1818,8 @@ type BusRouteMutation struct { typ string id *uuid.UUID bus_type *busroute.BusType + created_at *time.Time + updated_at *time.Time clearedFields map[string]struct{} bus map[uuid.UUID]struct{} removedbus map[uuid.UUID]struct{} @@ -1710,6 +1830,12 @@ type BusRouteMutation struct { busRouteAssociations map[int]struct{} removedbusRouteAssociations map[int]struct{} clearedbusRouteAssociations bool + morning_buses map[uuid.UUID]struct{} + removedmorning_buses map[uuid.UUID]struct{} + clearedmorning_buses bool + evening_buses map[uuid.UUID]struct{} + removedevening_buses map[uuid.UUID]struct{} + clearedevening_buses bool done bool oldValue func(context.Context) (*BusRoute, error) predicates []predicate.BusRoute @@ -1855,6 +1981,78 @@ func (m *BusRouteMutation) ResetBusType() { m.bus_type = nil } +// SetCreatedAt sets the "created_at" field. +func (m *BusRouteMutation) SetCreatedAt(t time.Time) { + m.created_at = &t +} + +// CreatedAt returns the value of the "created_at" field in the mutation. +func (m *BusRouteMutation) CreatedAt() (r time.Time, exists bool) { + v := m.created_at + if v == nil { + return + } + return *v, true +} + +// OldCreatedAt returns the old "created_at" field's value of the BusRoute entity. +// If the BusRoute object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusRouteMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldCreatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldCreatedAt: %w", err) + } + return oldValue.CreatedAt, nil +} + +// ResetCreatedAt resets all changes to the "created_at" field. +func (m *BusRouteMutation) ResetCreatedAt() { + m.created_at = nil +} + +// SetUpdatedAt sets the "updated_at" field. +func (m *BusRouteMutation) SetUpdatedAt(t time.Time) { + m.updated_at = &t +} + +// UpdatedAt returns the value of the "updated_at" field in the mutation. +func (m *BusRouteMutation) UpdatedAt() (r time.Time, exists bool) { + v := m.updated_at + if v == nil { + return + } + return *v, true +} + +// OldUpdatedAt returns the old "updated_at" field's value of the BusRoute entity. +// If the BusRoute object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BusRouteMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldUpdatedAt: %w", err) + } + return oldValue.UpdatedAt, nil +} + +// ResetUpdatedAt resets all changes to the "updated_at" field. +func (m *BusRouteMutation) ResetUpdatedAt() { + m.updated_at = nil +} + // AddBuIDs adds the "bus" edge to the Bus entity by ids. func (m *BusRouteMutation) AddBuIDs(ids ...uuid.UUID) { if m.bus == nil { @@ -2017,6 +2215,114 @@ func (m *BusRouteMutation) ResetBusRouteAssociations() { m.removedbusRouteAssociations = nil } +// AddMorningBusIDs adds the "morning_buses" edge to the Bus entity by ids. +func (m *BusRouteMutation) AddMorningBusIDs(ids ...uuid.UUID) { + if m.morning_buses == nil { + m.morning_buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.morning_buses[ids[i]] = struct{}{} + } +} + +// ClearMorningBuses clears the "morning_buses" edge to the Bus entity. +func (m *BusRouteMutation) ClearMorningBuses() { + m.clearedmorning_buses = true +} + +// MorningBusesCleared reports if the "morning_buses" edge to the Bus entity was cleared. +func (m *BusRouteMutation) MorningBusesCleared() bool { + return m.clearedmorning_buses +} + +// RemoveMorningBusIDs removes the "morning_buses" edge to the Bus entity by IDs. +func (m *BusRouteMutation) RemoveMorningBusIDs(ids ...uuid.UUID) { + if m.removedmorning_buses == nil { + m.removedmorning_buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.morning_buses, ids[i]) + m.removedmorning_buses[ids[i]] = struct{}{} + } +} + +// RemovedMorningBuses returns the removed IDs of the "morning_buses" edge to the Bus entity. +func (m *BusRouteMutation) RemovedMorningBusesIDs() (ids []uuid.UUID) { + for id := range m.removedmorning_buses { + ids = append(ids, id) + } + return +} + +// MorningBusesIDs returns the "morning_buses" edge IDs in the mutation. +func (m *BusRouteMutation) MorningBusesIDs() (ids []uuid.UUID) { + for id := range m.morning_buses { + ids = append(ids, id) + } + return +} + +// ResetMorningBuses resets all changes to the "morning_buses" edge. +func (m *BusRouteMutation) ResetMorningBuses() { + m.morning_buses = nil + m.clearedmorning_buses = false + m.removedmorning_buses = nil +} + +// AddEveningBusIDs adds the "evening_buses" edge to the Bus entity by ids. +func (m *BusRouteMutation) AddEveningBusIDs(ids ...uuid.UUID) { + if m.evening_buses == nil { + m.evening_buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + m.evening_buses[ids[i]] = struct{}{} + } +} + +// ClearEveningBuses clears the "evening_buses" edge to the Bus entity. +func (m *BusRouteMutation) ClearEveningBuses() { + m.clearedevening_buses = true +} + +// EveningBusesCleared reports if the "evening_buses" edge to the Bus entity was cleared. +func (m *BusRouteMutation) EveningBusesCleared() bool { + return m.clearedevening_buses +} + +// RemoveEveningBusIDs removes the "evening_buses" edge to the Bus entity by IDs. +func (m *BusRouteMutation) RemoveEveningBusIDs(ids ...uuid.UUID) { + if m.removedevening_buses == nil { + m.removedevening_buses = make(map[uuid.UUID]struct{}) + } + for i := range ids { + delete(m.evening_buses, ids[i]) + m.removedevening_buses[ids[i]] = struct{}{} + } +} + +// RemovedEveningBuses returns the removed IDs of the "evening_buses" edge to the Bus entity. +func (m *BusRouteMutation) RemovedEveningBusesIDs() (ids []uuid.UUID) { + for id := range m.removedevening_buses { + ids = append(ids, id) + } + return +} + +// EveningBusesIDs returns the "evening_buses" edge IDs in the mutation. +func (m *BusRouteMutation) EveningBusesIDs() (ids []uuid.UUID) { + for id := range m.evening_buses { + ids = append(ids, id) + } + return +} + +// ResetEveningBuses resets all changes to the "evening_buses" edge. +func (m *BusRouteMutation) ResetEveningBuses() { + m.evening_buses = nil + m.clearedevening_buses = false + m.removedevening_buses = nil +} + // Where appends a list predicates to the BusRouteMutation builder. func (m *BusRouteMutation) Where(ps ...predicate.BusRoute) { m.predicates = append(m.predicates, ps...) @@ -2051,10 +2357,16 @@ func (m *BusRouteMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *BusRouteMutation) Fields() []string { - fields := make([]string, 0, 1) + fields := make([]string, 0, 3) if m.bus_type != nil { fields = append(fields, busroute.FieldBusType) } + if m.created_at != nil { + fields = append(fields, busroute.FieldCreatedAt) + } + if m.updated_at != nil { + fields = append(fields, busroute.FieldUpdatedAt) + } return fields } @@ -2065,6 +2377,10 @@ func (m *BusRouteMutation) Field(name string) (ent.Value, bool) { switch name { case busroute.FieldBusType: return m.BusType() + case busroute.FieldCreatedAt: + return m.CreatedAt() + case busroute.FieldUpdatedAt: + return m.UpdatedAt() } return nil, false } @@ -2076,6 +2392,10 @@ func (m *BusRouteMutation) OldField(ctx context.Context, name string) (ent.Value switch name { case busroute.FieldBusType: return m.OldBusType(ctx) + case busroute.FieldCreatedAt: + return m.OldCreatedAt(ctx) + case busroute.FieldUpdatedAt: + return m.OldUpdatedAt(ctx) } return nil, fmt.Errorf("unknown BusRoute field %s", name) } @@ -2092,6 +2412,20 @@ func (m *BusRouteMutation) SetField(name string, value ent.Value) error { } m.SetBusType(v) return nil + case busroute.FieldCreatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetCreatedAt(v) + return nil + case busroute.FieldUpdatedAt: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetUpdatedAt(v) + return nil } return fmt.Errorf("unknown BusRoute field %s", name) } @@ -2144,13 +2478,19 @@ func (m *BusRouteMutation) ResetField(name string) error { case busroute.FieldBusType: m.ResetBusType() return nil + case busroute.FieldCreatedAt: + m.ResetCreatedAt() + return nil + case busroute.FieldUpdatedAt: + m.ResetUpdatedAt() + return nil } return fmt.Errorf("unknown BusRoute field %s", name) } // AddedEdges returns all edge names that were set/added in this mutation. func (m *BusRouteMutation) AddedEdges() []string { - edges := make([]string, 0, 3) + edges := make([]string, 0, 5) if m.bus != nil { edges = append(edges, busroute.EdgeBus) } @@ -2160,6 +2500,12 @@ func (m *BusRouteMutation) AddedEdges() []string { if m.busRouteAssociations != nil { edges = append(edges, busroute.EdgeBusRouteAssociations) } + if m.morning_buses != nil { + edges = append(edges, busroute.EdgeMorningBuses) + } + if m.evening_buses != nil { + edges = append(edges, busroute.EdgeEveningBuses) + } return edges } @@ -2185,13 +2531,25 @@ func (m *BusRouteMutation) AddedIDs(name string) []ent.Value { ids = append(ids, id) } return ids + case busroute.EdgeMorningBuses: + ids := make([]ent.Value, 0, len(m.morning_buses)) + for id := range m.morning_buses { + ids = append(ids, id) + } + return ids + case busroute.EdgeEveningBuses: + ids := make([]ent.Value, 0, len(m.evening_buses)) + for id := range m.evening_buses { + ids = append(ids, id) + } + return ids } return nil } // RemovedEdges returns all edge names that were removed in this mutation. func (m *BusRouteMutation) RemovedEdges() []string { - edges := make([]string, 0, 3) + edges := make([]string, 0, 5) if m.removedbus != nil { edges = append(edges, busroute.EdgeBus) } @@ -2201,6 +2559,12 @@ func (m *BusRouteMutation) RemovedEdges() []string { if m.removedbusRouteAssociations != nil { edges = append(edges, busroute.EdgeBusRouteAssociations) } + if m.removedmorning_buses != nil { + edges = append(edges, busroute.EdgeMorningBuses) + } + if m.removedevening_buses != nil { + edges = append(edges, busroute.EdgeEveningBuses) + } return edges } @@ -2226,13 +2590,25 @@ func (m *BusRouteMutation) RemovedIDs(name string) []ent.Value { ids = append(ids, id) } return ids + case busroute.EdgeMorningBuses: + ids := make([]ent.Value, 0, len(m.removedmorning_buses)) + for id := range m.removedmorning_buses { + ids = append(ids, id) + } + return ids + case busroute.EdgeEveningBuses: + ids := make([]ent.Value, 0, len(m.removedevening_buses)) + for id := range m.removedevening_buses { + ids = append(ids, id) + } + return ids } return nil } // ClearedEdges returns all edge names that were cleared in this mutation. func (m *BusRouteMutation) ClearedEdges() []string { - edges := make([]string, 0, 3) + edges := make([]string, 0, 5) if m.clearedbus { edges = append(edges, busroute.EdgeBus) } @@ -2242,6 +2618,12 @@ func (m *BusRouteMutation) ClearedEdges() []string { if m.clearedbusRouteAssociations { edges = append(edges, busroute.EdgeBusRouteAssociations) } + if m.clearedmorning_buses { + edges = append(edges, busroute.EdgeMorningBuses) + } + if m.clearedevening_buses { + edges = append(edges, busroute.EdgeEveningBuses) + } return edges } @@ -2255,6 +2637,10 @@ func (m *BusRouteMutation) EdgeCleared(name string) bool { return m.clearedchildBusAssociations case busroute.EdgeBusRouteAssociations: return m.clearedbusRouteAssociations + case busroute.EdgeMorningBuses: + return m.clearedmorning_buses + case busroute.EdgeEveningBuses: + return m.clearedevening_buses } return false } @@ -2280,6 +2666,12 @@ func (m *BusRouteMutation) ResetEdge(name string) error { case busroute.EdgeBusRouteAssociations: m.ResetBusRouteAssociations() return nil + case busroute.EdgeMorningBuses: + m.ResetMorningBuses() + return nil + case busroute.EdgeEveningBuses: + m.ResetEveningBuses() + return nil } return fmt.Errorf("unknown BusRoute edge %s", name) } diff --git a/backend/domain/repository/ent/runtime.go b/backend/domain/repository/ent/runtime.go index 72df9d8b..e114cf3b 100644 --- a/backend/domain/repository/ent/runtime.go +++ b/backend/domain/repository/ent/runtime.go @@ -57,6 +57,16 @@ func init() { bus.DefaultID = busDescID.Default.(func() uuid.UUID) busrouteFields := schema.BusRoute{}.Fields() _ = busrouteFields + // busrouteDescCreatedAt is the schema descriptor for created_at field. + busrouteDescCreatedAt := busrouteFields[2].Descriptor() + // busroute.DefaultCreatedAt holds the default value on creation for the created_at field. + busroute.DefaultCreatedAt = busrouteDescCreatedAt.Default.(time.Time) + // busrouteDescUpdatedAt is the schema descriptor for updated_at field. + busrouteDescUpdatedAt := busrouteFields[3].Descriptor() + // busroute.DefaultUpdatedAt holds the default value on creation for the updated_at field. + busroute.DefaultUpdatedAt = busrouteDescUpdatedAt.Default.(func() time.Time) + // busroute.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. + busroute.UpdateDefaultUpdatedAt = busrouteDescUpdatedAt.UpdateDefault.(func() time.Time) // busrouteDescID is the schema descriptor for id field. busrouteDescID := busrouteFields[0].Descriptor() // busroute.DefaultID holds the default value on creation for the id field. diff --git a/backend/domain/repository/ent/schema/bus.go b/backend/domain/repository/ent/schema/bus.go index 6748b4c1..4680759a 100644 --- a/backend/domain/repository/ent/schema/bus.go +++ b/backend/domain/repository/ent/schema/bus.go @@ -39,5 +39,9 @@ func (Bus) Edges() []ent.Edge { edge.To("next_station", Station.Type).Unique(), edge.From("bus_route", BusRoute.Type). Ref("bus"), + edge.To("latest_morning_route", BusRoute.Type). + Unique(), // 夕方のバスルートの最新のものを参照するエッジ + edge.To("latest_evening_route", BusRoute.Type). + Unique(), } } diff --git a/backend/domain/repository/ent/schema/bus_route.go b/backend/domain/repository/ent/schema/bus_route.go index b5aa3745..a926f4d9 100644 --- a/backend/domain/repository/ent/schema/bus_route.go +++ b/backend/domain/repository/ent/schema/bus_route.go @@ -1,6 +1,8 @@ package schema import ( + "time" + "entgo.io/ent" "entgo.io/ent/schema/edge" "entgo.io/ent/schema/field" @@ -18,6 +20,8 @@ func (BusRoute) Fields() []ent.Field { field.UUID("id", uuid.UUID{}).Default(uuid.New).StorageKey("id").Unique(), field.Enum("bus_type"). Values("morning", "evening").Comment("朝のバスか放課後のバスかを示す"), + field.Time("created_at").Default(time.Now()), + field.Time("updated_at").Default(time.Now).UpdateDefault(time.Now), } } @@ -27,5 +31,11 @@ func (BusRoute) Edges() []ent.Edge { edge.To("bus", Bus.Type), edge.To("childBusAssociations", ChildBusAssociation.Type), edge.To("busRouteAssociations", BusRouteAssociation.Type), + // このバスルートを朝の最新ルートとして参照するバス + edge.From("morning_buses", Bus.Type). + Ref("latest_morning_route"), + // このバスルートを夕方の最新ルートとして参照するバス + edge.From("evening_buses", Bus.Type). + Ref("latest_evening_route"), } } From 2f8ccdc003571f92549924e4c74ea5d705131824 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Thu, 22 Feb 2024 16:47:21 +0900 Subject: [PATCH 639/771] =?UTF-8?q?fix(ml):=20=E7=AC=91=E9=A1=94=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E3=81=8C=E8=A1=8C=E3=82=8F=E3=82=8C=E3=81=9F=E9=9A=9B?= =?UTF-8?q?=E3=81=AE=E7=94=BB=E5=83=8F=E3=81=AE=E4=BF=9D=E5=AD=98=E5=90=8D?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/pred.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index 05aa2da6..a67fb23b 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -94,7 +94,7 @@ def get_clipped_faces_from_images(args, config, detecter, save_bucket): now = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) save_face_image_to_remote( smile_image, - f"{args.nursery_id}/{args.bus_id}/{now}_{switch_to_bus_type(args.bus_type)}.png", + f"{args.nursery_id}/{args.bus_id}/{now}_{smile_degree}.png", save_bucket, ) all_faces.extend(clipped_faces) From 5e2f0aec54ffda557d113f131938328bb8c801e2 Mon Sep 17 00:00:00 2001 From: Mizuki Baba <76275131+lovelovetrb@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:13:22 +0900 Subject: [PATCH 640/771] Feature/machine learning/smiley detection (#159) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(ml): 正しい環境変数を設定 * fix(ml): 誤ったブランチ名を修正 * refactor * feat(ml): 笑顔判定の機能を追加 * fix(ml): 笑顔判定が行われた際の画像の保存名を変更 --- .github/workflows/deploy_cloudrun_machine_learning.yml | 2 ++ machine_learning/Dockerfile | 2 +- machine_learning/src/face_detect_model/pred.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index e68596f9..ac05ecd5 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -4,7 +4,9 @@ on: push: branches: - develop + - feature/machine-learning/cicd paths: + - ".github/workflows/deploy_cloudrun_machine_learning.yml" - "machine_learning/**" permissions: diff --git a/machine_learning/Dockerfile b/machine_learning/Dockerfile index 3030bf61..af01ace8 100644 --- a/machine_learning/Dockerfile +++ b/machine_learning/Dockerfile @@ -29,7 +29,7 @@ COPY ./src /machine-learning/src RUN mkdir -p /machine-learning/secrets && \ echo "PROJECT_ID=$GCP_PROJECT_ID" > /machine-learning/secrets/.env && \ echo "BUCKET_NAME=$BUCKET_NAME_FOR_ML" >> /machine-learning/secrets/.env && \ - echo "BUCKET_NAME=$BUCKET_NAME_FOR_FACE" >> /machine-learning/secrets/.env + echo "BUCKET_NAME_FOR_FACE=$BUCKET_NAME_FOR_FACE" >> /machine-learning/secrets/.env # 環境変数PATHの設定 ENV PYTHONPATH "${PYTHONPATH}:/machine-learning/src/" diff --git a/machine_learning/src/face_detect_model/pred.py b/machine_learning/src/face_detect_model/pred.py index 05aa2da6..a67fb23b 100644 --- a/machine_learning/src/face_detect_model/pred.py +++ b/machine_learning/src/face_detect_model/pred.py @@ -94,7 +94,7 @@ def get_clipped_faces_from_images(args, config, detecter, save_bucket): now = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) save_face_image_to_remote( smile_image, - f"{args.nursery_id}/{args.bus_id}/{now}_{switch_to_bus_type(args.bus_type)}.png", + f"{args.nursery_id}/{args.bus_id}/{now}_{smile_degree}.png", save_bucket, ) all_faces.extend(clipped_faces) From d350f0bfa91f6cb27f02a9a3ffea55e3cffd026e Mon Sep 17 00:00:00 2001 From: KikyoNanakusa <65284574+KikyoNanakusa@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:36:32 +0900 Subject: [PATCH 641/771] =?UTF-8?q?feat:=E3=82=AB=E3=83=A1=E3=83=A9?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AB=E4=B9=97=E3=82=8A=E9=99=8D?= =?UTF-8?q?=E3=82=8A=E3=82=B9=E3=82=A4=E3=83=83=E3=83=81=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=20(#160)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/ios/Runner/Info.plist | 15 +++++ frontend/where_child_bus/lib/app.dart | 4 +- .../lib/components/child_list/child_list.dart | 10 ++-- .../child_list/child_list_with_button.dart | 5 +- .../child_list/child_list_with_mark.dart | 4 +- .../element/child_list_element.dart | 27 +++++---- .../child_list_element_with_button.dart | 2 +- .../guardian_list/guardian_list.dart | 4 +- .../where_child_bus/lib/config/config.dart | 8 +-- frontend/where_child_bus/lib/main.dart | 3 +- .../lib/pages/auth_page/auth_page.dart | 7 ++- .../bus_edit_page/bus_edit_page.dart | 5 +- .../components/confirm_button.dart | 2 +- .../components/guardians_list.dart | 2 +- .../components/input_field_title.dart | 9 +-- .../bus_edit_page/styles/styles.dart | 15 ++--- .../pages/bus_list_page/bus_list_page.dart | 4 +- .../bus_passenger_page.dart | 2 + .../create_station_page.dart | 8 +-- .../create_station_page/locate_user.dart | 28 ++++----- .../widget/google_map.dart | 10 ++-- .../widgets/operation_button.dart | 6 +- .../camera_page/camera_bus_select_page.dart | 14 ++++- .../lib/pages/camera_page/camera_page.dart | 48 ++++++++++++---- .../components/bus_select_box.dart | 35 ------------ .../components/time_select_box.dart | 41 ------------- .../camera_page/widget/time_select_box.dart | 54 ++++++++++++++++++ .../camera_page/widgets/bus_select_box.dart | 48 ++++++++++++++++ .../camera_page/widgets/riding_toggle.dart | 43 ++++++++++++++ .../camera_page/widgets/time_select_box.dart | 54 ++++++++++++++++++ .../pages/register_page/register_page.dart | 4 +- ...ail_sheet.dart => child_detail_sheet.dart} | 57 +++++++++++-------- ...nt_edit_page.dart => child_edit_page.dart} | 0 ...nt_list_page.dart => child_list_page.dart} | 2 +- .../components/utils/input_form_body.dart | 6 +- .../get_guardian_list_by_nursery_id.dart | 1 - .../where_child_bus/lib/util/api/bus.dart | 1 - .../where_child_bus/lib/util/api/child.dart | 11 +++- .../lib/util/api/health_check.dart | 2 +- .../lib/util/api/nursery_login.dart | 8 +-- .../where_child_bus/lib/util/api/station.dart | 3 +- .../validation/create_bus_validation.dart | 2 - .../test/login_request_test.dart | 3 - 43 files changed, 401 insertions(+), 216 deletions(-) delete mode 100644 frontend/where_child_bus/lib/pages/camera_page/components/bus_select_box.dart delete mode 100644 frontend/where_child_bus/lib/pages/camera_page/components/time_select_box.dart create mode 100644 frontend/where_child_bus/lib/pages/camera_page/widget/time_select_box.dart create mode 100644 frontend/where_child_bus/lib/pages/camera_page/widgets/bus_select_box.dart create mode 100644 frontend/where_child_bus/lib/pages/camera_page/widgets/riding_toggle.dart create mode 100644 frontend/where_child_bus/lib/pages/camera_page/widgets/time_select_box.dart rename frontend/where_child_bus/lib/pages/student_list_page/{student_detail_sheet.dart => child_detail_sheet.dart} (74%) rename frontend/where_child_bus/lib/pages/student_list_page/{student_edit_page.dart => child_edit_page.dart} (100%) rename frontend/where_child_bus/lib/pages/student_list_page/{student_list_page.dart => child_list_page.dart} (97%) delete mode 100644 frontend/where_child_bus/test/login_request_test.dart diff --git a/frontend/where_child_bus/ios/Runner/Info.plist b/frontend/where_child_bus/ios/Runner/Info.plist index e4f2164c..eda5bf04 100644 --- a/frontend/where_child_bus/ios/Runner/Info.plist +++ b/frontend/where_child_bus/ios/Runner/Info.plist @@ -4,6 +4,14 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + + + NSPhotoLibraryUsageDescription + Photo Library Access Warning + NSCameraUsageDescription + Camera Library Access Warning + + CFBundleDisplayName Where Child Bus CFBundleExecutable @@ -45,5 +53,12 @@ UIApplicationSupportsIndirectInputEvents + + NSCameraUsageDescription + カメラを使う理由・用途を記述(ここをちゃんと書かないと、Appleのレビューでリジェクトされます) + NSMicrophoneUsageDescription + マイクを使う理由・用途を記述(ここをちゃんと書かないと、Appleのレビューでリジェクトされます) + + diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index a4e546d4..76b28426 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -2,10 +2,10 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_list_page.dart'; import 'package:where_child_bus/pages/camera_page/camera_bus_select_page.dart'; import 'package:where_child_bus/pages/notification_page/notification_page.dart'; -import 'package:where_child_bus/pages/student_list_page/student_list_page.dart'; +import 'package:where_child_bus/pages/student_list_page/child_list_page.dart'; class App extends StatefulWidget { - App({ + const App({ super.key, }); diff --git a/frontend/where_child_bus/lib/components/child_list/child_list.dart b/frontend/where_child_bus/lib/components/child_list/child_list.dart index 9dd98ea1..8824dfe0 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/element/child_list_element.dart'; -import 'package:where_child_bus/pages/student_list_page/student_detail_sheet.dart'; +import 'package:where_child_bus/pages/student_list_page/child_detail_sheet.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class ChildList extends StatefulWidget { @@ -27,14 +27,14 @@ class _ChildListState extends State { separatorBuilder: (BuildContext context, int index) => const Divider(height: 20, color: Colors.transparent), itemBuilder: (BuildContext context, int index) => - childListElement(context, index), + _createChildListElements(context, index), ); } - Widget childListElement(BuildContext context, int index) { + Widget _createChildListElements(BuildContext context, int index) { return ChildListElement( title: widget.children[index].name, - subtitle: widget.children[index].id, + subtitle: "${widget.children[index].age.toString()}歳", image: widget.images[index], onTap: () { if (widget.callback == null) { @@ -45,7 +45,7 @@ class _ChildListState extends State { }); } - childDetailModal(int index) async { + Future childDetailModal(int index) async { await showModalBottomSheet( context: context, builder: (BuildContext context) { diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart b/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart index 5215145e..5c9fd418 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list_with_button.dart @@ -1,3 +1,4 @@ +import "dart:developer" as developer; import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/element/child_list_element_with_button.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -40,11 +41,11 @@ class _ChildListWithButtonState extends State { buttonIconType: widget.buttonIconTypes[index], // 各アイテムに対応するアイコンタイプ onTap: () { // ここでリストアイテムがタップされたときの動作を定義 - print("${widget.childNames[index]}がタップされました"); + developer.log("${widget.childNames[index]}がタップされました"); }, onButtonTap: () { // ここでアイコンボタンがタップされたときの動作を定義 - print("${widget.childNames[index]}のボタンがタップされました"); + developer.log("${widget.childNames[index]}のボタンがタップされました"); }, ); }, diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart b/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart index 97c3b399..07c9b9e1 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart @@ -17,7 +17,9 @@ class ChildListWithMark extends StatefulWidget { }) : super(key: key); @override - _ChildListWithMarkState createState() => _ChildListWithMarkState(); + State createState() { + return _ChildListWithMarkState(); + } } class _ChildListWithMarkState extends State { diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart index 8a1802ae..909dd8a9 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element.dart @@ -20,14 +20,14 @@ class ChildListElement extends StatelessWidget { @override Widget build(BuildContext context) { - return listElementPadding( + return _listElementPadding( Card( elevation: 8, clipBehavior: Clip.antiAliasWithSaveLayer, child: Material( - color: Colors.white, // Cardの背景色 + color: Colors.white, child: InkWell( - onTap: onTap, // タップ時のアクション + onTap: onTap, child: Padding( padding: const EdgeInsets.all(8.0), child: Row( @@ -36,9 +36,9 @@ class ChildListElement extends StatelessWidget { imageData: image.photoData, height: 100, width: 100), const SizedBox(width: 16), Expanded( - child: titleAndSubTitle(title, subtitle), + child: _createTitleAndSubTitle(title, subtitle), ), - if (actionButton != null) actionButton!, // アクションボタンを表示 + if (actionButton != null) actionButton!, ], ), ), @@ -48,27 +48,30 @@ class ChildListElement extends StatelessWidget { ); } - Column titleAndSubTitle(String title, String subtitle) { + Column _createTitleAndSubTitle(String title, String subtitle) { return Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - titleText(title), - subTitleText(subtitle), + _createTitleText(title), + _createSubTitleText(subtitle), ], ); } - Text titleText(String title) { + Text _createTitleText(String title) { return Text(title, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)); } - Text subTitleText(String subtitle) { - return Text(subtitle); + Widget _createSubTitleText(String subtitle) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Text(subtitle), + ); } - Padding listElementPadding(Widget child) { + Padding _listElementPadding(Widget child) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 20), child: child, diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart index 60a47119..2f429f66 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_button.dart @@ -11,7 +11,7 @@ class ChildListElementWithButton extends StatefulWidget { final VoidCallback? onButtonTap; final ButtonIconType buttonIconType; - ChildListElementWithButton({ + const ChildListElementWithButton({ Key? key, required this.childName, required this.groupName, diff --git a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart index e6fd9f6e..05cb8876 100644 --- a/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart +++ b/frontend/where_child_bus/lib/components/guardian_list/guardian_list.dart @@ -30,13 +30,13 @@ class _GuardiansListState extends State { return SingleChildScrollView( child: Column( children: [ - Container( + SizedBox( height: calculateAddedGuardiansHeight(), child: ReorderableListView( onReorder: (int oldIndex, int newIndex) => onReorder(oldIndex, newIndex), shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), + physics: const NeverScrollableScrollPhysics(), children: widget.selectedGuardians.map((item) { int index = widget.selectedGuardians.indexOf(item); return SelectedGuardianListElement( diff --git a/frontend/where_child_bus/lib/config/config.dart b/frontend/where_child_bus/lib/config/config.dart index 0e31b27d..b7f1b3cc 100644 --- a/frontend/where_child_bus/lib/config/config.dart +++ b/frontend/where_child_bus/lib/config/config.dart @@ -1,3 +1,4 @@ +import "dart:developer" as developer; import 'package:flutter_dotenv/flutter_dotenv.dart'; class AppConfig { @@ -16,13 +17,12 @@ class AppConfig { await dotenv.load(); try { - grpcEndpoint = dotenv.get("GRPC_ENDPOINT"); grpcPort = int.tryParse(dotenv.get("GRPC_PORT")) ?? 0; - } catch(e) { - print("設定の読み込みにエラーが発生しました"); + } catch (e) { + developer.log("設定の読み込みにエラーが発生しました", error: e, name: "AppConfigError"); } } } -final appConfig = AppConfig(); \ No newline at end of file +final appConfig = AppConfig(); diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 96aa862f..9db8a646 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -1,3 +1,4 @@ +import "dart:developer" as developer; import 'package:camera/camera.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/config/config.dart'; @@ -13,7 +14,7 @@ Future main() async { await appConfig.loadConfig(); await serviceHealthCheck(); } catch (e) { - print("Failed to initialize the app"); + developer.log("Failed to initialize the app", error: e, name: "main"); } //カメラを取得 diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index 70a9dabc..2b36677a 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -1,3 +1,4 @@ +import 'dart:developer' as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; @@ -134,8 +135,8 @@ class _AuthPageState extends State { } if (res.success) { - print(res.success); - print(res.nursery.name); + developer.log("${res.success}"); + developer.log(res.nursery.name); NurseryData().setNursery(res.nursery); Navigator.pushReplacement( currentContext, @@ -145,7 +146,7 @@ class _AuthPageState extends State { ); } else { // ログイン失敗時の処理をここに記述 - print('Login failed'); + developer.log('Login failed'); } } catch (e) { if (mounted) { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index cbf6f765..d69a968d 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -14,10 +14,10 @@ import 'package:where_child_bus/util/validation/create_bus_validation.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class BusEditPage extends StatefulWidget { - Bus? bus; + final Bus? bus; final BusEditPageType busEditPageType; - BusEditPage({super.key, this.bus, required this.busEditPageType}); + const BusEditPage({super.key, this.bus, required this.busEditPageType}); @override _BusEditPageState createState() => _BusEditPageState(); @@ -94,6 +94,7 @@ class _BusEditPageState extends State { morningSelectedGuardiansId, eveningSelectedGuardiansId, ); + developer.log("バスの作成に成功しました: $res", name: "BusEditPage"); Navigator.pop(context); } catch (e) { if (kDebugMode) { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart index 1dc89016..887fef5e 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart @@ -5,7 +5,7 @@ class ConfirmButton extends StatelessWidget { final VoidCallback? onTap; final double fontSize = 20; - ConfirmButton({required this.buttonText, this.onTap}); + const ConfirmButton({super.key, required this.buttonText, this.onTap}); @override Widget build(BuildContext context) { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart index 2598b81e..f172d9af 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/guardians_list.dart @@ -4,7 +4,7 @@ import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.da class GuardiansList extends StatelessWidget { final List guardiansList; - GuardiansList({required this.guardiansList}); + const GuardiansList({super.key, required this.guardiansList}); @override Widget build(BuildContext context) { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field_title.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field_title.dart index 2eb606c0..085fe043 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field_title.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/input_field_title.dart @@ -4,16 +4,13 @@ import "package:where_child_bus/pages/bus_list_page/bus_edit_page/styles/styles. class InputFieldTitle extends StatelessWidget { final String title; - const InputFieldTitle({required this.title}); + const InputFieldTitle({super.key, required this.title}); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.symmetric(vertical: 5), - child: Text( - title, - style: normalText() - ), + child: Text(title, style: normalText()), ); } -} \ No newline at end of file +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart index ca0ac818..513eaa90 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/styles/styles.dart @@ -1,19 +1,16 @@ import "package:flutter/material.dart"; -ButtonStyle editButtonStyle () { +ButtonStyle editButtonStyle() { return ButtonStyle( - backgroundColor: MaterialStateProperty.all(Colors.grey.shade300), - minimumSize: MaterialStateProperty.all(Size(60, 60)), - shape: MaterialStateProperty.all( - const CircleBorder( + backgroundColor: MaterialStateProperty.all(Colors.grey.shade300), + minimumSize: MaterialStateProperty.all(const Size(60, 60)), + shape: MaterialStateProperty.all(const CircleBorder( side: BorderSide( color: Colors.white, width: 1, style: BorderStyle.solid, ), - ) - ) - ); + ))); } InputDecoration editPageInputDecoration(String labelText, String hintText) { @@ -37,4 +34,4 @@ TextStyle normalText() { color: Colors.black, fontSize: 16, ); -} \ No newline at end of file +} diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 042c5c76..46ad0f18 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -93,7 +93,7 @@ class _BusListPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - if (_isFailLoading) LoadFailText(), + if (_isFailLoading) const LoadFailText(), if (buses.isEmpty) const NoBusRegisteredText(), Expanded( child: RefreshIndicator( @@ -110,7 +110,7 @@ class _BusListPageState extends State { Navigator.push( context, MaterialPageRoute( - builder: (context) => BusEditPage( + builder: (context) => const BusEditPage( busEditPageType: BusEditPageType.create, ))); }, diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart index 01096ae0..accfa6fe 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart @@ -23,6 +23,8 @@ class BusPassengerPage extends StatefulWidget { "2", ]; + BusPassengerPage({super.key}); + @override _BusPassengerPage createState() => _BusPassengerPage(); } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart index 14a9565f..78474d2f 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart @@ -64,7 +64,7 @@ class _CreateStationPageState extends State { try { var res = await updateStation(stations[_index].id, widget.bus.id, _markers.first.position.latitude, _markers.first.position.longitude); - developer.log("バス停の更新が完了しました"); + developer.log("バス停の更新が完了しました $res", name: "CreateStationPage"); setState(() { _markers.clear(); if (_index < guardians.length - 1) { @@ -77,7 +77,7 @@ class _CreateStationPageState extends State { }); } catch (e) { if (kDebugMode) { - developer.log("バス停の更新中にエラーが発生しました: $e"); + developer.log("バス停の更新中にエラーが発生しました: $e", name: "CreateStationPageError"); } } @@ -134,10 +134,10 @@ class _CreateStationPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Padding( - padding: EdgeInsets.all(10), + padding: const EdgeInsets.all(10), child: Text( '${guardians[_index].name}さん', - style: TextStyle(fontSize: 20), + style: const TextStyle(fontSize: 20), ), ), Padding( diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/locate_user.dart b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/locate_user.dart index 85dfca40..0bca592f 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/locate_user.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/locate_user.dart @@ -4,33 +4,33 @@ import 'package:location/location.dart'; Future locateUser( GoogleMapController mapController, VoidCallback? onLocate) async { - Location location = new Location(); + Location location = Location(); - bool _serviceEnabled; - PermissionStatus _permissionGranted; - LocationData _locationData; + bool serviceEnabled; + PermissionStatus permissionGranted; + LocationData locationData; - _serviceEnabled = await location.serviceEnabled(); - if (!_serviceEnabled) { - _serviceEnabled = await location.requestService(); - if (!_serviceEnabled) { + serviceEnabled = await location.serviceEnabled(); + if (!serviceEnabled) { + serviceEnabled = await location.requestService(); + if (!serviceEnabled) { return; } } - _permissionGranted = await location.hasPermission(); - if (_permissionGranted == PermissionStatus.denied) { - _permissionGranted = await location.requestPermission(); - if (_permissionGranted != PermissionStatus.granted) { + permissionGranted = await location.hasPermission(); + if (permissionGranted == PermissionStatus.denied) { + permissionGranted = await location.requestPermission(); + if (permissionGranted != PermissionStatus.granted) { return; } } - _locationData = await location.getLocation(); + locationData = await location.getLocation(); mapController.animateCamera( CameraUpdate.newCameraPosition( CameraPosition( - target: LatLng(_locationData.latitude!, _locationData.longitude!), + target: LatLng(locationData.latitude!, locationData.longitude!), zoom: 15.0, ), ), diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/google_map.dart b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/google_map.dart index 250ce459..87851fe5 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/google_map.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/widget/google_map.dart @@ -4,9 +4,9 @@ import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:where_child_bus/pages/bus_list_page/create_station_page/locate_user.dart'; class GoogleMapWidget extends StatefulWidget { - Function(Set) onTapped; + final Function(Set) onTapped; - GoogleMapWidget({super.key, required this.onTapped}); + const GoogleMapWidget({super.key, required this.onTapped}); @override State createState() => _GoogleMapWidgetState(); @@ -14,7 +14,7 @@ class GoogleMapWidget extends StatefulWidget { class _GoogleMapWidgetState extends State { late GoogleMapController mapController; - Set _markers = {}; + final Set _markers = {}; final LatLng _center = const LatLng(35.68145403034362, 139.76707116150914); @@ -38,7 +38,7 @@ class _GoogleMapWidgetState extends State { _markers.clear(); // 新しいマーカーのID - final markerId = MarkerId("unique_id"); + const markerId = MarkerId("unique_id"); // 新しいマーカーの作成 final marker = Marker( @@ -50,7 +50,7 @@ class _GoogleMapWidgetState extends State { _markers.add(marker); }); - widget.onTapped?.call(_markers); + widget.onTapped.call(_markers); } @override diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/widgets/operation_button.dart b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/operation_button.dart index 6750ab5e..328c1b43 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/widgets/operation_button.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/operation_button.dart @@ -6,10 +6,10 @@ import 'package:where_child_bus/util/api/bus.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class OperationButton extends StatefulWidget { - Bus bus; - Function(Bus) onBusUpdated; + final Bus bus; + final Function(Bus) onBusUpdated; - OperationButton({ + const OperationButton({ super.key, required this.bus, required this.onBusUpdated, diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart index 4e82156d..32dc2995 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart @@ -5,8 +5,8 @@ import 'package:where_child_bus/components/util/input_value_label.dart'; import 'package:where_child_bus/models/nursery_bus_data.dart'; import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus/pages/camera_page/camera_page.dart'; -import 'package:where_child_bus/pages/camera_page/components/bus_select_box.dart'; -import 'package:where_child_bus/pages/camera_page/components/time_select_box.dart'; +import 'package:where_child_bus/pages/camera_page/widgets/bus_select_box.dart'; +import 'package:where_child_bus/pages/camera_page/widgets/time_select_box.dart'; import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pb.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -22,6 +22,7 @@ class _BusSelectPageState extends State { Bus? _selectedBus; BusType _selectedType = BusType.BUS_TYPE_MORNING; List _buses = []; + Future>? _busesFuture; Future> _loadBuses() async { if (NurseryBusData().getBusList().isNotEmpty) { @@ -43,6 +44,13 @@ class _BusSelectPageState extends State { } } + @override + void initState() { + super.initState(); + // _loadBuses()の結果をフィールドに保持 + _busesFuture = _loadBuses(); + } + @override Widget build(BuildContext context) { return Scaffold( @@ -52,7 +60,7 @@ class _BusSelectPageState extends State { Widget _createPageBody() { return FutureBuilder>( - future: _loadBuses(), + future: _busesFuture, builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { return const Center(child: CircularProgressIndicator()); diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index e4e6051a..772f3416 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -1,29 +1,32 @@ import 'dart:async'; import 'dart:developer' as developer; +import 'dart:io'; import 'package:flutter/material.dart'; import 'package:camera/camera.dart'; import 'package:grpc/grpc.dart'; import 'package:where_child_bus/config/config.dart'; import 'package:where_child_bus/models/nursery_data.dart'; +import 'package:where_child_bus/pages/camera_page/widgets/riding_toggle.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; import "package:where_child_bus/main.dart" as where_child_bus; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class CameraPage extends StatefulWidget { - Bus bus; - BusType busType; + final Bus bus; + final BusType busType; - CameraPage({Key? key, required this.bus, required this.busType}) + const CameraPage({Key? key, required this.bus, required this.busType}) : super(key: key); @override - _CameraPageState createState() => _CameraPageState(); + State createState() => _CameraPageState(); } class _CameraPageState extends State { late CameraController _controller; final StreamController _streamController = StreamController.broadcast(); + VehicleEvent _vehicleEvent = VehicleEvent.VEHICLE_EVENT_GET_ON; @override void initState() { @@ -59,9 +62,8 @@ class _CameraPageState extends State { final res = grpcClient.streamBusVideo(requestStream); try { - developer.log("Streamed video to server"); await for (var response in res.asStream()) { - developer.log("Received response: $response"); + developer.log("Received response: $response", name: "CameraPage"); } } catch (error) { developer.log("Caught Error:", error: error); @@ -77,19 +79,21 @@ class _CameraPageState extends State { _controller.startImageStream((CameraImage image) { frameCounter++; if (frameCounter % 60 == 0) { - videoChunks.add(image.planes[0].bytes.toList()); + //TODO プラットフォームで画像を変える + if (Platform.isAndroid) { + videoChunks.add(image.planes[0].bytes.toList()); + } else if (Platform.isIOS) { + videoChunks.add(image.planes[0].bytes.toList()); + } _streamController.add(StreamBusVideoRequest( nurseryId: NurseryData().getNursery().id, busId: widget.bus.id, busType: widget.busType, - //TODO VheicleEventを動的にする - vehicleEvent: VehicleEvent.VEHICLE_EVENT_GET_ON, + vehicleEvent: _vehicleEvent, videoChunk: videoChunks, photoHeight: image.height, photoWidth: image.width, )); - developer.log("Received image frame ${videoChunks}", - name: "CameraPage"); developer.log("width ${image.width}", name: "CameraPage"); developer.log("height ${image.height}", name: "CameraPage"); @@ -115,7 +119,27 @@ class _CameraPageState extends State { appBar: AppBar( title: const Text("カメラ"), ), - body: CameraPreview(_controller), + body: _createPageBody(), + ); + } + + Widget _createPageBody() { + return Stack( + children: [ + CameraPreview(_controller), + Positioned( + right: 15, + child: RidingToggle( + onToggled: (event) => { + setState(() { + if (event) { + _vehicleEvent = VehicleEvent.VEHICLE_EVENT_GET_ON; + } else { + _vehicleEvent = VehicleEvent.VEHICLE_EVENT_GET_OFF; + } + }), + })) + ], ); } } diff --git a/frontend/where_child_bus/lib/pages/camera_page/components/bus_select_box.dart b/frontend/where_child_bus/lib/pages/camera_page/components/bus_select_box.dart deleted file mode 100644 index 50366d55..00000000 --- a/frontend/where_child_bus/lib/pages/camera_page/components/bus_select_box.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; - -class BusSelectValueBox extends StatefulWidget { - final List busLists; - final Function(Bus?) onChanged; - Bus? selectedBus; - - BusSelectValueBox( - {required this.busLists, required this.onChanged, super.key}); - @override - State createState() => _SelectValueBox(); -} - -class _SelectValueBox extends State { - @override - Widget build(BuildContext context) { - return SizedBox( - width: MediaQuery.of(context).size.width * 0.8, - height: 50, - child: DropdownButton( - value: widget.selectedBus ?? widget.busLists.first, - items: widget.busLists - .map((Bus list) => - DropdownMenuItem(value: list, child: Text(list.name))) - .toList(), - onChanged: (Bus? value) { - setState(() { - widget.selectedBus = value; - }); - widget.onChanged(value); - }), - ); - } -} diff --git a/frontend/where_child_bus/lib/pages/camera_page/components/time_select_box.dart b/frontend/where_child_bus/lib/pages/camera_page/components/time_select_box.dart deleted file mode 100644 index 5d62849c..00000000 --- a/frontend/where_child_bus/lib/pages/camera_page/components/time_select_box.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; - -class TimeSelectValueBox extends StatefulWidget { - final Function(BusType) onChanged; - BusType selectedType = BusType.BUS_TYPE_MORNING; - - TimeSelectValueBox({required this.onChanged, super.key}); - @override - State createState() => _TimeSelectValueBox(); -} - -class _TimeSelectValueBox extends State { - @override - Widget build(BuildContext context) { - return SizedBox( - width: MediaQuery.of(context).size.width * 0.8, - height: 50, - child: DropdownButton( - value: widget.selectedType, - items: const [ - DropdownMenuItem( - value: BusType.BUS_TYPE_MORNING, - child: Text("行き"), - ), - DropdownMenuItem( - value: BusType.BUS_TYPE_EVENING, - child: Text("帰り"), - ), - ], - onChanged: (BusType? value) { - if (value != null && mounted) { - setState(() { - widget.selectedType = value; - }); - widget.onChanged(value); - } - }), - ); - } -} diff --git a/frontend/where_child_bus/lib/pages/camera_page/widget/time_select_box.dart b/frontend/where_child_bus/lib/pages/camera_page/widget/time_select_box.dart new file mode 100644 index 00000000..63d27447 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/camera_page/widget/time_select_box.dart @@ -0,0 +1,54 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class TimeSelectValueBox extends StatefulWidget { + final Function(BusType) onChanged; + final BusType initialSelectedType; + + const TimeSelectValueBox( + {required this.onChanged, + this.initialSelectedType = BusType.BUS_TYPE_MORNING, + super.key}); + + @override + State createState() => _TimeSelectValueBoxState(); +} + +class _TimeSelectValueBoxState extends State { + late BusType _selectedType; + + @override + void initState() { + super.initState(); + _selectedType = widget.initialSelectedType; // 初期状態を設定 + } + + @override + Widget build(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 50, + child: DropdownButton( + value: _selectedType, // 選択された状態を使用 + items: const [ + DropdownMenuItem( + value: BusType.BUS_TYPE_MORNING, + child: Text("行き"), + ), + DropdownMenuItem( + value: BusType.BUS_TYPE_EVENING, + child: Text("帰り"), + ), + ], + onChanged: (BusType? value) { + if (value != null) { + setState(() { + _selectedType = value; // 選択された値で更新 + }); + widget.onChanged(value); // 親ウィジェットに変更を通知 + } + }, + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/camera_page/widgets/bus_select_box.dart b/frontend/where_child_bus/lib/pages/camera_page/widgets/bus_select_box.dart new file mode 100644 index 00000000..f30a8015 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/camera_page/widgets/bus_select_box.dart @@ -0,0 +1,48 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class BusSelectValueBox extends StatefulWidget { + final List busLists; + final Function(Bus?) onChanged; + final Bus? selectedBus; + + const BusSelectValueBox({ + required this.busLists, + required this.onChanged, + this.selectedBus, + super.key, + }); + + @override + State createState() => _BusSelectValueBoxState(); +} + +class _BusSelectValueBoxState extends State { + Bus? _selectedBus; + + @override + void initState() { + super.initState(); + _selectedBus = widget.selectedBus ?? widget.busLists.first; + } + + @override + Widget build(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 50, + child: DropdownButton( + value: _selectedBus, + items: widget.busLists.map((Bus bus) { + return DropdownMenuItem(value: bus, child: Text(bus.name)); + }).toList(), + onChanged: (Bus? value) { + setState(() { + _selectedBus = value; + }); + widget.onChanged(value); + }, + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/camera_page/widgets/riding_toggle.dart b/frontend/where_child_bus/lib/pages/camera_page/widgets/riding_toggle.dart new file mode 100644 index 00000000..b8943a98 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/camera_page/widgets/riding_toggle.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; + +class RidingToggle extends StatefulWidget { + final Function(bool) onToggled; + + const RidingToggle({required this.onToggled, super.key}); + + @override + _RidingToggleState createState() => _RidingToggleState(); +} + +class _RidingToggleState extends State { + bool _isRide = true; + + @override + Widget build(BuildContext context) { + return SizedBox( + width: 130, + child: Card( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + // "乗り"または"降り"のテキストを表示 + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(_isRide ? "乗り" : "降り"), + ), + // スイッチを表示 + Switch( + value: _isRide, + onChanged: (bool value) { + setState(() { + _isRide = value; + }); + widget.onToggled(value); + }, + ), + ], + ), + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/camera_page/widgets/time_select_box.dart b/frontend/where_child_bus/lib/pages/camera_page/widgets/time_select_box.dart new file mode 100644 index 00000000..63d27447 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/camera_page/widgets/time_select_box.dart @@ -0,0 +1,54 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class TimeSelectValueBox extends StatefulWidget { + final Function(BusType) onChanged; + final BusType initialSelectedType; + + const TimeSelectValueBox( + {required this.onChanged, + this.initialSelectedType = BusType.BUS_TYPE_MORNING, + super.key}); + + @override + State createState() => _TimeSelectValueBoxState(); +} + +class _TimeSelectValueBoxState extends State { + late BusType _selectedType; + + @override + void initState() { + super.initState(); + _selectedType = widget.initialSelectedType; // 初期状態を設定 + } + + @override + Widget build(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 50, + child: DropdownButton( + value: _selectedType, // 選択された状態を使用 + items: const [ + DropdownMenuItem( + value: BusType.BUS_TYPE_MORNING, + child: Text("行き"), + ), + DropdownMenuItem( + value: BusType.BUS_TYPE_EVENING, + child: Text("帰り"), + ), + ], + onChanged: (BusType? value) { + if (value != null) { + setState(() { + _selectedType = value; // 選択された値で更新 + }); + widget.onChanged(value); // 親ウィジェットに変更を通知 + } + }, + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index fc0b204f..f9847a2c 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -127,8 +127,8 @@ class _RegisterPageState extends State { padding: const EdgeInsets.all(8.0), child: TextField( controller: controller, - decoration: - InputDecoration(border: OutlineInputBorder(), labelText: label), + decoration: InputDecoration( + border: const OutlineInputBorder(), labelText: label), keyboardType: keyboardType, obscureText: isObscure, ), diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/child_detail_sheet.dart similarity index 74% rename from frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart rename to frontend/where_child_bus/lib/pages/student_list_page/child_detail_sheet.dart index 3a7508f7..d5e51b68 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/child_detail_sheet.dart @@ -1,7 +1,7 @@ import "dart:developer" as developer; import 'package:flutter/material.dart'; import 'package:where_child_bus/components/util/image_from_byte.dart'; -import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; +import 'package:where_child_bus/pages/student_list_page/child_edit_page.dart'; import 'package:where_child_bus/service/get_guardians_list_by_child_id.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -13,7 +13,7 @@ class StudentDetailSheet extends StatefulWidget { : super(key: key); @override - _StudentDetailSheetState createState() => _StudentDetailSheetState(); + State createState() => _StudentDetailSheetState(); } class _StudentDetailSheetState extends State { @@ -42,7 +42,8 @@ class _StudentDetailSheetState extends State { }); } } catch (error) { - developer.log("Caught ErrorAAAAAA", error: error); + developer.log("Caught Error", + error: error, name: "StudentDetailSheetError"); if (mounted) { setState(() { _isLoading = false; @@ -76,15 +77,16 @@ class _StudentDetailSheetState extends State { margin: const EdgeInsets.only(top: 20), child: _isLoading ? const Center(child: CircularProgressIndicator()) - : childDetailList()) + : _childDetailList()) ], ); } Widget modalHeader(BuildContext context) { return Stack(children: [ - Align( - alignment: Alignment.topRight, + Positioned( + right: -10, + top: -10, child: ElevatedButton( style: ElevatedButton.styleFrom(shape: const CircleBorder()), onPressed: () { @@ -102,7 +104,7 @@ class _StudentDetailSheetState extends State { Widget childImageAndChildName() { return Row(children: [ - childFaceImage(), + _childFaceImage(), const SizedBox( width: 50, ), @@ -111,12 +113,12 @@ class _StudentDetailSheetState extends State { ]); } - Widget childFaceImage() { + Widget _childFaceImage() { return ImageFromBytes( imageData: widget.image.photoData, height: 100, width: 100); } - Widget childDetailList() { + Widget _childDetailList() { if (_isLoading) { return const Center( child: CircularProgressIndicator(), @@ -128,36 +130,41 @@ class _StudentDetailSheetState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - childDetailItem("年齢", "${widget.child.age}歳"), + _childDetailItem("年齢", "${widget.child.age}歳"), // childDetailItem("クラス", "1組"), - childDetailItem("保護者氏名", "${guardian.name}"), - childDetailItem("保護者連絡先", guardian.phoneNumber), - childDetailItem("利用バス", "○○コース"), + _childDetailItem("保護者氏名", guardian.name), + _childDetailItem("保護者連絡先", guardian.phoneNumber), + _childDetailItem("利用バス", "○○コース"), // childDetailItem("乗降場所", "○○駐車場前"), ], ); } } - Widget childDetailItem(String title, String element) { - return Row( - children: [ - detailItemTitle(title), - const SizedBox( - width: 50, - ), - Text(element, style: const TextStyle(color: Colors.black, fontSize: 18)) - ], + Widget _childDetailItem(String title, String element) { + return Padding( + padding: const EdgeInsets.all(4), + child: Row( + children: [ + detailItemTitle(title), + const SizedBox( + width: 50, + ), + Text(element, + style: const TextStyle(color: Colors.black, fontSize: 18)) + ], + ), ); } Widget detailItemTitle(String title) { + const double fontSize = 18; return SizedBox( - width: 18 * 6 + 6, + width: fontSize * 6 + 6, child: Text( title, - style: const TextStyle(color: Colors.black, fontSize: 18), - textAlign: TextAlign.center, + style: const TextStyle(color: Colors.black, fontSize: fontSize), + textAlign: TextAlign.left, ), ); } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/child_edit_page.dart similarity index 100% rename from frontend/where_child_bus/lib/pages/student_list_page/student_edit_page.dart rename to frontend/where_child_bus/lib/pages/student_list_page/child_edit_page.dart diff --git a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/child_list_page.dart similarity index 97% rename from frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart rename to frontend/where_child_bus/lib/pages/student_list_page/child_list_page.dart index 6d9b9bc8..aca3d929 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/student_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/child_list_page.dart @@ -3,7 +3,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/components/child_list/child_list.dart'; import 'package:where_child_bus/models/nursery_child_data.dart'; -import 'package:where_child_bus/pages/student_list_page/student_edit_page.dart'; +import 'package:where_child_bus/pages/student_list_page/child_edit_page.dart'; import 'package:where_child_bus/service/get_child_list_by_nursery_id.dart'; import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart'; diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index ad20a659..93bf74c2 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -14,9 +14,9 @@ import '../../../../components/util/select_value_box.dart'; import 'submit_button.dart'; class InputFormBody extends StatefulWidget { - Child? child; + final Child? child; - InputFormBody({Key? key, this.child}) : super(key: key); + const InputFormBody({Key? key, this.child}) : super(key: key); @override State createState() => _InputFormBodyState(); @@ -104,7 +104,7 @@ class _InputFormBodyState extends State { if (pickedFiles.isNotEmpty) { images = pickedFiles.map((xFile) => File(xFile.path)).toList(); } else { - print("画像が選択できませんでした。"); + developer.log("画像が選択できませんでした。"); } }); } diff --git a/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart b/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart index bb64540a..7ff1b00c 100644 --- a/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart +++ b/frontend/where_child_bus/lib/service/get_guardian_list_by_nursery_id.dart @@ -1,6 +1,5 @@ import 'package:where_child_bus/util/api/guardians.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/guardian.pbgrpc.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; Future getGuardianListByNurseryIdService( String nurseryId) async { diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index 797702b3..e713d0b7 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -2,7 +2,6 @@ import "dart:developer" as developer; import "package:flutter/foundation.dart"; import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; -import "package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; diff --git a/frontend/where_child_bus/lib/util/api/child.dart b/frontend/where_child_bus/lib/util/api/child.dart index 36f31c17..c9e05643 100644 --- a/frontend/where_child_bus/lib/util/api/child.dart +++ b/frontend/where_child_bus/lib/util/api/child.dart @@ -4,6 +4,7 @@ import "package:flutter/foundation.dart"; import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; Future performGrpcCall( Future Function(ChildServiceClient) grpcCall) async { @@ -12,7 +13,7 @@ Future performGrpcCall( port: appConfig.grpcPort, ); final grpcClient = ChildServiceClient(channel); - final Stopwatch stopwatch = new Stopwatch()..start(); + final Stopwatch stopwatch = Stopwatch()..start(); try { final result = await grpcCall(grpcClient); @@ -37,3 +38,11 @@ Future getChildListByNurseryId( return client.getChildListByNurseryID(req); }); } + +Future createChild(String nurseryId, String guardianId, + String name, int age, Sex sex, Iterable> photos) async { + return performGrpcCall((client) async { + var req = CreateChildRequest(); + return client.createChild(req); + }); +} diff --git a/frontend/where_child_bus/lib/util/api/health_check.dart b/frontend/where_child_bus/lib/util/api/health_check.dart index 5d84ef8d..1a4ed81b 100644 --- a/frontend/where_child_bus/lib/util/api/health_check.dart +++ b/frontend/where_child_bus/lib/util/api/health_check.dart @@ -17,7 +17,7 @@ Future serviceHealthCheck() async { var rqst = PingRequest(); rqst.name = "ping"; PingResponse res = await grpcClient.ping(rqst); - print(res.message); + developer.log(res.message); await channel.shutdown(); return res; } catch (error) { diff --git a/frontend/where_child_bus/lib/util/api/nursery_login.dart b/frontend/where_child_bus/lib/util/api/nursery_login.dart index e19f2f3b..c7d80569 100644 --- a/frontend/where_child_bus/lib/util/api/nursery_login.dart +++ b/frontend/where_child_bus/lib/util/api/nursery_login.dart @@ -13,9 +13,9 @@ Future nurseryLogin(String email, String password) async { var client = NurseryServiceClient(channel); try { var req = NurseryLoginRequest(email: email, password: password); - - if(kDebugMode) { - print("リクエスト: ${req}"); + + if (kDebugMode) { + print("リクエスト: $req"); } var res = await client.nurseryLogin(req); @@ -28,4 +28,4 @@ Future nurseryLogin(String email, String password) async { await channel.shutdown(); return Future.error(err); } -} \ No newline at end of file +} diff --git a/frontend/where_child_bus/lib/util/api/station.dart b/frontend/where_child_bus/lib/util/api/station.dart index f97ba8d4..e74dabb2 100644 --- a/frontend/where_child_bus/lib/util/api/station.dart +++ b/frontend/where_child_bus/lib/util/api/station.dart @@ -61,7 +61,7 @@ Future getUnregisteredStations( } } -Future updateStation( +Future updateStation( String stationId, String busId, double latitude, @@ -86,6 +86,7 @@ Future updateStation( developer.log("リクエスト: $req"); developer.log("レスポンス: $res"); } + return res; } catch (error) { developer.log("Caught Error:", error: error); return Future.error(error); diff --git a/frontend/where_child_bus/lib/util/validation/create_bus_validation.dart b/frontend/where_child_bus/lib/util/validation/create_bus_validation.dart index b62a4270..ae7048fd 100644 --- a/frontend/where_child_bus/lib/util/validation/create_bus_validation.dart +++ b/frontend/where_child_bus/lib/util/validation/create_bus_validation.dart @@ -1,5 +1,3 @@ -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; - class CreateBusValidator { static bool validateFields(String name, String plateNumber) { return name.isEmpty && plateNumber.isEmpty; diff --git a/frontend/where_child_bus/test/login_request_test.dart b/frontend/where_child_bus/test/login_request_test.dart deleted file mode 100644 index d4c7b914..00000000 --- a/frontend/where_child_bus/test/login_request_test.dart +++ /dev/null @@ -1,3 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:where_child_bus/util/api/nursery_login.dart'; - From 781ecde4d4c056120ea748a649f3ebde8da04bf6 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 22 Feb 2024 19:43:07 +0900 Subject: [PATCH 642/771] =?UTF-8?q?feat:=20proto=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/v1/bus_route.pb.dart | 70 +++++++++++-------- .../where_child_bus/v1/bus_route.pbgrpc.dart | 28 ++++---- .../where_child_bus/v1/bus_route.pbjson.dart | 36 +++++----- .../where_child_bus/v1/resources.pb.dart | 38 ++++++++-- .../where_child_bus/v1/resources.pbjson.dart | 19 +++-- .../where_child_bus/v1/bus_route_pb2.py | 20 +++--- .../where_child_bus/v1/bus_route_pb2.pyi | 10 +-- .../where_child_bus/v1/bus_route_pb2_grpc.py | 26 +++---- .../where_child_bus/v1/resources_pb2.py | 44 ++++++------ .../where_child_bus/v1/resources_pb2.pyi | 16 +++-- proto/where_child_bus/v1/bus_route.proto | 11 +-- proto/where_child_bus/v1/resources.proto | 4 +- 12 files changed, 190 insertions(+), 132 deletions(-) diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pb.dart index 15a791f1..30cfc608 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pb.dart @@ -20,6 +20,7 @@ class CreateBusRouteRequest extends $pb.GeneratedMessage { factory CreateBusRouteRequest({ $core.String? busId, $9.BusType? busType, + $core.String? nurseryId, $core.Iterable<$core.String>? guardianIds, }) { final $result = create(); @@ -29,6 +30,9 @@ class CreateBusRouteRequest extends $pb.GeneratedMessage { if (busType != null) { $result.busType = busType; } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } if (guardianIds != null) { $result.guardianIds.addAll(guardianIds); } @@ -41,7 +45,8 @@ class CreateBusRouteRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateBusRouteRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') ..e<$9.BusType>(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $9.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $9.BusType.valueOf, enumValues: $9.BusType.values) - ..pPS(3, _omitFieldNames ? '' : 'guardianIds') + ..aOS(3, _omitFieldNames ? '' : 'nurseryId') + ..pPS(4, _omitFieldNames ? '' : 'guardianIds') ..hasRequiredFields = false ; @@ -85,7 +90,16 @@ class CreateBusRouteRequest extends $pb.GeneratedMessage { void clearBusType() => clearField(2); @$pb.TagNumber(3) - $core.List<$core.String> get guardianIds => $_getList(2); + $core.String get nurseryId => $_getSZ(2); + @$pb.TagNumber(3) + set nurseryId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasNurseryId() => $_has(2); + @$pb.TagNumber(3) + void clearNurseryId() => clearField(3); + + @$pb.TagNumber(4) + $core.List<$core.String> get guardianIds => $_getList(3); } class CreateBusRouteResponse extends $pb.GeneratedMessage { @@ -140,8 +154,8 @@ class CreateBusRouteResponse extends $pb.GeneratedMessage { $9.BusRoute ensureBusRoute() => $_ensure(0); } -class GetBusRouteRequest extends $pb.GeneratedMessage { - factory GetBusRouteRequest({ +class GetBusRouteByBusIDRequest extends $pb.GeneratedMessage { + factory GetBusRouteByBusIDRequest({ $core.String? busId, $9.BusType? busType, }) { @@ -154,11 +168,11 @@ class GetBusRouteRequest extends $pb.GeneratedMessage { } return $result; } - GetBusRouteRequest._() : super(); - factory GetBusRouteRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetBusRouteRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + GetBusRouteByBusIDRequest._() : super(); + factory GetBusRouteByBusIDRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBusRouteByBusIDRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusRouteRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusRouteByBusIDRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') ..e<$9.BusType>(2, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $9.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $9.BusType.valueOf, enumValues: $9.BusType.values) ..hasRequiredFields = false @@ -168,22 +182,22 @@ class GetBusRouteRequest extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - GetBusRouteRequest clone() => GetBusRouteRequest()..mergeFromMessage(this); + GetBusRouteByBusIDRequest clone() => GetBusRouteByBusIDRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - GetBusRouteRequest copyWith(void Function(GetBusRouteRequest) updates) => super.copyWith((message) => updates(message as GetBusRouteRequest)) as GetBusRouteRequest; + GetBusRouteByBusIDRequest copyWith(void Function(GetBusRouteByBusIDRequest) updates) => super.copyWith((message) => updates(message as GetBusRouteByBusIDRequest)) as GetBusRouteByBusIDRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetBusRouteRequest create() => GetBusRouteRequest._(); - GetBusRouteRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static GetBusRouteByBusIDRequest create() => GetBusRouteByBusIDRequest._(); + GetBusRouteByBusIDRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetBusRouteRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetBusRouteRequest? _defaultInstance; + static GetBusRouteByBusIDRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBusRouteByBusIDRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get busId => $_getSZ(0); @@ -204,8 +218,8 @@ class GetBusRouteRequest extends $pb.GeneratedMessage { void clearBusType() => clearField(2); } -class GetBusRouteResponse extends $pb.GeneratedMessage { - factory GetBusRouteResponse({ +class GetBusRouteByBusIDResponse extends $pb.GeneratedMessage { + factory GetBusRouteByBusIDResponse({ $9.BusRoute? busRoute, }) { final $result = create(); @@ -214,11 +228,11 @@ class GetBusRouteResponse extends $pb.GeneratedMessage { } return $result; } - GetBusRouteResponse._() : super(); - factory GetBusRouteResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetBusRouteResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + GetBusRouteByBusIDResponse._() : super(); + factory GetBusRouteByBusIDResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBusRouteByBusIDResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusRouteResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetBusRouteByBusIDResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOM<$9.BusRoute>(1, _omitFieldNames ? '' : 'busRoute', subBuilder: $9.BusRoute.create) ..hasRequiredFields = false ; @@ -227,22 +241,22 @@ class GetBusRouteResponse extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - GetBusRouteResponse clone() => GetBusRouteResponse()..mergeFromMessage(this); + GetBusRouteByBusIDResponse clone() => GetBusRouteByBusIDResponse()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - GetBusRouteResponse copyWith(void Function(GetBusRouteResponse) updates) => super.copyWith((message) => updates(message as GetBusRouteResponse)) as GetBusRouteResponse; + GetBusRouteByBusIDResponse copyWith(void Function(GetBusRouteByBusIDResponse) updates) => super.copyWith((message) => updates(message as GetBusRouteByBusIDResponse)) as GetBusRouteByBusIDResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetBusRouteResponse create() => GetBusRouteResponse._(); - GetBusRouteResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static GetBusRouteByBusIDResponse create() => GetBusRouteByBusIDResponse._(); + GetBusRouteByBusIDResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetBusRouteResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetBusRouteResponse? _defaultInstance; + static GetBusRouteByBusIDResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBusRouteByBusIDResponse? _defaultInstance; @$pb.TagNumber(1) $9.BusRoute get busRoute => $_getN(0); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart index 479d7547..4b014de1 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart @@ -25,10 +25,10 @@ class BusRouteServiceClient extends $grpc.Client { '/where_child_bus.v1.BusRouteService/CreateBusRoute', ($1.CreateBusRouteRequest value) => value.writeToBuffer(), ($core.List<$core.int> value) => $1.CreateBusRouteResponse.fromBuffer(value)); - static final _$getBusRoute = $grpc.ClientMethod<$1.GetBusRouteRequest, $1.GetBusRouteResponse>( - '/where_child_bus.v1.BusRouteService/GetBusRoute', - ($1.GetBusRouteRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.GetBusRouteResponse.fromBuffer(value)); + static final _$getBusRouteByBusID = $grpc.ClientMethod<$1.GetBusRouteByBusIDRequest, $1.GetBusRouteByBusIDResponse>( + '/where_child_bus.v1.BusRouteService/GetBusRouteByBusID', + ($1.GetBusRouteByBusIDRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.GetBusRouteByBusIDResponse.fromBuffer(value)); BusRouteServiceClient($grpc.ClientChannel channel, {$grpc.CallOptions? options, @@ -40,8 +40,8 @@ class BusRouteServiceClient extends $grpc.Client { return $createUnaryCall(_$createBusRoute, request, options: options); } - $grpc.ResponseFuture<$1.GetBusRouteResponse> getBusRoute($1.GetBusRouteRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$getBusRoute, request, options: options); + $grpc.ResponseFuture<$1.GetBusRouteByBusIDResponse> getBusRouteByBusID($1.GetBusRouteByBusIDRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getBusRouteByBusID, request, options: options); } } @@ -57,23 +57,23 @@ abstract class BusRouteServiceBase extends $grpc.Service { false, ($core.List<$core.int> value) => $1.CreateBusRouteRequest.fromBuffer(value), ($1.CreateBusRouteResponse value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.GetBusRouteRequest, $1.GetBusRouteResponse>( - 'GetBusRoute', - getBusRoute_Pre, + $addMethod($grpc.ServiceMethod<$1.GetBusRouteByBusIDRequest, $1.GetBusRouteByBusIDResponse>( + 'GetBusRouteByBusID', + getBusRouteByBusID_Pre, false, false, - ($core.List<$core.int> value) => $1.GetBusRouteRequest.fromBuffer(value), - ($1.GetBusRouteResponse value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $1.GetBusRouteByBusIDRequest.fromBuffer(value), + ($1.GetBusRouteByBusIDResponse value) => value.writeToBuffer())); } $async.Future<$1.CreateBusRouteResponse> createBusRoute_Pre($grpc.ServiceCall call, $async.Future<$1.CreateBusRouteRequest> request) async { return createBusRoute(call, await request); } - $async.Future<$1.GetBusRouteResponse> getBusRoute_Pre($grpc.ServiceCall call, $async.Future<$1.GetBusRouteRequest> request) async { - return getBusRoute(call, await request); + $async.Future<$1.GetBusRouteByBusIDResponse> getBusRouteByBusID_Pre($grpc.ServiceCall call, $async.Future<$1.GetBusRouteByBusIDRequest> request) async { + return getBusRouteByBusID(call, await request); } $async.Future<$1.CreateBusRouteResponse> createBusRoute($grpc.ServiceCall call, $1.CreateBusRouteRequest request); - $async.Future<$1.GetBusRouteResponse> getBusRoute($grpc.ServiceCall call, $1.GetBusRouteRequest request); + $async.Future<$1.GetBusRouteByBusIDResponse> getBusRouteByBusID($grpc.ServiceCall call, $1.GetBusRouteByBusIDRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbjson.dart index 211948d3..717f347a 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus_route.pbjson.dart @@ -19,15 +19,17 @@ const CreateBusRouteRequest$json = { '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, {'1': 'bus_type', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, - {'1': 'guardian_ids', '3': 3, '4': 3, '5': 9, '10': 'guardianIds'}, + {'1': 'nursery_id', '3': 3, '4': 1, '5': 9, '10': 'nurseryId'}, + {'1': 'guardian_ids', '3': 4, '4': 3, '5': 9, '10': 'guardianIds'}, ], }; /// Descriptor for `CreateBusRouteRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List createBusRouteRequestDescriptor = $convert.base64Decode( 'ChVDcmVhdGVCdXNSb3V0ZVJlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI2CghidXNfdH' - 'lwZRgCIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBlEiEKDGd1YXJk' - 'aWFuX2lkcxgDIAMoCVILZ3VhcmRpYW5JZHM='); + 'lwZRgCIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBlEh0KCm51cnNl' + 'cnlfaWQYAyABKAlSCW51cnNlcnlJZBIhCgxndWFyZGlhbl9pZHMYBCADKAlSC2d1YXJkaWFuSW' + 'Rz'); @$core.Deprecated('Use createBusRouteResponseDescriptor instead') const CreateBusRouteResponse$json = { @@ -42,30 +44,30 @@ final $typed_data.Uint8List createBusRouteResponseDescriptor = $convert.base64De 'ChZDcmVhdGVCdXNSb3V0ZVJlc3BvbnNlEjkKCWJ1c19yb3V0ZRgBIAEoCzIcLndoZXJlX2NoaW' 'xkX2J1cy52MS5CdXNSb3V0ZVIIYnVzUm91dGU='); -@$core.Deprecated('Use getBusRouteRequestDescriptor instead') -const GetBusRouteRequest$json = { - '1': 'GetBusRouteRequest', +@$core.Deprecated('Use getBusRouteByBusIDRequestDescriptor instead') +const GetBusRouteByBusIDRequest$json = { + '1': 'GetBusRouteByBusIDRequest', '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, {'1': 'bus_type', '3': 2, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, ], }; -/// Descriptor for `GetBusRouteRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getBusRouteRequestDescriptor = $convert.base64Decode( - 'ChJHZXRCdXNSb3V0ZVJlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI2CghidXNfdHlwZR' - 'gCIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBl'); +/// Descriptor for `GetBusRouteByBusIDRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBusRouteByBusIDRequestDescriptor = $convert.base64Decode( + 'ChlHZXRCdXNSb3V0ZUJ5QnVzSURSZXF1ZXN0EhUKBmJ1c19pZBgBIAEoCVIFYnVzSWQSNgoIYn' + 'VzX3R5cGUYAiABKA4yGy53aGVyZV9jaGlsZF9idXMudjEuQnVzVHlwZVIHYnVzVHlwZQ=='); -@$core.Deprecated('Use getBusRouteResponseDescriptor instead') -const GetBusRouteResponse$json = { - '1': 'GetBusRouteResponse', +@$core.Deprecated('Use getBusRouteByBusIDResponseDescriptor instead') +const GetBusRouteByBusIDResponse$json = { + '1': 'GetBusRouteByBusIDResponse', '2': [ {'1': 'bus_route', '3': 1, '4': 1, '5': 11, '6': '.where_child_bus.v1.BusRoute', '10': 'busRoute'}, ], }; -/// Descriptor for `GetBusRouteResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getBusRouteResponseDescriptor = $convert.base64Decode( - 'ChNHZXRCdXNSb3V0ZVJlc3BvbnNlEjkKCWJ1c19yb3V0ZRgBIAEoCzIcLndoZXJlX2NoaWxkX2' - 'J1cy52MS5CdXNSb3V0ZVIIYnVzUm91dGU='); +/// Descriptor for `GetBusRouteByBusIDResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBusRouteByBusIDResponseDescriptor = $convert.base64Decode( + 'ChpHZXRCdXNSb3V0ZUJ5QnVzSURSZXNwb25zZRI5CglidXNfcm91dGUYASABKAsyHC53aGVyZV' + '9jaGlsZF9idXMudjEuQnVzUm91dGVSCGJ1c1JvdXRl'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart index e54703af..3bca6ac1 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pb.dart @@ -697,6 +697,8 @@ class Bus extends $pb.GeneratedMessage { $core.String? nextStationId, $8.Timestamp? createdAt, $8.Timestamp? updatedAt, + $core.String? latestMorningRouteId, + $core.String? latestEveningRouteId, }) { final $result = create(); if (id != null) { @@ -732,6 +734,12 @@ class Bus extends $pb.GeneratedMessage { if (updatedAt != null) { $result.updatedAt = updatedAt; } + if (latestMorningRouteId != null) { + $result.latestMorningRouteId = latestMorningRouteId; + } + if (latestEveningRouteId != null) { + $result.latestEveningRouteId = latestEveningRouteId; + } return $result; } Bus._() : super(); @@ -750,6 +758,8 @@ class Bus extends $pb.GeneratedMessage { ..aOS(11, _omitFieldNames ? '' : 'nextStationId') ..aOM<$8.Timestamp>(12, _omitFieldNames ? '' : 'createdAt', subBuilder: $8.Timestamp.create) ..aOM<$8.Timestamp>(13, _omitFieldNames ? '' : 'updatedAt', subBuilder: $8.Timestamp.create) + ..aOS(14, _omitFieldNames ? '' : 'latestMorningRouteId') + ..aOS(15, _omitFieldNames ? '' : 'latestEveningRouteId') ..hasRequiredFields = false ; @@ -877,6 +887,24 @@ class Bus extends $pb.GeneratedMessage { void clearUpdatedAt() => clearField(13); @$pb.TagNumber(13) $8.Timestamp ensureUpdatedAt() => $_ensure(10); + + @$pb.TagNumber(14) + $core.String get latestMorningRouteId => $_getSZ(11); + @$pb.TagNumber(14) + set latestMorningRouteId($core.String v) { $_setString(11, v); } + @$pb.TagNumber(14) + $core.bool hasLatestMorningRouteId() => $_has(11); + @$pb.TagNumber(14) + void clearLatestMorningRouteId() => clearField(14); + + @$pb.TagNumber(15) + $core.String get latestEveningRouteId => $_getSZ(12); + @$pb.TagNumber(15) + set latestEveningRouteId($core.String v) { $_setString(12, v); } + @$pb.TagNumber(15) + $core.bool hasLatestEveningRouteId() => $_has(12); + @$pb.TagNumber(15) + void clearLatestEveningRouteId() => clearField(15); } class Child extends $pb.GeneratedMessage { @@ -1525,7 +1553,7 @@ class BusRoute extends $pb.GeneratedMessage { factory BusRoute({ $core.String? id, $core.String? busId, - $core.Iterable<$core.String>? orderedStationIds, + $core.Iterable? orderedStations, BusType? busType, }) { final $result = create(); @@ -1535,8 +1563,8 @@ class BusRoute extends $pb.GeneratedMessage { if (busId != null) { $result.busId = busId; } - if (orderedStationIds != null) { - $result.orderedStationIds.addAll(orderedStationIds); + if (orderedStations != null) { + $result.orderedStations.addAll(orderedStations); } if (busType != null) { $result.busType = busType; @@ -1550,7 +1578,7 @@ class BusRoute extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BusRoute', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(2, _omitFieldNames ? '' : 'busId') - ..pPS(3, _omitFieldNames ? '' : 'orderedStationIds') + ..pc(3, _omitFieldNames ? '' : 'orderedStations', $pb.PbFieldType.PM, subBuilder: Station.create) ..e(4, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: BusType.BUS_TYPE_UNSPECIFIED, valueOf: BusType.valueOf, enumValues: BusType.values) ..hasRequiredFields = false ; @@ -1595,7 +1623,7 @@ class BusRoute extends $pb.GeneratedMessage { void clearBusId() => clearField(2); @$pb.TagNumber(3) - $core.List<$core.String> get orderedStationIds => $_getList(2); + $core.List get orderedStations => $_getList(2); @$pb.TagNumber(4) BusType get busType => $_getN(3); diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart index e261a6f9..85a058b0 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/resources.pbjson.dart @@ -191,6 +191,8 @@ const Bus$json = { {'1': 'longitude', '3': 7, '4': 1, '5': 1, '10': 'longitude'}, {'1': 'enable_face_recognition', '3': 8, '4': 1, '5': 8, '10': 'enableFaceRecognition'}, {'1': 'next_station_id', '3': 11, '4': 1, '5': 9, '10': 'nextStationId'}, + {'1': 'latest_morning_route_id', '3': 14, '4': 1, '5': 9, '10': 'latestMorningRouteId'}, + {'1': 'latest_evening_route_id', '3': 15, '4': 1, '5': 9, '10': 'latestEveningRouteId'}, {'1': 'created_at', '3': 12, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'}, {'1': 'updated_at', '3': 13, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'}, ], @@ -203,9 +205,11 @@ final $typed_data.Uint8List busDescriptor = $convert.base64Decode( 'YnVzX3N0YXR1cxgFIAEoDjIdLndoZXJlX2NoaWxkX2J1cy52MS5CdXNTdGF0dXNSCWJ1c1N0YX' 'R1cxIaCghsYXRpdHVkZRgGIAEoAVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAcgASgBUglsb25n' 'aXR1ZGUSNgoXZW5hYmxlX2ZhY2VfcmVjb2duaXRpb24YCCABKAhSFWVuYWJsZUZhY2VSZWNvZ2' - '5pdGlvbhImCg9uZXh0X3N0YXRpb25faWQYCyABKAlSDW5leHRTdGF0aW9uSWQSOQoKY3JlYXRl' - 'ZF9hdBgMIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBSCWNyZWF0ZWRBdBI5Cgp1cG' - 'RhdGVkX2F0GA0gASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdXBkYXRlZEF0'); + '5pdGlvbhImCg9uZXh0X3N0YXRpb25faWQYCyABKAlSDW5leHRTdGF0aW9uSWQSNQoXbGF0ZXN0' + 'X21vcm5pbmdfcm91dGVfaWQYDiABKAlSFGxhdGVzdE1vcm5pbmdSb3V0ZUlkEjUKF2xhdGVzdF' + '9ldmVuaW5nX3JvdXRlX2lkGA8gASgJUhRsYXRlc3RFdmVuaW5nUm91dGVJZBI5CgpjcmVhdGVk' + 'X2F0GAwgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJY3JlYXRlZEF0EjkKCnVwZG' + 'F0ZWRfYXQYDSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl1cGRhdGVkQXQ='); @$core.Deprecated('Use childDescriptor instead') const Child$json = { @@ -320,14 +324,15 @@ const BusRoute$json = { '2': [ {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'bus_id', '3': 2, '4': 1, '5': 9, '10': 'busId'}, - {'1': 'ordered_station_ids', '3': 3, '4': 3, '5': 9, '10': 'orderedStationIds'}, + {'1': 'ordered_stations', '3': 3, '4': 3, '5': 11, '6': '.where_child_bus.v1.Station', '10': 'orderedStations'}, {'1': 'bus_type', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, ], }; /// Descriptor for `BusRoute`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List busRouteDescriptor = $convert.base64Decode( - 'CghCdXNSb3V0ZRIOCgJpZBgBIAEoCVICaWQSFQoGYnVzX2lkGAIgASgJUgVidXNJZBIuChNvcm' - 'RlcmVkX3N0YXRpb25faWRzGAMgAygJUhFvcmRlcmVkU3RhdGlvbklkcxI2CghidXNfdHlwZRgE' - 'IAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBl'); + 'CghCdXNSb3V0ZRIOCgJpZBgBIAEoCVICaWQSFQoGYnVzX2lkGAIgASgJUgVidXNJZBJGChBvcm' + 'RlcmVkX3N0YXRpb25zGAMgAygLMhsud2hlcmVfY2hpbGRfYnVzLnYxLlN0YXRpb25SD29yZGVy' + 'ZWRTdGF0aW9ucxI2CghidXNfdHlwZRgEIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeX' + 'BlUgdidXNUeXBl'); diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.py index 2fa6db9e..6a65b1d4 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.py @@ -15,7 +15,7 @@ from where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/bus_route.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\x89\x01\n\x15\x43reateBusRouteRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12!\n\x0cguardian_ids\x18\x03 \x03(\tR\x0bguardianIds\"S\n\x16\x43reateBusRouteResponse\x12\x39\n\tbus_route\x18\x01 \x01(\x0b\x32\x1c.where_child_bus.v1.BusRouteR\x08\x62usRoute\"c\n\x12GetBusRouteRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"P\n\x13GetBusRouteResponse\x12\x39\n\tbus_route\x18\x01 \x01(\x0b\x32\x1c.where_child_bus.v1.BusRouteR\x08\x62usRoute2\xda\x01\n\x0f\x42usRouteService\x12g\n\x0e\x43reateBusRoute\x12).where_child_bus.v1.CreateBusRouteRequest\x1a*.where_child_bus.v1.CreateBusRouteResponse\x12^\n\x0bGetBusRoute\x12&.where_child_bus.v1.GetBusRouteRequest\x1a\'.where_child_bus.v1.GetBusRouteResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rBusRouteProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/bus_route.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\"\xa8\x01\n\x15\x43reateBusRouteRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x1d\n\nnursery_id\x18\x03 \x01(\tR\tnurseryId\x12!\n\x0cguardian_ids\x18\x04 \x03(\tR\x0bguardianIds\"S\n\x16\x43reateBusRouteResponse\x12\x39\n\tbus_route\x18\x01 \x01(\x0b\x32\x1c.where_child_bus.v1.BusRouteR\x08\x62usRoute\"j\n\x19GetBusRouteByBusIDRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x02 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"W\n\x1aGetBusRouteByBusIDResponse\x12\x39\n\tbus_route\x18\x01 \x01(\x0b\x32\x1c.where_child_bus.v1.BusRouteR\x08\x62usRoute2\xef\x01\n\x0f\x42usRouteService\x12g\n\x0e\x43reateBusRoute\x12).where_child_bus.v1.CreateBusRouteRequest\x1a*.where_child_bus.v1.CreateBusRouteResponse\x12s\n\x12GetBusRouteByBusID\x12-.where_child_bus.v1.GetBusRouteByBusIDRequest\x1a..where_child_bus.v1.GetBusRouteByBusIDResponseB\xf0\x01\n\x16\x63om.where_child_bus.v1B\rBusRouteProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,13 +24,13 @@ _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\rBusRouteProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' _globals['_CREATEBUSROUTEREQUEST']._serialized_start=95 - _globals['_CREATEBUSROUTEREQUEST']._serialized_end=232 - _globals['_CREATEBUSROUTERESPONSE']._serialized_start=234 - _globals['_CREATEBUSROUTERESPONSE']._serialized_end=317 - _globals['_GETBUSROUTEREQUEST']._serialized_start=319 - _globals['_GETBUSROUTEREQUEST']._serialized_end=418 - _globals['_GETBUSROUTERESPONSE']._serialized_start=420 - _globals['_GETBUSROUTERESPONSE']._serialized_end=500 - _globals['_BUSROUTESERVICE']._serialized_start=503 - _globals['_BUSROUTESERVICE']._serialized_end=721 + _globals['_CREATEBUSROUTEREQUEST']._serialized_end=263 + _globals['_CREATEBUSROUTERESPONSE']._serialized_start=265 + _globals['_CREATEBUSROUTERESPONSE']._serialized_end=348 + _globals['_GETBUSROUTEBYBUSIDREQUEST']._serialized_start=350 + _globals['_GETBUSROUTEBYBUSIDREQUEST']._serialized_end=456 + _globals['_GETBUSROUTEBYBUSIDRESPONSE']._serialized_start=458 + _globals['_GETBUSROUTEBYBUSIDRESPONSE']._serialized_end=545 + _globals['_BUSROUTESERVICE']._serialized_start=548 + _globals['_BUSROUTESERVICE']._serialized_end=787 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.pyi index 98f9a551..d8b1e591 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2.pyi @@ -7,14 +7,16 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor class CreateBusRouteRequest(_message.Message): - __slots__ = ("bus_id", "bus_type", "guardian_ids") + __slots__ = ("bus_id", "bus_type", "nursery_id", "guardian_ids") BUS_ID_FIELD_NUMBER: _ClassVar[int] BUS_TYPE_FIELD_NUMBER: _ClassVar[int] + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] GUARDIAN_IDS_FIELD_NUMBER: _ClassVar[int] bus_id: str bus_type: _resources_pb2.BusType + nursery_id: str guardian_ids: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., guardian_ids: _Optional[_Iterable[str]] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., nursery_id: _Optional[str] = ..., guardian_ids: _Optional[_Iterable[str]] = ...) -> None: ... class CreateBusRouteResponse(_message.Message): __slots__ = ("bus_route",) @@ -22,7 +24,7 @@ class CreateBusRouteResponse(_message.Message): bus_route: _resources_pb2.BusRoute def __init__(self, bus_route: _Optional[_Union[_resources_pb2.BusRoute, _Mapping]] = ...) -> None: ... -class GetBusRouteRequest(_message.Message): +class GetBusRouteByBusIDRequest(_message.Message): __slots__ = ("bus_id", "bus_type") BUS_ID_FIELD_NUMBER: _ClassVar[int] BUS_TYPE_FIELD_NUMBER: _ClassVar[int] @@ -30,7 +32,7 @@ class GetBusRouteRequest(_message.Message): bus_type: _resources_pb2.BusType def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ...) -> None: ... -class GetBusRouteResponse(_message.Message): +class GetBusRouteByBusIDResponse(_message.Message): __slots__ = ("bus_route",) BUS_ROUTE_FIELD_NUMBER: _ClassVar[int] bus_route: _resources_pb2.BusRoute diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2_grpc.py index 5a9f0eed..2291a8a1 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_route_pb2_grpc.py @@ -19,10 +19,10 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_bus__route__pb2.CreateBusRouteRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_bus__route__pb2.CreateBusRouteResponse.FromString, ) - self.GetBusRoute = channel.unary_unary( - '/where_child_bus.v1.BusRouteService/GetBusRoute', - request_serializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteRequest.SerializeToString, - response_deserializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteResponse.FromString, + self.GetBusRouteByBusID = channel.unary_unary( + '/where_child_bus.v1.BusRouteService/GetBusRouteByBusID', + request_serializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteByBusIDRequest.SerializeToString, + response_deserializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteByBusIDResponse.FromString, ) @@ -35,7 +35,7 @@ def CreateBusRoute(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def GetBusRoute(self, request, context): + def GetBusRouteByBusID(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -49,10 +49,10 @@ def add_BusRouteServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_bus__route__pb2.CreateBusRouteRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_bus__route__pb2.CreateBusRouteResponse.SerializeToString, ), - 'GetBusRoute': grpc.unary_unary_rpc_method_handler( - servicer.GetBusRoute, - request_deserializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteRequest.FromString, - response_serializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteResponse.SerializeToString, + 'GetBusRouteByBusID': grpc.unary_unary_rpc_method_handler( + servicer.GetBusRouteByBusID, + request_deserializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteByBusIDRequest.FromString, + response_serializer=where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteByBusIDResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( @@ -82,7 +82,7 @@ def CreateBusRoute(request, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetBusRoute(request, + def GetBusRouteByBusID(request, target, options=(), channel_credentials=None, @@ -92,8 +92,8 @@ def GetBusRoute(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusRouteService/GetBusRoute', - where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteRequest.SerializeToString, - where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/where_child_bus.v1.BusRouteService/GetBusRouteByBusID', + where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteByBusIDRequest.SerializeToString, + where__child__bus_dot_v1_dot_bus__route__pb2.GetBusRouteByBusIDResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py index 491a3f6a..e2091305 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb9\x03\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12&\n\x0fnext_station_id\x18\x0b \x01(\tR\rnextStationId\x12\x39\n\ncreated_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xea\x01\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"R\n\x13\x43hildBusAssociation\x12 \n\x0c\x62us_route_id\x18\x01 \x01(\tR\nbusRouteId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"\x99\x01\n\x08\x42usRoute\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12.\n\x13ordered_station_ids\x18\x03 \x03(\tR\x11orderedStationIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"where_child_bus/v1/resources.proto\x12\x12where_child_bus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x02\n\x07Nursery\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\'\n\x0fhashed_password\x18\x07 \x01(\tR\x0ehashedPassword\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa1\x02\n\x0fNurseryResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cnursery_code\x18\x02 \x01(\tR\x0bnurseryCode\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x18\n\x07\x61\x64\x64ress\x18\x04 \x01(\tR\x07\x61\x64\x64ress\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\x14\n\x05\x65mail\x18\x06 \x01(\tR\x05\x65mail\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x02\n\x08Guardian\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12\'\n\x0fhashed_password\x18\x06 \x01(\tR\x0ehashedPassword\x12+\n\x12is_use_morning_bus\x18\x07 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x08 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xde\x02\n\x10GuardianResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12!\n\x0cphone_number\x18\x05 \x01(\tR\x0bphoneNumber\x12+\n\x12is_use_morning_bus\x18\x06 \x01(\x08R\x0fisUseMorningBus\x12+\n\x12is_use_evening_bus\x18\x07 \x01(\x08R\x0fisUseEveningBus\x12\x39\n\ncreated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xa7\x04\n\x03\x42us\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x04 \x01(\tR\x0bplateNumber\x12<\n\nbus_status\x18\x05 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x1a\n\x08latitude\x18\x06 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x07 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x08 \x01(\x08R\x15\x65nableFaceRecognition\x12&\n\x0fnext_station_id\x18\x0b \x01(\tR\rnextStationId\x12\x35\n\x17latest_morning_route_id\x18\x0e \x01(\tR\x14latestMorningRouteId\x12\x35\n\x17latest_evening_route_id\x18\x0f \x01(\tR\x14latestEveningRouteId\x12\x39\n\ncreated_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xfc\x03\n\x05\x43hild\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x1f\n\x0bguardian_id\x18\x03 \x01(\tR\nguardianId\x12\x12\n\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n\x03\x61ge\x18\x05 \x01(\x05R\x03\x61ge\x12)\n\x03sex\x18\x06 \x01(\x0e\x32\x17.where_child_bus.v1.SexR\x03sex\x12\x35\n\x17\x63heck_for_missing_items\x18\x07 \x01(\x08R\x14\x63heckForMissingItems\x12\x17\n\x07has_bag\x18\x08 \x01(\x08R\x06hasBag\x12\"\n\rhas_lunch_box\x18\t \x01(\x08R\x0bhasLunchBox\x12(\n\x10has_water_bottle\x18\n \x01(\x08R\x0ehasWaterBottle\x12!\n\x0chas_umbrella\x18\x0b \x01(\x08R\x0bhasUmbrella\x12\x1b\n\thas_other\x18\x0c \x01(\x08R\x08hasOther\x12\x39\n\ncreated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xea\x01\n\x07Station\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n\x0bguardian_id\x18\x02 \x01(\tR\nguardianId\x12\x1a\n\x08latitude\x18\x05 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x06 \x01(\x01R\tlongitude\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"R\n\x13\x43hildBusAssociation\x12 \n\x0c\x62us_route_id\x18\x01 \x01(\tR\nbusRouteId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\"\xcc\x01\n\nChildPhoto\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x1d\n\nphoto_data\x18\x03 \x01(\x0cR\tphotoData\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\"\xad\x01\n\x0e\x42oardingRecord\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId\x12\x15\n\x06\x62us_id\x18\x03 \x01(\tR\x05\x62usId\x12\x1f\n\x0bis_boarding\x18\x04 \x01(\x08R\nisBoarding\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"\xb1\x01\n\x08\x42usRoute\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x46\n\x10ordered_stations\x18\x03 \x03(\x0b\x32\x1b.where_child_bus.v1.StationR\x0forderedStations\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType*s\n\tBusStatus\x12\x1a\n\x16\x42US_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x42US_STATUS_STOPPED\x10\x01\x12\x16\n\x12\x42US_STATUS_RUNNING\x10\x02\x12\x1a\n\x16\x42US_STATUS_MAINTENANCE\x10\x03*b\n\x0cVehicleEvent\x12\x1d\n\x19VEHICLE_EVENT_UNSPECIFIED\x10\x00\x12\x18\n\x14VEHICLE_EVENT_GET_ON\x10\x01\x12\x19\n\x15VEHICLE_EVENT_GET_OFF\x10\x02*E\n\x03Sex\x12\x13\n\x0fSEX_UNSPECIFIED\x10\x00\x12\x0b\n\x07SEX_MAN\x10\x01\x12\r\n\tSEX_WOMAN\x10\x02\x12\r\n\tSEX_OTHER\x10\x03*O\n\x07\x42usType\x12\x18\n\x14\x42US_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x42US_TYPE_MORNING\x10\x01\x12\x14\n\x10\x42US_TYPE_EVENING\x10\x02\x42\xf1\x01\n\x16\x63om.where_child_bus.v1B\x0eResourcesProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,14 +23,14 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\016ResourcesProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_BUSSTATUS']._serialized_start=3262 - _globals['_BUSSTATUS']._serialized_end=3377 - _globals['_VEHICLEEVENT']._serialized_start=3379 - _globals['_VEHICLEEVENT']._serialized_end=3477 - _globals['_SEX']._serialized_start=3479 - _globals['_SEX']._serialized_end=3548 - _globals['_BUSTYPE']._serialized_start=3550 - _globals['_BUSTYPE']._serialized_end=3629 + _globals['_BUSSTATUS']._serialized_start=3396 + _globals['_BUSSTATUS']._serialized_end=3511 + _globals['_VEHICLEEVENT']._serialized_start=3513 + _globals['_VEHICLEEVENT']._serialized_end=3611 + _globals['_SEX']._serialized_start=3613 + _globals['_SEX']._serialized_end=3682 + _globals['_BUSTYPE']._serialized_start=3684 + _globals['_BUSTYPE']._serialized_end=3763 _globals['_NURSERY']._serialized_start=92 _globals['_NURSERY']._serialized_end=414 _globals['_NURSERYRESPONSE']._serialized_start=417 @@ -40,17 +40,17 @@ _globals['_GUARDIANRESPONSE']._serialized_start=1095 _globals['_GUARDIANRESPONSE']._serialized_end=1445 _globals['_BUS']._serialized_start=1448 - _globals['_BUS']._serialized_end=1889 - _globals['_CHILD']._serialized_start=1892 - _globals['_CHILD']._serialized_end=2400 - _globals['_STATION']._serialized_start=2403 - _globals['_STATION']._serialized_end=2637 - _globals['_CHILDBUSASSOCIATION']._serialized_start=2639 - _globals['_CHILDBUSASSOCIATION']._serialized_end=2721 - _globals['_CHILDPHOTO']._serialized_start=2724 - _globals['_CHILDPHOTO']._serialized_end=2928 - _globals['_BOARDINGRECORD']._serialized_start=2931 - _globals['_BOARDINGRECORD']._serialized_end=3104 - _globals['_BUSROUTE']._serialized_start=3107 - _globals['_BUSROUTE']._serialized_end=3260 + _globals['_BUS']._serialized_end=1999 + _globals['_CHILD']._serialized_start=2002 + _globals['_CHILD']._serialized_end=2510 + _globals['_STATION']._serialized_start=2513 + _globals['_STATION']._serialized_end=2747 + _globals['_CHILDBUSASSOCIATION']._serialized_start=2749 + _globals['_CHILDBUSASSOCIATION']._serialized_end=2831 + _globals['_CHILDPHOTO']._serialized_start=2834 + _globals['_CHILDPHOTO']._serialized_end=3038 + _globals['_BOARDINGRECORD']._serialized_start=3041 + _globals['_BOARDINGRECORD']._serialized_end=3214 + _globals['_BUSROUTE']._serialized_start=3217 + _globals['_BUSROUTE']._serialized_end=3394 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi index cdcce127..423c71f7 100644 --- a/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/resources_pb2.pyi @@ -136,7 +136,7 @@ class GuardianResponse(_message.Message): def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., phone_number: _Optional[str] = ..., is_use_morning_bus: bool = ..., is_use_evening_bus: bool = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Bus(_message.Message): - __slots__ = ("id", "nursery_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "next_station_id", "created_at", "updated_at") + __slots__ = ("id", "nursery_id", "name", "plate_number", "bus_status", "latitude", "longitude", "enable_face_recognition", "next_station_id", "latest_morning_route_id", "latest_evening_route_id", "created_at", "updated_at") ID_FIELD_NUMBER: _ClassVar[int] NURSERY_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -146,6 +146,8 @@ class Bus(_message.Message): LONGITUDE_FIELD_NUMBER: _ClassVar[int] ENABLE_FACE_RECOGNITION_FIELD_NUMBER: _ClassVar[int] NEXT_STATION_ID_FIELD_NUMBER: _ClassVar[int] + LATEST_MORNING_ROUTE_ID_FIELD_NUMBER: _ClassVar[int] + LATEST_EVENING_ROUTE_ID_FIELD_NUMBER: _ClassVar[int] CREATED_AT_FIELD_NUMBER: _ClassVar[int] UPDATED_AT_FIELD_NUMBER: _ClassVar[int] id: str @@ -157,9 +159,11 @@ class Bus(_message.Message): longitude: float enable_face_recognition: bool next_station_id: str + latest_morning_route_id: str + latest_evening_route_id: str created_at: _timestamp_pb2.Timestamp updated_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., next_station_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., name: _Optional[str] = ..., plate_number: _Optional[str] = ..., bus_status: _Optional[_Union[BusStatus, str]] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., enable_face_recognition: bool = ..., next_station_id: _Optional[str] = ..., latest_morning_route_id: _Optional[str] = ..., latest_evening_route_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class Child(_message.Message): __slots__ = ("id", "nursery_id", "guardian_id", "name", "age", "sex", "check_for_missing_items", "has_bag", "has_lunch_box", "has_water_bottle", "has_umbrella", "has_other", "created_at", "updated_at") @@ -246,13 +250,13 @@ class BoardingRecord(_message.Message): def __init__(self, id: _Optional[str] = ..., child_id: _Optional[str] = ..., bus_id: _Optional[str] = ..., is_boarding: bool = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class BusRoute(_message.Message): - __slots__ = ("id", "bus_id", "ordered_station_ids", "bus_type") + __slots__ = ("id", "bus_id", "ordered_stations", "bus_type") ID_FIELD_NUMBER: _ClassVar[int] BUS_ID_FIELD_NUMBER: _ClassVar[int] - ORDERED_STATION_IDS_FIELD_NUMBER: _ClassVar[int] + ORDERED_STATIONS_FIELD_NUMBER: _ClassVar[int] BUS_TYPE_FIELD_NUMBER: _ClassVar[int] id: str bus_id: str - ordered_station_ids: _containers.RepeatedScalarFieldContainer[str] + ordered_stations: _containers.RepeatedCompositeFieldContainer[Station] bus_type: BusType - def __init__(self, id: _Optional[str] = ..., bus_id: _Optional[str] = ..., ordered_station_ids: _Optional[_Iterable[str]] = ..., bus_type: _Optional[_Union[BusType, str]] = ...) -> None: ... + def __init__(self, id: _Optional[str] = ..., bus_id: _Optional[str] = ..., ordered_stations: _Optional[_Iterable[_Union[Station, _Mapping]]] = ..., bus_type: _Optional[_Union[BusType, str]] = ...) -> None: ... diff --git a/proto/where_child_bus/v1/bus_route.proto b/proto/where_child_bus/v1/bus_route.proto index 051371b7..bd2e7a6d 100644 --- a/proto/where_child_bus/v1/bus_route.proto +++ b/proto/where_child_bus/v1/bus_route.proto @@ -6,24 +6,25 @@ import "where_child_bus/v1/resources.proto"; service BusRouteService { rpc CreateBusRoute(CreateBusRouteRequest) returns (CreateBusRouteResponse ); - rpc GetBusRoute(GetBusRouteRequest) returns (GetBusRouteResponse); + rpc GetBusRouteByBusID(GetBusRouteByBusIDRequest) returns (GetBusRouteByBusIDResponse); } message CreateBusRouteRequest { string bus_id = 1; BusType bus_type = 2; - repeated string guardian_ids = 3; + string nursery_id = 3; // 機械学習サーバーにわたすため + repeated string guardian_ids = 4; } message CreateBusRouteResponse { BusRoute bus_route = 1; } -message GetBusRouteRequest { +message GetBusRouteByBusIDRequest { string bus_id = 1; BusType bus_type = 2; } -message GetBusRouteResponse { +message GetBusRouteByBusIDResponse { BusRoute bus_route = 1; -} \ No newline at end of file +} diff --git a/proto/where_child_bus/v1/resources.proto b/proto/where_child_bus/v1/resources.proto index 8c1c14d8..2d866330 100644 --- a/proto/where_child_bus/v1/resources.proto +++ b/proto/where_child_bus/v1/resources.proto @@ -78,6 +78,8 @@ message Bus { double longitude = 7; bool enable_face_recognition = 8; string next_station_id = 11; + string latest_morning_route_id = 14; + string latest_evening_route_id = 15; google.protobuf.Timestamp created_at = 12; google.protobuf.Timestamp updated_at = 13; } @@ -145,6 +147,6 @@ message BoardingRecord { message BusRoute { string id = 1; string bus_id = 2; - repeated string ordered_station_ids = 3; + repeated Station ordered_stations = 3; BusType bus_type = 4; } From 80db3b883579afeee52586c8a8dcc73bfb932693 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 22 Feb 2024 19:43:34 +0900 Subject: [PATCH 643/771] =?UTF-8?q?feat;=20API=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/gprc_server/grpc_server.go | 5 + backend/interfaces/bus_route.go | 26 ++ .../go/where_child_bus/v1/bus_route.pb.go | 174 +++++----- .../where_child_bus/v1/bus_route_grpc.pb.go | 32 +- .../go/where_child_bus/v1/resources.pb.go | 315 ++++++++++-------- backend/usecases/bus/bus.go | 85 ++++- backend/usecases/busroute/bus_route.go | 267 +++++++++++++++ backend/usecases/child/child.go | 21 +- backend/usecases/station/station.go | 75 ++--- backend/usecases/utils/utils.go | 57 +++- 10 files changed, 733 insertions(+), 324 deletions(-) create mode 100644 backend/interfaces/bus_route.go create mode 100644 backend/usecases/busroute/bus_route.go diff --git a/backend/gprc_server/grpc_server.go b/backend/gprc_server/grpc_server.go index 84f33e06..afbd1b05 100644 --- a/backend/gprc_server/grpc_server.go +++ b/backend/gprc_server/grpc_server.go @@ -6,6 +6,7 @@ import ( grpc_interfaces "github.com/GreenTeaProgrammers/WhereChildBus/backend/interfaces" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/bus" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/child" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/guardian" "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/nursery" @@ -43,6 +44,10 @@ func New(opts ...optionFunc) *grpc.Server { busSrv := grpc_interfaces.NewBusServiceServer(busInteractor) pb.RegisterBusServiceServer(srv, busSrv) + busRouteInteractor := busroute.NewInteractor(opt.entClient, opt.logger, opt.MLClient) + busRouteSrv := grpc_interfaces.NewBusRouteServiceServer(busRouteInteractor) + pb.RegisterBusRouteServiceServer(srv, busRouteSrv) + childInteractor := child.NewInteractor(opt.entClient, opt.logger, opt.storageClient, opt.MLClient, opt.bucketName) // NOTE: GCSを使うのでstorageClientとbucketNameを渡す childSrv := grpc_interfaces.NewChildServiceServer(childInteractor) pb.RegisterChildServiceServer(srv, childSrv) diff --git a/backend/interfaces/bus_route.go b/backend/interfaces/bus_route.go new file mode 100644 index 00000000..d4180b15 --- /dev/null +++ b/backend/interfaces/bus_route.go @@ -0,0 +1,26 @@ +package interfaces + +import ( + "context" + + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/busroute" +) + +type busRouteServiceServer struct { + interactor *busroute.Interactor +} + +func NewBusRouteServiceServer(interactor *busroute.Interactor) pb.BusRouteServiceServer { + return &busRouteServiceServer{interactor} +} + +// CreateBusRoute implements where_child_busv1.BusRouteServiceServer. +func (s *busRouteServiceServer) CreateBusRoute(ctx context.Context, req *pb.CreateBusRouteRequest) (*pb.CreateBusRouteResponse, error) { + return s.interactor.CreateBusRoute(ctx, req) +} + +// GetBusRoute implements where_child_busv1.BusRouteServiceServer. +func (s *busRouteServiceServer) GetBusRouteByBusID(ctx context.Context, req *pb.GetBusRouteByBusIDRequest) (*pb.GetBusRouteByBusIDResponse, error) { + return s.interactor.GetBusRouteByBusID(ctx, req) +} diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_route.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_route.pb.go index f0fe7658..cb9a1dc5 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus_route.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus_route.pb.go @@ -27,7 +27,8 @@ type CreateBusRouteRequest struct { BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` - GuardianIds []string `protobuf:"bytes,3,rep,name=guardian_ids,json=guardianIds,proto3" json:"guardian_ids,omitempty"` + NurseryId string `protobuf:"bytes,3,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` // 機械学習サーバーにわたすため + GuardianIds []string `protobuf:"bytes,4,rep,name=guardian_ids,json=guardianIds,proto3" json:"guardian_ids,omitempty"` } func (x *CreateBusRouteRequest) Reset() { @@ -76,6 +77,13 @@ func (x *CreateBusRouteRequest) GetBusType() BusType { return BusType_BUS_TYPE_UNSPECIFIED } +func (x *CreateBusRouteRequest) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + func (x *CreateBusRouteRequest) GetGuardianIds() []string { if x != nil { return x.GuardianIds @@ -130,7 +138,7 @@ func (x *CreateBusRouteResponse) GetBusRoute() *BusRoute { return nil } -type GetBusRouteRequest struct { +type GetBusRouteByBusIDRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -139,8 +147,8 @@ type GetBusRouteRequest struct { BusType BusType `protobuf:"varint,2,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` } -func (x *GetBusRouteRequest) Reset() { - *x = GetBusRouteRequest{} +func (x *GetBusRouteByBusIDRequest) Reset() { + *x = GetBusRouteByBusIDRequest{} if protoimpl.UnsafeEnabled { mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -148,13 +156,13 @@ func (x *GetBusRouteRequest) Reset() { } } -func (x *GetBusRouteRequest) String() string { +func (x *GetBusRouteByBusIDRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBusRouteRequest) ProtoMessage() {} +func (*GetBusRouteByBusIDRequest) ProtoMessage() {} -func (x *GetBusRouteRequest) ProtoReflect() protoreflect.Message { +func (x *GetBusRouteByBusIDRequest) ProtoReflect() protoreflect.Message { mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -166,26 +174,26 @@ func (x *GetBusRouteRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBusRouteRequest.ProtoReflect.Descriptor instead. -func (*GetBusRouteRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetBusRouteByBusIDRequest.ProtoReflect.Descriptor instead. +func (*GetBusRouteByBusIDRequest) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_bus_route_proto_rawDescGZIP(), []int{2} } -func (x *GetBusRouteRequest) GetBusId() string { +func (x *GetBusRouteByBusIDRequest) GetBusId() string { if x != nil { return x.BusId } return "" } -func (x *GetBusRouteRequest) GetBusType() BusType { +func (x *GetBusRouteByBusIDRequest) GetBusType() BusType { if x != nil { return x.BusType } return BusType_BUS_TYPE_UNSPECIFIED } -type GetBusRouteResponse struct { +type GetBusRouteByBusIDResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -193,8 +201,8 @@ type GetBusRouteResponse struct { BusRoute *BusRoute `protobuf:"bytes,1,opt,name=bus_route,json=busRoute,proto3" json:"bus_route,omitempty"` } -func (x *GetBusRouteResponse) Reset() { - *x = GetBusRouteResponse{} +func (x *GetBusRouteByBusIDResponse) Reset() { + *x = GetBusRouteByBusIDResponse{} if protoimpl.UnsafeEnabled { mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -202,13 +210,13 @@ func (x *GetBusRouteResponse) Reset() { } } -func (x *GetBusRouteResponse) String() string { +func (x *GetBusRouteByBusIDResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetBusRouteResponse) ProtoMessage() {} +func (*GetBusRouteByBusIDResponse) ProtoMessage() {} -func (x *GetBusRouteResponse) ProtoReflect() protoreflect.Message { +func (x *GetBusRouteByBusIDResponse) ProtoReflect() protoreflect.Message { mi := &file_where_child_bus_v1_bus_route_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -220,12 +228,12 @@ func (x *GetBusRouteResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetBusRouteResponse.ProtoReflect.Descriptor instead. -func (*GetBusRouteResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetBusRouteByBusIDResponse.ProtoReflect.Descriptor instead. +func (*GetBusRouteByBusIDResponse) Descriptor() ([]byte, []int) { return file_where_child_bus_v1_bus_route_proto_rawDescGZIP(), []int{3} } -func (x *GetBusRouteResponse) GetBusRoute() *BusRoute { +func (x *GetBusRouteByBusIDResponse) GetBusRoute() *BusRoute { if x != nil { return x.BusRoute } @@ -240,62 +248,66 @@ var file_where_child_bus_v1_bus_route_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x53, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x62, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x52, 0x08, 0x62, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x63, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, - 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, - 0x70, 0x65, 0x22, 0x50, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x62, 0x75, 0x73, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x08, 0x62, 0x75, 0x73, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x32, 0xda, 0x01, 0x0a, 0x0f, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x53, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x12, 0x26, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x42, 0x75, - 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, - 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, - 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, - 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x12, 0x39, 0x0a, 0x09, 0x62, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x52, 0x08, 0x62, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x6a, 0x0a, 0x19, + 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x79, 0x42, 0x75, 0x73, + 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, + 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x57, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, + 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x62, 0x75, 0x73, 0x5f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x08, 0x62, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x32, 0xef, 0x01, 0x0a, 0x0f, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, + 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, + 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x79, 0x42, + 0x75, 0x73, 0x49, 0x44, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x42, 0x79, 0x42, 0x75, 0x73, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0d, + 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, + 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, + 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -312,22 +324,22 @@ func file_where_child_bus_v1_bus_route_proto_rawDescGZIP() []byte { var file_where_child_bus_v1_bus_route_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_where_child_bus_v1_bus_route_proto_goTypes = []interface{}{ - (*CreateBusRouteRequest)(nil), // 0: where_child_bus.v1.CreateBusRouteRequest - (*CreateBusRouteResponse)(nil), // 1: where_child_bus.v1.CreateBusRouteResponse - (*GetBusRouteRequest)(nil), // 2: where_child_bus.v1.GetBusRouteRequest - (*GetBusRouteResponse)(nil), // 3: where_child_bus.v1.GetBusRouteResponse - (BusType)(0), // 4: where_child_bus.v1.BusType - (*BusRoute)(nil), // 5: where_child_bus.v1.BusRoute + (*CreateBusRouteRequest)(nil), // 0: where_child_bus.v1.CreateBusRouteRequest + (*CreateBusRouteResponse)(nil), // 1: where_child_bus.v1.CreateBusRouteResponse + (*GetBusRouteByBusIDRequest)(nil), // 2: where_child_bus.v1.GetBusRouteByBusIDRequest + (*GetBusRouteByBusIDResponse)(nil), // 3: where_child_bus.v1.GetBusRouteByBusIDResponse + (BusType)(0), // 4: where_child_bus.v1.BusType + (*BusRoute)(nil), // 5: where_child_bus.v1.BusRoute } var file_where_child_bus_v1_bus_route_proto_depIdxs = []int32{ 4, // 0: where_child_bus.v1.CreateBusRouteRequest.bus_type:type_name -> where_child_bus.v1.BusType 5, // 1: where_child_bus.v1.CreateBusRouteResponse.bus_route:type_name -> where_child_bus.v1.BusRoute - 4, // 2: where_child_bus.v1.GetBusRouteRequest.bus_type:type_name -> where_child_bus.v1.BusType - 5, // 3: where_child_bus.v1.GetBusRouteResponse.bus_route:type_name -> where_child_bus.v1.BusRoute + 4, // 2: where_child_bus.v1.GetBusRouteByBusIDRequest.bus_type:type_name -> where_child_bus.v1.BusType + 5, // 3: where_child_bus.v1.GetBusRouteByBusIDResponse.bus_route:type_name -> where_child_bus.v1.BusRoute 0, // 4: where_child_bus.v1.BusRouteService.CreateBusRoute:input_type -> where_child_bus.v1.CreateBusRouteRequest - 2, // 5: where_child_bus.v1.BusRouteService.GetBusRoute:input_type -> where_child_bus.v1.GetBusRouteRequest + 2, // 5: where_child_bus.v1.BusRouteService.GetBusRouteByBusID:input_type -> where_child_bus.v1.GetBusRouteByBusIDRequest 1, // 6: where_child_bus.v1.BusRouteService.CreateBusRoute:output_type -> where_child_bus.v1.CreateBusRouteResponse - 3, // 7: where_child_bus.v1.BusRouteService.GetBusRoute:output_type -> where_child_bus.v1.GetBusRouteResponse + 3, // 7: where_child_bus.v1.BusRouteService.GetBusRouteByBusID:output_type -> where_child_bus.v1.GetBusRouteByBusIDResponse 6, // [6:8] is the sub-list for method output_type 4, // [4:6] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name @@ -367,7 +379,7 @@ func file_where_child_bus_v1_bus_route_proto_init() { } } file_where_child_bus_v1_bus_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBusRouteRequest); i { + switch v := v.(*GetBusRouteByBusIDRequest); i { case 0: return &v.state case 1: @@ -379,7 +391,7 @@ func file_where_child_bus_v1_bus_route_proto_init() { } } file_where_child_bus_v1_bus_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBusRouteResponse); i { + switch v := v.(*GetBusRouteByBusIDResponse); i { case 0: return &v.state case 1: diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_route_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_route_grpc.pb.go index 06aa8ed0..342e29fa 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus_route_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus_route_grpc.pb.go @@ -19,8 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - BusRouteService_CreateBusRoute_FullMethodName = "/where_child_bus.v1.BusRouteService/CreateBusRoute" - BusRouteService_GetBusRoute_FullMethodName = "/where_child_bus.v1.BusRouteService/GetBusRoute" + BusRouteService_CreateBusRoute_FullMethodName = "/where_child_bus.v1.BusRouteService/CreateBusRoute" + BusRouteService_GetBusRouteByBusID_FullMethodName = "/where_child_bus.v1.BusRouteService/GetBusRouteByBusID" ) // BusRouteServiceClient is the client API for BusRouteService service. @@ -28,7 +28,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type BusRouteServiceClient interface { CreateBusRoute(ctx context.Context, in *CreateBusRouteRequest, opts ...grpc.CallOption) (*CreateBusRouteResponse, error) - GetBusRoute(ctx context.Context, in *GetBusRouteRequest, opts ...grpc.CallOption) (*GetBusRouteResponse, error) + GetBusRouteByBusID(ctx context.Context, in *GetBusRouteByBusIDRequest, opts ...grpc.CallOption) (*GetBusRouteByBusIDResponse, error) } type busRouteServiceClient struct { @@ -48,9 +48,9 @@ func (c *busRouteServiceClient) CreateBusRoute(ctx context.Context, in *CreateBu return out, nil } -func (c *busRouteServiceClient) GetBusRoute(ctx context.Context, in *GetBusRouteRequest, opts ...grpc.CallOption) (*GetBusRouteResponse, error) { - out := new(GetBusRouteResponse) - err := c.cc.Invoke(ctx, BusRouteService_GetBusRoute_FullMethodName, in, out, opts...) +func (c *busRouteServiceClient) GetBusRouteByBusID(ctx context.Context, in *GetBusRouteByBusIDRequest, opts ...grpc.CallOption) (*GetBusRouteByBusIDResponse, error) { + out := new(GetBusRouteByBusIDResponse) + err := c.cc.Invoke(ctx, BusRouteService_GetBusRouteByBusID_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -62,7 +62,7 @@ func (c *busRouteServiceClient) GetBusRoute(ctx context.Context, in *GetBusRoute // for forward compatibility type BusRouteServiceServer interface { CreateBusRoute(context.Context, *CreateBusRouteRequest) (*CreateBusRouteResponse, error) - GetBusRoute(context.Context, *GetBusRouteRequest) (*GetBusRouteResponse, error) + GetBusRouteByBusID(context.Context, *GetBusRouteByBusIDRequest) (*GetBusRouteByBusIDResponse, error) } // UnimplementedBusRouteServiceServer should be embedded to have forward compatible implementations. @@ -72,8 +72,8 @@ type UnimplementedBusRouteServiceServer struct { func (UnimplementedBusRouteServiceServer) CreateBusRoute(context.Context, *CreateBusRouteRequest) (*CreateBusRouteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateBusRoute not implemented") } -func (UnimplementedBusRouteServiceServer) GetBusRoute(context.Context, *GetBusRouteRequest) (*GetBusRouteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBusRoute not implemented") +func (UnimplementedBusRouteServiceServer) GetBusRouteByBusID(context.Context, *GetBusRouteByBusIDRequest) (*GetBusRouteByBusIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBusRouteByBusID not implemented") } // UnsafeBusRouteServiceServer may be embedded to opt out of forward compatibility for this service. @@ -105,20 +105,20 @@ func _BusRouteService_CreateBusRoute_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -func _BusRouteService_GetBusRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBusRouteRequest) +func _BusRouteService_GetBusRouteByBusID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBusRouteByBusIDRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BusRouteServiceServer).GetBusRoute(ctx, in) + return srv.(BusRouteServiceServer).GetBusRouteByBusID(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: BusRouteService_GetBusRoute_FullMethodName, + FullMethod: BusRouteService_GetBusRouteByBusID_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusRouteServiceServer).GetBusRoute(ctx, req.(*GetBusRouteRequest)) + return srv.(BusRouteServiceServer).GetBusRouteByBusID(ctx, req.(*GetBusRouteByBusIDRequest)) } return interceptor(ctx, in, info, handler) } @@ -135,8 +135,8 @@ var BusRouteService_ServiceDesc = grpc.ServiceDesc{ Handler: _BusRouteService_CreateBusRoute_Handler, }, { - MethodName: "GetBusRoute", - Handler: _BusRouteService_GetBusRoute_Handler, + MethodName: "GetBusRouteByBusID", + Handler: _BusRouteService_GetBusRouteByBusID_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go index 516530c3..6dfaef38 100644 --- a/backend/proto-gen/go/where_child_bus/v1/resources.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/resources.pb.go @@ -684,6 +684,8 @@ type Bus struct { Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"` EnableFaceRecognition bool `protobuf:"varint,8,opt,name=enable_face_recognition,json=enableFaceRecognition,proto3" json:"enable_face_recognition,omitempty"` NextStationId string `protobuf:"bytes,11,opt,name=next_station_id,json=nextStationId,proto3" json:"next_station_id,omitempty"` + LatestMorningRouteId string `protobuf:"bytes,14,opt,name=latest_morning_route_id,json=latestMorningRouteId,proto3" json:"latest_morning_route_id,omitempty"` + LatestEveningRouteId string `protobuf:"bytes,15,opt,name=latest_evening_route_id,json=latestEveningRouteId,proto3" json:"latest_evening_route_id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } @@ -783,6 +785,20 @@ func (x *Bus) GetNextStationId() string { return "" } +func (x *Bus) GetLatestMorningRouteId() string { + if x != nil { + return x.LatestMorningRouteId + } + return "" +} + +func (x *Bus) GetLatestEveningRouteId() string { + if x != nil { + return x.LatestEveningRouteId + } + return "" +} + func (x *Bus) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -1253,10 +1269,10 @@ type BusRoute struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` - OrderedStationIds []string `protobuf:"bytes,3,rep,name=ordered_station_ids,json=orderedStationIds,proto3" json:"ordered_station_ids,omitempty"` - BusType BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + BusId string `protobuf:"bytes,2,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + OrderedStations []*Station `protobuf:"bytes,3,rep,name=ordered_stations,json=orderedStations,proto3" json:"ordered_stations,omitempty"` + BusType BusType `protobuf:"varint,4,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` } func (x *BusRoute) Reset() { @@ -1305,9 +1321,9 @@ func (x *BusRoute) GetBusId() string { return "" } -func (x *BusRoute) GetOrderedStationIds() []string { +func (x *BusRoute) GetOrderedStations() []*Station { if x != nil { - return x.OrderedStationIds + return x.OrderedStations } return nil } @@ -1412,7 +1428,7 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb9, 0x03, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xa7, 0x04, 0x0a, 0x03, 0x42, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, @@ -1432,139 +1448,147 @@ var file_where_child_bus_v1_resources_proto_rawDesc = []byte{ 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, - 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x22, 0xfc, 0x03, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, - 0x65, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x35, 0x0a, 0x17, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, - 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, - 0x65, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, - 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, - 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, - 0x74, 0x74, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, - 0x61, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, - 0x73, 0x5f, 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x1b, 0x0a, - 0x09, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x08, 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x22, 0xea, 0x01, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, - 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, - 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x52, 0x0a, - 0x13, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0c, 0x62, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x73, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, - 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, - 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, - 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, - 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x76, 0x65, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x69, + 0x6e, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, + 0xfc, 0x03, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, + 0x29, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x42, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, + 0x73, 0x5f, 0x6c, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x4c, 0x75, 0x6e, 0x63, 0x68, 0x42, 0x6f, 0x78, 0x12, 0x28, + 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x74, 0x74, + 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, 0x57, 0x61, 0x74, + 0x65, 0x72, 0x42, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, + 0x75, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x68, 0x61, 0x73, 0x55, 0x6d, 0x62, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x68, + 0x61, 0x73, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x68, 0x61, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xea, + 0x01, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, + 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, + 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, + 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, + 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x22, 0x99, 0x01, 0x0a, 0x08, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, - 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, - 0x75, 0x73, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x11, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2a, 0x73, 0x0a, 0x09, - 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, 0x0a, - 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, - 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, - 0x03, 0x2a, 0x62, 0x0a, 0x0c, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x18, 0x0a, 0x14, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x56, 0x45, - 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, - 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, - 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, - 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, - 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, - 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, - 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, - 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x52, 0x0a, 0x13, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0c, 0x62, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x73, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, + 0xcc, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x68, 0x6f, + 0x74, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, + 0x68, 0x6f, 0x74, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xad, + 0x01, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, + 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, + 0x73, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, + 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x42, 0x6f, 0x61, 0x72, + 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xb1, + 0x01, 0x0a, 0x08, 0x42, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x73, + 0x49, 0x64, 0x12, 0x46, 0x0a, 0x10, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, + 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x2a, 0x73, 0x0a, 0x09, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x42, + 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x42, + 0x55, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, + 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a, 0x62, 0x0a, 0x0c, 0x56, 0x65, 0x68, 0x69, 0x63, + 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x45, 0x48, 0x49, 0x43, + 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, + 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x01, + 0x12, 0x19, 0x0a, 0x15, 0x56, 0x45, 0x48, 0x49, 0x43, 0x4c, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x02, 0x2a, 0x45, 0x0a, 0x03, 0x53, + 0x65, 0x78, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x58, 0x5f, 0x4d, + 0x41, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x57, 0x4f, 0x4d, 0x41, + 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x58, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, + 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, + 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, + 0x10, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x02, 0x42, 0xf1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, + 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, + 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, + 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, + 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1619,12 +1643,13 @@ var file_where_child_bus_v1_resources_proto_depIdxs = []int32{ 15, // 16: where_child_bus.v1.ChildPhoto.created_at:type_name -> google.protobuf.Timestamp 15, // 17: where_child_bus.v1.ChildPhoto.updated_at:type_name -> google.protobuf.Timestamp 15, // 18: where_child_bus.v1.BoardingRecord.timestamp:type_name -> google.protobuf.Timestamp - 3, // 19: where_child_bus.v1.BusRoute.bus_type:type_name -> where_child_bus.v1.BusType - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 10, // 19: where_child_bus.v1.BusRoute.ordered_stations:type_name -> where_child_bus.v1.Station + 3, // 20: where_child_bus.v1.BusRoute.bus_type:type_name -> where_child_bus.v1.BusType + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_where_child_bus_v1_resources_proto_init() } diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 5dde9acb..52ab82d5 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -19,6 +19,7 @@ import ( childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" nurseryRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/nursery" + stationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" mlv1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1" ) @@ -179,9 +180,19 @@ func (i *Interactor) ChangeBusStatus(ctx context.Context, req *pb.ChangeBusStatu case pb.BusStatus_BUS_STATUS_RUNNING: switch req.BusType { case pb.BusType_BUS_TYPE_MORNING: - update.SetNextStation(bus.Edges.MorningFirstStation) + firstStation, err := i.getFirstStation(bus, pb.BusType_BUS_TYPE_MORNING) + if err != nil { + i.logger.Error("failed to get first station", "error", err) + return nil, err + } + update.SetNextStation(firstStation) case pb.BusType_BUS_TYPE_EVENING: - update.SetNextStation(bus.Edges.EveningFirstStation) + firstStation, err := i.getFirstStation(bus, pb.BusType_BUS_TYPE_MORNING) + if err != nil { + i.logger.Error("failed to get first station", "error", err) + return nil, err + } + update.SetNextStation(firstStation) } } @@ -597,20 +608,6 @@ func (i *Interactor) getBusList(ctx context.Context, queryFunc func(*ent.Tx) (*e return pbBuses, nil } -// parseGuardianIDs は、指定されたガーディアンIDの文字列のスライスをUUIDのスライスに変換します。 -func parseGuardianIDs(logger slog.Logger, ids []string) ([]uuid.UUID, error) { - parsedIDs := make([]uuid.UUID, len(ids)) - for i, id := range ids { - parsedID, err := uuid.Parse(id) - if err != nil { - logger.Error("failed to parse guardian ID", "error", err) - return nil, err - } - parsedIDs[i] = parsedID - } - return parsedIDs, nil -} - func getStationIDs(logger *slog.Logger, ctx context.Context, bus *ent.Bus) (nextStationId string, err error) { nextStation, err := bus.QueryNextStation().Only(ctx) if err != nil && !ent.IsNotFound(err) { @@ -623,3 +620,59 @@ func getStationIDs(logger *slog.Logger, ctx context.Context, bus *ent.Bus) (next return nextStationId, nil } + +func (i *Interactor) getFirstStation(bus *ent.Bus, busType pb.BusType) (*ent.Station, error) { + var firstStation *ent.Station + var busRoute *ent.BusRoute + var err error + + if busType == pb.BusType_BUS_TYPE_MORNING { + busRoute, err = bus.QueryLatestMorningRoute().Only(context.Background()) + } else if busType == pb.BusType_BUS_TYPE_EVENING { + busRoute, err = bus.QueryLatestEveningRoute().Only(context.Background()) + } else { + return nil, fmt.Errorf("invalid bus type") + } + + if err != nil { + i.logger.Error("failed to get bus route", "error", err) + return nil, err + } + + stations, err := busRoute. + QueryBusRouteAssociations(). + QueryStation(). + Order(ent.Asc("order")). + All(context.Background()) + if err != nil { + i.logger.Error("failed to get stations", "error", err) + return nil, err + } + + for _, station := range stations { + guardian, err := station.QueryGuardian(). + Where(guardianRepo.HasStationWith(stationRepo.ID(station.ID))). + Only(context.Background()) + if err != nil { + i.logger.Error("failed to get guardian", "error", err) + return nil, err + } + if busType == pb.BusType_BUS_TYPE_MORNING { + if !guardian.IsUseMorningBus { + continue + } + } else if busType == pb.BusType_BUS_TYPE_EVENING { + if !guardian.IsUseEveningBus { + continue + } + } + firstStation = station + break + } + + if firstStation == nil { + return nil, fmt.Errorf("no station found") + } + + return firstStation, nil +} diff --git a/backend/usecases/busroute/bus_route.go b/backend/usecases/busroute/bus_route.go new file mode 100644 index 00000000..8269b2f9 --- /dev/null +++ b/backend/usecases/busroute/bus_route.go @@ -0,0 +1,267 @@ +package busroute + +import ( + "context" + + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" + busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + busRouteRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" + stationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" + mlv1 "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1" + pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" + "github.com/GreenTeaProgrammers/WhereChildBus/backend/usecases/utils" + "github.com/google/uuid" + "golang.org/x/exp/slog" +) + +type Interactor struct { + entClient *ent.Client + logger *slog.Logger + MLServiceClient mlv1.MachineLearningServiceClient +} + +func NewInteractor(entClient *ent.Client, logger *slog.Logger, mlClient mlv1.MachineLearningServiceClient) *Interactor { + return &Interactor{entClient, logger, mlClient} +} + +func (i *Interactor) CreateBusRoute(ctx context.Context, req *pb.CreateBusRouteRequest) (*pb.CreateBusRouteResponse, error) { + busID, err := uuid.Parse(req.BusId) + if err != nil { + i.logger.Error("failed to parse bus id", "error", err) + return nil, err + } + tx, err := i.entClient.Tx(ctx) + if err != nil { + i.logger.Error("failed to start transaction", "error", err) + return nil, err + } + defer utils.RollbackTx(tx, i.logger) + + busType, err := utils.ConvertPbBusTypeToEntBusType(req.BusType) + if err != nil { + i.logger.Error("failed to convert bus type", "error", err) + return nil, err + } + + // busを取得 + bus, err := tx.Bus.Query().Where(busRepo.ID(busID)).Only(ctx) + if err != nil { + i.logger.Error("failed to get bus", "error", err) + return nil, err + } + + busRoute, err := tx.BusRoute.Create(). + SetBusType(*busType). + AddBus(bus). + Save(ctx) + + if err != nil { + i.logger.Error("failed to create bus route", "error", err) + return nil, err + } + + if *busType == busRouteRepo.BusTypeMorning { + _, err := tx.Bus.UpdateOneID(busID). + ClearLatestMorningRoute(). + SetLatestMorningRoute(busRoute). + Save(ctx) + if err != nil { + i.logger.Error("failed to update bus", "error", err) + return nil, err + } + } else if *busType == busRouteRepo.BusTypeEvening { + _, err := tx.Bus.UpdateOneID(busID). + ClearLatestEveningRoute(). + SetLatestEveningRoute(busRoute). + Save(ctx) + if err != nil { + i.logger.Error("failed to update bus", "error", err) + return nil, err + } + } + + pbChildren, err := i.createAssociation(ctx, tx, req.GuardianIds, busRoute) + if err != nil { + return nil, err + } + + ChildIds := make([]string, len(pbChildren)) + for index := range pbChildren { + childCopy := &pb.Child{ + Id: pbChildren[index].Id, + } + ChildIds[index] = childCopy.Id + } + + i.logger.Info("Calling MLServiceClient.Train") + response, err := i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ + BusId: req.BusId, + ChildIds: ChildIds, + NurseryId: req.NurseryId, + BusType: req.BusType, + }) + + if err != nil { + i.logger.Error("failed to transport to train server", "error", err) + return nil, err + } + + if !response.IsStarted { + i.logger.Error("failed to start training", "error", err) + return nil, err + } + + i.logger.Info("Training started") + + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + + pbBusRoute, err := i.CreateBusRouteResponse(ctx, tx, busRoute) + if err != nil { + i.logger.Error("failed to create bus route response", "error", err) + return nil, err + } + + return &pb.CreateBusRouteResponse{BusRoute: pbBusRoute}, nil +} + +func (i *Interactor) createAssociation(ctx context.Context, tx *ent.Tx, guardianIdList []string, busRoute *ent.BusRoute) ([]*pb.Child, error) { + var pbChildren []*pb.Child + for index, guardianId := range guardianIdList { + guardianId, err := uuid.Parse(guardianId) + if err != nil { + i.logger.Error("failed to parse guardian id", "error", err) + return nil, err + } + + station, err := tx.Station.Query(). + Where(stationRepo.HasGuardianWith(guardian.ID(guardianId))). + Only(ctx) + + if err != nil { + i.logger.Error("failed to get station", "error", err) + return nil, err + } + + _, err = tx.BusRouteAssociation.Create(). + SetBusRoute(busRoute). + SetStation(station). + SetOrder(int32(index)). + Save(ctx) + if err != nil { + i.logger.Error("failed to update guardian", "error", err) + return nil, err + } + + children, err := tx.Child.Query(). + Where(childRepo.HasGuardianWith(guardian.ID(guardianId))). + WithGuardian(). + All(ctx) + if err != nil { + i.logger.Error("failed to get children", "error", err) + return nil, err + } + + for _, child := range children { + _, err := tx.ChildBusAssociation.Create(). + SetChild(child). + SetBusRoute(busRoute). + Save(ctx) + if err != nil { + i.logger.Error("failed to create child bus route association", "error", err) + return nil, err + } + pbChildren = append(pbChildren, utils.ToPbChild(child)) + } + } + return pbChildren, nil +} + +func (i Interactor) GetBusRouteByBusID(ctx context.Context, req *pb.GetBusRouteByBusIDRequest) (*pb.GetBusRouteByBusIDResponse, error) { + busRouteID, err := uuid.Parse(req.BusId) + if err != nil { + i.logger.Error("failed to parse bus route id", "error", err) + return nil, err + } + + busType, err := utils.ConvertPbBusTypeToEntBusType(req.BusType) + + if err != nil { + i.logger.Error("failed to convert bus type", "error", err) + return nil, err + + } + + busRoute, err := i.entClient.BusRoute.Query(). + Where(busRouteRepo.ID(busRouteID)). + Where(busRouteRepo.BusTypeEQ(*busType)). + Only(ctx) + + if err != nil { + i.logger.Error("failed to get bus route", "error", err) + return nil, err + } + + pbBusRoute, err := i.CreateBusRouteResponse(ctx, nil, busRoute) + if err != nil { + i.logger.Error("failed to create bus route response", "error", err) + return nil, err + } + + return &pb.GetBusRouteByBusIDResponse{BusRoute: pbBusRoute}, nil +} + +func (i Interactor) CreateBusRouteResponse(ctx context.Context, tx *ent.Tx, busRoute *ent.BusRoute) (*pb.BusRoute, error) { + busType := utils.ConvertBusTypeToPbBusType(busRoute.BusType) + bus, err := tx.Bus.Query().Where( + busRepo.HasBusRouteWith( + busRouteRepo.ID(busRoute.ID), + ), + ).Only(ctx) + + if err != nil { + i.logger.Error("failed to get bus", "error", err) + return nil, err + + } + + var orderedStations []*pb.Station + stations, err := busRoute. + QueryBusRouteAssociations(). + QueryStation(). + Order(ent.Asc("order")). + All(ctx) + if err != nil { + i.logger.Error("failed to get stations", "error", err) + return nil, err + } + + for _, station := range stations { + guardian, err := station.QueryGuardian().Where(guardian.HasStationWith(stationRepo.ID(station.ID))).Only(ctx) + if err != nil { + i.logger.Error("failed to get guardian", "error", err) + return nil, err + } + if busType == pb.BusType_BUS_TYPE_MORNING { + if !guardian.IsUseMorningBus { + continue + } + } else if busType == pb.BusType_BUS_TYPE_EVENING { + if !guardian.IsUseEveningBus { + continue + } + } + orderedStations = append(orderedStations, utils.ToPbStation(station)) + } + + return &pb.BusRoute{ + Id: busRoute.ID.String(), + BusId: bus.ID.String(), + BusType: busType, + OrderedStations: orderedStations, + }, nil +} diff --git a/backend/usecases/child/child.go b/backend/usecases/child/child.go index e566585d..8913a695 100644 --- a/backend/usecases/child/child.go +++ b/backend/usecases/child/child.go @@ -16,6 +16,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" boardingRecordRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/boardingrecord" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + busRouteRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" childBusAssociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/childbusassociation" @@ -113,7 +114,7 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest i.logger.Error("failed to upload photo to GCS", "error", err) return nil, err } - + i.logger.Info("Byte data of photo", "photoData", photoData) // childPhotoレコードをデータベースに作成 _, err := tx.ChildPhoto. Create(). @@ -133,7 +134,12 @@ func (i *Interactor) CreateChild(ctx context.Context, req *pb.CreateChildRequest ChildId: child.ID.String(), }) - if !res.IsStarted && err != nil { + if err != nil { + i.logger.Error("failed to call FaceDetectAndClip RPC", "error", err) + return nil, err + } + + if !res.IsStarted { i.logger.Error("failed to start face detection and clipping", "error", err) return nil, err } @@ -309,7 +315,15 @@ func (i *Interactor) GetChildListByBusID(ctx context.Context, req *pb.GetChildLi children, err := i.getChildList(ctx, func(tx *ent.Tx) (*ent.ChildQuery, error) { // Guardianの先のNurseryまで取得 return tx.Child.Query(). - Where(childRepo.HasChildBusAssociationsWith(childBusAssociationRepo.BusIDEQ(busID))). + Where( + childRepo.HasChildBusAssociationsWith( + childBusAssociationRepo.HasBusRouteWith( + busRouteRepo.HasBusWith( + busRepo.IDEQ(busID), + ), + ), + ), + ). WithGuardian(), nil }) @@ -497,7 +511,6 @@ func (i *Interactor) uploadPhotoToGCS(ctx context.Context, nurseryID, childID, p i.logger.Error("failed to close writer", "error", err) return err } - return nil } diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 4702c308..0d6ecfe5 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -7,6 +7,8 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + busRouteRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" + busRouteAssociationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busrouteassociation" guardianRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/guardian" stationRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/station" pb "github.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1" @@ -71,12 +73,6 @@ func (i *Interactor) UpdateStationLocationByGuardianID(ctx context.Context, req return nil, err } - morningNextStationID, eveningNextStationID, err := getNextStationIDs(*i.logger, ctx, station) - if err != nil { - i.logger.Error("failed to get next station IDs", "error", err) - return nil, err // エラーハンドリング - } - // トランザクションをコミットします。 if err := tx.Commit(); err != nil { i.logger.Error(("failed to commit transaction"), "error", err) @@ -85,7 +81,7 @@ func (i *Interactor) UpdateStationLocationByGuardianID(ctx context.Context, req // レスポンスを作成します。 return &pb.UpdateStationLocationByGuardianIdResponse{ - Station: utils.ToPbStation(station, morningNextStationID, eveningNextStationID), + Station: utils.ToPbStation(station), }, nil } @@ -150,13 +146,6 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq } } - // 次のバス停を取得 - morningNextStationID, eveningNextStationID, err := getNextStationIDs(*i.logger, ctx, updateStation) - if err != nil { - i.logger.Error("failed to get next station IDs", "error", err) - return nil, err - } - // トランザクションのコミット if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) @@ -165,7 +154,7 @@ func (i *Interactor) UpdateStation(ctx context.Context, req *pb.UpdateStationReq // レスポンスの作成と返却 return &pb.UpdateStationResponse{ - Station: utils.ToPbStation(updateStation, morningNextStationID, eveningNextStationID), + Station: utils.ToPbStation(updateStation), }, nil } @@ -177,7 +166,15 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati } stations, err := i.entClient.Station.Query(). - Where(stationRepo.HasBusWith(busRepo.ID(busID))). + Where( // !要チェック + stationRepo.HasBusRouteAssociationsWith( + busRouteAssociationRepo.HasBusRouteWith( + busRouteRepo.HasBusWith( + busRepo.IDEQ(busID), + ), + ), + ), + ). WithGuardian(func(q *ent.GuardianQuery) { q.WithNursery() q.WithChildren( @@ -198,14 +195,13 @@ func (i *Interactor) GetStationListByBusId(ctx context.Context, req *pb.GetStati uniqueChildren := make(map[string]*pb.Child) for _, station := range stations { - morningNextStationID, eveningNextStationID, err := getNextStationIDs(*i.logger, ctx, station) if err != nil { // エラーメッセージにステーションIDを追加して明確にする i.logger.Error("failed to get next station IDs", "error", err) return nil, err } - pbStation := utils.ToPbStation(station, morningNextStationID, eveningNextStationID) + pbStation := utils.ToPbStation(station) pbStations = append(pbStations, pbStation) if station.Edges.Guardian != nil { @@ -252,8 +248,16 @@ func (i Interactor) GetUnregisteredStationList(ctx context.Context, req *pb.GetU return nil, err } - stations, err := i.entClient.Station.Query(). - Where(stationRepo.HasBusWith(busRepo.IDEQ(busID))). + stations, err := i.entClient.Station.Query(). // !要チェック + Where( + stationRepo.HasBusRouteAssociationsWith( + busRouteAssociationRepo.HasBusRouteWith( + busRouteRepo.HasBusWith( + busRepo.IDEQ(busID), + ), + ), + ), + ). Where(stationRepo.Latitude(0)). Where(stationRepo.Longitude(0)). WithGuardian(func(q *ent.GuardianQuery) { @@ -269,14 +273,8 @@ func (i Interactor) GetUnregisteredStationList(ctx context.Context, req *pb.GetU var pbStations []*pb.Station var pbGuardians []*pb.GuardianResponse for _, station := range stations { - morningNextStationID, eveningNextStationID, err := getNextStationIDs(*i.logger, ctx, station) - if err != nil { - i.logger.Error("failed to get next station IDs", "error", err) - return nil, err - } - - pbStations = append(pbStations, utils.ToPbStation(station, morningNextStationID, eveningNextStationID)) - pbGuardians = append(pbGuardians, utils.ToPbGuardianResponse(station.Edges.Guardian)) + pbStations = append(pbStations, utils.ToPbStation(station)) + pbGuardians = append(pbGuardians, utils.ToPbGuardianResponse(station.Edges.Guardian)) // !要チェック } return &pb.GetUnregisteredStationListResponse{ @@ -284,24 +282,3 @@ func (i Interactor) GetUnregisteredStationList(ctx context.Context, req *pb.GetU Guardians: pbGuardians, }, nil } - -func getNextStationIDs(logger slog.Logger, ctx context.Context, station *ent.Station) (morningNextStationID, eveningNextStationID string, err error) { - morningNextStation, err := station.QueryMorningNextStation().Only(ctx) - if err != nil && !ent.IsNotFound(err) { - logger.Error("failed to query morning next station", "error", err) - return "", "", err - } - if morningNextStation != nil { - morningNextStationID = morningNextStation.ID.String() - } - - eveningNextStation, err := station.QueryEveningNextStation().Only(ctx) - if err != nil && !ent.IsNotFound(err) { - return "", "", err - } - if eveningNextStation != nil { - eveningNextStationID = eveningNextStation.ID.String() - } - - return morningNextStationID, eveningNextStationID, nil -} diff --git a/backend/usecases/utils/utils.go b/backend/usecases/utils/utils.go index f310295b..f2607745 100644 --- a/backend/usecases/utils/utils.go +++ b/backend/usecases/utils/utils.go @@ -14,6 +14,7 @@ import ( "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" + busRouteRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/busroute" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/child" ) @@ -66,7 +67,7 @@ func ConvertPbStatusToEntStatus(pbStatus pb.BusStatus) (*busRepo.Status, error) } } -func ToPbBus(t *ent.Bus, nextStationID, morningFirstStationID, eveningFirstStationID string) *pb.Bus { +func ToPbBus(t *ent.Bus, nextStationID string) *pb.Bus { busStatus := convertStatusToPbStatus(t.Status) return &pb.Bus{ Id: t.ID.String(), @@ -78,10 +79,9 @@ func ToPbBus(t *ent.Bus, nextStationID, morningFirstStationID, eveningFirstStati Longitude: t.Longitude, EnableFaceRecognition: t.EnableFaceRecognition, NextStationId: nextStationID, - MorningFirstStationId: morningFirstStationID, - EveningFirstStationId: eveningFirstStationID, CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + // ? 最新のバスルートも含める? } } @@ -142,16 +142,47 @@ func ToPbNurseryResponse(t *ent.Nursery) *pb.NurseryResponse { } } -func ToPbStation(t *ent.Station, morningNextStationID, eveningNextStationID string) *pb.Station { +func ToPbStation(t *ent.Station) *pb.Station { return &pb.Station{ - Id: t.ID.String(), - GuardianId: t.Edges.Guardian.ID.String(), - MorningNextStationId: morningNextStationID, - EveningNextStationId: eveningNextStationID, - Latitude: t.Latitude, - Longitude: t.Longitude, - CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, - UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + Id: t.ID.String(), + GuardianId: t.Edges.Guardian.ID.String(), + Latitude: t.Latitude, + Longitude: t.Longitude, + CreatedAt: ×tamppb.Timestamp{Seconds: t.CreatedAt.Unix()}, + UpdatedAt: ×tamppb.Timestamp{Seconds: t.UpdatedAt.Unix()}, + } +} + +func ToPbBusRoute(t *ent.BusRoute) *pb.BusRoute { + busType := ConvertBusTypeToPbBusType(t.BusType) + return &pb.BusRoute{ + Id: t.ID.String(), + BusType: busType, + } +} + +func ConvertBusTypeToPbBusType(busType busRouteRepo.BusType) pb.BusType { + switch busType { + case busRouteRepo.BusTypeMorning: + return pb.BusType_BUS_TYPE_MORNING + case busRouteRepo.BusTypeEvening: + return pb.BusType_BUS_TYPE_EVENING + default: + return pb.BusType_BUS_TYPE_UNSPECIFIED + } +} + +func ConvertPbBusTypeToEntBusType(pbBusType pb.BusType) (*busRouteRepo.BusType, error) { + switch pbBusType { + case pb.BusType_BUS_TYPE_MORNING: + busType := busRouteRepo.BusTypeMorning + return &busType, nil + case pb.BusType_BUS_TYPE_EVENING: + busType := busRouteRepo.BusTypeEvening + return &busType, nil + default: + // 不正な値の場合はエラーを返す + return nil, fmt.Errorf("invalid BusType value: %v", pbBusType) } } @@ -205,7 +236,7 @@ func RollbackTx(tx *ent.Tx, logger *slog.Logger) { func CheckAndFixBusStationCoordinates(logger slog.Logger, ctx context.Context, bus *ent.Bus) (is_ready bool, err error) { // バスのステーションを取得 - stations, err := bus.QueryStations().All(ctx) + stations, err := bus.QueryBusRoute().QueryBusRouteAssociations().QueryStation().All(ctx) // !要チェック if err != nil { logger.Error("failed to get stations", "error", err) return false, err From 38777e57a92bab9231b418a7d31b0b4990c638b7 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Thu, 22 Feb 2024 20:00:21 +0900 Subject: [PATCH 644/771] =?UTF-8?q?fix:=20=E5=AD=A6=E7=BF=92=E3=81=AB?= =?UTF-8?q?=E9=96=A2=E3=81=99=E3=82=8BPython=20<->=20go=E3=82=B5=E3=83=BC?= =?UTF-8?q?=E3=83=93=E3=82=B9=E3=82=92stream=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 163 ++++++++++++------ .../v1/machine_learning_grpc.pb.go | 84 ++++++--- .../machine_learning/v1/health_check_pb2.py | 29 ++-- .../machine_learning/v1/health_check_pb2.pyi | 4 +- .../v1/health_check_pb2_grpc.py | 1 + .../v1/machine_learning_pb2.py | 29 ++-- .../v1/machine_learning_pb2.pyi | 36 ++-- .../v1/machine_learning_pb2_grpc.py | 13 +- .../generated/where_child_bus/v1/bus_pb2.py | 87 +++++----- .../v1/machine_learning.proto | 10 +- 10 files changed, 284 insertions(+), 172 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index 7f86a600..706bc2c0 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -21,6 +21,55 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type Status int32 + +const ( + Status_SUCCESS Status = 0 + Status_PROCESSING Status = 1 + Status_FAILED Status = 2 +) + +// Enum value maps for Status. +var ( + Status_name = map[int32]string{ + 0: "SUCCESS", + 1: "PROCESSING", + 2: "FAILED", + } + Status_value = map[string]int32{ + "SUCCESS": 0, + "PROCESSING": 1, + "FAILED": 2, + } +) + +func (x Status) Enum() *Status { + p := new(Status) + *p = x + return p +} + +func (x Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Status) Descriptor() protoreflect.EnumDescriptor { + return file_machine_learning_v1_machine_learning_proto_enumTypes[0].Descriptor() +} + +func (Status) Type() protoreflect.EnumType { + return &file_machine_learning_v1_machine_learning_proto_enumTypes[0] +} + +func (x Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Status.Descriptor instead. +func (Status) EnumDescriptor() ([]byte, []int) { + return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{0} +} + type TrainRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -97,7 +146,7 @@ type TrainResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - IsStarted bool `protobuf:"varint,1,opt,name=is_started,json=isStarted,proto3" json:"is_started,omitempty"` + Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` } func (x *TrainResponse) Reset() { @@ -132,9 +181,9 @@ func (*TrainResponse) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{1} } -func (x *TrainResponse) GetIsStarted() bool { +func (x *TrainResponse) GetStatus() bool { if x != nil { - return x.IsStarted + return x.Status } return false } @@ -317,43 +366,46 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x2e, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, - 0x4c, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, - 0x18, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, - 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, - 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, - 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x32, - 0xb6, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x05, 0x54, 0x72, - 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, - 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x04, 0x50, 0x72, - 0x65, 0x64, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, - 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x28, 0x01, 0x30, 0x01, 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, - 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x27, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4c, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x19, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, + 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x31, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, + 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x32, 0xba, 0x02, 0x0a, 0x16, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, + 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x29, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, + 0x12, 0x76, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, + 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, + 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, + 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, @@ -385,24 +437,26 @@ func file_machine_learning_v1_machine_learning_proto_rawDescGZIP() []byte { return file_machine_learning_v1_machine_learning_proto_rawDescData } +var file_machine_learning_v1_machine_learning_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_machine_learning_v1_machine_learning_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ - (*TrainRequest)(nil), // 0: machine_learning.v1.TrainRequest - (*TrainResponse)(nil), // 1: machine_learning.v1.TrainResponse - (*PredResponse)(nil), // 2: machine_learning.v1.PredResponse - (*FaceDetectAndClipRequest)(nil), // 3: machine_learning.v1.FaceDetectAndClipRequest - (*FaceDetectAndClipResponse)(nil), // 4: machine_learning.v1.FaceDetectAndClipResponse - (v1.BusType)(0), // 5: where_child_bus.v1.BusType - (*v1.StreamBusVideoRequest)(nil), // 6: where_child_bus.v1.StreamBusVideoRequest + (Status)(0), // 0: machine_learning.v1.status + (*TrainRequest)(nil), // 1: machine_learning.v1.TrainRequest + (*TrainResponse)(nil), // 2: machine_learning.v1.TrainResponse + (*PredResponse)(nil), // 3: machine_learning.v1.PredResponse + (*FaceDetectAndClipRequest)(nil), // 4: machine_learning.v1.FaceDetectAndClipRequest + (*FaceDetectAndClipResponse)(nil), // 5: machine_learning.v1.FaceDetectAndClipResponse + (v1.BusType)(0), // 6: where_child_bus.v1.BusType + (*v1.StreamBusVideoRequest)(nil), // 7: where_child_bus.v1.StreamBusVideoRequest } var file_machine_learning_v1_machine_learning_proto_depIdxs = []int32{ - 5, // 0: machine_learning.v1.TrainRequest.bus_type:type_name -> where_child_bus.v1.BusType - 0, // 1: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest - 6, // 2: machine_learning.v1.MachineLearningService.Pred:input_type -> where_child_bus.v1.StreamBusVideoRequest - 3, // 3: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest - 1, // 4: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse - 2, // 5: machine_learning.v1.MachineLearningService.Pred:output_type -> machine_learning.v1.PredResponse - 4, // 6: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse + 6, // 0: machine_learning.v1.TrainRequest.bus_type:type_name -> where_child_bus.v1.BusType + 1, // 1: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest + 7, // 2: machine_learning.v1.MachineLearningService.Pred:input_type -> where_child_bus.v1.StreamBusVideoRequest + 4, // 3: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest + 2, // 4: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse + 3, // 5: machine_learning.v1.MachineLearningService.Pred:output_type -> machine_learning.v1.PredResponse + 5, // 6: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse 4, // [4:7] is the sub-list for method output_type 1, // [1:4] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -482,13 +536,14 @@ func file_machine_learning_v1_machine_learning_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_machine_learning_v1_machine_learning_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 5, NumExtensions: 0, NumServices: 1, }, GoTypes: file_machine_learning_v1_machine_learning_proto_goTypes, DependencyIndexes: file_machine_learning_v1_machine_learning_proto_depIdxs, + EnumInfos: file_machine_learning_v1_machine_learning_proto_enumTypes, MessageInfos: file_machine_learning_v1_machine_learning_proto_msgTypes, }.Build() File_machine_learning_v1_machine_learning_proto = out.File diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go index fa63ffc6..4b8d53ca 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go @@ -31,7 +31,7 @@ const ( type MachineLearningServiceClient interface { Train(ctx context.Context, in *TrainRequest, opts ...grpc.CallOption) (*TrainResponse, error) Pred(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_PredClient, error) - FaceDetectAndClip(ctx context.Context, in *FaceDetectAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) + FaceDetectAndClip(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_FaceDetectAndClipClient, error) } type machineLearningServiceClient struct { @@ -82,13 +82,35 @@ func (x *machineLearningServicePredClient) Recv() (*PredResponse, error) { return m, nil } -func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, in *FaceDetectAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) { - out := new(FaceDetectAndClipResponse) - err := c.cc.Invoke(ctx, MachineLearningService_FaceDetectAndClip_FullMethodName, in, out, opts...) +func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_FaceDetectAndClipClient, error) { + stream, err := c.cc.NewStream(ctx, &MachineLearningService_ServiceDesc.Streams[1], MachineLearningService_FaceDetectAndClip_FullMethodName, opts...) if err != nil { return nil, err } - return out, nil + x := &machineLearningServiceFaceDetectAndClipClient{stream} + return x, nil +} + +type MachineLearningService_FaceDetectAndClipClient interface { + Send(*FaceDetectAndClipRequest) error + Recv() (*FaceDetectAndClipResponse, error) + grpc.ClientStream +} + +type machineLearningServiceFaceDetectAndClipClient struct { + grpc.ClientStream +} + +func (x *machineLearningServiceFaceDetectAndClipClient) Send(m *FaceDetectAndClipRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *machineLearningServiceFaceDetectAndClipClient) Recv() (*FaceDetectAndClipResponse, error) { + m := new(FaceDetectAndClipResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil } // MachineLearningServiceServer is the server API for MachineLearningService service. @@ -97,7 +119,7 @@ func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, in type MachineLearningServiceServer interface { Train(context.Context, *TrainRequest) (*TrainResponse, error) Pred(MachineLearningService_PredServer) error - FaceDetectAndClip(context.Context, *FaceDetectAndClipRequest) (*FaceDetectAndClipResponse, error) + FaceDetectAndClip(MachineLearningService_FaceDetectAndClipServer) error } // UnimplementedMachineLearningServiceServer should be embedded to have forward compatible implementations. @@ -110,8 +132,8 @@ func (UnimplementedMachineLearningServiceServer) Train(context.Context, *TrainRe func (UnimplementedMachineLearningServiceServer) Pred(MachineLearningService_PredServer) error { return status.Errorf(codes.Unimplemented, "method Pred not implemented") } -func (UnimplementedMachineLearningServiceServer) FaceDetectAndClip(context.Context, *FaceDetectAndClipRequest) (*FaceDetectAndClipResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FaceDetectAndClip not implemented") +func (UnimplementedMachineLearningServiceServer) FaceDetectAndClip(MachineLearningService_FaceDetectAndClipServer) error { + return status.Errorf(codes.Unimplemented, "method FaceDetectAndClip not implemented") } // UnsafeMachineLearningServiceServer may be embedded to opt out of forward compatibility for this service. @@ -169,22 +191,30 @@ func (x *machineLearningServicePredServer) Recv() (*v1.StreamBusVideoRequest, er return m, nil } -func _MachineLearningService_FaceDetectAndClip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FaceDetectAndClipRequest) - if err := dec(in); err != nil { +func _MachineLearningService_FaceDetectAndClip_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(MachineLearningServiceServer).FaceDetectAndClip(&machineLearningServiceFaceDetectAndClipServer{stream}) +} + +type MachineLearningService_FaceDetectAndClipServer interface { + Send(*FaceDetectAndClipResponse) error + Recv() (*FaceDetectAndClipRequest, error) + grpc.ServerStream +} + +type machineLearningServiceFaceDetectAndClipServer struct { + grpc.ServerStream +} + +func (x *machineLearningServiceFaceDetectAndClipServer) Send(m *FaceDetectAndClipResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *machineLearningServiceFaceDetectAndClipServer) Recv() (*FaceDetectAndClipRequest, error) { + m := new(FaceDetectAndClipRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } - if interceptor == nil { - return srv.(MachineLearningServiceServer).FaceDetectAndClip(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MachineLearningService_FaceDetectAndClip_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MachineLearningServiceServer).FaceDetectAndClip(ctx, req.(*FaceDetectAndClipRequest)) - } - return interceptor(ctx, in, info, handler) + return m, nil } // MachineLearningService_ServiceDesc is the grpc.ServiceDesc for MachineLearningService service. @@ -198,10 +228,6 @@ var MachineLearningService_ServiceDesc = grpc.ServiceDesc{ MethodName: "Train", Handler: _MachineLearningService_Train_Handler, }, - { - MethodName: "FaceDetectAndClip", - Handler: _MachineLearningService_FaceDetectAndClip_Handler, - }, }, Streams: []grpc.StreamDesc{ { @@ -210,6 +236,12 @@ var MachineLearningService_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, ClientStreams: true, }, + { + StreamName: "FaceDetectAndClip", + Handler: _MachineLearningService_FaceDetectAndClip_Handler, + ServerStreams: true, + ClientStreams: true, + }, }, Metadata: "machine_learning/v1/machine_learning.proto", } diff --git a/machine_learning/src/generated/machine_learning/v1/health_check_pb2.py b/machine_learning/src/generated/machine_learning/v1/health_check_pb2.py index 7551ecae..a6997700 100644 --- a/machine_learning/src/generated/machine_learning/v1/health_check_pb2.py +++ b/machine_learning/src/generated/machine_learning/v1/health_check_pb2.py @@ -7,30 +7,25 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n&machine_learning/v1/health_check.proto\x12\x13machine_learning.v1"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2a\n\x12HealthcheckService\x12K\n\x04Ping\x12 .machine_learning.v1.PingRequest\x1a!.machine_learning.v1.PingResponseB\xfe\x01\n\x17\x63om.machine_learning.v1B\x10HealthCheckProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' -) + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&machine_learning/v1/health_check.proto\x12\x13machine_learning.v1\"!\n\x0bPingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"(\n\x0cPingResponse\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message2a\n\x12HealthcheckService\x12K\n\x04Ping\x12 .machine_learning.v1.PingRequest\x1a!.machine_learning.v1.PingResponseB\xfe\x01\n\x17\x63om.machine_learning.v1B\x10HealthCheckProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "machine_learning.v1.health_check_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'machine_learning.v1.health_check_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals[ - "DESCRIPTOR" - ]._serialized_options = b"\n\027com.machine_learning.v1B\020HealthCheckProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" - _globals["_PINGREQUEST"]._serialized_start = 63 - _globals["_PINGREQUEST"]._serialized_end = 96 - _globals["_PINGRESPONSE"]._serialized_start = 98 - _globals["_PINGRESPONSE"]._serialized_end = 138 - _globals["_HEALTHCHECKSERVICE"]._serialized_start = 140 - _globals["_HEALTHCHECKSERVICE"]._serialized_end = 237 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\027com.machine_learning.v1B\020HealthCheckProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1' + _globals['_PINGREQUEST']._serialized_start=63 + _globals['_PINGREQUEST']._serialized_end=96 + _globals['_PINGRESPONSE']._serialized_start=98 + _globals['_PINGRESPONSE']._serialized_end=138 + _globals['_HEALTHCHECKSERVICE']._serialized_start=140 + _globals['_HEALTHCHECKSERVICE']._serialized_end=237 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/machine_learning/v1/health_check_pb2.pyi b/machine_learning/src/generated/machine_learning/v1/health_check_pb2.pyi index 49aebc89..fb2e805c 100644 --- a/machine_learning/src/generated/machine_learning/v1/health_check_pb2.pyi +++ b/machine_learning/src/generated/machine_learning/v1/health_check_pb2.pyi @@ -1,8 +1,6 @@ -from typing import ClassVar as _ClassVar -from typing import Optional as _Optional - from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional DESCRIPTOR: _descriptor.FileDescriptor diff --git a/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py index f06d8e66..b4c7ae61 100644 --- a/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py +++ b/machine_learning/src/generated/machine_learning/v1/health_check_pb2_grpc.py @@ -1,6 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc + from generated.machine_learning.v1 import ( health_check_pb2 as machine__learning_dot_v1_dot_health__check__pb2, ) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py index 711c7cce..9050cc7d 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py @@ -20,8 +20,9 @@ resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, ) + DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType".\n\rTrainResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted2\xb6\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' + b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"\'\n\rTrainResponse\x12\x16\n\x06status\x18\x01 \x01(\x08R\x06status"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*1\n\x06status\x12\x0b\n\x07SUCCESS\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x32\xba\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12v\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponse(\x01\x30\x01\x42\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' ) _globals = globals() @@ -31,19 +32,21 @@ ) if _descriptor._USE_C_DESCRIPTORS == False: _globals["DESCRIPTOR"]._options = None - _globals[ - "DESCRIPTOR" - ]._serialized_options = b"\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" + _globals["DESCRIPTOR"]._serialized_options = ( + b"\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" + ) + _globals["_STATUS"]._serialized_start = 554 + _globals["_STATUS"]._serialized_end = 603 _globals["_TRAINREQUEST"]._serialized_start = 134 _globals["_TRAINREQUEST"]._serialized_end = 287 _globals["_TRAINRESPONSE"]._serialized_start = 289 - _globals["_TRAINRESPONSE"]._serialized_end = 335 - _globals["_PREDRESPONSE"]._serialized_start = 337 - _globals["_PREDRESPONSE"]._serialized_end = 413 - _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_start = 415 - _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_end = 499 - _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_start = 501 - _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_end = 559 - _globals["_MACHINELEARNINGSERVICE"]._serialized_start = 562 - _globals["_MACHINELEARNINGSERVICE"]._serialized_end = 872 + _globals["_TRAINRESPONSE"]._serialized_end = 328 + _globals["_PREDRESPONSE"]._serialized_start = 330 + _globals["_PREDRESPONSE"]._serialized_end = 406 + _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_start = 408 + _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_end = 492 + _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_start = 494 + _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_end = 552 + _globals["_MACHINELEARNINGSERVICE"]._serialized_start = 606 + _globals["_MACHINELEARNINGSERVICE"]._serialized_end = 920 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi index d4f598fa..379cca99 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi @@ -1,16 +1,28 @@ -from typing import ClassVar as _ClassVar -from typing import Iterable as _Iterable -from typing import Optional as _Optional -from typing import Union as _Union - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf.internal import containers as _containers from where_child_bus.v1 import bus_pb2 as _bus_pb2 from where_child_bus.v1 import resources_pb2 as _resources_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ( + ClassVar as _ClassVar, + Iterable as _Iterable, + Optional as _Optional, + Union as _Union, +) DESCRIPTOR: _descriptor.FileDescriptor +class status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + SUCCESS: _ClassVar[status] + PROCESSING: _ClassVar[status] + FAILED: _ClassVar[status] + +SUCCESS: status +PROCESSING: status +FAILED: status + class TrainRequest(_message.Message): __slots__ = ("nursery_id", "bus_id", "child_ids", "bus_type") NURSERY_ID_FIELD_NUMBER: _ClassVar[int] @@ -30,10 +42,10 @@ class TrainRequest(_message.Message): ) -> None: ... class TrainResponse(_message.Message): - __slots__ = ("is_started",) - IS_STARTED_FIELD_NUMBER: _ClassVar[int] - is_started: bool - def __init__(self, is_started: bool = ...) -> None: ... + __slots__ = ("status",) + STATUS_FIELD_NUMBER: _ClassVar[int] + status: bool + def __init__(self, status: bool = ...) -> None: ... class PredResponse(_message.Message): __slots__ = ("is_detected", "child_ids") diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py index 10981054..3753c87f 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py @@ -1,6 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc + from generated.machine_learning.v1 import ( machine_learning_pb2 as machine__learning_dot_v1_dot_machine__learning__pb2, ) @@ -28,7 +29,7 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, ) - self.FaceDetectAndClip = channel.unary_unary( + self.FaceDetectAndClip = channel.stream_stream( "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, @@ -50,7 +51,7 @@ def Pred(self, request_iterator, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") - def FaceDetectAndClip(self, request, context): + def FaceDetectAndClip(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -69,7 +70,7 @@ def add_MachineLearningServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, ), - "FaceDetectAndClip": grpc.unary_unary_rpc_method_handler( + "FaceDetectAndClip": grpc.stream_stream_rpc_method_handler( servicer.FaceDetectAndClip, request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, @@ -145,7 +146,7 @@ def Pred( @staticmethod def FaceDetectAndClip( - request, + request_iterator, target, options=(), channel_credentials=None, @@ -156,8 +157,8 @@ def FaceDetectAndClip( timeout=None, metadata=None, ): - return grpc.experimental.unary_unary( - request, + return grpc.experimental.stream_stream( + request_iterator, target, "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index 33c9deae..92877766 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -7,55 +7,64 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from generated.where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 +from generated.where_child_bus.v1 import ( + resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, +) from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"h\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xa5\x01\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x95\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12&\n\x0fnext_station_id\x18\x04 \x01(\tR\rnextStationId\"\x92\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xb7\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1a\n\x08latitude\x18\x04 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x05 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x06 \x01(\x08R\x15\x65nableFaceRecognition\x12&\n\x0fnext_station_id\x18\t \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\n \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\x9b\x07\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"h\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"\xa5\x01\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude" \n\x1eSendLocationContinuousResponse"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"\x95\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12&\n\x0fnext_station_id\x18\x04 \x01(\tR\rnextStationId"\x92\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren"\xb7\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1a\n\x08latitude\x18\x04 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x05 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x06 \x01(\x08R\x15\x65nableFaceRecognition\x12&\n\x0fnext_station_id\x18\t \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\n \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\x9b\x07\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.bus_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "where_child_bus.v1.bus_pb2", _globals +) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' - _globals['_CREATEBUSREQUEST']._serialized_start=122 - _globals['_CREATEBUSREQUEST']._serialized_end=226 - _globals['_CREATEBUSRESPONSE']._serialized_start=228 - _globals['_CREATEBUSRESPONSE']._serialized_end=290 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=292 - _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=353 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=355 - _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=433 - _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_start=435 - _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_end=502 - _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_start=504 - _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_end=582 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=585 - _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=750 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=752 - _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=820 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=822 - _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=934 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=936 - _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=968 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=970 - _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=1020 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=1023 - _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1172 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1175 - _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1449 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1451 - _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1563 - _globals['_UPDATEBUSREQUEST']._serialized_start=1566 - _globals['_UPDATEBUSREQUEST']._serialized_end=1877 - _globals['_UPDATEBUSRESPONSE']._serialized_start=1879 - _globals['_UPDATEBUSRESPONSE']._serialized_end=1941 - _globals['_BUSSERVICE']._serialized_start=1944 - _globals['_BUSSERVICE']._serialized_end=2867 + _globals["DESCRIPTOR"]._options = None + _globals["DESCRIPTOR"]._serialized_options = ( + b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" + ) + _globals["_CREATEBUSREQUEST"]._serialized_start = 122 + _globals["_CREATEBUSREQUEST"]._serialized_end = 226 + _globals["_CREATEBUSRESPONSE"]._serialized_start = 228 + _globals["_CREATEBUSRESPONSE"]._serialized_end = 290 + _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_start = 292 + _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_end = 353 + _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_start = 355 + _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_end = 433 + _globals["_GETRUNNINGBUSBYGUARDIANIDREQUEST"]._serialized_start = 435 + _globals["_GETRUNNINGBUSBYGUARDIANIDREQUEST"]._serialized_end = 502 + _globals["_GETRUNNINGBUSBYGUARDIANIDRESPONSE"]._serialized_start = 504 + _globals["_GETRUNNINGBUSBYGUARDIANIDRESPONSE"]._serialized_end = 582 + _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_start = 585 + _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_end = 750 + _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_start = 752 + _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_end = 820 + _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_start = 822 + _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_end = 934 + _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_start = 936 + _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_end = 968 + _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_start = 970 + _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_end = 1020 + _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_start = 1023 + _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_end = 1172 + _globals["_STREAMBUSVIDEOREQUEST"]._serialized_start = 1175 + _globals["_STREAMBUSVIDEOREQUEST"]._serialized_end = 1449 + _globals["_STREAMBUSVIDEORESPONSE"]._serialized_start = 1451 + _globals["_STREAMBUSVIDEORESPONSE"]._serialized_end = 1563 + _globals["_UPDATEBUSREQUEST"]._serialized_start = 1566 + _globals["_UPDATEBUSREQUEST"]._serialized_end = 1877 + _globals["_UPDATEBUSRESPONSE"]._serialized_start = 1879 + _globals["_UPDATEBUSRESPONSE"]._serialized_end = 1941 + _globals["_BUSSERVICE"]._serialized_start = 1944 + _globals["_BUSSERVICE"]._serialized_end = 2867 # @@protoc_insertion_point(module_scope) diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index c2eeb91a..aecb192c 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -7,7 +7,7 @@ import "where_child_bus/v1/resources.proto"; service MachineLearningService { rpc Train(TrainRequest) returns (TrainResponse); rpc Pred(stream where_child_bus.v1.StreamBusVideoRequest) returns (stream PredResponse); - rpc FaceDetectAndClip(FaceDetectAndClipRequest) returns (FaceDetectAndClipResponse); + rpc FaceDetectAndClip(stream FaceDetectAndClipRequest) returns (stream FaceDetectAndClipResponse); } @@ -19,7 +19,7 @@ message TrainRequest { } message TrainResponse { - bool is_started = 1; + bool status = 1; } message PredResponse { @@ -35,3 +35,9 @@ message FaceDetectAndClipRequest { message FaceDetectAndClipResponse { bool is_started = 1; } + +enum status { + SUCCESS = 0; + PROCESSING = 1; + FAILED = 2; +} From 4bad7bf6148b83de8cad1b48aedcd00e9679b600 Mon Sep 17 00:00:00 2001 From: koto623 <131368339+koto623@users.noreply.github.com> Date: Thu, 22 Feb 2024 20:00:40 +0900 Subject: [PATCH 645/771] =?UTF-8?q?feat:=E6=B3=A2=E5=BD=A2=E3=81=AEBottomN?= =?UTF-8?q?avigationBar=E3=82=92=E8=BF=BD=E5=8A=A0=20(#161)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: koto623 --- .../where_child_bus_guardian/lib/app.dart | 21 ++------ .../utils/custom_bottom_app_bar.dart | 54 +++++++++++++++++++ .../lib/components/utils/wave_clipper.dart | 41 ++++++++++++++ .../daily_page/components/has_item_state.dart | 2 +- 4 files changed, 100 insertions(+), 18 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/components/utils/custom_bottom_app_bar.dart create mode 100644 frontend/where_child_bus_guardian/lib/components/utils/wave_clipper.dart diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index 94345bb1..581d855f 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -3,6 +3,7 @@ import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.da import 'package:where_child_bus_guardian/pages/check_page/check_page.dart'; import 'package:where_child_bus_guardian/pages/daily_page/daily_page.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; +import 'package:where_child_bus_guardian/components/utils/custom_bottom_app_bar.dart'; class App extends StatefulWidget { App({super.key}); @@ -23,23 +24,9 @@ class _AppState extends State { body: IndexedStack( index: _selectedIndex, children: [DailyPage(), const MapPage(), CheckPage()]), - bottomNavigationBar: BottomNavigationBar( - currentIndex: _selectedIndex, - onTap: (int index) => setState(() => _selectedIndex = index), - items: const [ - BottomNavigationBarItem( - icon: Icon(Icons.note_alt), - label: '日々の記録', - ), - BottomNavigationBarItem( - icon: Icon(Icons.bus_alert), - label: '地図', - ), - BottomNavigationBarItem( - icon: Icon(Icons.notifications_active), - label: '乗車確認', - ), - ], + bottomNavigationBar: CustomWaveBottomBar( + selectedIndex: _selectedIndex, + onItemTapped: (index) => setState(() => _selectedIndex = index), ), ); } diff --git a/frontend/where_child_bus_guardian/lib/components/utils/custom_bottom_app_bar.dart b/frontend/where_child_bus_guardian/lib/components/utils/custom_bottom_app_bar.dart new file mode 100644 index 00000000..d0948bec --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/components/utils/custom_bottom_app_bar.dart @@ -0,0 +1,54 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_guardian/components/utils/wave_clipper.dart'; + +class CustomWaveBottomBar extends StatelessWidget { + final int selectedIndex; + final Function(int) onItemTapped; + + const CustomWaveBottomBar({ + Key? key, + required this.selectedIndex, + required this.onItemTapped, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return ClipPath( + clipper: WaveClipper(), + child: Container( + color: const Color.fromARGB(255, 147, 211, 241), + child: Padding( + padding: const EdgeInsets.only(top: 40.0, bottom: 10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: + List.generate(3, (index) => _buildBarItem(index, context)), + ), + ))); + } + + Widget _buildBarItem(int index, BuildContext context) { + final isSelected = index == selectedIndex; + // 例: アイコンとラベルのリストを定義 + final icons = [Icons.note_alt, Icons.bus_alert, Icons.notifications_active]; + final labels = ['日々の記録', '地図', '乗車確認']; + + return GestureDetector( + onTap: () => onItemTapped(index), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(icons[index], + color: isSelected + ? const Color.fromARGB(255, 28, 100, 160) + : Colors.white), + Text(labels[index], + style: TextStyle( + color: isSelected + ? const Color.fromARGB(255, 28, 100, 160) + : Colors.white)), + ], + ), + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/components/utils/wave_clipper.dart b/frontend/where_child_bus_guardian/lib/components/utils/wave_clipper.dart new file mode 100644 index 00000000..5e9b5570 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/components/utils/wave_clipper.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; + +class WaveClipper extends CustomClipper { + @override + Path getClip(Size size) { + var path = Path(); + + // 上部の開始点 + path.lineTo(0, 0); + + // 最初の波の下向きのカーブ + var firstDownControlPoint = Offset(size.width / 4, 40); + var firstDownEndPoint = Offset(size.width / 2, 20); + path.quadraticBezierTo( + firstDownControlPoint.dx, + firstDownControlPoint.dy, + firstDownEndPoint.dx, + firstDownEndPoint.dy, + ); + + // 二番目の波の上向きのカーブ + var secondUpControlPoint = Offset(size.width * 3 / 4, 0); + var secondUpEndPoint = Offset(size.width, 30); + path.quadraticBezierTo( + secondUpControlPoint.dx, + secondUpControlPoint.dy, + secondUpEndPoint.dx, + secondUpEndPoint.dy, + ); + + // パスを閉じる + path.lineTo(size.width, size.height); + path.lineTo(0, size.height); + path.close(); + + return path; + } + + @override + bool shouldReclip(CustomClipper oldClipper) => false; +} diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart index 0c49c06c..1f697536 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/has_item_state.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart'; import 'package:where_child_bus_guardian/service/update_child_item_status.dart'; -import '../styles/styles.dart'; +import '../../styles/styles.dart'; class HasItemState extends StatefulWidget { final Child child; From 4456ecfdbb63a8d1466cd29ace8b2167a61e1b15 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Thu, 22 Feb 2024 20:20:36 +0900 Subject: [PATCH 646/771] =?UTF-8?q?fix:=20clip=E5=87=A6=E7=90=86=E3=81=8Cs?= =?UTF-8?q?tream=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 28 ++-- .../v1/machine_learning_grpc.pb.go | 158 +++++++++--------- .../v1/machine_learning.pb.dart | 18 +- .../v1/machine_learning.pbenum.dart | 23 +++ .../v1/machine_learning.pbgrpc.dart | 16 +- .../v1/machine_learning.pbjson.dart | 18 +- .../v1/machine_learning_pb2.py | 2 +- .../v1/machine_learning_pb2.pyi | 24 +-- .../v1/machine_learning_pb2_grpc.py | 24 +-- .../v1/machine_learning.proto | 4 +- 10 files changed, 167 insertions(+), 148 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index 706bc2c0..5a0c679c 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -387,25 +387,25 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x32, 0xba, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x29, - 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, - 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x04, 0x50, 0x72, + 0x65, 0x64, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, + 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x28, 0x01, 0x30, 0x01, 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, - 0x12, 0x76, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, - 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, - 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, - 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, - 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, - 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, + 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go index 4b8d53ca..bfd8e062 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go @@ -29,9 +29,9 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MachineLearningServiceClient interface { - Train(ctx context.Context, in *TrainRequest, opts ...grpc.CallOption) (*TrainResponse, error) + Train(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_TrainClient, error) Pred(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_PredClient, error) - FaceDetectAndClip(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_FaceDetectAndClipClient, error) + FaceDetectAndClip(ctx context.Context, in *FaceDetectAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) } type machineLearningServiceClient struct { @@ -42,98 +42,98 @@ func NewMachineLearningServiceClient(cc grpc.ClientConnInterface) MachineLearnin return &machineLearningServiceClient{cc} } -func (c *machineLearningServiceClient) Train(ctx context.Context, in *TrainRequest, opts ...grpc.CallOption) (*TrainResponse, error) { - out := new(TrainResponse) - err := c.cc.Invoke(ctx, MachineLearningService_Train_FullMethodName, in, out, opts...) +func (c *machineLearningServiceClient) Train(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_TrainClient, error) { + stream, err := c.cc.NewStream(ctx, &MachineLearningService_ServiceDesc.Streams[0], MachineLearningService_Train_FullMethodName, opts...) if err != nil { return nil, err } - return out, nil -} - -func (c *machineLearningServiceClient) Pred(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_PredClient, error) { - stream, err := c.cc.NewStream(ctx, &MachineLearningService_ServiceDesc.Streams[0], MachineLearningService_Pred_FullMethodName, opts...) - if err != nil { - return nil, err - } - x := &machineLearningServicePredClient{stream} + x := &machineLearningServiceTrainClient{stream} return x, nil } -type MachineLearningService_PredClient interface { - Send(*v1.StreamBusVideoRequest) error - Recv() (*PredResponse, error) +type MachineLearningService_TrainClient interface { + Send(*TrainRequest) error + Recv() (*TrainResponse, error) grpc.ClientStream } -type machineLearningServicePredClient struct { +type machineLearningServiceTrainClient struct { grpc.ClientStream } -func (x *machineLearningServicePredClient) Send(m *v1.StreamBusVideoRequest) error { +func (x *machineLearningServiceTrainClient) Send(m *TrainRequest) error { return x.ClientStream.SendMsg(m) } -func (x *machineLearningServicePredClient) Recv() (*PredResponse, error) { - m := new(PredResponse) +func (x *machineLearningServiceTrainClient) Recv() (*TrainResponse, error) { + m := new(TrainResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } -func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_FaceDetectAndClipClient, error) { - stream, err := c.cc.NewStream(ctx, &MachineLearningService_ServiceDesc.Streams[1], MachineLearningService_FaceDetectAndClip_FullMethodName, opts...) +func (c *machineLearningServiceClient) Pred(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_PredClient, error) { + stream, err := c.cc.NewStream(ctx, &MachineLearningService_ServiceDesc.Streams[1], MachineLearningService_Pred_FullMethodName, opts...) if err != nil { return nil, err } - x := &machineLearningServiceFaceDetectAndClipClient{stream} + x := &machineLearningServicePredClient{stream} return x, nil } -type MachineLearningService_FaceDetectAndClipClient interface { - Send(*FaceDetectAndClipRequest) error - Recv() (*FaceDetectAndClipResponse, error) +type MachineLearningService_PredClient interface { + Send(*v1.StreamBusVideoRequest) error + Recv() (*PredResponse, error) grpc.ClientStream } -type machineLearningServiceFaceDetectAndClipClient struct { +type machineLearningServicePredClient struct { grpc.ClientStream } -func (x *machineLearningServiceFaceDetectAndClipClient) Send(m *FaceDetectAndClipRequest) error { +func (x *machineLearningServicePredClient) Send(m *v1.StreamBusVideoRequest) error { return x.ClientStream.SendMsg(m) } -func (x *machineLearningServiceFaceDetectAndClipClient) Recv() (*FaceDetectAndClipResponse, error) { - m := new(FaceDetectAndClipResponse) +func (x *machineLearningServicePredClient) Recv() (*PredResponse, error) { + m := new(PredResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } +func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, in *FaceDetectAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) { + out := new(FaceDetectAndClipResponse) + err := c.cc.Invoke(ctx, MachineLearningService_FaceDetectAndClip_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MachineLearningServiceServer is the server API for MachineLearningService service. // All implementations should embed UnimplementedMachineLearningServiceServer // for forward compatibility type MachineLearningServiceServer interface { - Train(context.Context, *TrainRequest) (*TrainResponse, error) + Train(MachineLearningService_TrainServer) error Pred(MachineLearningService_PredServer) error - FaceDetectAndClip(MachineLearningService_FaceDetectAndClipServer) error + FaceDetectAndClip(context.Context, *FaceDetectAndClipRequest) (*FaceDetectAndClipResponse, error) } // UnimplementedMachineLearningServiceServer should be embedded to have forward compatible implementations. type UnimplementedMachineLearningServiceServer struct { } -func (UnimplementedMachineLearningServiceServer) Train(context.Context, *TrainRequest) (*TrainResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Train not implemented") +func (UnimplementedMachineLearningServiceServer) Train(MachineLearningService_TrainServer) error { + return status.Errorf(codes.Unimplemented, "method Train not implemented") } func (UnimplementedMachineLearningServiceServer) Pred(MachineLearningService_PredServer) error { return status.Errorf(codes.Unimplemented, "method Pred not implemented") } -func (UnimplementedMachineLearningServiceServer) FaceDetectAndClip(MachineLearningService_FaceDetectAndClipServer) error { - return status.Errorf(codes.Unimplemented, "method FaceDetectAndClip not implemented") +func (UnimplementedMachineLearningServiceServer) FaceDetectAndClip(context.Context, *FaceDetectAndClipRequest) (*FaceDetectAndClipResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FaceDetectAndClip not implemented") } // UnsafeMachineLearningServiceServer may be embedded to opt out of forward compatibility for this service. @@ -147,76 +147,76 @@ func RegisterMachineLearningServiceServer(s grpc.ServiceRegistrar, srv MachineLe s.RegisterService(&MachineLearningService_ServiceDesc, srv) } -func _MachineLearningService_Train_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TrainRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MachineLearningServiceServer).Train(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MachineLearningService_Train_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MachineLearningServiceServer).Train(ctx, req.(*TrainRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MachineLearningService_Pred_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(MachineLearningServiceServer).Pred(&machineLearningServicePredServer{stream}) +func _MachineLearningService_Train_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(MachineLearningServiceServer).Train(&machineLearningServiceTrainServer{stream}) } -type MachineLearningService_PredServer interface { - Send(*PredResponse) error - Recv() (*v1.StreamBusVideoRequest, error) +type MachineLearningService_TrainServer interface { + Send(*TrainResponse) error + Recv() (*TrainRequest, error) grpc.ServerStream } -type machineLearningServicePredServer struct { +type machineLearningServiceTrainServer struct { grpc.ServerStream } -func (x *machineLearningServicePredServer) Send(m *PredResponse) error { +func (x *machineLearningServiceTrainServer) Send(m *TrainResponse) error { return x.ServerStream.SendMsg(m) } -func (x *machineLearningServicePredServer) Recv() (*v1.StreamBusVideoRequest, error) { - m := new(v1.StreamBusVideoRequest) +func (x *machineLearningServiceTrainServer) Recv() (*TrainRequest, error) { + m := new(TrainRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } -func _MachineLearningService_FaceDetectAndClip_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(MachineLearningServiceServer).FaceDetectAndClip(&machineLearningServiceFaceDetectAndClipServer{stream}) +func _MachineLearningService_Pred_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(MachineLearningServiceServer).Pred(&machineLearningServicePredServer{stream}) } -type MachineLearningService_FaceDetectAndClipServer interface { - Send(*FaceDetectAndClipResponse) error - Recv() (*FaceDetectAndClipRequest, error) +type MachineLearningService_PredServer interface { + Send(*PredResponse) error + Recv() (*v1.StreamBusVideoRequest, error) grpc.ServerStream } -type machineLearningServiceFaceDetectAndClipServer struct { +type machineLearningServicePredServer struct { grpc.ServerStream } -func (x *machineLearningServiceFaceDetectAndClipServer) Send(m *FaceDetectAndClipResponse) error { +func (x *machineLearningServicePredServer) Send(m *PredResponse) error { return x.ServerStream.SendMsg(m) } -func (x *machineLearningServiceFaceDetectAndClipServer) Recv() (*FaceDetectAndClipRequest, error) { - m := new(FaceDetectAndClipRequest) +func (x *machineLearningServicePredServer) Recv() (*v1.StreamBusVideoRequest, error) { + m := new(v1.StreamBusVideoRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } +func _MachineLearningService_FaceDetectAndClip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FaceDetectAndClipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MachineLearningServiceServer).FaceDetectAndClip(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MachineLearningService_FaceDetectAndClip_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MachineLearningServiceServer).FaceDetectAndClip(ctx, req.(*FaceDetectAndClipRequest)) + } + return interceptor(ctx, in, info, handler) +} + // MachineLearningService_ServiceDesc is the grpc.ServiceDesc for MachineLearningService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -225,20 +225,20 @@ var MachineLearningService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*MachineLearningServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Train", - Handler: _MachineLearningService_Train_Handler, + MethodName: "FaceDetectAndClip", + Handler: _MachineLearningService_FaceDetectAndClip_Handler, }, }, Streams: []grpc.StreamDesc{ { - StreamName: "Pred", - Handler: _MachineLearningService_Pred_Handler, + StreamName: "Train", + Handler: _MachineLearningService_Train_Handler, ServerStreams: true, ClientStreams: true, }, { - StreamName: "FaceDetectAndClip", - Handler: _MachineLearningService_FaceDetectAndClip_Handler, + StreamName: "Pred", + Handler: _MachineLearningService_Pred_Handler, ServerStreams: true, ClientStreams: true, }, diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index 7d281bd0..ddf15038 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -15,6 +15,8 @@ import 'package:protobuf/protobuf.dart' as $pb; import '../../where_child_bus/v1/resources.pbenum.dart' as $3; +export 'machine_learning.pbenum.dart'; + class TrainRequest extends $pb.GeneratedMessage { factory TrainRequest({ $core.String? nurseryId, @@ -103,11 +105,11 @@ class TrainRequest extends $pb.GeneratedMessage { class TrainResponse extends $pb.GeneratedMessage { factory TrainResponse({ - $core.bool? isStarted, + $core.bool? status, }) { final $result = create(); - if (isStarted != null) { - $result.isStarted = isStarted; + if (status != null) { + $result.status = status; } return $result; } @@ -116,7 +118,7 @@ class TrainResponse extends $pb.GeneratedMessage { factory TrainResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TrainResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) - ..aOB(1, _omitFieldNames ? '' : 'isStarted') + ..aOB(1, _omitFieldNames ? '' : 'status') ..hasRequiredFields = false ; @@ -142,13 +144,13 @@ class TrainResponse extends $pb.GeneratedMessage { static TrainResponse? _defaultInstance; @$pb.TagNumber(1) - $core.bool get isStarted => $_getBF(0); + $core.bool get status => $_getBF(0); @$pb.TagNumber(1) - set isStarted($core.bool v) { $_setBool(0, v); } + set status($core.bool v) { $_setBool(0, v); } @$pb.TagNumber(1) - $core.bool hasIsStarted() => $_has(0); + $core.bool hasStatus() => $_has(0); @$pb.TagNumber(1) - void clearIsStarted() => clearField(1); + void clearStatus() => clearField(1); } class PredResponse extends $pb.GeneratedMessage { diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart index 2e7d3a99..434987ed 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart @@ -9,3 +9,26 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class status extends $pb.ProtobufEnum { + static const status SUCCESS = status._(0, _omitEnumNames ? '' : 'SUCCESS'); + static const status PROCESSING = status._(1, _omitEnumNames ? '' : 'PROCESSING'); + static const status FAILED = status._(2, _omitEnumNames ? '' : 'FAILED'); + + static const $core.List values = [ + SUCCESS, + PROCESSING, + FAILED, + ]; + + static final $core.Map<$core.int, status> _byValue = $pb.ProtobufEnum.initByValue(values); + static status? valueOf($core.int value) => _byValue[value]; + + const status._($core.int v, $core.String n) : super(v, n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart index adf0a7c9..9246f190 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart @@ -41,8 +41,8 @@ class MachineLearningServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseFuture<$2.TrainResponse> train($2.TrainRequest request, {$grpc.CallOptions? options}) { - return $createUnaryCall(_$train, request, options: options); + $grpc.ResponseStream<$2.TrainResponse> train($async.Stream<$2.TrainRequest> request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$train, request, options: options); } $grpc.ResponseStream<$2.PredResponse> pred($async.Stream<$1.StreamBusVideoRequest> request, {$grpc.CallOptions? options}) { @@ -61,9 +61,9 @@ abstract class MachineLearningServiceBase extends $grpc.Service { MachineLearningServiceBase() { $addMethod($grpc.ServiceMethod<$2.TrainRequest, $2.TrainResponse>( 'Train', - train_Pre, - false, - false, + train, + true, + true, ($core.List<$core.int> value) => $2.TrainRequest.fromBuffer(value), ($2.TrainResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.StreamBusVideoRequest, $2.PredResponse>( @@ -82,15 +82,11 @@ abstract class MachineLearningServiceBase extends $grpc.Service { ($2.FaceDetectAndClipResponse value) => value.writeToBuffer())); } - $async.Future<$2.TrainResponse> train_Pre($grpc.ServiceCall call, $async.Future<$2.TrainRequest> request) async { - return train(call, await request); - } - $async.Future<$2.FaceDetectAndClipResponse> faceDetectAndClip_Pre($grpc.ServiceCall call, $async.Future<$2.FaceDetectAndClipRequest> request) async { return faceDetectAndClip(call, await request); } - $async.Future<$2.TrainResponse> train($grpc.ServiceCall call, $2.TrainRequest request); + $async.Stream<$2.TrainResponse> train($grpc.ServiceCall call, $async.Stream<$2.TrainRequest> request); $async.Stream<$2.PredResponse> pred($grpc.ServiceCall call, $async.Stream<$1.StreamBusVideoRequest> request); $async.Future<$2.FaceDetectAndClipResponse> faceDetectAndClip($grpc.ServiceCall call, $2.FaceDetectAndClipRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index 2e0082b2..eff7360a 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -13,6 +13,20 @@ import 'dart:convert' as $convert; import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use statusDescriptor instead') +const status$json = { + '1': 'status', + '2': [ + {'1': 'SUCCESS', '2': 0}, + {'1': 'PROCESSING', '2': 1}, + {'1': 'FAILED', '2': 2}, + ], +}; + +/// Descriptor for `status`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List statusDescriptor = $convert.base64Decode( + 'CgZzdGF0dXMSCwoHU1VDQ0VTUxAAEg4KClBST0NFU1NJTkcQARIKCgZGQUlMRUQQAg=='); + @$core.Deprecated('Use trainRequestDescriptor instead') const TrainRequest$json = { '1': 'TrainRequest', @@ -34,13 +48,13 @@ final $typed_data.Uint8List trainRequestDescriptor = $convert.base64Decode( const TrainResponse$json = { '1': 'TrainResponse', '2': [ - {'1': 'is_started', '3': 1, '4': 1, '5': 8, '10': 'isStarted'}, + {'1': 'status', '3': 1, '4': 1, '5': 8, '10': 'status'}, ], }; /// Descriptor for `TrainResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List trainResponseDescriptor = $convert.base64Decode( - 'Cg1UcmFpblJlc3BvbnNlEh0KCmlzX3N0YXJ0ZWQYASABKAhSCWlzU3RhcnRlZA=='); + 'Cg1UcmFpblJlc3BvbnNlEhYKBnN0YXR1cxgBIAEoCFIGc3RhdHVz'); @$core.Deprecated('Use predResponseDescriptor instead') const PredResponse$json = { diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py index 9050cc7d..42edff11 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py @@ -22,7 +22,7 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"\'\n\rTrainResponse\x12\x16\n\x06status\x18\x01 \x01(\x08R\x06status"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*1\n\x06status\x12\x0b\n\x07SUCCESS\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x32\xba\x02\n\x16MachineLearningService\x12N\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12v\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponse(\x01\x30\x01\x42\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' + b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"\'\n\rTrainResponse\x12\x16\n\x06status\x18\x01 \x01(\x08R\x06status"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*1\n\x06status\x12\x0b\n\x07SUCCESS\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x32\xba\x02\n\x16MachineLearningService\x12R\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse(\x01\x30\x01\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' ) _globals = globals() diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi index 379cca99..20872623 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi @@ -4,12 +4,7 @@ from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ( - ClassVar as _ClassVar, - Iterable as _Iterable, - Optional as _Optional, - Union as _Union, -) +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -18,7 +13,6 @@ class status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): SUCCESS: _ClassVar[status] PROCESSING: _ClassVar[status] FAILED: _ClassVar[status] - SUCCESS: status PROCESSING: status FAILED: status @@ -33,13 +27,7 @@ class TrainRequest(_message.Message): bus_id: str child_ids: _containers.RepeatedScalarFieldContainer[str] bus_type: _resources_pb2.BusType - def __init__( - self, - nursery_id: _Optional[str] = ..., - bus_id: _Optional[str] = ..., - child_ids: _Optional[_Iterable[str]] = ..., - bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., - ) -> None: ... + def __init__(self, nursery_id: _Optional[str] = ..., bus_id: _Optional[str] = ..., child_ids: _Optional[_Iterable[str]] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ...) -> None: ... class TrainResponse(_message.Message): __slots__ = ("status",) @@ -53,9 +41,7 @@ class PredResponse(_message.Message): CHILD_IDS_FIELD_NUMBER: _ClassVar[int] is_detected: bool child_ids: _containers.RepeatedScalarFieldContainer[str] - def __init__( - self, is_detected: bool = ..., child_ids: _Optional[_Iterable[str]] = ... - ) -> None: ... + def __init__(self, is_detected: bool = ..., child_ids: _Optional[_Iterable[str]] = ...) -> None: ... class FaceDetectAndClipRequest(_message.Message): __slots__ = ("nursery_id", "child_id") @@ -63,9 +49,7 @@ class FaceDetectAndClipRequest(_message.Message): CHILD_ID_FIELD_NUMBER: _ClassVar[int] nursery_id: str child_id: str - def __init__( - self, nursery_id: _Optional[str] = ..., child_id: _Optional[str] = ... - ) -> None: ... + def __init__(self, nursery_id: _Optional[str] = ..., child_id: _Optional[str] = ...) -> None: ... class FaceDetectAndClipResponse(_message.Message): __slots__ = ("is_started",) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py index 3753c87f..64980f04 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py @@ -19,7 +19,7 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ - self.Train = channel.unary_unary( + self.Train = channel.stream_stream( "/machine_learning.v1.MachineLearningService/Train", request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, @@ -29,7 +29,7 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.FromString, ) - self.FaceDetectAndClip = channel.stream_stream( + self.FaceDetectAndClip = channel.unary_unary( "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.FromString, @@ -39,7 +39,7 @@ def __init__(self, channel): class MachineLearningServiceServicer(object): """Missing associated documentation comment in .proto file.""" - def Train(self, request, context): + def Train(self, request_iterator, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -51,7 +51,7 @@ def Pred(self, request_iterator, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") - def FaceDetectAndClip(self, request_iterator, context): + def FaceDetectAndClip(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -60,7 +60,7 @@ def FaceDetectAndClip(self, request_iterator, context): def add_MachineLearningServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "Train": grpc.unary_unary_rpc_method_handler( + "Train": grpc.stream_stream_rpc_method_handler( servicer.Train, request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, @@ -70,7 +70,7 @@ def add_MachineLearningServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.PredResponse.SerializeToString, ), - "FaceDetectAndClip": grpc.stream_stream_rpc_method_handler( + "FaceDetectAndClip": grpc.unary_unary_rpc_method_handler( servicer.FaceDetectAndClip, request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.FromString, response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipResponse.SerializeToString, @@ -88,7 +88,7 @@ class MachineLearningService(object): @staticmethod def Train( - request, + request_iterator, target, options=(), channel_credentials=None, @@ -99,8 +99,8 @@ def Train( timeout=None, metadata=None, ): - return grpc.experimental.unary_unary( - request, + return grpc.experimental.stream_stream( + request_iterator, target, "/machine_learning.v1.MachineLearningService/Train", machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, @@ -146,7 +146,7 @@ def Pred( @staticmethod def FaceDetectAndClip( - request_iterator, + request, target, options=(), channel_credentials=None, @@ -157,8 +157,8 @@ def FaceDetectAndClip( timeout=None, metadata=None, ): - return grpc.experimental.stream_stream( - request_iterator, + return grpc.experimental.unary_unary( + request, target, "/machine_learning.v1.MachineLearningService/FaceDetectAndClip", machine__learning_dot_v1_dot_machine__learning__pb2.FaceDetectAndClipRequest.SerializeToString, diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index aecb192c..624cee8d 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -5,9 +5,9 @@ import "where_child_bus/v1/bus.proto"; import "where_child_bus/v1/resources.proto"; service MachineLearningService { - rpc Train(TrainRequest) returns (TrainResponse); + rpc Train(stream TrainRequest) returns (stream TrainResponse); rpc Pred(stream where_child_bus.v1.StreamBusVideoRequest) returns (stream PredResponse); - rpc FaceDetectAndClip(stream FaceDetectAndClipRequest) returns (stream FaceDetectAndClipResponse); + rpc FaceDetectAndClip(FaceDetectAndClipRequest) returns (FaceDetectAndClipResponse); } From 2b64a72a94c2378baedcdf57b9214c83736795ac Mon Sep 17 00:00:00 2001 From: Mizuki Date: Thu, 22 Feb 2024 20:29:45 +0900 Subject: [PATCH 647/771] =?UTF-8?q?fix:=20status=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/machine_learning.pb.go | 146 +++++++++--------- .../v1/machine_learning.pb.dart | 9 +- .../v1/machine_learning.pbenum.dart | 2 + .../v1/machine_learning.pbjson.dart | 9 +- .../v1/machine_learning_pb2.py | 24 +-- .../v1/machine_learning_pb2.pyi | 6 +- .../v1/machine_learning.proto | 3 +- 7 files changed, 107 insertions(+), 92 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index 5a0c679c..7238e6d1 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -27,6 +27,7 @@ const ( Status_SUCCESS Status = 0 Status_PROCESSING Status = 1 Status_FAILED Status = 2 + Status_WAITING Status = 3 ) // Enum value maps for Status. @@ -35,11 +36,13 @@ var ( 0: "SUCCESS", 1: "PROCESSING", 2: "FAILED", + 3: "WAITING", } Status_value = map[string]int32{ "SUCCESS": 0, "PROCESSING": 1, "FAILED": 2, + "WAITING": 3, } ) @@ -146,7 +149,7 @@ type TrainResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` + Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=machine_learning.v1.Status" json:"status,omitempty"` } func (x *TrainResponse) Reset() { @@ -181,11 +184,11 @@ func (*TrainResponse) Descriptor() ([]byte, []int) { return file_machine_learning_v1_machine_learning_proto_rawDescGZIP(), []int{1} } -func (x *TrainResponse) GetStatus() bool { +func (x *TrainResponse) GetStatus() Status { if x != nil { return x.Status } - return false + return Status_SUCCESS } type PredResponse struct { @@ -366,63 +369,65 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x27, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4c, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, - 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, - 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x19, - 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, - 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x31, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, - 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, - 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x32, 0xba, 0x02, 0x0a, 0x16, - 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, - 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x04, 0x50, 0x72, - 0x65, 0x64, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, - 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x28, 0x01, 0x30, 0x01, 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, - 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, + 0x44, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4c, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x18, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x19, 0x46, 0x61, 0x63, + 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, + 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, + 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x49, 0x54, + 0x49, 0x4e, 0x47, 0x10, 0x03, 0x32, 0xba, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x52, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, - 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, - 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, - 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, - 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, - 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x28, 0x01, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x29, 0x2e, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x72, + 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, + 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, + 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -451,17 +456,18 @@ var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ } var file_machine_learning_v1_machine_learning_proto_depIdxs = []int32{ 6, // 0: machine_learning.v1.TrainRequest.bus_type:type_name -> where_child_bus.v1.BusType - 1, // 1: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest - 7, // 2: machine_learning.v1.MachineLearningService.Pred:input_type -> where_child_bus.v1.StreamBusVideoRequest - 4, // 3: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest - 2, // 4: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse - 3, // 5: machine_learning.v1.MachineLearningService.Pred:output_type -> machine_learning.v1.PredResponse - 5, // 6: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // 1: machine_learning.v1.TrainResponse.status:type_name -> machine_learning.v1.status + 1, // 2: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest + 7, // 3: machine_learning.v1.MachineLearningService.Pred:input_type -> where_child_bus.v1.StreamBusVideoRequest + 4, // 4: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest + 2, // 5: machine_learning.v1.MachineLearningService.Train:output_type -> machine_learning.v1.TrainResponse + 3, // 6: machine_learning.v1.MachineLearningService.Pred:output_type -> machine_learning.v1.PredResponse + 5, // 7: machine_learning.v1.MachineLearningService.FaceDetectAndClip:output_type -> machine_learning.v1.FaceDetectAndClipResponse + 5, // [5:8] is the sub-list for method output_type + 2, // [2:5] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_machine_learning_v1_machine_learning_proto_init() } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index ddf15038..61ea51a8 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -14,6 +14,7 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; import '../../where_child_bus/v1/resources.pbenum.dart' as $3; +import 'machine_learning.pbenum.dart'; export 'machine_learning.pbenum.dart'; @@ -105,7 +106,7 @@ class TrainRequest extends $pb.GeneratedMessage { class TrainResponse extends $pb.GeneratedMessage { factory TrainResponse({ - $core.bool? status, + status? status, }) { final $result = create(); if (status != null) { @@ -118,7 +119,7 @@ class TrainResponse extends $pb.GeneratedMessage { factory TrainResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TrainResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) - ..aOB(1, _omitFieldNames ? '' : 'status') + ..e(1, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: status.SUCCESS, valueOf: status.valueOf, enumValues: status.values) ..hasRequiredFields = false ; @@ -144,9 +145,9 @@ class TrainResponse extends $pb.GeneratedMessage { static TrainResponse? _defaultInstance; @$pb.TagNumber(1) - $core.bool get status => $_getBF(0); + status get status => $_getN(0); @$pb.TagNumber(1) - set status($core.bool v) { $_setBool(0, v); } + set status(status v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasStatus() => $_has(0); @$pb.TagNumber(1) diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart index 434987ed..1d0f2d91 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart @@ -17,11 +17,13 @@ class status extends $pb.ProtobufEnum { static const status SUCCESS = status._(0, _omitEnumNames ? '' : 'SUCCESS'); static const status PROCESSING = status._(1, _omitEnumNames ? '' : 'PROCESSING'); static const status FAILED = status._(2, _omitEnumNames ? '' : 'FAILED'); + static const status WAITING = status._(3, _omitEnumNames ? '' : 'WAITING'); static const $core.List values = [ SUCCESS, PROCESSING, FAILED, + WAITING, ]; static final $core.Map<$core.int, status> _byValue = $pb.ProtobufEnum.initByValue(values); diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index eff7360a..694a0cda 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -20,12 +20,14 @@ const status$json = { {'1': 'SUCCESS', '2': 0}, {'1': 'PROCESSING', '2': 1}, {'1': 'FAILED', '2': 2}, + {'1': 'WAITING', '2': 3}, ], }; /// Descriptor for `status`. Decode as a `google.protobuf.EnumDescriptorProto`. final $typed_data.Uint8List statusDescriptor = $convert.base64Decode( - 'CgZzdGF0dXMSCwoHU1VDQ0VTUxAAEg4KClBST0NFU1NJTkcQARIKCgZGQUlMRUQQAg=='); + 'CgZzdGF0dXMSCwoHU1VDQ0VTUxAAEg4KClBST0NFU1NJTkcQARIKCgZGQUlMRUQQAhILCgdXQU' + 'lUSU5HEAM='); @$core.Deprecated('Use trainRequestDescriptor instead') const TrainRequest$json = { @@ -48,13 +50,14 @@ final $typed_data.Uint8List trainRequestDescriptor = $convert.base64Decode( const TrainResponse$json = { '1': 'TrainResponse', '2': [ - {'1': 'status', '3': 1, '4': 1, '5': 8, '10': 'status'}, + {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.machine_learning.v1.status', '10': 'status'}, ], }; /// Descriptor for `TrainResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List trainResponseDescriptor = $convert.base64Decode( - 'Cg1UcmFpblJlc3BvbnNlEhYKBnN0YXR1cxgBIAEoCFIGc3RhdHVz'); + 'Cg1UcmFpblJlc3BvbnNlEjMKBnN0YXR1cxgBIAEoDjIbLm1hY2hpbmVfbGVhcm5pbmcudjEuc3' + 'RhdHVzUgZzdGF0dXM='); @$core.Deprecated('Use predResponseDescriptor instead') const PredResponse$json = { diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py index 42edff11..f8c03382 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py @@ -22,7 +22,7 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"\'\n\rTrainResponse\x12\x16\n\x06status\x18\x01 \x01(\x08R\x06status"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*1\n\x06status\x12\x0b\n\x07SUCCESS\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x32\xba\x02\n\x16MachineLearningService\x12R\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse(\x01\x30\x01\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' + b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"D\n\rTrainResponse\x12\x33\n\x06status\x18\x01 \x01(\x0e\x32\x1b.machine_learning.v1.statusR\x06status"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*>\n\x06status\x12\x0b\n\x07SUCCESS\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07WAITING\x10\x03\x32\xba\x02\n\x16MachineLearningService\x12R\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse(\x01\x30\x01\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' ) _globals = globals() @@ -35,18 +35,18 @@ _globals["DESCRIPTOR"]._serialized_options = ( b"\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" ) - _globals["_STATUS"]._serialized_start = 554 - _globals["_STATUS"]._serialized_end = 603 + _globals["_STATUS"]._serialized_start = 583 + _globals["_STATUS"]._serialized_end = 645 _globals["_TRAINREQUEST"]._serialized_start = 134 _globals["_TRAINREQUEST"]._serialized_end = 287 _globals["_TRAINRESPONSE"]._serialized_start = 289 - _globals["_TRAINRESPONSE"]._serialized_end = 328 - _globals["_PREDRESPONSE"]._serialized_start = 330 - _globals["_PREDRESPONSE"]._serialized_end = 406 - _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_start = 408 - _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_end = 492 - _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_start = 494 - _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_end = 552 - _globals["_MACHINELEARNINGSERVICE"]._serialized_start = 606 - _globals["_MACHINELEARNINGSERVICE"]._serialized_end = 920 + _globals["_TRAINRESPONSE"]._serialized_end = 357 + _globals["_PREDRESPONSE"]._serialized_start = 359 + _globals["_PREDRESPONSE"]._serialized_end = 435 + _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_start = 437 + _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_end = 521 + _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_start = 523 + _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_end = 581 + _globals["_MACHINELEARNINGSERVICE"]._serialized_start = 648 + _globals["_MACHINELEARNINGSERVICE"]._serialized_end = 962 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi index 20872623..77f4aac9 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi @@ -13,9 +13,11 @@ class status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): SUCCESS: _ClassVar[status] PROCESSING: _ClassVar[status] FAILED: _ClassVar[status] + WAITING: _ClassVar[status] SUCCESS: status PROCESSING: status FAILED: status +WAITING: status class TrainRequest(_message.Message): __slots__ = ("nursery_id", "bus_id", "child_ids", "bus_type") @@ -32,8 +34,8 @@ class TrainRequest(_message.Message): class TrainResponse(_message.Message): __slots__ = ("status",) STATUS_FIELD_NUMBER: _ClassVar[int] - status: bool - def __init__(self, status: bool = ...) -> None: ... + status: status + def __init__(self, status: _Optional[_Union[status, str]] = ...) -> None: ... class PredResponse(_message.Message): __slots__ = ("is_detected", "child_ids") diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index 624cee8d..49ac28a8 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -19,7 +19,7 @@ message TrainRequest { } message TrainResponse { - bool status = 1; + status status = 1; } message PredResponse { @@ -40,4 +40,5 @@ enum status { SUCCESS = 0; PROCESSING = 1; FAILED = 2; + WAITING = 3; } From 430fa9711cbf2b87d327dce14058667aece0fd43 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 22 Feb 2024 20:44:18 +0900 Subject: [PATCH 648/771] =?UTF-8?q?fix:=20proto=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proto/machine_learning/v1/machine_learning.proto | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/proto/machine_learning/v1/machine_learning.proto b/proto/machine_learning/v1/machine_learning.proto index 49ac28a8..fc652516 100644 --- a/proto/machine_learning/v1/machine_learning.proto +++ b/proto/machine_learning/v1/machine_learning.proto @@ -5,7 +5,7 @@ import "where_child_bus/v1/bus.proto"; import "where_child_bus/v1/resources.proto"; service MachineLearningService { - rpc Train(stream TrainRequest) returns (stream TrainResponse); + rpc Train(TrainRequest) returns (stream TrainResponse); rpc Pred(stream where_child_bus.v1.StreamBusVideoRequest) returns (stream PredResponse); rpc FaceDetectAndClip(FaceDetectAndClipRequest) returns (FaceDetectAndClipResponse); } @@ -19,7 +19,7 @@ message TrainRequest { } message TrainResponse { - status status = 1; + Status status = 1; } message PredResponse { @@ -36,9 +36,10 @@ message FaceDetectAndClipResponse { bool is_started = 1; } -enum status { - SUCCESS = 0; - PROCESSING = 1; - FAILED = 2; - WAITING = 3; +enum Status { + STATUS_UNSPECIFIED = 0; + STATUS_SUCCESS = 1; + STATUS_PROCESSING = 2; + STATUS_FAILED = 3; + STATUS_WAITING = 4; } From 3ee12bcf204b3a9b9ac19cc57891810092790799 Mon Sep 17 00:00:00 2001 From: koto623 <131368339+koto623@users.noreply.github.com> Date: Thu, 22 Feb 2024 20:51:12 +0900 Subject: [PATCH 649/771] =?UTF-8?q?feat:=20appBar=E3=81=AE=E3=83=87?= =?UTF-8?q?=E3=82=B6=E3=82=A4=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0=20(#163)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat:appBarの形と色を変更 * fix: appBarの高さ変更によるオーバーフローを修正 * fix:CustomBottomNavigationBarを追加したことによるオーバーフローを修正 * refactor:appBarをクラスに分割 --------- Co-authored-by: koto623 --- .../where_child_bus_guardian/lib/app.dart | 14 +++-- .../lib/components/utils/custom_app_bar.dart | 54 +++++++++++++++++++ .../utils/custom_bottom_app_bar.dart | 2 +- .../components/utils/half_circle_painter.dart | 38 +++++++++++++ .../lib/components/utils/wave_clipper.dart | 2 +- .../lib/pages/daily_page/daily_page.dart | 3 -- 6 files changed, 103 insertions(+), 10 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/components/utils/custom_app_bar.dart create mode 100644 frontend/where_child_bus_guardian/lib/components/utils/half_circle_painter.dart diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index 581d855f..5580e273 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -3,6 +3,8 @@ import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.da import 'package:where_child_bus_guardian/pages/check_page/check_page.dart'; import 'package:where_child_bus_guardian/pages/daily_page/daily_page.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; +import 'package:where_child_bus_guardian/components/utils/half_circle_painter.dart'; +import 'package:where_child_bus_guardian/components/utils/custom_app_bar.dart'; import 'package:where_child_bus_guardian/components/utils/custom_bottom_app_bar.dart'; class App extends StatefulWidget { @@ -18,12 +20,14 @@ class _AppState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: Text(['日々の記録', '地図', '乗車確認'][_selectedIndex]), + appBar: CustomAppBar( + selectedIndex: _selectedIndex, ), - body: IndexedStack( - index: _selectedIndex, - children: [DailyPage(), const MapPage(), CheckPage()]), + body: Padding( + padding: EdgeInsets.only(top: 30), + child: IndexedStack( + index: _selectedIndex, + children: [DailyPage(), const MapPage(), CheckPage()])), bottomNavigationBar: CustomWaveBottomBar( selectedIndex: _selectedIndex, onItemTapped: (index) => setState(() => _selectedIndex = index), diff --git a/frontend/where_child_bus_guardian/lib/components/utils/custom_app_bar.dart b/frontend/where_child_bus_guardian/lib/components/utils/custom_app_bar.dart new file mode 100644 index 00000000..5d0e9c54 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/components/utils/custom_app_bar.dart @@ -0,0 +1,54 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_guardian/components/utils/half_circle_painter.dart'; + +class CustomAppBar extends StatelessWidget implements PreferredSizeWidget { + final int selectedIndex; + + CustomAppBar({ + Key? key, + required this.selectedIndex, + }) : super(key: key); + + @override + Size get preferredSize => const Size.fromHeight(kToolbarHeight); + + @override + Widget build(BuildContext context) { + return AppBar( + backgroundColor: const Color.fromARGB(255, 255, 243, 190), + title: Text(''), + centerTitle: true, + bottom: PreferredSize( + preferredSize: Size.fromHeight(0), + child: CustomPaint( + painter: HalfCirclePainter(), + child: Container( + height: 0, + ), + ), + ), + flexibleSpace: layoutBuilder(), + ); + } + + LayoutBuilder layoutBuilder() { + return LayoutBuilder( + builder: (BuildContext context, BoxConstraints constraints) { + double appBarHeight = constraints.biggest.height; + return Center( + child: Container( + child: Text( + ['日々の記録', '地図', '乗車確認'][selectedIndex], + style: const TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, + color: Color.fromARGB(255, 67, 55, 1)), + ), + // AppBarの高さに応じて位置を調整 + padding: EdgeInsets.only(top: appBarHeight / 2), + ), + ); + }, + ); + } +} diff --git a/frontend/where_child_bus_guardian/lib/components/utils/custom_bottom_app_bar.dart b/frontend/where_child_bus_guardian/lib/components/utils/custom_bottom_app_bar.dart index d0948bec..53b9efc6 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/custom_bottom_app_bar.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/custom_bottom_app_bar.dart @@ -18,7 +18,7 @@ class CustomWaveBottomBar extends StatelessWidget { child: Container( color: const Color.fromARGB(255, 147, 211, 241), child: Padding( - padding: const EdgeInsets.only(top: 40.0, bottom: 10.0), + padding: const EdgeInsets.only(top: 30.0, bottom: 10.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: diff --git a/frontend/where_child_bus_guardian/lib/components/utils/half_circle_painter.dart b/frontend/where_child_bus_guardian/lib/components/utils/half_circle_painter.dart new file mode 100644 index 00000000..49636c13 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/components/utils/half_circle_painter.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; + +class HalfCirclePainter extends CustomPainter { + @override + void paint(Canvas canvas, Size size) { + final paint = Paint() + ..color = const Color.fromARGB(255, 255, 243, 190) // 凸の色 + ..style = PaintingStyle.fill; // 塗りつぶし + + final path = Path(); + + // 曲線の開始点 + path.moveTo(0, 0); + + // 曲線の描画 + // ここでは、始点から終点に向かって中間の制御点を使って曲線を描く + var controlPoint = Offset(size.width / 2, 50); // 制御点(曲線のピークを決定) + var endPoint = Offset(size.width, 0); // 終点 + + // 二次ベジェ曲線を描画 + path.quadraticBezierTo( + controlPoint.dx, + controlPoint.dy, + endPoint.dx, + endPoint.dy, + ); + + // パスを閉じる(省略可能、塗りつぶしの場合は必要) + path.lineTo(size.width, 0); + path.lineTo(0, 0); + canvas.drawPath(path, paint); + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) { + return false; + } +} diff --git a/frontend/where_child_bus_guardian/lib/components/utils/wave_clipper.dart b/frontend/where_child_bus_guardian/lib/components/utils/wave_clipper.dart index 5e9b5570..ad8a2c5a 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/wave_clipper.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/wave_clipper.dart @@ -20,7 +20,7 @@ class WaveClipper extends CustomClipper { // 二番目の波の上向きのカーブ var secondUpControlPoint = Offset(size.width * 3 / 4, 0); - var secondUpEndPoint = Offset(size.width, 30); + var secondUpEndPoint = Offset(size.width, 20); path.quadraticBezierTo( secondUpControlPoint.dx, secondUpControlPoint.dy, diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart index 9be0bd73..e1c6b300 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/daily_page.dart @@ -61,9 +61,6 @@ class _DailyPageState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ CurrentTimeBody(), - const SizedBox( - height: 20, - ), if (_isFailLoading) loadFailText(), if (children.isEmpty) noChildDataText(), DailyRecordSlider(children: children, images: photos), From c8b46b061c6923fb4980df2d09a2b6cc441c2976 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Thu, 22 Feb 2024 21:02:17 +0900 Subject: [PATCH 650/771] chore(ml): buf generated --- .../v1/machine_learning.pb.go | 119 +++++++++--------- .../v1/machine_learning_grpc.pb.go | 35 +++--- .../v1/machine_learning.pb.dart | 8 +- .../v1/machine_learning.pbenum.dart | 30 ++--- .../v1/machine_learning.pbgrpc.dart | 14 ++- .../v1/machine_learning.pbjson.dart | 24 ++-- .../v1/machine_learning_pb2.py | 8 +- .../v1/machine_learning_pb2.pyi | 24 ++-- .../v1/machine_learning_pb2_grpc.py | 12 +- 9 files changed, 143 insertions(+), 131 deletions(-) diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go index 7238e6d1..e030f835 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning.pb.go @@ -24,25 +24,28 @@ const ( type Status int32 const ( - Status_SUCCESS Status = 0 - Status_PROCESSING Status = 1 - Status_FAILED Status = 2 - Status_WAITING Status = 3 + Status_STATUS_UNSPECIFIED Status = 0 + Status_STATUS_SUCCESS Status = 1 + Status_STATUS_PROCESSING Status = 2 + Status_STATUS_FAILED Status = 3 + Status_STATUS_WAITING Status = 4 ) // Enum value maps for Status. var ( Status_name = map[int32]string{ - 0: "SUCCESS", - 1: "PROCESSING", - 2: "FAILED", - 3: "WAITING", + 0: "STATUS_UNSPECIFIED", + 1: "STATUS_SUCCESS", + 2: "STATUS_PROCESSING", + 3: "STATUS_FAILED", + 4: "STATUS_WAITING", } Status_value = map[string]int32{ - "SUCCESS": 0, - "PROCESSING": 1, - "FAILED": 2, - "WAITING": 3, + "STATUS_UNSPECIFIED": 0, + "STATUS_SUCCESS": 1, + "STATUS_PROCESSING": 2, + "STATUS_FAILED": 3, + "STATUS_WAITING": 4, } ) @@ -188,7 +191,7 @@ func (x *TrainResponse) GetStatus() Status { if x != nil { return x.Status } - return Status_SUCCESS + return Status_STATUS_UNSPECIFIED } type PredResponse struct { @@ -372,7 +375,7 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x44, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4c, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, @@ -387,47 +390,51 @@ var file_machine_learning_v1_machine_learning_proto_rawDesc = []byte{ 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, - 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x49, 0x54, - 0x49, 0x4e, 0x47, 0x10, 0x03, 0x32, 0xba, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x52, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x2a, 0x72, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, + 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, + 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x32, 0xb8, 0x02, 0x0a, 0x16, 0x4d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x2e, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x29, + 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x28, 0x01, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x04, 0x50, 0x72, 0x65, 0x64, 0x12, 0x29, 0x2e, 0x77, - 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x72, - 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, - 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, - 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x14, - 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x4d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, + 0x12, 0x72, 0x0a, 0x11, 0x46, 0x61, 0x63, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, + 0x64, 0x43, 0x6c, 0x69, 0x70, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, + 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, + 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x65, 0x44, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x43, 0x6c, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x82, 0x02, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x42, 0x14, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, + 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, 0x72, + 0x6e, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -445,7 +452,7 @@ func file_machine_learning_v1_machine_learning_proto_rawDescGZIP() []byte { var file_machine_learning_v1_machine_learning_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_machine_learning_v1_machine_learning_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ - (Status)(0), // 0: machine_learning.v1.status + (Status)(0), // 0: machine_learning.v1.Status (*TrainRequest)(nil), // 1: machine_learning.v1.TrainRequest (*TrainResponse)(nil), // 2: machine_learning.v1.TrainResponse (*PredResponse)(nil), // 3: machine_learning.v1.PredResponse @@ -456,7 +463,7 @@ var file_machine_learning_v1_machine_learning_proto_goTypes = []interface{}{ } var file_machine_learning_v1_machine_learning_proto_depIdxs = []int32{ 6, // 0: machine_learning.v1.TrainRequest.bus_type:type_name -> where_child_bus.v1.BusType - 0, // 1: machine_learning.v1.TrainResponse.status:type_name -> machine_learning.v1.status + 0, // 1: machine_learning.v1.TrainResponse.status:type_name -> machine_learning.v1.Status 1, // 2: machine_learning.v1.MachineLearningService.Train:input_type -> machine_learning.v1.TrainRequest 7, // 3: machine_learning.v1.MachineLearningService.Pred:input_type -> where_child_bus.v1.StreamBusVideoRequest 4, // 4: machine_learning.v1.MachineLearningService.FaceDetectAndClip:input_type -> machine_learning.v1.FaceDetectAndClipRequest diff --git a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go index bfd8e062..13b6c838 100644 --- a/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go +++ b/backend/proto-gen/go/machine_learning/v1/machine_learning_grpc.pb.go @@ -29,7 +29,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MachineLearningServiceClient interface { - Train(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_TrainClient, error) + Train(ctx context.Context, in *TrainRequest, opts ...grpc.CallOption) (MachineLearningService_TrainClient, error) Pred(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_PredClient, error) FaceDetectAndClip(ctx context.Context, in *FaceDetectAndClipRequest, opts ...grpc.CallOption) (*FaceDetectAndClipResponse, error) } @@ -42,17 +42,22 @@ func NewMachineLearningServiceClient(cc grpc.ClientConnInterface) MachineLearnin return &machineLearningServiceClient{cc} } -func (c *machineLearningServiceClient) Train(ctx context.Context, opts ...grpc.CallOption) (MachineLearningService_TrainClient, error) { +func (c *machineLearningServiceClient) Train(ctx context.Context, in *TrainRequest, opts ...grpc.CallOption) (MachineLearningService_TrainClient, error) { stream, err := c.cc.NewStream(ctx, &MachineLearningService_ServiceDesc.Streams[0], MachineLearningService_Train_FullMethodName, opts...) if err != nil { return nil, err } x := &machineLearningServiceTrainClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } return x, nil } type MachineLearningService_TrainClient interface { - Send(*TrainRequest) error Recv() (*TrainResponse, error) grpc.ClientStream } @@ -61,10 +66,6 @@ type machineLearningServiceTrainClient struct { grpc.ClientStream } -func (x *machineLearningServiceTrainClient) Send(m *TrainRequest) error { - return x.ClientStream.SendMsg(m) -} - func (x *machineLearningServiceTrainClient) Recv() (*TrainResponse, error) { m := new(TrainResponse) if err := x.ClientStream.RecvMsg(m); err != nil { @@ -117,7 +118,7 @@ func (c *machineLearningServiceClient) FaceDetectAndClip(ctx context.Context, in // All implementations should embed UnimplementedMachineLearningServiceServer // for forward compatibility type MachineLearningServiceServer interface { - Train(MachineLearningService_TrainServer) error + Train(*TrainRequest, MachineLearningService_TrainServer) error Pred(MachineLearningService_PredServer) error FaceDetectAndClip(context.Context, *FaceDetectAndClipRequest) (*FaceDetectAndClipResponse, error) } @@ -126,7 +127,7 @@ type MachineLearningServiceServer interface { type UnimplementedMachineLearningServiceServer struct { } -func (UnimplementedMachineLearningServiceServer) Train(MachineLearningService_TrainServer) error { +func (UnimplementedMachineLearningServiceServer) Train(*TrainRequest, MachineLearningService_TrainServer) error { return status.Errorf(codes.Unimplemented, "method Train not implemented") } func (UnimplementedMachineLearningServiceServer) Pred(MachineLearningService_PredServer) error { @@ -148,12 +149,15 @@ func RegisterMachineLearningServiceServer(s grpc.ServiceRegistrar, srv MachineLe } func _MachineLearningService_Train_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(MachineLearningServiceServer).Train(&machineLearningServiceTrainServer{stream}) + m := new(TrainRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(MachineLearningServiceServer).Train(m, &machineLearningServiceTrainServer{stream}) } type MachineLearningService_TrainServer interface { Send(*TrainResponse) error - Recv() (*TrainRequest, error) grpc.ServerStream } @@ -165,14 +169,6 @@ func (x *machineLearningServiceTrainServer) Send(m *TrainResponse) error { return x.ServerStream.SendMsg(m) } -func (x *machineLearningServiceTrainServer) Recv() (*TrainRequest, error) { - m := new(TrainRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - func _MachineLearningService_Pred_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(MachineLearningServiceServer).Pred(&machineLearningServicePredServer{stream}) } @@ -234,7 +230,6 @@ var MachineLearningService_ServiceDesc = grpc.ServiceDesc{ StreamName: "Train", Handler: _MachineLearningService_Train_Handler, ServerStreams: true, - ClientStreams: true, }, { StreamName: "Pred", diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart index 61ea51a8..b91db661 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pb.dart @@ -106,7 +106,7 @@ class TrainRequest extends $pb.GeneratedMessage { class TrainResponse extends $pb.GeneratedMessage { factory TrainResponse({ - status? status, + Status? status, }) { final $result = create(); if (status != null) { @@ -119,7 +119,7 @@ class TrainResponse extends $pb.GeneratedMessage { factory TrainResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TrainResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'machine_learning.v1'), createEmptyInstance: create) - ..e(1, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: status.SUCCESS, valueOf: status.valueOf, enumValues: status.values) + ..e(1, _omitFieldNames ? '' : 'status', $pb.PbFieldType.OE, defaultOrMaker: Status.STATUS_UNSPECIFIED, valueOf: Status.valueOf, enumValues: Status.values) ..hasRequiredFields = false ; @@ -145,9 +145,9 @@ class TrainResponse extends $pb.GeneratedMessage { static TrainResponse? _defaultInstance; @$pb.TagNumber(1) - status get status => $_getN(0); + Status get status => $_getN(0); @$pb.TagNumber(1) - set status(status v) { setField(1, v); } + set status(Status v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasStatus() => $_has(0); @$pb.TagNumber(1) diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart index 1d0f2d91..0ce7dbd8 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbenum.dart @@ -13,23 +13,25 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -class status extends $pb.ProtobufEnum { - static const status SUCCESS = status._(0, _omitEnumNames ? '' : 'SUCCESS'); - static const status PROCESSING = status._(1, _omitEnumNames ? '' : 'PROCESSING'); - static const status FAILED = status._(2, _omitEnumNames ? '' : 'FAILED'); - static const status WAITING = status._(3, _omitEnumNames ? '' : 'WAITING'); - - static const $core.List values = [ - SUCCESS, - PROCESSING, - FAILED, - WAITING, +class Status extends $pb.ProtobufEnum { + static const Status STATUS_UNSPECIFIED = Status._(0, _omitEnumNames ? '' : 'STATUS_UNSPECIFIED'); + static const Status STATUS_SUCCESS = Status._(1, _omitEnumNames ? '' : 'STATUS_SUCCESS'); + static const Status STATUS_PROCESSING = Status._(2, _omitEnumNames ? '' : 'STATUS_PROCESSING'); + static const Status STATUS_FAILED = Status._(3, _omitEnumNames ? '' : 'STATUS_FAILED'); + static const Status STATUS_WAITING = Status._(4, _omitEnumNames ? '' : 'STATUS_WAITING'); + + static const $core.List values = [ + STATUS_UNSPECIFIED, + STATUS_SUCCESS, + STATUS_PROCESSING, + STATUS_FAILED, + STATUS_WAITING, ]; - static final $core.Map<$core.int, status> _byValue = $pb.ProtobufEnum.initByValue(values); - static status? valueOf($core.int value) => _byValue[value]; + static final $core.Map<$core.int, Status> _byValue = $pb.ProtobufEnum.initByValue(values); + static Status? valueOf($core.int value) => _byValue[value]; - const status._($core.int v, $core.String n) : super(v, n); + const Status._($core.int v, $core.String n) : super(v, n); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart index 9246f190..28e01ab5 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbgrpc.dart @@ -41,8 +41,8 @@ class MachineLearningServiceClient extends $grpc.Client { : super(channel, options: options, interceptors: interceptors); - $grpc.ResponseStream<$2.TrainResponse> train($async.Stream<$2.TrainRequest> request, {$grpc.CallOptions? options}) { - return $createStreamingCall(_$train, request, options: options); + $grpc.ResponseStream<$2.TrainResponse> train($2.TrainRequest request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$train, $async.Stream.fromIterable([request]), options: options); } $grpc.ResponseStream<$2.PredResponse> pred($async.Stream<$1.StreamBusVideoRequest> request, {$grpc.CallOptions? options}) { @@ -61,8 +61,8 @@ abstract class MachineLearningServiceBase extends $grpc.Service { MachineLearningServiceBase() { $addMethod($grpc.ServiceMethod<$2.TrainRequest, $2.TrainResponse>( 'Train', - train, - true, + train_Pre, + false, true, ($core.List<$core.int> value) => $2.TrainRequest.fromBuffer(value), ($2.TrainResponse value) => value.writeToBuffer())); @@ -82,11 +82,15 @@ abstract class MachineLearningServiceBase extends $grpc.Service { ($2.FaceDetectAndClipResponse value) => value.writeToBuffer())); } + $async.Stream<$2.TrainResponse> train_Pre($grpc.ServiceCall call, $async.Future<$2.TrainRequest> request) async* { + yield* train(call, await request); + } + $async.Future<$2.FaceDetectAndClipResponse> faceDetectAndClip_Pre($grpc.ServiceCall call, $async.Future<$2.FaceDetectAndClipRequest> request) async { return faceDetectAndClip(call, await request); } - $async.Stream<$2.TrainResponse> train($grpc.ServiceCall call, $async.Stream<$2.TrainRequest> request); + $async.Stream<$2.TrainResponse> train($grpc.ServiceCall call, $2.TrainRequest request); $async.Stream<$2.PredResponse> pred($grpc.ServiceCall call, $async.Stream<$1.StreamBusVideoRequest> request); $async.Future<$2.FaceDetectAndClipResponse> faceDetectAndClip($grpc.ServiceCall call, $2.FaceDetectAndClipRequest request); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart index 694a0cda..602b85d5 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/machine_learning/v1/machine_learning.pbjson.dart @@ -14,20 +14,22 @@ import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use statusDescriptor instead') -const status$json = { - '1': 'status', +const Status$json = { + '1': 'Status', '2': [ - {'1': 'SUCCESS', '2': 0}, - {'1': 'PROCESSING', '2': 1}, - {'1': 'FAILED', '2': 2}, - {'1': 'WAITING', '2': 3}, + {'1': 'STATUS_UNSPECIFIED', '2': 0}, + {'1': 'STATUS_SUCCESS', '2': 1}, + {'1': 'STATUS_PROCESSING', '2': 2}, + {'1': 'STATUS_FAILED', '2': 3}, + {'1': 'STATUS_WAITING', '2': 4}, ], }; -/// Descriptor for `status`. Decode as a `google.protobuf.EnumDescriptorProto`. +/// Descriptor for `Status`. Decode as a `google.protobuf.EnumDescriptorProto`. final $typed_data.Uint8List statusDescriptor = $convert.base64Decode( - 'CgZzdGF0dXMSCwoHU1VDQ0VTUxAAEg4KClBST0NFU1NJTkcQARIKCgZGQUlMRUQQAhILCgdXQU' - 'lUSU5HEAM='); + 'CgZTdGF0dXMSFgoSU1RBVFVTX1VOU1BFQ0lGSUVEEAASEgoOU1RBVFVTX1NVQ0NFU1MQARIVCh' + 'FTVEFUVVNfUFJPQ0VTU0lORxACEhEKDVNUQVRVU19GQUlMRUQQAxISCg5TVEFUVVNfV0FJVElO' + 'RxAE'); @$core.Deprecated('Use trainRequestDescriptor instead') const TrainRequest$json = { @@ -50,13 +52,13 @@ final $typed_data.Uint8List trainRequestDescriptor = $convert.base64Decode( const TrainResponse$json = { '1': 'TrainResponse', '2': [ - {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.machine_learning.v1.status', '10': 'status'}, + {'1': 'status', '3': 1, '4': 1, '5': 14, '6': '.machine_learning.v1.Status', '10': 'status'}, ], }; /// Descriptor for `TrainResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List trainResponseDescriptor = $convert.base64Decode( - 'Cg1UcmFpblJlc3BvbnNlEjMKBnN0YXR1cxgBIAEoDjIbLm1hY2hpbmVfbGVhcm5pbmcudjEuc3' + 'Cg1UcmFpblJlc3BvbnNlEjMKBnN0YXR1cxgBIAEoDjIbLm1hY2hpbmVfbGVhcm5pbmcudjEuU3' 'RhdHVzUgZzdGF0dXM='); @$core.Deprecated('Use predResponseDescriptor instead') diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py index f8c03382..b6ed6620 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.py @@ -22,7 +22,7 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"D\n\rTrainResponse\x12\x33\n\x06status\x18\x01 \x01(\x0e\x32\x1b.machine_learning.v1.statusR\x06status"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*>\n\x06status\x12\x0b\n\x07SUCCESS\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07WAITING\x10\x03\x32\xba\x02\n\x16MachineLearningService\x12R\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse(\x01\x30\x01\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' + b'\n*machine_learning/v1/machine_learning.proto\x12\x13machine_learning.v1\x1a\x1cwhere_child_bus/v1/bus.proto\x1a"where_child_bus/v1/resources.proto"\x99\x01\n\x0cTrainRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x15\n\x06\x62us_id\x18\x02 \x01(\tR\x05\x62usId\x12\x1b\n\tchild_ids\x18\x03 \x03(\tR\x08\x63hildIds\x12\x36\n\x08\x62us_type\x18\x04 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"D\n\rTrainResponse\x12\x33\n\x06status\x18\x01 \x01(\x0e\x32\x1b.machine_learning.v1.StatusR\x06status"L\n\x0cPredResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x1b\n\tchild_ids\x18\x02 \x03(\tR\x08\x63hildIds"T\n\x18\x46\x61\x63\x65\x44\x65tectAndClipRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x19\n\x08\x63hild_id\x18\x02 \x01(\tR\x07\x63hildId":\n\x19\x46\x61\x63\x65\x44\x65tectAndClipResponse\x12\x1d\n\nis_started\x18\x01 \x01(\x08R\tisStarted*r\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATUS_SUCCESS\x10\x01\x12\x15\n\x11STATUS_PROCESSING\x10\x02\x12\x11\n\rSTATUS_FAILED\x10\x03\x12\x12\n\x0eSTATUS_WAITING\x10\x04\x32\xb8\x02\n\x16MachineLearningService\x12P\n\x05Train\x12!.machine_learning.v1.TrainRequest\x1a".machine_learning.v1.TrainResponse0\x01\x12X\n\x04Pred\x12).where_child_bus.v1.StreamBusVideoRequest\x1a!.machine_learning.v1.PredResponse(\x01\x30\x01\x12r\n\x11\x46\x61\x63\x65\x44\x65tectAndClip\x12-.machine_learning.v1.FaceDetectAndClipRequest\x1a..machine_learning.v1.FaceDetectAndClipResponseB\x82\x02\n\x17\x63om.machine_learning.v1B\x14MachineLearningProtoP\x01Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\xa2\x02\x03MXX\xaa\x02\x12MachineLearning.V1\xca\x02\x12MachineLearning\\V1\xe2\x02\x1eMachineLearning\\V1\\GPBMetadata\xea\x02\x13MachineLearning::V1b\x06proto3' ) _globals = globals() @@ -36,7 +36,7 @@ b"\n\027com.machine_learning.v1B\024MachineLearningProtoP\001Zhgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/machine_learning/v1;machine_learningv1\242\002\003MXX\252\002\022MachineLearning.V1\312\002\022MachineLearning\\V1\342\002\036MachineLearning\\V1\\GPBMetadata\352\002\023MachineLearning::V1" ) _globals["_STATUS"]._serialized_start = 583 - _globals["_STATUS"]._serialized_end = 645 + _globals["_STATUS"]._serialized_end = 697 _globals["_TRAINREQUEST"]._serialized_start = 134 _globals["_TRAINREQUEST"]._serialized_end = 287 _globals["_TRAINRESPONSE"]._serialized_start = 289 @@ -47,6 +47,6 @@ _globals["_FACEDETECTANDCLIPREQUEST"]._serialized_end = 521 _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_start = 523 _globals["_FACEDETECTANDCLIPRESPONSE"]._serialized_end = 581 - _globals["_MACHINELEARNINGSERVICE"]._serialized_start = 648 - _globals["_MACHINELEARNINGSERVICE"]._serialized_end = 962 + _globals["_MACHINELEARNINGSERVICE"]._serialized_start = 700 + _globals["_MACHINELEARNINGSERVICE"]._serialized_end = 1012 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi index 77f4aac9..2d6612a6 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2.pyi @@ -8,16 +8,18 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Op DESCRIPTOR: _descriptor.FileDescriptor -class status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): +class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () - SUCCESS: _ClassVar[status] - PROCESSING: _ClassVar[status] - FAILED: _ClassVar[status] - WAITING: _ClassVar[status] -SUCCESS: status -PROCESSING: status -FAILED: status -WAITING: status + STATUS_UNSPECIFIED: _ClassVar[Status] + STATUS_SUCCESS: _ClassVar[Status] + STATUS_PROCESSING: _ClassVar[Status] + STATUS_FAILED: _ClassVar[Status] + STATUS_WAITING: _ClassVar[Status] +STATUS_UNSPECIFIED: Status +STATUS_SUCCESS: Status +STATUS_PROCESSING: Status +STATUS_FAILED: Status +STATUS_WAITING: Status class TrainRequest(_message.Message): __slots__ = ("nursery_id", "bus_id", "child_ids", "bus_type") @@ -34,8 +36,8 @@ class TrainRequest(_message.Message): class TrainResponse(_message.Message): __slots__ = ("status",) STATUS_FIELD_NUMBER: _ClassVar[int] - status: status - def __init__(self, status: _Optional[_Union[status, str]] = ...) -> None: ... + status: Status + def __init__(self, status: _Optional[_Union[Status, str]] = ...) -> None: ... class PredResponse(_message.Message): __slots__ = ("is_detected", "child_ids") diff --git a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py index 64980f04..63d74f64 100644 --- a/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py +++ b/machine_learning/src/generated/machine_learning/v1/machine_learning_pb2_grpc.py @@ -19,7 +19,7 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ - self.Train = channel.stream_stream( + self.Train = channel.unary_stream( "/machine_learning.v1.MachineLearningService/Train", request_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, response_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.FromString, @@ -39,7 +39,7 @@ def __init__(self, channel): class MachineLearningServiceServicer(object): """Missing associated documentation comment in .proto file.""" - def Train(self, request_iterator, context): + def Train(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -60,7 +60,7 @@ def FaceDetectAndClip(self, request, context): def add_MachineLearningServiceServicer_to_server(servicer, server): rpc_method_handlers = { - "Train": grpc.stream_stream_rpc_method_handler( + "Train": grpc.unary_stream_rpc_method_handler( servicer.Train, request_deserializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.FromString, response_serializer=machine__learning_dot_v1_dot_machine__learning__pb2.TrainResponse.SerializeToString, @@ -88,7 +88,7 @@ class MachineLearningService(object): @staticmethod def Train( - request_iterator, + request, target, options=(), channel_credentials=None, @@ -99,8 +99,8 @@ def Train( timeout=None, metadata=None, ): - return grpc.experimental.stream_stream( - request_iterator, + return grpc.experimental.unary_stream( + request, target, "/machine_learning.v1.MachineLearningService/Train", machine__learning_dot_v1_dot_machine__learning__pb2.TrainRequest.SerializeToString, From a3176c97c8aa389fabad31c1a30e0ba5a7726ab7 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 22 Feb 2024 21:41:31 +0900 Subject: [PATCH 651/771] =?UTF-8?q?feat:=20python=E3=82=B5=E3=83=BC?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=81=AE=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC?= =?UTF-8?q?=E3=83=A0=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/busroute/bus_route.go | 45 +++++++++++++++++++++----- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/backend/usecases/busroute/bus_route.go b/backend/usecases/busroute/bus_route.go index 8269b2f9..ebe103fc 100644 --- a/backend/usecases/busroute/bus_route.go +++ b/backend/usecases/busroute/bus_route.go @@ -2,6 +2,8 @@ package busroute import ( "context" + "fmt" + "io" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" busRepo "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent/bus" @@ -94,9 +96,7 @@ func (i *Interactor) CreateBusRoute(ctx context.Context, req *pb.CreateBusRouteR } ChildIds[index] = childCopy.Id } - - i.logger.Info("Calling MLServiceClient.Train") - response, err := i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ + stream, err := i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ BusId: req.BusId, ChildIds: ChildIds, NurseryId: req.NurseryId, @@ -108,19 +108,49 @@ func (i *Interactor) CreateBusRoute(ctx context.Context, req *pb.CreateBusRouteR return nil, err } - if !response.IsStarted { - i.logger.Error("failed to start training", "error", err) + // 最初のレスポンスを待つ + response, err := stream.Recv() + if err != nil { + i.logger.Error("error receiving from stream", "error", err) return nil, err } + if response.Status == mlv1.Status_STATUS_FAILED { + i.logger.Error("training was not started", "error", err) + return nil, fmt.Errorf("training was not started") + } + i.logger.Info("Training started") + // バックグラウンドでストリーミングを継続するためのゴルーチン + go func() { + for { + _, err := stream.Recv() + if err == io.EOF { + // ストリームの終了 + break + } + if err != nil { + i.logger.Error("error receiving from stream", "error", err) + return + } + + // ここではストリーミングレスポンスは利用しませんが、接続を維持します + } + i.logger.Info("Training stream completed") + }() + + pbBusRoute, err := i.CreateBusRouteResponse(ctx, tx, busRoute) + if err != nil { + i.logger.Error("failed to create bus route response", "error", err) + return nil, err + } + if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) return nil, err } - pbBusRoute, err := i.CreateBusRouteResponse(ctx, tx, busRoute) if err != nil { i.logger.Error("failed to create bus route response", "error", err) return nil, err @@ -128,7 +158,6 @@ func (i *Interactor) CreateBusRoute(ctx context.Context, req *pb.CreateBusRouteR return &pb.CreateBusRouteResponse{BusRoute: pbBusRoute}, nil } - func (i *Interactor) createAssociation(ctx context.Context, tx *ent.Tx, guardianIdList []string, busRoute *ent.BusRoute) ([]*pb.Child, error) { var pbChildren []*pb.Child for index, guardianId := range guardianIdList { @@ -232,8 +261,8 @@ func (i Interactor) CreateBusRouteResponse(ctx context.Context, tx *ent.Tx, busR var orderedStations []*pb.Station stations, err := busRoute. QueryBusRouteAssociations(). - QueryStation(). Order(ent.Asc("order")). + QueryStation(). All(ctx) if err != nil { i.logger.Error("failed to get stations", "error", err) From 65da77afe7057250f51273b0314267bdffcc6ef5 Mon Sep 17 00:00:00 2001 From: koto623 <131368339+koto623@users.noreply.github.com> Date: Thu, 22 Feb 2024 21:43:37 +0900 Subject: [PATCH 652/771] =?UTF-8?q?feat:=E3=83=95=E3=82=A9=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=A8=AD=E5=AE=9A=20(#164)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: koto623 --- frontend/where_child_bus_guardian/lib/main.dart | 4 ++++ frontend/where_child_bus_guardian/pubspec.yaml | 1 + 2 files changed, 5 insertions(+) diff --git a/frontend/where_child_bus_guardian/lib/main.dart b/frontend/where_child_bus_guardian/lib/main.dart index 6a111cd4..b597a448 100644 --- a/frontend/where_child_bus_guardian/lib/main.dart +++ b/frontend/where_child_bus_guardian/lib/main.dart @@ -1,6 +1,7 @@ import "dart:developer" as developer; import 'package:flutter/material.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:google_fonts/google_fonts.dart'; import 'package:where_child_bus_guardian/config/config.dart'; import 'package:where_child_bus_guardian/util/api/health_check.dart'; @@ -36,6 +37,9 @@ class _MyAppState extends State { title: 'WhereChildBus Guardian', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + textTheme: GoogleFonts.hachiMaruPopTextTheme( + Theme.of(context).textTheme, + ), useMaterial3: true, ), home: const AuthPage(), diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index b864332e..296db145 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -23,6 +23,7 @@ dependencies: google_directions_api: ^0.10.0 where_child_bus_api: path: ../where_child_bus_api + google_fonts: ^6.1.0 dev_dependencies: flutter_test: From a27a6e1ec67223e4bf7e2cbcb3ef23316daa55bc Mon Sep 17 00:00:00 2001 From: KikyoNanakusa <65284574+KikyoNanakusa@users.noreply.github.com> Date: Thu, 22 Feb 2024 21:44:10 +0900 Subject: [PATCH 653/771] =?UTF-8?q?fix:iphone=E3=81=8B=E3=82=89=E3=81=AE?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC=E3=83=9F=E3=83=B3=E3=82=B0?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=20(#162)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat:isoの場合ストリームする画像をグレースケールに変換するように修正 * fix:カメラの表示をアスペクト比を保ったまま最大化 * fix:アスペクト比を修正 --- .../lib/pages/camera_page/camera_page.dart | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 772f3416..a825f22e 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -42,6 +42,8 @@ class _CameraPageState extends State { await _controller.initialize(); if (!mounted) return; setState(() {}); + developer.log("Camera aspect ratio: ${_controller.value.aspectRatio}", + name: "CameraPage"); _startImageStream(); developer.log("Start streaming video to server", name: "CameraPage"); streamBusVideo(_streamController.stream); @@ -72,6 +74,30 @@ class _CameraPageState extends State { } } + List _processCameraImage2gray(CameraImage image) { + final int width = image.width; + final int height = image.height; + const int bgraPixelStride = 4; // BGRAフォーマットではピクセルあたり4バイト + final bgraBytes = image.planes[0].bytes; + + // グレースケール画像データを格納するためのリストを初期化 + List grayscaleBytes = List.filled(width * height, 0); + + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + final int index = x * bgraPixelStride + y * image.planes[0].bytesPerRow; + final int b = bgraBytes[index]; + final int g = bgraBytes[index + 1]; + final int r = bgraBytes[index + 2]; + // 輝度Yを計算 + final int yValue = (0.299 * r + 0.587 * g + 0.114 * b).round(); + grayscaleBytes[x + y * width] = yValue; + } + } + + return grayscaleBytes; + } + void _startImageStream() { List> videoChunks = []; if (!_controller.value.isStreamingImages) { @@ -83,7 +109,7 @@ class _CameraPageState extends State { if (Platform.isAndroid) { videoChunks.add(image.planes[0].bytes.toList()); } else if (Platform.isIOS) { - videoChunks.add(image.planes[0].bytes.toList()); + videoChunks.add(_processCameraImage2gray(image)); } _streamController.add(StreamBusVideoRequest( nurseryId: NurseryData().getNursery().id, @@ -126,7 +152,11 @@ class _CameraPageState extends State { Widget _createPageBody() { return Stack( children: [ - CameraPreview(_controller), + Center( + child: AspectRatio( + aspectRatio: 1 / _controller.value.aspectRatio, + child: CameraPreview(_controller)), + ), Positioned( right: 15, child: RidingToggle( From 17ada14ec1a6dcee555e1ea126dbe14be481429b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Thu, 22 Feb 2024 21:53:23 +0900 Subject: [PATCH 654/771] fix: linter --- backend/usecases/bus/bus.go | 6 +++++- backend/usecases/busroute/bus_route.go | 2 +- backend/usecases/station/station.go | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 52ab82d5..dd48a8c3 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -81,6 +81,10 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* } nextStationID, err := getStationIDs(i.logger, ctx, bus) + if err != nil { + i.logger.Error("failed to get station IDs", "error", err) + return nil, err + } if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) @@ -641,8 +645,8 @@ func (i *Interactor) getFirstStation(bus *ent.Bus, busType pb.BusType) (*ent.Sta stations, err := busRoute. QueryBusRouteAssociations(). - QueryStation(). Order(ent.Asc("order")). + QueryStation(). All(context.Background()) if err != nil { i.logger.Error("failed to get stations", "error", err) diff --git a/backend/usecases/busroute/bus_route.go b/backend/usecases/busroute/bus_route.go index ebe103fc..43a72b24 100644 --- a/backend/usecases/busroute/bus_route.go +++ b/backend/usecases/busroute/bus_route.go @@ -261,7 +261,7 @@ func (i Interactor) CreateBusRouteResponse(ctx context.Context, tx *ent.Tx, busR var orderedStations []*pb.Station stations, err := busRoute. QueryBusRouteAssociations(). - Order(ent.Asc("order")). + Order(ent.Asc("order")). // !要チェック QueryStation(). All(ctx) if err != nil { diff --git a/backend/usecases/station/station.go b/backend/usecases/station/station.go index 0d6ecfe5..e8dc88fa 100644 --- a/backend/usecases/station/station.go +++ b/backend/usecases/station/station.go @@ -249,7 +249,7 @@ func (i Interactor) GetUnregisteredStationList(ctx context.Context, req *pb.GetU } stations, err := i.entClient.Station.Query(). // !要チェック - Where( + Where( stationRepo.HasBusRouteAssociationsWith( busRouteAssociationRepo.HasBusRouteWith( busRouteRepo.HasBusWith( From 84de6afc84b0415f0ff142f11c21edaa173b8889 Mon Sep 17 00:00:00 2001 From: koto623 Date: Thu, 22 Feb 2024 23:38:48 +0900 Subject: [PATCH 655/771] =?UTF-8?q?fix:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB=E3=82=A2=E3=83=89=E3=83=AC?= =?UTF-8?q?=E3=82=B9=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/auth_page/auth_page.dart | 2 +- .../pages/map_page/components/arrival_time.dart | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index 2073bc60..b4d2b03c 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -36,7 +36,7 @@ class _AuthPageState extends State { try { if (kDebugMode) { - res = await guardianLogin("guardian1@example.com", "password"); + res = await guardianLogin("hogosya1@example.com", "password"); } else { res = await guardianLogin( _emailController.text, _passwordController.text); diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index e5870884..b50b3089 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -112,12 +112,14 @@ class _ArrivalTimeState extends State { ); if (durationInSeconds != null) { - setState(() { - arrivalTime = widget.isMinuteOnly - ? (durationInSeconds ~/ 60).toString() - : DateFormat('HH:mm').format( - departureTime.add(Duration(seconds: durationInSeconds))); - }); + if (mounted) { + setState(() { + arrivalTime = widget.isMinuteOnly + ? (durationInSeconds ~/ 60).toString() + : DateFormat('HH:mm').format( + departureTime.add(Duration(seconds: durationInSeconds))); + }); + } } else { setState(() => arrivalTime = "N/A"); } From 57cb8a81fe6f91d993e6514274a13cb8b5816288 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa <65284574+KikyoNanakusa@users.noreply.github.com> Date: Fri, 23 Feb 2024 00:09:49 +0900 Subject: [PATCH 656/771] Feature/nursery/create child (#167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat:子供の追加を実装 * feat:編集と追加で処理を分岐 * feat:子供の編集ページを実装 --- .../lib/components/util/select_value_box.dart | 5 +- .../lib/pages/bus_list_page/bottom_sheet.dart | 4 +- .../pages/bus_list_page/bus_list_page.dart | 20 +-- .../bus_list_page/widgets/bus_name_text.dart | 1 + .../student_list_page/child_detail_sheet.dart | 1 + .../student_list_page/child_edit_page.dart | 11 +- .../student_list_page/child_list_page.dart | 4 +- .../components/bus_select_value_box.dart | 35 +++++ .../components/guardian_select_value_box.dart | 35 +++++ .../components/utils/input_form_body.dart | 132 ++++++++++++++++-- .../where_child_bus/lib/util/api/child.dart | 30 +++- 11 files changed, 245 insertions(+), 33 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/student_list_page/components/bus_select_value_box.dart create mode 100644 frontend/where_child_bus/lib/pages/student_list_page/components/guardian_select_value_box.dart diff --git a/frontend/where_child_bus/lib/components/util/select_value_box.dart b/frontend/where_child_bus/lib/components/util/select_value_box.dart index 13bc2dc7..1f549bea 100644 --- a/frontend/where_child_bus/lib/components/util/select_value_box.dart +++ b/frontend/where_child_bus/lib/components/util/select_value_box.dart @@ -3,8 +3,10 @@ import 'package:flutter/material.dart'; class SelectValueBox extends StatefulWidget { final List lists; String? selectedValue; + Function? onChanged; - SelectValueBox({required this.lists, super.key}); + SelectValueBox( + {required this.lists, super.key, this.selectedValue, this.onChanged}); @override State createState() => _SelectValueBox(); } @@ -25,6 +27,7 @@ class _SelectValueBox extends State { setState(() { widget.selectedValue = value; }); + widget.onChanged?.call(value); }), ); } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index d9db0c99..f2f2d6a0 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -141,7 +141,7 @@ class _BottomSheetWidgetState extends State { Widget courseAndOperator(String courseName, String operatorName) { return Padding( - padding: const EdgeInsets.only(left: 30), + padding: const EdgeInsets.only(left: 20), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -166,7 +166,7 @@ class _BottomSheetWidgetState extends State { return Padding( padding: const EdgeInsets.only(bottom: 10), child: Container( - constraints: const BoxConstraints(maxWidth: 150), + width: MediaQuery.of(context).size.width - 150, child: Text( name, overflow: TextOverflow.ellipsis, diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 46ad0f18..470056c9 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -155,7 +155,7 @@ class _BusListPageState extends State { children: [ BusImage(busStatus: bus.busStatus), _createBusNameAndDescription(bus.name, bus.busStatus), - const Spacer(), + // const Spacer(), OperationButton( bus: bus, onBusUpdated: (Bus updatedBus) { @@ -180,14 +180,16 @@ class _BusListPageState extends State { } Widget _createBusNameAndDescription(String name, BusStatus busStatus) { - return Padding( - padding: const EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - BusNameText(name: name), - BusDescriptionText(busStatus: busStatus) - ], + return Flexible( + child: Padding( + padding: const EdgeInsets.all(2), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BusNameText(name: name), + BusDescriptionText(busStatus: busStatus) + ], + ), ), ); } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_name_text.dart b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_name_text.dart index f92063fb..5ce29a4d 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_name_text.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/widgets/bus_name_text.dart @@ -12,6 +12,7 @@ class BusNameText extends StatelessWidget { Widget build(BuildContext context) { return Text( name, + overflow: TextOverflow.ellipsis, textAlign: TextAlign.left, style: const TextStyle( fontWeight: FontWeight.w600, diff --git a/frontend/where_child_bus/lib/pages/student_list_page/child_detail_sheet.dart b/frontend/where_child_bus/lib/pages/student_list_page/child_detail_sheet.dart index d5e51b68..8857a8be 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/child_detail_sheet.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/child_detail_sheet.dart @@ -93,6 +93,7 @@ class _StudentDetailSheetState extends State { Navigator.of(context).push(MaterialPageRoute( builder: (BuildContext context) => StudentEditPage( child: widget.child, + isEdit: true, ))); }, child: const Icon(Icons.edit), diff --git a/frontend/where_child_bus/lib/pages/student_list_page/child_edit_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/child_edit_page.dart index 3f59b72e..f30507a2 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/child_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/child_edit_page.dart @@ -4,8 +4,9 @@ import 'components/utils/input_form_body.dart'; class StudentEditPage extends StatefulWidget { final Child? child; + final bool isEdit; - const StudentEditPage({super.key, this.child}); + const StudentEditPage({super.key, this.child, required this.isEdit}); @override State createState() => _StudentEditPageState(); @@ -17,11 +18,8 @@ class _StudentEditPageState extends State { @override void initState() { super.initState(); - _loadGuardians(); } - Future _loadGuardians() async {} - @override Widget build(BuildContext context) { return GestureDetector( @@ -29,7 +27,10 @@ class _StudentEditPageState extends State { child: Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar(), - body: InputFormBody(child: widget.child), + body: InputFormBody( + child: widget.child, + isEdit: widget.isEdit, + ), ), ); } diff --git a/frontend/where_child_bus/lib/pages/student_list_page/child_list_page.dart b/frontend/where_child_bus/lib/pages/student_list_page/child_list_page.dart index aca3d929..c51c6ba9 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/child_list_page.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/child_list_page.dart @@ -87,7 +87,9 @@ class _ChildListPageState extends State { floatingActionButton: FloatingActionButton( onPressed: () { Navigator.of(context).push(MaterialPageRoute( - builder: (BuildContext context) => const StudentEditPage())); + builder: (BuildContext context) => const StudentEditPage( + isEdit: false, + ))); }, child: const Icon(Icons.add), ), diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/bus_select_value_box.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/bus_select_value_box.dart new file mode 100644 index 00000000..724e4585 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/bus_select_value_box.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class BusSelectedValueBox extends StatefulWidget { + final List lists; + Bus? selectedValue; + Function(Bus?)? onChanged; + + BusSelectedValueBox( + {required this.lists, super.key, this.selectedValue, this.onChanged}); + @override + State createState() => _SelectValueBox(); +} + +class _SelectValueBox extends State { + @override + Widget build(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 50, + child: DropdownButton( + value: widget.selectedValue ?? widget.lists.first, + items: widget.lists + .map((Bus list) => + DropdownMenuItem(value: list, child: Text(list.name))) + .toList(), + onChanged: (Bus? value) { + setState(() { + widget.selectedValue = value; + }); + widget.onChanged?.call(value); + }), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/guardian_select_value_box.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/guardian_select_value_box.dart new file mode 100644 index 00000000..18dd73d5 --- /dev/null +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/guardian_select_value_box.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class GuardianSelectValueBox extends StatefulWidget { + final List lists; + GuardianResponse? selectedValue; + Function? onChanged; + + GuardianSelectValueBox( + {required this.lists, super.key, this.selectedValue, this.onChanged}); + @override + State createState() => _SelectValueBox(); +} + +class _SelectValueBox extends State { + @override + Widget build(BuildContext context) { + return SizedBox( + width: MediaQuery.of(context).size.width * 0.8, + height: 50, + child: DropdownButton( + value: widget.selectedValue ?? widget.lists.first, + items: widget.lists + .map((GuardianResponse list) => + DropdownMenuItem(value: list, child: Text(list.name))) + .toList(), + onChanged: (GuardianResponse? value) { + setState(() { + widget.selectedValue = value; + }); + widget.onChanged?.call(value); + }), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index 93bf74c2..63b93236 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -4,9 +4,12 @@ import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; import 'package:where_child_bus/models/nursery_bus_data.dart'; import 'package:where_child_bus/models/nursery_guardian_data.dart'; +import 'package:where_child_bus/pages/camera_page/widgets/bus_select_box.dart'; +import 'package:where_child_bus/pages/student_list_page/components/guardian_select_value_box.dart'; import 'package:where_child_bus/service/get_bus_list_by_nursery_id.dart'; import 'package:where_child_bus/service/get_guardian_list_by_nursery_id.dart'; import 'package:where_child_bus/models/nursery_data.dart'; +import 'package:where_child_bus/util/api/child.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import '../../../../components/util/input_value_label.dart'; import 'text_input_field.dart'; @@ -15,8 +18,10 @@ import 'submit_button.dart'; class InputFormBody extends StatefulWidget { final Child? child; + final bool isEdit; - const InputFormBody({Key? key, this.child}) : super(key: key); + const InputFormBody({Key? key, this.child, required this.isEdit}) + : super(key: key); @override State createState() => _InputFormBodyState(); @@ -31,6 +36,9 @@ class _InputFormBodyState extends State { List? images; final picker = ImagePicker(); + Sex? selectedSex; + GuardianResponse? selectedGuardian; + @override void initState() { super.initState(); @@ -97,7 +105,33 @@ class _InputFormBodyState extends State { } } - Future getImageFromGallery() async { + Future _createChild() async { + if (selectedGuardian == null || selectedSex == null) { + developer.log("保護者、利用バス、性別が選択されていません。"); + return; + } + if (_nameController.text.isEmpty || _ageController.text.isEmpty) { + developer.log("園児氏名、年齢が入力されていません。"); + return; + } + if (images == null || images!.isEmpty) { + developer.log("画像が選択されていません。"); + return; + } + + var photos = images!.map((file) => file.readAsBytesSync()).toList(); + var res = await createChild( + NurseryData().getNursery().id, + selectedGuardian!.id, + _nameController.text, + int.parse(_ageController.text), + selectedSex!, + photos); + developer.log("園児情報の登録が完了しました。$res"); + Navigator.pop(context); + } + + Future _getImageFromGallery() async { final pickedFiles = await picker.pickMultiImage(); setState(() { @@ -154,29 +188,48 @@ class _InputFormBodyState extends State { ), Center( child: ElevatedButton( - onPressed: getImageFromGallery, + onPressed: _getImageFromGallery, child: const Text("画像を選択する"), )) ], ); } + void _onSexSelected(String? value) { + if (value == "男") { + selectedSex = Sex.SEX_MAN; + } else if (value == "女") { + selectedSex = Sex.SEX_WOMAN; + } else { + selectedSex = Sex.SEX_OTHER; + } + } + + void _onGuardianSelected(GuardianResponse? value) { + selectedGuardian = value; + } + Widget editFormBody( BuildContext context, ) { return Column( children: [ - inputLabelAndTextField(context, "園児氏名", "園児氏名を入力してください", + _createInputLabelAndTextField(context, "園児氏名", "園児氏名を入力してください", TextInputType.name, _nameController), - inputLabelAndTextField( + _createInputLabelAndTextField( context, "年齢", "年齢を入力してください", TextInputType.number, _ageController), - inputLabelAndSelectBox( + _createSexInputLabelAndSelectBox( + context, + "性別", + ["男", "女", "その他"], + _onSexSelected, + ), + _createGuardianInputLabelAndSelectBox( context, "保護者", - guardians.map((guardian) => guardian.name).toList(), + guardians, + _onGuardianSelected, ), - inputLabelAndSelectBox( - context, "利用バス", buses.map((bus) => bus.name).toList()), Container( margin: const EdgeInsets.only(top: 20.0), width: MediaQuery.of(context).size.width * 0.6, @@ -186,7 +239,7 @@ class _InputFormBodyState extends State { ); } - Widget inputLabelAndTextField(BuildContext context, String label, + Widget _createInputLabelAndTextField(BuildContext context, String label, String hintText, TextInputType type, TextEditingController controller) { return Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -201,18 +254,69 @@ class _InputFormBodyState extends State { ); } - Widget inputLabelAndSelectBox( - BuildContext context, String label, List lists) { + Widget _createSexInputLabelAndSelectBox(BuildContext context, String label, + List lists, Function? onChanged) { + String selected = "男"; + if (widget.isEdit) { + switch (widget.child!.sex) { + case Sex.SEX_MAN: + selected = "男"; + break; + case Sex.SEX_WOMAN: + selected = "女"; + break; + default: + selected = "その他"; + } + } + + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InputValueLabel(label: label), + SelectValueBox( + lists: lists, + onChanged: onChanged, + selectedValue: selected, + ), + ], + ); + } + + Widget _createGuardianInputLabelAndSelectBox(BuildContext context, + String label, List lists, Function? onChanged) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ InputValueLabel(label: label), - SelectValueBox(lists: lists), + GuardianSelectValueBox( + lists: lists, + onChanged: onChanged, + selectedValue: widget.isEdit + ? guardians.firstWhere( + (guardian) => guardian.id == widget.child!.guardianId) + : null, + ), + ], + ); + } + + Widget _createBusInputLabelAndSelectBox(BuildContext context, String label, + List lists, Function(Bus?) onChanged) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InputValueLabel(label: label), + BusSelectValueBox( + busLists: lists, + onChanged: onChanged, + //TODO: 修正: 選択されたバスを初期値として設定 + ), ], ); } Widget submitButton() { - return SubmitButton(onPressed: () {}); + return SubmitButton(onPressed: widget.isEdit ? () {} : _createChild); } } diff --git a/frontend/where_child_bus/lib/util/api/child.dart b/frontend/where_child_bus/lib/util/api/child.dart index c9e05643..0db60fc1 100644 --- a/frontend/where_child_bus/lib/util/api/child.dart +++ b/frontend/where_child_bus/lib/util/api/child.dart @@ -3,6 +3,7 @@ import "dart:developer" as developer; import "package:flutter/foundation.dart"; import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; @@ -42,7 +43,34 @@ Future getChildListByNurseryId( Future createChild(String nurseryId, String guardianId, String name, int age, Sex sex, Iterable> photos) async { return performGrpcCall((client) async { - var req = CreateChildRequest(); + var req = CreateChildRequest( + nurseryId: nurseryId, + guardianId: guardianId, + name: name, + age: age, + sex: sex, + photos: photos); return client.createChild(req); }); } + +Future updateChild( + String id, + String nurseryId, + String guardianId, + String name, + int age, + Sex sex, + FieldMask updateMask, +) async { + return performGrpcCall((client) async { + var req = UpdateChildRequest( + childId: id, + name: name, + age: age, + sex: sex, + updateMask: updateMask, + ); + return client.updateChild(req); + }); +} From 1862bca7642a3b577ff115839294e60de9b9ff75 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 00:25:13 +0900 Subject: [PATCH 657/771] =?UTF-8?q?fix:=20stationList=E3=81=AErequest?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/map_page/components/arrival_time.dart | 8 -------- .../lib/pages/map_page/map_page.dart | 2 +- .../lib/service/get_station_list_by_bus_id.dart | 4 ++-- .../where_child_bus_guardian/lib/util/api/station.dart | 4 ++-- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index b50b3089..732c29f4 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -64,14 +64,6 @@ class _ArrivalTimeState extends State { Future loadStationCoordinates() async { setState(() { - morningFirstStationLatitude = - getLatitudeForStation(widget.bus.morningFirstStationId); - morningFirstStationLongitude = - getLongitudeForStation(widget.bus.morningFirstStationId); - eveningFirstStationLatitude = - getLatitudeForStation(widget.bus.eveningFirstStationId); - eveningFirstStationLongitude = - getLongitudeForStation(widget.bus.eveningFirstStationId); nextStationLatitude = getLatitudeForStation(widget.bus.nextStationId); nextStationLongitude = getLongitudeForStation(widget.bus.nextStationId); }); diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 5b61d850..8834fa66 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -136,7 +136,7 @@ class _MapPageState extends State { Future _loadStationsData() async { try { developer.log('停留所リストの読み込み開始'); - var stationsRes = await getStationListByBusIdService(bus.id); + var stationsRes = await getStationListByBusIdService(bus.id, bus.type); if (mounted) { setState(() { stations = stationsRes.stations; diff --git a/frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart b/frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart index 1457f273..f647910c 100644 --- a/frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart +++ b/frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart @@ -2,9 +2,9 @@ import 'package:where_child_bus_guardian/util/api/station.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/station.pb.dart'; Future getStationListByBusIdService( - String busId) async { + String busId, String busType) async { try { - var res = await getStationListByBusId(busId); + var res = await getStationListByBusId(busId: busId, busType: busType); return res; } catch (error) { return Future.error(error); diff --git a/frontend/where_child_bus_guardian/lib/util/api/station.dart b/frontend/where_child_bus_guardian/lib/util/api/station.dart index d3bf525a..07587bcf 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/station.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/station.dart @@ -25,9 +25,9 @@ Future performGrpcCall( } Future getStationListByBusId( - String busId) async { + String busId, String busType) async { return performGrpcCall((client) async { - var req = GetStationListByBusIdRequest(busId: busId); + var req = GetStationListByBusIdRequest(busId: busId, busType: busType); return client.getStationListByBusId(req); }); } From 1973cc9ef7c30eb725d9d89d7b10a5c053b48f71 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 00:35:54 +0900 Subject: [PATCH 658/771] =?UTF-8?q?feat:=E4=BE=9D=E5=AD=98=E9=96=A2?= =?UTF-8?q?=E4=BF=82=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 5 +- .../camera_page/widget/time_select_box.dart | 54 ------------------ .../where_child_bus/lib/util/api/bus.dart | 2 - frontend/where_child_bus/pubspec.lock | 56 +++++++++++++++++++ frontend/where_child_bus/pubspec.yaml | 2 + 5 files changed, 62 insertions(+), 57 deletions(-) delete mode 100644 frontend/where_child_bus/lib/pages/camera_page/widget/time_select_box.dart diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index a825f22e..422c5f88 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -112,7 +112,6 @@ class _CameraPageState extends State { videoChunks.add(_processCameraImage2gray(image)); } _streamController.add(StreamBusVideoRequest( - nurseryId: NurseryData().getNursery().id, busId: widget.bus.id, busType: widget.busType, vehicleEvent: _vehicleEvent, @@ -129,6 +128,10 @@ class _CameraPageState extends State { } } + Future _playAudio() async { + //TODO 音声を再生する + } + @override void dispose() { _controller.dispose(); diff --git a/frontend/where_child_bus/lib/pages/camera_page/widget/time_select_box.dart b/frontend/where_child_bus/lib/pages/camera_page/widget/time_select_box.dart deleted file mode 100644 index 63d27447..00000000 --- a/frontend/where_child_bus/lib/pages/camera_page/widget/time_select_box.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; - -class TimeSelectValueBox extends StatefulWidget { - final Function(BusType) onChanged; - final BusType initialSelectedType; - - const TimeSelectValueBox( - {required this.onChanged, - this.initialSelectedType = BusType.BUS_TYPE_MORNING, - super.key}); - - @override - State createState() => _TimeSelectValueBoxState(); -} - -class _TimeSelectValueBoxState extends State { - late BusType _selectedType; - - @override - void initState() { - super.initState(); - _selectedType = widget.initialSelectedType; // 初期状態を設定 - } - - @override - Widget build(BuildContext context) { - return SizedBox( - width: MediaQuery.of(context).size.width * 0.8, - height: 50, - child: DropdownButton( - value: _selectedType, // 選択された状態を使用 - items: const [ - DropdownMenuItem( - value: BusType.BUS_TYPE_MORNING, - child: Text("行き"), - ), - DropdownMenuItem( - value: BusType.BUS_TYPE_EVENING, - child: Text("帰り"), - ), - ], - onChanged: (BusType? value) { - if (value != null) { - setState(() { - _selectedType = value; // 選択された値で更新 - }); - widget.onChanged(value); // 親ウィジェットに変更を通知 - } - }, - ), - ); - } -} diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index e713d0b7..4db9f110 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -46,8 +46,6 @@ Future createBus( nurseryId: nurseryId, name: name, plateNumber: plateNumber, - morningGuardianIds: morningGuardianIds.toList(), - eveningGuardianIds: eveningGuardianIds.toList(), ); return client.createBus(req); }); diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index a183c343..97aa116f 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -25,6 +25,62 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" + audioplayers: + dependency: "direct main" + description: + name: audioplayers + sha256: c05c6147124cd63e725e861335a8b4d57300b80e6e92cea7c145c739223bbaef + url: "https://pub.dev" + source: hosted + version: "5.2.1" + audioplayers_android: + dependency: transitive + description: + name: audioplayers_android + sha256: b00e1a0e11365d88576320ec2d8c192bc21f1afb6c0e5995d1c57ae63156acb5 + url: "https://pub.dev" + source: hosted + version: "4.0.3" + audioplayers_darwin: + dependency: transitive + description: + name: audioplayers_darwin + sha256: "3034e99a6df8d101da0f5082dcca0a2a99db62ab1d4ddb3277bed3f6f81afe08" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + audioplayers_linux: + dependency: transitive + description: + name: audioplayers_linux + sha256: "60787e73fefc4d2e0b9c02c69885402177e818e4e27ef087074cf27c02246c9e" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + audioplayers_platform_interface: + dependency: transitive + description: + name: audioplayers_platform_interface + sha256: "365c547f1bb9e77d94dd1687903a668d8f7ac3409e48e6e6a3668a1ac2982adb" + url: "https://pub.dev" + source: hosted + version: "6.1.0" + audioplayers_web: + dependency: transitive + description: + name: audioplayers_web + sha256: "22cd0173e54d92bd9b2c80b1204eb1eb159ece87475ab58c9788a70ec43c2a62" + url: "https://pub.dev" + source: hosted + version: "4.1.0" + audioplayers_windows: + dependency: transitive + description: + name: audioplayers_windows + sha256: "9536812c9103563644ada2ef45ae523806b0745f7a78e89d1b5fb1951de90e1a" + url: "https://pub.dev" + source: hosted + version: "3.1.0" boolean_selector: dependency: transitive description: diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index 706d18cd..dc262bce 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -20,6 +20,7 @@ dependencies: google_maps_flutter: ^2.5.3 collection: ^1.18.0 location: ^5.0.3 + audioplayers: ^5.2.1 where_child_bus_api: path: ../where_child_bus_api @@ -35,5 +36,6 @@ flutter: uses-material-design: true assets: - assets/images/ + - assets/audios/ - .env From d0ee0fa7096176282b9da011aa49ff17bfc36db8 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 23 Feb 2024 00:44:45 +0900 Subject: [PATCH 659/771] =?UTF-8?q?fix:=20=E6=AD=A3=E3=81=97=E3=81=84?= =?UTF-8?q?=E3=83=93=E3=83=AB=E3=83=89=E5=BC=95=E6=95=B0=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AByml=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_cloudrun_machine_learning.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_cloudrun_machine_learning.yml b/.github/workflows/deploy_cloudrun_machine_learning.yml index ac05ecd5..fdeed16b 100644 --- a/.github/workflows/deploy_cloudrun_machine_learning.yml +++ b/.github/workflows/deploy_cloudrun_machine_learning.yml @@ -41,6 +41,7 @@ jobs: docker build \ --build-arg GCP_PROJECT_ID=${{ secrets.GCP_PROJECT_ID }} \ --build-arg BUCKET_NAME_FOR_ML=${{ secrets.BUCKET_NAME_FOR_ML }} \ + --build-arg BUCKET_NAME_FOR_FACE=${{ secrets.BUCKET_NAME_FOR_FACE }} \ --tag=gcr.io/${{ secrets.GCP_PROJECT_NAME_FOR_ML }}/${{ secrets.GCP_IMAGE_NAME_FOR_ML }}:latest \ --file=./machine_learning/Dockerfile \ --platform linux/amd64 ./machine_learning From efce37735869bcff871a4ebb4bab6962c687fc91 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 23 Feb 2024 00:45:01 +0900 Subject: [PATCH 660/771] fix: api --- backend/usecases/busroute/bus_route.go | 38 ++++++++++++++++++++------ 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/backend/usecases/busroute/bus_route.go b/backend/usecases/busroute/bus_route.go index 43a72b24..30270fea 100644 --- a/backend/usecases/busroute/bus_route.go +++ b/backend/usecases/busroute/bus_route.go @@ -211,36 +211,55 @@ func (i *Interactor) createAssociation(ctx context.Context, tx *ent.Tx, guardian } func (i Interactor) GetBusRouteByBusID(ctx context.Context, req *pb.GetBusRouteByBusIDRequest) (*pb.GetBusRouteByBusIDResponse, error) { - busRouteID, err := uuid.Parse(req.BusId) + busID, err := uuid.Parse(req.BusId) if err != nil { i.logger.Error("failed to parse bus route id", "error", err) return nil, err } - busType, err := utils.ConvertPbBusTypeToEntBusType(req.BusType) - + tx, err := i.entClient.Tx(ctx) if err != nil { - i.logger.Error("failed to convert bus type", "error", err) + i.logger.Error("failed to start transaction", "error", err) return nil, err - } - busRoute, err := i.entClient.BusRoute.Query(). - Where(busRouteRepo.ID(busRouteID)). - Where(busRouteRepo.BusTypeEQ(*busType)). + bus, err := tx.Bus.Query(). + Where(busRepo.ID(busID)). Only(ctx) + var busRoute *ent.BusRoute + if req.BusType == pb.BusType_BUS_TYPE_MORNING { + busRoute, err = bus.QueryLatestMorningRoute().Only(ctx) + if err != nil { + i.logger.Error("failed to get bus route", "error", err) + return nil, err + } + } else if req.BusType == pb.BusType_BUS_TYPE_EVENING { + busRoute, err = bus.QueryLatestEveningRoute().Only(ctx) + if err != nil { + i.logger.Error("failed to get bus route", "error", err) + return nil, err + } + } + + i.logger.Info("busRoute", "busRoute", busRoute) + if err != nil { i.logger.Error("failed to get bus route", "error", err) return nil, err } - pbBusRoute, err := i.CreateBusRouteResponse(ctx, nil, busRoute) + pbBusRoute, err := i.CreateBusRouteResponse(ctx, tx, busRoute) if err != nil { i.logger.Error("failed to create bus route response", "error", err) return nil, err } + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + return &pb.GetBusRouteByBusIDResponse{BusRoute: pbBusRoute}, nil } @@ -263,6 +282,7 @@ func (i Interactor) CreateBusRouteResponse(ctx context.Context, tx *ent.Tx, busR QueryBusRouteAssociations(). Order(ent.Asc("order")). // !要チェック QueryStation(). + WithGuardian(). All(ctx) if err != nil { i.logger.Error("failed to get stations", "error", err) From b78b26be6c140e408a6a2de40679a88c3f498b73 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 00:47:30 +0900 Subject: [PATCH 661/771] =?UTF-8?q?feat:=E3=82=AA=E3=83=BC=E3=83=87?= =?UTF-8?q?=E3=82=A3=E3=82=AA=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/assets/audios/bag.wav | Bin 0 -> 64556 bytes .../where_child_bus/assets/audios/obento.wav | Bin 0 -> 82988 bytes .../where_child_bus/assets/audios/suito.wav | Bin 0 -> 70700 bytes .../where_child_bus/assets/audios/umbllera.wav | Bin 0 -> 59948 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 frontend/where_child_bus/assets/audios/bag.wav create mode 100644 frontend/where_child_bus/assets/audios/obento.wav create mode 100644 frontend/where_child_bus/assets/audios/suito.wav create mode 100644 frontend/where_child_bus/assets/audios/umbllera.wav diff --git a/frontend/where_child_bus/assets/audios/bag.wav b/frontend/where_child_bus/assets/audios/bag.wav new file mode 100644 index 0000000000000000000000000000000000000000..905d219f9b50e1d437578e3eabf0ee762cb2d859 GIT binary patch literal 64556 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

    CSY8d>_zgIJ9F9|<=f^?M{|3E325?S+ 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

    3|M3O-c99vLbL_W7Ljyv1>)Vit(8j^xaOOQ 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 AJpcdz literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/assets/audios/obento.wav b/frontend/where_child_bus/assets/audios/obento.wav new file mode 100644 index 0000000000000000000000000000000000000000..ac854d1a2ca2deda5286ca7dfa894d544ade937c GIT binary patch literal 82988 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 L*i>0C!K?odP;S+K literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/assets/audios/suito.wav b/frontend/where_child_bus/assets/audios/suito.wav new file mode 100644 index 0000000000000000000000000000000000000000..e7c86a600cc754eae07331c823851f3a01082a32 GIT binary patch literal 70700 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 fu@rykYFQ31YLq=wq^0b=`XJhiliXT literal 0 HcmV?d00001 diff --git a/frontend/where_child_bus/assets/audios/umbllera.wav b/frontend/where_child_bus/assets/audios/umbllera.wav new file mode 100644 index 0000000000000000000000000000000000000000..ed73af0f659bdfe5c547bdd391822b0638085ca1 GIT binary patch literal 59948 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
    SFCyB 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 F{|}D9Dl7m1 literal 0 HcmV?d00001 From 075e00d0c64d04a217470e6e7b89bf47fb5a43d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=82=8F=E3=81=8D=E3=82=93?= <93261102+KinjiKawaguchi@users.noreply.github.com> Date: Fri, 23 Feb 2024 01:13:22 +0900 Subject: [PATCH 662/771] fix: api (#168) --- backend/usecases/busroute/bus_route.go | 38 ++++++++++++++++++++------ 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/backend/usecases/busroute/bus_route.go b/backend/usecases/busroute/bus_route.go index 43a72b24..30270fea 100644 --- a/backend/usecases/busroute/bus_route.go +++ b/backend/usecases/busroute/bus_route.go @@ -211,36 +211,55 @@ func (i *Interactor) createAssociation(ctx context.Context, tx *ent.Tx, guardian } func (i Interactor) GetBusRouteByBusID(ctx context.Context, req *pb.GetBusRouteByBusIDRequest) (*pb.GetBusRouteByBusIDResponse, error) { - busRouteID, err := uuid.Parse(req.BusId) + busID, err := uuid.Parse(req.BusId) if err != nil { i.logger.Error("failed to parse bus route id", "error", err) return nil, err } - busType, err := utils.ConvertPbBusTypeToEntBusType(req.BusType) - + tx, err := i.entClient.Tx(ctx) if err != nil { - i.logger.Error("failed to convert bus type", "error", err) + i.logger.Error("failed to start transaction", "error", err) return nil, err - } - busRoute, err := i.entClient.BusRoute.Query(). - Where(busRouteRepo.ID(busRouteID)). - Where(busRouteRepo.BusTypeEQ(*busType)). + bus, err := tx.Bus.Query(). + Where(busRepo.ID(busID)). Only(ctx) + var busRoute *ent.BusRoute + if req.BusType == pb.BusType_BUS_TYPE_MORNING { + busRoute, err = bus.QueryLatestMorningRoute().Only(ctx) + if err != nil { + i.logger.Error("failed to get bus route", "error", err) + return nil, err + } + } else if req.BusType == pb.BusType_BUS_TYPE_EVENING { + busRoute, err = bus.QueryLatestEveningRoute().Only(ctx) + if err != nil { + i.logger.Error("failed to get bus route", "error", err) + return nil, err + } + } + + i.logger.Info("busRoute", "busRoute", busRoute) + if err != nil { i.logger.Error("failed to get bus route", "error", err) return nil, err } - pbBusRoute, err := i.CreateBusRouteResponse(ctx, nil, busRoute) + pbBusRoute, err := i.CreateBusRouteResponse(ctx, tx, busRoute) if err != nil { i.logger.Error("failed to create bus route response", "error", err) return nil, err } + if err := tx.Commit(); err != nil { + i.logger.Error("failed to commit transaction", "error", err) + return nil, err + } + return &pb.GetBusRouteByBusIDResponse{BusRoute: pbBusRoute}, nil } @@ -263,6 +282,7 @@ func (i Interactor) CreateBusRouteResponse(ctx context.Context, tx *ent.Tx, busR QueryBusRouteAssociations(). Order(ent.Asc("order")). // !要チェック QueryStation(). + WithGuardian(). All(ctx) if err != nil { i.logger.Error("failed to get stations", "error", err) From 1c63f7329cfae83d49719ad6093444cf24e11a19 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 01:14:34 +0900 Subject: [PATCH 663/771] =?UTF-8?q?update:=20=E5=81=9C=E8=BB=8A=E9=A0=86?= =?UTF-8?q?=E3=81=AE=E3=83=90=E3=82=B9=E5=81=9C=E3=82=92=E5=8F=96=E5=BE=97?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/map_page/map_page.dart | 15 ++++++++------- .../lib/service/get_bus_route_by_bus_id.dart | 14 ++++++++++++++ .../lib/service/get_station_list_by_bus_id.dart | 12 ------------ .../lib/util/api/{station.dart => bus_route.dart} | 14 ++++++++------ 4 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 frontend/where_child_bus_guardian/lib/service/get_bus_route_by_bus_id.dart delete mode 100644 frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart rename frontend/where_child_bus_guardian/lib/util/api/{station.dart => bus_route.dart} (59%) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 8834fa66..7bdf3e27 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -9,7 +9,7 @@ import 'package:where_child_bus_guardian/components/utils/google_map_view.dart'; import 'package:where_child_bus_guardian/config/config.dart'; import 'package:where_child_bus_guardian/pages/map_page/components/map_page_bottom.dart'; import 'package:where_child_bus_guardian/service/get_running_bus_by_guardian_id.dart'; -import 'package:where_child_bus_guardian/service/get_station_list_by_bus_id.dart'; +import 'package:where_child_bus_guardian/service/get_bus_route_by_bus_id.dart'; import 'package:where_child_bus_guardian/service/get_nursery_by_guardian_id.dart'; import 'package:where_child_bus_guardian/util/guardian_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -40,7 +40,7 @@ class _MapPageState extends State { Timer? _timer; String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); - List stations = []; + List busRoutes = []; List waypoints = []; final GuardianResponse guardian = GuardianData().getGuardian(); @@ -135,14 +135,15 @@ class _MapPageState extends State { Future _loadStationsData() async { try { + var busType = BusType.BUS_TYPE_EVENING; developer.log('停留所リストの読み込み開始'); - var stationsRes = await getStationListByBusIdService(bus.id, bus.type); + var busRouteRes = await getBusRouteByBusService(bus.id, busType); if (mounted) { setState(() { - stations = stationsRes.stations; + busRoutes = busRouteRes.busRoute.orderedStations; }); } - developer.log('map_page.dart stations: ${stations}'); + developer.log('map_page.dart stations: ${busRoutes}'); } catch (error) { developer.log('停留所リストの読み込みに失敗しました: $error'); } @@ -152,7 +153,7 @@ class _MapPageState extends State { try { developer.log("Waypointsの作成開始", name: "CreateWaypointsFromStations"); if (mounted) { - for (var station in stations) { + for (var station in busRoutes) { developer.log("Waypointsの作成中 ${station.id}", name: "CreateWaypointsFromStations"); waypoints.add(Waypoint( @@ -223,7 +224,7 @@ class _MapPageState extends State { MapPageBottom( guardian: guardian, bus: bus, - stations: stations, + stations: busRoutes, waypoints: waypoints, nextStationId: nextStationId, busLatitude: busLatitude, diff --git a/frontend/where_child_bus_guardian/lib/service/get_bus_route_by_bus_id.dart b/frontend/where_child_bus_guardian/lib/service/get_bus_route_by_bus_id.dart new file mode 100644 index 00000000..472df4dd --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/service/get_bus_route_by_bus_id.dart @@ -0,0 +1,14 @@ +import 'package:where_child_bus_guardian/util/api/bus_route.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/station.pb.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pbenum.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart'; + +Future getBusRouteByBusService( + String busId, BusType busType) async { + try { + var res = await getBusRouteByBusID(busId, busType); + return res; + } catch (error) { + return Future.error(error); + } +} diff --git a/frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart b/frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart deleted file mode 100644 index f647910c..00000000 --- a/frontend/where_child_bus_guardian/lib/service/get_station_list_by_bus_id.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:where_child_bus_guardian/util/api/station.dart'; -import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/station.pb.dart'; - -Future getStationListByBusIdService( - String busId, String busType) async { - try { - var res = await getStationListByBusId(busId: busId, busType: busType); - return res; - } catch (error) { - return Future.error(error); - } -} diff --git a/frontend/where_child_bus_guardian/lib/util/api/station.dart b/frontend/where_child_bus_guardian/lib/util/api/bus_route.dart similarity index 59% rename from frontend/where_child_bus_guardian/lib/util/api/station.dart rename to frontend/where_child_bus_guardian/lib/util/api/bus_route.dart index 07587bcf..affc0ffa 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/station.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/bus_route.dart @@ -1,14 +1,16 @@ import 'dart:developer' as developer; import 'package:flutter/foundation.dart'; import 'package:grpc/grpc.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pbenum.dart'; import 'package:where_child_bus_guardian/config/config.dart'; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/station.pbgrpc.dart"; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart'; Future performGrpcCall( - Future Function(StationServiceClient) grpcCall) async { + Future Function(BusRouteServiceClient) grpcCall) async { final channel = ClientChannel(appConfig.grpcEndpoint, port: appConfig.grpcPort); - final grpcClient = StationServiceClient(channel); + final grpcClient = BusRouteServiceClient(channel); try { final result = await grpcCall(grpcClient); @@ -24,10 +26,10 @@ Future performGrpcCall( } } -Future getStationListByBusId( - String busId, String busType) async { +Future getBusRouteByBusID( + String busId, BusType busType) async { return performGrpcCall((client) async { - var req = GetStationListByBusIdRequest(busId: busId, busType: busType); - return client.getStationListByBusId(req); + var req = GetBusRouteByBusIDRequest(busId: busId, busType: busType); + return client.getBusRouteByBusID(req); }); } From 43699e1f9d18fdb791033d699a34d30d05732e16 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 23 Feb 2024 02:01:35 +0900 Subject: [PATCH 664/771] =?UTF-8?q?fix(ml):=20face=20detection=E3=81=AE?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=81=AE=E6=8C=99=E5=8B=95=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectFaceAndClip/detectFaceAndClip.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py index 657eb224..a7f92a49 100644 --- a/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py +++ b/machine_learning/src/face_detect_model/DetectFaceAndClip/detectFaceAndClip.py @@ -116,8 +116,10 @@ def detect_face_and_clip(args: argparse.Namespace, config: dict): blobs = get_blobs(bucket, SOURCE_BLOB_NAME) images = load_image(args, blobs=blobs) else: - logger.error(f"Invalid env: {args.env}") - exit(1) + raise ValueError(f"Invalid env: {args.env}") + + if len(images) == 0: + logger.error("No face Detected") logger.info("Detecting faces...") detect_face_num = 0 From d284237b98230b66230aa346eead0f39dda5c059 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 02:05:54 +0900 Subject: [PATCH 665/771] =?UTF-8?q?fix:=20=E3=82=AA=E3=83=BC=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=83=95=E3=83=AD=E3=83=BC=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/map_page/components/map_page_bottom.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart index d09e6fc7..a7c5cc20 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart @@ -66,7 +66,7 @@ class _MapPageBottomState extends State { Widget build(BuildContext context) { return SizedBox( width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height * 0.3, + height: MediaQuery.of(context).size.height * 0.25, child: Padding( padding: EdgeInsets.all(MediaQuery.of(context).size.width * 0.1), child: Column( From 98ad82afb02732741b13903ac51434e6613e18e5 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 02:06:46 +0900 Subject: [PATCH 666/771] =?UTF-8?q?refactor:=20=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E5=A4=89=E6=95=B0=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/lib/pages/map_page/map_page.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 7bdf3e27..e6993198 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -24,9 +24,6 @@ class Waypoint { {required this.latitude, required this.longitude, required this.name}); } -//TODO: 将来的には出発時刻を受け取る -DateTime departureTime = DateTime.now(); - class MapPage extends StatefulWidget { const MapPage({super.key}); @@ -38,7 +35,6 @@ class _MapPageState extends State { final StreamController _streamController = StreamController.broadcast(); - Timer? _timer; String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); List busRoutes = []; List waypoints = []; From 99088b06be50a4fb16f78f498a9bf2e7a2998152 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 02:07:35 +0900 Subject: [PATCH 667/771] =?UTF-8?q?fix:=20late=E3=82=AD=E3=83=BC=E3=83=AF?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/lib/app.dart | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index 6824b7dd..b42f200d 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -21,22 +21,34 @@ class App extends StatefulWidget { class _AppState extends State { int _selectedIndex = 0; - late GuardianResponse guardian; - late bool _hasRunningBus; + GuardianResponse guardian = GuardianResponse(); + bool _hasRunningBus = false; @override void initState() { super.initState(); - _hasRunningBus = true; + _initializeAppState(); + } + + Future _initializeAppState() async { guardian = GuardianData().getGuardian(); - _loadRunningBus(); + await _loadRunningBus(); } Future _loadRunningBus() async { try { var busRes = await getRunningBusByGuardianIdService(guardian.id); + if (mounted) { + setState(() { + _hasRunningBus = true; + }); + } } catch (e) { - _hasRunningBus = false; + if (mounted) { + setState(() { + _hasRunningBus = false; + }); + } } } From 3e79fe2c046003d6702eaa8f3b39245a2a1b0c33 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 23 Feb 2024 02:08:50 +0900 Subject: [PATCH 668/771] =?UTF-8?q?chore(ml):=20log=E3=81=AE=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=83=BBblobs=E3=81=AE=E5=8F=96=E5=BE=97=E3=81=AB?= =?UTF-8?q?=E9=96=A2=E3=81=99=E3=82=8B=E3=83=AA=E3=83=88=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/gcp_util.py | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/machine_learning/src/face_detect_model/gcp_util.py b/machine_learning/src/face_detect_model/gcp_util.py index 78b1c21c..08d24aca 100644 --- a/machine_learning/src/face_detect_model/gcp_util.py +++ b/machine_learning/src/face_detect_model/gcp_util.py @@ -1,4 +1,5 @@ import os +import time import cv2 import google.cloud.storage as gcs @@ -10,6 +11,7 @@ def init_client(): # NOTE: gcloud auth application-default loginにて事前に認証 PROJECT_ID = os.environ.get("PROJECT_ID") + logger.info(f"Initialized GCS client. {PROJECT_ID}") client = gcs.Client(PROJECT_ID) if client is None: @@ -20,7 +22,7 @@ def init_client(): def get_bucket(client: gcs.Client, bucket_name: str): bucket = client.bucket(bucket_name) - + logger.info(f"Got bucket {bucket_name} in GCS.") if bucket.exists(): return bucket else: @@ -29,14 +31,24 @@ def get_bucket(client: gcs.Client, bucket_name: str): def get_blobs(bucket: Bucket, blob_name: str): # blobsの中身に対するエラーハンドリング - try: - blobs = list(bucket.list_blobs(prefix=blob_name)) - if len(blobs) == 0: # 最初の要素がない場合、イテレータは空 - raise ValueError(f"No blobs found with prefix '{blob_name}' in the bucket.") - else: + tries = 10 + retry_interval = 1 + for i in range(0, tries): + try: + blobs = list(bucket.list_blobs(prefix=blob_name)) + logger.info(f"Got blobs from {blob_name} in GCS.") + if len(blobs) == 0: + logger.info(f"No blobs found in {blob_name}.") + raise ValueError(f"No blobs found in {blob_name}.") return blobs - except Exception as e: - raise ValueError(f"Failed to get blobs from '{blob_name}' due to an error: {e}") + except Exception as e: + if i + 1 == tries: + raise ValueError( + f"Failed to get blobs from '{blob_name}' due to an error: {e}" + ) + time.sleep(retry_interval) + logger.info("リトライ回数:{}回目".format(i + 1)) + continue def decode_face_image_from_ndaarray(face_image: np.ndarray): From 0fb73fa807e92e703fba46234886254420df1d0e Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 02:10:26 +0900 Subject: [PATCH 669/771] =?UTF-8?q?feat:=E3=83=AC=E3=82=B9=E3=83=9D?= =?UTF-8?q?=E3=83=B3=E3=82=B9=E3=81=AB=E5=BF=9C=E3=81=98=E3=81=9F=E9=9F=B3?= =?UTF-8?q?=E5=A3=B0=E3=81=8C=E6=B5=81=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/{audios => sounds}/bag.wav | Bin .../obento.wav => sounds/lunchBox.wav} | Bin .../umbllera.wav => sounds/umbrella.wav} | Bin .../suito.wav => sounds/water_bottle.wav} | Bin .../lib/components/util/audio_manager.dart | 35 ++++++++++++++++++ .../lib/pages/camera_page/camera_page.dart | 35 +++++++++++++++--- frontend/where_child_bus/pubspec.yaml | 2 +- 7 files changed, 66 insertions(+), 6 deletions(-) rename frontend/where_child_bus/assets/{audios => sounds}/bag.wav (100%) rename frontend/where_child_bus/assets/{audios/obento.wav => sounds/lunchBox.wav} (100%) rename frontend/where_child_bus/assets/{audios/umbllera.wav => sounds/umbrella.wav} (100%) rename frontend/where_child_bus/assets/{audios/suito.wav => sounds/water_bottle.wav} (100%) create mode 100644 frontend/where_child_bus/lib/components/util/audio_manager.dart diff --git a/frontend/where_child_bus/assets/audios/bag.wav b/frontend/where_child_bus/assets/sounds/bag.wav similarity index 100% rename from frontend/where_child_bus/assets/audios/bag.wav rename to frontend/where_child_bus/assets/sounds/bag.wav diff --git a/frontend/where_child_bus/assets/audios/obento.wav b/frontend/where_child_bus/assets/sounds/lunchBox.wav similarity index 100% rename from frontend/where_child_bus/assets/audios/obento.wav rename to frontend/where_child_bus/assets/sounds/lunchBox.wav diff --git a/frontend/where_child_bus/assets/audios/umbllera.wav b/frontend/where_child_bus/assets/sounds/umbrella.wav similarity index 100% rename from frontend/where_child_bus/assets/audios/umbllera.wav rename to frontend/where_child_bus/assets/sounds/umbrella.wav diff --git a/frontend/where_child_bus/assets/audios/suito.wav b/frontend/where_child_bus/assets/sounds/water_bottle.wav similarity index 100% rename from frontend/where_child_bus/assets/audios/suito.wav rename to frontend/where_child_bus/assets/sounds/water_bottle.wav diff --git a/frontend/where_child_bus/lib/components/util/audio_manager.dart b/frontend/where_child_bus/lib/components/util/audio_manager.dart new file mode 100644 index 00000000..953e0cda --- /dev/null +++ b/frontend/where_child_bus/lib/components/util/audio_manager.dart @@ -0,0 +1,35 @@ +import 'package:audioplayers/audioplayers.dart'; + +class AudioManager { + final AudioPlayer audioPlayer = AudioPlayer(); + final List audioFiles; // 再生する音声ファイルのリスト + int _currentAudioIndex = 0; // 現在再生中の音声ファイルのインデックス + + AudioManager({required this.audioFiles}); + + // 音声を順番に再生するメソッド + Future playSequentially() async { + if (audioFiles.isEmpty) return; // 再生する音声がない場合は何もしない + + _currentAudioIndex = 0; // 最初の音声から再生を開始 + await _playAudioFile(audioFiles[_currentAudioIndex]); + } + + // 特定の音声ファイルを再生し、終了したら次の音声を再生するメソッド + Future _playAudioFile(String filePath) async { + await audioPlayer.setVolume(1); + await audioPlayer.play(AssetSource(filePath)); + + // 音声再生が完了したら次の音声を再生 + audioPlayer.onPlayerComplete.listen((event) { + _currentAudioIndex++; + if (_currentAudioIndex < audioFiles.length) { + _playAudioFile(audioFiles[_currentAudioIndex]); + } + }); + } + + void dispose() { + audioPlayer.dispose(); + } +} diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 422c5f88..db9c2504 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -4,8 +4,9 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:camera/camera.dart'; import 'package:grpc/grpc.dart'; +import 'package:audioplayers/audioplayers.dart'; +import 'package:where_child_bus/components/util/audio_manager.dart'; import 'package:where_child_bus/config/config.dart'; -import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus/pages/camera_page/widgets/riding_toggle.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; import "package:where_child_bus/main.dart" as where_child_bus; @@ -23,6 +24,7 @@ class CameraPage extends StatefulWidget { } class _CameraPageState extends State { + final AudioPlayer audioPlayer = AudioPlayer(); late CameraController _controller; final StreamController _streamController = StreamController.broadcast(); @@ -66,6 +68,7 @@ class _CameraPageState extends State { try { await for (var response in res.asStream()) { developer.log("Received response: $response", name: "CameraPage"); + _playAudio(response); } } catch (error) { developer.log("Caught Error:", error: error); @@ -105,7 +108,6 @@ class _CameraPageState extends State { _controller.startImageStream((CameraImage image) { frameCounter++; if (frameCounter % 60 == 0) { - //TODO プラットフォームで画像を変える if (Platform.isAndroid) { videoChunks.add(image.planes[0].bytes.toList()); } else if (Platform.isIOS) { @@ -128,8 +130,26 @@ class _CameraPageState extends State { } } - Future _playAudio() async { - //TODO 音声を再生する + Future _playAudio(StreamBusVideoResponse res) async { + List audioFiles = []; + + if (res.children.any((child) => child.hasBag)) { + audioFiles.add("sounds/bag.wav"); + } + + if (res.children.any((child) => child.hasLunchBox)) { + audioFiles.add("sounds/lunch_box.wav"); + } + + if (res.children.any((child) => child.hasWaterBottle)) { + audioFiles.add("sounds/water_bottle.wav"); + } + + if (res.children.any((child) => child.hasUmbrella)) { + audioFiles.add("sounds/umbrella.wav"); + } + + AudioManager(audioFiles: audioFiles).playSequentially(); } @override @@ -171,7 +191,12 @@ class _CameraPageState extends State { _vehicleEvent = VehicleEvent.VEHICLE_EVENT_GET_OFF; } }), - })) + })), + //NOTE: テスト用 + // ElevatedButton( + // onPressed: AudioManager(audioFiles: ["sounds/water_bottle.wav"]) + // .playSequentially, + // child: const Text("Play")), ], ); } diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index dc262bce..a77f71c5 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -36,6 +36,6 @@ flutter: uses-material-design: true assets: - assets/images/ - - assets/audios/ + - assets/sounds/ - .env From a4fc4beb6ac0b640a745a1d76c31d1e4e3aa792d Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 23 Feb 2024 02:12:01 +0900 Subject: [PATCH 670/771] =?UTF-8?q?feat(ml):=20Train=E3=82=92Server=20Stre?= =?UTF-8?q?aming=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/machine_learning/v1/server.py | 57 ++++++++++--------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/machine_learning/src/proto-gen/machine_learning/v1/server.py b/machine_learning/src/proto-gen/machine_learning/v1/server.py index 1b232156..3d57e1c2 100644 --- a/machine_learning/src/proto-gen/machine_learning/v1/server.py +++ b/machine_learning/src/proto-gen/machine_learning/v1/server.py @@ -67,50 +67,55 @@ def __init__(self): def Pred(self, request_iterator: Iterable[bus_pb2.StreamBusVideoRequest], context): for request in request_iterator: logging.info("Pred Service Start") - params = Pred_Args( - nursery_id=request.nursery_id, - bus_id=request.bus_id, - bus_type=request.bus_type, - video_chunk=request.video_chunk, - photo_height=request.photo_height, - photo_width=request.photo_width, - vehicle_event=request.vehicle_event, - ) try: + params = Pred_Args( + nursery_id=request.nursery_id, + bus_id=request.bus_id, + bus_type=request.bus_type, + video_chunk=request.video_chunk, + photo_height=request.photo_height, + photo_width=request.photo_width, + vehicle_event=request.vehicle_event, + ) child_ids = self.pred_fn(params) + is_detected = len(child_ids) > 0 + yield machine_learning_pb2.PredResponse( + is_detected=is_detected, child_ids=child_ids + ) except Exception: e = traceback.format_exc() logging.error(e) rich_status = create_service_error_status(e) context.abort_with_status(rpc_status.to_status(rich_status)) child_ids = [] - - is_detected = len(child_ids) > 0 - yield machine_learning_pb2.PredResponse( - is_detected=is_detected, child_ids=child_ids - ) + is_detected = len(child_ids) > 0 + yield machine_learning_pb2.PredResponse( + is_detected=is_detected, child_ids=child_ids + ) def Train(self, request: machine_learning_pb2.TrainRequest, context): logging.info("Train Service Start") - params = Train_Args( - nursery_id=request.nursery_id, - child_ids=request.child_ids, - bus_id=request.bus_id, - bus_type=request.bus_type, - seed=42, - mode="train", - ) try: + params = Train_Args( + nursery_id=request.nursery_id, + child_ids=request.child_ids, + bus_id=request.bus_id, + bus_type=request.bus_type, + seed=42, + mode="train", + ) + self.train_status = machine_learning_pb2.STATUS_PROCESSING + yield machine_learning_pb2.TrainResponse(status=self.train_status) self.train_fn(params) - is_started = True + self.train_status = machine_learning_pb2.STATUS_SUCCESS + yield machine_learning_pb2.TrainResponse(status=self.train_status) except Exception: - is_started = False e = traceback.format_exc() logging.error(e) rich_status = create_service_error_status(e) context.abort_with_status(rpc_status.to_status(rich_status)) - - return machine_learning_pb2.TrainResponse(is_started=is_started) + self.train_status = machine_learning_pb2.STATUS_FAILED + yield machine_learning_pb2.TrainResponse(status=self.train_status) def FaceDetectAndClip( self, From 58d1298a3e5dbd956da26545dcf944ccb5418144 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Fri, 23 Feb 2024 02:12:24 +0900 Subject: [PATCH 671/771] =?UTF-8?q?chore(ml):=20=E3=83=91=E3=83=A9?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=82=BF=E3=83=BC=E3=83=81=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=83=8B=E3=83=B3=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/machine_learning/src/face_detect_model/config.yaml b/machine_learning/src/face_detect_model/config.yaml index e7b23fb5..7353ffa6 100644 --- a/machine_learning/src/face_detect_model/config.yaml +++ b/machine_learning/src/face_detect_model/config.yaml @@ -10,9 +10,9 @@ model: stride: 2 face_detect: cascade_path: "haarcascade_frontalface_default.xml" - scale_factor: 1.2 - min_neighbors: 5 - min_size: { width: 50, height: 50 } + scale_factor: 1.1 + min_neighbors: 7 + min_size: { width: 30, height: 30 } clip_size: { width: 100, height: 100 } dataset: augmentation: From f7c8c05bf99dc25d31e65b8467fbb8ce5c08e585 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 02:15:34 +0900 Subject: [PATCH 672/771] =?UTF-8?q?fix:await=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/pages/camera_page/camera_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index db9c2504..e8814adc 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -68,7 +68,7 @@ class _CameraPageState extends State { try { await for (var response in res.asStream()) { developer.log("Received response: $response", name: "CameraPage"); - _playAudio(response); + await _playAudio(response); } } catch (error) { developer.log("Caught Error:", error: error); From d324937511ea2136a8415100d6f53c361d678a44 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 23 Feb 2024 03:09:39 +0900 Subject: [PATCH 673/771] =?UTF-8?q?fix:=20=E3=82=B9=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=83=BC=E3=83=9F=E3=83=B3=E3=82=B0=E3=81=A7=E7=84=A1=E9=99=90?= =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=83=97=E3=81=AB=E9=99=A5=E3=82=8B=E8=87=B4?= =?UTF-8?q?=E5=91=BD=E7=9A=84=E3=81=AA=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index dd48a8c3..9ac50871 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -81,10 +81,6 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* } nextStationID, err := getStationIDs(i.logger, ctx, bus) - if err != nil { - i.logger.Error("failed to get station IDs", "error", err) - return nil, err - } if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) @@ -338,6 +334,7 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* } func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationContinuousServer) error { + ctx := stream.Context() for { req, err := stream.Recv() if errors.Is(err, io.EOF) { @@ -346,8 +343,7 @@ func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationCon } if err != nil { i.logger.Error("failed to receive location", err) - // 一時的なエラーの場合は、エラーをログに記録し、処理を続行する - continue + return err } busID, err := uuid.Parse(req.BusId) @@ -361,17 +357,19 @@ func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationCon _, err = i.entClient.Bus.UpdateOneID(busID). SetLatitude(req.Latitude). SetLongitude(req.Longitude). - Save(context.Background()) + Save(ctx) + + i.logger.Info("updated bus location", "bus_id", busID, "latitude", req.Latitude, "longitude", req.Longitude) if err != nil { i.logger.Error("failed to update bus location", err) - // 更新に失敗した場合は、エラーをログに記録し、処理を続行する - continue + return err } } } func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, stream pb.BusService_TrackBusContinuousServer) error { + ctx := stream.Context() busID, err := uuid.Parse(req.BusId) if err != nil { return fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) @@ -381,7 +379,7 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea bus, err := i.entClient.Bus.Query(). Where(busRepo.IDEQ(busID)). WithNursery(). - Only(context.Background()) + Only(ctx) if err != nil { return fmt.Errorf("failed to get bus: %w", err) @@ -400,6 +398,7 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea }); err != nil { return fmt.Errorf("failed to send bus: %w", err) } + i.logger.Info("sent bus location", "bus_id", busID, "latitude", bus.Latitude, "longitude", bus.Longitude) } } @@ -645,7 +644,6 @@ func (i *Interactor) getFirstStation(bus *ent.Bus, busType pb.BusType) (*ent.Sta stations, err := busRoute. QueryBusRouteAssociations(). - Order(ent.Asc("order")). QueryStation(). All(context.Background()) if err != nil { From a0c7cd099e22e839665f803c11c366c2b868c53f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 23 Feb 2024 03:11:55 +0900 Subject: [PATCH 674/771] fix: linter --- backend/usecases/bus/bus.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 9ac50871..713da99f 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -82,6 +82,11 @@ func (i *Interactor) CreateBus(ctx context.Context, req *pb.CreateBusRequest) (* nextStationID, err := getStationIDs(i.logger, ctx, bus) + if err != nil { + i.logger.Error("failed to get station IDs", "error", err) + return nil, err + } + if err := tx.Commit(); err != nil { i.logger.Error("failed to commit transaction", "error", err) return nil, err From 95d2867622d302a5e5a40977bddad329cdfce5ab Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 03:20:10 +0900 Subject: [PATCH 675/771] =?UTF-8?q?feat:=20=E4=BD=8D=E7=BD=AE=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=81=AE=E9=80=81=E4=BF=A1=E6=A9=9F=E8=83=BD=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 80 ++++++++++++++++++- 1 file changed, 77 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index e8814adc..9927ce11 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -5,6 +5,7 @@ import 'package:flutter/material.dart'; import 'package:camera/camera.dart'; import 'package:grpc/grpc.dart'; import 'package:audioplayers/audioplayers.dart'; +import 'package:location/location.dart'; import 'package:where_child_bus/components/util/audio_manager.dart'; import 'package:where_child_bus/config/config.dart'; import 'package:where_child_bus/pages/camera_page/widgets/riding_toggle.dart'; @@ -28,7 +29,10 @@ class _CameraPageState extends State { late CameraController _controller; final StreamController _streamController = StreamController.broadcast(); + final StreamController _locationStream = + StreamController.broadcast(); VehicleEvent _vehicleEvent = VehicleEvent.VEHICLE_EVENT_GET_ON; + final Location location = Location(); @override void initState() { @@ -47,8 +51,9 @@ class _CameraPageState extends State { developer.log("Camera aspect ratio: ${_controller.value.aspectRatio}", name: "CameraPage"); _startImageStream(); - developer.log("Start streaming video to server", name: "CameraPage"); streamBusVideo(_streamController.stream); + developer.log("Start streaming coordinate to server", name: "CameraPage"); + _streamCoordinate(_locationStream.stream); } catch (e) { developer.log('Failed to initialize camera: $e'); } @@ -77,6 +82,60 @@ class _CameraPageState extends State { } } + Future _streamCoordinate( + Stream requestStream) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + options: const ChannelOptions(), + ); + final grpcClient = BusServiceClient(channel); + developer.log("ServiceClient created"); + final res = grpcClient.sendLocationContinuous(requestStream); + + try { + await for (var response in res.asStream()) { + developer.log("Received response: $response", name: "CameraPage"); + } + } catch (error) { + developer.log("Caught Error:", error: error); + } finally { + await channel.shutdown(); + } + } + + Future _getCurrentLocation() async { + bool serviceEnabled; + PermissionStatus permissionGranted; + LocationData locationData; + + // サービスが有効かどうかを確認 + serviceEnabled = await location.serviceEnabled(); + if (!serviceEnabled) { + // サービスが無効の場合は、ユーザーに有効化を求める + serviceEnabled = await location.requestService(); + if (!serviceEnabled) { + throw Exception('Location service is not enabled.'); + } + } + + // 位置情報の権限を確認 + permissionGranted = await location.hasPermission(); + if (permissionGranted == PermissionStatus.denied) { + // 権限が拒否されている場合は、権限をリクエスト + permissionGranted = await location.requestPermission(); + if (permissionGranted != PermissionStatus.granted) { + throw Exception('Location service is not enabled.'); + } + } + + // 現在地の取得 + locationData = await location.getLocation(); + developer + .log("現在地の緯度: ${locationData.latitude}, 経度: ${locationData.longitude}"); + return locationData; + } + List _processCameraImage2gray(CameraImage image) { final int width = image.width; final int height = image.height; @@ -101,11 +160,11 @@ class _CameraPageState extends State { return grayscaleBytes; } - void _startImageStream() { + void _startImageStream() async { List> videoChunks = []; if (!_controller.value.isStreamingImages) { int frameCounter = 0; - _controller.startImageStream((CameraImage image) { + _controller.startImageStream((CameraImage image) async { frameCounter++; if (frameCounter % 60 == 0) { if (Platform.isAndroid) { @@ -121,6 +180,20 @@ class _CameraPageState extends State { photoHeight: image.height, photoWidth: image.width, )); + + try { + await _getCurrentLocation(); + // await _getCurrentLocation().then((locationData) { + // _locationStream.add(SendLocationContinuousRequest( + // busId: widget.bus.id, + // latitude: locationData.latitude, + // longitude: locationData.longitude, + // )); + // }); + } catch (e) { + developer.log("Failed to get current location: $e"); + } + developer.log("width ${image.width}", name: "CameraPage"); developer.log("height ${image.height}", name: "CameraPage"); @@ -156,6 +229,7 @@ class _CameraPageState extends State { void dispose() { _controller.dispose(); _streamController.close(); + _locationStream.close(); super.dispose(); } From 1a9283b3b466e9a2c568cda844b3067020febc01 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 23 Feb 2024 03:58:33 +0900 Subject: [PATCH 676/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E6=83=85=E5=A0=B1=E3=81=AE=E3=83=AA=E3=83=88?= =?UTF-8?q?=E3=83=A9=E3=82=A4=E5=87=A6=E7=90=86=E3=81=A8=E9=80=81=E4=BF=A1?= =?UTF-8?q?=E9=96=93=E9=9A=94=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82=E3=81=BE?= =?UTF-8?q?=E3=81=9F=E3=80=81=E3=83=90=E3=82=B9=E3=81=AE=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E6=83=85=E5=A0=B1=E3=82=92=E5=AE=9A=E6=9C=9F=E7=9A=84=E3=81=AB?= =?UTF-8?q?=E9=80=81=E4=BF=A1=E3=81=99=E3=82=8B=E6=A9=9F=E8=83=BD=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?= =?UTF-8?q?=E3=81=95=E3=82=89=E3=81=AB=E3=80=81=E3=83=93=E3=83=87=E3=82=AA?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC=E3=83=A0=E3=81=AE=E5=87=A6?= =?UTF-8?q?=E7=90=86=E3=82=92=E6=94=B9=E5=96=84=E3=81=97=E3=80=81=E6=A4=9C?= =?UTF-8?q?=E5=87=BA=E3=81=95=E3=82=8C=E3=81=9F=E5=AD=90=E4=BE=9B=E3=81=9F?= =?UTF-8?q?=E3=81=A1=E3=82=92=E5=87=A6=E7=90=86=E3=81=99=E3=82=8B=E3=81=9F?= =?UTF-8?q?=E3=82=81=E3=81=AE=E3=83=98=E3=83=AB=E3=83=91=E3=83=BC=E9=96=A2?= =?UTF-8?q?=E6=95=B0=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=BE=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 150 ++++++++++++++++++++++-------------- 1 file changed, 91 insertions(+), 59 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 713da99f..f8807d5d 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "io" + "sync" "time" "context" @@ -340,22 +341,45 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationContinuousServer) error { ctx := stream.Context() + retryDelay := time.Second // リトライの間隔を1秒に設定 + maxRetries := 5 // 最大リトライ回数 + for { req, err := stream.Recv() if errors.Is(err, io.EOF) { // ストリームの終了 return stream.SendAndClose(&pb.SendLocationContinuousResponse{}) } + if err != nil { i.logger.Error("failed to receive location", err) - return err + + // 最大リトライ回数を超えるまでリトライ + for retry := 0; retry < maxRetries; retry++ { + time.Sleep(retryDelay) // リトライ間隔で待機 + + req, err = stream.Recv() // 再度受信を試みる + if err == nil { + break // 成功したらリトライループを抜ける + } + if errors.Is(err, io.EOF) { + // ストリームの終了 + return stream.SendAndClose(&pb.SendLocationContinuousResponse{}) + } + i.logger.Error(fmt.Sprintf("retrying to receive location, attempt %d", retry+1), err) + } + + // リトライ後もエラーが続く場合は、処理を中断 + if err != nil { + i.logger.Error("failed to receive location after retries", err) + return err + } } busID, err := uuid.Parse(req.BusId) if err != nil { i.logger.Error("failed to parse bus ID", err) - // バスIDの解析に失敗した場合は、エラーをログに記録し、処理を続行する - continue + return err // バスIDの解析に失敗した場合は、次のリクエストの処理を試みる } // トランザクションを使用せずに直接更新 @@ -364,8 +388,6 @@ func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationCon SetLongitude(req.Longitude). Save(ctx) - i.logger.Info("updated bus location", "bus_id", busID, "latitude", req.Latitude, "longitude", req.Longitude) - if err != nil { i.logger.Error("failed to update bus location", err) return err @@ -380,44 +402,57 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea return fmt.Errorf("failed to parse bus ID '%s': %w", req.BusId, err) } - for { - bus, err := i.entClient.Bus.Query(). - Where(busRepo.IDEQ(busID)). - WithNursery(). - Only(ctx) + // 送信間隔の設定(例えば、5秒ごと) + ticker := time.NewTicker(1 * time.Second) + defer ticker.Stop() - if err != nil { - return fmt.Errorf("failed to get bus: %w", err) - } + for { + select { + case <-ctx.Done(): // クライアントの切断またはその他のキャンセルシグナルを受信 + return ctx.Err() + case <-ticker.C: // 定期的にデータを送信 + bus, err := i.entClient.Bus.Query(). + Where(busRepo.IDEQ(busID)). + WithNursery(). + Only(ctx) + if err != nil { + return fmt.Errorf("failed to get bus: %w", err) + } - nextStation, err := bus.QueryNextStation().Only(context.Background()) - if err != nil { - return err - } + nextStation, err := bus.QueryNextStation().Only(ctx) + if err != nil { + return err + } - if err := stream.Send(&pb.TrackBusContinuousResponse{ - BusId: req.BusId, - Latitude: bus.Latitude, - Longitude: bus.Longitude, - NextStationId: nextStation.ID.String(), - }); err != nil { - return fmt.Errorf("failed to send bus: %w", err) + if err := stream.Send(&pb.TrackBusContinuousResponse{ + BusId: req.BusId, + Latitude: bus.Latitude, + Longitude: bus.Longitude, + NextStationId: nextStation.ID.String(), + }); err != nil { + return fmt.Errorf("failed to send bus: %w", err) + } + i.logger.Info("sent bus location", "bus_id", busID, "latitude", bus.Latitude, "longitude", bus.Longitude) } - i.logger.Info("sent bus location", "bus_id", busID, "latitude", bus.Latitude, "longitude", bus.Longitude) } } func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) error { - MLStream, err := i.MLServiceClient.Pred(context.Background()) + ctx := stream.Context() // ストリームのコンテキストを使用 + MLStream, err := i.MLServiceClient.Pred(ctx) if err != nil { return err } var busID string var vehicleEvent pb.VehicleEvent + errChan := make(chan error, 1) // エラーチャネルを作成 + wg := sync.WaitGroup{} // ゴルーチンの完了を待つためのWaitGroup // Go サーバーから受け取ったメッセージをPythonサーバーに転送 + wg.Add(1) // WaitGroupのカウンターをインクリメント go func() { + defer wg.Done() // 関数終了時にカウンターをデクリメント for { in, err := stream.Recv() if err == io.EOF { @@ -425,58 +460,55 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e break } if err != nil { + errChan <- err // エラーチャネルにエラーを送信 return } - // バスID、バスタイプ、ビデオタイプを保持 busID = in.BusId vehicleEvent = in.VehicleEvent - // Python サーバーへそのまま転送 - err = MLStream.Send(in) - if err != nil { + if err := MLStream.Send(in); err != nil { + errChan <- err // エラーチャネルにエラーを送信 return } } }() - // Python サーバーからのレスポンスを待つ for { - resp, err := MLStream.Recv() - i.logger.Info("received from ML server") - if err == io.EOF { - // ストリームの終了 - break - } - if err != nil { + select { + case err := <-errChan: // エラーチャネルからのエラーを待機 return err - } + default: + resp, err := MLStream.Recv() + if err == io.EOF { + // ストリームの終了 + wg.Wait() // ゴルーチンの完了を待つ + return nil + } + if err != nil { + return err + } - if !resp.IsDetected { - // 検出されなかった場合は、次のループに進む - continue - } + if !resp.IsDetected { + continue + } - // トランザクションの開始 - tx, err := i.entClient.Tx(context.Background()) - if err != nil { - return err - } + tx, err := i.entClient.Tx(ctx) + if err != nil { + return err + } - // トランザクション内での操作 - err = i.processDetectedChildren(tx, stream, resp, busID, vehicleEvent) // stream 引数を追加 - if err != nil { - utils.RollbackTx(tx, i.logger) - return err - } + err = i.processDetectedChildren(tx, stream, resp, busID, vehicleEvent) + if err != nil { + utils.RollbackTx(tx, i.logger) + return err + } - // トランザクションのコミット - if err := tx.Commit(); err != nil { - return err + if err := tx.Commit(); err != nil { + return err + } } } - - return nil } // processDetectedChildren は検出された子供たちを処理するためのヘルパー関数です。 From 00af6b13ec961e24d98fe9f9ecbbdddc46d8cd6c Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 10:51:04 +0900 Subject: [PATCH 677/771] =?UTF-8?q?fix:=20polyline=E3=81=AE=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/google_map_view.dart | 22 +++-- .../where_child_bus_guardian/pubspec.lock | 88 +++++++++++++++++++ 2 files changed, 98 insertions(+), 12 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index 9a8e3ca1..4e711316 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -118,18 +118,16 @@ class _GoogleMapView extends State { .toList(); try { late PolylineResult result; - if (GoogleMapApiManager.canSendRequest()) { - result = await polylinePoints.getRouteBetweenCoordinates( - googleApiKey, - PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), - PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), - travelMode: TravelMode.driving, - avoidTolls: true, - avoidHighways: false, - avoidFerries: false, - wayPoints: polylineWayPoints, - ); - } + result = await polylinePoints.getRouteBetweenCoordinates( + googleApiKey, + PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), + PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), + travelMode: TravelMode.driving, + avoidTolls: true, + avoidHighways: false, + avoidFerries: false, + wayPoints: polylineWayPoints, + ); if (result.points.isNotEmpty) { result.points.forEach((PointLatLng point) { diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index 523f251f..4c308594 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -105,6 +105,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" fixnum: dependency: transitive description: @@ -192,6 +200,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.10.0" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + sha256: f0b8d115a13ecf827013ec9fc883390ccc0e87a96ed5347a3114cac177ef18e8 + url: "https://pub.dev" + source: hosted + version: "6.1.0" google_maps: dependency: transitive description: @@ -368,6 +384,62 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + platform: + dependency: transitive + description: + name: platform + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + url: "https://pub.dev" + source: hosted + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -508,6 +580,22 @@ packages: relative: true source: path version: "0.0.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" sdks: dart: ">=3.2.6 <4.0.0" flutter: ">=3.16.6" From de1e9c0bebae6d0137665b3a1e41b1c0f1eb2946 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 23 Feb 2024 11:00:29 +0900 Subject: [PATCH 678/771] =?UTF-8?q?fix:=20=E4=BD=8D=E7=BD=AE=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=81=AE=E9=80=81=E4=BF=A1=E9=96=93=E9=9A=94=E3=82=92?= =?UTF-8?q?=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 75 ++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index f8807d5d..e94018af 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -341,56 +341,55 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationContinuousServer) error { ctx := stream.Context() - retryDelay := time.Second // リトライの間隔を1秒に設定 - maxRetries := 5 // 最大リトライ回数 + retryDelay := 10 * time.Second // リトライの間隔を10秒に設定 + maxRetries := 5 // 最大リトライ回数 - for { - req, err := stream.Recv() - if errors.Is(err, io.EOF) { - // ストリームの終了 - return stream.SendAndClose(&pb.SendLocationContinuousResponse{}) - } + ticker := time.NewTicker(retryDelay) + defer ticker.Stop() - if err != nil { - i.logger.Error("failed to receive location", err) + retryCount := 0 - // 最大リトライ回数を超えるまでリトライ - for retry := 0; retry < maxRetries; retry++ { - time.Sleep(retryDelay) // リトライ間隔で待機 + for { + select { + case <-ctx.Done(): // クライアントの切断またはその他のキャンセルシグナルを受信 + return ctx.Err() + case <-ticker.C: // 定期的にリトライを実施 + req, err := stream.Recv() + if errors.Is(err, io.EOF) { + // ストリームの終了 + return stream.SendAndClose(&pb.SendLocationContinuousResponse{}) + } - req, err = stream.Recv() // 再度受信を試みる - if err == nil { - break // 成功したらリトライループを抜ける - } - if errors.Is(err, io.EOF) { - // ストリームの終了 - return stream.SendAndClose(&pb.SendLocationContinuousResponse{}) + if err != nil { + i.logger.Error("failed to receive location", err) + retryCount++ + if retryCount >= maxRetries { + i.logger.Error("max retries reached, stopping", err) + return err // 最大リトライ回数に達したので中断 } - i.logger.Error(fmt.Sprintf("retrying to receive location, attempt %d", retry+1), err) + continue // 次のリトライを待つ } - // リトライ後もエラーが続く場合は、処理を中断 + // リセットリトライカウント + retryCount = 0 + + busID, err := uuid.Parse(req.BusId) if err != nil { - i.logger.Error("failed to receive location after retries", err) - return err + i.logger.Error("failed to parse bus ID", err) + continue // バスIDの解析に失敗した場合は、次のリクエストの処理を試みる } - } - busID, err := uuid.Parse(req.BusId) - if err != nil { - i.logger.Error("failed to parse bus ID", err) - return err // バスIDの解析に失敗した場合は、次のリクエストの処理を試みる - } + _, err = i.entClient.Bus.UpdateOneID(busID). + SetLatitude(req.Latitude). + SetLongitude(req.Longitude). + Save(ctx) - // トランザクションを使用せずに直接更新 - _, err = i.entClient.Bus.UpdateOneID(busID). - SetLatitude(req.Latitude). - SetLongitude(req.Longitude). - Save(ctx) + if err != nil { + i.logger.Error("failed to update bus location", err) + continue // データベース更新に失敗した場合は、次のリクエストの処理を試みる + } - if err != nil { - i.logger.Error("failed to update bus location", err) - return err + i.logger.Info("updated bus location", "bus_id", busID, "latitude", req.Latitude, "longitude", req.Longitude) } } } From 11ef59fc8ba322666d3a250aa3537b70e8b7e846 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 11:05:02 +0900 Subject: [PATCH 679/771] =?UTF-8?q?feat:=20=E7=9C=8B=E6=9D=BF=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/auth_page/auth_page.dart | 2 +- .../lib/pages/check_page/check_page.dart | 18 +++- .../where_child_bus_guardian/pubspec.lock | 96 +++++++++++++++++-- 3 files changed, 106 insertions(+), 10 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index 0d3d2416..b4881f54 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -36,7 +36,7 @@ class _AuthPageState extends State { try { if (kDebugMode) { - res = await guardianLogin("guardian1@example.com", "password"); + res = await guardianLogin("hogosya1@example.com", "password"); } else { res = await guardianLogin( _emailController.text, _passwordController.text); diff --git a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart index 5383fdb6..6b353609 100644 --- a/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/check_page/check_page.dart @@ -1,6 +1,7 @@ import 'dart:developer' as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; import 'package:where_child_bus_guardian/components/utils/current_time_body.dart'; import 'package:where_child_bus_guardian/pages/check_page/components/bus_toggle_button.dart'; import 'package:where_child_bus_guardian/service/update_guardian_status.dart'; @@ -29,6 +30,13 @@ class _CheckPageState extends State { height: 50, ), toggleSwitchBody(context), + Container( + width: MediaQuery.of(context).size.width * 0.1, + height: MediaQuery.of(context).size.height * 0.16, + decoration: const BoxDecoration( + color: Color.fromARGB(255, 220, 198, 161), + ), + ), ], ), ); @@ -36,7 +44,12 @@ class _CheckPageState extends State { Widget toggleSwitchBody(BuildContext context) { return Container( + padding: const EdgeInsets.all(20), width: MediaQuery.of(context).size.width * 0.8, + decoration: BoxDecoration( + color: Color.fromARGB(255, 220, 198, 161), + borderRadius: BorderRadius.circular(10), + ), alignment: Alignment.center, child: Column( children: [ @@ -45,11 +58,14 @@ class _CheckPageState extends State { style: TextStyle(fontSize: 20), ), Padding( - padding: const EdgeInsets.only(top: 20), + padding: const EdgeInsets.only(top: 30), child: Column( children: [ busTitleAndToggleButton( "朝のバス", guardian.isUseMorningBus, true), + SizedBox( + height: 20, + ), busTitleAndToggleButton( "夕方のバス", guardian.isUseEveningBus, false), ], diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index 523f251f..7c0ec68e 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -105,6 +105,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" fixnum: dependency: transitive description: @@ -192,6 +200,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.10.0" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + sha256: f0b8d115a13ecf827013ec9fc883390ccc0e87a96ed5347a3114cac177ef18e8 + url: "https://pub.dev" + source: hosted + version: "6.1.0" google_maps: dependency: transitive description: @@ -296,14 +312,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" - intl: - dependency: "direct main" - description: - name: intl - sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf - url: "https://pub.dev" - source: hosted - version: "0.19.0" js: dependency: transitive description: @@ -368,6 +376,62 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + platform: + dependency: transitive + description: + name: platform + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + url: "https://pub.dev" + source: hosted + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -508,6 +572,22 @@ packages: relative: true source: path version: "0.0.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" sdks: dart: ">=3.2.6 <4.0.0" flutter: ">=3.16.6" From fd1a91c77f7268fda2a96eac0fcdad404d976898 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 23 Feb 2024 11:13:31 +0900 Subject: [PATCH 680/771] =?UTF-8?q?feat:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E5=8F=96=E5=BE=97=E9=96=93=E9=9A=94=E3=82=92?= =?UTF-8?q?10=E7=97=85=E3=81=AB=E5=A4=89=E6=9B=B4=E3=81=97=E3=83=AD?= =?UTF-8?q?=E3=82=AC=E3=83=BC=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index e94018af..288f6e2d 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -402,7 +402,7 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea } // 送信間隔の設定(例えば、5秒ごと) - ticker := time.NewTicker(1 * time.Second) + ticker := time.NewTicker(10 * time.Second) defer ticker.Stop() for { @@ -431,7 +431,6 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea }); err != nil { return fmt.Errorf("failed to send bus: %w", err) } - i.logger.Info("sent bus location", "bus_id", busID, "latitude", bus.Latitude, "longitude", bus.Longitude) } } } From bc9536d97fd7944f0c87c6177c3c12dffeed5366 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 11:22:56 +0900 Subject: [PATCH 681/771] =?UTF-8?q?update:=20=E7=8F=BE=E5=9C=A8=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E5=8F=96=E5=BE=97=E3=81=AE=E9=96=93=E9=9A=94=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/lib/pages/map_page/map_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index e6993198..3a7f04df 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -75,7 +75,7 @@ class _MapPageState extends State { developer.log("$busLatitude, $busLongitude", name: "TrackBusContinuous"); }); - await Future.delayed(const Duration(seconds: 1)); + await Future.delayed(const Duration(seconds: 10)); } } catch (error) { developer.log("Caught Error", error: error); From c4906d8f7d297dd7c605d394a4ab1781f921dab8 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 11:23:15 +0900 Subject: [PATCH 682/771] =?UTF-8?q?fix:=20=E7=8F=BE=E5=9C=A8=E6=99=82?= =?UTF-8?q?=E5=88=BB=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/map_page/components/arrival_time.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index 732c29f4..40021a25 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -38,7 +38,6 @@ class _ArrivalTimeState extends State { String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); String arrivalTime = "Loading..."; Timer? _timer; - DateTime departureTime = DateTime.now(); double morningFirstStationLatitude = 0.0, morningFirstStationLongitude = 0.0; double eveningFirstStationLatitude = 0.0, eveningFirstStationLongitude = 0.0; double nextStationLatitude = 0.0, nextStationLongitude = 0.0; @@ -47,8 +46,6 @@ class _ArrivalTimeState extends State { void initState() { super.initState(); initArrivalTime(); - _timer = Timer.periodic( - const Duration(minutes: 1), (Timer t) => initArrivalTime()); } @override @@ -85,6 +82,9 @@ class _ArrivalTimeState extends State { @override Widget build(BuildContext context) { + _timer = Timer.periodic( + const Duration(minutes: 1), (Timer t) => initArrivalTime()); + return Text( widget.isMinuteOnly ? "${arrivalTime}分" : "${arrivalTime}", style: const TextStyle(fontSize: 30), @@ -109,7 +109,7 @@ class _ArrivalTimeState extends State { arrivalTime = widget.isMinuteOnly ? (durationInSeconds ~/ 60).toString() : DateFormat('HH:mm').format( - departureTime.add(Duration(seconds: durationInSeconds))); + DateTime.now().add(Duration(seconds: durationInSeconds))); }); } } else { From 4970d5ff70f18be8c017003949a2b99bd39ba58e Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 11:40:27 +0900 Subject: [PATCH 683/771] =?UTF-8?q?chore:=20=E3=83=AD=E3=82=B0=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/map_page/components/arrival_time.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index 40021a25..adf9d54c 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -136,6 +136,7 @@ class _ArrivalTimeState extends State { String url = 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&waypoints=$waypointsString&key=$googleApiKey'; + developer.log("URL: $url", name: 'getArrivalTime'); http.Response? response = await _fetchDirections(url); return _parseDurationFromResponse(response); From 0a74cb3a4678511a4891b1e57ba8349348ba75ad Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 23 Feb 2024 11:56:17 +0900 Subject: [PATCH 684/771] =?UTF-8?q?feat:=20GoogleMapAPIManager=E3=82=AF?= =?UTF-8?q?=E3=83=A9=E3=82=B9=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/util/google_map_manager.dart | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 frontend/where_child_bus_guardian/lib/util/google_map_manager.dart diff --git a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart new file mode 100644 index 00000000..aa0e92a7 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart @@ -0,0 +1,98 @@ +import 'dart:async'; +import 'dart:convert'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:http/http.dart' as http; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:flutter_polyline_points/flutter_polyline_points.dart'; + +class GoogleMapAPIManager { + static final GoogleMapAPIManager _instance = GoogleMapAPIManager._internal(); + final String googleApiKey; + Map _lastApiCallTimestamps = {}; + + GoogleMapAPIManager._internal() + : googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); + + factory GoogleMapAPIManager() { + return _instance; + } + + // APIリクエストの頻度を制限するメソッド + void _throttleApiCall(String apiName) { + if (_lastApiCallTimestamps.containsKey(apiName)) { + final durationSinceLastCall = + DateTime.now().difference(_lastApiCallTimestamps[apiName]!); + if (durationSinceLastCall.inSeconds < 60) { + throw Exception( + 'Too many requests: $apiName can only be called once per minute.'); + } + } + _lastApiCallTimestamps[apiName] = DateTime.now(); + } + + // Google Maps APIへのリクエストを行うメソッド + Future _fetchFromGoogleAPI(String url, String apiName) async { + _throttleApiCall(apiName); + + final response = await http.get(Uri.parse(url)); + if (response.statusCode == 200) { + return response; + } else { + throw Exception('Failed to load data from Google Maps API'); + } + } + + // 方向取得のAPIを叩くメソッド + Future getDirections({ + required String startLat, + required String startLng, + required String endLat, + required String endLng, + String waypoints = '', + }) async { + String url = + 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&waypoints=optimize:true|$waypoints&key=$googleApiKey'; + final response = await _fetchFromGoogleAPI(url, 'getDirections'); + return json.decode(response.body); + } + + // 住所から緯度経度を取得するAPIを叩くメソッド + Future geocodeAddress(String address) async { + String url = + 'https://maps.googleapis.com/maps/api/geocode/json?address=$address&key=$googleApiKey'; + final response = await _fetchFromGoogleAPI(url, 'geocodeAddress'); + return json.decode(response.body); + } + + // ポリラインの座標を取得するAPIを叩くメソッド + Future> getPolylinePoints({ + required String startLat, + required String startLng, + required String endLat, + required String endLng, + List waypoints = const [], + }) async { + PolylinePoints polylinePoints = PolylinePoints(); + List polylineCoordinates = []; + + List polylineWayPoints = waypoints + .map((waypoint) => PolylineWayPoint(location: waypoint)) + .toList(); + + PolylineResult result = await polylinePoints.getRouteBetweenCoordinates( + googleApiKey, + PointLatLng(double.parse(startLat), double.parse(startLng)), + PointLatLng(double.parse(endLat), double.parse(endLng)), + travelMode: TravelMode.driving, + wayPoints: polylineWayPoints, + ); + + if (result.points.isNotEmpty) { + result.points.forEach((PointLatLng point) { + polylineCoordinates.add(LatLng(point.latitude, point.longitude)); + }); + } + + return polylineCoordinates; + } +} From 908377fb15cb23869bb076c71600fed2810db77e Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 12:40:31 +0900 Subject: [PATCH 685/771] =?UTF-8?q?update:=20google=5Fmap=5Fmanager?= =?UTF-8?q?=E3=82=92=E9=81=A9=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/google_map_view.dart | 30 ++++----------- .../map_page/components/arrival_time.dart | 37 ++++++------------- .../lib/pages/map_page/map_page.dart | 14 ++----- .../lib/util/google_map_manager.dart | 6 ++- 4 files changed, 26 insertions(+), 61 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index 4e711316..ae73cb1c 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -1,11 +1,10 @@ import 'package:flutter/material.dart'; import 'dart:developer' as developer; import 'dart:async'; -import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart'; import '../../pages/map_page/map_page.dart'; -import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; +import 'package:where_child_bus_guardian/util/google_map_manager.dart'; class GoogleMapView extends StatefulWidget { final List waypoints; @@ -34,7 +33,6 @@ class _GoogleMapView extends State { Map polylines = {}; List polylineCoordinates = []; PolylinePoints polylinePoints = PolylinePoints(); - String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); @override void initState() { @@ -112,28 +110,14 @@ class _GoogleMapView extends State { } void _getPolyline(List waypoints) async { - List polylineWayPoints = waypoints - .map((waypoint) => PolylineWayPoint( - location: "${waypoint.latitude},${waypoint.longitude}")) - .toList(); try { - late PolylineResult result; - result = await polylinePoints.getRouteBetweenCoordinates( - googleApiKey, - PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), - PointLatLng(widget.nurseryLatitude, widget.nurseryLongitude), - travelMode: TravelMode.driving, - avoidTolls: true, - avoidHighways: false, - avoidFerries: false, - wayPoints: polylineWayPoints, + polylineCoordinates = await GoogleMapAPIManager().getPolylinePoints( + startLat: widget.busLatitude.toString(), + startLng: widget.busLongitude.toString(), + endLat: widget.nurseryLatitude.toString(), + endLng: widget.nurseryLongitude.toString(), + waypoints: waypoints, ); - - if (result.points.isNotEmpty) { - result.points.forEach((PointLatLng point) { - polylineCoordinates.add(LatLng(point.latitude, point.longitude)); - }); - } _addPolyline(); } catch (e) { print(e); diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index adf9d54c..d6d67769 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -1,13 +1,9 @@ import 'package:flutter/material.dart'; import "dart:developer" as developer; -import 'package:flutter_dotenv/flutter_dotenv.dart'; -import 'package:http/http.dart' as http; -import 'dart:convert'; import 'dart:async'; import '../map_page.dart'; import 'package:intl/intl.dart'; -import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; -import 'package:where_child_bus_guardian/pages/map_page/google_map_api_manager.dart'; +import 'package:where_child_bus_guardian/util/google_map_manager.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class ArrivalTime extends StatefulWidget { @@ -35,11 +31,8 @@ class ArrivalTime extends StatefulWidget { } class _ArrivalTimeState extends State { - String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); String arrivalTime = "Loading..."; Timer? _timer; - double morningFirstStationLatitude = 0.0, morningFirstStationLongitude = 0.0; - double eveningFirstStationLatitude = 0.0, eveningFirstStationLongitude = 0.0; double nextStationLatitude = 0.0, nextStationLongitude = 0.0; @override @@ -133,12 +126,15 @@ class _ArrivalTimeState extends State { String waypointsString = _generateWaypointsString(waypoints, nextLat, nextLng, endLat, endLng); - String url = - 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&waypoints=$waypointsString&key=$googleApiKey'; - - developer.log("URL: $url", name: 'getArrivalTime'); - http.Response? response = await _fetchDirections(url); + dynamic response = await GoogleMapAPIManager().getDirections( + startLat: startLat.toString(), + startLng: startLng.toString(), + endLat: endLat.toString(), + endLng: endLng.toString(), + waypoints: waypointsString, + ); + developer.log("$response", name: "ArrivalTimeResponse"); return _parseDurationFromResponse(response); } @@ -165,20 +161,9 @@ class _ArrivalTimeState extends State { .join('|'); } - Future _fetchDirections(String url) async { - final response = await http.get(Uri.parse(url)); - if (response.statusCode != 200) { - developer.log( - 'Failed to fetch directions. Status code: ${response.statusCode}'); - return null; - } - return response; - } - - int? _parseDurationFromResponse(http.Response? response) { - if (response == null) return null; + int? _parseDurationFromResponse(dynamic data) { + if (data == null) return null; - final data = json.decode(response.body); if (data['routes'] == null || data['routes'].isEmpty) { developer.log('No routes found.'); return null; diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 3a7f04df..1380a1b5 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -1,10 +1,7 @@ import 'dart:async'; import 'dart:developer' as developer; import 'package:flutter/material.dart'; -import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:grpc/grpc.dart'; -import 'package:http/http.dart' as http; -import 'dart:convert'; import 'package:where_child_bus_guardian/components/utils/google_map_view.dart'; import 'package:where_child_bus_guardian/config/config.dart'; import 'package:where_child_bus_guardian/pages/map_page/components/map_page_bottom.dart'; @@ -14,6 +11,7 @@ import 'package:where_child_bus_guardian/service/get_nursery_by_guardian_id.dart import 'package:where_child_bus_guardian/util/guardian_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; +import 'package:where_child_bus_guardian/util/google_map_manager.dart'; class Waypoint { final double latitude; @@ -35,7 +33,6 @@ class _MapPageState extends State { final StreamController _streamController = StreamController.broadcast(); - String googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); List busRoutes = []; List waypoints = []; @@ -182,14 +179,11 @@ class _MapPageState extends State { Future _getNurseryCoordinates() async { try { - dynamic response; - developer.log("住所から緯度経度への変換${nurseryAddress}"); - response = await http.get(Uri.parse( - 'https://maps.googleapis.com/maps/api/geocode/json?address=$nurseryAddress&key=$googleApiKey')); + dynamic data = + await GoogleMapAPIManager().geocodeAddress(nurseryAddress!); if (mounted) { setState(() { - final data = json.decode(response.body); - developer.log(response.body); + developer.log(data); final location = data['results'][0]['geometry']['location']; nurseryLatitude = location['lat']; nurseryLongitude = location['lng']; diff --git a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart index aa0e92a7..466f5b15 100644 --- a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart +++ b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart @@ -4,6 +4,7 @@ import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:http/http.dart' as http; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart'; +import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; class GoogleMapAPIManager { static final GoogleMapAPIManager _instance = GoogleMapAPIManager._internal(); @@ -70,13 +71,14 @@ class GoogleMapAPIManager { required String startLng, required String endLat, required String endLng, - List waypoints = const [], + List waypoints = const [], }) async { PolylinePoints polylinePoints = PolylinePoints(); List polylineCoordinates = []; List polylineWayPoints = waypoints - .map((waypoint) => PolylineWayPoint(location: waypoint)) + .map((waypoint) => PolylineWayPoint( + location: "${waypoint.latitude},${waypoint.longitude}")) .toList(); PolylineResult result = await polylinePoints.getRouteBetweenCoordinates( From 01e9e791996d279c2473bca7cb73f18667cb2494 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 14:42:26 +0900 Subject: [PATCH 686/771] =?UTF-8?q?feat:=20=E8=A1=A8=E6=83=85=E3=81=AE?= =?UTF-8?q?=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../daily_page/components/daily_record_body.dart | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 4bcc10e2..22cabd4c 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -88,13 +88,12 @@ class _DailyRecordBody extends State { //TODO: 将来的に表情を受け取り、アイコンを表示する Widget childExpressionIcon() { return const SizedBox( - width: 100, - height: 100, - child: Card( - color: Colors.grey, - child: Text("ここに表情のアイコンが入る"), - ), - ); + width: 100, + height: 100, + child: Icon( + Icons.sentiment_satisfied, + size: 100, + )); } Widget statusIconAndStatusField( From 554b72bf01e074ab4a4e9ecec8472b89ddf4df85 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 14:42:54 +0900 Subject: [PATCH 687/771] =?UTF-8?q?add:=20=E3=83=95=E3=82=A9=E3=83=88?= =?UTF-8?q?=E3=83=95=E3=83=AC=E3=83=BC=E3=83=A0=E3=81=AE=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/images/child_photo_frame.png | Bin 0 -> 7776 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 frontend/where_child_bus_guardian/assets/images/child_photo_frame.png diff --git a/frontend/where_child_bus_guardian/assets/images/child_photo_frame.png b/frontend/where_child_bus_guardian/assets/images/child_photo_frame.png new file mode 100644 index 0000000000000000000000000000000000000000..90a441a286df7b51d70b0825b291494b246cf816 GIT binary patch literal 7776 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 literal 0 HcmV?d00001 From 63bd9a10b97ec04cf928c4a2035457f71ce92c00 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 15:11:44 +0900 Subject: [PATCH 688/771] =?UTF-8?q?feat:=20=E5=AD=90=E4=BE=9B=E3=81=AE?= =?UTF-8?q?=E5=86=99=E7=9C=9F=E3=81=AB=E3=83=95=E3=83=AC=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/daily_record_body.dart | 26 ++++- .../where_child_bus_guardian/pubspec.lock | 96 +++++++++++++++++-- 2 files changed, 109 insertions(+), 13 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 22cabd4c..2a9c61d2 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -74,13 +74,29 @@ class _DailyRecordBody extends State { Widget childFaceAndExpression() { return Row( mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [photoFrameAndChildFace(), childExpressionIcon()], + ); + } + + Widget photoFrameAndChildFace() { + return Stack( children: [ - ImageFromBytes( - imageData: widget.image.photoData, - height: 150, - width: 150, + Image.asset( + 'assets/images/child_photo_frame.png', + width: 170, + height: 170, ), - childExpressionIcon() + Positioned( + top: 60, + right: 40, + child: ClipRRect( + borderRadius: BorderRadius.circular(10), + child: ImageFromBytes( + imageData: widget.image.photoData, + height: 90, + width: 90, + ), + )) ], ); } diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index 523f251f..7c0ec68e 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -105,6 +105,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" fixnum: dependency: transitive description: @@ -192,6 +200,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.10.0" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + sha256: f0b8d115a13ecf827013ec9fc883390ccc0e87a96ed5347a3114cac177ef18e8 + url: "https://pub.dev" + source: hosted + version: "6.1.0" google_maps: dependency: transitive description: @@ -296,14 +312,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" - intl: - dependency: "direct main" - description: - name: intl - sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf - url: "https://pub.dev" - source: hosted - version: "0.19.0" js: dependency: transitive description: @@ -368,6 +376,62 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + platform: + dependency: transitive + description: + name: platform + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + url: "https://pub.dev" + source: hosted + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -508,6 +572,22 @@ packages: relative: true source: path version: "0.0.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + url: "https://pub.dev" + source: hosted + version: "5.2.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" sdks: dart: ">=3.2.6 <4.0.0" flutter: ">=3.16.6" From 7ede41d9643c5adc10654fe94570beb7a82e0eb9 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 15:22:31 +0900 Subject: [PATCH 689/771] =?UTF-8?q?update:=20=E4=B9=97=E8=BB=8A=E7=8A=B6?= =?UTF-8?q?=E6=B3=81=E3=81=AE=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../daily_page/components/daily_record_body.dart | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 2a9c61d2..4897edfa 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -115,7 +115,7 @@ class _DailyRecordBody extends State { Widget statusIconAndStatusField( BuildContext context, IconData icon, Widget statusField) { return SizedBox( - width: MediaQuery.of(context).size.width * 0.9, + width: MediaQuery.of(context).size.width, child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ @@ -130,13 +130,20 @@ class _DailyRecordBody extends State { Widget isBoardingStatusField(context) { return Container( - width: MediaQuery.of(context).size.width * 0.5, + margin: EdgeInsets.only( + right: MediaQuery.of(context).size.width * 0.05, + left: MediaQuery.of(context).size.width * 0.05), + alignment: Alignment.center, + width: MediaQuery.of(context).size.width * 0.4, decoration: statusFieldDecoration(!isBoarding), child: Padding( - padding: const EdgeInsets.all(10.0), + padding: const EdgeInsets.all(5.0), child: Text( isBoarding ? "乗車中" : "降車済", - style: statusFieldTextStyle(!isBoarding), + style: TextStyle( + fontSize: 25, + color: !isBoarding ? Colors.green[900] : Colors.red[900], + ), textAlign: TextAlign.center, )), ); From aeb5fa0f7579c8f85f431c765252ed23fca3bca9 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 15:25:06 +0900 Subject: [PATCH 690/771] =?UTF-8?q?update:=20=E8=83=8C=E6=99=AF=E8=89=B2?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/lib/main.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/main.dart b/frontend/where_child_bus_guardian/lib/main.dart index b597a448..1ca23784 100644 --- a/frontend/where_child_bus_guardian/lib/main.dart +++ b/frontend/where_child_bus_guardian/lib/main.dart @@ -36,7 +36,9 @@ class _MyAppState extends State { return MaterialApp( title: 'WhereChildBus Guardian', theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + colorScheme: ColorScheme.fromSeed( + background: const Color.fromARGB(255, 245, 255, 247), + seedColor: Colors.deepPurple), textTheme: GoogleFonts.hachiMaruPopTextTheme( Theme.of(context).textTheme, ), From 209b48d3ae13e25ad93614ef41e1c7d84317218f Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 17:40:33 +0900 Subject: [PATCH 691/771] =?UTF-8?q?fix:=20=E3=83=AA=E3=82=AF=E3=82=A8?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=AE=E8=A9=A6=E8=A1=8C=E9=96=93=E9=9A=94?= =?UTF-8?q?=E3=81=AE=E5=88=B6=E9=99=90=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/google_map_view.dart | 7 +- .../map_page/components/arrival_time.dart | 114 ++++++------------ .../map_page/components/map_page_bottom.dart | 50 ++------ .../map_page/google_map_api_manager.dart | 13 -- .../lib/pages/map_page/map_page.dart | 9 +- .../lib/util/arrival_time_manager.dart | 75 ++++++++++++ .../lib/util/google_map_manager.dart | 2 + 7 files changed, 135 insertions(+), 135 deletions(-) delete mode 100644 frontend/where_child_bus_guardian/lib/pages/map_page/google_map_api_manager.dart create mode 100644 frontend/where_child_bus_guardian/lib/util/arrival_time_manager.dart diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index ae73cb1c..d39de056 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -105,8 +105,9 @@ class _GoogleMapView extends State { color: Colors.blue, points: polylineCoordinates, width: 5); - polylines[id] = polyline; - setState(() {}); + setState(() { + polylines[id] = polyline; + }); } void _getPolyline(List waypoints) async { @@ -118,6 +119,8 @@ class _GoogleMapView extends State { endLng: widget.nurseryLongitude.toString(), waypoints: waypoints, ); + developer.log("polylineCoordinates: $polylineCoordinates", + name: "GetPolyline"); _addPolyline(); } catch (e) { print(e); diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index d6d67769..86b7ef31 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -5,6 +5,7 @@ import '../map_page.dart'; import 'package:intl/intl.dart'; import 'package:where_child_bus_guardian/util/google_map_manager.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; +import 'package:where_child_bus_guardian/util/arrival_time_manager.dart'; class ArrivalTime extends StatefulWidget { final Bus bus; @@ -12,7 +13,6 @@ class ArrivalTime extends StatefulWidget { final String nextStationId; final double busLatitude, busLongitude; final double guardianLatitude, guardianLongitude; - final bool isMinuteOnly; const ArrivalTime({ Key? key, @@ -23,7 +23,6 @@ class ArrivalTime extends StatefulWidget { required this.busLongitude, required this.guardianLatitude, required this.guardianLongitude, - required this.isMinuteOnly, }) : super(key: key); @override @@ -31,7 +30,8 @@ class ArrivalTime extends StatefulWidget { } class _ArrivalTimeState extends State { - String arrivalTime = "Loading..."; + String arrivalTimeText = "Loading"; + String arrivalTimeAndCurrentText = "Loading"; Timer? _timer; double nextStationLatitude = 0.0, nextStationLongitude = 0.0; @@ -78,15 +78,33 @@ class _ArrivalTimeState extends State { _timer = Timer.periodic( const Duration(minutes: 1), (Timer t) => initArrivalTime()); - return Text( - widget.isMinuteOnly ? "${arrivalTime}分" : "${arrivalTime}", - style: const TextStyle(fontSize: 30), - ); + return Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Column( + children: [ + Text( + "到着まで", + style: const TextStyle(fontSize: 20), + ), + Text("${arrivalTimeText}分", style: const TextStyle(fontSize: 30)) + ], + ), + Column( + children: [ + Text("到着予定時刻", style: const TextStyle(fontSize: 20)), + Text("${arrivalTimeAndCurrentText}", + style: const TextStyle(fontSize: 30)) + ], + ), + ]); } Future setArrivalTime() async { try { - final durationInSeconds = await getArrivalTime( + final durationInSeconds = + await ArrivalTimeManager.instance.getArrivalTime( widget.busLatitude, widget.busLongitude, nextStationLatitude, @@ -96,81 +114,25 @@ class _ArrivalTimeState extends State { widget.waypoints, ); + developer.log("durationInSeconds: $durationInSeconds", + name: "ArrivalTime"); + + // 成功した取得のみで値を更新 if (durationInSeconds != null) { if (mounted) { setState(() { - arrivalTime = widget.isMinuteOnly - ? (durationInSeconds ~/ 60).toString() - : DateFormat('HH:mm').format( - DateTime.now().add(Duration(seconds: durationInSeconds))); + arrivalTimeText = (durationInSeconds ~/ 60).toString(); + arrivalTimeAndCurrentText = DateFormat('HH:mm') + .format( + DateTime.now().add(Duration(seconds: durationInSeconds))) + .toString(); }); } - } else { - setState(() => arrivalTime = "N/A"); } + // durationInSecondsがnullの場合や例外が発生した場合は、値を更新しない } catch (e) { - developer.log('到着時間の取得中にエラーが発生しました', error: e, name: "BusStopTimeError"); - setState(() => arrivalTime = "Error"); - } - } - - Future getArrivalTime( - double startLat, - double startLng, - double nextLat, - double nextLng, - double endLat, - double endLng, - List waypoints, - ) async { - String waypointsString = - _generateWaypointsString(waypoints, nextLat, nextLng, endLat, endLng); - - dynamic response = await GoogleMapAPIManager().getDirections( - startLat: startLat.toString(), - startLng: startLng.toString(), - endLat: endLat.toString(), - endLng: endLng.toString(), - waypoints: waypointsString, - ); - - developer.log("$response", name: "ArrivalTimeResponse"); - return _parseDurationFromResponse(response); - } - - String _generateWaypointsString(List waypoints, double startLat, - double startLng, double endLat, double endLng) { - int startIndex = waypoints.indexWhere( - (point) => point.latitude == startLat && point.longitude == startLng); - int endIndex = waypoints.indexWhere( - (point) => point.latitude == endLat && point.longitude == endLng); - - if (startIndex == -1) { - startIndex = 0; + developer.log('到着時間の取得中にエラーが発生しました', error: e, name: "ArrivalTimeError"); + // エラーが発生しても、到着時間のテキストを更新しない } - - if (endIndex == -1 || endIndex < startIndex) { - endIndex = waypoints.length; - } - - developer.log("$waypoints"); - - return waypoints - .sublist(startIndex, endIndex) - .map((point) => 'via:${point.latitude},${point.longitude}') - .join('|'); - } - - int? _parseDurationFromResponse(dynamic data) { - if (data == null) return null; - - if (data['routes'] == null || data['routes'].isEmpty) { - developer.log('No routes found.'); - return null; - } - - final route = data['routes'][0]; - final int duration = route['legs'][0]['duration']['value']; - return duration; } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart index a7c5cc20..fe830633 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart @@ -4,6 +4,7 @@ import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.da import 'package:where_child_bus_guardian/pages/map_page/components/arrival_time.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; import '../../styles/styles.dart'; +import 'package:where_child_bus_guardian/pages/map_page/components/arrival_time.dart'; class MapPageBottom extends StatefulWidget { final GuardianResponse guardian; @@ -73,49 +74,18 @@ class _MapPageBottomState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, children: [ - arrivalTimeBody(), + ArrivalTime( + bus: widget.bus, + waypoints: widget.waypoints, + nextStationId: widget.nextStationId, + busLatitude: widget.busLatitude, + busLongitude: widget.busLongitude, + guardianLatitude: guardianStation.latitude, + guardianLongitude: guardianStation.longitude, + ), ], ), ), ); } - - Widget arrivalTimeBody() { - return Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - fieldTitleAndTime( - "到着まで", - ArrivalTime( - bus: widget.bus, - waypoints: widget.waypoints, - nextStationId: widget.nextStationId, - busLatitude: widget.busLatitude, - busLongitude: widget.busLongitude, - guardianLatitude: guardianStation.latitude, - guardianLongitude: guardianStation.longitude, - isMinuteOnly: true)), - fieldTitleAndTime( - "到着予定時刻", - ArrivalTime( - bus: widget.bus, - waypoints: widget.waypoints, - nextStationId: widget.nextStationId, - busLatitude: widget.busLatitude, - busLongitude: widget.busLongitude, - guardianLatitude: guardianStation.latitude, - guardianLongitude: guardianStation.longitude, - isMinuteOnly: false)), - ]); - } - - Widget fieldTitleAndTime(String title, Widget time) { - return Column( - children: [ - Text(title), - time, - ], - ); - } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/google_map_api_manager.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/google_map_api_manager.dart deleted file mode 100644 index c9ed08d3..00000000 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/google_map_api_manager.dart +++ /dev/null @@ -1,13 +0,0 @@ -class GoogleMapApiManager { - static DateTime _lastRequestTime = - DateTime.now().subtract(Duration(seconds: 50)); - - static bool canSendRequest() { - final currentTime = DateTime.now(); - if (currentTime.difference(_lastRequestTime).inSeconds >= 50) { - _lastRequestTime = currentTime; - return true; - } - return false; - } -} diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 1380a1b5..54cd3ab0 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:convert'; import 'dart:developer' as developer; import 'package:flutter/material.dart'; import 'package:grpc/grpc.dart'; @@ -67,6 +68,7 @@ class _MapPageState extends State { await for (var response in grpcClient.trackBusContinuous(request)) { // レスポンスを受け取り、緯度と経度を更新 setState(() { + //このタイミングでインスタンスが再生成される busLatitude = response.latitude; busLongitude = response.longitude; developer.log("$busLatitude, $busLongitude", @@ -179,14 +181,13 @@ class _MapPageState extends State { Future _getNurseryCoordinates() async { try { - dynamic data = + Map data = await GoogleMapAPIManager().geocodeAddress(nurseryAddress!); if (mounted) { setState(() { - developer.log(data); final location = data['results'][0]['geometry']['location']; - nurseryLatitude = location['lat']; - nurseryLongitude = location['lng']; + nurseryLatitude = location['lat'] as double; + nurseryLongitude = location['lng'] as double; }); } } catch (e) { diff --git a/frontend/where_child_bus_guardian/lib/util/arrival_time_manager.dart b/frontend/where_child_bus_guardian/lib/util/arrival_time_manager.dart new file mode 100644 index 00000000..8a8fbf01 --- /dev/null +++ b/frontend/where_child_bus_guardian/lib/util/arrival_time_manager.dart @@ -0,0 +1,75 @@ +import "dart:developer" as developer; +import 'dart:async'; +import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; +import 'package:where_child_bus_guardian/util/google_map_manager.dart'; + +class ArrivalTimeManager { + static final ArrivalTimeManager _instance = ArrivalTimeManager._internal(); + + ArrivalTimeManager._internal(); + + static ArrivalTimeManager get instance => _instance; + + Future getArrivalTime( + double busLatitude, + double busLongitude, + double nextStationLatitude, + double nextStationLongitude, + double guardianLatitude, + double guardianLongitude, + List waypoints) async { + String waypointsString = _generateWaypointsString( + waypoints, + nextStationLatitude, + nextStationLongitude, + guardianLatitude, + guardianLongitude); + + Map response = await GoogleMapAPIManager().getDirections( + startLat: busLatitude.toString(), + startLng: busLongitude.toString(), + endLat: guardianLatitude.toString(), + endLng: guardianLongitude.toString(), + waypoints: waypointsString, + ); + + return _parseDurationFromResponse(response); + } + + String _generateWaypointsString(List waypoints, double startLat, + double startLng, double endLat, double endLng) { + int startIndex = waypoints.indexWhere( + (point) => point.latitude == startLat && point.longitude == startLng); + int endIndex = waypoints.indexWhere( + (point) => point.latitude == endLat && point.longitude == endLng); + + if (startIndex == -1) { + startIndex = 0; + } + + if (endIndex == -1 || endIndex < startIndex) { + endIndex = waypoints.length; + } + + developer.log("$waypoints"); + + return waypoints + .sublist(startIndex, endIndex) + .map((point) => 'via:${point.latitude},${point.longitude}') + .join('|'); + } + + int? _parseDurationFromResponse(Map data) { + if (data == null) return null; + + if (data['routes'] == null || data['routes'].isEmpty) { + developer.log('No routes found.', + name: 'ArrivalTimeManager getRoutesError'); + return null; + } + + final route = data['routes'][0]; + final int duration = route['legs'][0]['duration']['value']; + return duration; + } +} diff --git a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart index 466f5b15..3a1c3dd7 100644 --- a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart +++ b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:http/http.dart' as http; +import 'dart:developer' as developer; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; @@ -62,6 +63,7 @@ class GoogleMapAPIManager { String url = 'https://maps.googleapis.com/maps/api/geocode/json?address=$address&key=$googleApiKey'; final response = await _fetchFromGoogleAPI(url, 'geocodeAddress'); + developer.log('${response.body}', name: "geocodeAddress"); return json.decode(response.body); } From dbd18ab3bb5f9a87a03711c5828a5b481ecaa498 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 17:47:14 +0900 Subject: [PATCH 692/771] =?UTF-8?q?chore:=20=E3=82=A2=E3=83=97=E3=83=AA?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E3=82=92=E3=80=8C=E3=81=BB?= =?UTF-8?q?=E3=81=84=E3=81=8F=E3=82=8B=E3=83=BC=E3=81=9A=E3=80=8D=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/main.dart | 2 +- frontend/where_child_bus/lib/pages/auth_page/auth_page.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 9db8a646..dd3b29bb 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -34,7 +34,7 @@ class _MyAppState extends State { @override Widget build(BuildContext context) { return MaterialApp( - title: 'WhereChildBus', + title: 'ほいくるーず', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index 2b36677a..ddb0b381 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -65,7 +65,7 @@ class _AuthPageState extends State { return const Padding( padding: EdgeInsets.only(bottom: 32), child: Text( - 'WhereChildBus', + 'ほいくるーず', style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold), ), ); From 7148d98a70427c4bffcebd1f779fd0a799c0aeb2 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 23 Feb 2024 17:47:14 +0900 Subject: [PATCH 693/771] =?UTF-8?q?fix:=20streamVideo=E3=83=AA=E3=82=AF?= =?UTF-8?q?=E3=82=A8=E3=82=B9=E3=83=88=E3=81=8B=E3=82=89=E4=BF=9D=E8=82=B2?= =?UTF-8?q?=E5=9C=92ID=E3=81=8C=E6=B6=88=E3=81=88=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 242 +++++++++--------- .../proto-gen/where_child_bus/v1/bus.pb.dart | 36 ++- .../where_child_bus/v1/bus.pbjson.dart | 12 +- .../generated/where_child_bus/v1/bus_pb2.py | 87 +++---- .../generated/where_child_bus/v1/bus_pb2.pyi | 6 +- proto/where_child_bus/v1/bus.proto | 1 + 6 files changed, 202 insertions(+), 182 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index ef5008fa..adeadeb3 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -655,6 +655,7 @@ type StreamBusVideoRequest struct { unknownFields protoimpl.UnknownFields BusId string `protobuf:"bytes,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + NurseryId string `protobuf:"bytes,2,opt,name=nursery_id,json=nurseryId,proto3" json:"nursery_id,omitempty"` BusType BusType `protobuf:"varint,3,opt,name=bus_type,json=busType,proto3,enum=where_child_bus.v1.BusType" json:"bus_type,omitempty"` VehicleEvent VehicleEvent `protobuf:"varint,4,opt,name=vehicle_event,json=vehicleEvent,proto3,enum=where_child_bus.v1.VehicleEvent" json:"vehicle_event,omitempty"` VideoChunk [][]byte `protobuf:"bytes,5,rep,name=video_chunk,json=videoChunk,proto3" json:"video_chunk,omitempty"` // Chunk of video data @@ -701,6 +702,13 @@ func (x *StreamBusVideoRequest) GetBusId() string { return "" } +func (x *StreamBusVideoRequest) GetNurseryId() string { + if x != nil { + return x.NurseryId + } + return "" +} + func (x *StreamBusVideoRequest) GetBusType() BusType { if x != nil { return x.BusType @@ -1017,128 +1025,130 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x92, 0x02, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xb1, 0x02, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, - 0x0d, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, - 0x75, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x68, 0x6f, - 0x74, 0x6f, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x74, - 0x6f, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, - 0x68, 0x6f, 0x74, 0x6f, 0x57, 0x69, 0x64, 0x74, 0x68, 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, - 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xb7, 0x02, 0x0a, 0x10, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, - 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, - 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, - 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, - 0x52, 0x03, 0x62, 0x75, 0x73, 0x32, 0x9b, 0x07, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, - 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, - 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, - 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, - 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, - 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x34, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x72, 0x73, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x07, 0x62, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0d, + 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x68, 0x75, + 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, + 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x74, + 0x6f, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x74, 0x6f, + 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x68, + 0x6f, 0x74, 0x6f, 0x57, 0x69, 0x64, 0x74, 0x68, 0x22, 0x70, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, + 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xb7, 0x02, 0x0a, 0x10, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, + 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, + 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x46, 0x61, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, + 0x03, 0x62, 0x75, 0x73, 0x32, 0x9b, 0x07, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, + 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, + 0x73, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x75, 0x72, 0x73, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, - 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x34, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x35, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, + 0x75, 0x73, 0x42, 0x79, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, + 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, + 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, + 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x42, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2b, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x75, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, - 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, - 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, - 0x01, 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, - 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, + 0x53, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, + 0x12, 0x75, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, - 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, - 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, - 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, - 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, - 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, + 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, + 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, + 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, + 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart index a7d0bc8d..d359765b 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pb.dart @@ -729,6 +729,7 @@ class TrackBusContinuousResponse extends $pb.GeneratedMessage { class StreamBusVideoRequest extends $pb.GeneratedMessage { factory StreamBusVideoRequest({ $core.String? busId, + $core.String? nurseryId, $9.BusType? busType, $9.VehicleEvent? vehicleEvent, $core.Iterable<$core.List<$core.int>>? videoChunk, @@ -739,6 +740,9 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { if (busId != null) { $result.busId = busId; } + if (nurseryId != null) { + $result.nurseryId = nurseryId; + } if (busType != null) { $result.busType = busType; } @@ -762,6 +766,7 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StreamBusVideoRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') + ..aOS(2, _omitFieldNames ? '' : 'nurseryId') ..e<$9.BusType>(3, _omitFieldNames ? '' : 'busType', $pb.PbFieldType.OE, defaultOrMaker: $9.BusType.BUS_TYPE_UNSPECIFIED, valueOf: $9.BusType.valueOf, enumValues: $9.BusType.values) ..e<$9.VehicleEvent>(4, _omitFieldNames ? '' : 'vehicleEvent', $pb.PbFieldType.OE, defaultOrMaker: $9.VehicleEvent.VEHICLE_EVENT_UNSPECIFIED, valueOf: $9.VehicleEvent.valueOf, enumValues: $9.VehicleEvent.values) ..p<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'videoChunk', $pb.PbFieldType.PY) @@ -800,42 +805,51 @@ class StreamBusVideoRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearBusId() => clearField(1); + @$pb.TagNumber(2) + $core.String get nurseryId => $_getSZ(1); + @$pb.TagNumber(2) + set nurseryId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNurseryId() => $_has(1); + @$pb.TagNumber(2) + void clearNurseryId() => clearField(2); + @$pb.TagNumber(3) - $9.BusType get busType => $_getN(1); + $9.BusType get busType => $_getN(2); @$pb.TagNumber(3) set busType($9.BusType v) { setField(3, v); } @$pb.TagNumber(3) - $core.bool hasBusType() => $_has(1); + $core.bool hasBusType() => $_has(2); @$pb.TagNumber(3) void clearBusType() => clearField(3); @$pb.TagNumber(4) - $9.VehicleEvent get vehicleEvent => $_getN(2); + $9.VehicleEvent get vehicleEvent => $_getN(3); @$pb.TagNumber(4) set vehicleEvent($9.VehicleEvent v) { setField(4, v); } @$pb.TagNumber(4) - $core.bool hasVehicleEvent() => $_has(2); + $core.bool hasVehicleEvent() => $_has(3); @$pb.TagNumber(4) void clearVehicleEvent() => clearField(4); @$pb.TagNumber(5) - $core.List<$core.List<$core.int>> get videoChunk => $_getList(3); + $core.List<$core.List<$core.int>> get videoChunk => $_getList(4); @$pb.TagNumber(6) - $core.int get photoHeight => $_getIZ(4); + $core.int get photoHeight => $_getIZ(5); @$pb.TagNumber(6) - set photoHeight($core.int v) { $_setSignedInt32(4, v); } + set photoHeight($core.int v) { $_setSignedInt32(5, v); } @$pb.TagNumber(6) - $core.bool hasPhotoHeight() => $_has(4); + $core.bool hasPhotoHeight() => $_has(5); @$pb.TagNumber(6) void clearPhotoHeight() => clearField(6); @$pb.TagNumber(7) - $core.int get photoWidth => $_getIZ(5); + $core.int get photoWidth => $_getIZ(6); @$pb.TagNumber(7) - set photoWidth($core.int v) { $_setSignedInt32(5, v); } + set photoWidth($core.int v) { $_setSignedInt32(6, v); } @$pb.TagNumber(7) - $core.bool hasPhotoWidth() => $_has(5); + $core.bool hasPhotoWidth() => $_has(6); @$pb.TagNumber(7) void clearPhotoWidth() => clearField(7); } diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart index 90d3cb93..dde508c2 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbjson.dart @@ -181,6 +181,7 @@ const StreamBusVideoRequest$json = { '1': 'StreamBusVideoRequest', '2': [ {'1': 'bus_id', '3': 1, '4': 1, '5': 9, '10': 'busId'}, + {'1': 'nursery_id', '3': 2, '4': 1, '5': 9, '10': 'nurseryId'}, {'1': 'bus_type', '3': 3, '4': 1, '5': 14, '6': '.where_child_bus.v1.BusType', '10': 'busType'}, {'1': 'vehicle_event', '3': 4, '4': 1, '5': 14, '6': '.where_child_bus.v1.VehicleEvent', '10': 'vehicleEvent'}, {'1': 'video_chunk', '3': 5, '4': 3, '5': 12, '10': 'videoChunk'}, @@ -191,11 +192,12 @@ const StreamBusVideoRequest$json = { /// Descriptor for `StreamBusVideoRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List streamBusVideoRequestDescriptor = $convert.base64Decode( - 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBI2CghidXNfdH' - 'lwZRgDIAEoDjIbLndoZXJlX2NoaWxkX2J1cy52MS5CdXNUeXBlUgdidXNUeXBlEkUKDXZlaGlj' - 'bGVfZXZlbnQYBCABKA4yIC53aGVyZV9jaGlsZF9idXMudjEuVmVoaWNsZUV2ZW50Ugx2ZWhpY2' - 'xlRXZlbnQSHwoLdmlkZW9fY2h1bmsYBSADKAxSCnZpZGVvQ2h1bmsSIQoMcGhvdG9faGVpZ2h0' - 'GAYgASgFUgtwaG90b0hlaWdodBIfCgtwaG90b193aWR0aBgHIAEoBVIKcGhvdG9XaWR0aA=='); + 'ChVTdHJlYW1CdXNWaWRlb1JlcXVlc3QSFQoGYnVzX2lkGAEgASgJUgVidXNJZBIdCgpudXJzZX' + 'J5X2lkGAIgASgJUgludXJzZXJ5SWQSNgoIYnVzX3R5cGUYAyABKA4yGy53aGVyZV9jaGlsZF9i' + 'dXMudjEuQnVzVHlwZVIHYnVzVHlwZRJFCg12ZWhpY2xlX2V2ZW50GAQgASgOMiAud2hlcmVfY2' + 'hpbGRfYnVzLnYxLlZlaGljbGVFdmVudFIMdmVoaWNsZUV2ZW50Eh8KC3ZpZGVvX2NodW5rGAUg' + 'AygMUgp2aWRlb0NodW5rEiEKDHBob3RvX2hlaWdodBgGIAEoBVILcGhvdG9IZWlnaHQSHwoLcG' + 'hvdG9fd2lkdGgYByABKAVSCnBob3RvV2lkdGg='); @$core.Deprecated('Use streamBusVideoResponseDescriptor instead') const StreamBusVideoResponse$json = { diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index 92877766..ef13eef7 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -7,64 +7,55 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from generated.where_child_bus.v1 import ( - resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2, -) +from generated.where_child_bus.v1 import resources_pb2 as where__child__bus_dot_v1_dot_resources__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto"h\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"\xa5\x01\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude" \n\x1eSendLocationContinuousResponse"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId"\x95\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12&\n\x0fnext_station_id\x18\x04 \x01(\tR\rnextStationId"\x92\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren"\xb7\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1a\n\x08latitude\x18\x04 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x05 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x06 \x01(\x08R\x15\x65nableFaceRecognition\x12&\n\x0fnext_station_id\x18\t \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\n \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\x9b\x07\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3' -) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"h\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xa5\x01\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x95\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12&\n\x0fnext_station_id\x18\x04 \x01(\tR\rnextStationId\"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xb7\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1a\n\x08latitude\x18\x04 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x05 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x06 \x01(\x08R\x15\x65nableFaceRecognition\x12&\n\x0fnext_station_id\x18\t \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\n \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\x9b\x07\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages( - DESCRIPTOR, "where_child_bus.v1.bus_pb2", _globals -) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'where_child_bus.v1.bus_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals["DESCRIPTOR"]._serialized_options = ( - b"\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1" - ) - _globals["_CREATEBUSREQUEST"]._serialized_start = 122 - _globals["_CREATEBUSREQUEST"]._serialized_end = 226 - _globals["_CREATEBUSRESPONSE"]._serialized_start = 228 - _globals["_CREATEBUSRESPONSE"]._serialized_end = 290 - _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_start = 292 - _globals["_GETBUSLISTBYNURSERYIDREQUEST"]._serialized_end = 353 - _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_start = 355 - _globals["_GETBUSLISTBYNURSERYIDRESPONSE"]._serialized_end = 433 - _globals["_GETRUNNINGBUSBYGUARDIANIDREQUEST"]._serialized_start = 435 - _globals["_GETRUNNINGBUSBYGUARDIANIDREQUEST"]._serialized_end = 502 - _globals["_GETRUNNINGBUSBYGUARDIANIDRESPONSE"]._serialized_start = 504 - _globals["_GETRUNNINGBUSBYGUARDIANIDRESPONSE"]._serialized_end = 582 - _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_start = 585 - _globals["_CHANGEBUSSTATUSREQUEST"]._serialized_end = 750 - _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_start = 752 - _globals["_CHANGEBUSSTATUSRESPONSE"]._serialized_end = 820 - _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_start = 822 - _globals["_SENDLOCATIONCONTINUOUSREQUEST"]._serialized_end = 934 - _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_start = 936 - _globals["_SENDLOCATIONCONTINUOUSRESPONSE"]._serialized_end = 968 - _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_start = 970 - _globals["_TRACKBUSCONTINUOUSREQUEST"]._serialized_end = 1020 - _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_start = 1023 - _globals["_TRACKBUSCONTINUOUSRESPONSE"]._serialized_end = 1172 - _globals["_STREAMBUSVIDEOREQUEST"]._serialized_start = 1175 - _globals["_STREAMBUSVIDEOREQUEST"]._serialized_end = 1449 - _globals["_STREAMBUSVIDEORESPONSE"]._serialized_start = 1451 - _globals["_STREAMBUSVIDEORESPONSE"]._serialized_end = 1563 - _globals["_UPDATEBUSREQUEST"]._serialized_start = 1566 - _globals["_UPDATEBUSREQUEST"]._serialized_end = 1877 - _globals["_UPDATEBUSRESPONSE"]._serialized_start = 1879 - _globals["_UPDATEBUSRESPONSE"]._serialized_end = 1941 - _globals["_BUSSERVICE"]._serialized_start = 1944 - _globals["_BUSSERVICE"]._serialized_end = 2867 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\026com.where_child_bus.v1B\010BusProtoP\001Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\242\002\003WXX\252\002\020WhereChildBus.V1\312\002\020WhereChildBus\\V1\342\002\034WhereChildBus\\V1\\GPBMetadata\352\002\021WhereChildBus::V1' + _globals['_CREATEBUSREQUEST']._serialized_start=122 + _globals['_CREATEBUSREQUEST']._serialized_end=226 + _globals['_CREATEBUSRESPONSE']._serialized_start=228 + _globals['_CREATEBUSRESPONSE']._serialized_end=290 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_start=292 + _globals['_GETBUSLISTBYNURSERYIDREQUEST']._serialized_end=353 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_start=355 + _globals['_GETBUSLISTBYNURSERYIDRESPONSE']._serialized_end=433 + _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_start=435 + _globals['_GETRUNNINGBUSBYGUARDIANIDREQUEST']._serialized_end=502 + _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_start=504 + _globals['_GETRUNNINGBUSBYGUARDIANIDRESPONSE']._serialized_end=582 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_start=585 + _globals['_CHANGEBUSSTATUSREQUEST']._serialized_end=750 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_start=752 + _globals['_CHANGEBUSSTATUSRESPONSE']._serialized_end=820 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_start=822 + _globals['_SENDLOCATIONCONTINUOUSREQUEST']._serialized_end=934 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_start=936 + _globals['_SENDLOCATIONCONTINUOUSRESPONSE']._serialized_end=968 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_start=970 + _globals['_TRACKBUSCONTINUOUSREQUEST']._serialized_end=1020 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_start=1023 + _globals['_TRACKBUSCONTINUOUSRESPONSE']._serialized_end=1172 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_start=1175 + _globals['_STREAMBUSVIDEOREQUEST']._serialized_end=1480 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_start=1482 + _globals['_STREAMBUSVIDEORESPONSE']._serialized_end=1594 + _globals['_UPDATEBUSREQUEST']._serialized_start=1597 + _globals['_UPDATEBUSREQUEST']._serialized_end=1908 + _globals['_UPDATEBUSRESPONSE']._serialized_start=1910 + _globals['_UPDATEBUSRESPONSE']._serialized_end=1972 + _globals['_BUSSERVICE']._serialized_start=1975 + _globals['_BUSSERVICE']._serialized_end=2898 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi index d54ebec6..8d9faf7f 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.pyi @@ -96,20 +96,22 @@ class TrackBusContinuousResponse(_message.Message): def __init__(self, bus_id: _Optional[str] = ..., latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., next_station_id: _Optional[str] = ...) -> None: ... class StreamBusVideoRequest(_message.Message): - __slots__ = ("bus_id", "bus_type", "vehicle_event", "video_chunk", "photo_height", "photo_width") + __slots__ = ("bus_id", "nursery_id", "bus_type", "vehicle_event", "video_chunk", "photo_height", "photo_width") BUS_ID_FIELD_NUMBER: _ClassVar[int] + NURSERY_ID_FIELD_NUMBER: _ClassVar[int] BUS_TYPE_FIELD_NUMBER: _ClassVar[int] VEHICLE_EVENT_FIELD_NUMBER: _ClassVar[int] VIDEO_CHUNK_FIELD_NUMBER: _ClassVar[int] PHOTO_HEIGHT_FIELD_NUMBER: _ClassVar[int] PHOTO_WIDTH_FIELD_NUMBER: _ClassVar[int] bus_id: str + nursery_id: str bus_type: _resources_pb2.BusType vehicle_event: _resources_pb2.VehicleEvent video_chunk: _containers.RepeatedScalarFieldContainer[bytes] photo_height: int photo_width: int - def __init__(self, bus_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[_Iterable[bytes]] = ..., photo_height: _Optional[int] = ..., photo_width: _Optional[int] = ...) -> None: ... + def __init__(self, bus_id: _Optional[str] = ..., nursery_id: _Optional[str] = ..., bus_type: _Optional[_Union[_resources_pb2.BusType, str]] = ..., vehicle_event: _Optional[_Union[_resources_pb2.VehicleEvent, str]] = ..., video_chunk: _Optional[_Iterable[bytes]] = ..., photo_height: _Optional[int] = ..., photo_width: _Optional[int] = ...) -> None: ... class StreamBusVideoResponse(_message.Message): __slots__ = ("is_detected", "children") diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index ababf574..b9abe897 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -77,6 +77,7 @@ message TrackBusContinuousResponse { message StreamBusVideoRequest { string bus_id = 1; + string nursery_id = 2; BusType bus_type = 3; VehicleEvent vehicle_event = 4; repeated bytes video_chunk = 5; // Chunk of video data From eb5b561ef1f86453725b998e32d85994037eb36d Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 17:51:20 +0900 Subject: [PATCH 694/771] =?UTF-8?q?chore:=20=E3=82=A2=E3=83=97=E3=83=AA?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E3=82=92=E3=80=8C=E3=81=BB?= =?UTF-8?q?=E3=81=84=E3=81=8F=E3=82=8B=E3=83=BC=E3=81=9A=E3=80=8D=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/lib/main.dart | 2 +- .../where_child_bus_guardian/lib/pages/auth_page/auth_page.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/main.dart b/frontend/where_child_bus_guardian/lib/main.dart index b597a448..978a9307 100644 --- a/frontend/where_child_bus_guardian/lib/main.dart +++ b/frontend/where_child_bus_guardian/lib/main.dart @@ -34,7 +34,7 @@ class _MyAppState extends State { @override Widget build(BuildContext context) { return MaterialApp( - title: 'WhereChildBus Guardian', + title: 'hoicruise guardian', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), textTheme: GoogleFonts.hachiMaruPopTextTheme( diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index 0d3d2416..c64256a4 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -85,7 +85,7 @@ class _AuthPageState extends State { Widget titleText() => const Padding( padding: EdgeInsets.only(bottom: 32), - child: Text('WhereChildBus', + child: Text('ほいくるーず', style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold)), ); From 0deae55389dc9f8a304472bc876fa429252b2f36 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 17:52:22 +0900 Subject: [PATCH 695/771] =?UTF-8?q?chore:=20=E3=82=A2=E3=83=97=E3=83=AA?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E3=82=92=E3=80=8C=E3=81=BB?= =?UTF-8?q?=E3=81=84=E3=81=8F=E3=82=8B=E3=83=BC=E3=81=9A=E3=80=8D=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/main.dart | 2 +- frontend/where_child_bus/lib/pages/auth_page/auth_page.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index 9db8a646..5ca4a209 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -34,7 +34,7 @@ class _MyAppState extends State { @override Widget build(BuildContext context) { return MaterialApp( - title: 'WhereChildBus', + title: 'hoicruise', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index 2b36677a..ddb0b381 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -65,7 +65,7 @@ class _AuthPageState extends State { return const Padding( padding: EdgeInsets.only(bottom: 32), child: Text( - 'WhereChildBus', + 'ほいくるーず', style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold), ), ); From 7db6b593ae79299998fca0ee5c2c6d8dd898c3f7 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 17:57:27 +0900 Subject: [PATCH 696/771] =?UTF-8?q?chore:=20=E3=82=A2=E3=83=97=E3=83=AA?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E3=82=92=E3=80=8C=E3=81=BB?= =?UTF-8?q?=E3=81=84=E3=81=8F=E3=82=8B=E3=83=BC=E3=81=9A=E3=80=8D=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/main.dart b/frontend/where_child_bus/lib/main.dart index dd3b29bb..5ca4a209 100644 --- a/frontend/where_child_bus/lib/main.dart +++ b/frontend/where_child_bus/lib/main.dart @@ -34,7 +34,7 @@ class _MyAppState extends State { @override Widget build(BuildContext context) { return MaterialApp( - title: 'ほいくるーず', + title: 'hoicruise', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, From 9409cec5c5170720b303ad1faadbde51c4b4fb44 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 18:12:42 +0900 Subject: [PATCH 697/771] =?UTF-8?q?feat:NextStation=E3=83=9C=E3=82=BF?= =?UTF-8?q?=E3=83=B3=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 43 +++++++--- .../widgets/next_station_button.dart | 79 +++++++++++++++++++ .../where_child_bus/lib/util/api/bus.dart | 34 +++++++- .../lib/util/api/busRoute.dart | 76 ++++++++++++++++++ 4 files changed, 219 insertions(+), 13 deletions(-) create mode 100644 frontend/where_child_bus/lib/pages/camera_page/widgets/next_station_button.dart create mode 100644 frontend/where_child_bus/lib/util/api/busRoute.dart diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index e8814adc..46b98760 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -12,11 +12,13 @@ import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart import "package:where_child_bus/main.dart" as where_child_bus; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; +import 'widgets/next_station_button.dart'; + class CameraPage extends StatefulWidget { - final Bus bus; + Bus bus; final BusType busType; - const CameraPage({Key? key, required this.bus, required this.busType}) + CameraPage({Key? key, required this.bus, required this.busType}) : super(key: key); @override @@ -152,6 +154,13 @@ class _CameraPageState extends State { AudioManager(audioFiles: audioFiles).playSequentially(); } + void _onNextButtonPressed(Bus bus) { + developer.log("Next button pressed", name: "CameraPage"); + setState(() { + widget.bus = bus; + }); + } + @override void dispose() { _controller.dispose(); @@ -182,16 +191,26 @@ class _CameraPageState extends State { ), Positioned( right: 15, - child: RidingToggle( - onToggled: (event) => { - setState(() { - if (event) { - _vehicleEvent = VehicleEvent.VEHICLE_EVENT_GET_ON; - } else { - _vehicleEvent = VehicleEvent.VEHICLE_EVENT_GET_OFF; - } - }), - })), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + NextStationButton( + bus: widget.bus, + busType: widget.busType, + onPressed: _onNextButtonPressed), + RidingToggle( + onToggled: (event) => { + setState(() { + if (event) { + _vehicleEvent = VehicleEvent.VEHICLE_EVENT_GET_ON; + } else { + _vehicleEvent = + VehicleEvent.VEHICLE_EVENT_GET_OFF; + } + }), + }), + ], + )), //NOTE: テスト用 // ElevatedButton( // onPressed: AudioManager(audioFiles: ["sounds/water_bottle.wav"]) diff --git a/frontend/where_child_bus/lib/pages/camera_page/widgets/next_station_button.dart b/frontend/where_child_bus/lib/pages/camera_page/widgets/next_station_button.dart new file mode 100644 index 00000000..da65e70c --- /dev/null +++ b/frontend/where_child_bus/lib/pages/camera_page/widgets/next_station_button.dart @@ -0,0 +1,79 @@ +import "dart:developer" as developer; +import 'dart:async'; +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:where_child_bus/util/api/bus.dart'; +import 'package:where_child_bus/util/api/busRoute.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +class NextStationButton extends StatefulWidget { + Bus bus; + BusType busType; + Function(Bus) onPressed; + + NextStationButton( + {Key? key, + required this.bus, + required this.busType, + required this.onPressed}) + : super(key: key); + + @override + State createState() => _NextStationButtonState(); +} + +class _NextStationButtonState extends State { + BusRoute? _busRoute; + bool _isLoading = false; + + Future _fetchMorningBusRoute() async { + _isLoading = true; + try { + final res = await getBusRouteByBusId(widget.bus.id, widget.busType); + setState(() { + _busRoute = res.busRoute; + _isLoading = false; + }); + } catch (error) { + developer.log("Caught Error By NextStationButton:", + error: error, name: "NextStationButton"); + } + } + + Future _updateNextStation() async { + _isLoading = true; + var nextStationIndex = _busRoute!.orderedStations + .indexWhere((station) => station.id == widget.bus.nextStationId) + + 1; + + if (nextStationIndex >= _busRoute!.orderedStations.length) { + return; + } + try { + var res = await updateNextStation( + widget.bus.id, _busRoute!.orderedStations[nextStationIndex].id); + widget.onPressed(res.bus); + _isLoading = false; + } catch (error) { + developer.log("Caught Error By NextStationButton:", + error: error, name: "NextStationButton"); + } + } + + @override + void initState() { + super.initState(); + _fetchMorningBusRoute(); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8), + child: ElevatedButton( + onPressed: () {}, + child: const Text("次の停留所へ"), + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index 4db9f110..8e9d492a 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -2,7 +2,10 @@ import "dart:developer" as developer; import "package:flutter/foundation.dart"; import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; +import "package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus_route.pb.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; Future performGrpcCall( @@ -41,7 +44,7 @@ Future createBus( String plateNumber, Iterable morningGuardianIds, Iterable eveningGuardianIds) async { - return performGrpcCall((client) async { + return await performGrpcCall((client) async { var req = CreateBusRequest( nurseryId: nurseryId, name: name, @@ -71,6 +74,35 @@ Future updateBusStatus( }); } +Future updateNextStation( + String busId, + String nextStationId, +) async { + FieldMask updateMask = FieldMask()..paths.add("next_station_id"); + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + final grpcClient = BusServiceClient(channel); + + try { + var req = UpdateBusRequest( + busId: busId, + nextStationId: nextStationId, + updateMask: updateMask, + ); + var res = await grpcClient.updateBus(req); + developer.log("Request: $req"); + developer.log("Response: $res"); + return res; + } catch (error) { + developer.log("Caught Error:", error: error, name: "updateNextStation"); + return Future.error(error); + } finally { + await channel.shutdown(); + } +} + Future streamBusVideo(Stream requestStream) async { final channel = ClientChannel( appConfig.grpcEndpoint, diff --git a/frontend/where_child_bus/lib/util/api/busRoute.dart b/frontend/where_child_bus/lib/util/api/busRoute.dart new file mode 100644 index 00000000..5ed3f61e --- /dev/null +++ b/frontend/where_child_bus/lib/util/api/busRoute.dart @@ -0,0 +1,76 @@ +import 'package:grpc/grpc.dart'; +import 'package:where_child_bus/config/config.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; + +Future createMorningBusRoute( + Bus bus, + String nurseryId, + Iterable morningGuardianIds, + Iterable eveningGuardianIds) async { + try { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + + final grpcClient = BusRouteServiceClient(channel); + + var req = CreateBusRouteRequest( + busId: bus.id, + busType: BusType.BUS_TYPE_MORNING, + nurseryId: nurseryId, + guardianIds: morningGuardianIds, + ); + + var res = await grpcClient.createBusRoute(req); + return res; + } catch (error) { + return Future.error(error); + } +} + +Future createEveningBusRoute( + Bus bus, + String nurseryId, + Iterable morningGuardianIds, + Iterable eveningGuardianIds) async { + try { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + + final grpcClient = BusRouteServiceClient(channel); + + var req = CreateBusRouteRequest( + busId: bus.id, + busType: BusType.BUS_TYPE_EVENING, + nurseryId: nurseryId, + guardianIds: morningGuardianIds, + ); + + var res = await grpcClient.createBusRoute(req); + return res; + } catch (error) { + return Future.error(error); + } +} + +Future getBusRouteByBusId( + String busId, BusType busType) async { + final channel = ClientChannel( + appConfig.grpcEndpoint, + port: appConfig.grpcPort, + ); + + final grpcClient = BusRouteServiceClient(channel); + + var req = GetBusRouteByBusIDRequest( + busId: busId, + busType: busType, + ); + + var res = await grpcClient.getBusRouteByBusID(req); + return res; +} From 0af2d98bb9c0cc9e47f87a7ca56fc6f7e244ee22 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 18:28:56 +0900 Subject: [PATCH 698/771] =?UTF-8?q?feat:nextStation=E3=83=9C=E3=82=BF?= =?UTF-8?q?=E3=83=B3=E3=81=AE=E3=82=B3=E3=83=BC=E3=83=AB=E3=83=90=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../camera_page/camera_bus_select_page.dart | 29 +++++++++------ .../widgets/next_station_button.dart | 37 +++++++++++++------ 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart index 32dc2995..a4663715 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_bus_select_page.dart @@ -29,18 +29,22 @@ class _BusSelectPageState extends State { _selectedBus = NurseryBusData().getBusList().first; return NurseryBusData().getBusList(); } else { - try { - GetBusListByNurseryIdResponse busList = - await getBusList(NurseryData().getNursery().id); - NurseryBusData().setBusListResponse(busList); - _selectedBus = busList.buses[0]; - return NurseryBusData().getBusList(); - } catch (error) { - if (kDebugMode) { - developer.log("バスのロード中にエラーが発生しました", error: error.toString()); - } - throw Exception('バスのロードに失敗しました'); + return _fetchBus(); + } + } + + Future> _fetchBus() async { + try { + GetBusListByNurseryIdResponse busList = + await getBusList(NurseryData().getNursery().id); + NurseryBusData().setBusListResponse(busList); + _selectedBus = busList.buses[0]; + return NurseryBusData().getBusList(); + } catch (error) { + if (kDebugMode) { + developer.log("バスのロード中にエラーが発生しました", error: error.toString()); } + throw Exception('バスのロードに失敗しました'); } } @@ -129,7 +133,7 @@ class _BusSelectPageState extends State { Widget _proceedButton() { return ElevatedButton( - onPressed: () { + onPressed: () async { if (_selectedBus != null) { Navigator.push( context, @@ -140,6 +144,7 @@ class _BusSelectPageState extends State { ), ), ); + await _fetchBus(); } }, child: const Text("カメラ起動"), diff --git a/frontend/where_child_bus/lib/pages/camera_page/widgets/next_station_button.dart b/frontend/where_child_bus/lib/pages/camera_page/widgets/next_station_button.dart index da65e70c..856e92f3 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/widgets/next_station_button.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/widgets/next_station_button.dart @@ -1,14 +1,13 @@ import "dart:developer" as developer; import 'dart:async'; -import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/util/api/bus.dart'; import 'package:where_child_bus/util/api/busRoute.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; class NextStationButton extends StatefulWidget { - Bus bus; - BusType busType; + final Bus bus; + final BusType busType; Function(Bus) onPressed; NextStationButton( @@ -27,13 +26,20 @@ class _NextStationButtonState extends State { bool _isLoading = false; Future _fetchMorningBusRoute() async { - _isLoading = true; - try { - final res = await getBusRouteByBusId(widget.bus.id, widget.busType); + if (mounted) { setState(() { - _busRoute = res.busRoute; - _isLoading = false; + _isLoading = true; }); + } + + try { + final res = await getBusRouteByBusId(widget.bus.id, widget.busType); + if (mounted) { + setState(() { + _busRoute = res.busRoute; + _isLoading = false; + }); + } } catch (error) { developer.log("Caught Error By NextStationButton:", error: error, name: "NextStationButton"); @@ -57,6 +63,9 @@ class _NextStationButtonState extends State { } catch (error) { developer.log("Caught Error By NextStationButton:", error: error, name: "NextStationButton"); + } finally { + if (!mounted) return; + setState(() => _isLoading = false); } } @@ -70,10 +79,14 @@ class _NextStationButtonState extends State { Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(8), - child: ElevatedButton( - onPressed: () {}, - child: const Text("次の停留所へ"), - ), + child: _isLoading + ? const Center( + child: SizedBox( + width: 20, height: 20, child: CircularProgressIndicator())) + : ElevatedButton( + onPressed: _updateNextStation, + child: const Text("次の停留所へ"), + ), ); } } From 687453473e8bf074b878a36c2c5f27134bb2a47f Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Fri, 23 Feb 2024 18:58:52 +0900 Subject: [PATCH 699/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E6=AC=A1=E3=81=AE=E9=A7=85ID=E3=83=95=E3=82=A3=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=83=89=E5=90=8D=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 288f6e2d..5bb0d938 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -276,7 +276,7 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* update.SetLongitude(req.Longitude) case "enable_face_recognition": update.SetEnableFaceRecognition(req.EnableFaceRecognition) - case "next_station": + case "next_station_id": nextStationID, err := uuid.Parse(req.NextStationId) if err != nil { i.logger.Error("failed to parse next station ID", "error", err) From 6034540cd208a7d17a1232a3504b2c22a3343843 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 19:09:10 +0900 Subject: [PATCH 700/771] =?UTF-8?q?feat:station=E3=81=AE=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_list_page/bus_edit_page/bus_edit_page.dart | 3 ++- .../lib/pages/camera_page/camera_page.dart | 5 ++++- .../where_child_bus/lib/service/create_bus.dart | 12 +++++++++--- frontend/where_child_bus/lib/util/api/bus.dart | 13 ++++++------- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index d69a968d..204f1bd8 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -9,6 +9,7 @@ import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; +import 'package:where_child_bus/service/create_bus.dart'; import 'package:where_child_bus/util/api/bus.dart'; import 'package:where_child_bus/util/validation/create_bus_validation.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -87,7 +88,7 @@ class _BusEditPageState extends State { } try { - var res = await createBus( + var res = await createBusService( NurseryData().getNursery().id, _busNameController.text, _busNumberController.text, diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 46b98760..b8f367c2 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -7,6 +7,7 @@ import 'package:grpc/grpc.dart'; import 'package:audioplayers/audioplayers.dart'; import 'package:where_child_bus/components/util/audio_manager.dart'; import 'package:where_child_bus/config/config.dart'; +import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus/pages/camera_page/widgets/riding_toggle.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; import "package:where_child_bus/main.dart" as where_child_bus; @@ -73,7 +74,7 @@ class _CameraPageState extends State { await _playAudio(response); } } catch (error) { - developer.log("Caught Error:", error: error); + developer.log("Caught Error:", error: error, name: "StreamBusVideo"); } finally { await channel.shutdown(); } @@ -117,12 +118,14 @@ class _CameraPageState extends State { } _streamController.add(StreamBusVideoRequest( busId: widget.bus.id, + nurseryId: NurseryData().getNursery().id, busType: widget.busType, vehicleEvent: _vehicleEvent, videoChunk: videoChunks, photoHeight: image.height, photoWidth: image.width, )); + developer.log("width ${image.width}", name: "CameraPage"); developer.log("height ${image.height}", name: "CameraPage"); diff --git a/frontend/where_child_bus/lib/service/create_bus.dart b/frontend/where_child_bus/lib/service/create_bus.dart index 4a941b9b..4d7a38b3 100644 --- a/frontend/where_child_bus/lib/service/create_bus.dart +++ b/frontend/where_child_bus/lib/service/create_bus.dart @@ -1,14 +1,20 @@ import 'package:where_child_bus/util/api/bus.dart'; +import 'package:where_child_bus/util/api/busRoute.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; -Future createBusService( +Future createBusService( String nurseryId, String name, String plateNumber, Iterable morningGuardianIds, Iterable eveningGuardianIds) async { try { - await createBus( - nurseryId, name, plateNumber, morningGuardianIds, eveningGuardianIds); + var res = await createBus(nurseryId, name, plateNumber); + await createMorningBusRoute( + res.bus, nurseryId, morningGuardianIds, eveningGuardianIds); + await createEveningBusRoute( + res.bus, nurseryId, morningGuardianIds, eveningGuardianIds); + return res; } catch (error) { return Future.error(error); } diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index 8e9d492a..734b2267 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -39,11 +39,10 @@ Future getBusListByNurseryId( } Future createBus( - String nurseryId, - String name, - String plateNumber, - Iterable morningGuardianIds, - Iterable eveningGuardianIds) async { + String nurseryId, + String name, + String plateNumber, +) async { return await performGrpcCall((client) async { var req = CreateBusRequest( nurseryId: nurseryId, @@ -92,8 +91,8 @@ Future updateNextStation( updateMask: updateMask, ); var res = await grpcClient.updateBus(req); - developer.log("Request: $req"); - developer.log("Response: $res"); + developer.log("Request: $req", name: "updateNextStation"); + developer.log("Response: $res", name: "updateNextStation"); return res; } catch (error) { developer.log("Caught Error:", error: error, name: "updateNextStation"); From b4458fec91ad86ab772229df8c142db91c2ee98c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 19:31:06 +0900 Subject: [PATCH 701/771] =?UTF-8?q?fix:=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=82=A4=E3=83=B3=E5=BE=8C=E3=81=AB=E3=83=81?= =?UTF-8?q?=E3=83=A3=E3=83=B3=E3=83=8D=E3=83=AB=E3=82=92=E9=96=89=E3=81=98?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/util/api/nursery_login.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/where_child_bus/lib/util/api/nursery_login.dart b/frontend/where_child_bus/lib/util/api/nursery_login.dart index c7d80569..eb1e6c77 100644 --- a/frontend/where_child_bus/lib/util/api/nursery_login.dart +++ b/frontend/where_child_bus/lib/util/api/nursery_login.dart @@ -27,5 +27,7 @@ Future nurseryLogin(String email, String password) async { developer.log("Caught error", error: err); await channel.shutdown(); return Future.error(err); + } finally { + await channel.shutdown(); } } From 58b481c994bea600c4ad2c62bf55c7776d112d1f Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 19:38:07 +0900 Subject: [PATCH 702/771] =?UTF-8?q?fix:=E5=9C=92=E5=85=90=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E7=94=BB=E9=9D=A2=E3=81=AE=E5=88=9D=E6=9C=9F=E5=80=A4?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/utils/input_form_body.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index 63b93236..396b7b9b 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -53,6 +53,10 @@ class _InputFormBodyState extends State { try { await _loadGuardians(); await _loadBuses(); + if (widget.isEdit == false) { + _onGuardianSelected(guardians[0]); + _onSexSelected("男"); + } } catch (error) { developer.log("Caught Error", error: error.toString()); } @@ -317,6 +321,9 @@ class _InputFormBodyState extends State { } Widget submitButton() { - return SubmitButton(onPressed: widget.isEdit ? () {} : _createChild); + return SubmitButton( + onPressed: widget.isEdit + ? () => developer.log("UnImplemented", name: "updateChild") + : _createChild); } } From c6410aa61594012cc1c9fc3beeb342b40a3b2bcc Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 19:50:31 +0900 Subject: [PATCH 703/771] =?UTF-8?q?feat:=E5=9C=92=E5=85=90=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E6=99=82=E3=81=AB=E3=83=AD=E3=83=BC=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E3=82=A4=E3=83=B3=E3=82=B8=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E3=83=BC=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/utils/input_form_body.dart | 48 +++++++++++++------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index 396b7b9b..ebc80200 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -31,6 +31,7 @@ class _InputFormBodyState extends State { final TextEditingController _nameController = TextEditingController(); final TextEditingController _ageController = TextEditingController(); late Future _loadDataFuture; // 非同期処理の結果を保持する変数 + bool _isCreatingChild = false; List guardians = []; List buses = []; List? images; @@ -123,16 +124,31 @@ class _InputFormBodyState extends State { return; } - var photos = images!.map((file) => file.readAsBytesSync()).toList(); - var res = await createChild( - NurseryData().getNursery().id, - selectedGuardian!.id, - _nameController.text, - int.parse(_ageController.text), - selectedSex!, - photos); - developer.log("園児情報の登録が完了しました。$res"); - Navigator.pop(context); + try { + if (mounted) { + setState(() { + _isCreatingChild = true; + }); + } + var photos = images!.map((file) => file.readAsBytesSync()).toList(); + var res = await createChild( + NurseryData().getNursery().id, + selectedGuardian!.id, + _nameController.text, + int.parse(_ageController.text), + selectedSex!, + photos); + developer.log("園児情報の登録が完了しました。$res"); + Navigator.pop(context); + } catch (error) { + developer.log("Caught Error", error: error.toString()); + } finally { + if (mounted) { + setState(() { + _isCreatingChild = false; + }); + } + } } Future _getImageFromGallery() async { @@ -321,9 +337,13 @@ class _InputFormBodyState extends State { } Widget submitButton() { - return SubmitButton( - onPressed: widget.isEdit - ? () => developer.log("UnImplemented", name: "updateChild") - : _createChild); + return _isCreatingChild + ? const Center( + child: CircularProgressIndicator(), + ) + : SubmitButton( + onPressed: widget.isEdit + ? () => developer.log("UnImplemented", name: "updateChild") + : _createChild); } } From 4c181f86043e3834a243ce02efacd8dbc3977886 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 20:10:41 +0900 Subject: [PATCH 704/771] =?UTF-8?q?fix:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E3=81=8C=E9=81=B8=E6=8A=9E=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=AA=E3=81=8F=E3=81=A6=E3=82=82=E3=80=81=E3=83=90=E3=82=B9?= =?UTF-8?q?=E3=82=92=E4=BD=9C=E6=88=90=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E3=83=90=E3=83=AA=E3=83=87=E3=83=BC=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_list_page/bus_edit_page/bus_edit_page.dart | 13 +++++++------ frontend/where_child_bus/lib/util/api/bus.dart | 2 -- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 204f1bd8..ee1abaec 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -62,12 +62,13 @@ class _BusEditPageState extends State { _createBusError = CreateBusError.fieldsNotFilled; }); return true; - } else if (CreateBusValidator.validateGuardians( - morningSelectedGuardiansId, eveningSelectedGuardiansId)) { - setState(() { - _createBusError = CreateBusError.noGuardiansSelected; - }); - return true; + //Note 今のところ保護者が選択されていなくても作成できる + // } else if (CreateBusValidator.validateGuardians( + // morningSelectedGuardiansId, eveningSelectedGuardiansId)) { + // setState(() { + // _createBusError = CreateBusError.noGuardiansSelected; + // }); + // return true; } else if (CreateBusValidator.validateNameLength(_busNameController.text)) { setState(() { _createBusError = CreateBusError.nameTooLong; diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index 734b2267..82b8a094 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -4,8 +4,6 @@ import "package:grpc/grpc.dart"; import "package:where_child_bus/config/config.dart"; import "package:where_child_bus_api/proto-gen/google/protobuf/field_mask.pb.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart"; -import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus_route.pb.dart"; -import "package:where_child_bus_api/proto-gen/where_child_bus/v1/bus_route.pbgrpc.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; Future performGrpcCall( From 4274f2187f3e73f4bae548c820c2bd68551c84c3 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 20:12:16 +0900 Subject: [PATCH 705/771] =?UTF-8?q?fix:=E3=83=AA=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=81=8C=E7=A9=BA=E3=81=AE=E5=A0=B4=E5=90=88=E3=81=AF=E3=83=AB?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=82=92=E4=BD=9C=E6=88=90=E3=81=97=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E3=82=B5=E3=83=BC=E3=83=93?= =?UTF-8?q?=E3=82=B9=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/service/create_bus.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/where_child_bus/lib/service/create_bus.dart b/frontend/where_child_bus/lib/service/create_bus.dart index 4d7a38b3..3a27f49e 100644 --- a/frontend/where_child_bus/lib/service/create_bus.dart +++ b/frontend/where_child_bus/lib/service/create_bus.dart @@ -10,10 +10,13 @@ Future createBusService( Iterable eveningGuardianIds) async { try { var res = await createBus(nurseryId, name, plateNumber); - await createMorningBusRoute( - res.bus, nurseryId, morningGuardianIds, eveningGuardianIds); - await createEveningBusRoute( - res.bus, nurseryId, morningGuardianIds, eveningGuardianIds); + if (morningGuardianIds.isNotEmpty) { + await createMorningBusRoute( + res.bus, nurseryId, morningGuardianIds, eveningGuardianIds); + } else if (eveningGuardianIds.isNotEmpty) { + await createEveningBusRoute( + res.bus, nurseryId, morningGuardianIds, eveningGuardianIds); + } return res; } catch (error) { return Future.error(error); From c52f61b18644b7e4497926eaefe0fbbeb72bb371 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 20:17:26 +0900 Subject: [PATCH 706/771] =?UTF-8?q?fix:=20=E3=83=AB=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=AE=E9=96=8B=E5=A7=8B=E7=82=B9=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/google_map_view.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart index d39de056..61ab545d 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/google_map_view.dart @@ -113,8 +113,8 @@ class _GoogleMapView extends State { void _getPolyline(List waypoints) async { try { polylineCoordinates = await GoogleMapAPIManager().getPolylinePoints( - startLat: widget.busLatitude.toString(), - startLng: widget.busLongitude.toString(), + startLat: widget.nurseryLatitude.toString(), + startLng: widget.nurseryLongitude.toString(), endLat: widget.nurseryLatitude.toString(), endLng: widget.nurseryLongitude.toString(), waypoints: waypoints, From cb275ab506140899c5a8097e810be03dc1c213d5 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 20:19:46 +0900 Subject: [PATCH 707/771] =?UTF-8?q?fix:=20=E6=99=82=E9=96=93=E3=81=AE?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E5=80=8B=E6=89=80=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/map_page/components/arrival_time.dart | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index 86b7ef31..a3429055 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -30,8 +30,8 @@ class ArrivalTime extends StatefulWidget { } class _ArrivalTimeState extends State { - String arrivalTimeText = "Loading"; - String arrivalTimeAndCurrentText = "Loading"; + String arrivalTimeText = "Loading..."; + String arrivalTimeAndCurrentText = "Loading..."; Timer? _timer; double nextStationLatitude = 0.0, nextStationLongitude = 0.0; @@ -88,14 +88,19 @@ class _ArrivalTimeState extends State { "到着まで", style: const TextStyle(fontSize: 20), ), - Text("${arrivalTimeText}分", style: const TextStyle(fontSize: 30)) + Text("${arrivalTimeText}分", + style: arrivalTimeText == "Loading..." + ? const TextStyle(fontSize: 20) + : const TextStyle(fontSize: 30)) ], ), Column( children: [ Text("到着予定時刻", style: const TextStyle(fontSize: 20)), Text("${arrivalTimeAndCurrentText}", - style: const TextStyle(fontSize: 30)) + style: arrivalTimeAndCurrentText == "Loading..." + ? const TextStyle(fontSize: 20) + : const TextStyle(fontSize: 30)) ], ), ]); @@ -117,7 +122,7 @@ class _ArrivalTimeState extends State { developer.log("durationInSeconds: $durationInSeconds", name: "ArrivalTime"); - // 成功した取得のみで値を更新 + // 成功した取得のみで値を更新 失敗したときは前回の値を保持したままにする if (durationInSeconds != null) { if (mounted) { setState(() { @@ -129,10 +134,8 @@ class _ArrivalTimeState extends State { }); } } - // durationInSecondsがnullの場合や例外が発生した場合は、値を更新しない } catch (e) { developer.log('到着時間の取得中にエラーが発生しました', error: e, name: "ArrivalTimeError"); - // エラーが発生しても、到着時間のテキストを更新しない } } } From 7d5c1d9a02ea221dbc4e5a3f8fb6fbf3914d879f Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 20:20:33 +0900 Subject: [PATCH 708/771] =?UTF-8?q?chore:=20=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/lib/util/api/child.dart | 2 +- frontend/where_child_bus_guardian/lib/util/api/guardian.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/util/api/child.dart b/frontend/where_child_bus_guardian/lib/util/api/child.dart index 9547e70f..2cc0f6c5 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/child.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/child.dart @@ -14,7 +14,7 @@ Future performGrpcCall( try { final result = await grpcCall(grpcClient); if (kDebugMode) { - developer.log("レスポンス: $result"); + // developer.log("レスポンス: $result"); } return result; } catch (error) { diff --git a/frontend/where_child_bus_guardian/lib/util/api/guardian.dart b/frontend/where_child_bus_guardian/lib/util/api/guardian.dart index b31af115..fac993ad 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/guardian.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/guardian.dart @@ -21,7 +21,7 @@ Future guardianLogin( var res = await grpcClient.guardianLogin(req); if (kDebugMode) { - developer.log("レスポンス $res"); + // developer.log("レスポンス $res"); } await channel.shutdown(); From 83054ca5ccefe9ce8e25cd05ceed272edf505c51 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 20:21:15 +0900 Subject: [PATCH 709/771] =?UTF-8?q?fix:=20waypoint=E3=81=8C=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E3=81=97=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88=E3=81=AE?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=81=AE=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/util/google_map_manager.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart index 3a1c3dd7..809cf010 100644 --- a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart +++ b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart @@ -11,6 +11,7 @@ class GoogleMapAPIManager { static final GoogleMapAPIManager _instance = GoogleMapAPIManager._internal(); final String googleApiKey; Map _lastApiCallTimestamps = {}; + bool isFirstTime = true; GoogleMapAPIManager._internal() : googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); @@ -18,7 +19,6 @@ class GoogleMapAPIManager { factory GoogleMapAPIManager() { return _instance; } - // APIリクエストの頻度を制限するメソッド void _throttleApiCall(String apiName) { if (_lastApiCallTimestamps.containsKey(apiName)) { @@ -52,9 +52,14 @@ class GoogleMapAPIManager { required String endLng, String waypoints = '', }) async { - String url = - 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&waypoints=optimize:true|$waypoints&key=$googleApiKey'; + developer.log( + '${startLat}, ${startLng}, ${endLat}, ${endLng}, ${waypoints}', + name: 'getDirections'); + String url = waypoints == '' + ? 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&key=$googleApiKey' + : 'https://maps.googleapis.com/maps/api/directions/json?origin=$startLat,$startLng&destination=$endLat,$endLng&waypoints=$waypoints&key=$googleApiKey'; final response = await _fetchFromGoogleAPI(url, 'getDirections'); + developer.log('${response.body}', name: "googleMapManager getDirections"); return json.decode(response.body); } From e35c322b69e62d9d225eac6513fd17e3ef250ea2 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 20:22:40 +0900 Subject: [PATCH 710/771] =?UTF-8?q?fix:=20=E5=88=9D=E5=9B=9E=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=89=E6=99=82=E3=81=AB=E6=99=82=E9=96=93=E3=81=8C?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E4=B8=8D?= =?UTF-8?q?=E5=85=B7=E5=90=88=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/map_page/map_page.dart | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 54cd3ab0..70558903 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -5,6 +5,7 @@ import 'package:flutter/material.dart'; import 'package:grpc/grpc.dart'; import 'package:where_child_bus_guardian/components/utils/google_map_view.dart'; import 'package:where_child_bus_guardian/config/config.dart'; +import 'package:where_child_bus_guardian/pages/map_page/components/arrival_time.dart'; import 'package:where_child_bus_guardian/pages/map_page/components/map_page_bottom.dart'; import 'package:where_child_bus_guardian/service/get_running_bus_by_guardian_id.dart'; import 'package:where_child_bus_guardian/service/get_bus_route_by_bus_id.dart'; @@ -47,6 +48,7 @@ class _MapPageState extends State { double nurseryLatitude = 0.0; double nurseryLongitude = 0.0; + bool _isFirstBusLocationUpdate = true; bool _isLoading = false; @override @@ -71,6 +73,9 @@ class _MapPageState extends State { //このタイミングでインスタンスが再生成される busLatitude = response.latitude; busLongitude = response.longitude; + if (_isFirstBusLocationUpdate) { + _isFirstBusLocationUpdate = false; + } developer.log("$busLatitude, $busLongitude", name: "TrackBusContinuous"); }); @@ -91,13 +96,13 @@ class _MapPageState extends State { try { await _loadBusData(); developer.log("バスの読み込み完了", name: "LoadBusData"); - trackBusContinuous(); // ストリームではなく、直接リクエストを送信 await _loadStationsData(); developer.log("停留所の読み込み完了", name: "LoadStationsData"); await _createWayPointsFromStations(); developer.log("経由地の読み込み完了", name: "LoadWaypointData"); await _loadNurseryData(); await _getNurseryCoordinates(); + trackBusContinuous(); // ストリームではなく、直接リクエストを送信 } catch (e) { developer.log('初期化中にエラーが発生しました: $e'); } finally { @@ -212,16 +217,18 @@ class _MapPageState extends State { busLatitude: busLatitude, busLongitude: busLongitude, ), - MapPageBottom( - guardian: guardian, - bus: bus, - stations: busRoutes, - waypoints: waypoints, - nextStationId: nextStationId, - busLatitude: busLatitude, - busLongitude: busLongitude, - nurseryLatitude: nurseryLatitude, - nurseryLongitude: nurseryLongitude), + _isFirstBusLocationUpdate + ? CircularProgressIndicator() + : MapPageBottom( + guardian: guardian, + bus: bus, + stations: busRoutes, + waypoints: waypoints, + nextStationId: nextStationId, + busLatitude: busLatitude, + busLongitude: busLongitude, + nurseryLatitude: nurseryLatitude, + nurseryLongitude: nurseryLongitude), ], ), ); From 2771ad3a871fb58ddf3adad3ad18a238d8b7a71c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 20:22:59 +0900 Subject: [PATCH 711/771] =?UTF-8?q?feat:updateBusService=E3=82=92=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_edit_page/bus_edit_page.dart | 29 ++++++++++++++----- .../lib/service/update_bus.dart | 24 +++++++++++++++ .../where_child_bus/lib/util/api/bus.dart | 16 ++++++++++ 3 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 frontend/where_child_bus/lib/service/update_bus.dart diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index ee1abaec..cc1f1d8a 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -33,6 +33,7 @@ class _BusEditPageState extends State { String? _selectedImagePath; bool _isPickingImage = false; + bool _isCreatingBus = false; CreateBusError? _createBusError; @override @@ -80,7 +81,11 @@ class _BusEditPageState extends State { } Future _updateBus() async { - throw UnimplementedError(); + // throw UnimplementedError(); + + if (validation()) { + return; + } } Future _createBus() async { @@ -89,6 +94,12 @@ class _BusEditPageState extends State { } try { + if (mounted) { + setState(() { + _isCreatingBus = true; + }); + } + var res = await createBusService( NurseryData().getNursery().id, _busNameController.text, @@ -114,12 +125,16 @@ class _BusEditPageState extends State { inputFields(), manageChildrenButton(), _createErrorMessage(), - ConfirmButton( - buttonText: "保存", - onTap: widget.busEditPageType == BusEditPageType.update - ? _updateBus - : _createBus, - ), + _isCreatingBus + ? const Center( + child: CircularProgressIndicator(), + ) + : ConfirmButton( + buttonText: "保存", + onTap: widget.busEditPageType == BusEditPageType.update + ? _updateBus + : _createBus, + ), ], ), ); diff --git a/frontend/where_child_bus/lib/service/update_bus.dart b/frontend/where_child_bus/lib/service/update_bus.dart new file mode 100644 index 00000000..1655d223 --- /dev/null +++ b/frontend/where_child_bus/lib/service/update_bus.dart @@ -0,0 +1,24 @@ +import 'package:where_child_bus/util/api/bus.dart'; +import 'package:where_child_bus/util/api/busRoute.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/bus.pbgrpc.dart'; + +Future updateBusService( + String nurseryId, + String name, + String plateNumber, + Iterable morningGuardianIds, + Iterable eveningGuardianIds) async { + try { + var res = await updateBus(nurseryId, name, plateNumber); + if (morningGuardianIds.isNotEmpty) { + await createMorningBusRoute( + res.bus, nurseryId, morningGuardianIds, eveningGuardianIds); + } else if (eveningGuardianIds.isNotEmpty) { + await createEveningBusRoute( + res.bus, nurseryId, morningGuardianIds, eveningGuardianIds); + } + return res; + } catch (error) { + return Future.error(error); + } +} diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index 82b8a094..9626a2dd 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -51,6 +51,22 @@ Future createBus( }); } +Future updateBus( + String busId, String busName, String plateNumber) async { + return await performGrpcCall((client) async { + var req = UpdateBusRequest( + busId: busId, + name: busName, + plateNumber: plateNumber, + updateMask: FieldMask() + ..paths.add("name") + ..paths.add("plate_number") + ..paths.add("bus_id"), + ); + return client.updateBus(req); + }); +} + Future updateBusStatus( String busId, BusStatus busStatus) async { DateTime now = DateTime.now(); From 9e6213d55e9c7ac14c1f8172d40f84c367cf9fef Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 20:28:03 +0900 Subject: [PATCH 712/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E3=82=A2=E3=83=83=E3=83=97=E3=83=87=E3=83=BC=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_edit_page/bus_edit_page.dart | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index cc1f1d8a..205f80e8 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -10,6 +10,7 @@ import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/bus_child_mana import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/confirm_button.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; import 'package:where_child_bus/service/create_bus.dart'; +import 'package:where_child_bus/service/update_bus.dart'; import 'package:where_child_bus/util/api/bus.dart'; import 'package:where_child_bus/util/validation/create_bus_validation.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -86,6 +87,29 @@ class _BusEditPageState extends State { if (validation()) { return; } + + try { + if (mounted) { + setState(() { + _isCreatingBus = true; + }); + } + + var res = await updateBusService( + NurseryData().getNursery().id, + _busNameController.text, + _busNumberController.text, + morningSelectedGuardiansId, + eveningSelectedGuardiansId, + ); + developer.log("バスの更新に成功しました $res", name: "BusUpdateButton"); + Navigator.pop(context); + } catch (e) { + if (kDebugMode) { + developer.log("バスの更新中にエラーが発生しました", + error: e, name: "BusUpdateButtonError"); + } + } } Future _createBus() async { From fb50dbf38f1184939d141907e7167531b35bc943 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 20:47:19 +0900 Subject: [PATCH 713/771] =?UTF-8?q?feat:=E3=83=90=E3=82=B9=E3=81=AB?= =?UTF-8?q?=E5=AF=BE=E3=81=99=E3=82=8B=E5=AD=90=E4=BE=9B=E4=B8=80=E8=A6=A7?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../element/child_list_element_with_mark.dart | 2 +- .../lib/pages/bus_list_page/bottom_sheet.dart | 4 +- .../bus_passenger_page.dart | 82 ++++++++++++------- .../lib/service/get_child_list_by_bus_id.dart | 12 +++ .../where_child_bus/lib/util/api/child.dart | 7 ++ 5 files changed, 77 insertions(+), 30 deletions(-) create mode 100644 frontend/where_child_bus/lib/service/get_child_list_by_bus_id.dart diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart index f9398878..52ef7bfc 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart @@ -17,7 +17,7 @@ class ChildListElementWithMark extends StatefulWidget { }) : super(key: key); @override - _ChildListElementWithMarkState createState() => + State createState() => _ChildListElementWithMarkState(); } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart index f2f2d6a0..97f00e84 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bottom_sheet.dart @@ -97,7 +97,9 @@ class _BottomSheetWidgetState extends State { moveToBusPassengerPage(BuildContext context) { Navigator.push( - context, MaterialPageRoute(builder: (context) => BusPassengerPage())); + context, + MaterialPageRoute( + builder: (context) => BusPassengerPage(bus: widget.bus))); } Widget editButton(BuildContext context) { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart index accfa6fe..ef3a1645 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart @@ -1,35 +1,56 @@ +import "dart:developer" as developer; import "package:flutter/material.dart"; +import "package:where_child_bus/components/child_list/child_list_with_mark.dart"; +import "package:where_child_bus/service/get_child_list_by_bus_id.dart"; +import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; class BusPassengerPage extends StatefulWidget { - final List name = [ - "園児1", - "園児2", - "園児3", - "園児4", - "園児5", - ]; - final List group = [ - "1組", - "2組", - "3組", - "4組", - "5組", - ]; - final List image = [ - "1", - "2", - "1", - "1", - "2", - ]; - - BusPassengerPage({super.key}); + final Bus bus; + + const BusPassengerPage({super.key, required this.bus}); @override - _BusPassengerPage createState() => _BusPassengerPage(); + State createState() => _BusPassengerPage(); } class _BusPassengerPage extends State { + List _childList = []; + List _images = []; + bool _isLoading = false; + + Future _loadChildren() async { + if (mounted) { + setState(() { + _isLoading = true; + }); + } + + try { + var res = await getChildListByBusIDService(widget.bus.id); + if (mounted) { + setState(() { + _childList = res.children; + _images = res.photos; + _isLoading = false; + }); + } + } catch (e) { + developer.log("園児のロード中にエラーが発生しました: $e", name: "LoadChildren"); + } finally { + if (mounted) { + setState(() { + _isLoading = false; + }); + } + } + } + + @override + void initState() { + super.initState(); + _loadChildren(); + } + @override Widget build(BuildContext context) { return Scaffold( @@ -45,9 +66,14 @@ class _BusPassengerPage extends State { } Widget pageBody() { - //TODO:将来的にはChildのリストを渡す - // return ChildListWithMark(childNames: widget.name, groupNames: widget.group, images: widget.image); - - return Container(); + return _isLoading + ? const Center( + child: CircularProgressIndicator(), + ) + : ChildListWithMark( + childNames: _childList.map((child) => child.name).toList(), + groupNames: + _childList.map((child) => child.age.toString()).toList(), + images: _images); } } diff --git a/frontend/where_child_bus/lib/service/get_child_list_by_bus_id.dart b/frontend/where_child_bus/lib/service/get_child_list_by_bus_id.dart new file mode 100644 index 00000000..22c3668a --- /dev/null +++ b/frontend/where_child_bus/lib/service/get_child_list_by_bus_id.dart @@ -0,0 +1,12 @@ +import 'package:where_child_bus/util/api/child.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pbgrpc.dart'; + +Future getChildListByBusIDService( + String busID) async { + try { + var res = await getChildListByBusId(busID); + return res; + } catch (error) { + return Future.error(error); + } +} diff --git a/frontend/where_child_bus/lib/util/api/child.dart b/frontend/where_child_bus/lib/util/api/child.dart index 0db60fc1..f50bf66b 100644 --- a/frontend/where_child_bus/lib/util/api/child.dart +++ b/frontend/where_child_bus/lib/util/api/child.dart @@ -74,3 +74,10 @@ Future updateChild( return client.updateChild(req); }); } + +Future getChildListByBusId(String busId) async { + return performGrpcCall((client) async { + var req = GetChildListByBusIDRequest(busId: busId); + return client.getChildListByBusID(req); + }); +} From 9d8fd077230028ea95c6169bbc11264c2265f4d8 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 20:51:12 +0900 Subject: [PATCH 714/771] =?UTF-8?q?fix:=20=E3=83=95=E3=82=A9=E3=83=88?= =?UTF-8?q?=E3=83=95=E3=83=AC=E3=83=BC=E3=83=A0=E3=81=8C=E8=AA=AD=E3=81=BF?= =?UTF-8?q?=E8=BE=BC=E3=81=BE=E3=82=8C=E3=81=AA=E3=81=84=E8=87=B4=E5=91=BD?= =?UTF-8?q?=E7=9A=84=E3=81=AA=E3=82=A8=E3=83=A9=E3=83=BC=E3=82=92=E8=A7=A3?= =?UTF-8?q?=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/pubspec.lock | 8 ++++++++ frontend/where_child_bus_guardian/pubspec.yaml | 1 + 2 files changed, 9 insertions(+) diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index 7c0ec68e..4c308594 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -312,6 +312,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + intl: + dependency: "direct main" + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" js: dependency: transitive description: diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index 7b2f537a..a3b5cf4c 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -35,4 +35,5 @@ dev_dependencies: flutter: uses-material-design: true assets: + - assets/images/ - .env From 7719dbb7f024abf77e427714dc173d2404635a8b Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 21:05:23 +0900 Subject: [PATCH 715/771] =?UTF-8?q?fix:=20channel=E3=82=92=E9=96=89?= =?UTF-8?q?=E3=81=98=E3=82=8B=E5=A0=B4=E6=89=80=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/lib/util/api/guardian.dart | 3 ++- .../where_child_bus_guardian/lib/util/api/health_check.dart | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/util/api/guardian.dart b/frontend/where_child_bus_guardian/lib/util/api/guardian.dart index fac993ad..e7f504eb 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/guardian.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/guardian.dart @@ -28,8 +28,9 @@ Future guardianLogin( return res; } catch (error) { developer.log("Caught Error", error: error); - await channel.shutdown(); return Future.error(error); + } finally { + await channel.shutdown(); } } diff --git a/frontend/where_child_bus_guardian/lib/util/api/health_check.dart b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart index ba495f49..564d65ba 100644 --- a/frontend/where_child_bus_guardian/lib/util/api/health_check.dart +++ b/frontend/where_child_bus_guardian/lib/util/api/health_check.dart @@ -22,7 +22,8 @@ Future serviceHealthCheck() async { return res; } catch (error) { developer.log('Caught error: $error'); - await channel.shutdown(); return Future.error(error); + } finally { + await channel.shutdown(); } } From f956251e9a6a441056cdabaf867aec5e30e076a5 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 21:07:45 +0900 Subject: [PATCH 716/771] =?UTF-8?q?feat:=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=8B=E3=82=89=E7=99=BB?= =?UTF-8?q?=E9=8C=B2=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=B8=E3=81=AE=E9=81=B7?= =?UTF-8?q?=E7=A7=BB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/auth_page/auth_page.dart | 4 +++ .../auth_page/widget/register_button.dart | 32 +++++++++++++++++++ .../pages/register_page/register_page.dart | 5 ++- frontend/where_child_bus/lib/util/logout.dart | 9 ++++++ 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 frontend/where_child_bus/lib/pages/auth_page/widget/register_button.dart create mode 100644 frontend/where_child_bus/lib/util/logout.dart diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index ddb0b381..f70a4155 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -2,10 +2,13 @@ import 'dart:developer' as developer; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:where_child_bus/app.dart'; +import 'package:where_child_bus/pages/register_page/register_page.dart'; import 'package:where_child_bus/util/api/nursery_login.dart'; import 'package:where_child_bus/models/nursery_data.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/nursery.pb.dart'; +import 'widget/register_button.dart'; + enum NurseryLoginError { unknown, invalidCredentials, @@ -48,6 +51,7 @@ class _AuthPageState extends State { _loginError == NurseryLoginError.invalidCredentials) emailOrPasswordNotFound(), loginButton(), + RegisterButton(context: context), ]; return Center( diff --git a/frontend/where_child_bus/lib/pages/auth_page/widget/register_button.dart b/frontend/where_child_bus/lib/pages/auth_page/widget/register_button.dart new file mode 100644 index 00000000..228a743c --- /dev/null +++ b/frontend/where_child_bus/lib/pages/auth_page/widget/register_button.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/register_page/register_page.dart'; + +class RegisterButton extends StatelessWidget { + const RegisterButton({ + super.key, + required this.context, + }); + + final BuildContext context; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(15), + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + child: ElevatedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const RegisterPage(), + ), + ); + }, + child: const Text('新規登録はこちら'), + ), + ), + ); + } +} diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index f9847a2c..5726e821 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -29,6 +29,9 @@ class _RegisterPageState extends State { return GestureDetector( onTap: () => FocusScope.of(context).unfocus(), child: Scaffold( + appBar: AppBar( + title: const Text('新規登録'), + ), resizeToAvoidBottomInset: true, body: pageBody(), ), @@ -116,7 +119,7 @@ class _RegisterPageState extends State { Widget titleText() => const Padding( padding: EdgeInsets.only(bottom: 32), - child: Text('WhereChildBus', + child: Text('ほいくるーず', style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold)), ); diff --git a/frontend/where_child_bus/lib/util/logout.dart b/frontend/where_child_bus/lib/util/logout.dart new file mode 100644 index 00000000..90fefae0 --- /dev/null +++ b/frontend/where_child_bus/lib/util/logout.dart @@ -0,0 +1,9 @@ +import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/auth_page/auth_page.dart'; + +class Logout { + static void logout(BuildContext context) { + Navigator.pushReplacement( + context, MaterialPageRoute(builder: (context) => const AuthPage())); + } +} From 2dfa77621d5bec0e4f990474257b020ba7ccc8b8 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 21:25:06 +0900 Subject: [PATCH 717/771] =?UTF-8?q?feat:=E4=BD=8D=E7=BD=AE=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=81=AE=E9=80=81=E4=BF=A1=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 9927ce11..8c27e64f 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -182,14 +182,14 @@ class _CameraPageState extends State { )); try { - await _getCurrentLocation(); - // await _getCurrentLocation().then((locationData) { - // _locationStream.add(SendLocationContinuousRequest( - // busId: widget.bus.id, - // latitude: locationData.latitude, - // longitude: locationData.longitude, - // )); - // }); + // await _getCurrentLocation(); + await _getCurrentLocation().then((locationData) { + _locationStream.add(SendLocationContinuousRequest( + busId: widget.bus.id, + latitude: locationData.latitude, + longitude: locationData.longitude, + )); + }); } catch (e) { developer.log("Failed to get current location: $e"); } From c726b6ff5deb515d206d87343cbc85d73450cc7d Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 21:33:16 +0900 Subject: [PATCH 718/771] =?UTF-8?q?feat:AppBar=E3=81=AB=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=82=A2=E3=82=A6=E3=83=88=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/app.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index 76b28426..da6d83f6 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -1,8 +1,10 @@ import 'package:flutter/material.dart'; +import 'package:where_child_bus/pages/auth_page/auth_page.dart'; import 'package:where_child_bus/pages/bus_list_page/bus_list_page.dart'; import 'package:where_child_bus/pages/camera_page/camera_bus_select_page.dart'; import 'package:where_child_bus/pages/notification_page/notification_page.dart'; import 'package:where_child_bus/pages/student_list_page/child_list_page.dart'; +import 'package:where_child_bus/util/logout.dart'; class App extends StatefulWidget { const App({ @@ -21,6 +23,16 @@ class _AppState extends State { return Scaffold( appBar: AppBar( title: Text(['園児一覧', '送迎バスコース一覧', '連絡情報設定', 'カメラ'][_selectedIndex]), + actions: [ + IconButton( + icon: const Icon(Icons.logout), + onPressed: () => { + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => const AuthPage())) + }), + ], ), body: [ const ChildListPage(), From 440d3219d7d6461aea12df0868c10526d57940df Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 21:34:34 +0900 Subject: [PATCH 719/771] =?UTF-8?q?chore:=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/app.dart | 1 - frontend/where_child_bus/lib/util/logout.dart | 9 --------- 2 files changed, 10 deletions(-) delete mode 100644 frontend/where_child_bus/lib/util/logout.dart diff --git a/frontend/where_child_bus/lib/app.dart b/frontend/where_child_bus/lib/app.dart index da6d83f6..adb472d9 100644 --- a/frontend/where_child_bus/lib/app.dart +++ b/frontend/where_child_bus/lib/app.dart @@ -4,7 +4,6 @@ import 'package:where_child_bus/pages/bus_list_page/bus_list_page.dart'; import 'package:where_child_bus/pages/camera_page/camera_bus_select_page.dart'; import 'package:where_child_bus/pages/notification_page/notification_page.dart'; import 'package:where_child_bus/pages/student_list_page/child_list_page.dart'; -import 'package:where_child_bus/util/logout.dart'; class App extends StatefulWidget { const App({ diff --git a/frontend/where_child_bus/lib/util/logout.dart b/frontend/where_child_bus/lib/util/logout.dart deleted file mode 100644 index 90fefae0..00000000 --- a/frontend/where_child_bus/lib/util/logout.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:where_child_bus/pages/auth_page/auth_page.dart'; - -class Logout { - static void logout(BuildContext context) { - Navigator.pushReplacement( - context, MaterialPageRoute(builder: (context) => const AuthPage())); - } -} From b1c7ef1814d06d7fbfdc59ed8313f419ee97d3f2 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 22:14:42 +0900 Subject: [PATCH 720/771] =?UTF-8?q?fix:=20=E3=82=AA=E3=83=BC=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=83=95=E3=83=AD=E3=83=BC=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/utils/current_time_body.dart | 2 +- .../lib/pages/daily_page/components/daily_record_slider.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/components/utils/current_time_body.dart b/frontend/where_child_bus_guardian/lib/components/utils/current_time_body.dart index 496f016b..81f61bf1 100644 --- a/frontend/where_child_bus_guardian/lib/components/utils/current_time_body.dart +++ b/frontend/where_child_bus_guardian/lib/components/utils/current_time_body.dart @@ -5,7 +5,7 @@ class CurrentTimeBody extends StatelessWidget { @override Widget build(BuildContext context) { return SizedBox( - height: MediaQuery.of(context).size.height * 0.15, + height: MediaQuery.of(context).size.height * 0.13, child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart index b7530448..406e0950 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart @@ -32,7 +32,7 @@ class _DailyRecordSlider extends State { return Column( children: [ recordCarouselSlider(recordList), - const SizedBox(height: 10), + SizedBox(height: MediaQuery.of(context).size.height * 0.005), dotIndicator(recordList) ], ); From 9a3807ea2ba17eda4bb7b8115d4cfbe93b4908e0 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 22:28:39 +0900 Subject: [PATCH 721/771] =?UTF-8?q?feat:=20=E8=A1=A8=E6=83=85=E3=82=A2?= =?UTF-8?q?=E3=82=A4=E3=82=B3=E3=83=B3=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../daily_page/components/daily_record_body.dart | 9 +++++++-- .../components/daily_record_slider.dart | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart index 4897edfa..27159c0f 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_body.dart @@ -11,11 +11,15 @@ import '../../styles/styles.dart'; class DailyRecordBody extends StatefulWidget { final Child child; final ChildPhoto image; + final IconData icon; + final Color color; const DailyRecordBody({ Key? key, required this.child, required this.image, + required this.icon, + required this.color, }) : super(key: key); @override @@ -103,12 +107,13 @@ class _DailyRecordBody extends State { //TODO: 将来的に表情を受け取り、アイコンを表示する Widget childExpressionIcon() { - return const SizedBox( + return SizedBox( width: 100, height: 100, child: Icon( - Icons.sentiment_satisfied, + widget.icon, size: 100, + color: widget.color, )); } diff --git a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart index b7530448..e661a2d8 100644 --- a/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart +++ b/frontend/where_child_bus_guardian/lib/pages/daily_page/components/daily_record_slider.dart @@ -3,6 +3,20 @@ import 'package:carousel_slider/carousel_slider.dart'; import 'package:where_child_bus_guardian/pages/daily_page/components/daily_record_body.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; +//TODO:将来的に取得した表情データからアイコンと色を選択する +final List icons = [ + Icons.sentiment_satisfied, + Icons.sentiment_neutral, + Icons.sentiment_dissatisfied, + Icons.sentiment_satisfied, +]; +final List colors = [ + Color.fromARGB(255, 255, 0, 0), + Color.fromARGB(255, 0, 255, 0), + Color.fromARGB(255, 0, 0, 255), + Color.fromARGB(255, 255, 153, 0), +]; + class DailyRecordSlider extends StatefulWidget { final List children; final List images; @@ -26,6 +40,8 @@ class _DailyRecordSlider extends State { return DailyRecordBody( child: child, image: widget.images[index], + icon: icons[index], + color: colors[index], ); }).toList(); From 6427939d05f6968cbbf18bf621f0b1be12568018 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 22:32:59 +0900 Subject: [PATCH 722/771] =?UTF-8?q?chore:=20=E3=83=95=E3=82=A9=E3=83=88?= =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=96=E3=83=A9=E3=83=AA=E3=81=A8=E3=82=AB?= =?UTF-8?q?=E3=83=A1=E3=83=A9=E3=81=AE=E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B9?= =?UTF-8?q?=E6=A8=A9=E9=99=90=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ios/Runner/Info.plist | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/frontend/where_child_bus_guardian/ios/Runner/Info.plist b/frontend/where_child_bus_guardian/ios/Runner/Info.plist index e6ac9a69..da4da2c7 100644 --- a/frontend/where_child_bus_guardian/ios/Runner/Info.plist +++ b/frontend/where_child_bus_guardian/ios/Runner/Info.plist @@ -4,6 +4,14 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + + + NSPhotoLibraryUsageDescription + Photo Library Access Warning + NSCameraUsageDescription + Camera Library Access Warning + + CFBundleDisplayName Where Child Bus Guardian CFBundleExecutable @@ -45,5 +53,13 @@ UIApplicationSupportsIndirectInputEvents + + + NSCameraUsageDescription + カメラを使う理由・用途を記述(ここをちゃんと書かないと、Appleのレビューでリジェクトされます) + NSMicrophoneUsageDescription + マイクを使う理由・用途を記述(ここをちゃんと書かないと、Appleのレビューでリジェクトされます) + + From fa54676dddfc9a363940c03f3204efdf71c0935f Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 22:42:42 +0900 Subject: [PATCH 723/771] =?UTF-8?q?fix:iphone=E3=81=8B=E3=82=89=E9=80=81?= =?UTF-8?q?=E4=BF=A1=E3=81=99=E3=82=8B=E7=94=BB=E5=83=8F=E3=81=AE=E7=B8=A6?= =?UTF-8?q?=E6=A8=AA=E3=82=92=E5=85=A5=E3=82=8C=E6=9B=BF=E3=81=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/pages/camera_page/camera_page.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index b9698a17..2003e191 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -140,8 +140,9 @@ class _CameraPageState extends State { } List _processCameraImage2gray(CameraImage image) { - final int width = image.width; - final int height = image.height; + //Note:実験的に縦横を入れ替えてみる + final int width = image.height; + final int height = image.width; const int bgraPixelStride = 4; // BGRAフォーマットではピクセルあたり4バイト final bgraBytes = image.planes[0].bytes; @@ -185,7 +186,6 @@ class _CameraPageState extends State { photoWidth: image.width, )); - try { // await _getCurrentLocation(); await _getCurrentLocation().then((locationData) { From fe31d463dd97f5c3b4653397b4e9ffad8ed38cf0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 22:57:00 +0900 Subject: [PATCH 724/771] =?UTF-8?q?fix:=E3=83=91=E3=83=BC=E3=83=9F?= =?UTF-8?q?=E3=83=83=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/ios/Runner/AppDelegate.swift | 3 +++ frontend/where_child_bus/ios/Runner/Info.plist | 6 ++++++ .../lib/pages/camera_page/camera_page.dart | 10 ++++++++-- frontend/where_child_bus/pubspec.lock | 8 ++++++++ frontend/where_child_bus/pubspec.yaml | 1 + 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/ios/Runner/AppDelegate.swift b/frontend/where_child_bus/ios/Runner/AppDelegate.swift index 70693e4a..2083a656 100644 --- a/frontend/where_child_bus/ios/Runner/AppDelegate.swift +++ b/frontend/where_child_bus/ios/Runner/AppDelegate.swift @@ -1,5 +1,7 @@ import UIKit import Flutter +import GoogleMaps +import FlutterConfig @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { @@ -7,6 +9,7 @@ import Flutter _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { + GMSServices.provideAPIKey(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } diff --git a/frontend/where_child_bus/ios/Runner/Info.plist b/frontend/where_child_bus/ios/Runner/Info.plist index eda5bf04..af24fcb3 100644 --- a/frontend/where_child_bus/ios/Runner/Info.plist +++ b/frontend/where_child_bus/ios/Runner/Info.plist @@ -60,5 +60,11 @@ マイクを使う理由・用途を記述(ここをちゃんと書かないと、Appleのレビューでリジェクトされます) + + NSLocationWhenInUseUsageDescription + This app needs access to location when open. + NSLocationAlwaysUsageDescription + This app needs access to location when in the background. + diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 2003e191..0530633c 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -44,8 +44,14 @@ class _CameraPageState extends State { } void _initializeCamera() async { - final firstCamera = where_child_bus.cameras.first; - _controller = CameraController(firstCamera, ResolutionPreset.medium); + var camera = where_child_bus.cameras.first; + try { + camera = where_child_bus.cameras[1]; + } catch (e) { + developer.log("Failed to get camera: $e"); + } + + _controller = CameraController(camera, ResolutionPreset.medium); try { await _controller.initialize(); diff --git a/frontend/where_child_bus/pubspec.lock b/frontend/where_child_bus/pubspec.lock index 97aa116f..dcc58ec1 100644 --- a/frontend/where_child_bus/pubspec.lock +++ b/frontend/where_child_bus/pubspec.lock @@ -270,6 +270,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.3.1" + flutter_config: + dependency: "direct main" + description: + name: flutter_config + sha256: a07e6156bb6e776e29c6357be433155acda87d1dab1a3f787a72091a1b71ffbf + url: "https://pub.dev" + source: hosted + version: "2.0.2" flutter_dotenv: dependency: "direct main" description: diff --git a/frontend/where_child_bus/pubspec.yaml b/frontend/where_child_bus/pubspec.yaml index a77f71c5..956e3119 100644 --- a/frontend/where_child_bus/pubspec.yaml +++ b/frontend/where_child_bus/pubspec.yaml @@ -21,6 +21,7 @@ dependencies: collection: ^1.18.0 location: ^5.0.3 audioplayers: ^5.2.1 + flutter_config: ^2.0.2 where_child_bus_api: path: ../where_child_bus_api From 3c0ac6e1974c2169cb0dbb6d4f81ce47c24212e4 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 22:59:04 +0900 Subject: [PATCH 725/771] =?UTF-8?q?fix:=20ios=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=A8=E4=BD=8D=E7=BD=AE=E6=83=85=E5=A0=B1=E3=81=AE=E3=83=91?= =?UTF-8?q?=E3=83=BC=E3=83=9F=E3=83=83=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/ios/Runner/AppDelegate.swift | 3 +++ frontend/where_child_bus_guardian/ios/Runner/Info.plist | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift index 70693e4a..2093c047 100644 --- a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift +++ b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift @@ -1,5 +1,7 @@ import UIKit import Flutter +import GoogleMaps +import flutter_config @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { @@ -7,6 +9,7 @@ import Flutter _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { + GMSServices.provideAPI(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } diff --git a/frontend/where_child_bus_guardian/ios/Runner/Info.plist b/frontend/where_child_bus_guardian/ios/Runner/Info.plist index da4da2c7..b47c57b5 100644 --- a/frontend/where_child_bus_guardian/ios/Runner/Info.plist +++ b/frontend/where_child_bus_guardian/ios/Runner/Info.plist @@ -61,5 +61,13 @@ マイクを使う理由・用途を記述(ここをちゃんと書かないと、Appleのレビューでリジェクトされます) + + NSLocationWhenInUseUsageDescription + This app needs access to location when open. + NSLocationAlwaysUsageDescription + This app needs access to location when in the background. + + + From 0727d6b7aa1161d79d3b59b11d7d81b6d84c0524 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 23:38:15 +0900 Subject: [PATCH 726/771] =?UTF-8?q?fix:=20flutter=5Fconfig=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/pubspec.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/where_child_bus_guardian/pubspec.yaml b/frontend/where_child_bus_guardian/pubspec.yaml index a3b5cf4c..c5e82b42 100644 --- a/frontend/where_child_bus_guardian/pubspec.yaml +++ b/frontend/where_child_bus_guardian/pubspec.yaml @@ -25,6 +25,8 @@ dependencies: where_child_bus_api: path: ../where_child_bus_api google_fonts: ^6.1.0 + flutter_config: ^2.0.2 + dev_dependencies: flutter_test: From 0607305a850af9792addfd8195e86270fe0cdfd8 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 23:41:17 +0900 Subject: [PATCH 727/771] =?UTF-8?q?fix:=E5=AD=90=E4=BE=9B=E3=83=AA?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../child_list/child_list_with_mark.dart | 3 + .../element/child_list_element_with_mark.dart | 25 ++++- .../bus_passenger_page.dart | 93 ++++++++++--------- .../lib/service/check_child_in_bus.dart | 12 +++ .../where_child_bus/lib/util/api/child.dart | 7 ++ 5 files changed, 93 insertions(+), 47 deletions(-) create mode 100644 frontend/where_child_bus/lib/service/check_child_in_bus.dart diff --git a/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart b/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart index 07c9b9e1..fabdf3d3 100644 --- a/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart +++ b/frontend/where_child_bus/lib/components/child_list/child_list_with_mark.dart @@ -4,6 +4,7 @@ import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.da class ChildListWithMark extends StatefulWidget { final List childNames; + final List isInBus; final List groupNames; final List images; final VoidCallback? callback; @@ -12,6 +13,7 @@ class ChildListWithMark extends StatefulWidget { Key? key, required this.childNames, required this.groupNames, + required this.isInBus, required this.images, this.callback, }) : super(key: key); @@ -39,6 +41,7 @@ class _ChildListWithMarkState extends State { title: widget.childNames[index], subtitle: widget.groupNames[index], image: widget.images[index], + isInBus: widget.isInBus[index], onTap: () { widget.callback!(); }); diff --git a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart index 52ef7bfc..44693b5c 100644 --- a/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart +++ b/frontend/where_child_bus/lib/components/child_list/element/child_list_element_with_mark.dart @@ -6,6 +6,7 @@ class ChildListElementWithMark extends StatefulWidget { final String title; final String subtitle; final ChildPhoto image; + final bool isInBus; final VoidCallback? onTap; const ChildListElementWithMark({ @@ -13,6 +14,7 @@ class ChildListElementWithMark extends StatefulWidget { required this.title, required this.subtitle, required this.image, + required this.isInBus, this.onTap, }) : super(key: key); @@ -22,7 +24,6 @@ class ChildListElementWithMark extends StatefulWidget { } class _ChildListElementWithMarkState extends State { - //TODO:将来的にはChildのListを受け取ってマークを動的に変える @override Widget build(BuildContext context) { // ChildListElementを再利用して、actionButtonとしてmarkを渡す @@ -33,7 +34,7 @@ class _ChildListElementWithMarkState extends State { onTap: widget.onTap, actionButton: Padding( padding: const EdgeInsets.only(left: 16), // マークと他の要素との間隔を調整 - child: markRide(), + child: widget.isInBus ? markRide() : markNotRide(), ), ); } @@ -42,7 +43,15 @@ class _ChildListElementWithMarkState extends State { return const SizedBox( width: 100, height: 100, - child: Card(), + child: Card( + child: Center( + child: Icon( + Icons.circle, + size: 50, + color: Colors.green, + ), + ), + ), ); } @@ -50,7 +59,15 @@ class _ChildListElementWithMarkState extends State { return const SizedBox( width: 100, height: 100, - child: Card(), + child: Card( + child: Center( + child: Icon( + Icons.close, + size: 50, + color: Colors.red, + ), + ), + ), ); } } diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart index ef3a1645..19eb2a12 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_passenger_page/bus_passenger_page.dart @@ -1,9 +1,19 @@ import "dart:developer" as developer; import "package:flutter/material.dart"; import "package:where_child_bus/components/child_list/child_list_with_mark.dart"; +import "package:where_child_bus/service/check_child_in_bus.dart"; import "package:where_child_bus/service/get_child_list_by_bus_id.dart"; import "package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart"; +class ChildrenAndPhotos { + final List children; + final List photos; + final List isInBus; + + ChildrenAndPhotos( + {required this.children, required this.photos, required this.isInBus}); +} + class BusPassengerPage extends StatefulWidget { final Bus bus; @@ -14,66 +24,63 @@ class BusPassengerPage extends StatefulWidget { } class _BusPassengerPage extends State { - List _childList = []; - List _images = []; - bool _isLoading = false; - - Future _loadChildren() async { - if (mounted) { - setState(() { - _isLoading = true; - }); - } + late Future _childrenFuture; + Future _loadChildren() async { try { var res = await getChildListByBusIDService(widget.bus.id); - if (mounted) { - setState(() { - _childList = res.children; - _images = res.photos; - _isLoading = false; - }); + List isInBus = []; + List photos = []; + photos = res.photos; + + for (var child in res.children) { + var res = await checkIsChildInBusService(child.id); + isInBus.add(res.isInBus); } + + developer.log("園児のロードが完了しました", name: "LoadChildren"); + return ChildrenAndPhotos( + children: res.children, photos: photos, isInBus: isInBus); } catch (e) { developer.log("園児のロード中にエラーが発生しました: $e", name: "LoadChildren"); - } finally { - if (mounted) { - setState(() { - _isLoading = false; - }); - } + throw Exception('Failed to load children'); } } @override void initState() { super.initState(); - _loadChildren(); + _childrenFuture = _loadChildren(); } @override Widget build(BuildContext context) { return Scaffold( - appBar: pageAppBar(), - body: pageBody(), - ); - } - - AppBar pageAppBar() { - return AppBar( - title: const Text("乗客情報"), + appBar: AppBar( + title: const Text("乗客情報"), + ), + body: FutureBuilder( + future: _childrenFuture, + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + return Center(child: Text('エラーが発生しました: ${snapshot.error}')); + } else if (snapshot.hasData) { + return ChildListWithMark( + childNames: + snapshot.data!.children.map((child) => child.name).toList(), + groupNames: snapshot.data!.children + .map((child) => child.age.toString()) + .toList(), + isInBus: snapshot.data!.isInBus, + images: snapshot.data!.photos, + ); + } else { + return const Text("データがありません"); + } + }, + ), ); } - - Widget pageBody() { - return _isLoading - ? const Center( - child: CircularProgressIndicator(), - ) - : ChildListWithMark( - childNames: _childList.map((child) => child.name).toList(), - groupNames: - _childList.map((child) => child.age.toString()).toList(), - images: _images); - } } diff --git a/frontend/where_child_bus/lib/service/check_child_in_bus.dart b/frontend/where_child_bus/lib/service/check_child_in_bus.dart new file mode 100644 index 00000000..917105fd --- /dev/null +++ b/frontend/where_child_bus/lib/service/check_child_in_bus.dart @@ -0,0 +1,12 @@ +import 'package:where_child_bus/util/api/child.dart'; +import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/child.pb.dart'; + +Future checkIsChildInBusService( + String childId) async { + try { + var res = await checkIsChildInBus(childId); + return res; + } catch (error) { + return Future.error(error); + } +} diff --git a/frontend/where_child_bus/lib/util/api/child.dart b/frontend/where_child_bus/lib/util/api/child.dart index f50bf66b..c2b37a16 100644 --- a/frontend/where_child_bus/lib/util/api/child.dart +++ b/frontend/where_child_bus/lib/util/api/child.dart @@ -81,3 +81,10 @@ Future getChildListByBusId(String busId) async { return client.getChildListByBusID(req); }); } + +Future checkIsChildInBus(String childId) async { + return performGrpcCall((client) async { + var req = CheckIsChildInBusRequest(childId: childId); + return client.checkIsChildInBus(req); + }); +} From 65d35c73439d23894220cce907846cfee62a411c Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 23:46:42 +0900 Subject: [PATCH 728/771] =?UTF-8?q?chore:=20GMSPlacesClient=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift index 2093c047..f13e267b 100644 --- a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift +++ b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift @@ -9,6 +9,7 @@ import flutter_config _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { + GMSPlacesClient.provideAPI(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) GMSServices.provideAPI(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) From 18b9eae2f51beabe732b9c9460691bc2eca38e6b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Fri, 23 Feb 2024 23:47:03 +0900 Subject: [PATCH 729/771] =?UTF-8?q?fix:=E3=83=91=E3=83=BC=E3=83=9F?= =?UTF-8?q?=E3=83=83=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/ios/Runner/AppDelegate.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/where_child_bus/ios/Runner/AppDelegate.swift b/frontend/where_child_bus/ios/Runner/AppDelegate.swift index 2083a656..31fef806 100644 --- a/frontend/where_child_bus/ios/Runner/AppDelegate.swift +++ b/frontend/where_child_bus/ios/Runner/AppDelegate.swift @@ -1,6 +1,7 @@ import UIKit import Flutter import GoogleMaps +import GooglePlaces import FlutterConfig @UIApplicationMain @@ -10,6 +11,8 @@ import FlutterConfig didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GMSServices.provideAPIKey(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) + GMSPlacesClient.provideAPIKey(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) + GMSServices.setMetalRendererEnabled(true) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } From 74ed9445cd7cf4eb07caba438198e65e8374a747 Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 23:49:10 +0900 Subject: [PATCH 730/771] =?UTF-8?q?chore:GooglePlaces=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift index f13e267b..a672621d 100644 --- a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift +++ b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift @@ -1,6 +1,7 @@ import UIKit import Flutter import GoogleMaps +import GooglePlaces import flutter_config @UIApplicationMain From de7bdc8b0bad25becd131db28f87e89feb45275a Mon Sep 17 00:00:00 2001 From: koto623 Date: Fri, 23 Feb 2024 23:52:31 +0900 Subject: [PATCH 731/771] =?UTF-8?q?chore:=20typo=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/ios/Runner/AppDelegate.swift | 6 +++--- frontend/where_child_bus_guardian/pubspec.lock | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift index a672621d..f0750866 100644 --- a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift +++ b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Flutter import GoogleMaps -import GooglePlaces +// import GooglePlaces import flutter_config @UIApplicationMain @@ -10,8 +10,8 @@ import flutter_config _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { - GMSPlacesClient.provideAPI(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) - GMSServices.provideAPI(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) + // GMSPlacesClient.provideAPIKey(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) + GMSServices.provideAPIKey(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } diff --git a/frontend/where_child_bus_guardian/pubspec.lock b/frontend/where_child_bus_guardian/pubspec.lock index 4c308594..186660c3 100644 --- a/frontend/where_child_bus_guardian/pubspec.lock +++ b/frontend/where_child_bus_guardian/pubspec.lock @@ -134,6 +134,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_config: + dependency: "direct main" + description: + name: flutter_config + sha256: a07e6156bb6e776e29c6357be433155acda87d1dab1a3f787a72091a1b71ffbf + url: "https://pub.dev" + source: hosted + version: "2.0.2" flutter_dotenv: dependency: "direct main" description: From 34c3b950c1931378b55de39f720da9e0f04736c2 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 24 Feb 2024 00:45:44 +0900 Subject: [PATCH 732/771] =?UTF-8?q?chore:=20googleMapsForIos=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/ios/Runner/AppDelegate.swift | 2 +- .../lib/util/google_map_manager.dart | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift index f0750866..ddf68e5b 100644 --- a/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift +++ b/frontend/where_child_bus_guardian/ios/Runner/AppDelegate.swift @@ -11,7 +11,7 @@ import flutter_config didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { // GMSPlacesClient.provideAPIKey(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) - GMSServices.provideAPIKey(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) + GMSServices.provideAPIKey(FlutterConfigPlugin.env(for: "IOS_GOOGLE_MAP_API_KEY")) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } diff --git a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart index 809cf010..50816170 100644 --- a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart +++ b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:http/http.dart' as http; import 'dart:developer' as developer; +import 'dart:io' show Platform; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart'; import 'package:where_child_bus_guardian/pages/map_page/map_page.dart'; @@ -14,7 +15,11 @@ class GoogleMapAPIManager { bool isFirstTime = true; GoogleMapAPIManager._internal() - : googleApiKey = dotenv.get("GOOGLE_MAP_API_KEY"); + : googleApiKey = Platform.isAndroid + ? dotenv.get("ANDROID_GOOGLE_MAP_API_KEY") + : Platform.isIOS + ? dotenv.get("IOS_GOOGLE_MAP_API_KEY") + : ""; factory GoogleMapAPIManager() { return _instance; From 3de612c8bab04d9482b01b4f74d66016f162f25b Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 00:47:34 +0900 Subject: [PATCH 733/771] =?UTF-8?q?fix:AppDelegate=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/ios/Runner/AppDelegate.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/where_child_bus/ios/Runner/AppDelegate.swift b/frontend/where_child_bus/ios/Runner/AppDelegate.swift index 31fef806..31ef9119 100644 --- a/frontend/where_child_bus/ios/Runner/AppDelegate.swift +++ b/frontend/where_child_bus/ios/Runner/AppDelegate.swift @@ -1,7 +1,6 @@ import UIKit import Flutter import GoogleMaps -import GooglePlaces import FlutterConfig @UIApplicationMain @@ -10,8 +9,7 @@ import FlutterConfig _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { - GMSServices.provideAPIKey(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) - GMSPlacesClient.provideAPIKey(FlutterConfigPlugin.env(for: "GOOGLE_MAP_API_KEY")) + GMSServices.provideAPIKey(FlutterConfigPlugin.env(for: "IOS_GOOGLE_MAP_API_KEY")) GMSServices.setMetalRendererEnabled(true) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) From 3e6d4bf1b67017f8df85ca9d431c572ed2eed6b4 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 01:24:31 +0900 Subject: [PATCH 734/771] fix:Typo flutter_config --- frontend/where_child_bus/ios/Runner/AppDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus/ios/Runner/AppDelegate.swift b/frontend/where_child_bus/ios/Runner/AppDelegate.swift index 31ef9119..be3ccfb9 100644 --- a/frontend/where_child_bus/ios/Runner/AppDelegate.swift +++ b/frontend/where_child_bus/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Flutter import GoogleMaps -import FlutterConfig +import flutter_config @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { From 80b95e24adedc38ca08f0a92e56be951da4fe711 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 24 Feb 2024 01:33:27 +0900 Subject: [PATCH 735/771] =?UTF-8?q?fix:=20=E3=82=AA=E3=83=BC=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=83=95=E3=83=AD=E3=83=BC=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map_page/components/arrival_time.dart | 10 +++-- .../map_page/components/map_page_bottom.dart | 29 ++++-------- .../lib/pages/map_page/map_page.dart | 45 +++++++++++++------ 3 files changed, 46 insertions(+), 38 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart index a3429055..53f59d20 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/arrival_time.dart @@ -53,10 +53,12 @@ class _ArrivalTimeState extends State { } Future loadStationCoordinates() async { - setState(() { - nextStationLatitude = getLatitudeForStation(widget.bus.nextStationId); - nextStationLongitude = getLongitudeForStation(widget.bus.nextStationId); - }); + if (mounted) { + setState(() { + nextStationLatitude = getLatitudeForStation(widget.bus.nextStationId); + nextStationLongitude = getLongitudeForStation(widget.bus.nextStationId); + }); + } } double getLatitudeForStation(String stationId) { diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart index fe830633..5b1f7fce 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/components/map_page_bottom.dart @@ -65,27 +65,14 @@ class _MapPageBottomState extends State { @override Widget build(BuildContext context) { - return SizedBox( - width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height * 0.25, - child: Padding( - padding: EdgeInsets.all(MediaQuery.of(context).size.width * 0.1), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - ArrivalTime( - bus: widget.bus, - waypoints: widget.waypoints, - nextStationId: widget.nextStationId, - busLatitude: widget.busLatitude, - busLongitude: widget.busLongitude, - guardianLatitude: guardianStation.latitude, - guardianLongitude: guardianStation.longitude, - ), - ], - ), - ), + return ArrivalTime( + bus: widget.bus, + waypoints: widget.waypoints, + nextStationId: widget.nextStationId, + busLatitude: widget.busLatitude, + busLongitude: widget.busLongitude, + guardianLatitude: guardianStation.latitude, + guardianLongitude: guardianStation.longitude, ); } } diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 70558903..ce23ff8f 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -208,7 +208,7 @@ class _MapPageState extends State { ) : Center( child: Column( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, children: [ GoogleMapView( waypoints: waypoints, @@ -217,20 +217,39 @@ class _MapPageState extends State { busLatitude: busLatitude, busLongitude: busLongitude, ), - _isFirstBusLocationUpdate - ? CircularProgressIndicator() - : MapPageBottom( - guardian: guardian, - bus: bus, - stations: busRoutes, - waypoints: waypoints, - nextStationId: nextStationId, - busLatitude: busLatitude, - busLongitude: busLongitude, - nurseryLatitude: nurseryLatitude, - nurseryLongitude: nurseryLongitude), + pageBottomWrapper(), ], ), ); } + + Widget pageBottomWrapper() { + return SizedBox( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.25, + child: Padding( + padding: EdgeInsets.all(MediaQuery.of(context).size.width * 0.05), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _isFirstBusLocationUpdate + ? const Center( + child: CircularProgressIndicator(), + ) + : MapPageBottom( + guardian: guardian, + bus: bus, + stations: busRoutes, + waypoints: waypoints, + nextStationId: nextStationId, + busLatitude: busLatitude, + busLongitude: busLongitude, + nurseryLatitude: nurseryLatitude, + nurseryLongitude: nurseryLongitude), + ], + ), + ), + ); + } } From 17449613d15e6b54399e2140cb40340764f1980d Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 01:39:16 +0900 Subject: [PATCH 736/771] =?UTF-8?q?fix:IOS=E3=81=AE=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=81=AE=E5=90=91=E3=81=8D=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 0530633c..6719d9bc 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -147,8 +147,8 @@ class _CameraPageState extends State { List _processCameraImage2gray(CameraImage image) { //Note:実験的に縦横を入れ替えてみる - final int width = image.height; - final int height = image.width; + final int width = image.width; + final int height = image.height; const int bgraPixelStride = 4; // BGRAフォーマットではピクセルあたり4バイト final bgraBytes = image.planes[0].bytes; @@ -179,18 +179,27 @@ class _CameraPageState extends State { if (frameCounter % 60 == 0) { if (Platform.isAndroid) { videoChunks.add(image.planes[0].bytes.toList()); + _streamController.add(StreamBusVideoRequest( + busId: widget.bus.id, + nurseryId: NurseryData().getNursery().id, + busType: widget.busType, + vehicleEvent: _vehicleEvent, + videoChunk: videoChunks, + photoHeight: image.height, + photoWidth: image.width, + )); } else if (Platform.isIOS) { videoChunks.add(_processCameraImage2gray(image)); + _streamController.add(StreamBusVideoRequest( + busId: widget.bus.id, + nurseryId: NurseryData().getNursery().id, + busType: widget.busType, + vehicleEvent: _vehicleEvent, + videoChunk: videoChunks, + photoHeight: image.width, + photoWidth: image.height, + )); } - _streamController.add(StreamBusVideoRequest( - busId: widget.bus.id, - nurseryId: NurseryData().getNursery().id, - busType: widget.busType, - vehicleEvent: _vehicleEvent, - videoChunk: videoChunks, - photoHeight: image.height, - photoWidth: image.width, - )); try { // await _getCurrentLocation(); From aa4ff7e538f831e97948ccb6c9117b1efb0cca2c Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 24 Feb 2024 01:45:23 +0900 Subject: [PATCH 737/771] =?UTF-8?q?fix:=20=E3=82=AA=E3=83=BC=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=83=95=E3=83=AD=E3=83=BC=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/lib/pages/map_page/map_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index ce23ff8f..f022d5cd 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -226,7 +226,7 @@ class _MapPageState extends State { Widget pageBottomWrapper() { return SizedBox( width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height * 0.25, + height: MediaQuery.of(context).size.height * 0.2, child: Padding( padding: EdgeInsets.all(MediaQuery.of(context).size.width * 0.05), child: Column( From 59a6131c37dadd53a81cbddc543bb6cf9667b495 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 02:01:52 +0900 Subject: [PATCH 738/771] =?UTF-8?q?fix:IOS=E3=81=AE=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=82=92=E5=B7=A6=E3=81=AB90=E5=BA=A6?= =?UTF-8?q?=E5=9B=9E=E8=BB=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 6719d9bc..eb59e9b9 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -170,6 +170,26 @@ class _CameraPageState extends State { return grayscaleBytes; } + List _rotateImageLeft90Degrees( + CameraImage image, List grayscaleBytes) { + final int width = image.width; + final int height = image.height; + List rotatedGrayscaleBytes = List.filled(width * height, 0); + + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + // 元の画像でのピクセル位置 + int originalIndex = y * width + x; + // 90度回転後の新しいピクセル位置 + int rotatedIndex = (width - 1 - x) * height + y; + // 輝度値を新しい位置にコピー + rotatedGrayscaleBytes[rotatedIndex] = grayscaleBytes[originalIndex]; + } + } + + return rotatedGrayscaleBytes; + } + void _startImageStream() async { List> videoChunks = []; if (!_controller.value.isStreamingImages) { @@ -189,7 +209,8 @@ class _CameraPageState extends State { photoWidth: image.width, )); } else if (Platform.isIOS) { - videoChunks.add(_processCameraImage2gray(image)); + videoChunks.add(_rotateImageLeft90Degrees( + image, _processCameraImage2gray(image))); _streamController.add(StreamBusVideoRequest( busId: widget.bus.id, nurseryId: NurseryData().getNursery().id, From 3bc8901f3248d5d3a64a40b17167ca81f1038f4d Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 02:03:17 +0900 Subject: [PATCH 739/771] =?UTF-8?q?fix:=E7=B8=A6=E6=A8=AA=E6=AF=94?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 28 +++++++------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index eb59e9b9..139a7e29 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -199,29 +199,21 @@ class _CameraPageState extends State { if (frameCounter % 60 == 0) { if (Platform.isAndroid) { videoChunks.add(image.planes[0].bytes.toList()); - _streamController.add(StreamBusVideoRequest( - busId: widget.bus.id, - nurseryId: NurseryData().getNursery().id, - busType: widget.busType, - vehicleEvent: _vehicleEvent, - videoChunk: videoChunks, - photoHeight: image.height, - photoWidth: image.width, - )); } else if (Platform.isIOS) { videoChunks.add(_rotateImageLeft90Degrees( image, _processCameraImage2gray(image))); - _streamController.add(StreamBusVideoRequest( - busId: widget.bus.id, - nurseryId: NurseryData().getNursery().id, - busType: widget.busType, - vehicleEvent: _vehicleEvent, - videoChunk: videoChunks, - photoHeight: image.width, - photoWidth: image.height, - )); } + _streamController.add(StreamBusVideoRequest( + busId: widget.bus.id, + nurseryId: NurseryData().getNursery().id, + busType: widget.busType, + vehicleEvent: _vehicleEvent, + videoChunk: videoChunks, + photoHeight: image.height, + photoWidth: image.width, + )); + try { // await _getCurrentLocation(); await _getCurrentLocation().then((locationData) { From 724546d3a00c2599444dcf265a9054dacbcca5c0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 02:11:51 +0900 Subject: [PATCH 740/771] =?UTF-8?q?fix:=E5=9B=9E=E8=BB=A2=E9=96=A2?= =?UTF-8?q?=E6=95=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 139a7e29..21705576 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -171,17 +171,17 @@ class _CameraPageState extends State { } List _rotateImageLeft90Degrees( - CameraImage image, List grayscaleBytes) { - final int width = image.width; - final int height = image.height; + int width, int height, List grayscaleBytes) { List rotatedGrayscaleBytes = List.filled(width * height, 0); - for (int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) { - // 元の画像でのピクセル位置 - int originalIndex = y * width + x; - // 90度回転後の新しいピクセル位置 - int rotatedIndex = (width - 1 - x) * height + y; + for (int originalY = 0; originalY < height; originalY++) { + for (int originalX = 0; originalX < width; originalX++) { + // 元の位置のインデックス + int originalIndex = originalY * width + originalX; + // 回転後の位置のインデックス + int rotatedX = originalY; + int rotatedY = width - originalX - 1; + int rotatedIndex = rotatedY * height + rotatedX; // 輝度値を新しい位置にコピー rotatedGrayscaleBytes[rotatedIndex] = grayscaleBytes[originalIndex]; } @@ -201,7 +201,7 @@ class _CameraPageState extends State { videoChunks.add(image.planes[0].bytes.toList()); } else if (Platform.isIOS) { videoChunks.add(_rotateImageLeft90Degrees( - image, _processCameraImage2gray(image))); + image.width, image.height, _processCameraImage2gray(image))); } _streamController.add(StreamBusVideoRequest( From 89a08a0b96d7a7f5ec040779422c32f7dc756f92 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 02:22:59 +0900 Subject: [PATCH 741/771] =?UTF-8?q?fix:=E5=9B=9E=E8=BB=A2=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=81=8B=E3=82=89=E3=82=B0=E3=83=AC=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E3=82=B1=E3=83=BC=E3=83=AB=E3=82=92=E9=81=A9=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 51 ++++++++++++++----- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 21705576..e1f77512 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -170,24 +170,46 @@ class _CameraPageState extends State { return grayscaleBytes; } - List _rotateImageLeft90Degrees( - int width, int height, List grayscaleBytes) { - List rotatedGrayscaleBytes = List.filled(width * height, 0); + List _rotateRGBAImage90DegreesLeft( + List rgbaBytes, int width, int height) { + int rotatedWidth = height; + int rotatedHeight = width; + List rotatedBytes = List.filled(rotatedWidth * rotatedHeight * 4, 0); for (int originalY = 0; originalY < height; originalY++) { for (int originalX = 0; originalX < width; originalX++) { - // 元の位置のインデックス - int originalIndex = originalY * width + originalX; - // 回転後の位置のインデックス + int originalIndex = (originalY * width + originalX) * 4; int rotatedX = originalY; - int rotatedY = width - originalX - 1; - int rotatedIndex = rotatedY * height + rotatedX; - // 輝度値を新しい位置にコピー - rotatedGrayscaleBytes[rotatedIndex] = grayscaleBytes[originalIndex]; + int rotatedY = width - 1 - originalX; + int rotatedIndex = (rotatedY * rotatedWidth + rotatedX) * 4; + + rotatedBytes[rotatedIndex] = rgbaBytes[originalIndex]; // R + rotatedBytes[rotatedIndex + 1] = rgbaBytes[originalIndex + 1]; // G + rotatedBytes[rotatedIndex + 2] = rgbaBytes[originalIndex + 2]; // B + rotatedBytes[rotatedIndex + 3] = rgbaBytes[originalIndex + 3]; // A } } - return rotatedGrayscaleBytes; + return rotatedBytes; + } + + List _convertRGBAToGrayscale( + List rgbaBytes, int width, int height) { + List grayscaleBytes = List.filled(width * height, 0); + + for (int i = 0; i < rgbaBytes.length; i += 4) { + int r = rgbaBytes[i]; + int g = rgbaBytes[i + 1]; + int b = rgbaBytes[i + 2]; + // アルファチャンネル(rgbaBytes[i + 3])はグレースケール変換には不要なので無視 + + // 輝度値(Y)の計算 + int yValue = (0.299 * r + 0.587 * g + 0.114 * b).round(); + // グレースケール画像の各ピクセルに輝度値を設定 + grayscaleBytes[i ~/ 4] = yValue; + } + + return grayscaleBytes; } void _startImageStream() async { @@ -200,8 +222,11 @@ class _CameraPageState extends State { if (Platform.isAndroid) { videoChunks.add(image.planes[0].bytes.toList()); } else if (Platform.isIOS) { - videoChunks.add(_rotateImageLeft90Degrees( - image.width, image.height, _processCameraImage2gray(image))); + videoChunks.add((_convertRGBAToGrayscale( + _rotateRGBAImage90DegreesLeft( + image.planes[0].bytes.toList(), image.width, image.height), + image.width, + image.height))); } _streamController.add(StreamBusVideoRequest( From f42f1e871ebf9a3160cec9441421add1eea42d5c Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 24 Feb 2024 02:44:06 +0900 Subject: [PATCH 742/771] =?UTF-8?q?fix:IOS=E3=81=8B=E3=82=89=E3=81=AE?= =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=81=AE=E9=80=81=E4=BF=A1=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 79 ++++++++----------- 1 file changed, 33 insertions(+), 46 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index e1f77512..3d887311 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -170,46 +170,28 @@ class _CameraPageState extends State { return grayscaleBytes; } - List _rotateRGBAImage90DegreesLeft( - List rgbaBytes, int width, int height) { + List rotateGrayscaleImageLeft90Degrees( + List grayscaleBytes, int width, int height) { int rotatedWidth = height; int rotatedHeight = width; - List rotatedBytes = List.filled(rotatedWidth * rotatedHeight * 4, 0); + List rotatedGrayscaleBytes = + List.filled(rotatedWidth * rotatedHeight, 0); for (int originalY = 0; originalY < height; originalY++) { for (int originalX = 0; originalX < width; originalX++) { - int originalIndex = (originalY * width + originalX) * 4; + // 元の画像でのピクセルのインデックス + int originalIndex = originalY * width + originalX; + // 回転後のピクセルの位置 int rotatedX = originalY; - int rotatedY = width - 1 - originalX; - int rotatedIndex = (rotatedY * rotatedWidth + rotatedX) * 4; - - rotatedBytes[rotatedIndex] = rgbaBytes[originalIndex]; // R - rotatedBytes[rotatedIndex + 1] = rgbaBytes[originalIndex + 1]; // G - rotatedBytes[rotatedIndex + 2] = rgbaBytes[originalIndex + 2]; // B - rotatedBytes[rotatedIndex + 3] = rgbaBytes[originalIndex + 3]; // A + int rotatedY = width - originalX - 1; + // 回転後のピクセルのインデックス + int rotatedIndex = rotatedY * rotatedWidth + rotatedX; + // 輝度値を新しい位置にコピー + rotatedGrayscaleBytes[rotatedIndex] = grayscaleBytes[originalIndex]; } } - return rotatedBytes; - } - - List _convertRGBAToGrayscale( - List rgbaBytes, int width, int height) { - List grayscaleBytes = List.filled(width * height, 0); - - for (int i = 0; i < rgbaBytes.length; i += 4) { - int r = rgbaBytes[i]; - int g = rgbaBytes[i + 1]; - int b = rgbaBytes[i + 2]; - // アルファチャンネル(rgbaBytes[i + 3])はグレースケール変換には不要なので無視 - - // 輝度値(Y)の計算 - int yValue = (0.299 * r + 0.587 * g + 0.114 * b).round(); - // グレースケール画像の各ピクセルに輝度値を設定 - grayscaleBytes[i ~/ 4] = yValue; - } - - return grayscaleBytes; + return [rotatedGrayscaleBytes, rotatedWidth, rotatedHeight]; } void _startImageStream() async { @@ -221,24 +203,29 @@ class _CameraPageState extends State { if (frameCounter % 60 == 0) { if (Platform.isAndroid) { videoChunks.add(image.planes[0].bytes.toList()); + _streamController.add(StreamBusVideoRequest( + busId: widget.bus.id, + nurseryId: NurseryData().getNursery().id, + busType: widget.busType, + vehicleEvent: _vehicleEvent, + videoChunk: videoChunks, + photoHeight: image.height, + photoWidth: image.width, + )); } else if (Platform.isIOS) { - videoChunks.add((_convertRGBAToGrayscale( - _rotateRGBAImage90DegreesLeft( - image.planes[0].bytes.toList(), image.width, image.height), - image.width, - image.height))); + videoChunks.add(rotateGrayscaleImageLeft90Degrees( + _processCameraImage2gray(image), image.width, image.height)[0]); + _streamController.add(StreamBusVideoRequest( + busId: widget.bus.id, + nurseryId: NurseryData().getNursery().id, + busType: widget.busType, + vehicleEvent: _vehicleEvent, + videoChunk: videoChunks, + photoHeight: image.width, + photoWidth: image.height, + )); } - _streamController.add(StreamBusVideoRequest( - busId: widget.bus.id, - nurseryId: NurseryData().getNursery().id, - busType: widget.busType, - vehicleEvent: _vehicleEvent, - videoChunk: videoChunks, - photoHeight: image.height, - photoWidth: image.width, - )); - try { // await _getCurrentLocation(); await _getCurrentLocation().then((locationData) { From f2eed1f1ab0274269d083129d6778f2bf8b2a6c6 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 24 Feb 2024 03:18:31 +0900 Subject: [PATCH 743/771] =?UTF-8?q?fix(ml):=20smile=5Fdegree=E3=81=AB?= =?UTF-8?q?=E5=AF=BE=E3=81=99=E3=82=8B=E6=AD=A3=E8=A6=8F=E5=8C=96=E3=82=92?= =?UTF-8?q?=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/face_detect_model/util.py | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index 49eb0124..9f776e42 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -188,6 +188,19 @@ def get_casecade(self, cascade_path): raise ValueError(f"Can not load cascade: {cascade_path}") return cascade + # def detect_smile_degree(self, gray_image): + # smile = self.smile_cascade.detectMultiScale( + # gray_image, scaleFactor=self.scaleFactor, minNeighbors=self.minNeighbors + # ) + # if len(smile) > 0: + # (_, _, sw, sh) = smile[0] + # smile_area = sw * sh + # smile_degree = ( + # smile_area / (gray_image.shape[0] * gray_image.shape[1]) * 100 + # ) + # return smile_degree + # return 0 + def detect_smile_degree(self, gray_image): smile = self.smile_cascade.detectMultiScale( gray_image, scaleFactor=self.scaleFactor, minNeighbors=self.minNeighbors @@ -195,12 +208,15 @@ def detect_smile_degree(self, gray_image): if len(smile) > 0: (_, _, sw, sh) = smile[0] smile_area = sw * sh - smile_degree = ( - smile_area / (gray_image.shape[0] * gray_image.shape[1]) * 100 - ) + # 仮定として、顔の最大30%が笑顔の面積となる場合 + max_smile_area = (gray_image.shape[0] * gray_image.shape[1]) * 0.25 + # 実際の笑顔の面積を最大笑顔面積で割り、100を掛けて正規化 + smile_degree = (smile_area / max_smile_area) * 100 + # 100を超える値を100に制限 + smile_degree = min(smile_degree, 100) return smile_degree - - return 0 + else: + return 0 def add_smile_degree_to_image( self, image, smile_degree, font_scale=0.7, thickness=2 From b89d139c6ce7bf3a53d565a80f21ab55222940e8 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 24 Feb 2024 03:24:07 +0900 Subject: [PATCH 744/771] chore: add debug log and some fix --- backend/usecases/bus/bus.go | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index 5bb0d938..c8217e6b 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -496,11 +496,14 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e return err } - err = i.processDetectedChildren(tx, stream, resp, busID, vehicleEvent) - if err != nil { - utils.RollbackTx(tx, i.logger) - return err - } + go func() { + i.logger.Info("processing detected children", "bus_id", busID, "vehicle_event", vehicleEvent) + err = i.processDetectedChildren(tx, ctx, stream, resp, busID, vehicleEvent) + if err != nil { + utils.RollbackTx(tx, i.logger) + return + } + }() if err := tx.Commit(); err != nil { return err @@ -510,7 +513,8 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e } // processDetectedChildren は検出された子供たちを処理するためのヘルパー関数です。 -func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_StreamBusVideoServer, resp *mlv1.PredResponse, busID string, vehicleEvent pb.VehicleEvent) error { +func (i *Interactor) processDetectedChildren(tx *ent.Tx, ctx context.Context, stream pb.BusService_StreamBusVideoServer, resp *mlv1.PredResponse, busID string, vehicleEvent pb.VehicleEvent) error { + i.logger.Info("called processDetectedChildren") var pbChildren []*pb.Child busUUID := uuid.MustParse(busID) for _, childId := range resp.ChildIds { @@ -520,10 +524,11 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_St exists, err := tx.BoardingRecord.Query(). Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(busUUID))). - Exist(context.Background()) + Exist(ctx) if err != nil { return err } + i.logger.Info("exists", exists, "child_id", childUUID, "bus_id", busUUID) if !exists { _, err = tx.BoardingRecord.Create(). @@ -531,7 +536,7 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_St SetBusID(busUUID). SetIsBoarding(false). SetTimestamp(time.Now()). - Save(context.Background()) + Save(ctx) if err != nil { return err } @@ -540,7 +545,7 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_St boardingrecord, err := tx.BoardingRecord.Query(). Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). Where(boardingrecordRepo.HasBusWith(busRepo.IDEQ(busUUID))). - Only(context.Background()) + Only(ctx) if err != nil { return err } @@ -554,7 +559,7 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_St _, err = tx.BoardingRecord.UpdateOneID(boardingrecord.ID). SetIsBoarding(true). SetTimestamp(time.Now()). - Save(context.Background()) + Save(ctx) case pb.VehicleEvent_VEHICLE_EVENT_GET_OFF: if !boardingrecord.IsBoarding { continue @@ -562,7 +567,7 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_St _, err = tx.BoardingRecord.UpdateOneID(boardingrecord.ID). SetIsBoarding(false). SetTimestamp(time.Now()). - Save(context.Background()) + Save(ctx) default: return fmt.Errorf("invalid vehicle event: %v", vehicleEvent) } @@ -570,17 +575,21 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, stream pb.BusService_St return err } + i.logger.Info("updated boarding record", "child_id", childUUID, "bus_id", busUUID, "is_boarding", boardingrecord.IsBoarding, "vehicle_event", vehicleEvent) + // 子供の情報を取得してレスポンスに追加 child, err := tx.Child.Query(). Where(childRepo.IDEQ(childUUID)). WithGuardian(). - Only(context.Background()) + Only(ctx) if err != nil { return err } pbChildren = append(pbChildren, utils.ToPbChild(child)) } + i.logger.Info("sending response to client", "bus_id", busUUID, "vehicle_event", vehicleEvent, "children", pbChildren) + // 元のクライアントにレスポンスを返す err := stream.SendMsg(&pb.StreamBusVideoResponse{ IsDetected: resp.IsDetected, From 14c3394e31760ff992326e38e64d77da4f693351 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 24 Feb 2024 03:24:20 +0900 Subject: [PATCH 745/771] =?UTF-8?q?refactor:=20=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=81=AE=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine_learning/src/face_detect_model/util.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/machine_learning/src/face_detect_model/util.py b/machine_learning/src/face_detect_model/util.py index 9f776e42..e40f191a 100644 --- a/machine_learning/src/face_detect_model/util.py +++ b/machine_learning/src/face_detect_model/util.py @@ -188,19 +188,6 @@ def get_casecade(self, cascade_path): raise ValueError(f"Can not load cascade: {cascade_path}") return cascade - # def detect_smile_degree(self, gray_image): - # smile = self.smile_cascade.detectMultiScale( - # gray_image, scaleFactor=self.scaleFactor, minNeighbors=self.minNeighbors - # ) - # if len(smile) > 0: - # (_, _, sw, sh) = smile[0] - # smile_area = sw * sh - # smile_degree = ( - # smile_area / (gray_image.shape[0] * gray_image.shape[1]) * 100 - # ) - # return smile_degree - # return 0 - def detect_smile_degree(self, gray_image): smile = self.smile_cascade.detectMultiScale( gray_image, scaleFactor=self.scaleFactor, minNeighbors=self.minNeighbors From b870adf3b3ec2924609f9c376807187421466460 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 24 Feb 2024 03:52:12 +0900 Subject: [PATCH 746/771] ci: update workflows for debugging --- .github/workflows/deploy-to-gcloud.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 84894ed1..9702f521 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -7,6 +7,7 @@ on: push: branches: - develop + - feature/backend/api paths: - "backend/**" From 8411db6e244c6bd09a4d6b356f61032d1091f111 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 24 Feb 2024 03:52:50 +0900 Subject: [PATCH 747/771] feat: add more logging and exception handling --- backend/usecases/bus/bus.go | 53 ++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index c8217e6b..fc60db6f 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -436,7 +436,9 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea } func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) error { - ctx := stream.Context() // ストリームのコンテキストを使用 + ctx, cancel := context.WithCancel(stream.Context()) // ゴルーチンの管理用にキャンセル可能なコンテキストを作成 + defer cancel() // 関数終了時にゴルーチンをキャンセル + MLStream, err := i.MLServiceClient.Pred(ctx) if err != nil { return err @@ -444,21 +446,20 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e var busID string var vehicleEvent pb.VehicleEvent - errChan := make(chan error, 1) // エラーチャネルを作成 - wg := sync.WaitGroup{} // ゴルーチンの完了を待つためのWaitGroup + errChan := make(chan error, 1) - // Go サーバーから受け取ったメッセージをPythonサーバーに転送 - wg.Add(1) // WaitGroupのカウンターをインクリメント + wg := sync.WaitGroup{} + wg.Add(1) go func() { - defer wg.Done() // 関数終了時にカウンターをデクリメント + defer wg.Done() for { in, err := stream.Recv() - if err == io.EOF { - // ストリームの終了 - break - } if err != nil { - errChan <- err // エラーチャネルにエラーを送信 + if err == io.EOF { + cancel() // EOF の場合はコンテキストをキャンセルしてゴルーチンを終了 + return + } + errChan <- err return } @@ -466,7 +467,7 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e vehicleEvent = in.VehicleEvent if err := MLStream.Send(in); err != nil { - errChan <- err // エラーチャネルにエラーを送信 + errChan <- err return } } @@ -474,16 +475,15 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e for { select { - case err := <-errChan: // エラーチャネルからのエラーを待機 + case err := <-errChan: return err default: resp, err := MLStream.Recv() - if err == io.EOF { - // ストリームの終了 - wg.Wait() // ゴルーチンの完了を待つ - return nil - } if err != nil { + if err == io.EOF { + wg.Wait() // ゴルーチンの完了を待つ + return nil + } return err } @@ -496,14 +496,12 @@ func (i *Interactor) StreamBusVideo(stream pb.BusService_StreamBusVideoServer) e return err } - go func() { - i.logger.Info("processing detected children", "bus_id", busID, "vehicle_event", vehicleEvent) - err = i.processDetectedChildren(tx, ctx, stream, resp, busID, vehicleEvent) - if err != nil { - utils.RollbackTx(tx, i.logger) - return - } - }() + i.logger.Info("processing detected children", "bus_id", busID, "vehicle_event", vehicleEvent) + err = i.processDetectedChildren(tx, ctx, stream, resp, busID, vehicleEvent) + if err != nil { + utils.RollbackTx(tx, i.logger) + return err + } if err := tx.Commit(); err != nil { return err @@ -520,6 +518,7 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, ctx context.Context, st for _, childId := range resp.ChildIds { childUUID := uuid.MustParse(childId) + i.logger.Info("start searching boarding record", "child_id", childUUID, "bus_id", busUUID) // 既存のレコードを検索 exists, err := tx.BoardingRecord.Query(). Where(boardingrecordRepo.HasChildWith(childRepo.IDEQ(childUUID))). @@ -540,6 +539,7 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, ctx context.Context, st if err != nil { return err } + i.logger.Info("created new boarding record", "child_id", childUUID, "bus_id", busUUID) } boardingrecord, err := tx.BoardingRecord.Query(). @@ -598,7 +598,6 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, ctx context.Context, st if err != nil { return err } - return nil } From ec387316f9219870ce7ce54eb80e4539978ce4c2 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 24 Feb 2024 04:03:02 +0900 Subject: [PATCH 748/771] chore: buf generate --- .../where_child_bus/v1/guardian.pb.dart | 758 ++++++------------ 1 file changed, 267 insertions(+), 491 deletions(-) diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart index aad4a278..a3ceb10d 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/guardian.pb.dart @@ -43,57 +43,43 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { return $result; } CreateGuardianRequest._() : super(); - factory CreateGuardianRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory CreateGuardianRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'CreateGuardianRequest', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) + factory CreateGuardianRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateGuardianRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateGuardianRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'nurseryCode') ..aOS(2, _omitFieldNames ? '' : 'email') ..aOS(3, _omitFieldNames ? '' : 'password') ..aOS(4, _omitFieldNames ? '' : 'name') ..aOS(5, _omitFieldNames ? '' : 'phoneNumber') - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CreateGuardianRequest clone() => - CreateGuardianRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CreateGuardianRequest copyWith( - void Function(CreateGuardianRequest) updates) => - super.copyWith((message) => updates(message as CreateGuardianRequest)) - as CreateGuardianRequest; + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateGuardianRequest clone() => CreateGuardianRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateGuardianRequest copyWith(void Function(CreateGuardianRequest) updates) => super.copyWith((message) => updates(message as CreateGuardianRequest)) as CreateGuardianRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CreateGuardianRequest create() => CreateGuardianRequest._(); CreateGuardianRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static CreateGuardianRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static CreateGuardianRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static CreateGuardianRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get nurseryCode => $_getSZ(0); @$pb.TagNumber(1) - set nurseryCode($core.String v) { - $_setString(0, v); - } - + set nurseryCode($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasNurseryCode() => $_has(0); @$pb.TagNumber(1) @@ -102,10 +88,7 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get email => $_getSZ(1); @$pb.TagNumber(2) - set email($core.String v) { - $_setString(1, v); - } - + set email($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) $core.bool hasEmail() => $_has(1); @$pb.TagNumber(2) @@ -114,10 +97,7 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get password => $_getSZ(2); @$pb.TagNumber(3) - set password($core.String v) { - $_setString(2, v); - } - + set password($core.String v) { $_setString(2, v); } @$pb.TagNumber(3) $core.bool hasPassword() => $_has(2); @$pb.TagNumber(3) @@ -126,10 +106,7 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.String get name => $_getSZ(3); @$pb.TagNumber(4) - set name($core.String v) { - $_setString(3, v); - } - + set name($core.String v) { $_setString(3, v); } @$pb.TagNumber(4) $core.bool hasName() => $_has(3); @$pb.TagNumber(4) @@ -138,10 +115,7 @@ class CreateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.String get phoneNumber => $_getSZ(4); @$pb.TagNumber(5) - set phoneNumber($core.String v) { - $_setString(4, v); - } - + set phoneNumber($core.String v) { $_setString(4, v); } @$pb.TagNumber(5) $core.bool hasPhoneNumber() => $_has(4); @$pb.TagNumber(5) @@ -159,54 +133,39 @@ class CreateGuardianResponse extends $pb.GeneratedMessage { return $result; } CreateGuardianResponse._() : super(); - factory CreateGuardianResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory CreateGuardianResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'CreateGuardianResponse', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) - ..aOM<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', - subBuilder: $9.GuardianResponse.create) - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CreateGuardianResponse clone() => - CreateGuardianResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CreateGuardianResponse copyWith( - void Function(CreateGuardianResponse) updates) => - super.copyWith((message) => updates(message as CreateGuardianResponse)) - as CreateGuardianResponse; + factory CreateGuardianResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateGuardianResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateGuardianResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $9.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateGuardianResponse clone() => CreateGuardianResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateGuardianResponse copyWith(void Function(CreateGuardianResponse) updates) => super.copyWith((message) => updates(message as CreateGuardianResponse)) as CreateGuardianResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static CreateGuardianResponse create() => CreateGuardianResponse._(); CreateGuardianResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static CreateGuardianResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static CreateGuardianResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static CreateGuardianResponse? _defaultInstance; @$pb.TagNumber(1) $9.GuardianResponse get guardian => $_getN(0); @$pb.TagNumber(1) - set guardian($9.GuardianResponse v) { - setField(1, v); - } - + set guardian($9.GuardianResponse v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasGuardian() => $_has(0); @$pb.TagNumber(1) @@ -230,53 +189,40 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { return $result; } GuardianLoginRequest._() : super(); - factory GuardianLoginRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory GuardianLoginRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'GuardianLoginRequest', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) + factory GuardianLoginRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GuardianLoginRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'email') ..aOS(2, _omitFieldNames ? '' : 'password') - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GuardianLoginRequest clone() => - GuardianLoginRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GuardianLoginRequest copyWith(void Function(GuardianLoginRequest) updates) => - super.copyWith((message) => updates(message as GuardianLoginRequest)) - as GuardianLoginRequest; + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GuardianLoginRequest clone() => GuardianLoginRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GuardianLoginRequest copyWith(void Function(GuardianLoginRequest) updates) => super.copyWith((message) => updates(message as GuardianLoginRequest)) as GuardianLoginRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static GuardianLoginRequest create() => GuardianLoginRequest._(); GuardianLoginRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GuardianLoginRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GuardianLoginRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GuardianLoginRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get email => $_getSZ(0); @$pb.TagNumber(1) - set email($core.String v) { - $_setString(0, v); - } - + set email($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasEmail() => $_has(0); @$pb.TagNumber(1) @@ -285,10 +231,7 @@ class GuardianLoginRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get password => $_getSZ(1); @$pb.TagNumber(2) - set password($core.String v) { - $_setString(1, v); - } - + set password($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) $core.bool hasPassword() => $_has(1); @$pb.TagNumber(2) @@ -314,57 +257,41 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { return $result; } GuardianLoginResponse._() : super(); - factory GuardianLoginResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory GuardianLoginResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'GuardianLoginResponse', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) + factory GuardianLoginResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GuardianLoginResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GuardianLoginResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOB(1, _omitFieldNames ? '' : 'success') - ..aOM<$9.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', - subBuilder: $9.GuardianResponse.create) - ..aOM<$9.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', - subBuilder: $9.NurseryResponse.create) - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GuardianLoginResponse clone() => - GuardianLoginResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GuardianLoginResponse copyWith( - void Function(GuardianLoginResponse) updates) => - super.copyWith((message) => updates(message as GuardianLoginResponse)) - as GuardianLoginResponse; + ..aOM<$9.GuardianResponse>(2, _omitFieldNames ? '' : 'guardian', subBuilder: $9.GuardianResponse.create) + ..aOM<$9.NurseryResponse>(3, _omitFieldNames ? '' : 'nursery', subBuilder: $9.NurseryResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GuardianLoginResponse clone() => GuardianLoginResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GuardianLoginResponse copyWith(void Function(GuardianLoginResponse) updates) => super.copyWith((message) => updates(message as GuardianLoginResponse)) as GuardianLoginResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static GuardianLoginResponse create() => GuardianLoginResponse._(); GuardianLoginResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GuardianLoginResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GuardianLoginResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GuardianLoginResponse? _defaultInstance; @$pb.TagNumber(1) $core.bool get success => $_getBF(0); @$pb.TagNumber(1) - set success($core.bool v) { - $_setBool(0, v); - } - + set success($core.bool v) { $_setBool(0, v); } @$pb.TagNumber(1) $core.bool hasSuccess() => $_has(0); @$pb.TagNumber(1) @@ -373,10 +300,7 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { @$pb.TagNumber(2) $9.GuardianResponse get guardian => $_getN(1); @$pb.TagNumber(2) - set guardian($9.GuardianResponse v) { - setField(2, v); - } - + set guardian($9.GuardianResponse v) { setField(2, v); } @$pb.TagNumber(2) $core.bool hasGuardian() => $_has(1); @$pb.TagNumber(2) @@ -387,10 +311,7 @@ class GuardianLoginResponse extends $pb.GeneratedMessage { @$pb.TagNumber(3) $9.NurseryResponse get nursery => $_getN(2); @$pb.TagNumber(3) - set nursery($9.NurseryResponse v) { - setField(3, v); - } - + set nursery($9.NurseryResponse v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasNursery() => $_has(2); @$pb.TagNumber(3) @@ -410,55 +331,39 @@ class GetGuardianListByBusIdRequest extends $pb.GeneratedMessage { return $result; } GetGuardianListByBusIdRequest._() : super(); - factory GetGuardianListByBusIdRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory GetGuardianListByBusIdRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'GetGuardianListByBusIdRequest', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) + factory GetGuardianListByBusIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianListByBusIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByBusIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'busId') - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianListByBusIdRequest clone() => - GetGuardianListByBusIdRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianListByBusIdRequest copyWith( - void Function(GetGuardianListByBusIdRequest) updates) => - super.copyWith( - (message) => updates(message as GetGuardianListByBusIdRequest)) - as GetGuardianListByBusIdRequest; + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdRequest clone() => GetGuardianListByBusIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdRequest copyWith(void Function(GetGuardianListByBusIdRequest) updates) => super.copyWith((message) => updates(message as GetGuardianListByBusIdRequest)) as GetGuardianListByBusIdRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianListByBusIdRequest create() => - GetGuardianListByBusIdRequest._(); + static GetGuardianListByBusIdRequest create() => GetGuardianListByBusIdRequest._(); GetGuardianListByBusIdRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianListByBusIdRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianListByBusIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetGuardianListByBusIdRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get busId => $_getSZ(0); @$pb.TagNumber(1) - set busId($core.String v) { - $_setString(0, v); - } - + set busId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasBusId() => $_has(0); @$pb.TagNumber(1) @@ -476,48 +381,33 @@ class GetGuardianListByBusIdResponse extends $pb.GeneratedMessage { return $result; } GetGuardianListByBusIdResponse._() : super(); - factory GetGuardianListByBusIdResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory GetGuardianListByBusIdResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'GetGuardianListByBusIdResponse', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) - ..pc<$9.GuardianResponse>( - 1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, - subBuilder: $9.GuardianResponse.create) - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianListByBusIdResponse clone() => - GetGuardianListByBusIdResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianListByBusIdResponse copyWith( - void Function(GetGuardianListByBusIdResponse) updates) => - super.copyWith( - (message) => updates(message as GetGuardianListByBusIdResponse)) - as GetGuardianListByBusIdResponse; + factory GetGuardianListByBusIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianListByBusIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByBusIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $9.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdResponse clone() => GetGuardianListByBusIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByBusIdResponse copyWith(void Function(GetGuardianListByBusIdResponse) updates) => super.copyWith((message) => updates(message as GetGuardianListByBusIdResponse)) as GetGuardianListByBusIdResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianListByBusIdResponse create() => - GetGuardianListByBusIdResponse._(); + static GetGuardianListByBusIdResponse create() => GetGuardianListByBusIdResponse._(); GetGuardianListByBusIdResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianListByBusIdResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianListByBusIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetGuardianListByBusIdResponse? _defaultInstance; @$pb.TagNumber(1) @@ -535,55 +425,39 @@ class GetGuardianByChildIdRequest extends $pb.GeneratedMessage { return $result; } GetGuardianByChildIdRequest._() : super(); - factory GetGuardianByChildIdRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory GetGuardianByChildIdRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'GetGuardianByChildIdRequest', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) + factory GetGuardianByChildIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianByChildIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianByChildIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'childId') - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianByChildIdRequest clone() => - GetGuardianByChildIdRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianByChildIdRequest copyWith( - void Function(GetGuardianByChildIdRequest) updates) => - super.copyWith( - (message) => updates(message as GetGuardianByChildIdRequest)) - as GetGuardianByChildIdRequest; + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdRequest clone() => GetGuardianByChildIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdRequest copyWith(void Function(GetGuardianByChildIdRequest) updates) => super.copyWith((message) => updates(message as GetGuardianByChildIdRequest)) as GetGuardianByChildIdRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianByChildIdRequest create() => - GetGuardianByChildIdRequest._(); + static GetGuardianByChildIdRequest create() => GetGuardianByChildIdRequest._(); GetGuardianByChildIdRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianByChildIdRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianByChildIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetGuardianByChildIdRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get childId => $_getSZ(0); @$pb.TagNumber(1) - set childId($core.String v) { - $_setString(0, v); - } - + set childId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasChildId() => $_has(0); @$pb.TagNumber(1) @@ -601,56 +475,39 @@ class GetGuardianByChildIdResponse extends $pb.GeneratedMessage { return $result; } GetGuardianByChildIdResponse._() : super(); - factory GetGuardianByChildIdResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory GetGuardianByChildIdResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'GetGuardianByChildIdResponse', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) - ..aOM<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', - subBuilder: $9.GuardianResponse.create) - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianByChildIdResponse clone() => - GetGuardianByChildIdResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianByChildIdResponse copyWith( - void Function(GetGuardianByChildIdResponse) updates) => - super.copyWith( - (message) => updates(message as GetGuardianByChildIdResponse)) - as GetGuardianByChildIdResponse; + factory GetGuardianByChildIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianByChildIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianByChildIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $9.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdResponse clone() => GetGuardianByChildIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianByChildIdResponse copyWith(void Function(GetGuardianByChildIdResponse) updates) => super.copyWith((message) => updates(message as GetGuardianByChildIdResponse)) as GetGuardianByChildIdResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianByChildIdResponse create() => - GetGuardianByChildIdResponse._(); + static GetGuardianByChildIdResponse create() => GetGuardianByChildIdResponse._(); GetGuardianByChildIdResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianByChildIdResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static GetGuardianByChildIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetGuardianByChildIdResponse? _defaultInstance; @$pb.TagNumber(1) $9.GuardianResponse get guardian => $_getN(0); @$pb.TagNumber(1) - set guardian($9.GuardianResponse v) { - setField(1, v); - } - + set guardian($9.GuardianResponse v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasGuardian() => $_has(0); @$pb.TagNumber(1) @@ -670,56 +527,39 @@ class GetGuardianListByNurseryIdRequest extends $pb.GeneratedMessage { return $result; } GetGuardianListByNurseryIdRequest._() : super(); - factory GetGuardianListByNurseryIdRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory GetGuardianListByNurseryIdRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'GetGuardianListByNurseryIdRequest', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) + factory GetGuardianListByNurseryIdRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianListByNurseryIdRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByNurseryIdRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'nurseryId') - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianListByNurseryIdRequest clone() => - GetGuardianListByNurseryIdRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianListByNurseryIdRequest copyWith( - void Function(GetGuardianListByNurseryIdRequest) updates) => - super.copyWith((message) => - updates(message as GetGuardianListByNurseryIdRequest)) - as GetGuardianListByNurseryIdRequest; + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdRequest clone() => GetGuardianListByNurseryIdRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdRequest copyWith(void Function(GetGuardianListByNurseryIdRequest) updates) => super.copyWith((message) => updates(message as GetGuardianListByNurseryIdRequest)) as GetGuardianListByNurseryIdRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianListByNurseryIdRequest create() => - GetGuardianListByNurseryIdRequest._(); + static GetGuardianListByNurseryIdRequest create() => GetGuardianListByNurseryIdRequest._(); GetGuardianListByNurseryIdRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianListByNurseryIdRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); + static GetGuardianListByNurseryIdRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetGuardianListByNurseryIdRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get nurseryId => $_getSZ(0); @$pb.TagNumber(1) - set nurseryId($core.String v) { - $_setString(0, v); - } - + set nurseryId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasNurseryId() => $_has(0); @$pb.TagNumber(1) @@ -737,49 +577,33 @@ class GetGuardianListByNurseryIdResponse extends $pb.GeneratedMessage { return $result; } GetGuardianListByNurseryIdResponse._() : super(); - factory GetGuardianListByNurseryIdResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory GetGuardianListByNurseryIdResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'GetGuardianListByNurseryIdResponse', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) - ..pc<$9.GuardianResponse>( - 1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, - subBuilder: $9.GuardianResponse.create) - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetGuardianListByNurseryIdResponse clone() => - GetGuardianListByNurseryIdResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetGuardianListByNurseryIdResponse copyWith( - void Function(GetGuardianListByNurseryIdResponse) updates) => - super.copyWith((message) => - updates(message as GetGuardianListByNurseryIdResponse)) - as GetGuardianListByNurseryIdResponse; + factory GetGuardianListByNurseryIdResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetGuardianListByNurseryIdResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetGuardianListByNurseryIdResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..pc<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardians', $pb.PbFieldType.PM, subBuilder: $9.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdResponse clone() => GetGuardianListByNurseryIdResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetGuardianListByNurseryIdResponse copyWith(void Function(GetGuardianListByNurseryIdResponse) updates) => super.copyWith((message) => updates(message as GetGuardianListByNurseryIdResponse)) as GetGuardianListByNurseryIdResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetGuardianListByNurseryIdResponse create() => - GetGuardianListByNurseryIdResponse._(); + static GetGuardianListByNurseryIdResponse create() => GetGuardianListByNurseryIdResponse._(); GetGuardianListByNurseryIdResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetGuardianListByNurseryIdResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); + static GetGuardianListByNurseryIdResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetGuardianListByNurseryIdResponse? _defaultInstance; @$pb.TagNumber(1) @@ -821,60 +645,45 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { return $result; } UpdateGuardianRequest._() : super(); - factory UpdateGuardianRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory UpdateGuardianRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'UpdateGuardianRequest', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) + factory UpdateGuardianRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateGuardianRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateGuardianRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'guardianId') ..aOS(2, _omitFieldNames ? '' : 'name') ..aOS(3, _omitFieldNames ? '' : 'email') ..aOS(4, _omitFieldNames ? '' : 'phoneNumber') ..aOB(5, _omitFieldNames ? '' : 'isUseMorningBus') ..aOB(6, _omitFieldNames ? '' : 'isUseEveningBus') - ..aOM<$10.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', - subBuilder: $10.FieldMask.create) - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - UpdateGuardianRequest clone() => - UpdateGuardianRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UpdateGuardianRequest copyWith( - void Function(UpdateGuardianRequest) updates) => - super.copyWith((message) => updates(message as UpdateGuardianRequest)) - as UpdateGuardianRequest; + ..aOM<$10.FieldMask>(11, _omitFieldNames ? '' : 'updateMask', subBuilder: $10.FieldMask.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateGuardianRequest clone() => UpdateGuardianRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateGuardianRequest copyWith(void Function(UpdateGuardianRequest) updates) => super.copyWith((message) => updates(message as UpdateGuardianRequest)) as UpdateGuardianRequest; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static UpdateGuardianRequest create() => UpdateGuardianRequest._(); UpdateGuardianRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static UpdateGuardianRequest getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static UpdateGuardianRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static UpdateGuardianRequest? _defaultInstance; @$pb.TagNumber(1) $core.String get guardianId => $_getSZ(0); @$pb.TagNumber(1) - set guardianId($core.String v) { - $_setString(0, v); - } - + set guardianId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) $core.bool hasGuardianId() => $_has(0); @$pb.TagNumber(1) @@ -883,10 +692,7 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get name => $_getSZ(1); @$pb.TagNumber(2) - set name($core.String v) { - $_setString(1, v); - } - + set name($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) $core.bool hasName() => $_has(1); @$pb.TagNumber(2) @@ -895,10 +701,7 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get email => $_getSZ(2); @$pb.TagNumber(3) - set email($core.String v) { - $_setString(2, v); - } - + set email($core.String v) { $_setString(2, v); } @$pb.TagNumber(3) $core.bool hasEmail() => $_has(2); @$pb.TagNumber(3) @@ -907,10 +710,7 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.String get phoneNumber => $_getSZ(3); @$pb.TagNumber(4) - set phoneNumber($core.String v) { - $_setString(3, v); - } - + set phoneNumber($core.String v) { $_setString(3, v); } @$pb.TagNumber(4) $core.bool hasPhoneNumber() => $_has(3); @$pb.TagNumber(4) @@ -919,10 +719,7 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.bool get isUseMorningBus => $_getBF(4); @$pb.TagNumber(5) - set isUseMorningBus($core.bool v) { - $_setBool(4, v); - } - + set isUseMorningBus($core.bool v) { $_setBool(4, v); } @$pb.TagNumber(5) $core.bool hasIsUseMorningBus() => $_has(4); @$pb.TagNumber(5) @@ -931,10 +728,7 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(6) $core.bool get isUseEveningBus => $_getBF(5); @$pb.TagNumber(6) - set isUseEveningBus($core.bool v) { - $_setBool(5, v); - } - + set isUseEveningBus($core.bool v) { $_setBool(5, v); } @$pb.TagNumber(6) $core.bool hasIsUseEveningBus() => $_has(5); @$pb.TagNumber(6) @@ -943,10 +737,7 @@ class UpdateGuardianRequest extends $pb.GeneratedMessage { @$pb.TagNumber(11) $10.FieldMask get updateMask => $_getN(6); @$pb.TagNumber(11) - set updateMask($10.FieldMask v) { - setField(11, v); - } - + set updateMask($10.FieldMask v) { setField(11, v); } @$pb.TagNumber(11) $core.bool hasUpdateMask() => $_has(6); @$pb.TagNumber(11) @@ -966,54 +757,39 @@ class UpdateGuardianResponse extends $pb.GeneratedMessage { return $result; } UpdateGuardianResponse._() : super(); - factory UpdateGuardianResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory UpdateGuardianResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'UpdateGuardianResponse', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), - createEmptyInstance: create) - ..aOM<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', - subBuilder: $9.GuardianResponse.create) - ..hasRequiredFields = false; - - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - UpdateGuardianResponse clone() => - UpdateGuardianResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UpdateGuardianResponse copyWith( - void Function(UpdateGuardianResponse) updates) => - super.copyWith((message) => updates(message as UpdateGuardianResponse)) - as UpdateGuardianResponse; + factory UpdateGuardianResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateGuardianResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateGuardianResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'where_child_bus.v1'), createEmptyInstance: create) + ..aOM<$9.GuardianResponse>(1, _omitFieldNames ? '' : 'guardian', subBuilder: $9.GuardianResponse.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UpdateGuardianResponse clone() => UpdateGuardianResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateGuardianResponse copyWith(void Function(UpdateGuardianResponse) updates) => super.copyWith((message) => updates(message as UpdateGuardianResponse)) as UpdateGuardianResponse; $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static UpdateGuardianResponse create() => UpdateGuardianResponse._(); UpdateGuardianResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => - $pb.PbList(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static UpdateGuardianResponse getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); + static UpdateGuardianResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static UpdateGuardianResponse? _defaultInstance; @$pb.TagNumber(1) $9.GuardianResponse get guardian => $_getN(0); @$pb.TagNumber(1) - set guardian($9.GuardianResponse v) { - setField(1, v); - } - + set guardian($9.GuardianResponse v) { setField(1, v); } @$pb.TagNumber(1) $core.bool hasGuardian() => $_has(0); @$pb.TagNumber(1) @@ -1022,6 +798,6 @@ class UpdateGuardianResponse extends $pb.GeneratedMessage { $9.GuardianResponse ensureGuardian() => $_ensure(0); } + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = - $core.bool.fromEnvironment('protobuf.omit_message_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); From 1981191a8dc99d054f61a40c0cb9db6f0ea6d6cc Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 24 Feb 2024 04:16:21 +0900 Subject: [PATCH 749/771] fix: stream bus video response to stream --- .../proto-gen/go/where_child_bus/v1/bus.pb.go | 36 +++++++++---------- .../go/where_child_bus/v1/bus_grpc.pb.go | 12 +++---- .../where_child_bus/v1/bus.pbgrpc.dart | 8 ++--- .../generated/where_child_bus/v1/bus_pb2.py | 4 +-- .../where_child_bus/v1/bus_pb2_grpc.py | 6 ++-- proto/where_child_bus/v1/bus.proto | 2 +- 6 files changed, 33 insertions(+), 35 deletions(-) diff --git a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go index adeadeb3..a846655b 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus.pb.go @@ -1075,7 +1075,7 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, - 0x03, 0x62, 0x75, 0x73, 0x32, 0x9b, 0x07, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x03, 0x62, 0x75, 0x73, 0x32, 0x9d, 0x07, 0x0a, 0x0a, 0x42, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x12, 0x24, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x73, 0x52, @@ -1126,29 +1126,29 @@ var file_where_child_bus_v1_bus_proto_rawDesc = []byte{ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x42, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x6b, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x29, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x73, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x28, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, 0x72, 0x65, - 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x42, - 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, 0x68, 0x65, - 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, - 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, - 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x68, 0x65, - 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, - 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x57, - 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x01, 0x30, 0x01, 0x42, 0xeb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x68, 0x65, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x61, + 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, 0x73, 0x2f, 0x76, + 0x31, 0x3b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x75, + 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x57, 0x68, 0x65, 0x72, + 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, + 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1c, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x11, 0x57, 0x68, 0x65, 0x72, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x75, 0x73, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go index 6c5c2589..c62d2705 100644 --- a/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go +++ b/backend/proto-gen/go/where_child_bus/v1/bus_grpc.pb.go @@ -173,7 +173,7 @@ func (c *busServiceClient) StreamBusVideo(ctx context.Context, opts ...grpc.Call type BusService_StreamBusVideoClient interface { Send(*StreamBusVideoRequest) error - CloseAndRecv() (*StreamBusVideoResponse, error) + Recv() (*StreamBusVideoResponse, error) grpc.ClientStream } @@ -185,10 +185,7 @@ func (x *busServiceStreamBusVideoClient) Send(m *StreamBusVideoRequest) error { return x.ClientStream.SendMsg(m) } -func (x *busServiceStreamBusVideoClient) CloseAndRecv() (*StreamBusVideoResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } +func (x *busServiceStreamBusVideoClient) Recv() (*StreamBusVideoResponse, error) { m := new(StreamBusVideoResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -392,7 +389,7 @@ func _BusService_StreamBusVideo_Handler(srv interface{}, stream grpc.ServerStrea } type BusService_StreamBusVideoServer interface { - SendAndClose(*StreamBusVideoResponse) error + Send(*StreamBusVideoResponse) error Recv() (*StreamBusVideoRequest, error) grpc.ServerStream } @@ -401,7 +398,7 @@ type busServiceStreamBusVideoServer struct { grpc.ServerStream } -func (x *busServiceStreamBusVideoServer) SendAndClose(m *StreamBusVideoResponse) error { +func (x *busServiceStreamBusVideoServer) Send(m *StreamBusVideoResponse) error { return x.ServerStream.SendMsg(m) } @@ -455,6 +452,7 @@ var BusService_ServiceDesc = grpc.ServiceDesc{ { StreamName: "StreamBusVideo", Handler: _BusService_StreamBusVideo_Handler, + ServerStreams: true, ClientStreams: true, }, }, diff --git a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart index df787b0f..88c505fc 100644 --- a/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart +++ b/frontend/where_child_bus_api/lib/proto-gen/where_child_bus/v1/bus.pbgrpc.dart @@ -88,8 +88,8 @@ class BusServiceClient extends $grpc.Client { return $createStreamingCall(_$trackBusContinuous, $async.Stream.fromIterable([request]), options: options); } - $grpc.ResponseFuture<$0.StreamBusVideoResponse> streamBusVideo($async.Stream<$0.StreamBusVideoRequest> request, {$grpc.CallOptions? options}) { - return $createStreamingCall(_$streamBusVideo, request, options: options).single; + $grpc.ResponseStream<$0.StreamBusVideoResponse> streamBusVideo($async.Stream<$0.StreamBusVideoRequest> request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$streamBusVideo, request, options: options); } } @@ -151,7 +151,7 @@ abstract class BusServiceBase extends $grpc.Service { 'StreamBusVideo', streamBusVideo, true, - false, + true, ($core.List<$core.int> value) => $0.StreamBusVideoRequest.fromBuffer(value), ($0.StreamBusVideoResponse value) => value.writeToBuffer())); } @@ -187,5 +187,5 @@ abstract class BusServiceBase extends $grpc.Service { $async.Future<$0.ChangeBusStatusResponse> changeBusStatus($grpc.ServiceCall call, $0.ChangeBusStatusRequest request); $async.Future<$0.SendLocationContinuousResponse> sendLocationContinuous($grpc.ServiceCall call, $async.Stream<$0.SendLocationContinuousRequest> request); $async.Stream<$0.TrackBusContinuousResponse> trackBusContinuous($grpc.ServiceCall call, $0.TrackBusContinuousRequest request); - $async.Future<$0.StreamBusVideoResponse> streamBusVideo($grpc.ServiceCall call, $async.Stream<$0.StreamBusVideoRequest> request); + $async.Stream<$0.StreamBusVideoResponse> streamBusVideo($grpc.ServiceCall call, $async.Stream<$0.StreamBusVideoRequest> request); } diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py index ef13eef7..e5b5531f 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"h\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xa5\x01\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x95\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12&\n\x0fnext_station_id\x18\x04 \x01(\tR\rnextStationId\"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xb7\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1a\n\x08latitude\x18\x04 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x05 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x06 \x01(\x08R\x15\x65nableFaceRecognition\x12&\n\x0fnext_station_id\x18\t \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\n \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\x9b\x07\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12i\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwhere_child_bus/v1/bus.proto\x12\x12where_child_bus.v1\x1a\"where_child_bus/v1/resources.proto\x1a google/protobuf/field_mask.proto\"h\n\x10\x43reateBusRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\">\n\x11\x43reateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"=\n\x1cGetBusListByNurseryIdRequest\x12\x1d\n\nnursery_id\x18\x01 \x01(\tR\tnurseryId\"N\n\x1dGetBusListByNurseryIdResponse\x12-\n\x05\x62uses\x18\x01 \x03(\x0b\x32\x17.where_child_bus.v1.BusR\x05\x62uses\"C\n GetRunningBusByGuardianIdRequest\x12\x1f\n\x0bguardian_id\x18\x01 \x01(\tR\nguardianId\"N\n!GetRunningBusByGuardianIdResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"\xa5\x01\n\x16\x43hangeBusStatusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12<\n\nbus_status\x18\x02 \x01(\x0e\x32\x1d.where_child_bus.v1.BusStatusR\tbusStatus\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\"D\n\x17\x43hangeBusStatusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us\"p\n\x1dSendLocationContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\" \n\x1eSendLocationContinuousResponse\"2\n\x19TrackBusContinuousRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\"\x95\x01\n\x1aTrackBusContinuousResponse\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1a\n\x08latitude\x18\x02 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x03 \x01(\x01R\tlongitude\x12&\n\x0fnext_station_id\x18\x04 \x01(\tR\rnextStationId\"\xb1\x02\n\x15StreamBusVideoRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x1d\n\nnursery_id\x18\x02 \x01(\tR\tnurseryId\x12\x36\n\x08\x62us_type\x18\x03 \x01(\x0e\x32\x1b.where_child_bus.v1.BusTypeR\x07\x62usType\x12\x45\n\rvehicle_event\x18\x04 \x01(\x0e\x32 .where_child_bus.v1.VehicleEventR\x0cvehicleEvent\x12\x1f\n\x0bvideo_chunk\x18\x05 \x03(\x0cR\nvideoChunk\x12!\n\x0cphoto_height\x18\x06 \x01(\x05R\x0bphotoHeight\x12\x1f\n\x0bphoto_width\x18\x07 \x01(\x05R\nphotoWidth\"p\n\x16StreamBusVideoResponse\x12\x1f\n\x0bis_detected\x18\x01 \x01(\x08R\nisDetected\x12\x35\n\x08\x63hildren\x18\x02 \x03(\x0b\x32\x19.where_child_bus.v1.ChildR\x08\x63hildren\"\xb7\x02\n\x10UpdateBusRequest\x12\x15\n\x06\x62us_id\x18\x01 \x01(\tR\x05\x62usId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12!\n\x0cplate_number\x18\x03 \x01(\tR\x0bplateNumber\x12\x1a\n\x08latitude\x18\x04 \x01(\x01R\x08latitude\x12\x1c\n\tlongitude\x18\x05 \x01(\x01R\tlongitude\x12\x36\n\x17\x65nable_face_recognition\x18\x06 \x01(\x08R\x15\x65nableFaceRecognition\x12&\n\x0fnext_station_id\x18\t \x01(\tR\rnextStationId\x12;\n\x0bupdate_mask\x18\n \x01(\x0b\x32\x1a.google.protobuf.FieldMaskR\nupdateMask\">\n\x11UpdateBusResponse\x12)\n\x03\x62us\x18\x01 \x01(\x0b\x32\x17.where_child_bus.v1.BusR\x03\x62us2\x9d\x07\n\nBusService\x12X\n\tCreateBus\x12$.where_child_bus.v1.CreateBusRequest\x1a%.where_child_bus.v1.CreateBusResponse\x12|\n\x15GetBusListByNurseryId\x12\x30.where_child_bus.v1.GetBusListByNurseryIdRequest\x1a\x31.where_child_bus.v1.GetBusListByNurseryIdResponse\x12\x88\x01\n\x19GetRunningBusByGuardianId\x12\x34.where_child_bus.v1.GetRunningBusByGuardianIdRequest\x1a\x35.where_child_bus.v1.GetRunningBusByGuardianIdResponse\x12X\n\tUpdateBus\x12$.where_child_bus.v1.UpdateBusRequest\x1a%.where_child_bus.v1.UpdateBusResponse\x12j\n\x0f\x43hangeBusStatus\x12*.where_child_bus.v1.ChangeBusStatusRequest\x1a+.where_child_bus.v1.ChangeBusStatusResponse\x12\x81\x01\n\x16SendLocationContinuous\x12\x31.where_child_bus.v1.SendLocationContinuousRequest\x1a\x32.where_child_bus.v1.SendLocationContinuousResponse(\x01\x12u\n\x12TrackBusContinuous\x12-.where_child_bus.v1.TrackBusContinuousRequest\x1a..where_child_bus.v1.TrackBusContinuousResponse0\x01\x12k\n\x0eStreamBusVideo\x12).where_child_bus.v1.StreamBusVideoRequest\x1a*.where_child_bus.v1.StreamBusVideoResponse(\x01\x30\x01\x42\xeb\x01\n\x16\x63om.where_child_bus.v1B\x08\x42usProtoP\x01Zfgithub.com/GreenTeaProgrammers/WhereChildBus/backend/proto-gen/go/where_child_bus/v1;where_child_busv1\xa2\x02\x03WXX\xaa\x02\x10WhereChildBus.V1\xca\x02\x10WhereChildBus\\V1\xe2\x02\x1cWhereChildBus\\V1\\GPBMetadata\xea\x02\x11WhereChildBus::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -57,5 +57,5 @@ _globals['_UPDATEBUSRESPONSE']._serialized_start=1910 _globals['_UPDATEBUSRESPONSE']._serialized_end=1972 _globals['_BUSSERVICE']._serialized_start=1975 - _globals['_BUSSERVICE']._serialized_end=2898 + _globals['_BUSSERVICE']._serialized_end=2900 # @@protoc_insertion_point(module_scope) diff --git a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py index c1430e2f..8b4d82f4 100644 --- a/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py +++ b/machine_learning/src/generated/where_child_bus/v1/bus_pb2_grpc.py @@ -49,7 +49,7 @@ def __init__(self, channel): request_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.FromString, ) - self.StreamBusVideo = channel.stream_unary( + self.StreamBusVideo = channel.stream_stream( '/where_child_bus.v1.BusService/StreamBusVideo', request_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, response_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.FromString, @@ -145,7 +145,7 @@ def add_BusServiceServicer_to_server(servicer, server): request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_bus__pb2.TrackBusContinuousResponse.SerializeToString, ), - 'StreamBusVideo': grpc.stream_unary_rpc_method_handler( + 'StreamBusVideo': grpc.stream_stream_rpc_method_handler( servicer.StreamBusVideo, request_deserializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.FromString, response_serializer=where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.SerializeToString, @@ -290,7 +290,7 @@ def StreamBusVideo(request_iterator, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.stream_unary(request_iterator, target, '/where_child_bus.v1.BusService/StreamBusVideo', + return grpc.experimental.stream_stream(request_iterator, target, '/where_child_bus.v1.BusService/StreamBusVideo', where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoRequest.SerializeToString, where__child__bus_dot_v1_dot_bus__pb2.StreamBusVideoResponse.FromString, options, channel_credentials, diff --git a/proto/where_child_bus/v1/bus.proto b/proto/where_child_bus/v1/bus.proto index b9abe897..0b12d032 100644 --- a/proto/where_child_bus/v1/bus.proto +++ b/proto/where_child_bus/v1/bus.proto @@ -14,7 +14,7 @@ service BusService { rpc SendLocationContinuous(stream SendLocationContinuousRequest) returns (SendLocationContinuousResponse); rpc TrackBusContinuous(TrackBusContinuousRequest) returns (stream TrackBusContinuousResponse); - rpc StreamBusVideo(stream StreamBusVideoRequest) returns (StreamBusVideoResponse); + rpc StreamBusVideo(stream StreamBusVideoRequest) returns (stream StreamBusVideoResponse); } message CreateBusRequest { From fd6ed0ef0c79cd7c2860d1dd228c1af562e38049 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 04:19:57 +0900 Subject: [PATCH 750/771] =?UTF-8?q?fix:=E3=83=AC=E3=82=B9=E3=83=9D?= =?UTF-8?q?=E3=83=B3=E3=82=B9=E3=82=92=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC?= =?UTF-8?q?=E3=83=A0=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/lib/pages/camera_page/camera_page.dart | 2 +- frontend/where_child_bus/lib/util/api/bus.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index 3d887311..c12216e3 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -80,7 +80,7 @@ class _CameraPageState extends State { final res = grpcClient.streamBusVideo(requestStream); try { - await for (var response in res.asStream()) { + await for (var response in res) { developer.log("Received response: $response", name: "CameraPage"); await _playAudio(response); } diff --git a/frontend/where_child_bus/lib/util/api/bus.dart b/frontend/where_child_bus/lib/util/api/bus.dart index 9626a2dd..2c4aeace 100644 --- a/frontend/where_child_bus/lib/util/api/bus.dart +++ b/frontend/where_child_bus/lib/util/api/bus.dart @@ -128,7 +128,7 @@ Future streamBusVideo(Stream requestStream) async { try { developer.log("Streamed video to server"); - await for (var response in res.asStream()) { + await for (var response in res) { developer.log("Received response: $response"); } } catch (error) { From 1a060a69673b1d0f1490c76a057a6ef8dc143755 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 04:22:16 +0900 Subject: [PATCH 751/771] =?UTF-8?q?fix:=E3=83=81=E3=83=A3=E3=83=B3?= =?UTF-8?q?=E3=83=8D=E3=83=AB=E3=82=92=E9=96=89=E3=81=98=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/camera_page/camera_page.dart | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index c12216e3..ac0c0631 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -37,6 +37,9 @@ class _CameraPageState extends State { VehicleEvent _vehicleEvent = VehicleEvent.VEHICLE_EVENT_GET_ON; final Location location = Location(); + ClientChannel? _videoChannel; + ClientChannel? _locationChannel; + @override void initState() { super.initState(); @@ -70,12 +73,12 @@ class _CameraPageState extends State { Future streamBusVideo( Stream requestStream) async { - final channel = ClientChannel( + _videoChannel = ClientChannel( appConfig.grpcEndpoint, port: appConfig.grpcPort, options: const ChannelOptions(), ); - final grpcClient = BusServiceClient(channel); + final grpcClient = BusServiceClient(_videoChannel!); developer.log("ServiceClient created"); final res = grpcClient.streamBusVideo(requestStream); @@ -87,18 +90,18 @@ class _CameraPageState extends State { } catch (error) { developer.log("Caught Error:", error: error, name: "StreamBusVideo"); } finally { - await channel.shutdown(); + await _videoChannel!.shutdown(); } } Future _streamCoordinate( Stream requestStream) async { - final channel = ClientChannel( + _locationChannel = ClientChannel( appConfig.grpcEndpoint, port: appConfig.grpcPort, options: const ChannelOptions(), ); - final grpcClient = BusServiceClient(channel); + final grpcClient = BusServiceClient(_locationChannel!); developer.log("ServiceClient created"); final res = grpcClient.sendLocationContinuous(requestStream); @@ -109,7 +112,7 @@ class _CameraPageState extends State { } catch (error) { developer.log("Caught Error:", error: error); } finally { - await channel.shutdown(); + await _locationChannel!.shutdown(); } } @@ -282,6 +285,8 @@ class _CameraPageState extends State { _controller.dispose(); _streamController.close(); _locationStream.close(); + _videoChannel?.shutdown(); + _locationChannel?.shutdown(); super.dispose(); } From 9106b850b7d0b67d51c7e29463d41d3db0661d13 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 24 Feb 2024 04:22:51 +0900 Subject: [PATCH 752/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E3=83=93=E3=83=87=E3=82=AA=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC?= =?UTF-8?q?=E3=83=A0=E3=83=AC=E3=82=B9=E3=83=9D=E3=83=B3=E3=82=B9=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index fc60db6f..b55f9112 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -591,7 +591,7 @@ func (i *Interactor) processDetectedChildren(tx *ent.Tx, ctx context.Context, st i.logger.Info("sending response to client", "bus_id", busUUID, "vehicle_event", vehicleEvent, "children", pbChildren) // 元のクライアントにレスポンスを返す - err := stream.SendMsg(&pb.StreamBusVideoResponse{ + err := stream.Send(&pb.StreamBusVideoResponse{ IsDetected: resp.IsDetected, Children: pbChildren, }) From c3848909fa9079798ea926027eb617f0d2a4881b Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 24 Feb 2024 04:37:07 +0900 Subject: [PATCH 753/771] ci: invert workflows setting --- .github/workflows/deploy-to-gcloud.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-to-gcloud.yml b/.github/workflows/deploy-to-gcloud.yml index 9702f521..84894ed1 100644 --- a/.github/workflows/deploy-to-gcloud.yml +++ b/.github/workflows/deploy-to-gcloud.yml @@ -7,7 +7,6 @@ on: push: branches: - develop - - feature/backend/api paths: - "backend/**" From 423c383b9d2e06e1b002c94af79f7e23b3c3630c Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 24 Feb 2024 05:11:06 +0900 Subject: [PATCH 754/771] =?UTF-8?q?debug:=20=E3=83=87=E3=83=90=E3=83=83?= =?UTF-8?q?=E3=82=B0=E7=94=A8=E3=81=AB=E4=BD=8D=E7=BD=AE=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E5=85=B1=E6=9C=89=E3=81=AE=E3=83=81=E3=83=83=E3=82=AF=E3=82=92?= =?UTF-8?q?=E7=9F=AD=E7=B8=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/bus/bus.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/usecases/bus/bus.go b/backend/usecases/bus/bus.go index b55f9112..3c9db913 100644 --- a/backend/usecases/bus/bus.go +++ b/backend/usecases/bus/bus.go @@ -341,8 +341,8 @@ func (i *Interactor) UpdateBus(ctx context.Context, req *pb.UpdateBusRequest) (* func (i *Interactor) SendLocationContinuous(stream pb.BusService_SendLocationContinuousServer) error { ctx := stream.Context() - retryDelay := 10 * time.Second // リトライの間隔を10秒に設定 - maxRetries := 5 // 最大リトライ回数 + retryDelay := 1 * time.Second // リトライの間隔を10秒に設定 + maxRetries := 5 // 最大リトライ回数 ticker := time.NewTicker(retryDelay) defer ticker.Stop() @@ -402,7 +402,7 @@ func (i *Interactor) TrackBusContinuous(req *pb.TrackBusContinuousRequest, strea } // 送信間隔の設定(例えば、5秒ごと) - ticker := time.NewTicker(10 * time.Second) + ticker := time.NewTicker(1 * time.Second) defer ticker.Stop() for { From 59047a5a2f97b60fde7778b0a345de00af582a4b Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 24 Feb 2024 05:38:02 +0900 Subject: [PATCH 755/771] =?UTF-8?q?fix:=20busType=E3=82=92=E7=8F=BE?= =?UTF-8?q?=E5=9C=A8=E6=99=82=E5=88=BB=E3=82=92=E3=82=82=E3=81=A8=E3=81=AB?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/map_page/map_page.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index f022d5cd..88c035d2 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -79,7 +79,7 @@ class _MapPageState extends State { developer.log("$busLatitude, $busLongitude", name: "TrackBusContinuous"); }); - await Future.delayed(const Duration(seconds: 10)); + await Future.delayed(const Duration(seconds: 1)); } } catch (error) { developer.log("Caught Error", error: error); @@ -135,7 +135,9 @@ class _MapPageState extends State { Future _loadStationsData() async { try { - var busType = BusType.BUS_TYPE_EVENING; + var busType = DateTime.now().hour <= 12 + ? BusType.BUS_TYPE_MORNING + : BusType.BUS_TYPE_EVENING; developer.log('停留所リストの読み込み開始'); var busRouteRes = await getBusRouteByBusService(bus.id, busType); if (mounted) { From 003bd31508dad1f4eb951764d17ddb70aac299ca Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 06:19:46 +0900 Subject: [PATCH 756/771] =?UTF-8?q?fix:=E4=BF=9D=E8=82=B2=E5=9C=92?= =?UTF-8?q?=E7=99=BB=E9=8C=B2=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=A0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/pages/register_page/register_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/register_page/register_page.dart b/frontend/where_child_bus/lib/pages/register_page/register_page.dart index 5726e821..367800b0 100644 --- a/frontend/where_child_bus/lib/pages/register_page/register_page.dart +++ b/frontend/where_child_bus/lib/pages/register_page/register_page.dart @@ -66,11 +66,11 @@ class _RegisterPageState extends State { try { CreateNurseryResponse res = await createNursery( - _nameController.text, _emailController.text, _passwordController.text, _phoneNumberController.text, _addressController.text, + _nameController.text, ); NurseryData().setNursery(res.nursery); From 06677728ffe46b566512f2a4187c6c5df853c944 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 06:26:35 +0900 Subject: [PATCH 757/771] =?UTF-8?q?fix:=E5=9C=92=E5=85=90=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=A7=E6=AF=8E=E5=9B=9E?= =?UTF-8?q?=E4=BF=9D=E8=AD=B7=E8=80=85=E3=81=A8=E3=83=90=E3=82=B9=E3=82=92?= =?UTF-8?q?=E3=83=95=E3=82=A7=E3=83=83=E3=83=81=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/utils/input_form_body.dart | 56 +++++++------------ 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart index ebc80200..b02a3f38 100644 --- a/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart +++ b/frontend/where_child_bus/lib/pages/student_list_page/components/utils/input_form_body.dart @@ -64,49 +64,33 @@ class _InputFormBodyState extends State { } Future _loadGuardians() async { - if (NurseryGuardianData().getGuardianList().isNotEmpty) { - if (mounted) { - setState(() { - guardians = NurseryGuardianData().getGuardianList(); - }); - } - return; - } else { - try { - var res = await getGuardianListByNurseryIdService( - NurseryData().getNursery().id); - NurseryGuardianData().setGuardianListResponse(res); - setState(() { - guardians = NurseryGuardianData().getGuardianList(); - }); - } catch (error) { - developer.log("Caught Error", error: error.toString()); - setState(() { - guardians = []; - }); - } + try { + var res = await getGuardianListByNurseryIdService( + NurseryData().getNursery().id); + NurseryGuardianData().setGuardianListResponse(res); + setState(() { + guardians = NurseryGuardianData().getGuardianList(); + }); + } catch (error) { + developer.log("Caught Error", error: error.toString()); + setState(() { + guardians = []; + }); } } Future _loadBuses() async { - if (NurseryBusData().getBusList().isNotEmpty) { + try { + var res = await getBusList(NurseryData().getNursery().id); + NurseryBusData().setBusListResponse(res); setState(() { buses = NurseryBusData().getBusList(); }); - return; - } else { - try { - var res = await getBusList(NurseryData().getNursery().id); - NurseryBusData().setBusListResponse(res); - setState(() { - buses = NurseryBusData().getBusList(); - }); - } catch (error) { - developer.log("Caught Error", error: error.toString()); - setState(() { - buses = []; - }); - } + } catch (error) { + developer.log("Caught Error", error: error.toString()); + setState(() { + buses = []; + }); } } From d5a178b1b36c2e295fc65dc7e6d89c963c1ab9f0 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 06:35:43 +0900 Subject: [PATCH 758/771] =?UTF-8?q?fix:=E3=83=90=E3=82=B9=E5=90=8D?= =?UTF-8?q?=E3=81=AE=E9=95=B7=E3=81=95=E3=81=AE=E3=83=90=E3=83=AA=E3=83=87?= =?UTF-8?q?=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_edit_page/bus_edit_page.dart | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index 205f80e8..cd4ead24 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -64,19 +64,22 @@ class _BusEditPageState extends State { _createBusError = CreateBusError.fieldsNotFilled; }); return true; - //Note 今のところ保護者が選択されていなくても作成できる - // } else if (CreateBusValidator.validateGuardians( - // morningSelectedGuardiansId, eveningSelectedGuardiansId)) { - // setState(() { - // _createBusError = CreateBusError.noGuardiansSelected; - // }); - // return true; - } else if (CreateBusValidator.validateNameLength(_busNameController.text)) { - setState(() { - _createBusError = CreateBusError.nameTooLong; - }); - return true; } + //Note 今のところ保護者が選択されていなくても作成できる + // } else if (CreateBusValidator.validateGuardians( + // morningSelectedGuardiansId, eveningSelectedGuardiansId)) { + // setState(() { + // _createBusError = CreateBusError.noGuardiansSelected; + // }); + // return true; + + //Todo 将来的に修正する + // } else if (CreateBusValidator.validateNameLength(_busNameController.text)) { + // setState(() { + // _createBusError = CreateBusError.nameTooLong; + // }); + // return true; + // } return false; } From f1cd5b2bcf1b852800ada338c78e6f8fea7b6f1f Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 06:49:04 +0900 Subject: [PATCH 759/771] =?UTF-8?q?fix:=E4=BF=9D=E8=AD=B7=E8=80=85?= =?UTF-8?q?=E7=99=BB=E9=8C=B2=E7=94=BB=E9=9D=A2=E3=81=AE=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E4=B8=8A=E3=81=AB=E7=A7=BB?= =?UTF-8?q?=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_child_manage_page/bus_guardian_manage_page.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart index 01251c93..d560e044 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -146,8 +146,8 @@ class _BusGuardianManagePageState extends State { ], ), ), - SizedBox( - height: 100, + Padding( + padding: const EdgeInsets.only(bottom: 100.0), child: ConfirmButton( buttonText: "保存", onTap: () => { From 607092d360280feaca3516157ef5c8475e50bc0c Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 06:59:05 +0900 Subject: [PATCH 760/771] =?UTF-8?q?fix:=E4=BF=9D=E5=AD=98=E3=83=9C?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=81=AE=E4=BE=8B=E5=A4=96=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus_guardian_manage_page.dart | 2 +- .../components/confirm_button.dart | 32 +++++++++---------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart index d560e044..d437ceb9 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_child_manage_page/bus_guardian_manage_page.dart @@ -147,7 +147,7 @@ class _BusGuardianManagePageState extends State { ), ), Padding( - padding: const EdgeInsets.only(bottom: 100.0), + padding: const EdgeInsets.only(bottom: 8), child: ConfirmButton( buttonText: "保存", onTap: () => { diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart index 887fef5e..7042210a 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/components/confirm_button.dart @@ -13,23 +13,21 @@ class ConfirmButton extends StatelessWidget { } Widget confirmButton(BuildContext context) { - return Expanded( - child: Align( - alignment: Alignment.bottomCenter, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 10), - child: SizedBox( - width: MediaQuery.of(context).size.width * 0.6, - height: fontSize * 2, - child: ElevatedButton( - onPressed: onTap ?? () {}, - style: ElevatedButton.styleFrom( - backgroundColor: Colors.black, - ), - child: Text( - buttonText, - style: buttonTextStyle(), - ), + return Align( + alignment: Alignment.bottomCenter, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10), + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.6, + height: fontSize * 2, + child: ElevatedButton( + onPressed: onTap ?? () {}, + style: ElevatedButton.styleFrom( + backgroundColor: Colors.black, + ), + child: Text( + buttonText, + style: buttonTextStyle(), ), ), ), From d280ec3dda67d3a93404b3de8d5eb2476bb1d216 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 07:02:05 +0900 Subject: [PATCH 761/771] =?UTF-8?q?fix:createBus=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=80=81=E7=B5=82=E3=82=8F=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=A8=E3=81=8D=E3=81=AB=E5=BF=85=E3=81=9A=E3=83=95=E3=83=A9?= =?UTF-8?q?=E3=82=B0=E3=82=92=E4=B8=8B=E3=81=92=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_edit_page/bus_edit_page.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index cd4ead24..fa9844a4 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -140,6 +140,12 @@ class _BusEditPageState extends State { if (kDebugMode) { developer.log("バスの作成中にエラーが発生しました: $e"); } + } finally { + if (mounted) { + setState(() { + _isCreatingBus = false; + }); + } } } From 99c7bb81ffd584cc316e3d0dd2c115bdf83b7a84 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 07:10:44 +0900 Subject: [PATCH 762/771] =?UTF-8?q?fix:GoogleMap=E3=81=AEExpanded=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_list_page.dart | 1 + .../create_station_page.dart | 45 +++++++++---------- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index 470056c9..e5e9148c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -152,6 +152,7 @@ class _BusListPageState extends State { }); }, child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ BusImage(busStatus: bus.busStatus), _createBusNameAndDescription(bus.name, bus.busStatus), diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart index 78474d2f..bed7b826 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/create_station_page/create_station_page.dart @@ -128,32 +128,29 @@ class _CreateStationPageState extends State { ? Container() : SizedBox( width: MediaQuery.of(context).size.width, - child: Expanded( - flex: 3, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Padding( - padding: const EdgeInsets.all(10), - child: Text( - '${guardians[_index].name}さん', - style: const TextStyle(fontSize: 20), - ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.all(10), + child: Text( + '${guardians[_index].name}さん', + style: const TextStyle(fontSize: 20), ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 10.0, vertical: 8.0), - child: PositionDecideButton( - onPressed: - _markers.isNotEmpty ? _onButtonPressed : () {}, - text: _markers.isNotEmpty - ? 'バス停を決定する' - : '地図をタップしてバス停を決定してください', - isLoading: _isLoadingUpdate, - ), + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10.0, vertical: 8.0), + child: PositionDecideButton( + onPressed: + _markers.isNotEmpty ? _onButtonPressed : () {}, + text: _markers.isNotEmpty + ? 'バス停を決定する' + : '地図をタップしてバス停を決定してください', + isLoading: _isLoadingUpdate, ), - ], - ), + ), + ], ), ) ], From 8d15b4e8c71d438c763728bbea87e911f9fd4812 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 08:24:55 +0900 Subject: [PATCH 763/771] =?UTF-8?q?fix:AppDelegate=E3=81=8B=E3=82=89?= =?UTF-8?q?=E4=BD=99=E5=88=86=E3=81=AA=E8=A8=AD=E5=AE=9A=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus/ios/Runner/AppDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/where_child_bus/ios/Runner/AppDelegate.swift b/frontend/where_child_bus/ios/Runner/AppDelegate.swift index be3ccfb9..880498e6 100644 --- a/frontend/where_child_bus/ios/Runner/AppDelegate.swift +++ b/frontend/where_child_bus/ios/Runner/AppDelegate.swift @@ -10,7 +10,7 @@ import flutter_config didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GMSServices.provideAPIKey(FlutterConfigPlugin.env(for: "IOS_GOOGLE_MAP_API_KEY")) - GMSServices.setMetalRendererEnabled(true) + // GMSServices.setMetalRendererEnabled(true) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } From 474d9f71c0016c7798f73f0e727706cecd9de4c9 Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 08:38:54 +0900 Subject: [PATCH 764/771] =?UTF-8?q?fix:busUpdate=E5=AE=8C=E4=BA=86?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=83=AD=E3=83=BC=E3=83=87=E3=82=A3=E3=83=B3?= =?UTF-8?q?=E3=82=B0=E3=82=92=E7=B5=82=E4=BA=86=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/bus_list_page/bus_edit_page/bus_edit_page.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart index fa9844a4..57fddf00 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_edit_page/bus_edit_page.dart @@ -11,7 +11,6 @@ import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/con import 'package:where_child_bus/pages/bus_list_page/bus_edit_page/components/input_element.dart'; import 'package:where_child_bus/service/create_bus.dart'; import 'package:where_child_bus/service/update_bus.dart'; -import 'package:where_child_bus/util/api/bus.dart'; import 'package:where_child_bus/util/validation/create_bus_validation.dart'; import 'package:where_child_bus_api/proto-gen/where_child_bus/v1/resources.pb.dart'; @@ -112,6 +111,12 @@ class _BusEditPageState extends State { developer.log("バスの更新中にエラーが発生しました", error: e, name: "BusUpdateButtonError"); } + } finally { + if (mounted) { + setState(() { + _isCreatingBus = false; + }); + } } } From fc98a9f73e822b4ac000815a5037107789b114bb Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 08:53:04 +0900 Subject: [PATCH 765/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E3=82=92?= =?UTF-8?q?=E4=BD=9C=E6=88=90=E3=81=97=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=AB?= =?UTF-8?q?=E3=80=81=E3=83=95=E3=82=A7=E3=83=83=E3=83=81=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus/lib/pages/bus_list_page/bus_list_page.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart index e5e9148c..5f58182c 100644 --- a/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart +++ b/frontend/where_child_bus/lib/pages/bus_list_page/bus_list_page.dart @@ -106,13 +106,14 @@ class _BusListPageState extends State { Widget _createAddBusButton() { return FloatingActionButton( - onPressed: () { + onPressed: () async { Navigator.push( context, MaterialPageRoute( builder: (context) => const BusEditPage( busEditPageType: BusEditPageType.create, ))); + await _fetchBusList(); }, child: const Icon(Icons.add), ); From 6cb61ddf77080b432e15b67baf4b7f6c0c993262 Mon Sep 17 00:00:00 2001 From: KinjiKawaguchi Date: Sat, 24 Feb 2024 09:00:42 +0900 Subject: [PATCH 766/771] =?UTF-8?q?fix:=20=E3=83=90=E3=82=B9=E3=83=AB?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=81=AE=E3=83=88=E3=83=AC=E3=83=BC=E3=83=8B?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E3=82=B9=E3=83=88=E3=83=AA=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E3=82=92=E3=83=90=E3=83=83=E3=82=AF=E3=82=B0=E3=83=A9=E3=82=A6?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=81=A7=E7=B6=99=E7=B6=9A=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=81=9F=E3=82=81=E3=81=AE=E3=82=B4=E3=83=AB=E3=83=BC=E3=83=81?= =?UTF-8?q?=E3=83=B3=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/usecases/busroute/bus_route.go | 58 +++++++++++++------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/backend/usecases/busroute/bus_route.go b/backend/usecases/busroute/bus_route.go index 30270fea..f59ce8a9 100644 --- a/backend/usecases/busroute/bus_route.go +++ b/backend/usecases/busroute/bus_route.go @@ -2,7 +2,6 @@ package busroute import ( "context" - "fmt" "io" "github.com/GreenTeaProgrammers/WhereChildBus/backend/domain/repository/ent" @@ -96,46 +95,50 @@ func (i *Interactor) CreateBusRoute(ctx context.Context, req *pb.CreateBusRouteR } ChildIds[index] = childCopy.Id } - stream, err := i.MLServiceClient.Train(ctx, &mlv1.TrainRequest{ - BusId: req.BusId, - ChildIds: ChildIds, - NurseryId: req.NurseryId, - BusType: req.BusType, - }) - if err != nil { - i.logger.Error("failed to transport to train server", "error", err) - return nil, err - } - - // 最初のレスポンスを待つ - response, err := stream.Recv() - if err != nil { - i.logger.Error("error receiving from stream", "error", err) - return nil, err - } + // バックグラウンドでストリーミングを継続するためのゴルーチン + go func() { + // MLトレーニングのための新しいコンテクストを作成します。これは、元のリクエストのコンテクストとは独立しています。 + trainCtx, cancel := context.WithCancel(context.Background()) + defer cancel() // ストリームが完了またはエラーに遭遇したらコンテクストをキャンセル + + stream, err := i.MLServiceClient.Train(trainCtx, &mlv1.TrainRequest{ + BusId: req.BusId, + ChildIds: ChildIds, + NurseryId: req.NurseryId, + BusType: req.BusType, + }) + if err != nil { + i.logger.Error("failed to transport to train server", "error", err) + return + } - if response.Status == mlv1.Status_STATUS_FAILED { - i.logger.Error("training was not started", "error", err) - return nil, fmt.Errorf("training was not started") - } + // 最初のレスポンスを待つ + response, err := stream.Recv() + if err != nil { + i.logger.Error("error receiving from stream", "error", err) + return + } - i.logger.Info("Training started") + if response.Status == mlv1.Status_STATUS_FAILED { + i.logger.Error("training was not started", "error", err) + return + } - // バックグラウンドでストリーミングを継続するためのゴルーチン - go func() { + i.logger.Info("Training started") for { + i.logger.Info("stream still connected") _, err := stream.Recv() if err == io.EOF { // ストリームの終了 + i.logger.Info("Training stream ended") break } if err != nil { i.logger.Error("error receiving from stream", "error", err) + // エラーが発生した場合でも適切にリソースを解放します。 return } - - // ここではストリーミングレスポンスは利用しませんが、接続を維持します } i.logger.Info("Training stream completed") }() @@ -155,7 +158,6 @@ func (i *Interactor) CreateBusRoute(ctx context.Context, req *pb.CreateBusRouteR i.logger.Error("failed to create bus route response", "error", err) return nil, err } - return &pb.CreateBusRouteResponse{BusRoute: pbBusRoute}, nil } func (i *Interactor) createAssociation(ctx context.Context, tx *ent.Tx, guardianIdList []string, busRoute *ent.BusRoute) ([]*pb.Child, error) { From 3ea96da466b21f250e5476509873ef38e929b92a Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 09:28:02 +0900 Subject: [PATCH 767/771] =?UTF-8?q?feat:map=E3=83=9A=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=81=ABrefreshIndicator=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/map_page/map_page.dart | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart index 88c035d2..21f9a6e3 100644 --- a/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/map_page/map_page.dart @@ -208,19 +208,22 @@ class _MapPageState extends State { ? const Center( child: CircularProgressIndicator(), ) - : Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - GoogleMapView( - waypoints: waypoints, - nurseryLatitude: nurseryLatitude, - nurseryLongitude: nurseryLongitude, - busLatitude: busLatitude, - busLongitude: busLongitude, - ), - pageBottomWrapper(), - ], + : RefreshIndicator( + onRefresh: _initializePage, + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + GoogleMapView( + waypoints: waypoints, + nurseryLatitude: nurseryLatitude, + nurseryLongitude: nurseryLongitude, + busLatitude: busLatitude, + busLongitude: busLongitude, + ), + pageBottomWrapper(), + ], + ), ), ); } From 7f7ae45c086c448834975ce0fe8536a0a6e3a53e Mon Sep 17 00:00:00 2001 From: KikyoNanakusa Date: Sat, 24 Feb 2024 11:07:54 +0900 Subject: [PATCH 768/771] =?UTF-8?q?feat:StopBusPage=E3=81=ABRefreshIndicat?= =?UTF-8?q?or=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/where_child_bus_guardian/lib/app.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index b42f200d..230651de 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -62,7 +62,10 @@ class _AppState extends State { padding: EdgeInsets.only(top: 30), child: IndexedStack(index: _selectedIndex, children: [ DailyPage(), - _hasRunningBus ? MapPage() : StopBusPage(), + _hasRunningBus + ? MapPage() + : RefreshIndicator( + onRefresh: _loadRunningBus, child: StopBusPage()), CheckPage(), ])), bottomNavigationBar: CustomWaveBottomBar( From 3584402b420ba7663d6f35568e379bb14b47bf21 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 24 Feb 2024 11:17:45 +0900 Subject: [PATCH 769/771] =?UTF-8?q?feat:StopBusPage=E3=81=AB=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../where_child_bus_guardian/lib/app.dart | 5 +-- .../lib/pages/auth_page/auth_page.dart | 18 +++++----- .../pages/stop_bus_page/stop_bus_page.dart | 34 +++++++++++++++++-- 3 files changed, 43 insertions(+), 14 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/app.dart b/frontend/where_child_bus_guardian/lib/app.dart index 230651de..b6f15799 100644 --- a/frontend/where_child_bus_guardian/lib/app.dart +++ b/frontend/where_child_bus_guardian/lib/app.dart @@ -64,8 +64,9 @@ class _AppState extends State { DailyPage(), _hasRunningBus ? MapPage() - : RefreshIndicator( - onRefresh: _loadRunningBus, child: StopBusPage()), + : StopBusPage( + onPressed: _loadRunningBus, + ), CheckPage(), ])), bottomNavigationBar: CustomWaveBottomBar( diff --git a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart index c541f902..5d07733c 100644 --- a/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/auth_page/auth_page.dart @@ -35,15 +35,15 @@ class _AuthPageState extends State { GuardianLoginResponse res; try { - if (kDebugMode) { - res = await guardianLogin("hogosya1@example.com", "password"); - } else { - res = await guardianLogin( - _emailController.text, _passwordController.text); - if (_emailController.text.isEmpty || _passwordController.text.isEmpty) { - setState(() => _loginError = GuardianLoginError.fieldsDoNotFilled); - return; - } + // if (kDebugMode) { + // res = await guardianLogin("hogosya1@example.com", "password"); + // } else { + res = + await guardianLogin(_emailController.text, _passwordController.text); + if (_emailController.text.isEmpty || _passwordController.text.isEmpty) { + setState(() => _loginError = GuardianLoginError.fieldsDoNotFilled); + return; + // } } if (res.success) { diff --git a/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart b/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart index 1d52afa4..0c4ce52c 100644 --- a/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart @@ -1,25 +1,53 @@ import 'package:flutter/material.dart'; class StopBusPage extends StatefulWidget { - const StopBusPage({super.key}); + Function onPressed; + + StopBusPage({super.key, required this.onPressed}); @override State createState() => _StopBusPageState(); } class _StopBusPageState extends State { + bool _isLoading = false; + @override Widget build(BuildContext context) { - return const Center( + return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( + const Text( '現在走行中のバスはありません', style: TextStyle(fontSize: 20, color: Colors.red), ), + Padding( + padding: const EdgeInsets.all(8.0), + child: ElevatedButton( + onPressed: _fetchData, + child: _isLoading + ? const Center( + child: CircularProgressIndicator(), + ) + : const Text('更新')), + ), ], ), ); } + + void _fetchData() async { + if (mounted) { + setState(() { + _isLoading = true; + }); + } + await widget.onPressed(); + if (mounted) { + setState(() { + _isLoading = false; + }); + } + } } From a38b84bf524ab2db4708179c2cb5d041310d1e94 Mon Sep 17 00:00:00 2001 From: koto623 Date: Sat, 24 Feb 2024 11:26:42 +0900 Subject: [PATCH 770/771] =?UTF-8?q?chore:=E6=9B=B4=E6=96=B0=E3=83=9C?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/stop_bus_page/stop_bus_page.dart | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart b/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart index 0c4ce52c..4e4a1958 100644 --- a/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart +++ b/frontend/where_child_bus_guardian/lib/pages/stop_bus_page/stop_bus_page.dart @@ -24,13 +24,24 @@ class _StopBusPageState extends State { ), Padding( padding: const EdgeInsets.all(8.0), - child: ElevatedButton( - onPressed: _fetchData, - child: _isLoading - ? const Center( - child: CircularProgressIndicator(), - ) - : const Text('更新')), + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.2, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Colors.green[100], + foregroundColor: Colors.green[900]), + onPressed: _fetchData, + child: _isLoading + ? const Center( + child: SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator( + color: Colors.green, + ), + )) + : const Text('更新')), + ), ), ], ), From 352f74fda92a1c6b22716772587c40b4f913ec26 Mon Sep 17 00:00:00 2001 From: Mizuki Date: Sat, 24 Feb 2024 11:40:36 +0900 Subject: [PATCH 771/771] chore --- frontend/where_child_bus/lib/pages/auth_page/auth_page.dart | 2 +- frontend/where_child_bus/lib/pages/camera_page/camera_page.dart | 2 +- .../where_child_bus_guardian/lib/util/google_map_manager.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart index f70a4155..a99f6c6e 100644 --- a/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart +++ b/frontend/where_child_bus/lib/pages/auth_page/auth_page.dart @@ -132,7 +132,7 @@ class _AuthPageState extends State { NurseryLoginResponse res; try { if (kDebugMode) { - res = await nurseryLogin("demo@example.com", "password"); + res = await nurseryLogin("paopao@example.com", "password"); } else { res = await nurseryLogin(_emailController.text, _passwordController.text); diff --git a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart index ac0c0631..4c62fca5 100644 --- a/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart +++ b/frontend/where_child_bus/lib/pages/camera_page/camera_page.dart @@ -203,7 +203,7 @@ class _CameraPageState extends State { int frameCounter = 0; _controller.startImageStream((CameraImage image) async { frameCounter++; - if (frameCounter % 60 == 0) { + if (frameCounter % 45 == 0) { if (Platform.isAndroid) { videoChunks.add(image.planes[0].bytes.toList()); _streamController.add(StreamBusVideoRequest( diff --git a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart index 50816170..a960ba29 100644 --- a/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart +++ b/frontend/where_child_bus_guardian/lib/util/google_map_manager.dart @@ -29,7 +29,7 @@ class GoogleMapAPIManager { if (_lastApiCallTimestamps.containsKey(apiName)) { final durationSinceLastCall = DateTime.now().difference(_lastApiCallTimestamps[apiName]!); - if (durationSinceLastCall.inSeconds < 60) { + if (durationSinceLastCall.inSeconds < 3) { throw Exception( 'Too many requests: $apiName can only be called once per minute.'); }